]> granicus.if.org Git - libvpx/commitdiff
Fixing error found by ioc.
authorDmitry Kovalev <dkovalev@google.com>
Sat, 12 Apr 2014 00:14:15 +0000 (17:14 -0700)
committerDmitry Kovalev <dkovalev@google.com>
Sat, 12 Apr 2014 00:14:15 +0000 (17:14 -0700)
vp9/encoder/vp9_rdopt.c:3913:44: runtime error: index -1 out of bounds for
type 'RefBuffer [3]'.

Change-Id: Ic0ec755328853b359e3a1ee84d319589183e38b7

vp9/encoder/vp9_rdopt.c

index d498f4c7fc3b7cbbca70c616344fd091ae77eae7..1bf8621e734e50b63dd0226d9a142df2752d40af 100644 (file)
@@ -3910,10 +3910,11 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
 
     // TODO(jingning, jkoleszar): scaling reference frame not supported for
     // sub8x8 blocks.
-    if (ref_frame > NONE && vp9_is_scaled(&cm->frame_refs[ref_frame - 1].sf))
+    if (ref_frame > INTRA_FRAME &&
+        vp9_is_scaled(&cm->frame_refs[ref_frame - 1].sf))
       continue;
 
-    if (second_ref_frame > NONE &&
+    if (second_ref_frame > INTRA_FRAME &&
         vp9_is_scaled(&cm->frame_refs[second_ref_frame - 1].sf))
       continue;