]> granicus.if.org Git - libvpx/commitdiff
Replaced a hard-coded value with the macro
authorZoe Liu <zoeliu@google.com>
Thu, 31 Dec 2015 01:16:51 +0000 (17:16 -0800)
committerZoe Liu <zoeliu@google.com>
Thu, 31 Dec 2015 01:16:51 +0000 (17:16 -0800)
Change-Id: I2aec63d8a600e319d037b764b0609092bce1e483

vp10/encoder/encoder.c

index 704217467ee05019df05171bc8b71e8a7cc749c2..a3982e3cef5281fc8030c2ceaacec70519560eba 100644 (file)
@@ -3158,7 +3158,7 @@ static void set_frame_size(VP10_COMP *cpi) {
   init_motion_estimation(cpi);
 
   for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) {
-    RefBuffer *const ref_buf = &cm->frame_refs[ref_frame - 1];
+    RefBuffer *const ref_buf = &cm->frame_refs[ref_frame - LAST_FRAME];
     const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame);
 
     ref_buf->idx = buf_idx;