summaryrefslogtreecommitdiff
path: root/vp8/decoder/decodframe.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2012-08-16 13:25:49 -0700
committerJingning Han <jingning@google.com>2012-08-16 14:24:32 -0700
commit60ed954535e1beb6283ba8674cf65565cbd66bba (patch)
tree6fd2027dc9f2d5abf0ee313a0310535aa65ad84e /vp8/decoder/decodframe.c
parent45ddaab89b618438ca9a2a2d927725ddacb38cd9 (diff)
downloadlibvpx-60ed954535e1beb6283ba8674cf65565cbd66bba.tar
libvpx-60ed954535e1beb6283ba8674cf65565cbd66bba.tar.gz
libvpx-60ed954535e1beb6283ba8674cf65565cbd66bba.tar.bz2
libvpx-60ed954535e1beb6283ba8674cf65565cbd66bba.zip
Fixed decoder mismatch issue
Resolved the decoder mismatch issue due to quantization parameter threshold for hybrid transform coding. The macroblock dequantizer initialization is moved to be performed before coefficient detokenization, since the (de)tokenization is now dependent on the macroblock level quantization parameter. Change-Id: I443da4992ebb70ae4114750b2f1363c0c628580e
Diffstat (limited to 'vp8/decoder/decodframe.c')
-rw-r--r--vp8/decoder/decodframe.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 6ff914893..0ac23654c 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -211,10 +211,14 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
int tx_type;
#if CONFIG_HYBRIDTRANSFORM
- int QIndex = xd->q_index;
- int active_ht = (QIndex < ACTIVE_HT);
+ int QIndex;
+ int active_ht;
#endif
+ // re-initialize macroblock dequantizer before detokenization
+ if (xd->segmentation_enabled)
+ mb_init_dequantizer(pbi, xd);
+
if (pbi->common.frame_type == KEY_FRAME) {
#if CONFIG_TX16X16
if (xd->mode_info_context->mbmi.mode <= TM_PRED ||
@@ -326,11 +330,14 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
}
#endif
- if (xd->segmentation_enabled)
- mb_init_dequantizer(pbi, xd);
+ // moved to be performed before detokenization
+// if (xd->segmentation_enabled)
+// mb_init_dequantizer(pbi, xd);
#if CONFIG_HYBRIDTRANSFORM
// parse transform types for intra 4x4 mode
+ QIndex = xd->q_index;
+ active_ht = (QIndex < ACTIVE_HT);
if (mode == B_PRED) {
for (i = 0; i < 16; i++) {
BLOCKD *b = &xd->block[i];