diff options
author | Pascal Massimino <pascal.massimino@gmail.com> | 2010-07-27 22:23:50 +0000 |
---|---|---|
committer | Pascal Massimino <pascal.massimino@gmail.com> | 2010-07-27 22:23:50 +0000 |
commit | 62d1f7864ee9b47daa7d9bfdcaee2f9322c01a0d (patch) | |
tree | 53e2bc4cd74c6c0ee59ef33ba54abdf70ca35983 | |
parent | e7e81959d65c843e287d7c96af2ea96002c6c081 (diff) | |
download | ffmpeg-62d1f7864ee9b47daa7d9bfdcaee2f9322c01a0d.tar.gz |
perform the clipping on luma_dc_qmul[1] and chroma_qmul[0] earlier
Originally committed as revision 24558 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/vp8.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 5bc962091e..c1ce23bc07 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -343,12 +343,9 @@ static void get_quants(VP8Context *s) s->qmat[i].luma_qmul[0] = vp8_dc_qlookup[av_clip(base_qi + ydc_delta , 0, 127)]; s->qmat[i].luma_qmul[1] = vp8_ac_qlookup[av_clip(base_qi , 0, 127)]; s->qmat[i].luma_dc_qmul[0] = 2 * vp8_dc_qlookup[av_clip(base_qi + y2dc_delta, 0, 127)]; - s->qmat[i].luma_dc_qmul[1] = 155 * vp8_ac_qlookup[av_clip(base_qi + y2ac_delta, 0, 127)] / 100; - s->qmat[i].chroma_qmul[0] = vp8_dc_qlookup[av_clip(base_qi + uvdc_delta, 0, 127)]; + s->qmat[i].luma_dc_qmul[1] = 155 * vp8_ac_qlookup[av_clip(base_qi + y2ac_delta, 2, 127)] / 100; + s->qmat[i].chroma_qmul[0] = vp8_dc_qlookup[av_clip(base_qi + uvdc_delta, 0, 117)]; s->qmat[i].chroma_qmul[1] = vp8_ac_qlookup[av_clip(base_qi + uvac_delta, 0, 127)]; - - s->qmat[i].luma_dc_qmul[1] = FFMAX(s->qmat[i].luma_dc_qmul[1], 8); - s->qmat[i].chroma_qmul[0] = FFMIN(s->qmat[i].chroma_qmul[0], 132); } } |