16b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#ifndef VP9_RTCD_H_ 26b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define VP9_RTCD_H_ 36b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 46b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#ifdef RTCD_C 56b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define RTCD_EXTERN 66b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#else 76b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define RTCD_EXTERN extern 86b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#endif 96b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 106b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste/* 116b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste * VP9 126b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste */ 136b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 146b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#include "vpx/vpx_integer.h" 156b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#include "vp9/common/vp9_common.h" 166b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#include "vp9/common/vp9_enums.h" 178b92989c89bec8632aa47dc58dc162f199d62edcJames Zern#include "vp9/common/vp9_filter.h" 186b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 196b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastestruct macroblockd; 206b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 216b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste/* Encoder forward decls */ 226b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastestruct macroblock; 236b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastestruct vp9_variance_vtable; 246b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastestruct search_site_config; 256b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastestruct mv; 266b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rasteunion int_mv; 276b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastestruct yv12_buffer_config; 286b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 296b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#ifdef __cplusplus 306b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rasteextern "C" { 316b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#endif 326b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 336b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rasteint64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); 346b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rasteint64_t vp9_block_error_msa(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz); 356b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_block_error vp9_block_error_msa 366b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 376b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rasteint64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int block_size); 386b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_block_error_fp vp9_block_error_fp_c 396b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 406b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rasteint 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); 416b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_diamond_search_sad vp9_diamond_search_sad_c 426b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 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); 446b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_fdct8x8_quant vp9_fdct8x8_quant_c 456b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 466b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 476b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_fht16x16_msa(const int16_t *input, tran_low_t *output, int stride, int tx_type); 486b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_fht16x16 vp9_fht16x16_msa 496b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 506b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 516b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_fht4x4_msa(const int16_t *input, tran_low_t *output, int stride, int tx_type); 526b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_fht4x4 vp9_fht4x4_msa 536b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 546b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type); 556b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_fht8x8_msa(const int16_t *input, tran_low_t *output, int stride, int tx_type); 566b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_fht8x8 vp9_fht8x8_msa 576b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 586b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rasteint 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); 596b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_full_search_sad vp9_full_search_sad_c 606b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 616b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride); 626b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_fwht4x4_msa(const int16_t *input, tran_low_t *output, int stride); 636b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_fwht4x4 vp9_fwht4x4_msa 646b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 656b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); 666b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_iht16x16_256_add_msa(const tran_low_t *input, uint8_t *output, int pitch, int tx_type); 676b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_iht16x16_256_add vp9_iht16x16_256_add_msa 686b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 697bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 707bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht4x4_16_add_msa(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 716b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_iht4x4_16_add vp9_iht4x4_16_add_msa 726b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 737bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 747bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp9_iht8x8_64_add_msa(const tran_low_t *input, uint8_t *dest, int stride, int tx_type); 756b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_iht8x8_64_add vp9_iht8x8_64_add_msa 766b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 778b92989c89bec8632aa47dc58dc162f199d62edcJames 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); 786b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_quantize_fp vp9_quantize_fp_c 796b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 808b92989c89bec8632aa47dc58dc162f199d62edcJames 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); 816b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c 826b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 838b92989c89bec8632aa47dc58dc162f199d62edcJames 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); 8468e1c830ade592be74773e249bf94e2bbfb50de7Johann#define vp9_scale_and_extend_frame vp9_scale_and_extend_frame_c 856b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 868b92989c89bec8632aa47dc58dc162f199d62edcJames 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); 878b92989c89bec8632aa47dc58dc162f199d62edcJames Zern#define vp9_temporal_filter_apply vp9_temporal_filter_apply_c 886b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 896b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vp9_rtcd(void); 906b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 916b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#include "vpx_config.h" 926b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 936b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#ifdef RTCD_C 946b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastestatic void setup_rtcd_internal(void) 956b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste{ 966b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#if HAVE_DSPR2 976b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid vpx_dsputil_static_init(); 986b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#if CONFIG_VP8 996b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevoid dsputil_static_init(); 1006b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#endif 1016b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 1026b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastevpx_dsputil_static_init(); 1036b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#if CONFIG_VP8 1046b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Rastedsputil_static_init(); 1056b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#endif 1066b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#endif 1076b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste} 1086b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#endif 1096b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 1106b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#ifdef __cplusplus 1116b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste} // extern "C" 1126b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#endif 1136b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste 1146b531ea7586dda5e663b1c7c02f8f9a81fb7ea45Kaustubh Raste#endif 115