[FFmpeg-devel] [PATCH v4] lavc/rawdec: Use AV_PIX_FMT_PAL8 for 1-bit raw QuickTime video

Michael Niedermayer michael at niedermayer.cc
Mon Jan 18 12:35:17 CET 2016


On Mon, Jan 18, 2016 at 12:18:09PM +0100, Mats Peterson wrote:
> On 01/18/2016 12:02 PM, Michael Niedermayer wrote:
> 
> >thats unrelated and should be in a seperate patch if it is faster
> >if its not faster it should not be done
> >
> >you can test the speed with START/STOP_TIMER
> >
> Pure logic tells me it's faster to just increment than involve a
> series of multiplications.

its not so simple

theres a optimizing compiler between you and the CPU
the multiplication is a shift really, and the compiler may very well
change this to dst++, buf++ and buf < buf_end
or it might use something like p[8*i] and q[i]
i++ and a i<=0 check, the 8* can on some architectures be free as
part of addressing memory

if you are interrested in optimizing code see
http://www.agner.org/optimize/

and intels Intel 64 and IA-32 Architectures Software Developers Manual
is invaluable as a reference but not useable for other purposes than
as a reference (its too huge)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160118/989ac0d2/attachment.sig>


More information about the ffmpeg-devel mailing list