summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorCheng Chen <chengchen@google.com>2020-02-10 16:13:58 -0800
committerCheng Chen <chengchen@google.com>2020-02-10 16:21:23 -0800
commit9d5bc18b099ea9115fde340e1db49536fa621318 (patch)
tree23dcb033e850b6c207d617e9fa7d7224c8813650 /vp9/encoder/vp9_encodeframe.c
parent91f8be5045bf9fdfb59106390fd6b4c85e711452 (diff)
downloadlibvpx-9d5bc18b099ea9115fde340e1db49536fa621318.tar
libvpx-9d5bc18b099ea9115fde340e1db49536fa621318.tar.gz
libvpx-9d5bc18b099ea9115fde340e1db49536fa621318.tar.bz2
libvpx-9d5bc18b099ea9115fde340e1db49536fa621318.zip
Set mv to zero if the second ref does not exist
Change-Id: I94b936c2642981eccdff073fc71c12e2dccb7909
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index f9a64f3da..3e83a264f 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3847,6 +3847,9 @@ static void assign_motion_vector_info(const int block_width_4x4,
const int col_4x4 = col_start_4x4 + j;
const int unit_index = row_4x4 * num_unit_cols + col_4x4;
if (row_4x4 >= num_unit_rows || col_4x4 >= num_unit_cols) continue;
+ if (source_ref_frame[1] == NONE) {
+ assert(source_mv[1]->row == 0 && source_mv[1]->col == 0);
+ }
motion_vector_info[unit_index].ref_frame[0] = source_ref_frame[0];
motion_vector_info[unit_index].ref_frame[1] = source_ref_frame[1];
motion_vector_info[unit_index].mv[0].as_mv.row = source_mv[0]->row;