vp9_rtcd.h revision f3bed9137f66ef693bd406e43b17e9a1114f1e14
1#ifndef VP9_RTCD_H_ 2#define VP9_RTCD_H_ 3 4#ifdef RTCD_C 5#define RTCD_EXTERN 6#else 7#define RTCD_EXTERN extern 8#endif 9 10/* 11 * VP9 12 */ 13 14#include "vpx/vpx_integer.h" 15#include "vp9/common/vp9_enums.h" 16 17struct macroblockd; 18 19/* Encoder forward decls */ 20struct macroblock; 21struct vp9_variance_vtable; 22 23#define DEC_MVCOSTS int *mvjcost, int *mvcost[2] 24union int_mv; 25struct yv12_buffer_config; 26 27void vp9_idct_add_16x16_c(int16_t *input, uint8_t *dest, int stride, int eob); 28#define vp9_idct_add_16x16 vp9_idct_add_16x16_c 29 30void vp9_idct_add_8x8_c(int16_t *input, uint8_t *dest, int stride, int eob); 31#define vp9_idct_add_8x8 vp9_idct_add_8x8_c 32 33void vp9_idct_add_c(int16_t *input, uint8_t *dest, int stride, int eob); 34#define vp9_idct_add vp9_idct_add_c 35 36void vp9_idct_add_32x32_c(int16_t *q, uint8_t *dst, int stride, int eob); 37#define vp9_idct_add_32x32 vp9_idct_add_32x32_c 38 39void vp9_d27_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 40#define vp9_d27_predictor_4x4 vp9_d27_predictor_4x4_c 41 42void vp9_d45_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 43#define vp9_d45_predictor_4x4 vp9_d45_predictor_4x4_c 44 45void vp9_d63_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 46#define vp9_d63_predictor_4x4 vp9_d63_predictor_4x4_c 47 48void vp9_h_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 49#define vp9_h_predictor_4x4 vp9_h_predictor_4x4_c 50 51void vp9_d117_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 52#define vp9_d117_predictor_4x4 vp9_d117_predictor_4x4_c 53 54void vp9_d135_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 55#define vp9_d135_predictor_4x4 vp9_d135_predictor_4x4_c 56 57void vp9_d153_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 58#define vp9_d153_predictor_4x4 vp9_d153_predictor_4x4_c 59 60void vp9_v_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 61#define vp9_v_predictor_4x4 vp9_v_predictor_4x4_c 62 63void vp9_tm_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 64#define vp9_tm_predictor_4x4 vp9_tm_predictor_4x4_c 65 66void vp9_dc_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 67#define vp9_dc_predictor_4x4 vp9_dc_predictor_4x4_c 68 69void vp9_dc_top_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 70#define vp9_dc_top_predictor_4x4 vp9_dc_top_predictor_4x4_c 71 72void vp9_dc_left_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 73#define vp9_dc_left_predictor_4x4 vp9_dc_left_predictor_4x4_c 74 75void vp9_dc_128_predictor_4x4_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 76#define vp9_dc_128_predictor_4x4 vp9_dc_128_predictor_4x4_c 77 78void vp9_d27_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 79#define vp9_d27_predictor_8x8 vp9_d27_predictor_8x8_c 80 81void vp9_d45_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 82#define vp9_d45_predictor_8x8 vp9_d45_predictor_8x8_c 83 84void vp9_d63_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 85#define vp9_d63_predictor_8x8 vp9_d63_predictor_8x8_c 86 87void vp9_h_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 88#define vp9_h_predictor_8x8 vp9_h_predictor_8x8_c 89 90void vp9_d117_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 91#define vp9_d117_predictor_8x8 vp9_d117_predictor_8x8_c 92 93void vp9_d135_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 94#define vp9_d135_predictor_8x8 vp9_d135_predictor_8x8_c 95 96void vp9_d153_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 97#define vp9_d153_predictor_8x8 vp9_d153_predictor_8x8_c 98 99void vp9_v_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 100#define vp9_v_predictor_8x8 vp9_v_predictor_8x8_c 101 102void vp9_tm_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 103#define vp9_tm_predictor_8x8 vp9_tm_predictor_8x8_c 104 105void vp9_dc_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 106#define vp9_dc_predictor_8x8 vp9_dc_predictor_8x8_c 107 108void vp9_dc_top_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 109#define vp9_dc_top_predictor_8x8 vp9_dc_top_predictor_8x8_c 110 111void vp9_dc_left_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 112#define vp9_dc_left_predictor_8x8 vp9_dc_left_predictor_8x8_c 113 114void vp9_dc_128_predictor_8x8_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 115#define vp9_dc_128_predictor_8x8 vp9_dc_128_predictor_8x8_c 116 117void vp9_d27_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 118#define vp9_d27_predictor_16x16 vp9_d27_predictor_16x16_c 119 120void vp9_d45_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 121#define vp9_d45_predictor_16x16 vp9_d45_predictor_16x16_c 122 123void vp9_d63_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 124#define vp9_d63_predictor_16x16 vp9_d63_predictor_16x16_c 125 126void vp9_h_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 127#define vp9_h_predictor_16x16 vp9_h_predictor_16x16_c 128 129void vp9_d117_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 130#define vp9_d117_predictor_16x16 vp9_d117_predictor_16x16_c 131 132void vp9_d135_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 133#define vp9_d135_predictor_16x16 vp9_d135_predictor_16x16_c 134 135void vp9_d153_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 136#define vp9_d153_predictor_16x16 vp9_d153_predictor_16x16_c 137 138void vp9_v_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 139#define vp9_v_predictor_16x16 vp9_v_predictor_16x16_c 140 141void vp9_tm_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 142#define vp9_tm_predictor_16x16 vp9_tm_predictor_16x16_c 143 144void vp9_dc_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 145#define vp9_dc_predictor_16x16 vp9_dc_predictor_16x16_c 146 147void vp9_dc_top_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 148#define vp9_dc_top_predictor_16x16 vp9_dc_top_predictor_16x16_c 149 150void vp9_dc_left_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 151#define vp9_dc_left_predictor_16x16 vp9_dc_left_predictor_16x16_c 152 153void vp9_dc_128_predictor_16x16_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 154#define vp9_dc_128_predictor_16x16 vp9_dc_128_predictor_16x16_c 155 156void vp9_d27_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 157#define vp9_d27_predictor_32x32 vp9_d27_predictor_32x32_c 158 159void vp9_d45_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 160#define vp9_d45_predictor_32x32 vp9_d45_predictor_32x32_c 161 162void vp9_d63_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 163#define vp9_d63_predictor_32x32 vp9_d63_predictor_32x32_c 164 165void vp9_h_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 166#define vp9_h_predictor_32x32 vp9_h_predictor_32x32_c 167 168void vp9_d117_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 169#define vp9_d117_predictor_32x32 vp9_d117_predictor_32x32_c 170 171void vp9_d135_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 172#define vp9_d135_predictor_32x32 vp9_d135_predictor_32x32_c 173 174void vp9_d153_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 175#define vp9_d153_predictor_32x32 vp9_d153_predictor_32x32_c 176 177void vp9_v_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 178#define vp9_v_predictor_32x32 vp9_v_predictor_32x32_c 179 180void vp9_tm_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 181#define vp9_tm_predictor_32x32 vp9_tm_predictor_32x32_c 182 183void vp9_dc_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 184#define vp9_dc_predictor_32x32 vp9_dc_predictor_32x32_c 185 186void vp9_dc_top_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 187#define vp9_dc_top_predictor_32x32 vp9_dc_top_predictor_32x32_c 188 189void vp9_dc_left_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 190#define vp9_dc_left_predictor_32x32 vp9_dc_left_predictor_32x32_c 191 192void vp9_dc_128_predictor_32x32_c(uint8_t *ypred_ptr, ptrdiff_t y_stride, uint8_t *yabove_row, uint8_t *yleft_col); 193#define vp9_dc_128_predictor_32x32 vp9_dc_128_predictor_32x32_c 194 195void vp9_add_constant_residual_8x8_c(const int16_t diff, uint8_t *dest, int stride); 196#define vp9_add_constant_residual_8x8 vp9_add_constant_residual_8x8_c 197 198void vp9_add_constant_residual_16x16_c(const int16_t diff, uint8_t *dest, int stride); 199#define vp9_add_constant_residual_16x16 vp9_add_constant_residual_16x16_c 200 201void vp9_add_constant_residual_32x32_c(const int16_t diff, uint8_t *dest, int stride); 202#define vp9_add_constant_residual_32x32 vp9_add_constant_residual_32x32_c 203 204void vp9_mb_lpf_vertical_edge_w_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh); 205#define vp9_mb_lpf_vertical_edge_w vp9_mb_lpf_vertical_edge_w_c 206 207void vp9_mbloop_filter_vertical_edge_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count); 208#define vp9_mbloop_filter_vertical_edge vp9_mbloop_filter_vertical_edge_c 209 210void vp9_loop_filter_vertical_edge_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count); 211#define vp9_loop_filter_vertical_edge vp9_loop_filter_vertical_edge_c 212 213void vp9_mb_lpf_horizontal_edge_w_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count); 214#define vp9_mb_lpf_horizontal_edge_w vp9_mb_lpf_horizontal_edge_w_c 215 216void vp9_mbloop_filter_horizontal_edge_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count); 217#define vp9_mbloop_filter_horizontal_edge vp9_mbloop_filter_horizontal_edge_c 218 219void vp9_loop_filter_horizontal_edge_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count); 220#define vp9_loop_filter_horizontal_edge vp9_loop_filter_horizontal_edge_c 221 222void vp9_blend_mb_inner_c(uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride); 223#define vp9_blend_mb_inner vp9_blend_mb_inner_c 224 225void vp9_blend_mb_outer_c(uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride); 226#define vp9_blend_mb_outer vp9_blend_mb_outer_c 227 228void vp9_blend_b_c(uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride); 229#define vp9_blend_b vp9_blend_b_c 230 231void vp9_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); 232#define vp9_convolve_copy vp9_convolve_copy_c 233 234void vp9_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); 235#define vp9_convolve_avg vp9_convolve_avg_c 236 237void vp9_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); 238#define vp9_convolve8 vp9_convolve8_c 239 240void vp9_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); 241#define vp9_convolve8_horiz vp9_convolve8_horiz_c 242 243void vp9_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); 244#define vp9_convolve8_vert vp9_convolve8_vert_c 245 246void vp9_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); 247#define vp9_convolve8_avg vp9_convolve8_avg_c 248 249void vp9_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); 250#define vp9_convolve8_avg_horiz vp9_convolve8_avg_horiz_c 251 252void vp9_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); 253#define vp9_convolve8_avg_vert vp9_convolve8_avg_vert_c 254 255void vp9_short_idct4x4_1_add_c(int16_t *input, uint8_t *dest, int dest_stride); 256#define vp9_short_idct4x4_1_add vp9_short_idct4x4_1_add_c 257 258void vp9_short_idct4x4_add_c(int16_t *input, uint8_t *dest, int dest_stride); 259#define vp9_short_idct4x4_add vp9_short_idct4x4_add_c 260 261void vp9_short_idct8x8_1_add_c(int16_t *input, uint8_t *dest, int dest_stride); 262#define vp9_short_idct8x8_1_add vp9_short_idct8x8_1_add_c 263 264void vp9_short_idct8x8_add_c(int16_t *input, uint8_t *dest, int dest_stride); 265#define vp9_short_idct8x8_add vp9_short_idct8x8_add_c 266 267void vp9_short_idct10_8x8_add_c(int16_t *input, uint8_t *dest, int dest_stride); 268#define vp9_short_idct10_8x8_add vp9_short_idct10_8x8_add_c 269 270void vp9_short_idct16x16_1_add_c(int16_t *input, uint8_t *dest, int dest_stride); 271#define vp9_short_idct16x16_1_add vp9_short_idct16x16_1_add_c 272 273void vp9_short_idct16x16_add_c(int16_t *input, uint8_t *dest, int dest_stride); 274#define vp9_short_idct16x16_add vp9_short_idct16x16_add_c 275 276void vp9_short_idct10_16x16_add_c(int16_t *input, uint8_t *dest, int dest_stride); 277#define vp9_short_idct10_16x16_add vp9_short_idct10_16x16_add_c 278 279void vp9_short_idct32x32_add_c(int16_t *input, uint8_t *dest, int dest_stride); 280#define vp9_short_idct32x32_add vp9_short_idct32x32_add_c 281 282void vp9_short_idct1_32x32_c(int16_t *input, int16_t *output); 283#define vp9_short_idct1_32x32 vp9_short_idct1_32x32_c 284 285void vp9_short_iht4x4_add_c(int16_t *input, uint8_t *dest, int dest_stride, int tx_type); 286#define vp9_short_iht4x4_add vp9_short_iht4x4_add_c 287 288void vp9_short_iht8x8_add_c(int16_t *input, uint8_t *dest, int dest_stride, int tx_type); 289#define vp9_short_iht8x8_add vp9_short_iht8x8_add_c 290 291void vp9_short_iht16x16_add_c(int16_t *input, uint8_t *output, int pitch, int tx_type); 292#define vp9_short_iht16x16_add vp9_short_iht16x16_add_c 293 294void vp9_idct4_1d_c(int16_t *input, int16_t *output); 295#define vp9_idct4_1d vp9_idct4_1d_c 296 297void vp9_short_iwalsh4x4_1_add_c(int16_t *input, uint8_t *dest, int dest_stride); 298#define vp9_short_iwalsh4x4_1_add vp9_short_iwalsh4x4_1_add_c 299 300void vp9_short_iwalsh4x4_add_c(int16_t *input, uint8_t *dest, int dest_stride); 301#define vp9_short_iwalsh4x4_add vp9_short_iwalsh4x4_add_c 302 303unsigned int vp9_sad32x3_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad); 304#define vp9_sad32x3 vp9_sad32x3_c 305 306unsigned int vp9_sad3x32_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad); 307#define vp9_sad3x32 vp9_sad3x32_c 308 309void vp9_rtcd(void); 310#include "vpx_config.h" 311 312#ifdef RTCD_C 313#include "vpx_ports/arm.h" 314static void setup_rtcd_internal(void) 315{ 316 int flags = arm_cpu_caps(); 317 318 (void)flags; 319 320 321} 322#endif 323#endif 324