summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_avg.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2015-03-30 12:31:46 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2015-03-30 15:43:31 -0700
commit26d3d3af6ace50ee20c474771a580e38f86c7864 (patch)
treee5efddaeb43107841dd63e0a0a3607533390728c /vp9/encoder/vp9_avg.c
parentb4b5af6acddfec0bf28a79f74afb15de3dee6f66 (diff)
downloadlibvpx-26d3d3af6ace50ee20c474771a580e38f86c7864.tar
libvpx-26d3d3af6ace50ee20c474771a580e38f86c7864.tar.gz
libvpx-26d3d3af6ace50ee20c474771a580e38f86c7864.tar.bz2
libvpx-26d3d3af6ace50ee20c474771a580e38f86c7864.zip
Enable 16x16 Hadamard transform in SATD based mode decision
This commit replaces the 16x16 2D-DCT transform with Hadamard transform for RTC coding mode. It reduces the CPU cycles cost on 16x16 transform by 5X. Overall it makes the speed -6 encoding speed 1.5% faster without compromise on compression performance. Change-Id: If6c993831dc4c678d841edc804ff395ed37f2a1b
Diffstat (limited to 'vp9/encoder/vp9_avg.c')
-rw-r--r--vp9/encoder/vp9_avg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_avg.c b/vp9/encoder/vp9_avg.c
index b5632a20d..58daa3ad4 100644
--- a/vp9/encoder/vp9_avg.c
+++ b/vp9/encoder/vp9_avg.c
@@ -78,8 +78,15 @@ void vp9_hadamard_8x8_c(int16_t const *src_diff, int src_stride,
}
// In place 16x16 2D Hadamard transform
-void vp9_hadamard_16x16_c(int16_t *coeff) {
+void vp9_hadamard_16x16_c(int16_t const *src_diff, int src_stride,
+ int16_t *coeff) {
int idx;
+ for (idx = 0; idx < 4; ++idx) {
+ int16_t const *src_ptr = src_diff + (idx >> 1) * 8 * src_stride
+ + (idx & 0x01) * 8;
+ vp9_hadamard_8x8_c(src_ptr, src_stride, coeff + idx * 64);
+ }
+
for (idx = 0; idx < 64; ++idx) {
int16_t a0 = coeff[0];
int16_t a1 = coeff[64];