intrapred,smooth_predictor: rm unnecessary saturation with the current max weight (255) the accumulation and rounding value (128/256) cannot exceed the range enforced by the descale (8/9). BUG=aomedia:1538 Change-Id: Iab258841f050d1bb8821532303ad2406e2604616
diff --git a/aom_dsp/intrapred.c b/aom_dsp/intrapred.c index aed2a3c..176884d 100644 --- a/aom_dsp/intrapred.c +++ b/aom_dsp/intrapred.c
@@ -110,7 +110,7 @@ for (i = 0; i < 4; ++i) { this_pred += weights[i] * pixels[i]; } - dst[c] = clip_pixel(divide_round(this_pred, log2_scale)); + dst[c] = divide_round(this_pred, log2_scale); } dst += stride; } @@ -139,7 +139,7 @@ for (i = 0; i < 2; ++i) { this_pred += weights[i] * pixels[i]; } - dst[c] = clip_pixel(divide_round(this_pred, log2_scale)); + dst[c] = divide_round(this_pred, log2_scale); } dst += stride; } @@ -168,7 +168,7 @@ for (i = 0; i < 2; ++i) { this_pred += weights[i] * pixels[i]; } - dst[c] = clip_pixel(divide_round(this_pred, log2_scale)); + dst[c] = divide_round(this_pred, log2_scale); } dst += stride; } @@ -406,6 +406,7 @@ int bw, int bh, const uint16_t *above, const uint16_t *left, int bd) { + (void)bd; const uint16_t below_pred = left[bh - 1]; // estimated by bottom-left pixel const uint16_t right_pred = above[bw - 1]; // estimated by top-right pixel const uint8_t *const sm_weights_w = sm_weight_arrays + bw; @@ -428,7 +429,7 @@ for (i = 0; i < 4; ++i) { this_pred += weights[i] * pixels[i]; } - dst[c] = clip_pixel_highbd(divide_round(this_pred, log2_scale), bd); + dst[c] = divide_round(this_pred, log2_scale); } dst += stride; } @@ -438,6 +439,7 @@ int bw, int bh, const uint16_t *above, const uint16_t *left, int bd) { + (void)bd; const uint16_t below_pred = left[bh - 1]; // estimated by bottom-left pixel const uint8_t *const sm_weights = sm_weight_arrays + bh; // scale = 2^sm_weight_log2_scale @@ -458,7 +460,7 @@ for (i = 0; i < 2; ++i) { this_pred += weights[i] * pixels[i]; } - dst[c] = clip_pixel_highbd(divide_round(this_pred, log2_scale), bd); + dst[c] = divide_round(this_pred, log2_scale); } dst += stride; } @@ -468,6 +470,7 @@ int bw, int bh, const uint16_t *above, const uint16_t *left, int bd) { + (void)bd; const uint16_t right_pred = above[bw - 1]; // estimated by top-right pixel const uint8_t *const sm_weights = sm_weight_arrays + bw; // scale = 2^sm_weight_log2_scale @@ -488,7 +491,7 @@ for (i = 0; i < 2; ++i) { this_pred += weights[i] * pixels[i]; } - dst[c] = clip_pixel_highbd(divide_round(this_pred, log2_scale), bd); + dst[c] = divide_round(this_pred, log2_scale); } dst += stride; }