summaryrefslogtreecommitdiff
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-26 21:36:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-26 21:37:15 +0200
commit7333798c85837f1cf175f39bc4acb5664fa6cacc (patch)
tree60036638a0962b3cb966d62da2eda81f93ac3267 /libavcodec/vp8.c
parent307a20cca216356aec30f5bb102c633169cbc0c1 (diff)
parent44dc9c6af0377faf2a99889d1f949e32a1102e84 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: libopenjpeg: support YUV and deep RGB pixel formats Fix typo in v410 decoder. vf_yadif: unset cur_buf on the input link. vf_overlay: ensure the overlay frame does not get leaked. vf_overlay: prevent premature freeing of cur_buf Support urlencoded http authentication credentials rtmp: Return an error when the client bandwidth is incorrect rtmp: Return proper error code in handle_server_bw rtmp: Return proper error code in handle_client_bw rtmp: Return proper error codes in handle_chunk_size lavr: x86: add missing vzeroupper in ff_mix_1_to_2_fltp_flt() vp8: Replace x*155/100 by x*101581>>16. vp3: don't use calls to inline asm in yasm code. x86/dsputil: put inline asm under HAVE_INLINE_ASM. dsputil_mmx: fix incorrect assembly code rtmp: Factorize the code by adding handle_invoke rtmp: Factorize the code by adding handle_chunk_size rtmp: Factorize the code by adding handle_ping rtmp: Factorize the code by adding handle_client_bw rtmp: Factorize the code by adding handle_server_bw Conflicts: libavcodec/libopenjpegdec.c libavcodec/x86/dsputil_mmx.c libavfilter/vf_overlay.c libavformat/Makefile libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 9a47ad6da6..c86bad8966 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -249,12 +249,13 @@ static void get_quants(VP8Context *s)
} else
base_qi = yac_qi;
- 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_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)];
+ /* 101581>>16 is equivalent to 155/100 */
+ s->qmat[i].luma_dc_qmul[1] = (101581 * vp8_ac_qlookup[av_clip_uintp2(base_qi + y2ac_delta, 7)]) >> 16;
+ 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);