Commit 57060b1e authored by Fabrice Bellard's avatar Fabrice Bellard

removed unused stuff - added dsputil_set_bit_exact() support for easier testing

Originally committed as revision 551 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 4c41db9a
...@@ -599,6 +599,7 @@ PIXOP2(put, op_put) ...@@ -599,6 +599,7 @@ PIXOP2(put, op_put)
#undef op_avg #undef op_avg
#undef op_put #undef op_put
#if 0
/* FIXME this stuff could be removed as its ot really used anymore */ /* FIXME this stuff could be removed as its ot really used anymore */
#define PIXOP(BTYPE, OPNAME, OP, INCR) \ #define PIXOP(BTYPE, OPNAME, OP, INCR) \
\ \
...@@ -699,7 +700,6 @@ void (*OPNAME ## _pixels_tab[4])(BTYPE *block, const UINT8 *pixels, int line_siz ...@@ -699,7 +700,6 @@ void (*OPNAME ## _pixels_tab[4])(BTYPE *block, const UINT8 *pixels, int line_siz
OPNAME ## _pixels_xy2, \ OPNAME ## _pixels_xy2, \
}; };
/* rounding primitives */ /* rounding primitives */
#define avg2(a,b) ((a+b+1)>>1) #define avg2(a,b) ((a+b+1)>>1)
#define avg4(a,b,c,d) ((a+b+c+d+2)>>2) #define avg4(a,b,c,d) ((a+b+c+d+2)>>2)
...@@ -719,11 +719,11 @@ PIXOP(DCTELEM, sub, op_sub, 8) ...@@ -719,11 +719,11 @@ PIXOP(DCTELEM, sub, op_sub, 8)
#undef avg2 #undef avg2
#undef avg4 #undef avg4
#endif
#define avg2(a,b) ((a+b+1)>>1) #define avg2(a,b) ((a+b+1)>>1)
#define avg4(a,b,c,d) ((a+b+c+d+2)>>2) #define avg4(a,b,c,d) ((a+b+c+d+2)>>2)
/* end of removeale stuff */
static void gmc1_c(UINT8 *dst, UINT8 *src, int srcStride, int h, int x16, int y16, int rounder) static void gmc1_c(UINT8 *dst, UINT8 *src, int srcStride, int h, int x16, int y16, int rounder)
{ {
const int A=(16-x16)*(16-y16); const int A=(16-x16)*(16-y16);
...@@ -1332,6 +1332,14 @@ void dsputil_init(void) ...@@ -1332,6 +1332,14 @@ void dsputil_init(void)
build_zigzag_end(); build_zigzag_end();
} }
/* remove any non bit exact operation (testing purpose) */
void avcodec_set_bit_exact(void)
{
#ifdef HAVE_MMX
dsputil_set_bit_exact_mmx();
#endif
}
void get_psnr(UINT8 *orig_image[3], UINT8 *coded_image[3], void get_psnr(UINT8 *orig_image[3], UINT8 *coded_image[3],
int orig_linesize[3], int coded_linesize, int orig_linesize[3], int coded_linesize,
AVCodecContext *avctx) AVCodecContext *avctx)
......
...@@ -61,13 +61,6 @@ extern op_pixels_func avg_no_rnd_pixels_tab[4]; ...@@ -61,13 +61,6 @@ extern op_pixels_func avg_no_rnd_pixels_tab[4];
extern qpel_mc_func qpel_mc_rnd_tab[16]; extern qpel_mc_func qpel_mc_rnd_tab[16];
extern qpel_mc_func qpel_mc_no_rnd_tab[16]; extern qpel_mc_func qpel_mc_no_rnd_tab[16];
/* sub pixel (encoding) */
extern void (*sub_pixels_tab[4])(DCTELEM *block, const UINT8 *pixels, int line_size, int h);
#define sub_pixels_2(block, pixels, line_size, dxy) \
sub_pixels_tab[dxy](block, pixels, line_size, 8)
/* motion estimation */ /* motion estimation */
typedef int (*op_pixels_abs_func)(UINT8 *blk1, UINT8 *blk2, int line_size); typedef int (*op_pixels_abs_func)(UINT8 *blk1, UINT8 *blk2, int line_size);
...@@ -119,6 +112,7 @@ static inline void emms(void) ...@@ -119,6 +112,7 @@ static inline void emms(void)
#define __align8 __attribute__ ((aligned (8))) #define __align8 __attribute__ ((aligned (8)))
void dsputil_init_mmx(void); void dsputil_init_mmx(void);
void dsputil_set_bit_exact_mmx(void);
#elif defined(ARCH_ARMV4L) #elif defined(ARCH_ARMV4L)
......
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