OLD | NEW |
1 #ifndef VP9_RTCD_H_ | 1 #ifndef VP9_RTCD_H_ |
2 #define VP9_RTCD_H_ | 2 #define VP9_RTCD_H_ |
3 | 3 |
4 #ifdef RTCD_C | 4 #ifdef RTCD_C |
5 #define RTCD_EXTERN | 5 #define RTCD_EXTERN |
6 #else | 6 #else |
7 #define RTCD_EXTERN extern | 7 #define RTCD_EXTERN extern |
8 #endif | 8 #endif |
9 | 9 |
10 /* | 10 /* |
11 * VP9 | 11 * VP9 |
12 */ | 12 */ |
13 | 13 |
14 #include "vpx/vpx_integer.h" | 14 #include "vpx/vpx_integer.h" |
| 15 #include "vp9/common/vp9_common.h" |
15 #include "vp9/common/vp9_enums.h" | 16 #include "vp9/common/vp9_enums.h" |
16 #include "vp9/common/vp9_idct.h" | |
17 | 17 |
18 struct macroblockd; | 18 struct macroblockd; |
19 | 19 |
20 /* Encoder forward decls */ | 20 /* Encoder forward decls */ |
21 struct macroblock; | 21 struct macroblock; |
22 struct vp9_variance_vtable; | 22 struct vp9_variance_vtable; |
23 struct search_site_config; | 23 struct search_site_config; |
24 struct mv; | 24 struct mv; |
25 union int_mv; | 25 union int_mv; |
26 struct yv12_buffer_config; | 26 struct yv12_buffer_config; |
27 | 27 |
28 #ifdef __cplusplus | 28 #ifdef __cplusplus |
29 extern "C" { | 29 extern "C" { |
30 #endif | 30 #endif |
31 | 31 |
| 32 unsigned int vp9_avg_8x8_c(const uint8_t *, int p); |
| 33 unsigned int vp9_avg_8x8_sse2(const uint8_t *, int p); |
| 34 RTCD_EXTERN unsigned int (*vp9_avg_8x8)(const uint8_t *, int p); |
| 35 |
32 int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, in
tptr_t block_size, int64_t *ssz); | 36 int64_t vp9_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, in
tptr_t block_size, int64_t *ssz); |
33 int64_t vp9_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff,
intptr_t block_size, int64_t *ssz); | 37 int64_t vp9_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff,
intptr_t block_size, int64_t *ssz); |
34 RTCD_EXTERN int64_t (*vp9_block_error)(const tran_low_t *coeff, const tran_low_t
*dqcoeff, intptr_t block_size, int64_t *ssz); | 38 RTCD_EXTERN int64_t (*vp9_block_error)(const tran_low_t *coeff, const tran_low_t
*dqcoeff, intptr_t block_size, int64_t *ssz); |
35 | 39 |
36 void vp9_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptr
diff_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); | 40 void vp9_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptr
diff_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); |
37 void vp9_convolve8_sse2(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 *fil
ter_y, int y_step_q4, int w, int h); | 41 void vp9_convolve8_sse2(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 *fil
ter_y, int y_step_q4, int w, int h); |
38 void vp9_convolve8_ssse3(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 *fi
lter_y, int y_step_q4, int w, int h); | 42 void vp9_convolve8_ssse3(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 *fi
lter_y, int y_step_q4, int w, int h); |
39 RTCD_EXTERN void (*vp9_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint
8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const in
t16_t *filter_y, int y_step_q4, int w, int h); | 43 RTCD_EXTERN void (*vp9_convolve8)(const uint8_t *src, ptrdiff_t src_stride, uint
8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const in
t16_t *filter_y, int y_step_q4, int w, int h); |
40 | 44 |
41 void 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 *fi
lter_y, int y_step_q4, int w, int h); | 45 void 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 *fi
lter_y, int y_step_q4, int w, int h); |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 423 |
420 unsigned int vp9_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uin
t8_t *ref_ptr, int recon_stride, unsigned int *sse); | 424 unsigned int vp9_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uin
t8_t *ref_ptr, int recon_stride, unsigned int *sse); |
421 unsigned int vp9_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const
uint8_t *ref_ptr, int recon_stride, unsigned int *sse); | 425 unsigned int vp9_mse8x16_sse2(const uint8_t *src_ptr, int source_stride, const
uint8_t *ref_ptr, int recon_stride, unsigned int *sse); |
422 RTCD_EXTERN unsigned int (*vp9_mse8x16)(const uint8_t *src_ptr, int source_stri
de, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); | 426 RTCD_EXTERN unsigned int (*vp9_mse8x16)(const uint8_t *src_ptr, int source_stri
de, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); |
423 | 427 |
424 unsigned int vp9_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint
8_t *ref_ptr, int recon_stride, unsigned int *sse); | 428 unsigned int vp9_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint
8_t *ref_ptr, int recon_stride, unsigned int *sse); |
425 unsigned int vp9_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const u
int8_t *ref_ptr, int recon_stride, unsigned int *sse); | 429 unsigned int vp9_mse8x8_sse2(const uint8_t *src_ptr, int source_stride, const u
int8_t *ref_ptr, int recon_stride, unsigned int *sse); |
426 RTCD_EXTERN unsigned int (*vp9_mse8x8)(const uint8_t *src_ptr, int source_strid
e, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); | 430 RTCD_EXTERN unsigned int (*vp9_mse8x8)(const uint8_t *src_ptr, int source_strid
e, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse); |
427 | 431 |
428 void vp9_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_b
lock, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_pt
r, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_p
tr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, const int1
6_t *scan, const int16_t *iscan); | 432 void vp9_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_b
lock, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_pt
r, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_p
tr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, const int1
6_t *scan, const int16_t *iscan); |
429 #define vp9_quantize_b vp9_quantize_b_c | 433 void vp9_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int ski
p_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant
_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoef
f_ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, const i
nt16_t *scan, const int16_t *iscan); |
| 434 RTCD_EXTERN void (*vp9_quantize_b)(const tran_low_t *coeff_ptr, intptr_t n_coeff
s, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int1
6_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low
_t *dqcoeff_ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_pt
r, const int16_t *scan, const int16_t *iscan); |
430 | 435 |
431 void vp9_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int
skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *qu
ant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqc
oeff_ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, cons
t int16_t *scan, const int16_t *iscan); | 436 void vp9_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int
skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *qu
ant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqc
oeff_ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, cons
t int16_t *scan, const int16_t *iscan); |
432 #define vp9_quantize_b_32x32 vp9_quantize_b_32x32_c | 437 #define vp9_quantize_b_32x32 vp9_quantize_b_32x32_c |
433 | 438 |
434 void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_
block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_p
tr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_
ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, const int
16_t *scan, const int16_t *iscan); | 439 void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_
block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_p
tr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_
ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, const int
16_t *scan, const int16_t *iscan); |
435 #define vp9_quantize_fp vp9_quantize_fp_c | 440 #define vp9_quantize_fp vp9_quantize_fp_c |
436 | 441 |
437 void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int
skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *q
uant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dq
coeff_ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, con
st int16_t *scan, const int16_t *iscan); | 442 void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int
skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *q
uant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dq
coeff_ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, con
st int16_t *scan, const int16_t *iscan); |
438 #define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c | 443 #define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c |
439 | 444 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 void vp9_rtcd(void); | 880 void vp9_rtcd(void); |
876 | 881 |
877 #ifdef RTCD_C | 882 #ifdef RTCD_C |
878 #include "vpx_ports/x86.h" | 883 #include "vpx_ports/x86.h" |
879 static void setup_rtcd_internal(void) | 884 static void setup_rtcd_internal(void) |
880 { | 885 { |
881 int flags = x86_simd_caps(); | 886 int flags = x86_simd_caps(); |
882 | 887 |
883 (void)flags; | 888 (void)flags; |
884 | 889 |
| 890 vp9_avg_8x8 = vp9_avg_8x8_c; |
| 891 if (flags & HAS_SSE2) vp9_avg_8x8 = vp9_avg_8x8_sse2; |
885 vp9_block_error = vp9_block_error_c; | 892 vp9_block_error = vp9_block_error_c; |
886 if (flags & HAS_SSE2) vp9_block_error = vp9_block_error_sse2; | 893 if (flags & HAS_SSE2) vp9_block_error = vp9_block_error_sse2; |
887 vp9_convolve8 = vp9_convolve8_c; | 894 vp9_convolve8 = vp9_convolve8_c; |
888 if (flags & HAS_SSE2) vp9_convolve8 = vp9_convolve8_sse2; | 895 if (flags & HAS_SSE2) vp9_convolve8 = vp9_convolve8_sse2; |
889 if (flags & HAS_SSSE3) vp9_convolve8 = vp9_convolve8_ssse3; | 896 if (flags & HAS_SSSE3) vp9_convolve8 = vp9_convolve8_ssse3; |
890 vp9_convolve8_avg = vp9_convolve8_avg_c; | 897 vp9_convolve8_avg = vp9_convolve8_avg_c; |
891 if (flags & HAS_SSE2) vp9_convolve8_avg = vp9_convolve8_avg_sse2; | 898 if (flags & HAS_SSE2) vp9_convolve8_avg = vp9_convolve8_avg_sse2; |
892 if (flags & HAS_SSSE3) vp9_convolve8_avg = vp9_convolve8_avg_ssse3; | 899 if (flags & HAS_SSSE3) vp9_convolve8_avg = vp9_convolve8_avg_ssse3; |
893 vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_c; | 900 vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_c; |
894 if (flags & HAS_SSE2) vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_sse2
; | 901 if (flags & HAS_SSE2) vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_sse2
; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 vp9_lpf_vertical_8_dual = vp9_lpf_vertical_8_dual_c; | 1047 vp9_lpf_vertical_8_dual = vp9_lpf_vertical_8_dual_c; |
1041 if (flags & HAS_SSE2) vp9_lpf_vertical_8_dual = vp9_lpf_vertical_8_dual_sse2
; | 1048 if (flags & HAS_SSE2) vp9_lpf_vertical_8_dual = vp9_lpf_vertical_8_dual_sse2
; |
1042 vp9_mse16x16 = vp9_mse16x16_c; | 1049 vp9_mse16x16 = vp9_mse16x16_c; |
1043 if (flags & HAS_SSE2) vp9_mse16x16 = vp9_mse16x16_sse2; | 1050 if (flags & HAS_SSE2) vp9_mse16x16 = vp9_mse16x16_sse2; |
1044 vp9_mse16x8 = vp9_mse16x8_c; | 1051 vp9_mse16x8 = vp9_mse16x8_c; |
1045 if (flags & HAS_SSE2) vp9_mse16x8 = vp9_mse16x8_sse2; | 1052 if (flags & HAS_SSE2) vp9_mse16x8 = vp9_mse16x8_sse2; |
1046 vp9_mse8x16 = vp9_mse8x16_c; | 1053 vp9_mse8x16 = vp9_mse8x16_c; |
1047 if (flags & HAS_SSE2) vp9_mse8x16 = vp9_mse8x16_sse2; | 1054 if (flags & HAS_SSE2) vp9_mse8x16 = vp9_mse8x16_sse2; |
1048 vp9_mse8x8 = vp9_mse8x8_c; | 1055 vp9_mse8x8 = vp9_mse8x8_c; |
1049 if (flags & HAS_SSE2) vp9_mse8x8 = vp9_mse8x8_sse2; | 1056 if (flags & HAS_SSE2) vp9_mse8x8 = vp9_mse8x8_sse2; |
| 1057 vp9_quantize_b = vp9_quantize_b_c; |
| 1058 if (flags & HAS_SSE2) vp9_quantize_b = vp9_quantize_b_sse2; |
1050 vp9_sad16x16 = vp9_sad16x16_c; | 1059 vp9_sad16x16 = vp9_sad16x16_c; |
1051 if (flags & HAS_SSE2) vp9_sad16x16 = vp9_sad16x16_sse2; | 1060 if (flags & HAS_SSE2) vp9_sad16x16 = vp9_sad16x16_sse2; |
1052 vp9_sad16x16_avg = vp9_sad16x16_avg_c; | 1061 vp9_sad16x16_avg = vp9_sad16x16_avg_c; |
1053 if (flags & HAS_SSE2) vp9_sad16x16_avg = vp9_sad16x16_avg_sse2; | 1062 if (flags & HAS_SSE2) vp9_sad16x16_avg = vp9_sad16x16_avg_sse2; |
1054 vp9_sad16x16x3 = vp9_sad16x16x3_c; | 1063 vp9_sad16x16x3 = vp9_sad16x16x3_c; |
1055 if (flags & HAS_SSE3) vp9_sad16x16x3 = vp9_sad16x16x3_sse3; | 1064 if (flags & HAS_SSE3) vp9_sad16x16x3 = vp9_sad16x16x3_sse3; |
1056 if (flags & HAS_SSSE3) vp9_sad16x16x3 = vp9_sad16x16x3_ssse3; | 1065 if (flags & HAS_SSSE3) vp9_sad16x16x3 = vp9_sad16x16x3_ssse3; |
1057 vp9_sad16x16x4d = vp9_sad16x16x4d_c; | 1066 vp9_sad16x16x4d = vp9_sad16x16x4d_c; |
1058 if (flags & HAS_SSE2) vp9_sad16x16x4d = vp9_sad16x16x4d_sse2; | 1067 if (flags & HAS_SSE2) vp9_sad16x16x4d = vp9_sad16x16x4d_sse2; |
1059 vp9_sad16x32 = vp9_sad16x32_c; | 1068 vp9_sad16x32 = vp9_sad16x32_c; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 vp9_variance8x8 = vp9_variance8x8_c; | 1269 vp9_variance8x8 = vp9_variance8x8_c; |
1261 if (flags & HAS_SSE2) vp9_variance8x8 = vp9_variance8x8_sse2; | 1270 if (flags & HAS_SSE2) vp9_variance8x8 = vp9_variance8x8_sse2; |
1262 } | 1271 } |
1263 #endif | 1272 #endif |
1264 | 1273 |
1265 #ifdef __cplusplus | 1274 #ifdef __cplusplus |
1266 } // extern "C" | 1275 } // extern "C" |
1267 #endif | 1276 #endif |
1268 | 1277 |
1269 #endif | 1278 #endif |
OLD | NEW |