aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp3.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-07-17 13:09:45 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-07-17 13:09:45 +0000
commitefea8528777f8fc306b59c03c484553fbcb4f8fa (patch)
treeaa32ccff993641716696876a3a06264b17081e81 /libavcodec/vp3.c
parenta14ab4e4d435fbbfc17aa57c1aff8b2fd9b62e68 (diff)
downloadffmpeg-efea8528777f8fc306b59c03c484553fbcb4f8fa.tar.gz
parse all QIS values (we still ignore them though ...)
Originally committed as revision 5778 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 2d7bca13e4..af8d6afc64 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -229,6 +229,8 @@ typedef struct Vp3DecodeContext {
DSPContext dsp;
int flipped_image;
+ int qis[3];
+ int nqis;
int quality_index;
int last_quality_index;
@@ -2376,9 +2378,13 @@ static int vp3_decode_frame(AVCodecContext *avctx,
if (!s->theora)
skip_bits(&gb, 1);
s->last_quality_index = s->quality_index;
- s->quality_index = get_bits(&gb, 6);
- if (s->theora >= 0x030200)
- skip_bits1(&gb);
+
+ s->nqis=0;
+ do{
+ s->qis[s->nqis++]= get_bits(&gb, 6);
+ } while(s->theora >= 0x030200 && s->nqis<3 && get_bits1(&gb));
+
+ s->quality_index= s->qis[0];
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
av_log(s->avctx, AV_LOG_INFO, " VP3 %sframe #%d: Q index = %d\n",