[FFmpeg-devel] [PATCH 1/2] huffyuvdec: implement trick

Christophe Gisquet christophe.gisquet at gmail.com
Wed Jun 4 08:14:42 CEST 2014


Hi,

2014-06-03 23:19 GMT+02:00 Michael Niedermayer <michaelni at gmx.at>:
>> On a 1000-frames YUV4:2:0 video, before:
>> 362851 decicycles in 422, 262094 runs, 50 skips
>> 346800 decicycles in 422, 262079 runs, 65 skips
>> Object size: 23584
>> Overall time: 8.377
>>
>> After:
>> 182488 decicycles in gray, 262087 runs, 57 skips
>> 168197 decicycles in gray, 262077 runs, 67 skips
>> Object size: 23188
>> Overall time: 7.878

AND... I forgot to refresh patch on the third and last rebase...

> you write YUV420 but the "Before" scores say "in 422" and the after
> "in gray"
> iam confused

422 comes from the confusingly named function, decode_422_bitstream.
Actually, it decodes chroma. huffyuv stores YV12/I420 as NV12 (a plane
for luma and a plane for interleaved chroma).

Hence, decode_gray_bitstream refers to the luma. I suspect you could
entirely replace it with the decode_plane_bitstream (I don't have
samples using it), but that's another story.

Yet another story is that keeping the native NV12 format might be more
efficient.

> can you confirm these are the correct scores ?

So the numbers are correct, but they were swapped in yet another
incorrect way. The attached patch should be ok.

-- 
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-huffyuvdec-implement-trick.patch
Type: text/x-patch
Size: 5972 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140604/d253a9df/attachment.bin>


More information about the ffmpeg-devel mailing list