vp8_rtcd.h revision 6b531ea7586dda5e663b1c7c02f8f9a81fb7ea45
1#ifndef VP8_RTCD_H_ 2#define VP8_RTCD_H_ 3 4#ifdef RTCD_C 5#define RTCD_EXTERN 6#else 7#define RTCD_EXTERN extern 8#endif 9 10/* 11 * VP8 12 */ 13 14struct blockd; 15struct macroblockd; 16struct loop_filter_info; 17 18/* Encoder forward decls */ 19struct block; 20struct macroblock; 21struct variance_vtable; 22union int_mv; 23struct yv12_buffer_config; 24 25#ifdef __cplusplus 26extern "C" { 27#endif 28 29void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 30void vp8_bilinear_predict16x16_msa(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 31#define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_msa 32 33void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 34void vp8_bilinear_predict4x4_msa(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 35#define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_msa 36 37void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 38void vp8_bilinear_predict8x4_msa(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 39#define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_msa 40 41void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 42void vp8_bilinear_predict8x8_msa(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 43#define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_msa 44 45int vp8_block_error_c(short *coeff, short *dqcoeff); 46int vp8_block_error_msa(short *coeff, short *dqcoeff); 47#define vp8_block_error vp8_block_error_msa 48 49void vp8_clear_system_state_c(); 50#define vp8_clear_system_state vp8_clear_system_state_c 51 52void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); 53void vp8_copy_mem16x16_msa(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); 54#define vp8_copy_mem16x16 vp8_copy_mem16x16_msa 55 56void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); 57void vp8_copy_mem8x4_msa(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); 58#define vp8_copy_mem8x4 vp8_copy_mem8x4_msa 59 60void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); 61void vp8_copy_mem8x8_msa(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch); 62#define vp8_copy_mem8x8 vp8_copy_mem8x8_msa 63 64void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); 65void vp8_dc_only_idct_add_msa(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride); 66#define vp8_dc_only_idct_add vp8_dc_only_idct_add_msa 67 68int vp8_denoiser_filter_c(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); 69int vp8_denoiser_filter_msa(unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); 70#define vp8_denoiser_filter vp8_denoiser_filter_msa 71 72int vp8_denoiser_filter_uv_c(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); 73int vp8_denoiser_filter_uv_msa(unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising); 74#define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_msa 75 76void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride); 77void vp8_dequant_idct_add_msa(short *input, short *dq, unsigned char *output, int stride); 78#define vp8_dequant_idct_add vp8_dequant_idct_add_msa 79 80void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); 81void vp8_dequant_idct_add_uv_block_msa(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs); 82#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_msa 83 84void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs); 85void vp8_dequant_idct_add_y_block_msa(short *q, short *dq, unsigned char *dst, int stride, char *eobs); 86#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_msa 87 88void vp8_dequantize_b_c(struct blockd*, short *dqc); 89void vp8_dequantize_b_msa(struct blockd*, short *dqc); 90#define vp8_dequantize_b vp8_dequantize_b_msa 91 92int vp8_diamond_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); 93#define vp8_diamond_search_sad vp8_diamond_search_sad_c 94 95void vp8_fast_quantize_b_c(struct block *, struct blockd *); 96void vp8_fast_quantize_b_msa(struct block *, struct blockd *); 97#define vp8_fast_quantize_b vp8_fast_quantize_b_msa 98 99int vp8_full_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); 100#define vp8_full_search_sad vp8_full_search_sad_c 101 102void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); 103void vp8_loop_filter_bh_msa(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); 104#define vp8_loop_filter_bh vp8_loop_filter_bh_msa 105 106void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); 107void vp8_loop_filter_bv_msa(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); 108#define vp8_loop_filter_bv vp8_loop_filter_bv_msa 109 110void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); 111void vp8_loop_filter_mbh_msa(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); 112#define vp8_loop_filter_mbh vp8_loop_filter_mbh_msa 113 114void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); 115void vp8_loop_filter_mbv_msa(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi); 116#define vp8_loop_filter_mbv vp8_loop_filter_mbv_msa 117 118void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit); 119void vp8_loop_filter_bhs_msa(unsigned char *y, int ystride, const unsigned char *blimit); 120#define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_msa 121 122void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit); 123void vp8_loop_filter_bvs_msa(unsigned char *y, int ystride, const unsigned char *blimit); 124#define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_msa 125 126void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); 127void vp8_loop_filter_simple_horizontal_edge_msa(unsigned char *y, int ystride, const unsigned char *blimit); 128#define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_msa 129 130void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit); 131void vp8_loop_filter_simple_vertical_edge_msa(unsigned char *y, int ystride, const unsigned char *blimit); 132#define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_msa 133 134int vp8_mbblock_error_c(struct macroblock *mb, int dc); 135int vp8_mbblock_error_msa(struct macroblock *mb, int dc); 136#define vp8_mbblock_error vp8_mbblock_error_msa 137 138int vp8_mbuverror_c(struct macroblock *mb); 139int vp8_mbuverror_msa(struct macroblock *mb); 140#define vp8_mbuverror vp8_mbuverror_msa 141 142int vp8_refining_search_sad_c(struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv); 143#define vp8_refining_search_sad vp8_refining_search_sad_c 144 145void vp8_regular_quantize_b_c(struct block *, struct blockd *); 146void vp8_regular_quantize_b_msa(struct block *, struct blockd *); 147#define vp8_regular_quantize_b vp8_regular_quantize_b_msa 148 149void vp8_short_fdct4x4_c(short *input, short *output, int pitch); 150void vp8_short_fdct4x4_msa(short *input, short *output, int pitch); 151#define vp8_short_fdct4x4 vp8_short_fdct4x4_msa 152 153void vp8_short_fdct8x4_c(short *input, short *output, int pitch); 154void vp8_short_fdct8x4_msa(short *input, short *output, int pitch); 155#define vp8_short_fdct8x4 vp8_short_fdct8x4_msa 156 157void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); 158void vp8_short_idct4x4llm_msa(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride); 159#define vp8_short_idct4x4llm vp8_short_idct4x4llm_msa 160 161void vp8_short_inv_walsh4x4_c(short *input, short *output); 162void vp8_short_inv_walsh4x4_msa(short *input, short *output); 163#define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_msa 164 165void vp8_short_inv_walsh4x4_1_c(short *input, short *output); 166#define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c 167 168void vp8_short_walsh4x4_c(short *input, short *output, int pitch); 169void vp8_short_walsh4x4_msa(short *input, short *output, int pitch); 170#define vp8_short_walsh4x4 vp8_short_walsh4x4_msa 171 172void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 173void vp8_sixtap_predict16x16_msa(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 174#define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_msa 175 176void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 177void vp8_sixtap_predict4x4_msa(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 178#define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_msa 179 180void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 181void vp8_sixtap_predict8x4_msa(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 182#define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_msa 183 184void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 185void vp8_sixtap_predict8x8_msa(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch); 186#define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_msa 187 188void vp8_rtcd(void); 189 190#include "vpx_config.h" 191 192#ifdef RTCD_C 193static void setup_rtcd_internal(void) 194{ 195#if HAVE_DSPR2 196void vpx_dsputil_static_init(); 197#if CONFIG_VP8 198void dsputil_static_init(); 199#endif 200 201vpx_dsputil_static_init(); 202#if CONFIG_VP8 203dsputil_static_init(); 204#endif 205#endif 206} 207#endif 208 209#ifdef __cplusplus 210} // extern "C" 211#endif 212 213#endif 214