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

Michael Niedermayer michaelni at gmx.at
Sun Jun 15 16:13:39 CEST 2014


On Sun, Jun 15, 2014 at 02:39:05PM +0200, Christophe Gisquet wrote:
> Hi,
> 
> this patch provides improvement for both win32 and win64 of around 10%
> 
> Other lossless decoders like utvideo would probably benefit from this too.
> 
> -- 
> Christophe

>  huffyuvdec.c |    2 ++
>  1 file changed, 2 insertions(+)
> 8a03e3ebe99adc890a81a0b2564ff0822d66b9f7  0004-huffyuvdec-use-unsafe-bitstream-reader.patch
> From 1c68d9b045d0fbd39d971f0a9b7d6244daca8faa Mon Sep 17 00:00:00 2001
> From: Christophe Gisquet <christophe.gisquet at gmail.com>
> Date: Sun, 15 Jun 2014 12:04:36 +0200
> Subject: [PATCH 4/4] huffyuvdec: use unsafe bitstream reader
> 
> The reader reads in chunks of 11 bits at most, and at most 3 times. The unsafe
> reader therefore may read 6 chunks instead of 1 in worst case, ie 8 bytes,
> which is within the padding tolerance.

I think decode_bgr_1() could read more and needs some additional
check


[..]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140615/2c472ea0/attachment.asc>


More information about the ffmpeg-devel mailing list