diff --git a/vp10/common/loopfilter.h b/vp10/common/loopfilter.h index cfeb9b836..329ab75af 100644 --- a/vp10/common/loopfilter.h +++ b/vp10/common/loopfilter.h @@ -26,7 +26,6 @@ extern "C" { #define SIMD_WIDTH 16 -#define MAX_REF_LF_DELTAS 4 #define MAX_MODE_LF_DELTAS 2 enum lf_path { @@ -45,8 +44,8 @@ struct loopfilter { uint8_t mode_ref_delta_update; // 0 = Intra, Last, GF, ARF - signed char ref_deltas[MAX_REF_LF_DELTAS]; - signed char last_ref_deltas[MAX_REF_LF_DELTAS]; + signed char ref_deltas[MAX_REF_FRAMES]; + signed char last_ref_deltas[MAX_REF_FRAMES]; // 0 = ZERO_MV, MV signed char mode_deltas[MAX_MODE_LF_DELTAS]; diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c index 67f6909e4..942a07a11 100644 --- a/vp10/decoder/decodeframe.c +++ b/vp10/decoder/decodeframe.c @@ -1112,7 +1112,7 @@ static void setup_loopfilter(struct loopfilter *lf, if (lf->mode_ref_delta_update) { int i; - for (i = 0; i < MAX_REF_LF_DELTAS; i++) + for (i = 0; i < MAX_REF_FRAMES; i++) if (vpx_rb_read_bit(rb)) lf->ref_deltas[i] = vpx_rb_read_signed_literal(rb, 6); diff --git a/vp10/decoder/dthread.c b/vp10/decoder/dthread.c index 77f1cf127..4206adcb6 100644 --- a/vp10/decoder/dthread.c +++ b/vp10/decoder/dthread.c @@ -177,7 +177,7 @@ void vp10_frameworker_copy_context(VPxWorker *const dst_worker, (MAX_LOOP_FILTER + 1) * sizeof(loop_filter_thresh)); dst_cm->lf.last_sharpness_level = src_cm->lf.sharpness_level; dst_cm->lf.filter_level = src_cm->lf.filter_level; - memcpy(dst_cm->lf.ref_deltas, src_cm->lf.ref_deltas, MAX_REF_LF_DELTAS); + memcpy(dst_cm->lf.ref_deltas, src_cm->lf.ref_deltas, MAX_REF_FRAMES); memcpy(dst_cm->lf.mode_deltas, src_cm->lf.mode_deltas, MAX_MODE_LF_DELTAS); dst_cm->seg = src_cm->seg; memcpy(dst_cm->frame_contexts, src_cm->frame_contexts, diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c index a793a3b6a..b872b4e7d 100644 --- a/vp10/encoder/bitstream.c +++ b/vp10/encoder/bitstream.c @@ -707,7 +707,7 @@ static void encode_loopfilter(struct loopfilter *lf, if (lf->mode_ref_delta_enabled) { vpx_wb_write_bit(wb, lf->mode_ref_delta_update); if (lf->mode_ref_delta_update) { - for (i = 0; i < MAX_REF_LF_DELTAS; i++) { + for (i = 0; i < MAX_REF_FRAMES; i++) { const int delta = lf->ref_deltas[i]; const int changed = delta != lf->last_ref_deltas[i]; vpx_wb_write_bit(wb, changed); diff --git a/vp10/encoder/encoder.h b/vp10/encoder/encoder.h index 92faa0b50..efb80ecfd 100644 --- a/vp10/encoder/encoder.h +++ b/vp10/encoder/encoder.h @@ -61,7 +61,7 @@ typedef struct { unsigned char *last_frame_seg_map_copy; // 0 = Intra, Last, GF, ARF - signed char last_ref_lf_deltas[MAX_REF_LF_DELTAS]; + signed char last_ref_lf_deltas[MAX_REF_FRAMES]; // 0 = ZERO_MV, MV signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS];