[FFmpeg-devel] [PATCH v4] avcodec: Cineform HD Decoder

Michael Niedermayer michael at niedermayer.cc
Fri Jan 29 03:49:24 CET 2016


On Thu, Jan 28, 2016 at 08:53:00PM +0000, Kieran Kunhya wrote:
> Decodes YUV 4:2:2 10-bit and RGB 12-bit files.
> Older files with more subbands, skips, Bayer, alpha not supported.
> Alpha requires addition of GBRAP12 pixel format.
[...]

> +static inline int dequant_and_decompand(int level, int quantisation)
> +{
> +    int64_t abslevel = abs(level);
> +    return (abslevel + ((768 * abslevel * abslevel * abslevel) / (255 * 255 * 255))) * FFSIGN(level) * quantisation;
> +}

the expression before "* quantisation", including abs() can be
replaced by a LUT i think
or maybe merged into the VLC table
which would be faster


[...]

> +        } else if (tag == 2) {
> +            av_log(avctx, AV_LOG_DEBUG, "tag=2 header - skipping %i tag/value pairs \n", data);
> +            for (i = 0; i < data; i++) {

> +                av_log(avctx, AV_LOG_DEBUG, "Tag/Value = %x %x \n", bytestream2_get_be16(&gb), bytestream2_get_be16(&gb));

the order of evaluation is undefined

patch should be fine

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160129/705ab9cc/attachment.sig>


More information about the ffmpeg-devel mailing list