summaryrefslogtreecommitdiff
path: root/vp8/encoder
diff options
context:
space:
mode:
authorDeb Mukherjee <debargha@google.com>2012-08-08 16:49:15 -0700
committerDeb Mukherjee <debargha@google.com>2012-08-08 16:57:43 -0700
commit7d0656537b5739f06b923d471c39c3a0b249e76c (patch)
tree296b2b1721666a683815217a34668d5f6c38cb7d /vp8/encoder
parentb04e87c6abd33faf688d68611429dc155c4bff0f (diff)
downloadlibvpx-7d0656537b5739f06b923d471c39c3a0b249e76c.tar
libvpx-7d0656537b5739f06b923d471c39c3a0b249e76c.tar.gz
libvpx-7d0656537b5739f06b923d471c39c3a0b249e76c.tar.bz2
libvpx-7d0656537b5739f06b923d471c39c3a0b249e76c.zip
Merging in the sixteenth subpel uv experiment
Merges this experiment in to make it easier to run tests on filter precision, vectorized implementation etc. Also removes an experimental filter. Change-Id: I1e8706bb6d4fc469815123939e9c6e0b5ae945cd
Diffstat (limited to 'vp8/encoder')
-rw-r--r--vp8/encoder/arm/variance_arm.c4
-rw-r--r--vp8/encoder/mcomp.c12
-rw-r--r--vp8/encoder/rdopt.c7
-rw-r--r--vp8/encoder/temporal_filter.c14
-rw-r--r--vp8/encoder/variance_c.c15
-rw-r--r--vp8/encoder/x86/variance_impl_sse2.asm12
-rw-r--r--vp8/encoder/x86/variance_impl_ssse3.asm12
-rw-r--r--vp8/encoder/x86/variance_mmx.c28
-rw-r--r--vp8/encoder/x86/variance_sse2.c8
-rw-r--r--vp8/encoder/x86/variance_ssse3.c4
10 files changed, 0 insertions, 116 deletions
diff --git a/vp8/encoder/arm/variance_arm.c b/vp8/encoder/arm/variance_arm.c
index b268f3e19..e11d7bbb3 100644
--- a/vp8/encoder/arm/variance_arm.c
+++ b/vp8/encoder/arm/variance_arm.c
@@ -13,11 +13,7 @@
#include "vp8/common/filter.h"
#include "vp8/common/arm/bilinearfilter_arm.h"
-#if CONFIG_SIXTEENTH_SUBPEL_UV
#define HALFNDX 8
-#else
-#define HALFNDX 4
-#endif
#if HAVE_ARMV6
diff --git a/vp8/encoder/mcomp.c b/vp8/encoder/mcomp.c
index 5a105595a..585008002 100644
--- a/vp8/encoder/mcomp.c
+++ b/vp8/encoder/mcomp.c
@@ -205,22 +205,14 @@ void vp8_init3smotion_compensation(MACROBLOCK *x, int stride) {
*/
#define PRE(r,c) (y + (((r)>>2) * y_stride + ((c)>>2) -(offset))) // pointer to predictor base of a motionvector
-#if CONFIG_SIXTEENTH_SUBPEL_UV
#define SP(x) (((x)&3)<<2) // convert motion vector component to offset for svf calc
-#else
-#define SP(x) (((x)&3)<<1) // convert motion vector component to offset for svf calc
-#endif /* CONFIG_SIXTEENTH_SUBPEL_UV */
#define MVC(r,c) (mvcost ? ((mvcost[0][(r)-rr] + mvcost[1][(c)-rc]) * error_per_bit + 128 )>>8 : 0) // estimated cost of a motion vector (r,c)
#define DIST(r,c) vfp->svf( PRE(r,c), y_stride, SP(c),SP(r), z,b->src_stride,&sse) // returns subpixel variance error function.
#define ERR(r,c) (MVC(r,c)+DIST(r,c)) // returns distortion + motion vector cost
#define IFMVCV(r,c,s,e) if ( c >= minc && c <= maxc && r >= minr && r <= maxr) s else e;
#define PREHP(r,c) (y + (((r)>>3) * y_stride + ((c)>>3) -(offset))) // pointer to predictor base of a motionvector
-#if CONFIG_SIXTEENTH_SUBPEL_UV
#define SPHP(x) (((x)&7)<<1) // convert motion vector component to offset for svf calc
-#else /* CONFIG_SIXTEENTH_SUBPEL_UV */
-#define SPHP(x) ((x)&7) // convert motion vector component to offset for svf calc
-#endif /* CONFIG_SIXTEENTH_SUBPEL_UV */
#define DISTHP(r,c) vfp->svf( PREHP(r,c), y_stride, SPHP(c),SPHP(r), z,b->src_stride,&sse) // returns subpixel variance error function.
#define ERRHP(r,c) (MVC(r,c)+DISTHP(r,c)) // returns distortion + motion vector cost
#define CHECK_BETTER(v,r,c) IFMVCV(r,c,{thismse = ((xd->allow_high_precision_mv)?DISTHP(r,c):DIST(r,c)); if((v = (MVC(r,c)+thismse)) < besterr) { besterr = v; br=r; bc=c; *distortion = thismse; *sse1 = sse; }}, v=INT_MAX;)// checks if (r,c) has better score than previous best
@@ -444,11 +436,7 @@ int vp8_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
#undef DISTHP
#undef ERRHP
-#if CONFIG_SIXTEENTH_SUBPEL_UV
#define SP(x) (((x)&7)<<1) // convert motion vector component to offset for svf calc
-#else
-#define SP(x) ((x)&7) // convert motion vector component to offset for svf calc
-#endif /* CONFIG_SIXTEENTH_SUBPEL_UV */
int vp8_find_best_sub_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int_mv *bestmv, int_mv *ref_mv,
int error_per_bit,
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c
index 1a325161d..878d34476 100644
--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -518,17 +518,10 @@ int VP8_UVSSE(MACROBLOCK *x, const vp8_variance_rtcd_vtable_t *rtcd) {
vptr = x->e_mbd.pre.v_buffer + offset;
if ((mv_row | mv_col) & 7) {
-#if CONFIG_SIXTEENTH_SUBPEL_UV
VARIANCE_INVOKE(rtcd, subpixvar8x8)(uptr, pre_stride,
(mv_col & 7) << 1, (mv_row & 7) << 1, upred_ptr, uv_stride, &sse2);
VARIANCE_INVOKE(rtcd, subpixvar8x8)(vptr, pre_stride,
(mv_col & 7) << 1, (mv_row & 7) << 1, vpred_ptr, uv_stride, &sse1);
-#else
- VARIANCE_INVOKE(rtcd, subpixvar8x8)(uptr, pre_stride,
- mv_col & 7, mv_row & 7, upred_ptr, uv_stride, &sse2);
- VARIANCE_INVOKE(rtcd, subpixvar8x8)(vptr, pre_stride,
- mv_col & 7, mv_row & 7, vpred_ptr, uv_stride, &sse1);
-#endif
sse2 += sse1;
} else {
VARIANCE_INVOKE(rtcd, var8x8)(uptr, pre_stride,
diff --git a/vp8/encoder/temporal_filter.c b/vp8/encoder/temporal_filter.c
index 964f4c856..0e86a0ca4 100644
--- a/vp8/encoder/temporal_filter.c
+++ b/vp8/encoder/temporal_filter.c
@@ -56,13 +56,8 @@ static void vp8_temporal_filter_predictors_mb_c
yptr = y_mb_ptr + (mv_row >> 3) * stride + (mv_col >> 3);
if ((mv_row | mv_col) & 7) {
-#if CONFIG_SIXTEENTH_SUBPEL_UV
x->subpixel_predict16x16(yptr, stride,
(mv_col & 7) << 1, (mv_row & 7) << 1, &pred[0], 16);
-#else
- x->subpixel_predict16x16(yptr, stride,
- mv_col & 7, mv_row & 7, &pred[0], 16);
-#endif
} else {
RECON_INVOKE(&x->rtcd->recon, copy16x16)(yptr, stride, &pred[0], 16);
}
@@ -77,21 +72,12 @@ static void vp8_temporal_filter_predictors_mb_c
uptr = u_mb_ptr + offset;
vptr = v_mb_ptr + offset;
-#if CONFIG_SIXTEENTH_SUBPEL_UV
if ((omv_row | omv_col) & 15) {
x->subpixel_predict8x8(uptr, stride,
(omv_col & 15), (omv_row & 15), &pred[256], 8);
x->subpixel_predict8x8(vptr, stride,
(omv_col & 15), (omv_row & 15), &pred[320], 8);
}
-#else
- if ((mv_row | mv_col) & 7) {
- x->subpixel_predict8x8(uptr, stride,
- mv_col & 7, mv_row & 7, &pred[256], 8);
- x->subpixel_predict8x8(vptr, stride,
- mv_col & 7, mv_row & 7, &pred[320], 8);
- }
-#endif
else {
RECON_INVOKE(&x->rtcd->recon, copy8x8)(uptr, stride, &pred[256], 8);
RECON_INVOKE(&x->rtcd->recon, copy8x8)(vptr, stride, &pred[320], 8);
diff --git a/vp8/encoder/variance_c.c b/vp8/encoder/variance_c.c
index 9444ed87d..0b9d569b0 100644
--- a/vp8/encoder/variance_c.c
+++ b/vp8/encoder/variance_c.c
@@ -341,13 +341,8 @@ unsigned int vp8_variance_halfpixvar16x16_h_c(
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse) {
-#if CONFIG_SIXTEENTH_SUBPEL_UV
return vp8_sub_pixel_variance16x16_c(src_ptr, source_stride, 8, 0,
ref_ptr, recon_stride, sse);
-#else
- return vp8_sub_pixel_variance16x16_c(src_ptr, source_stride, 4, 0,
- ref_ptr, recon_stride, sse);
-#endif
}
@@ -357,13 +352,8 @@ unsigned int vp8_variance_halfpixvar16x16_v_c(
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse) {
-#if CONFIG_SIXTEENTH_SUBPEL_UV
return vp8_sub_pixel_variance16x16_c(src_ptr, source_stride, 0, 8,
ref_ptr, recon_stride, sse);
-#else
- return vp8_sub_pixel_variance16x16_c(src_ptr, source_stride, 0, 4,
- ref_ptr, recon_stride, sse);
-#endif
}
@@ -373,13 +363,8 @@ unsigned int vp8_variance_halfpixvar16x16_hv_c(
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse) {
-#if CONFIG_SIXTEENTH_SUBPEL_UV
return vp8_sub_pixel_variance16x16_c(src_ptr, source_stride, 8, 8,
ref_ptr, recon_stride, sse);
-#else
- return vp8_sub_pixel_variance16x16_c(src_ptr, source_stride, 4, 4,
- ref_ptr, recon_stride, sse);
-#endif
}
diff --git a/vp8/encoder/x86/variance_impl_sse2.asm b/vp8/encoder/x86/variance_impl_sse2.asm
index b13beee6e..823c2f7bf 100644
--- a/vp8/encoder/x86/variance_impl_sse2.asm
+++ b/vp8/encoder/x86/variance_impl_sse2.asm
@@ -1348,7 +1348,6 @@ align 16
xmm_bi_rd:
times 8 dw 64
align 16
-%if CONFIG_SIXTEENTH_SUBPEL_UV
vp8_bilinear_filters_sse2:
dw 128, 128, 128, 128, 128, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0
dw 120, 120, 120, 120, 120, 120, 120, 120, 8, 8, 8, 8, 8, 8, 8, 8
@@ -1366,14 +1365,3 @@ vp8_bilinear_filters_sse2:
dw 24, 24, 24, 24, 24, 24, 24, 24, 104, 104, 104, 104, 104, 104, 104, 104
dw 16, 16, 16, 16, 16, 16, 16, 16, 112, 112, 112, 112, 112, 112, 112, 112
dw 8, 8, 8, 8, 8, 8, 8, 8, 120, 120, 120, 120, 120, 120, 120, 120
-%else
-vp8_bilinear_filters_sse2:
- dw 128, 128, 128, 128, 128, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0
- dw 112, 112, 112, 112, 112, 112, 112, 112, 16, 16, 16, 16, 16, 16, 16, 16
- dw 96, 96, 96, 96, 96, 96, 96, 96, 32, 32, 32, 32, 32, 32, 32, 32
- dw 80, 80, 80, 80, 80, 80, 80, 80, 48, 48, 48, 48, 48, 48, 48, 48
- dw 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
- dw 48, 48, 48, 48, 48, 48, 48, 48, 80, 80, 80, 80, 80, 80, 80, 80
- dw 32, 32, 32, 32, 32, 32, 32, 32, 96, 96, 96, 96, 96, 96, 96, 96
- dw 16, 16, 16, 16, 16, 16, 16, 16, 112, 112, 112, 112, 112, 112, 112, 112
-%endif
diff --git a/vp8/encoder/x86/variance_impl_ssse3.asm b/vp8/encoder/x86/variance_impl_ssse3.asm
index d60d53daa..33ba51a91 100644
--- a/vp8/encoder/x86/variance_impl_ssse3.asm
+++ b/vp8/encoder/x86/variance_impl_ssse3.asm
@@ -353,7 +353,6 @@ align 16
xmm_bi_rd:
times 8 dw 64
align 16
-%if CONFIG_SIXTEENTH_SUBPEL_UV
vp8_bilinear_filters_ssse3:
times 8 db 128, 0
times 8 db 120, 8
@@ -371,14 +370,3 @@ vp8_bilinear_filters_ssse3:
times 8 db 24, 104
times 8 db 16, 112
times 8 db 8, 120
-%else
-vp8_bilinear_filters_ssse3:
- times 8 db 128, 0
- times 8 db 112, 16
- times 8 db 96, 32
- times 8 db 80, 48
- times 8 db 64, 64
- times 8 db 48, 80
- times 8 db 32, 96
- times 8 db 16, 112
-%endif
diff --git a/vp8/encoder/x86/variance_mmx.c b/vp8/encoder/x86/variance_mmx.c
index 19264489d..7e63acf9b 100644
--- a/vp8/encoder/x86/variance_mmx.c
+++ b/vp8/encoder/x86/variance_mmx.c
@@ -198,7 +198,6 @@ unsigned int vp8_variance8x16_mmx(
// the mmx function that does the bilinear filtering and var calculation //
// int one pass //
///////////////////////////////////////////////////////////////////////////
-#if CONFIG_SIXTEENTH_SUBPEL_UV
DECLARE_ALIGNED(16, const short, vp8_vp7_bilinear_filters_mmx[16][8]) = {
{ 128, 128, 128, 128, 0, 0, 0, 0 },
{ 120, 120, 120, 120, 8, 8, 8, 8 },
@@ -217,18 +216,6 @@ DECLARE_ALIGNED(16, const short, vp8_vp7_bilinear_filters_mmx[16][8]) = {
{ 16, 16, 16, 16, 112, 112, 112, 112 },
{ 8, 8, 8, 8, 120, 120, 120, 120 }
};
-#else
-DECLARE_ALIGNED(16, const short, vp8_vp7_bilinear_filters_mmx[8][8]) = {
- { 128, 128, 128, 128, 0, 0, 0, 0 },
- { 112, 112, 112, 112, 16, 16, 16, 16 },
- { 96, 96, 96, 96, 32, 32, 32, 32 },
- { 80, 80, 80, 80, 48, 48, 48, 48 },
- { 64, 64, 64, 64, 64, 64, 64, 64 },
- { 48, 48, 48, 48, 80, 80, 80, 80 },
- { 32, 32, 32, 32, 96, 96, 96, 96 },
- { 16, 16, 16, 16, 112, 112, 112, 112 }
-};
-#endif
unsigned int vp8_sub_pixel_variance4x4_mmx
(
@@ -392,13 +379,8 @@ unsigned int vp8_variance_halfpixvar16x16_h_mmx(
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse) {
-#if CONFIG_SIXTEENTH_SUBPEL_UV
return vp8_sub_pixel_variance16x16_mmx(src_ptr, source_stride, 8, 0,
ref_ptr, recon_stride, sse);
-#else
- return vp8_sub_pixel_variance16x16_mmx(src_ptr, source_stride, 4, 0,
- ref_ptr, recon_stride, sse);
-#endif
}
@@ -408,13 +390,8 @@ unsigned int vp8_variance_halfpixvar16x16_v_mmx(
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse) {
-#if CONFIG_SIXTEENTH_SUBPEL_UV
return vp8_sub_pixel_variance16x16_mmx(src_ptr, source_stride, 0, 8,
ref_ptr, recon_stride, sse);
-#else
- return vp8_sub_pixel_variance16x16_mmx(src_ptr, source_stride, 0, 4,
- ref_ptr, recon_stride, sse);
-#endif
}
@@ -424,11 +401,6 @@ unsigned int vp8_variance_halfpixvar16x16_hv_mmx(
const unsigned char *ref_ptr,
int recon_stride,
unsigned int *sse) {
-#if CONFIG_SIXTEENTH_SUBPEL_UV
return vp8_sub_pixel_variance16x16_mmx(src_ptr, source_stride, 8, 8,
ref_ptr, recon_stride, sse);
-#else
- return vp8_sub_pixel_variance16x16_mmx(src_ptr, source_stride, 4, 4,
- ref_ptr, recon_stride, sse);
-#endif
}
diff --git a/vp8/encoder/x86/variance_sse2.c b/vp8/encoder/x86/variance_sse2.c
index 0d6b2372e..6dbc70b80 100644
--- a/vp8/encoder/x86/variance_sse2.c
+++ b/vp8/encoder/x86/variance_sse2.c
@@ -13,11 +13,7 @@
#include "vp8/common/pragmas.h"
#include "vpx_ports/mem.h"
-#if CONFIG_SIXTEENTH_SUBPEL_UV
#define HALFNDX 8
-#else
-#define HALFNDX 4
-#endif
extern void filter_block1d_h6_mmx(const unsigned char *src_ptr, unsigned short *output_ptr, unsigned int src_pixels_per_line, unsigned int pixel_step, unsigned int output_height, unsigned int output_width, short *vp7_filter);
extern void filter_block1d_v6_mmx(const short *src_ptr, unsigned char *output_ptr, unsigned int pixels_per_line, unsigned int pixel_step, unsigned int output_height, unsigned int output_width, short *vp7_filter);
@@ -141,11 +137,7 @@ void vp8_half_vert_variance16x_h_sse2
unsigned int *sumsquared
);
-#if CONFIG_SIXTEENTH_SUBPEL_UV
DECLARE_ALIGNED(16, extern short, vp8_vp7_bilinear_filters_mmx[16][8]);
-#else
-DECLARE_ALIGNED(16, extern short, vp8_vp7_bilinear_filters_mmx[8][8]);
-#endif
unsigned int vp8_variance4x4_wmt(
const unsigned char *src_ptr,
diff --git a/vp8/encoder/x86/variance_ssse3.c b/vp8/encoder/x86/variance_ssse3.c
index fc3b313f6..2e85017f1 100644
--- a/vp8/encoder/x86/variance_ssse3.c
+++ b/vp8/encoder/x86/variance_ssse3.c
@@ -13,11 +13,7 @@
#include "vp8/common/pragmas.h"
#include "vpx_ports/mem.h"
-#if CONFIG_SIXTEENTH_SUBPEL_UV
#define HALFNDX 8
-#else
-#define HALFNDX 4
-#endif
extern unsigned int vp8_get16x16var_sse2
(