Mercurial > libavcodec.hg
comparison dsputil.c @ 403:2c3e25f4c496 libavcodec
removed unused stuff - added dsputil_set_bit_exact() support for easier testing
author | glantau |
---|---|
date | Mon, 20 May 2002 16:37:58 +0000 |
parents | d7008d1c5bd0 |
children | 718a22dc121f |
comparison
equal
deleted
inserted
replaced
402:92d143c2d5a8 | 403:2c3e25f4c496 |
---|---|
597 PIXOP2(avg, op_avg) | 597 PIXOP2(avg, op_avg) |
598 PIXOP2(put, op_put) | 598 PIXOP2(put, op_put) |
599 #undef op_avg | 599 #undef op_avg |
600 #undef op_put | 600 #undef op_put |
601 | 601 |
602 #if 0 | |
602 /* FIXME this stuff could be removed as its ot really used anymore */ | 603 /* FIXME this stuff could be removed as its ot really used anymore */ |
603 #define PIXOP(BTYPE, OPNAME, OP, INCR) \ | 604 #define PIXOP(BTYPE, OPNAME, OP, INCR) \ |
604 \ | 605 \ |
605 static void OPNAME ## _pixels(BTYPE *block, const UINT8 *pixels, int line_size, int h) \ | 606 static void OPNAME ## _pixels(BTYPE *block, const UINT8 *pixels, int line_size, int h) \ |
606 { \ | 607 { \ |
697 OPNAME ## _pixels_x2, \ | 698 OPNAME ## _pixels_x2, \ |
698 OPNAME ## _pixels_y2, \ | 699 OPNAME ## _pixels_y2, \ |
699 OPNAME ## _pixels_xy2, \ | 700 OPNAME ## _pixels_xy2, \ |
700 }; | 701 }; |
701 | 702 |
702 | |
703 /* rounding primitives */ | 703 /* rounding primitives */ |
704 #define avg2(a,b) ((a+b+1)>>1) | 704 #define avg2(a,b) ((a+b+1)>>1) |
705 #define avg4(a,b,c,d) ((a+b+c+d+2)>>2) | 705 #define avg4(a,b,c,d) ((a+b+c+d+2)>>2) |
706 | 706 |
707 #define op_avg(a, b) a = avg2(a, b) | 707 #define op_avg(a, b) a = avg2(a, b) |
717 | 717 |
718 /* motion estimation */ | 718 /* motion estimation */ |
719 | 719 |
720 #undef avg2 | 720 #undef avg2 |
721 #undef avg4 | 721 #undef avg4 |
722 #endif | |
723 | |
722 #define avg2(a,b) ((a+b+1)>>1) | 724 #define avg2(a,b) ((a+b+1)>>1) |
723 #define avg4(a,b,c,d) ((a+b+c+d+2)>>2) | 725 #define avg4(a,b,c,d) ((a+b+c+d+2)>>2) |
724 | |
725 /* end of removeale stuff */ | |
726 | 726 |
727 static void gmc1_c(UINT8 *dst, UINT8 *src, int srcStride, int h, int x16, int y16, int rounder) | 727 static void gmc1_c(UINT8 *dst, UINT8 *src, int srcStride, int h, int x16, int y16, int rounder) |
728 { | 728 { |
729 const int A=(16-x16)*(16-y16); | 729 const int A=(16-x16)*(16-y16); |
730 const int B=( x16)*(16-y16); | 730 const int B=( x16)*(16-y16); |
1330 } | 1330 } |
1331 | 1331 |
1332 build_zigzag_end(); | 1332 build_zigzag_end(); |
1333 } | 1333 } |
1334 | 1334 |
1335 /* remove any non bit exact operation (testing purpose) */ | |
1336 void avcodec_set_bit_exact(void) | |
1337 { | |
1338 #ifdef HAVE_MMX | |
1339 dsputil_set_bit_exact_mmx(); | |
1340 #endif | |
1341 } | |
1342 | |
1335 void get_psnr(UINT8 *orig_image[3], UINT8 *coded_image[3], | 1343 void get_psnr(UINT8 *orig_image[3], UINT8 *coded_image[3], |
1336 int orig_linesize[3], int coded_linesize, | 1344 int orig_linesize[3], int coded_linesize, |
1337 AVCodecContext *avctx) | 1345 AVCodecContext *avctx) |
1338 { | 1346 { |
1339 int quad, diff, x, y; | 1347 int quad, diff, x, y; |