]> granicus.if.org Git - libvpx/commitdiff
Add a guard on intra mode skip control for RTC mode
authorJingning Han <jingning@google.com>
Thu, 18 Dec 2014 19:54:13 +0000 (11:54 -0800)
committerJingning Han <jingning@google.com>
Thu, 18 Dec 2014 20:00:27 +0000 (12:00 -0800)
This commit adds a guard condition to the intra mode test skip
control in RTC coding mode. If all inter modes are skipped, force
the encoder to check intra mode. It avoids situations where the
encoder processes without properly assigning required mode
information.

Change-Id: Ibb349fee997d6584ce901d08b06e8df3ca9c01b1

vp9/encoder/vp9_pickmode.c

index 2a2de5b336bde791a177db1ba7a8bd7a904fbcec..319a47833f6f2b5853a1c5aa73420e2bcb6ed8e4 100644 (file)
@@ -837,8 +837,9 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
 
   // Perform intra prediction search, if the best SAD is above a certain
   // threshold.
-  if (!x->skip && best_rdc.rdcost > inter_mode_thresh &&
-      bsize <= cpi->sf.max_intra_bsize) {
+  if (best_rdc.rdcost == INT64_MAX ||
+      (!x->skip && best_rdc.rdcost > inter_mode_thresh &&
+       bsize <= cpi->sf.max_intra_bsize)) {
     struct estimate_block_intra_args args = { cpi, x, DC_PRED, 0, 0 };
     const TX_SIZE intra_tx_size =
         MIN(max_txsize_lookup[bsize],