[Ffmpeg-devel] [PATCH] watermark.c improvement when using images as input

Michael Niedermayer michaelni
Fri Oct 20 15:58:41 CEST 2006


Hi

On Fri, Oct 20, 2006 at 01:28:37PM +0300, Mihail Stoyanov wrote:
> This patch optimizes watermark.c when using images as input. It will check if the current pixel RGB (of the input image) is equal to the threshold before doing any other calculations, thus skipping useless itterations.
> 
> Original watermark.c
> -> Convert time: 00:31
> 
> Patched watermark.c
> -> Convert time: 00:26
> 
> 
> It's not a HUGE improvement but still it gives like 15%+ boost when working with huge sources (width 720+) and very small watermark images
> 
> Here's the patch

quoting development policy:
6. We refuse source indentation and other cosmetic changes if they are mixed with functional changes, such commits will be rejected and removed. Every developer has his own indentation style, you should not change it. Of course if you (re)write something, you can use your own style, even though we would prefer if the indentation throughout FFmpeg was consistent (Many projects force a given indentation style - we don't.). If you really need to make indentation changes (try to avoid this), separate them strictly from real changes. NOTE: If you had to put if(){ .. } over a large (> 5 lines) chunk of code, then either do NOT change the indentation of the inner part within (don't move it to the right)! or do so in a separate commit

for the whole policy see http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html

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

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list