[Ffmpeg-devel] Speed improvement for jpeg decoding

Aurelien Jacobs aurel
Tue Nov 21 13:19:49 CET 2006


On Tue, 21 Nov 2006 12:48:13 +0100
Cyril Russo <cyril.russo at nexvision.fr> wrote:

> Hi,
> 
>  Like diego said, here is a patch to speed up jpeg decoding by avoiding 
> a conditional test for each macroblock in a JPEG stream.
> Like Michael said, I've tried to keep it as short as possible.

Your patch is malformed, please resend it as attachment.

> --- ../../mjpeg.c       2006-11-21 12:22:21.000000000 +0100
> +++ mjpeg.c     2006-11-21 12:47:29.000000000 +0100
> @@ -1565,9 +1565,19 @@ static int ljpeg_decode_yuv_scan(MJpegDe
>      return 0;
>  }
> 
> +/* decode block and dequantize - not progressive JPEG version wrapper */
> +inline static int decode_block_notprogressive(MJpegDecodeContext *s, 

IIRC, we use 'static inline' instead of 'inline static' everywhere.
Anyway, this function is only used to feed a function pointer, so it won't
be inlined... The inline keyword is thus useless.

Aurel




More information about the ffmpeg-devel mailing list