From 1b4a17094ebdc605a9414d4d98653a1bfb0ea0a4 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 17 Jul 2011 13:09:04 +0200 Subject: [PATCH] h264: remove some disabled code --- libavcodec/h264.c | 149 ------------------------------------------------------ 1 file changed, 149 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index cbeeb0742..5adce242c 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3459,52 +3459,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){ } } } - -#if 0 - for(;s->mb_y < s->mb_height; s->mb_y++){ - for(;s->mb_x < s->mb_width; s->mb_x++){ - int ret= decode_mb(h); - - ff_h264_hl_decode_mb(h); - - if(ret<0){ - av_log(s->avctx, AV_LOG_ERROR, "error while decoding MB %d %d\n", s->mb_x, s->mb_y); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); - - return -1; - } - - if(++s->mb_x >= s->mb_width){ - s->mb_x=0; - if(++s->mb_y >= s->mb_height){ - if(get_bits_count(s->gb) == s->gb.size_in_bits){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); - - return 0; - }else{ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); - - return -1; - } - } - } - - if(get_bits_count(s->?gb) >= s->gb?.size_in_bits){ - if(get_bits_count(s->gb) == s->gb.size_in_bits){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); - - return 0; - }else{ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); - - return -1; - } - } - } - s->mb_x=0; - ff_draw_horiz_band(s, 16*s->mb_y, 16); - } -#endif } /** @@ -3971,109 +3925,6 @@ int main(void){ STOP_TIMER("get_se_golomb"); } -#if 0 - printf("testing 4x4 (I)DCT\n"); - - DCTELEM block[16]; - uint8_t src[16], ref[16]; - uint64_t error= 0, max_error=0; - - for(i=0; ih264dsp.h264_idct_add(ref, block, 4); -/* for(j=0; j<16; j++){ - printf("%d ", ref[j]); - } - printf("\n");*/ - - for(j=0; j<16; j++){ - int diff= FFABS(src[j] - ref[j]); - - error+= diff*diff; - max_error= FFMAX(max_error, diff); - } - } - printf("error=%f max_error=%d\n", ((float)error)/COUNT/16, (int)max_error ); - printf("testing quantizer\n"); - for(qp=0; qp<52; qp++){ - for(i=0; i<16; i++) - src1_block[i]= src2_block[i]= random()%255; - - } - printf("Testing NAL layer\n"); - - uint8_t bitstream[COUNT]; - uint8_t nal[COUNT*2]; - H264Context h; - memset(&h, 0, sizeof(H264Context)); - - for(i=0; i