~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/x86/ac3dsp_mmx.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
extern int ff_ac3_compute_mantissa_size_sse2(uint16_t mant_cnt[6][16]);
46
46
 
 
47
extern void ff_ac3_extract_exponents_3dnow(uint8_t *exp, int32_t *coef, int nb_coefs);
 
48
extern void ff_ac3_extract_exponents_sse2 (uint8_t *exp, int32_t *coef, int nb_coefs);
 
49
extern void ff_ac3_extract_exponents_ssse3(uint8_t *exp, int32_t *coef, int nb_coefs);
 
50
 
47
51
av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
48
52
{
 
53
#if HAVE_YASM
49
54
    int mm_flags = av_get_cpu_flags();
50
55
 
51
 
#if HAVE_YASM
52
56
    if (mm_flags & AV_CPU_FLAG_MMX) {
53
57
        c->ac3_exponent_min = ff_ac3_exponent_min_mmx;
54
58
        c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx;
56
60
        c->ac3_rshift_int32 = ff_ac3_rshift_int32_mmx;
57
61
    }
58
62
    if (mm_flags & AV_CPU_FLAG_3DNOW && HAVE_AMD3DNOW) {
 
63
        c->extract_exponents = ff_ac3_extract_exponents_3dnow;
59
64
        if (!bit_exact) {
60
65
            c->float_to_fixed24 = ff_float_to_fixed24_3dnow;
61
66
        }
72
77
        c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_sse2;
73
78
        c->float_to_fixed24 = ff_float_to_fixed24_sse2;
74
79
        c->compute_mantissa_size = ff_ac3_compute_mantissa_size_sse2;
 
80
        c->extract_exponents = ff_ac3_extract_exponents_sse2;
75
81
        if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) {
76
82
            c->ac3_lshift_int16 = ff_ac3_lshift_int16_sse2;
77
83
            c->ac3_rshift_int32 = ff_ac3_rshift_int32_sse2;
79
85
    }
80
86
    if (mm_flags & AV_CPU_FLAG_SSSE3 && HAVE_SSSE3) {
81
87
        c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_ssse3;
 
88
        if (!(mm_flags & AV_CPU_FLAG_ATOM)) {
 
89
            c->extract_exponents = ff_ac3_extract_exponents_ssse3;
 
90
        }
82
91
    }
83
92
#endif
84
93
}