On Mon, Sep 05, 2016 at 01:02:37PM +0200, Anton Khirnov wrote: > --- a/libavcodec/x86/blockdsp.c > +++ /dev/null > @@ -1,118 +0,0 @@ > -av_cold void ff_blockdsp_init_x86(BlockDSPContext *c) > -{ > - if (INLINE_MMX(cpu_flags)) { > - c->clear_block = clear_block_mmx; > - c->clear_blocks = clear_blocks_mmx; > - } > - > -#if FF_API_XVMC > -FF_DISABLE_DEPRECATION_WARNINGS > - /* XvMCCreateBlocks() may not allocate 16-byte aligned blocks */ > - if (CONFIG_MPEG_XVMC_DECODER && avctx->xvmc_acceleration > 1) > - return; > -FF_ENABLE_DEPRECATION_WARNINGS > -#endif /* FF_API_XVMC */
Here the xvmc check is done after the mmx assignments .. > - if (INLINE_SSE(cpu_flags)) { > - c->clear_block = clear_block_sse; > - c->clear_blocks = clear_blocks_sse; > - } > -} Here the functions are sse .. > --- /dev/null > +++ b/libavcodec/x86/blockdsp_init.c > @@ -0,0 +1,64 @@ > +#include "libavutil/cpu.h" > +#include "libavutil/x86/asm.h" asm.h is only necessary for inline assembly code, thus not here. > +av_cold void ff_blockdsp_init_x86(BlockDSPContext *c) > +{ > +#if FF_API_XVMC > +FF_DISABLE_DEPRECATION_WARNINGS > + /* XvMCCreateBlocks() may not allocate 16-byte aligned blocks */ > + if (CONFIG_MPEG_XVMC_DECODER && avctx->xvmc_acceleration > 1) > + return; > +FF_ENABLE_DEPRECATION_WARNINGS > +#endif /* FF_API_XVMC */ > + > + if (EXTERNAL_MMX(cpu_flags)) { > + c->clear_block = ff_clear_block_128_mmx; > + c->clear_blocks = ff_clear_block_768_mmx; > + } .. and here the mmx assignments come after the xvmc check. > + if (EXTERNAL_SSE2(cpu_flags)) { > + c->clear_block = ff_clear_block_128_sse2; > + c->clear_blocks = ff_clear_block_768_sse2; > + } .. and here the functions are sse2. > +#endif Please comment the #endif. Diego _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel