[FFmpeg-devel] [PATCH] MMX VP3 Loop Filter

Guillaume Poirier gpoirier
Tue Oct 7 10:40:09 CEST 2008


Hello,

David Conrad wrote:
> Here's an 8-bit version. However, checking for the C fallback negates
> the small speedup on my Penryn compared to the 16-bit version.
>

Then is it possible to adapt ....

> ------------------------------------------------------------------------
>
> diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c
> index 6e1a93d..2f035d2 100644
> --- a/libavcodec/i386/dsputil_mmx.c
> +++ b/libavcodec/i386/dsputil_mmx.c
> @@ -2591,6 +2591,10 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
>              c->h263_v_loop_filter= h263_v_loop_filter_mmx;
>              c->h263_h_loop_filter= h263_h_loop_filter_mmx;
>          }
> +        if (ENABLE_VP3_DECODER || ENABLE_THEORA_DECODER) {
> +            c->vp3_v_loop_filter= ff_vp3_v_loop_filter_mmx;
> +            c->vp3_h_loop_filter= ff_vp3_h_loop_filter_mmx;
> +        }
>          c->put_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx_rnd;
>          c->put_h264_chroma_pixels_tab[1]= put_h264_chroma_mc4_mmx;
>          c->put_no_rnd_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx_nornd;

this code so that you detect "globally" that filter_limit is greater
than 63, so that you should alwaus use the C version, and never the MMX
version?


This may seem stupid, but I prefered to ask as it seemed like a damn too
simple solution.

Guillaume




More information about the ffmpeg-devel mailing list