diff options
author | Mans Rullgard <mans@mansr.com> | 2011-05-28 20:20:49 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-05-29 05:10:05 +0400 |
commit | 42761122779dea2629cfc54a8bbe5d327e729c6e (patch) | |
tree | e482c8f460e97efb524925c53d790b927b23bd9e | |
parent | 90da52f01f8b6c22af22a002eb226989b1cf7ef8 (diff) |
vp8: use av_clip_uintp2() where possible
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r-- | libavcodec/vp8.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 38f38b7cb3..5500706494 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -166,12 +166,12 @@ static void get_quants(VP8Context *s) } else base_qi = yac_qi; - 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].chroma_qmul[1] = vp8_ac_qlookup[av_clip(base_qi + uvac_delta, 0, 127)]; + s->qmat[i].luma_qmul[0] = vp8_dc_qlookup[av_clip_uintp2(base_qi + ydc_delta , 7)]; + s->qmat[i].luma_qmul[1] = vp8_ac_qlookup[av_clip_uintp2(base_qi , 7)]; + s->qmat[i].luma_dc_qmul[0] = 2 * vp8_dc_qlookup[av_clip_uintp2(base_qi + y2dc_delta, 7)]; + s->qmat[i].luma_dc_qmul[1] = 155 * vp8_ac_qlookup[av_clip_uintp2(base_qi + y2ac_delta, 7)] / 100; + s->qmat[i].chroma_qmul[0] = vp8_dc_qlookup[av_clip_uintp2(base_qi + uvdc_delta, 7)]; + s->qmat[i].chroma_qmul[1] = vp8_ac_qlookup[av_clip_uintp2(base_qi + uvac_delta, 7)]; 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); |