diff --git a/vp9/common/vp9_loopfilter.h b/vp9/common/vp9_loopfilter.h index 458afc50b..bd9a35125 100644 --- a/vp9/common/vp9_loopfilter.h +++ b/vp9/common/vp9_loopfilter.h @@ -20,7 +20,7 @@ typedef enum { NORMAL_LOOPFILTER = 0, SIMPLE_LOOPFILTER = 1 -} LOOPFILTERTYPE; +} LOOPFILTER_TYPE; #define SIMD_WIDTH 16 diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index 26c0b8f83..a6a980667 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -240,7 +240,7 @@ typedef struct VP9Common { unsigned char *last_frame_seg_map; INTERPOLATIONFILTERTYPE mcomp_filter_type; - LOOPFILTERTYPE filter_type; + LOOPFILTER_TYPE filter_type; loop_filter_info_n lf_info; diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index f6f87efae..a2bd3413b 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -1363,7 +1363,7 @@ static void setup_pred_probs(VP9_COMMON *pc, vp9_reader *r) { } static void setup_loopfilter(VP9_COMMON *pc, MACROBLOCKD *xd, vp9_reader *r) { - pc->filter_type = (LOOPFILTERTYPE) vp9_read_bit(r); + pc->filter_type = (LOOPFILTER_TYPE) vp9_read_bit(r); pc->filter_level = vp9_read_literal(r, 6); pc->sharpness_level = vp9_read_literal(r, 3); @@ -1380,31 +1380,25 @@ static void setup_loopfilter(VP9_COMMON *pc, MACROBLOCKD *xd, vp9_reader *r) { xd->mode_ref_lf_delta_enabled = vp9_read_bit(r); if (xd->mode_ref_lf_delta_enabled) { - // Do the deltas need to be updated xd->mode_ref_lf_delta_update = vp9_read_bit(r); - if (xd->mode_ref_lf_delta_update) { int i; - // Send update for (i = 0; i < MAX_REF_LF_DELTAS; i++) { if (vp9_read_bit(r)) { - // sign = vp9_read_bit(r); - xd->ref_lf_deltas[i] = vp9_read_literal(r, 6); - + int value = vp9_read_literal(r, 6); if (vp9_read_bit(r)) - xd->ref_lf_deltas[i] = -xd->ref_lf_deltas[i]; // Apply sign + value = -value; + xd->ref_lf_deltas[i] = value; } } - // Send update for (i = 0; i < MAX_MODE_LF_DELTAS; i++) { if (vp9_read_bit(r)) { - // sign = vp9_read_bit(r); - xd->mode_lf_deltas[i] = vp9_read_literal(r, 6); - + int value = vp9_read_literal(r, 6); if (vp9_read_bit(r)) - xd->mode_lf_deltas[i] = -xd->mode_lf_deltas[i]; // Apply sign + value = -value; + xd->mode_lf_deltas[i] = value; } } }