comparison i386/mpegvideo_mmx.c @ 1064:b32afefe7d33 libavcodec

* UINTX -> uintx_t INTX -> intx_t
author kabi
date Tue, 11 Feb 2003 16:35:48 +0000
parents 693a0797398f
children f59c3f66363b
comparison
equal deleted inserted replaced
1063:fdeac9642346 1064:b32afefe7d33
23 #include "../dsputil.h" 23 #include "../dsputil.h"
24 #include "../mpegvideo.h" 24 #include "../mpegvideo.h"
25 #include "../avcodec.h" 25 #include "../avcodec.h"
26 #include "../simple_idct.h" 26 #include "../simple_idct.h"
27 27
28 extern UINT8 zigzag_direct_noperm[64]; 28 extern uint8_t zigzag_direct_noperm[64];
29 extern UINT16 inv_zigzag_direct16[64]; 29 extern uint16_t inv_zigzag_direct16[64];
30 extern UINT32 inverse[256]; 30 extern uint32_t inverse[256];
31 31
32 static const unsigned long long int mm_wabs __attribute__ ((aligned(8))) = 0xffffffffffffffffULL; 32 static const unsigned long long int mm_wabs __attribute__ ((aligned(8))) = 0xffffffffffffffffULL;
33 static const unsigned long long int mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL; 33 static const unsigned long long int mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL;
34 34
35 35
142 */ 142 */
143 static void dct_unquantize_mpeg1_mmx(MpegEncContext *s, 143 static void dct_unquantize_mpeg1_mmx(MpegEncContext *s,
144 DCTELEM *block, int n, int qscale) 144 DCTELEM *block, int n, int qscale)
145 { 145 {
146 int nCoeffs; 146 int nCoeffs;
147 const UINT16 *quant_matrix; 147 const uint16_t *quant_matrix;
148 148
149 assert(s->block_last_index[n]>=0); 149 assert(s->block_last_index[n]>=0);
150 150
151 nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ]+1; 151 nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ]+1;
152 152
270 270
271 static void dct_unquantize_mpeg2_mmx(MpegEncContext *s, 271 static void dct_unquantize_mpeg2_mmx(MpegEncContext *s,
272 DCTELEM *block, int n, int qscale) 272 DCTELEM *block, int n, int qscale)
273 { 273 {
274 int nCoeffs; 274 int nCoeffs;
275 const UINT16 *quant_matrix; 275 const uint16_t *quant_matrix;
276 276
277 assert(s->block_last_index[n]>=0); 277 assert(s->block_last_index[n]>=0);
278 278
279 if(s->alternate_scan) nCoeffs= 63; //FIXME 279 if(s->alternate_scan) nCoeffs= 63; //FIXME
280 else nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ]; 280 else nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ];
402 } 402 }
403 } 403 }
404 404
405 /* draw the edges of width 'w' of an image of size width, height 405 /* draw the edges of width 'w' of an image of size width, height
406 this mmx version can only handle w==8 || w==16 */ 406 this mmx version can only handle w==8 || w==16 */
407 static void draw_edges_mmx(UINT8 *buf, int wrap, int width, int height, int w) 407 static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, int w)
408 { 408 {
409 UINT8 *ptr, *last_line; 409 uint8_t *ptr, *last_line;
410 int i; 410 int i;
411 411
412 last_line = buf + (height - 1) * wrap; 412 last_line = buf + (height - 1) * wrap;
413 /* left and right */ 413 /* left and right */
414 ptr = buf; 414 ptr = buf;
503 void ff_mmx_idct(DCTELEM *block); 503 void ff_mmx_idct(DCTELEM *block);
504 void ff_mmxext_idct(DCTELEM *block); 504 void ff_mmxext_idct(DCTELEM *block);
505 505
506 /* XXX: those functions should be suppressed ASAP when all IDCTs are 506 /* XXX: those functions should be suppressed ASAP when all IDCTs are
507 converted */ 507 converted */
508 static void ff_libmpeg2mmx_idct_put(UINT8 *dest, int line_size, DCTELEM *block) 508 static void ff_libmpeg2mmx_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
509 { 509 {
510 ff_mmx_idct (block); 510 ff_mmx_idct (block);
511 put_pixels_clamped_mmx(block, dest, line_size); 511 put_pixels_clamped_mmx(block, dest, line_size);
512 } 512 }
513 static void ff_libmpeg2mmx_idct_add(UINT8 *dest, int line_size, DCTELEM *block) 513 static void ff_libmpeg2mmx_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
514 { 514 {
515 ff_mmx_idct (block); 515 ff_mmx_idct (block);
516 add_pixels_clamped_mmx(block, dest, line_size); 516 add_pixels_clamped_mmx(block, dest, line_size);
517 } 517 }
518 static void ff_libmpeg2mmx2_idct_put(UINT8 *dest, int line_size, DCTELEM *block) 518 static void ff_libmpeg2mmx2_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
519 { 519 {
520 ff_mmxext_idct (block); 520 ff_mmxext_idct (block);
521 put_pixels_clamped_mmx(block, dest, line_size); 521 put_pixels_clamped_mmx(block, dest, line_size);
522 } 522 }
523 static void ff_libmpeg2mmx2_idct_add(UINT8 *dest, int line_size, DCTELEM *block) 523 static void ff_libmpeg2mmx2_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
524 { 524 {
525 ff_mmxext_idct (block); 525 ff_mmxext_idct (block);
526 add_pixels_clamped_mmx(block, dest, line_size); 526 add_pixels_clamped_mmx(block, dest, line_size);
527 } 527 }
528 528