Revision f1efbca5 libavcodec/x86/ac3dsp.asm

View differences:

libavcodec/x86/ac3dsp.asm
133 133
AC3_MAX_MSB_ABS_INT16 sse2, min_max
134 134
%define ABS2 ABS2_SSSE3
135 135
AC3_MAX_MSB_ABS_INT16 ssse3, or_abs
136

  
137
;-----------------------------------------------------------------------------
138
; macro used for ff_ac3_lshift_int16() and ff_ac3_rshift_int32()
139
;-----------------------------------------------------------------------------
140

  
141
%macro AC3_SHIFT 4 ; l/r, 16/32, shift instruction, instruction set
142
cglobal ac3_%1shift_int%2_%4, 3,3,5, src, len, shift
143
    movd      m0, shiftd
144
.loop:
145
    mova      m1, [srcq         ]
146
    mova      m2, [srcq+mmsize  ]
147
    mova      m3, [srcq+mmsize*2]
148
    mova      m4, [srcq+mmsize*3]
149
    %3        m1, m0
150
    %3        m2, m0
151
    %3        m3, m0
152
    %3        m4, m0
153
    mova  [srcq         ], m1
154
    mova  [srcq+mmsize  ], m2
155
    mova  [srcq+mmsize*2], m3
156
    mova  [srcq+mmsize*3], m4
157
    add     srcq, mmsize*4
158
    sub     lend, mmsize*32/%2
159
    ja .loop
160
.end:
161
    REP_RET
162
%endmacro
163

  
164
;-----------------------------------------------------------------------------
165
; void ff_ac3_lshift_int16(int16_t *src, unsigned int len, unsigned int shift)
166
;-----------------------------------------------------------------------------
167

  
168
INIT_MMX
169
AC3_SHIFT l, 16, psllw, mmx
170
INIT_XMM
171
AC3_SHIFT l, 16, psllw, sse2
172

  
173
;-----------------------------------------------------------------------------
174
; void ff_ac3_rshift_int32(int32_t *src, unsigned int len, unsigned int shift)
175
;-----------------------------------------------------------------------------
176

  
177
INIT_MMX
178
AC3_SHIFT r, 32, psrad, mmx
179
INIT_XMM
180
AC3_SHIFT r, 32, psrad, sse2

Also available in: Unified diff