17ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#ifndef VP9_RTCD_H_ 27ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define VP9_RTCD_H_ 37ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 47ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#ifdef RTCD_C 57ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define RTCD_EXTERN 67ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#else 77ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define RTCD_EXTERN extern 87ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#endif 97ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 107ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian/* 117ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian * VP9 127ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian */ 137ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 147ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#include "vpx/vpx_integer.h" 157ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#include "vp9/common/vp9_common.h" 167ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#include "vp9/common/vp9_enums.h" 178b92989c89bec8632aa47dc58dc162f199d62edcJames Zern#include "vp9/common/vp9_filter.h" 187ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 197ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianstruct macroblockd; 207ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 217ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian/* Encoder forward decls */ 227ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianstruct macroblock; 237ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianstruct vp9_variance_vtable; 247ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianstruct search_site_config; 257ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianstruct mv; 267ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianunion int_mv; 277ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianstruct yv12_buffer_config; 287ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 297ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#ifdef __cplusplus 307ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianextern "C" { 317ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#endif 327ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 337ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianint64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); 347ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_block_error vp9_block_error_c 357ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 367ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianint64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); 377ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianint64_t vp9_block_error_fp_neon(const int16_t *coeff, const int16_t *dqcoeff, int block_size); 387ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_block_error_fp vp9_block_error_fp_neon 397ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 407ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianint vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv); 417ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_diamond_search_sad vp9_diamond_search_sad_c 427ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 438b92989c89bec8632aa47dc58dc162f199d62edcJames Zernvoid vp9_fdct8x8_quant_c(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); 448b92989c89bec8632aa47dc58dc162f199d62edcJames Zernvoid vp9_fdct8x8_quant_neon(const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); 457ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fdct8x8_quant vp9_fdct8x8_quant_neon 467ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 477ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 487ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fht16x16 vp9_fht16x16_c 497ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 507ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 517ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fht4x4 vp9_fht4x4_c 527ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 537ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 547ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fht8x8 vp9_fht8x8_c 557ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 567ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianint vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv); 577ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_full_search_sad vp9_full_search_sad_c 587ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 597ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); 607ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fwht4x4 vp9_fwht4x4_c 617ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 627ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); 637ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_iht16x16_256_add vp9_iht16x16_256_add_c 647ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 657bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 667bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 677ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_iht4x4_16_add vp9_iht4x4_16_add_neon 687ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 697bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 707bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 717ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_iht8x8_64_add vp9_iht8x8_64_add_neon 727ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 738b92989c89bec8632aa47dc58dc162f199d62edcJames Zernvoid vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); 748b92989c89bec8632aa47dc58dc162f199d62edcJames Zernvoid vp9_quantize_fp_neon(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); 757ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_quantize_fp vp9_quantize_fp_neon 767ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 778b92989c89bec8632aa47dc58dc162f199d62edcJames Zernvoid vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); 787ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c 797ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 808b92989c89bec8632aa47dc58dc162f199d62edcJames Zernvoid vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst, INTERP_FILTER filter_type, int phase_scaler); 8168e1c830ade592be74773e249bf94e2bbfb50de7Johann#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c 827ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 838b92989c89bec8632aa47dc58dc162f199d62edcJames Zernvoid vp9_temporal_filter_apply_c(const uint8_t *frame1, unsigned int stride, const uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, uint32_t *accumulator, uint16_t *count); 847ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c 857ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 867ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_rtcd(void); 877ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 887ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#include "vpx_config.h" 897ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 907ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#ifdef RTCD_C 917ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#include "vpx_ports/arm.h" 927ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianstatic void setup_rtcd_internal(void) 937ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian{ 947ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian int flags = arm_cpu_caps(); 957ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 967ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian (void)flags; 977ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 987ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian} 997ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#endif 1007ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 1017ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#ifdef __cplusplus 1027ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian} // extern "C" 1037ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#endif 1047ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 1057ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#endif 106