summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2018-08-16 16:53:30 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-08-16 16:53:30 +0000
commit8839cffe2ddce58faeb4f624dcc9584bcfa4019b (patch)
treee24ff12676a2405f1cfe93528b12c82f02d6d022 /vp9
parent6c62530c666fc0bcf4385a35a7c49e44c9f38cf5 (diff)
parent80d1063c7b3f3e2358916b5e5e5adcd82663c25a (diff)
downloadlibvpx-8839cffe2ddce58faeb4f624dcc9584bcfa4019b.tar
libvpx-8839cffe2ddce58faeb4f624dcc9584bcfa4019b.tar.gz
libvpx-8839cffe2ddce58faeb4f624dcc9584bcfa4019b.tar.bz2
libvpx-8839cffe2ddce58faeb4f624dcc9584bcfa4019b.zip
Merge changes I6ab0ece8,I5f878e9b
* changes: Temporarily revert to vp9_temporal_filter_apply_c Simplify temporal filter strength calculation
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_temporal_filter.c24
-rw-r--r--vp9/encoder/x86/temporal_filter_sse4.c2
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);