summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_scale.c
diff options
context:
space:
mode:
authorZoe Liu <zoeliu@google.com>2015-07-22 10:40:42 -0700
committerZoe Liu <zoeliu@google.com>2015-07-31 10:27:33 -0700
commit7186a2dd863028faa54d2e5fc7995693488af63c (patch)
tree62139af4f8934023aaa441b757107af434408812 /vp9/common/vp9_scale.c
parent0e3f494b217bde5e1d47107cdfbb044e4d801cec (diff)
downloadlibvpx-7186a2dd863028faa54d2e5fc7995693488af63c.tar
libvpx-7186a2dd863028faa54d2e5fc7995693488af63c.tar.gz
libvpx-7186a2dd863028faa54d2e5fc7995693488af63c.tar.bz2
libvpx-7186a2dd863028faa54d2e5fc7995693488af63c.zip
Code refactor on InterpKernel
It in essence refactors the code for both the interpolation filtering and the convolution. This change includes the moving of all the files as well as the changing of the code from vp9_ prefix to vpx_ prefix accordingly, for underneath architectures: (1) x86; (2) arm/neon; and (3) mips/msa. The work on mips/drsp2 will be done in a separate change list. Change-Id: Ic3ce7fb7f81210db7628b373c73553db68793c46
Diffstat (limited to 'vp9/common/vp9_scale.c')
-rw-r--r--vp9/common/vp9_scale.c107
1 files changed, 54 insertions, 53 deletions
diff --git a/vp9/common/vp9_scale.c b/vp9/common/vp9_scale.c
index 6db8f9caa..8f5c72e7c 100644
--- a/vp9/common/vp9_scale.c
+++ b/vp9/common/vp9_scale.c
@@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "./vp9_rtcd.h"
+#include "./vpx_dsp_rtcd.h"
#include "vp9/common/vp9_filter.h"
#include "vp9/common/vp9_scale.h"
+#include "vpx_dsp/vpx_filter.h"
static INLINE int scaled_x(int val, const struct scale_factors *sf) {
return (int)((int64_t)val * sf->x_scale_fp >> REF_SCALE_SHIFT);
@@ -81,85 +82,85 @@ void vp9_setup_scale_factors_for_frame(struct scale_factors *sf,
if (sf->x_step_q4 == 16) {
if (sf->y_step_q4 == 16) {
// No scaling in either direction.
- sf->predict[0][0][0] = vp9_convolve_copy;
- sf->predict[0][0][1] = vp9_convolve_avg;
- sf->predict[0][1][0] = vp9_convolve8_vert;
- sf->predict[0][1][1] = vp9_convolve8_avg_vert;
- sf->predict[1][0][0] = vp9_convolve8_horiz;
- sf->predict[1][0][1] = vp9_convolve8_avg_horiz;
+ sf->predict[0][0][0] = vpx_convolve_copy;
+ sf->predict[0][0][1] = vpx_convolve_avg;
+ sf->predict[0][1][0] = vpx_convolve8_vert;
+ sf->predict[0][1][1] = vpx_convolve8_avg_vert;
+ sf->predict[1][0][0] = vpx_convolve8_horiz;
+ sf->predict[1][0][1] = vpx_convolve8_avg_horiz;
} else {
// No scaling in x direction. Must always scale in the y direction.
- sf->predict[0][0][0] = vp9_convolve8_vert;
- sf->predict[0][0][1] = vp9_convolve8_avg_vert;
- sf->predict[0][1][0] = vp9_convolve8_vert;
- sf->predict[0][1][1] = vp9_convolve8_avg_vert;
- sf->predict[1][0][0] = vp9_convolve8;
- sf->predict[1][0][1] = vp9_convolve8_avg;
+ sf->predict[0][0][0] = vpx_convolve8_vert;
+ sf->predict[0][0][1] = vpx_convolve8_avg_vert;
+ sf->predict[0][1][0] = vpx_convolve8_vert;
+ sf->predict[0][1][1] = vpx_convolve8_avg_vert;
+ sf->predict[1][0][0] = vpx_convolve8;
+ sf->predict[1][0][1] = vpx_convolve8_avg;
}
} else {
if (sf->y_step_q4 == 16) {
// No scaling in the y direction. Must always scale in the x direction.
- sf->predict[0][0][0] = vp9_convolve8_horiz;
- sf->predict[0][0][1] = vp9_convolve8_avg_horiz;
- sf->predict[0][1][0] = vp9_convolve8;
- sf->predict[0][1][1] = vp9_convolve8_avg;
- sf->predict[1][0][0] = vp9_convolve8_horiz;
- sf->predict[1][0][1] = vp9_convolve8_avg_horiz;
+ sf->predict[0][0][0] = vpx_convolve8_horiz;
+ sf->predict[0][0][1] = vpx_convolve8_avg_horiz;
+ sf->predict[0][1][0] = vpx_convolve8;
+ sf->predict[0][1][1] = vpx_convolve8_avg;
+ sf->predict[1][0][0] = vpx_convolve8_horiz;
+ sf->predict[1][0][1] = vpx_convolve8_avg_horiz;
} else {
// Must always scale in both directions.
- sf->predict[0][0][0] = vp9_convolve8;
- sf->predict[0][0][1] = vp9_convolve8_avg;
- sf->predict[0][1][0] = vp9_convolve8;
- sf->predict[0][1][1] = vp9_convolve8_avg;
- sf->predict[1][0][0] = vp9_convolve8;
- sf->predict[1][0][1] = vp9_convolve8_avg;
+ sf->predict[0][0][0] = vpx_convolve8;
+ sf->predict[0][0][1] = vpx_convolve8_avg;
+ sf->predict[0][1][0] = vpx_convolve8;
+ sf->predict[0][1][1] = vpx_convolve8_avg;
+ sf->predict[1][0][0] = vpx_convolve8;
+ sf->predict[1][0][1] = vpx_convolve8_avg;
}
}
// 2D subpel motion always gets filtered in both directions
- sf->predict[1][1][0] = vp9_convolve8;
- sf->predict[1][1][1] = vp9_convolve8_avg;
+ sf->predict[1][1][0] = vpx_convolve8;
+ sf->predict[1][1][1] = vpx_convolve8_avg;
#if CONFIG_VP9_HIGHBITDEPTH
if (use_highbd) {
if (sf->x_step_q4 == 16) {
if (sf->y_step_q4 == 16) {
// No scaling in either direction.
- sf->highbd_predict[0][0][0] = vp9_highbd_convolve_copy;
- sf->highbd_predict[0][0][1] = vp9_highbd_convolve_avg;
- sf->highbd_predict[0][1][0] = vp9_highbd_convolve8_vert;
- sf->highbd_predict[0][1][1] = vp9_highbd_convolve8_avg_vert;
- sf->highbd_predict[1][0][0] = vp9_highbd_convolve8_horiz;
- sf->highbd_predict[1][0][1] = vp9_highbd_convolve8_avg_horiz;
+ sf->highbd_predict[0][0][0] = vpx_highbd_convolve_copy;
+ sf->highbd_predict[0][0][1] = vpx_highbd_convolve_avg;
+ sf->highbd_predict[0][1][0] = vpx_highbd_convolve8_vert;
+ sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg_vert;
+ sf->highbd_predict[1][0][0] = vpx_highbd_convolve8_horiz;
+ sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg_horiz;
} else {
// No scaling in x direction. Must always scale in the y direction.
- sf->highbd_predict[0][0][0] = vp9_highbd_convolve8_vert;
- sf->highbd_predict[0][0][1] = vp9_highbd_convolve8_avg_vert;
- sf->highbd_predict[0][1][0] = vp9_highbd_convolve8_vert;
- sf->highbd_predict[0][1][1] = vp9_highbd_convolve8_avg_vert;
- sf->highbd_predict[1][0][0] = vp9_highbd_convolve8;
- sf->highbd_predict[1][0][1] = vp9_highbd_convolve8_avg;
+ sf->highbd_predict[0][0][0] = vpx_highbd_convolve8_vert;
+ sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg_vert;
+ sf->highbd_predict[0][1][0] = vpx_highbd_convolve8_vert;
+ sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg_vert;
+ sf->highbd_predict[1][0][0] = vpx_highbd_convolve8;
+ sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg;
}
} else {
if (sf->y_step_q4 == 16) {
// No scaling in the y direction. Must always scale in the x direction.
- sf->highbd_predict[0][0][0] = vp9_highbd_convolve8_horiz;
- sf->highbd_predict[0][0][1] = vp9_highbd_convolve8_avg_horiz;
- sf->highbd_predict[0][1][0] = vp9_highbd_convolve8;
- sf->highbd_predict[0][1][1] = vp9_highbd_convolve8_avg;
- sf->highbd_predict[1][0][0] = vp9_highbd_convolve8_horiz;
- sf->highbd_predict[1][0][1] = vp9_highbd_convolve8_avg_horiz;
+ sf->highbd_predict[0][0][0] = vpx_highbd_convolve8_horiz;
+ sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg_horiz;
+ sf->highbd_predict[0][1][0] = vpx_highbd_convolve8;
+ sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg;
+ sf->highbd_predict[1][0][0] = vpx_highbd_convolve8_horiz;
+ sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg_horiz;
} else {
// Must always scale in both directions.
- sf->highbd_predict[0][0][0] = vp9_highbd_convolve8;
- sf->highbd_predict[0][0][1] = vp9_highbd_convolve8_avg;
- sf->highbd_predict[0][1][0] = vp9_highbd_convolve8;
- sf->highbd_predict[0][1][1] = vp9_highbd_convolve8_avg;
- sf->highbd_predict[1][0][0] = vp9_highbd_convolve8;
- sf->highbd_predict[1][0][1] = vp9_highbd_convolve8_avg;
+ sf->highbd_predict[0][0][0] = vpx_highbd_convolve8;
+ sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg;
+ sf->highbd_predict[0][1][0] = vpx_highbd_convolve8;
+ sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg;
+ sf->highbd_predict[1][0][0] = vpx_highbd_convolve8;
+ sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg;
}
}
// 2D subpel motion always gets filtered in both directions.
- sf->highbd_predict[1][1][0] = vp9_highbd_convolve8;
- sf->highbd_predict[1][1][1] = vp9_highbd_convolve8_avg;
+ sf->highbd_predict[1][1][0] = vpx_highbd_convolve8;
+ sf->highbd_predict[1][1][1] = vpx_highbd_convolve8_avg;
}
#endif
}