Commit d6c67f02 authored by John Koleszar's avatar John Koleszar

make vp8_recon16x16mb{,y} RTCD functions

ARM NEON has a platform specific version of vp8_recon16x16mb, though
it's just a stub to extract the various parameters from the
MACROBLOCKD struct and pass them to vp8_recon16x16mb_neon(). Using
that function's prototype directly will be a better long term solution,
but it's quite an invasive change.

Change-Id: I04273149e2ade34749e2d09e7edb0c396e1dd620
parent 96cf6588
...@@ -105,6 +105,8 @@ void vp8_arch_arm_common_init(VP8_COMMON *ctx) ...@@ -105,6 +105,8 @@ void vp8_arch_arm_common_init(VP8_COMMON *ctx)
rtcd->recon.recon = vp8_recon_b_neon; rtcd->recon.recon = vp8_recon_b_neon;
rtcd->recon.recon2 = vp8_recon2b_neon; rtcd->recon.recon2 = vp8_recon2b_neon;
rtcd->recon.recon4 = vp8_recon4b_neon; rtcd->recon.recon4 = vp8_recon4b_neon;
rtcd->recon.recon_mb = vp8_recon_mb_neon;
} }
#endif #endif
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
extern void vp8_recon16x16mb_neon(unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int ystride, unsigned char *udst_ptr, unsigned char *vdst_ptr); extern void vp8_recon16x16mb_neon(unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int ystride, unsigned char *udst_ptr, unsigned char *vdst_ptr);
#if HAVE_ARMV7 void vp8_recon_mb_neon(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
void vp8_recon16x16mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
{ {
unsigned char *pred_ptr = &x->predictor[0]; unsigned char *pred_ptr = &x->predictor[0];
short *diff_ptr = &x->diff[0]; short *diff_ptr = &x->diff[0];
...@@ -28,4 +27,3 @@ void vp8_recon16x16mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) ...@@ -28,4 +27,3 @@ void vp8_recon16x16mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
vp8_recon16x16mb_neon(pred_ptr, diff_ptr, dst_ptr, ystride, udst_ptr, vdst_ptr); vp8_recon16x16mb_neon(pred_ptr, diff_ptr, dst_ptr, ystride, udst_ptr, vdst_ptr);
} }
#endif
...@@ -51,6 +51,8 @@ extern prototype_copy_block(vp8_copy_mem8x8_neon); ...@@ -51,6 +51,8 @@ extern prototype_copy_block(vp8_copy_mem8x8_neon);
extern prototype_copy_block(vp8_copy_mem8x4_neon); extern prototype_copy_block(vp8_copy_mem8x4_neon);
extern prototype_copy_block(vp8_copy_mem16x16_neon); extern prototype_copy_block(vp8_copy_mem16x16_neon);
extern prototype_recon_macroblock(vp8_recon_recon_mb_neon);
#if !CONFIG_RUNTIME_CPU_DETECT #if !CONFIG_RUNTIME_CPU_DETECT
#undef vp8_recon_recon #undef vp8_recon_recon
#define vp8_recon_recon vp8_recon_b_neon #define vp8_recon_recon vp8_recon_b_neon
...@@ -69,6 +71,9 @@ extern prototype_copy_block(vp8_copy_mem16x16_neon); ...@@ -69,6 +71,9 @@ extern prototype_copy_block(vp8_copy_mem16x16_neon);
#undef vp8_recon_copy16x16 #undef vp8_recon_copy16x16
#define vp8_recon_copy16x16 vp8_copy_mem16x16_neon #define vp8_recon_copy16x16 vp8_copy_mem16x16_neon
#undef vp8_recon_recon_mb
#define vp8_recon_recon_mb vp8_recon_mb_neon
#endif #endif
#endif #endif
......
...@@ -40,9 +40,11 @@ void vp8_machine_specific_config(VP8_COMMON *ctx) ...@@ -40,9 +40,11 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
rtcd->recon.copy16x16 = vp8_copy_mem16x16_c; rtcd->recon.copy16x16 = vp8_copy_mem16x16_c;
rtcd->recon.copy8x8 = vp8_copy_mem8x8_c; rtcd->recon.copy8x8 = vp8_copy_mem8x8_c;
rtcd->recon.copy8x4 = vp8_copy_mem8x4_c; rtcd->recon.copy8x4 = vp8_copy_mem8x4_c;
rtcd->recon.recon = vp8_recon_b_c; rtcd->recon.recon = vp8_recon_b_c;
rtcd->recon.recon2 = vp8_recon2b_c; rtcd->recon.recon2 = vp8_recon2b_c;
rtcd->recon.recon4 = vp8_recon4b_c; rtcd->recon.recon4 = vp8_recon4b_c;
rtcd->recon.recon_mb = vp8_recon_mb_c;
rtcd->recon.recon_mby = vp8_recon_mby_c;
rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_c; rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_c;
rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_c; rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_c;
......
...@@ -106,7 +106,7 @@ void vp8_recon2b_c ...@@ -106,7 +106,7 @@ void vp8_recon2b_c
} }
} }
void vp8_recon16x16mby(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) void vp8_recon_mby_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
{ {
#if ARCH_ARM #if ARCH_ARM
BLOCKD *b = &x->block[0]; BLOCKD *b = &x->block[0];
...@@ -135,7 +135,7 @@ void vp8_recon16x16mby(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) ...@@ -135,7 +135,7 @@ void vp8_recon16x16mby(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
#endif #endif
} }
void vp8_recon16x16mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
{ {
#if ARCH_ARM #if ARCH_ARM
BLOCKD *b = &x->block[0]; BLOCKD *b = &x->block[0];
......
...@@ -12,12 +12,19 @@ ...@@ -12,12 +12,19 @@
#ifndef __INC_RECON_H #ifndef __INC_RECON_H
#define __INC_RECON_H #define __INC_RECON_H
#include "blockd.h"
#define prototype_copy_block(sym) \ #define prototype_copy_block(sym) \
void sym(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch) void sym(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch)
#define prototype_recon_block(sym) \ #define prototype_recon_block(sym) \
void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch); void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch);
#define prototype_recon_macroblock(sym) \
void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *x);
struct vp8_recon_rtcd_vtable;
#if ARCH_X86 || ARCH_X86_64 #if ARCH_X86 || ARCH_X86_64
#include "x86/recon_x86.h" #include "x86/recon_x86.h"
#endif #endif
...@@ -56,9 +63,20 @@ extern prototype_recon_block(vp8_recon_recon2); ...@@ -56,9 +63,20 @@ extern prototype_recon_block(vp8_recon_recon2);
#endif #endif
extern prototype_recon_block(vp8_recon_recon4); extern prototype_recon_block(vp8_recon_recon4);
#ifndef vp8_recon_recon_mb
#define vp8_recon_recon_mb vp8_recon_mb_c
#endif
extern prototype_recon_macroblock(vp8_recon_recon_mb);
#ifndef vp8_recon_recon_mby
#define vp8_recon_recon_mby vp8_recon_mby_c
#endif
extern prototype_recon_macroblock(vp8_recon_recon_mby);
typedef prototype_copy_block((*vp8_copy_block_fn_t)); typedef prototype_copy_block((*vp8_copy_block_fn_t));
typedef prototype_recon_block((*vp8_recon_fn_t)); typedef prototype_recon_block((*vp8_recon_fn_t));
typedef struct typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t));
typedef struct vp8_recon_rtcd_vtable
{ {
vp8_copy_block_fn_t copy16x16; vp8_copy_block_fn_t copy16x16;
vp8_copy_block_fn_t copy8x8; vp8_copy_block_fn_t copy8x8;
...@@ -66,6 +84,8 @@ typedef struct ...@@ -66,6 +84,8 @@ typedef struct
vp8_recon_fn_t recon; vp8_recon_fn_t recon;
vp8_recon_fn_t recon2; vp8_recon_fn_t recon2;
vp8_recon_fn_t recon4; vp8_recon_fn_t recon4;
vp8_recon_mb_fn_t recon_mb;
vp8_recon_mb_fn_t recon_mby;
} vp8_recon_rtcd_vtable_t; } vp8_recon_rtcd_vtable_t;
#if CONFIG_RUNTIME_CPU_DETECT #if CONFIG_RUNTIME_CPU_DETECT
...@@ -74,9 +94,6 @@ typedef struct ...@@ -74,9 +94,6 @@ typedef struct
#define RECON_INVOKE(ctx,fn) vp8_recon_##fn #define RECON_INVOKE(ctx,fn) vp8_recon_##fn
#endif #endif
#include "blockd.h"
void vp8_recon16x16mby(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
void vp8_recon16x16mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
void vp8_recon_intra4x4mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x); void vp8_recon_intra4x4mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x); void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
#endif #endif
...@@ -113,7 +113,8 @@ void vp8_encode_intra16x16mby(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) ...@@ -113,7 +113,8 @@ void vp8_encode_intra16x16mby(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
vp8_inverse_transform_mby(IF_RTCD(&rtcd->common->idct), &x->e_mbd); vp8_inverse_transform_mby(IF_RTCD(&rtcd->common->idct), &x->e_mbd);
vp8_recon16x16mby(IF_RTCD(&rtcd->common->recon), &x->e_mbd); RECON_INVOKE(&rtcd->common->recon, recon_mby)
(IF_RTCD(&rtcd->common->recon), &x->e_mbd);
// make sure block modes are set the way we want them for context updates // make sure block modes are set the way we want them for context updates
for (b = 0; b < 16; b++) for (b = 0; b < 16; b++)
...@@ -157,7 +158,8 @@ void vp8_encode_intra16x16mbyrd(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) ...@@ -157,7 +158,8 @@ void vp8_encode_intra16x16mbyrd(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
vp8_inverse_transform_mby(IF_RTCD(&rtcd->common->idct), &x->e_mbd); vp8_inverse_transform_mby(IF_RTCD(&rtcd->common->idct), &x->e_mbd);
vp8_recon16x16mby(IF_RTCD(&rtcd->common->recon), &x->e_mbd); RECON_INVOKE(&rtcd->common->recon, recon_mby)
(IF_RTCD(&rtcd->common->recon), &x->e_mbd);
// make sure block modes are set the way we want them for context updates // make sure block modes are set the way we want them for context updates
for (b = 0; b < 16; b++) for (b = 0; b < 16; b++)
......
...@@ -639,7 +639,8 @@ void vp8_encode_inter16x16(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) ...@@ -639,7 +639,8 @@ void vp8_encode_inter16x16(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
vp8_inverse_transform_mb(IF_RTCD(&rtcd->common->idct), &x->e_mbd); vp8_inverse_transform_mb(IF_RTCD(&rtcd->common->idct), &x->e_mbd);
vp8_recon16x16mb(IF_RTCD(&rtcd->common->recon), &x->e_mbd); RECON_INVOKE(&rtcd->common->recon, recon_mb)
(IF_RTCD(&rtcd->common->recon), &x->e_mbd);
} }
...@@ -656,7 +657,8 @@ void vp8_encode_inter16x16y(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) ...@@ -656,7 +657,8 @@ void vp8_encode_inter16x16y(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
vp8_inverse_transform_mby(IF_RTCD(&rtcd->common->idct), &x->e_mbd); vp8_inverse_transform_mby(IF_RTCD(&rtcd->common->idct), &x->e_mbd);
vp8_recon16x16mby(IF_RTCD(&rtcd->common->recon), &x->e_mbd); RECON_INVOKE(&rtcd->common->recon, recon_mby)
(IF_RTCD(&rtcd->common->recon), &x->e_mbd);
} }
......
...@@ -118,7 +118,6 @@ VP8_COMMON_SRCS-$(ARCH_ARM) += common/arm/arm_systemdependent.c ...@@ -118,7 +118,6 @@ VP8_COMMON_SRCS-$(ARCH_ARM) += common/arm/arm_systemdependent.c
VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/bilinearfilter_arm.c VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/bilinearfilter_arm.c
VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/filter_arm.c VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/filter_arm.c
VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/loopfilter_arm.c VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/loopfilter_arm.c
VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/recon_arm.c
VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/reconintra_arm.c VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/reconintra_arm.c
VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/vpx_asm_offsets.c VP8_COMMON_SRCS-$(HAVE_ARMV6) += common/arm/vpx_asm_offsets.c
...@@ -162,6 +161,7 @@ VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/sixtappredict16x16_neon$(ASM) ...@@ -162,6 +161,7 @@ VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/sixtappredict16x16_neon$(ASM)
VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/recon16x16mb_neon$(ASM) VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/recon16x16mb_neon$(ASM)
VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/buildintrapredictorsmby_neon$(ASM) VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/buildintrapredictorsmby_neon$(ASM)
VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/save_neon_reg$(ASM) VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/save_neon_reg$(ASM)
VP8_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/recon_neon.c
# #
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment