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" 170a39d0a697ff3603e8c100300fda363658e10b23James 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 Venkatasubramanianint64_t vp9_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); 357ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_block_error vp9_block_error_sse2 367ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 377ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianint64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); 387ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianint64_t vp9_block_error_fp_sse2(const int16_t *coeff, const int16_t *dqcoeff, int block_size); 397ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_block_error_fp vp9_block_error_fp_sse2 407ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 417ce0a1d1337c01056ba24006efab21f00e179e04Vignesh 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); 427ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_diamond_search_sad vp9_diamond_search_sad_c 437ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 440a39d0a697ff3603e8c100300fda363658e10b23James 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); 450a39d0a697ff3603e8c100300fda363658e10b23James Zernvoid vp9_fdct8x8_quant_sse2(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); 460a39d0a697ff3603e8c100300fda363658e10b23James Zernvoid vp9_fdct8x8_quant_ssse3(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); 477ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fdct8x8_quant vp9_fdct8x8_quant_ssse3 487ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 497ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 507ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); 517ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fht16x16 vp9_fht16x16_sse2 527ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 537ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 547ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); 557ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fht4x4 vp9_fht4x4_sse2 567ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 577ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 587ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type); 597ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_fht8x8 vp9_fht8x8_sse2 607ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 617ce0a1d1337c01056ba24006efab21f00e179e04Vignesh 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); 627ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianint vp9_full_search_sadx3(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); 637ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_full_search_sad vp9_full_search_sadx3 647ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 657ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); 6668e1c830ade592be74773e249bf94e2bbfb50de7Johannvoid vp9_fwht4x4_sse2(const int16_t *input, tran_low_t *output, int stride); 6768e1c830ade592be74773e249bf94e2bbfb50de7Johann#define vp9_fwht4x4 vp9_fwht4x4_sse2 687ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 697ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); 707ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); 717ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2 727ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 737bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 747bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 757ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_iht4x4_16_add vp9_iht4x4_16_add_sse2 767ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 777bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 787bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 797ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_iht8x8_64_add vp9_iht8x8_64_add_sse2 807ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 810a39d0a697ff3603e8c100300fda363658e10b23James 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); 820a39d0a697ff3603e8c100300fda363658e10b23James Zernvoid vp9_quantize_fp_sse2(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); 830a39d0a697ff3603e8c100300fda363658e10b23James Zernvoid vp9_quantize_fp_ssse3(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); 847ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_quantize_fp vp9_quantize_fp_ssse3 857ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 860a39d0a697ff3603e8c100300fda363658e10b23James 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); 870a39d0a697ff3603e8c100300fda363658e10b23James Zernvoid vp9_quantize_fp_32x32_ssse3(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); 887ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_ssse3 897ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 900a39d0a697ff3603e8c100300fda363658e10b23James 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); 910a39d0a697ff3603e8c100300fda363658e10b23James Zernvoid vp9_scale_and_extend_frame_ssse3(const struct yv12_buffer_config *src, struct yv12_buffer_config *dst, INTERP_FILTER filter_type, int phase_scaler); 9268e1c830ade592be74773e249bf94e2bbfb50de7Johann#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_ssse3 937ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 940a39d0a697ff3603e8c100300fda363658e10b23James 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); 950a39d0a697ff3603e8c100300fda363658e10b23James Zern#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c 967ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 977ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianvoid vp9_rtcd(void); 987ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 997ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#ifdef RTCD_C 1007ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#include "vpx_ports/x86.h" 1017ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanianstatic void setup_rtcd_internal(void) 1027ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian{ 1037ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian int flags = x86_simd_caps(); 1047ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 1057ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian (void)flags; 1067ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 1077ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian} 1087ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#endif 1097ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 1107ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#ifdef __cplusplus 1117ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian} // extern "C" 1127ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#endif 1137ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian 1147ce0a1d1337c01056ba24006efab21f00e179e04Vignesh Venkatasubramanian#endif 115