[FFmpeg-cvslog] r21011 - trunk/libavcodec/x86/dsputil_mmx.c

Reimar Döffinger Reimar.Doeffinger
Mon Jan 4 13:09:50 CET 2010


On Mon, Jan 04, 2010 at 10:19:32AM +0100, gb wrote:
> Author: gb
> Date: Mon Jan  4 10:19:32 2010
> New Revision: 21011
> 
> Log:
> Fix XvMC. XvMCCreateBlocks() may not allocate 16-byte aligned blocks,
> so we can't use SSE-optimized routines.
> 
> Modified:
>    trunk/libavcodec/x86/dsputil_mmx.c
> 
> Modified: trunk/libavcodec/x86/dsputil_mmx.c
> ==============================================================================
> --- trunk/libavcodec/x86/dsputil_mmx.c	Mon Jan  4 03:52:40 2010	(r21010)
> +++ trunk/libavcodec/x86/dsputil_mmx.c	Mon Jan  4 10:19:32 2010	(r21011)
> @@ -2596,7 +2596,9 @@ void dsputil_init_mmx(DSPContext* c, AVC
>          c->add_pixels_clamped = add_pixels_clamped_mmx;
>          c->clear_block  = clear_block_mmx;
>          c->clear_blocks = clear_blocks_mmx;
> -        if (mm_flags & FF_MM_SSE){
> +        if ((mm_flags & FF_MM_SSE) &&
> +            !(CONFIG_MPEG_XVMC_DECODER && avctx->xvmc_acceleration > 1)){
> +            /* XvMCCreateBlocks() may not allocate 16-byte aligned blocks */
>              c->clear_block  = clear_block_sse;
>              c->clear_blocks = clear_blocks_sse;

While it is probably not relevant I'd like to point out that e.g. NVidia
drivers can use XvMC just fine without this, so I can't help considering
this a bit of a hack for XvMC implementations that are not properly
maintained.



More information about the ffmpeg-cvslog mailing list