comparison x86/dsputil_mmx.c @ 12414:3fc4c625b6f3 libavcodec

Remove global mm_flags variable
author mru
date Tue, 24 Aug 2010 17:47:05 +0000
parents 09a31ef6ed58
children 9f06475db098
comparison
equal deleted inserted replaced
12413:e6e4059ea421 12414:3fc4c625b6f3
34 #include "vp6dsp_sse2.h" 34 #include "vp6dsp_sse2.h"
35 #include "idct_xvid.h" 35 #include "idct_xvid.h"
36 36
37 //#undef NDEBUG 37 //#undef NDEBUG
38 //#include <assert.h> 38 //#include <assert.h>
39
40 int mm_flags; /* multimedia extension flags */
41 39
42 /* pixel operations */ 40 /* pixel operations */
43 DECLARE_ALIGNED(8, const uint64_t, ff_bone) = 0x0101010101010101ULL; 41 DECLARE_ALIGNED(8, const uint64_t, ff_bone) = 0x0101010101010101ULL;
44 DECLARE_ALIGNED(8, const uint64_t, ff_wtwo) = 0x0002000200020002ULL; 42 DECLARE_ALIGNED(8, const uint64_t, ff_wtwo) = 0x0002000200020002ULL;
45 43
2502 2500
2503 float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order); 2501 float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order);
2504 2502
2505 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) 2503 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
2506 { 2504 {
2507 mm_flags = mm_support(); 2505 int mm_flags = mm_support();
2508 2506
2509 if (avctx->dsp_mask) { 2507 if (avctx->dsp_mask) {
2510 if (avctx->dsp_mask & FF_MM_FORCE) 2508 if (avctx->dsp_mask & FF_MM_FORCE)
2511 mm_flags |= (avctx->dsp_mask & 0xffff); 2509 mm_flags |= (avctx->dsp_mask & 0xffff);
2512 else 2510 else
2939 } 2937 }
2940 2938
2941 #if CONFIG_H264DSP 2939 #if CONFIG_H264DSP
2942 void ff_h264dsp_init_x86(H264DSPContext *c) 2940 void ff_h264dsp_init_x86(H264DSPContext *c)
2943 { 2941 {
2944 mm_flags = mm_support(); 2942 int mm_flags = mm_support();
2945 2943
2946 if (mm_flags & FF_MM_MMX) { 2944 if (mm_flags & FF_MM_MMX) {
2947 c->h264_idct_dc_add= 2945 c->h264_idct_dc_add=
2948 c->h264_idct_add= ff_h264_idct_add_mmx; 2946 c->h264_idct_add= ff_h264_idct_add_mmx;
2949 c->h264_idct8_dc_add= 2947 c->h264_idct8_dc_add=