diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-08-20 15:32:00 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-08-29 13:07:37 +0200 |
commit | e998b56362c711701b3daa34e7b956e7126336f4 (patch) | |
tree | 3720d4a5b6e915b8aa21ca733e9cfbd6c32e5601 /libavcodec/x86/fmtconvert_init.c | |
parent | 6369ba3c9cc74becfaad2a8882dff3dd3e7ae3c0 (diff) | |
download | ffmpeg-e998b56362c711701b3daa34e7b956e7126336f4.tar.gz |
x86: avcodec: Consistently structure CPU extension initialization
Diffstat (limited to 'libavcodec/x86/fmtconvert_init.c')
-rw-r--r-- | libavcodec/x86/fmtconvert_init.c | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/libavcodec/x86/fmtconvert_init.c b/libavcodec/x86/fmtconvert_init.c index bad0c8767d..3d75df92bd 100644 --- a/libavcodec/x86/fmtconvert_init.c +++ b/libavcodec/x86/fmtconvert_init.c @@ -120,29 +120,28 @@ av_cold void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx if (EXTERNAL_MMX(cpu_flags)) { c->float_interleave = float_interleave_mmx; - - if (EXTERNAL_AMD3DNOW(cpu_flags)) { - if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ - c->float_to_int16 = ff_float_to_int16_3dnow; - c->float_to_int16_interleave = float_to_int16_interleave_3dnow; - } - } - if (EXTERNAL_AMD3DNOWEXT(cpu_flags)) { - if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ - c->float_to_int16_interleave = float_to_int16_interleave_3dnowext; - } - } - if (EXTERNAL_SSE(cpu_flags)) { - c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse; - c->float_to_int16 = ff_float_to_int16_sse; - c->float_to_int16_interleave = float_to_int16_interleave_sse; - c->float_interleave = float_interleave_sse; + } + if (EXTERNAL_AMD3DNOW(cpu_flags)) { + if (!(avctx->flags & CODEC_FLAG_BITEXACT)) { + c->float_to_int16 = ff_float_to_int16_3dnow; + c->float_to_int16_interleave = float_to_int16_interleave_3dnow; } - if (EXTERNAL_SSE2(cpu_flags)) { - c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse2; - c->float_to_int16 = ff_float_to_int16_sse2; - c->float_to_int16_interleave = float_to_int16_interleave_sse2; + } + if (EXTERNAL_AMD3DNOWEXT(cpu_flags)) { + if (!(avctx->flags & CODEC_FLAG_BITEXACT)) { + c->float_to_int16_interleave = float_to_int16_interleave_3dnowext; } } + if (EXTERNAL_SSE(cpu_flags)) { + c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse; + c->float_to_int16 = ff_float_to_int16_sse; + c->float_to_int16_interleave = float_to_int16_interleave_sse; + c->float_interleave = float_interleave_sse; + } + if (EXTERNAL_SSE2(cpu_flags)) { + c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse2; + c->float_to_int16 = ff_float_to_int16_sse2; + c->float_to_int16_interleave = float_to_int16_interleave_sse2; + } #endif /* HAVE_YASM */ } |