[FFmpeg-devel] [PATCH] H.264: Faster DC handling (idct_dc and more)

Jason Garrett-Glaser darkshikari
Tue Jan 27 02:32:14 CET 2009

The first of these patches modifies ffmpeg to implement x264-style
scan8; this means storing nnz from luma/chroma DC in scan8.  This is
extremely useful because it means one can check with a single if
whether luma/chroma DC exists.  Normally, you can only do it in the
case of CABAC where the data is stored in the cbp.  This also
simplifies decode_residual a lot and will surely be useful for future

The second of these patches ports an 8x8 idct_dc function from x264
which I just wrote (so new, in fact, it isn't in x264 yet!).  This one
is LGPL.  The entire patch drops chroma idct/dequant time from ~268
clocks to ~205 clocks on a Core 2 Conroe.  Note that there *are*
warnings relating to pointers in this patch--suggestions welcome on
the best way to clean them up without making the source messy.

And yes, I tested adding the ifs I used in the DC-only section to the
other chroma decoding section--it makes it slower, probably because
you almost never have chroma AC without chroma DC.

Dark Shikari
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x264style_dc.diff
Type: text/x-diff
Size: 4491 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090126/ad4e37f6/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_idct_overhaul.diff
Type: text/x-diff
Size: 13885 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090126/ad4e37f6/attachment-0001.diff>

More information about the ffmpeg-devel mailing list