Revision 098b4169 libavcodec/i386/idct_mmx.c
libavcodec/i386/idct_mmx.c  

85  85 
c5, c1, c3, c1, \ 
86  86 
c7, c3, c7, c5 } 
87  87  
88 
static inline void mmxext_row_head (int16_t * row, int offset, const int16_t * table) 

88 
static inline void mmxext_row_head (int16_t * const row, const int offset, 

89 
const int16_t * const table) 

89  90 
{ 
90  91 
movq_m2r (*(row+offset), mm2); /* mm2 = x6 x4 x2 x0 */ 
91  92  
...  ...  
101  102 
pshufw_r2r (mm2, mm2, 0x4e); /* mm2 = x2 x0 x6 x4 */ 
102  103 
} 
103  104  
104 
static inline void mmxext_row (const int16_t * table, const int32_t * rounder) 

105 
static inline void mmxext_row (const int16_t * const table, 

106 
const int32_t * const rounder) 

105  107 
{ 
106  108 
movq_m2r (*(table+8), mm1); /* mm1 = C5 C1 C3 C1 */ 
107  109 
pmaddwd_r2r (mm2, mm4); /* mm4 = C4*x0+C6*x2 C4*x4+C6*x6 */ 
...  ...  
140  142 
psubd_r2r (mm5, mm4); /* mm4 = a3b3 a2b2 + rounder */ 
141  143 
} 
142  144  
143 
static inline void mmxext_row_tail (int16_t * row, int store)


145 
static inline void mmxext_row_tail (int16_t * const row, const int store)


144  146 
{ 
145  147 
psrad_i2r (ROW_SHIFT, mm0); /* mm0 = y3 y2 */ 
146  148  
...  ...  
158  160 
movq_r2m (mm4, *(row+store+4)); /* save y7 y6 y5 y4 */ 
159  161 
} 
160  162  
161 
static inline void mmxext_row_mid (int16_t * row, int store, 

162 
int offset, const int16_t * table) 

163 
static inline void mmxext_row_mid (int16_t * const row, const int store, 

164 
const int offset, 

165 
const int16_t * const table) 

163  166 
{ 
164  167 
movq_m2r (*(row+offset), mm2); /* mm2 = x6 x4 x2 x0 */ 
165  168 
psrad_i2r (ROW_SHIFT, mm0); /* mm0 = y3 y2 */ 
...  ...  
197  200 
c5, c1, c7, c5, \ 
198  201 
c7, c3, c3, c1 } 
199  202  
200 
static inline void mmx_row_head (int16_t * row, int offset, const int16_t * table) 

203 
static inline void mmx_row_head (int16_t * const row, const int offset, 

204 
const int16_t * const table) 

201  205 
{ 
202  206 
movq_m2r (*(row+offset), mm2); /* mm2 = x6 x4 x2 x0 */ 
203  207  
...  ...  
216  220 
punpckhdq_r2r (mm2, mm2); /* mm2 = x6 x4 x6 x4 */ 
217  221 
} 
218  222  
219 
static inline void mmx_row (const int16_t * table, const int32_t * rounder) 

223 
static inline void mmx_row (const int16_t * const table, 

224 
const int32_t * const rounder) 

220  225 
{ 
221  226 
pmaddwd_r2r (mm2, mm4); /* mm4 = C4*x4C2*x6 C4*x4+C6*x6 */ 
222  227 
punpckldq_r2r (mm5, mm5); /* mm5 = x3 x1 x3 x1 */ 
...  ...  
255  260 
psubd_r2r (mm5, mm7); /* mm7 = a3b3 a2b2 + rounder */ 
256  261 
} 
257  262  
258 
static inline void mmx_row_tail (int16_t * row, int store)


263 
static inline void mmx_row_tail (int16_t * const row, const int store)


259  264 
{ 
260  265 
psrad_i2r (ROW_SHIFT, mm0); /* mm0 = y3 y2 */ 
261  266  
...  ...  
279  284 
movq_r2m (mm7, *(row+store+4)); /* save y7 y6 y5 y4 */ 
280  285 
} 
281  286  
282 
static inline void mmx_row_mid (int16_t * row, int store,


283 
int offset, const int16_t * table)


287 
static inline void mmx_row_mid (int16_t * const row, const int store,


288 
const int offset, const int16_t * const table)


284  289 
{ 
285  290 
movq_m2r (*(row+offset), mm2); /* mm2 = x6 x4 x2 x0 */ 
286  291 
psrad_i2r (ROW_SHIFT, mm0); /* mm0 = y3 y2 */ 
...  ...  
387  392  
388  393  
389  394 
/* MMX column IDCT */ 
390 
static inline void idct_col (int16_t * col, int offset)


395 
static inline void idct_col (int16_t * const col, const int offset)


391  396 
{ 
392  397 
#define T1 13036 
393  398 
#define T2 27146 
...  ...  
556  561 
#undef ROW_SHIFT 
557  562  
558  563 
#define declare_idct(idct,table,idct_row_head,idct_row,idct_row_tail,idct_row_mid) \ 
559 
void idct (int16_t * block) \


564 
void idct (int16_t * const block) \


560  565 
{ \ 
561  566 
static const int16_t table04[] ATTR_ALIGN(16) = \ 
562  567 
table (22725, 21407, 19266, 16384, 12873, 8867, 4520); \ 
Also available in: Unified diff