[FFmpeg-devel] [PATCH] huffyuvdec: use unsafe bitstream reader

Christophe Gisquet christophe.gisquet at gmail.com
Sun Jun 15 20:39:07 CEST 2014


Hi,

2014-06-15 16:20 GMT+02:00 Michael Niedermayer <michaelni at gmx.at>:
> decode_422_bitstream() also needs an additional check because it
> seems to be able ro read 4 samples which might be upto 16 byte but
> the bitreader itself can overread  3 bytes so it might be slightly
> beyond the required padding of 16 bytes

Hum OK. So I think adding that extra check is adding back some extra
complexity in that loop. Therefore I chose to perform some unrolling
here in my patch. Maybe we could even get rid of the last code block
now.

There's also an additional check in the BGR case, but it would get
ugly to unroll it.

btw, that 422 bitstream parsing sets the missing values to 128. Is
that what the format wants? Or should that be 0, because we're dealing
with residuals?

-- 
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-huffyuvdec-use-unsafe-bitstream-reader.patch
Type: text/x-patch
Size: 2318 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140615/cb52f3a9/attachment.bin>


More information about the ffmpeg-devel mailing list