Mercurial > libavcodec.hg
comparison h264.c @ 6172:13aa4cac4dde libavcodec
Add #undef printf and disable non-functional code to make test program compile.
author | diego |
---|---|
date | Wed, 23 Jan 2008 21:27:07 +0000 |
parents | ecaf5226e9b0 |
children | 11d2976cddc4 |
comparison
equal
deleted
inserted
replaced
6171:1c0477262c72 | 6172:13aa4cac4dde |
---|---|
7819 h->mb_avail[5]= 0; //FIXME move out | 7819 h->mb_avail[5]= 0; //FIXME move out |
7820 } | 7820 } |
7821 #endif | 7821 #endif |
7822 | 7822 |
7823 #ifdef TEST | 7823 #ifdef TEST |
7824 #undef printf | |
7824 #undef random | 7825 #undef random |
7825 #define COUNT 8000 | 7826 #define COUNT 8000 |
7826 #define SIZE (COUNT*40) | 7827 #define SIZE (COUNT*40) |
7827 int main(void){ | 7828 int main(void){ |
7828 int i; | 7829 int i; |
7882 // return -1; | 7883 // return -1; |
7883 } | 7884 } |
7884 STOP_TIMER("get_se_golomb"); | 7885 STOP_TIMER("get_se_golomb"); |
7885 } | 7886 } |
7886 | 7887 |
7888 #if 0 | |
7887 printf("testing 4x4 (I)DCT\n"); | 7889 printf("testing 4x4 (I)DCT\n"); |
7888 | 7890 |
7889 DCTELEM block[16]; | 7891 DCTELEM block[16]; |
7890 uint8_t src[16], ref[16]; | 7892 uint8_t src[16], ref[16]; |
7891 uint64_t error= 0, max_error=0; | 7893 uint64_t error= 0, max_error=0; |
7921 error+= diff*diff; | 7923 error+= diff*diff; |
7922 max_error= FFMAX(max_error, diff); | 7924 max_error= FFMAX(max_error, diff); |
7923 } | 7925 } |
7924 } | 7926 } |
7925 printf("error=%f max_error=%d\n", ((float)error)/COUNT/16, (int)max_error ); | 7927 printf("error=%f max_error=%d\n", ((float)error)/COUNT/16, (int)max_error ); |
7926 #if 0 | |
7927 printf("testing quantizer\n"); | 7928 printf("testing quantizer\n"); |
7928 for(qp=0; qp<52; qp++){ | 7929 for(qp=0; qp<52; qp++){ |
7929 for(i=0; i<16; i++) | 7930 for(i=0; i<16; i++) |
7930 src1_block[i]= src2_block[i]= random()%255; | 7931 src1_block[i]= src2_block[i]= random()%255; |
7931 | 7932 |
7932 } | 7933 } |
7933 #endif | |
7934 printf("Testing NAL layer\n"); | 7934 printf("Testing NAL layer\n"); |
7935 | 7935 |
7936 uint8_t bitstream[COUNT]; | 7936 uint8_t bitstream[COUNT]; |
7937 uint8_t nal[COUNT*2]; | 7937 uint8_t nal[COUNT*2]; |
7938 H264Context h; | 7938 H264Context h; |
7984 if(memcmp(bitstream, out, COUNT)){ | 7984 if(memcmp(bitstream, out, COUNT)){ |
7985 printf("mismatch\n"); | 7985 printf("mismatch\n"); |
7986 return -1; | 7986 return -1; |
7987 } | 7987 } |
7988 } | 7988 } |
7989 #endif | |
7989 | 7990 |
7990 printf("Testing RBSP\n"); | 7991 printf("Testing RBSP\n"); |
7991 | 7992 |
7992 | 7993 |
7993 return 0; | 7994 return 0; |