diff options
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_temporal_filter.c | 24 | ||||
-rw-r--r-- | vp9/encoder/x86/temporal_filter_sse4.c | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/vp9/encoder/vp9_temporal_filter.c b/vp9/encoder/vp9_temporal_filter.c index 99a03edf3..627a1c7b5 100644 --- a/vp9/encoder/vp9_temporal_filter.c +++ b/vp9/encoder/vp9_temporal_filter.c @@ -103,7 +103,7 @@ void vp9_temporal_filter_apply_c(const uint8_t *frame1, unsigned int stride, unsigned int i, j, k; int modifier; int byte = 0; - const int rounding = strength > 0 ? 1 << (strength - 1) : 0; + const int rounding = (1 << strength) >> 1; assert(strength >= 0); assert(strength <= 6); @@ -435,17 +435,17 @@ void vp9_temporal_filter_iterate_row_c(VP9_COMP *cpi, ThreadData *td, } #else // Apply the filter (YUV) - vp9_temporal_filter_apply(f->y_buffer + mb_y_offset, f->y_stride, - predictor, 16, 16, strength, filter_weight, - accumulator, count); - vp9_temporal_filter_apply(f->u_buffer + mb_uv_offset, f->uv_stride, - predictor + 256, mb_uv_width, mb_uv_height, - strength, filter_weight, accumulator + 256, - count + 256); - vp9_temporal_filter_apply(f->v_buffer + mb_uv_offset, f->uv_stride, - predictor + 512, mb_uv_width, mb_uv_height, - strength, filter_weight, accumulator + 512, - count + 512); + vp9_temporal_filter_apply_c(f->y_buffer + mb_y_offset, f->y_stride, + predictor, 16, 16, strength, filter_weight, + accumulator, count); + vp9_temporal_filter_apply_c(f->u_buffer + mb_uv_offset, f->uv_stride, + predictor + 256, mb_uv_width, mb_uv_height, + strength, filter_weight, accumulator + 256, + count + 256); + vp9_temporal_filter_apply_c(f->v_buffer + mb_uv_offset, f->uv_stride, + predictor + 512, mb_uv_width, mb_uv_height, + strength, filter_weight, accumulator + 512, + count + 512); #endif // CONFIG_VP9_HIGHBITDEPTH } } diff --git a/vp9/encoder/x86/temporal_filter_sse4.c b/vp9/encoder/x86/temporal_filter_sse4.c index 460dab659..e5860d39c 100644 --- a/vp9/encoder/x86/temporal_filter_sse4.c +++ b/vp9/encoder/x86/temporal_filter_sse4.c @@ -241,7 +241,7 @@ void vp9_temporal_filter_apply_sse4_1(const uint8_t *a, unsigned int stride, int weight, uint32_t *accumulator, uint16_t *count) { unsigned int h; - const int rounding = strength > 0 ? 1 << (strength - 1) : 0; + const int rounding = (1 << strength) >> 1; assert(strength >= 0); assert(strength <= 6); |