]> granicus.if.org Git - libvpx/commitdiff
Fix crash in pick_inter_mode_sb().
authorRonald S. Bultje <rbultje@google.com>
Sat, 24 Nov 2012 16:19:04 +0000 (08:19 -0800)
committerRonald S. Bultje <rbultje@google.com>
Sun, 25 Nov 2012 05:20:32 +0000 (21:20 -0800)
It didn't handle rd_thresh == INT_MAX, which means the reference is
unavailable.

Change-Id: Ie6fa8b2577437411db81a8c24e8dcdfd856a0e8d

vp9/encoder/rdopt.c

index 5d0b111ce3f0f6f9d8d331175f93634624e7727a..ea8f8d9a5c002df376c7e3737784ddeac687e05b 100644 (file)
@@ -4632,7 +4632,8 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
 #endif
 
     // Test best rd so far against threshold for trying this mode.
-    if (best_rd <= cpi->rd_threshes[mode_index]) {
+    if (best_rd <= cpi->rd_threshes[mode_index] ||
+        cpi->rd_threshes[mode_index] == INT_MAX) {
       continue;
     }