summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2011-11-28 14:43:25 -0500
committerYunqing Wang <yunqingwang@google.com>2011-11-28 15:58:28 -0500
commit06fc0f83b6bfd4c97b2b82d5725036f029152671 (patch)
treeed4e07b63b80c90aeb1cd60aec9be7deecf521d1
parent34d7c8b3d4b9da3846f0d429e13ac15758f6cf78 (diff)
downloadlibvpx-06fc0f83b6bfd4c97b2b82d5725036f029152671.tar
libvpx-06fc0f83b6bfd4c97b2b82d5725036f029152671.tar.gz
libvpx-06fc0f83b6bfd4c97b2b82d5725036f029152671.tar.bz2
libvpx-06fc0f83b6bfd4c97b2b82d5725036f029152671.zip
Populate q_index in multi-thread encoding
This value needs to be copied to each thread's data structure. This fixed artifact problem in multi-thread encoder. Change-Id: Iab6d9745a1d44846aa503184705376f63a505597
-rw-r--r--vp8/encoder/ethreading.c3
-rw-r--r--vp8/encoder/quantize.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/vp8/encoder/ethreading.c b/vp8/encoder/ethreading.c
index 557080dba..8c496686a 100644
--- a/vp8/encoder/ethreading.c
+++ b/vp8/encoder/ethreading.c
@@ -343,6 +343,9 @@ static void setup_mbby_copy(MACROBLOCK *mbdst, MACROBLOCK *mbsrc)
z->block[i].zbin = x->block[i].zbin;
z->block[i].zrun_zbin_boost = x->block[i].zrun_zbin_boost;
z->block[i].round = x->block[i].round;
+ z->q_index = x->q_index;
+ z->act_zbin_adj = x->act_zbin_adj;
+ z->last_act_zbin_adj = x->last_act_zbin_adj;
/*
z->block[i].src = x->block[i].src;
*/
diff --git a/vp8/encoder/quantize.c b/vp8/encoder/quantize.c
index e57a26430..3ca8758ef 100644
--- a/vp8/encoder/quantize.c
+++ b/vp8/encoder/quantize.c
@@ -609,6 +609,9 @@ void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x, int ok_to_skip)
/* This initialization should be called at least once. Use ok_to_skip to
* decide if it is ok to skip.
+ * Before encoding a frame, this function is always called with ok_to_skip
+ * =0, which means no skiping of calculations. The "last" values are
+ * initialized at that time.
*/
if (!ok_to_skip || QIndex != x->q_index)
{