summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2017-08-03 00:03:10 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-08-03 00:03:10 +0000
commit6843e7c7f35ca2c63fe5a9a4f4663c463fd480a7 (patch)
tree46053f625a43213fdc87c2b021362014a5e44e6d
parent787970a62519a0082dca723224ca757529014b9f (diff)
parentbfd0f41f9b8282a458e276fbccf07c8e9ae0870b (diff)
downloadlibvpx-6843e7c7f35ca2c63fe5a9a4f4663c463fd480a7.tar
libvpx-6843e7c7f35ca2c63fe5a9a4f4663c463fd480a7.tar.gz
libvpx-6843e7c7f35ca2c63fe5a9a4f4663c463fd480a7.tar.bz2
libvpx-6843e7c7f35ca2c63fe5a9a4f4663c463fd480a7.zip
Merge "Force the bit exactness in the first pass"
-rw-r--r--test/vp9_ethread_test.cc2
-rw-r--r--vp9/encoder/vp9_encoder.c2
-rw-r--r--vp9/encoder/vp9_speed_features.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/test/vp9_ethread_test.cc b/test/vp9_ethread_test.cc
index 4e8d814c1..d4ee8aedd 100644
--- a/test/vp9_ethread_test.cc
+++ b/test/vp9_ethread_test.cc
@@ -340,8 +340,6 @@ TEST_P(VPxEncoderThreadTest, EncoderResultTest) {
ASSERT_EQ(single_thr_md5, multi_thr_md5);
// Part 2: row_mt_mode_ = 0 vs row_mt_mode_ = 1 single thread bit exact test.
- // The first-pass stats are not bit exact here, but that difference doesn't
- // cause a mismatch between the final bitstreams.
row_mt_mode_ = 1;
// Encode using single thread
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index c6e34117e..4888c20f4 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5589,7 +5589,7 @@ void vp9_set_row_mt(VP9_COMP *cpi) {
cpi->row_mt = 1;
}
- if (cpi->row_mt && cpi->oxcf.max_threads > 1)
+ if (cpi->row_mt)
cpi->row_mt_bit_exact = 1;
else
cpi->row_mt_bit_exact = 0;
diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c
index 5a374ff88..43ef4254d 100644
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -664,7 +664,8 @@ void vp9_set_speed_features_framesize_dependent(VP9_COMP *cpi) {
// and multiple threads match.
// It can be used in realtime when adaptive_rd_thresh_row_mt is enabled since
// adaptive_rd_thresh is defined per-row for non-rd pickmode.
- if (!sf->adaptive_rd_thresh_row_mt && cpi->row_mt_bit_exact)
+ if (!sf->adaptive_rd_thresh_row_mt && cpi->row_mt_bit_exact &&
+ oxcf->max_threads > 1)
sf->adaptive_rd_thresh = 0;
// This is only used in motion vector unit test.
@@ -820,7 +821,8 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) {
// and multiple threads match.
// It can be used in realtime when adaptive_rd_thresh_row_mt is enabled since
// adaptive_rd_thresh is defined per-row for non-rd pickmode.
- if (!sf->adaptive_rd_thresh_row_mt && cpi->row_mt_bit_exact)
+ if (!sf->adaptive_rd_thresh_row_mt && cpi->row_mt_bit_exact &&
+ oxcf->max_threads > 1)
sf->adaptive_rd_thresh = 0;
// This is only used in motion vector unit test.