Commit fa142bd6 authored by glantau's avatar glantau

added mmx idct


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@53 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4e711c2a
...@@ -29,15 +29,9 @@ int pix_abs16x16_x2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h); ...@@ -29,15 +29,9 @@ int pix_abs16x16_x2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h);
int pix_abs16x16_y2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h); int pix_abs16x16_y2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h);
int pix_abs16x16_xy2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h); int pix_abs16x16_xy2_mmx(UINT8 *blk1, UINT8 *blk2, int lx, int h);
#ifdef USE_MMX_IDCT /* external functions, from idct_mmx.c */
/* external functions, defined in libmpeg2 */ void ff_mmx_idct(DCTELEM *block);
void mmx_idct(DCTELEM *block); void ff_mmxext_idct(DCTELEM *block);
void mmxext_idct(DCTELEM *block);
/* this should be in dsputil.h? -- A'rpi */
extern UINT8 ff_alternate_horizontal_scan[64];
extern UINT8 ff_alternate_vertical_scan[64];
extern UINT8 zigzag_direct[64];
#endif
/* pixel operations */ /* pixel operations */
static const unsigned long long int mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001; static const unsigned long long int mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001;
...@@ -1050,22 +1044,11 @@ void dsputil_init_mmx(void) ...@@ -1050,22 +1044,11 @@ void dsputil_init_mmx(void)
sub_pixels_tab[2] = sub_pixels_y2_3dnow; sub_pixels_tab[2] = sub_pixels_y2_3dnow;
} }
#ifdef USE_MMX_IDCT /* idct */
/* use MMX / MMXEXT iDCT code from libmpeg2 */ if (mm_flags & MM_MMXEXT) {
//printf("LIBAVCODEC: Using MMX%s iDCT code\n",(mm_flags & MM_MMXEXT)?"EXT":""); ff_idct = ff_mmxext_idct;
ff_idct = (mm_flags & MM_MMXEXT) ? mmxext_idct : mmx_idct; } else {
/* the mmx/mmxext idct uses a reordered input, so we patch scan tables */ ff_idct = ff_mmx_idct;
{ int i,j; }
for (i = 0; i < 64; i++) {
j = zigzag_direct[i];
zigzag_direct[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
j = ff_alternate_horizontal_scan[i];
ff_alternate_horizontal_scan[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
j = ff_alternate_vertical_scan[i];
ff_alternate_vertical_scan[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2);
}
}
#endif
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment