Commit c455919f authored by Jingning Han's avatar Jingning Han

Replace MAX_REF_LF_DELTAS with MAX_REF_FRAMES

The macro MAX_REF_LF_DELTAS is repeatedly defined. Merge its use
cases with MAX_REF_FRAMES.

Change-Id: I71c4634fb5feae78ce6f9bf99074f45ed7f68b73
parent 49f6ff11
......@@ -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];
......
......@@ -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);
......
......@@ -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,
......
......@@ -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);
......
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment