[FFmpeg-devel] [HACK] 50% faster H.264 decoding
Ronald S. Bultje
Tue Aug 17 17:01:03 CEST 2010
On Mon, Aug 16, 2010 at 6:40 PM, Jason Garrett-Glaser
<darkshikari at gmail.com> wrote:
> On Mon, Aug 16, 2010 at 3:35 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>> On Wed, Aug 11, 2010 at 5:32 PM, Jason Garrett-Glaser
>> <darkshikari at gmail.com> wrote:
>>> 13. Use MPEG-2 MC for chroma MC, since we know that MVs are
>>> fullpel-only. ?Simplify edge emulation stuff accordingly too.
>> Does h264 chroma subpel actually use a memcpy shortcut if it's
>> fullpel? I don't remember exactly, but I don't think it has such a
>> shortcut for chroma, only for luma.
> It doesn't. ?It should at least have a shortcut for the 0,0 motion
> vector because its very high probability (relative to other fullpel
> motion vectors that result in no chroma interpolation). ?For other
> cases, it might or might not be worthwhile to add a branch in the asm
> to the 1D-only case.
Attached sets up framework for that. The  functions can be copied
straight from VP8 (they are pixel_copy functions, with very fast
aligned implementations for all relevant archs) and others, and should
make VC-1, RV3/4, h264, H264/MPEG etc. significantly faster for the
MVxy==0 case. The / functions are probably going to be faster as
well but that would need some testing to see how big the effect is.
 is the function as-is now, which should obviously stay the way it
Michael, OK to apply this? It's mostly just changing all kind of files
to fill arrays instead of a single function pointer, and to pick the
correct one from the array instead of the single function pointer.
It doesn't actually change any speed-relevant code so should have no
effect. Also, changes to sh4/ppc/arm dirs are untested.
After this we can optimize the MV=0 and later MVx=0/MVy=0 cases, which
should then perform significantly better, as per above.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 38797 bytes
Desc: not available
More information about the ffmpeg-devel