comparison rv10.c @ 9992:7b2e5c91104e libavcodec

Use dprintf() instead of '#ifdef DEBUG' and av_log().
author diego
date Tue, 28 Jul 2009 12:50:32 +0000
parents e909e1f7b3f1
children 5eb52cc093e2
comparison
equal deleted inserted replaced
9991:c50957bfd553 9992:7b2e5c91104e
305 s->pict_type = FF_I_TYPE; 305 s->pict_type = FF_I_TYPE;
306 //printf("h:%X ver:%d\n",h,s->rv10_version); 306 //printf("h:%X ver:%d\n",h,s->rv10_version);
307 if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n"); 307 if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n");
308 pb_frame = get_bits1(&s->gb); 308 pb_frame = get_bits1(&s->gb);
309 309
310 #ifdef DEBUG 310 dprintf(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
311 av_log(s->avctx, AV_LOG_DEBUG, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
312 #endif
313 311
314 if (pb_frame){ 312 if (pb_frame){
315 av_log(s->avctx, AV_LOG_ERROR, "pb frame not supported\n"); 313 av_log(s->avctx, AV_LOG_ERROR, "pb frame not supported\n");
316 return -1; 314 return -1;
317 } 315 }
326 if (s->rv10_version == 3) { 324 if (s->rv10_version == 3) {
327 /* specific MPEG like DC coding not used */ 325 /* specific MPEG like DC coding not used */
328 s->last_dc[0] = get_bits(&s->gb, 8); 326 s->last_dc[0] = get_bits(&s->gb, 8);
329 s->last_dc[1] = get_bits(&s->gb, 8); 327 s->last_dc[1] = get_bits(&s->gb, 8);
330 s->last_dc[2] = get_bits(&s->gb, 8); 328 s->last_dc[2] = get_bits(&s->gb, 8);
331 #ifdef DEBUG 329 dprintf(s->avctx, "DC:%d %d %d\n", s->last_dc[0],
332 av_log(s->avctx, AV_LOG_DEBUG, "DC:%d %d %d\n", 330 s->last_dc[1], s->last_dc[2]);
333 s->last_dc[0],
334 s->last_dc[1],
335 s->last_dc[2]);
336 #endif
337 } 331 }
338 } 332 }
339 /* if multiple packets per frame are sent, the position at which 333 /* if multiple packets per frame are sent, the position at which
340 to display the macroblocks is coded here */ 334 to display the macroblocks is coded here */
341 335
628 if(MPV_frame_start(s, avctx) < 0) 622 if(MPV_frame_start(s, avctx) < 0)
629 return -1; 623 return -1;
630 ff_er_frame_start(s); 624 ff_er_frame_start(s);
631 } 625 }
632 626
633 #ifdef DEBUG 627 dprintf(avctx, "qscale=%d\n", s->qscale);
634 av_log(avctx, AV_LOG_DEBUG, "qscale=%d\n", s->qscale);
635 #endif
636 628
637 /* default quantization values */ 629 /* default quantization values */
638 if(s->codec_id== CODEC_ID_RV10){ 630 if(s->codec_id== CODEC_ID_RV10){
639 if(s->mb_y==0) s->first_slice_line=1; 631 if(s->mb_y==0) s->first_slice_line=1;
640 }else{ 632 }else{
670 /* decode each macroblock */ 662 /* decode each macroblock */
671 663
672 for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) { 664 for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) {
673 int ret; 665 int ret;
674 ff_update_block_index(s); 666 ff_update_block_index(s);
675 #ifdef DEBUG 667 dprintf(avctx, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
676 av_log(avctx, AV_LOG_DEBUG, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
677 #endif
678 668
679 s->mv_dir = MV_DIR_FORWARD; 669 s->mv_dir = MV_DIR_FORWARD;
680 s->mv_type = MV_TYPE_16X16; 670 s->mv_type = MV_TYPE_16X16;
681 ret=ff_h263_decode_mb(s, s->block); 671 ret=ff_h263_decode_mb(s, s->block);
682 672
721 int i; 711 int i;
722 AVFrame *pict = data; 712 AVFrame *pict = data;
723 int slice_count; 713 int slice_count;
724 const uint8_t *slices_hdr = NULL; 714 const uint8_t *slices_hdr = NULL;
725 715
726 #ifdef DEBUG 716 dprintf(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
727 av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
728 #endif
729 717
730 /* no supplementary picture */ 718 /* no supplementary picture */
731 if (buf_size == 0) { 719 if (buf_size == 0) {
732 return 0; 720 return 0;
733 } 721 }