diff options
Diffstat (limited to 'src/libffmpeg/libavcodec/rv10.c')
-rw-r--r-- | src/libffmpeg/libavcodec/rv10.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/libffmpeg/libavcodec/rv10.c b/src/libffmpeg/libavcodec/rv10.c index de1d4abce..6d9376c54 100644 --- a/src/libffmpeg/libavcodec/rv10.c +++ b/src/libffmpeg/libavcodec/rv10.c @@ -24,6 +24,8 @@ #include "avcodec.h" #include "mpegvideo.h" +#undef DEBUG + static const UINT16 rv_lum_code[256] = { 0x3e7f, 0x0f00, 0x0f01, 0x0f02, 0x0f03, 0x0f04, 0x0f05, 0x0f06, @@ -288,7 +290,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) pb_frame = get_bits(&s->gb, 1); -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame); #endif @@ -303,7 +305,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) s->last_dc[0] = get_bits(&s->gb, 8); s->last_dc[1] = get_bits(&s->gb, 8); s->last_dc[2] = get_bits(&s->gb, 8); -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("DC:%d %d %d\n", s->last_dc[0], s->last_dc[1], @@ -335,6 +337,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) static int rv10_decode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; + int i; static int done; s->out_format = FMT_H263; @@ -348,6 +351,11 @@ static int rv10_decode_init(AVCodecContext *avctx) if (MPV_common_init(s) < 0) return -1; + /* XXX: suppress this matrix init, only needed because using mpeg1 + dequantize in mmx case */ + for(i=0;i<64;i++) + s->non_intra_matrix[i] = default_non_intra_matrix[i]; + h263_decode_init_vlc(s); /* init rv vlc */ @@ -381,7 +389,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, DCTELEM block[6][64]; AVPicture *pict = data; -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("*****frame %d size=%d\n", avctx->frame_number, buf_size); #endif @@ -395,7 +403,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, mb_count = rv10_decode_picture_header(s); if (mb_count < 0) { -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("HEADER ERROR\n"); #endif return -1; @@ -403,7 +411,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, if (s->mb_x >= s->mb_width || s->mb_y >= s->mb_height) { -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("POS ERROR %d %d\n", s->mb_x, s->mb_y); #endif return -1; @@ -411,7 +419,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, mb_pos = s->mb_y * s->mb_width + s->mb_x; left = s->mb_width * s->mb_height - mb_pos; if (mb_count > left) { -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("COUNT ERROR\n"); #endif return -1; @@ -421,7 +429,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, MPV_frame_start(s); } -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("qscale=%d\n", s->qscale); #endif @@ -434,7 +442,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, /* decode each macroblock */ for(i=0;i<mb_count;i++) { -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("**mb x=%d y=%d\n", s->mb_x, s->mb_y); #endif @@ -442,7 +450,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, s->mv_dir = MV_DIR_FORWARD; s->mv_type = MV_TYPE_16X16; if (h263_decode_mb(s, block) < 0) { -#ifdef DEBUG_PRINTS +#ifdef DEBUG printf("ERROR\n"); #endif return -1; |