]> granicus.if.org Git - libvpx/commitdiff
Fix a loophole in nonrd_pick_partition()
authorHui Su <huisu@google.com>
Thu, 27 Sep 2018 17:12:55 +0000 (10:12 -0700)
committerHui Su <huisu@google.com>
Thu, 27 Sep 2018 20:37:40 +0000 (13:37 -0700)
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

vp9/encoder/vp9_encodeframe.c

index f1527f930be373cd7a0dbe88f783f59b4c93e40f..811674d842239a845b7be084d7cd04c589bb954e 100644 (file)
@@ -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);