diff options
Diffstat (limited to 'libavcodec/svq1dec.c')
-rw-r--r-- | libavcodec/svq1dec.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index eff1454241..f2690fbf33 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -33,7 +33,6 @@ */ -//#define DEBUG_SVQ1 #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" @@ -238,9 +237,9 @@ static int svq1_decode_block_intra (GetBitContext *bitbuf, uint8_t *pixels, int } if ((stages > 0) && (level >= 4)) { -#ifdef DEBUG_SVQ1 - av_log(s->avctx, AV_LOG_INFO, "Error (svq1_decode_block_intra): invalid vector: stages=%i level=%i\n",stages,level); -#endif + av_dlog(NULL, + "Error (svq1_decode_block_intra): invalid vector: stages=%i level=%i\n", + stages, level); return -1; /* invalid vector */ } @@ -288,9 +287,9 @@ static int svq1_decode_block_non_intra (GetBitContext *bitbuf, uint8_t *pixels, if (stages == -1) continue; /* skip vector */ if ((stages > 0) && (level >= 4)) { -#ifdef DEBUG_SVQ1 - av_log(s->avctx, AV_LOG_INFO, "Error (svq1_decode_block_non_intra): invalid vector: stages=%i level=%i\n",stages,level); -#endif + av_dlog(NULL, + "Error (svq1_decode_block_non_intra): invalid vector: stages=%i level=%i\n", + stages, level); return -1; /* invalid vector */ } @@ -499,9 +498,7 @@ static int svq1_decode_delta_block (MpegEncContext *s, GetBitContext *bitbuf, if (result != 0) { -#ifdef DEBUG_SVQ1 - av_log(s->avctx, AV_LOG_INFO, "Error in svq1_motion_inter_block %i\n",result); -#endif + av_dlog(s->avctx, "Error in svq1_motion_inter_block %i\n", result); break; } result = svq1_decode_block_non_intra (bitbuf, current, pitch); @@ -512,9 +509,7 @@ static int svq1_decode_delta_block (MpegEncContext *s, GetBitContext *bitbuf, if (result != 0) { -#ifdef DEBUG_SVQ1 - av_log(s->avctx, AV_LOG_INFO, "Error in svq1_motion_inter_4v_block %i\n",result); -#endif + av_dlog(s->avctx, "Error in svq1_motion_inter_4v_block %i\n", result); break; } result = svq1_decode_block_non_intra (bitbuf, current, pitch); @@ -554,9 +549,8 @@ static void svq1_parse_string (GetBitContext *bitbuf, uint8_t *out) { static int svq1_decode_frame_header (GetBitContext *bitbuf,MpegEncContext *s) { int frame_size_code; - int temporal_reference; - temporal_reference = get_bits (bitbuf, 8); + skip_bits(bitbuf, 8); /* temporal_reference */ /* frame type */ s->pict_type= get_bits (bitbuf, 2)+1; @@ -661,9 +655,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, if (result != 0) { -#ifdef DEBUG_SVQ1 - av_log(s->avctx, AV_LOG_INFO, "Error in svq1_decode_frame_header %i\n",result); -#endif + av_dlog(s->avctx, "Error in svq1_decode_frame_header %i\n",result); return result; } @@ -712,9 +704,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, result = svq1_decode_block_intra (&s->gb, ¤t[x], linesize); if (result != 0) { -//#ifdef DEBUG_SVQ1 av_log(s->avctx, AV_LOG_INFO, "Error in svq1_decode_block %i (keyframe)\n",result); -//#endif goto err; } } @@ -730,9 +720,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, linesize, pmv, x, y); if (result != 0) { -#ifdef DEBUG_SVQ1 - av_log(s->avctx, AV_LOG_INFO, "Error in svq1_decode_delta_block %i\n",result); -#endif + av_dlog(s->avctx, "Error in svq1_decode_delta_block %i\n",result); goto err; } } |