summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2016-10-25 09:00:58 -0700
committerYunqing Wang <yunqingwang@google.com>2016-10-25 10:12:41 -0700
commitc192def8f3433d6713824fd31e76e9fa58cfd7f9 (patch)
treeffc1f0161267861f1a1712b6a287c7293fa3ad04 /vp9/encoder/vp9_encodeframe.c
parent2e6a1976a0fd9bc1cfbae137876b397b1148037e (diff)
downloadlibvpx-c192def8f3433d6713824fd31e76e9fa58cfd7f9.tar
libvpx-c192def8f3433d6713824fd31e76e9fa58cfd7f9.tar.gz
libvpx-c192def8f3433d6713824fd31e76e9fa58cfd7f9.tar.bz2
libvpx-c192def8f3433d6713824fd31e76e9fa58cfd7f9.zip
Change 2 motion search counts to be tile data
This patch modified the motion search counts used in: https://chromium-review.googlesource.com/#/c/305640/ These 2 counts were originally added as thread data, and used to make decisions in motion search. The tile encoding order can be inconsistent while using different number of threads, which can cause bitstream mismatch. Here moved them to tile data to solve the issue. BUG=webm:1322 Change-Id: Iedc4477aef1746aa0a4f84d88a1156296fd3ba87
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index aff7b1d9b..3ab05375f 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3974,8 +3974,10 @@ void vp9_encode_tile(VP9_COMP *cpi, ThreadData *td, int tile_row,
int mi_row;
// Set up pointers to per thread motion search counters.
- td->mb.m_search_count_ptr = &td->rd_counts.m_search_count;
- td->mb.ex_search_count_ptr = &td->rd_counts.ex_search_count;
+ this_tile->m_search_count = 0; // Count of motion search hits.
+ this_tile->ex_search_count = 0; // Exhaustive mesh search hits.
+ td->mb.m_search_count_ptr = &this_tile->m_search_count;
+ td->mb.ex_search_count_ptr = &this_tile->ex_search_count;
for (mi_row = mi_row_start; mi_row < mi_row_end; mi_row += MI_BLOCK_SIZE) {
if (cpi->sf.use_nonrd_pick_mode)