summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2010-01-04 09:19:32 +0000
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2010-01-04 09:19:32 +0000
commit5716aec3f9e47d17d55a44f991381f8719812645 (patch)
treeb76235d898834a7c4f8f61991f45fae82e7f3d06
parent2cf9c7ef9c421835e6b51eb4ef7c488f1feb4bf9 (diff)
Fix XvMC. XvMCCreateBlocks() may not allocate 16-byte aligned blocks,
so we can't use SSE-optimized routines. Originally committed as revision 21011 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/x86/dsputil_mmx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index b9d2ad7513..abfebfbff5 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -2596,7 +2596,9 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
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;
}