summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Su <huisu@google.com>2018-09-27 10:12:55 -0700
committerHui Su <huisu@google.com>2018-09-27 13:37:40 -0700
commit2176d88fc343c8ffa6f29fafc3cffb5ec043f1d2 (patch)
tree044814f31747998878a31abc7ad4e97387084ab5
parent3a291593726a3f0eff5e59983e84de20d0bf294c (diff)
downloadlibvpx-2176d88fc343c8ffa6f29fafc3cffb5ec043f1d2.tar
libvpx-2176d88fc343c8ffa6f29fafc3cffb5ec043f1d2.tar.gz
libvpx-2176d88fc343c8ffa6f29fafc3cffb5ec043f1d2.tar.bz2
libvpx-2176d88fc343c8ffa6f29fafc3cffb5ec043f1d2.zip
Fix a loophole in nonrd_pick_partition()
In some rare cases, all possible paritions may be skipped during RD search. The patch makes the encoder do rectangular partition search if both partition-none and partition-split are not allowed. Tested on the rtc and ytlivehr testsets with speed 5 and 7, no coding stats changes were observed. Change-Id: I8b6d8b62b6d2431be8e73317d113311c98f631d5
-rw-r--r--vp9/encoder/vp9_encodeframe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index f1527f930..811674d84 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -4404,6 +4404,8 @@ static void nonrd_pick_partition(VP9_COMP *cpi, ThreadData *td,
partition_vert_allowed &= force_vert_split;
}
+ if (!partition_none_allowed && !do_split) do_rect = 1;
+
ctx->pred_pixel_ready =
!(partition_vert_allowed || partition_horz_allowed || do_split);