diff options
Diffstat (limited to 'vp8/encoder')
-rw-r--r-- | vp8/encoder/mcomp.c | 36 | ||||
-rw-r--r-- | vp8/encoder/mips/msa/dct_msa.c | 8 | ||||
-rw-r--r-- | vp8/encoder/mips/msa/temporal_filter_msa.c | 2 |
3 files changed, 23 insertions, 23 deletions
diff --git a/vp8/encoder/mcomp.c b/vp8/encoder/mcomp.c index fd9810e1e..999d6e851 100644 --- a/vp8/encoder/mcomp.c +++ b/vp8/encoder/mcomp.c @@ -800,24 +800,24 @@ int vp8_find_best_half_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d, } #define CHECK_BOUNDS(range) \ - do { \ + { \ all_in = 1; \ all_in &= ((br - range) >= x->mv_row_min); \ all_in &= ((br + range) <= x->mv_row_max); \ all_in &= ((bc - range) >= x->mv_col_min); \ all_in &= ((bc + range) <= x->mv_col_max); \ - } while (0) + } #define CHECK_POINT \ - do { \ + { \ if (this_mv.as_mv.col < x->mv_col_min) continue; \ if (this_mv.as_mv.col > x->mv_col_max) continue; \ if (this_mv.as_mv.row < x->mv_row_min) continue; \ if (this_mv.as_mv.row > x->mv_row_max) continue; \ - } while (0) + } #define CHECK_BETTER \ - do { \ + { \ if (thissad < bestsad) { \ thissad += \ mvsad_err_cost(&this_mv, &fcenter_mv, mvsadcost, sad_per_bit); \ @@ -826,7 +826,7 @@ int vp8_find_best_half_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d, best_site = i; \ } \ } \ - } while (0) + } static const MV next_chkpts[6][3] = { { { -2, 0 }, { -1, -2 }, { 1, -2 } }, { { -1, -2 }, { 1, -2 }, { 2, 0 } }, @@ -903,7 +903,7 @@ int vp8_hex_search(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, #endif /* hex search */ - CHECK_BOUNDS(2); + CHECK_BOUNDS(2) if (all_in) { for (i = 0; i < 6; ++i) { @@ -912,17 +912,17 @@ int vp8_hex_search(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, this_offset = base_offset + (this_mv.as_mv.row * in_what_stride) + this_mv.as_mv.col; thissad = vfp->sdf(what, what_stride, this_offset, in_what_stride); - CHECK_BETTER; + CHECK_BETTER } } else { for (i = 0; i < 6; ++i) { this_mv.as_mv.row = br + hex[i].row; this_mv.as_mv.col = bc + hex[i].col; - CHECK_POINT; + CHECK_POINT this_offset = base_offset + (this_mv.as_mv.row * in_what_stride) + this_mv.as_mv.col; thissad = vfp->sdf(what, what_stride, this_offset, in_what_stride); - CHECK_BETTER; + CHECK_BETTER } } @@ -936,7 +936,7 @@ int vp8_hex_search(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, for (j = 1; j < hex_range; ++j) { best_site = -1; - CHECK_BOUNDS(2); + CHECK_BOUNDS(2) if (all_in) { for (i = 0; i < 3; ++i) { @@ -945,17 +945,17 @@ int vp8_hex_search(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, this_offset = base_offset + (this_mv.as_mv.row * (in_what_stride)) + this_mv.as_mv.col; thissad = vfp->sdf(what, what_stride, this_offset, in_what_stride); - CHECK_BETTER; + CHECK_BETTER } } else { for (i = 0; i < 3; ++i) { this_mv.as_mv.row = br + next_chkpts[k][i].row; this_mv.as_mv.col = bc + next_chkpts[k][i].col; - CHECK_POINT; + CHECK_POINT this_offset = base_offset + (this_mv.as_mv.row * (in_what_stride)) + this_mv.as_mv.col; thissad = vfp->sdf(what, what_stride, this_offset, in_what_stride); - CHECK_BETTER; + CHECK_BETTER } } @@ -977,7 +977,7 @@ int vp8_hex_search(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv, cal_neighbors: for (j = 0; j < dia_range; ++j) { best_site = -1; - CHECK_BOUNDS(1); + CHECK_BOUNDS(1) if (all_in) { for (i = 0; i < 4; ++i) { @@ -986,17 +986,17 @@ cal_neighbors: this_offset = base_offset + (this_mv.as_mv.row * (in_what_stride)) + this_mv.as_mv.col; thissad = vfp->sdf(what, what_stride, this_offset, in_what_stride); - CHECK_BETTER; + CHECK_BETTER } } else { for (i = 0; i < 4; ++i) { this_mv.as_mv.row = br + neighbors[i].row; this_mv.as_mv.col = bc + neighbors[i].col; - CHECK_POINT; + CHECK_POINT this_offset = base_offset + (this_mv.as_mv.row * (in_what_stride)) + this_mv.as_mv.col; thissad = vfp->sdf(what, what_stride, this_offset, in_what_stride); - CHECK_BETTER; + CHECK_BETTER } } diff --git a/vp8/encoder/mips/msa/dct_msa.c b/vp8/encoder/mips/msa/dct_msa.c index fe281d2d0..308466755 100644 --- a/vp8/encoder/mips/msa/dct_msa.c +++ b/vp8/encoder/mips/msa/dct_msa.c @@ -12,7 +12,7 @@ #include "vp8/common/mips/msa/vp8_macros_msa.h" #define TRANSPOSE4x4_H(in0, in1, in2, in3, out0, out1, out2, out3) \ - do { \ + { \ v8i16 s0_m, s1_m, tp0_m, tp1_m, tp2_m, tp3_m; \ \ ILVR_H2_SH(in2, in0, in3, in1, s0_m, s1_m); \ @@ -21,15 +21,15 @@ ILVRL_H2_SH(s1_m, s0_m, tp2_m, tp3_m); \ PCKEV_D2_SH(tp2_m, tp0_m, tp3_m, tp1_m, out0, out2); \ PCKOD_D2_SH(tp2_m, tp0_m, tp3_m, tp1_m, out1, out3); \ - } while (0) + } #define SET_DOTP_VALUES(coeff, val0, val1, val2, const1, const2) \ - do { \ + { \ v8i16 tmp0_m; \ \ SPLATI_H3_SH(coeff, val0, val1, val2, tmp0_m, const1, const2); \ ILVEV_H2_SH(tmp0_m, const1, const2, tmp0_m, const1, const2); \ - } while (0) + } #define RET_1_IF_NZERO_H(in0) \ ({ \ diff --git a/vp8/encoder/mips/msa/temporal_filter_msa.c b/vp8/encoder/mips/msa/temporal_filter_msa.c index cc6bab5d5..fb83f07bd 100644 --- a/vp8/encoder/mips/msa/temporal_filter_msa.c +++ b/vp8/encoder/mips/msa/temporal_filter_msa.c @@ -62,7 +62,7 @@ static void temporal_filter_apply_16size_msa( mod3_w = diff1_l & mod3_w; MUL4(mod0_w, filter_wt, mod1_w, filter_wt, mod2_w, filter_wt, mod3_w, filter_wt, mod0_w, mod1_w, mod2_w, mod3_w); - PCKEV_H2_SH(mod1_w, mod0_w, mod3_w, mod2_w, mod0_h, mod1_h); + PCKEV_H2_SH(mod1_w, mod0_w, mod3_w, mod2_w, mod0_h, mod1_h) ADD2(mod0_h, cnt0, mod1_h, cnt1, mod0_h, mod1_h); ST_SH2(mod0_h, mod1_h, cnt, 8); cnt += 16; |