[FFmpeg-devel] [RFC] optimize ff_emulated_edge_mc

Ronald S. Bultje rsbultje
Thu Dec 30 02:06:32 CET 2010


Hi,

emu_edge_mc looks optimizable and shows up in my profilings. A simple
loop->memcpy makes things a lot faster already (see attached):

after
27.537
27.358
27.340
27.511
27.322
27.581
27.311
27.397
avg: 27.420
6165 dezicycles in ff_emulated_edge_mc, 1048040 runs, 536 skips
6115 dezicycles in ff_emulated_edge_mc, 1048044 runs, 532 skips
6087 dezicycles in ff_emulated_edge_mc, 1048158 runs, 418 skips

before
27.444
27.483
27.405
27.528
27.536
27.449
27.395
27.502
avg: 27.468
9104 dezicycles in ff_emulated_edge_mc, 1047805 runs, 771 skips
9131 dezicycles in ff_emulated_edge_mc, 1047866 runs, 710 skips
9097 dezicycles in ff_emulated_edge_mc, 1047874 runs, 702 skips

33% faster, ~0.2% overall for this change. Does anyone have thoughts
on adding this to DSPContext and doing fancy shit with it? Anyone
tried it in the past?

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: emu_edge_mc.patch
Type: application/octet-stream
Size: 496 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101229/35bed26c/attachment.obj>



More information about the ffmpeg-devel mailing list