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 #define vp9_block_error vp9_block_error_c | 37 #define vp9_block_error vp9_block_error_c |
34 | 38 |
35 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); | 39 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); |
36 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); | 40 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); |
37 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); | 41 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); |
38 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); | 42 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); |
39 | 43 |
40 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); | 44 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); |
41 void vp9_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *d
st, 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); | 45 void vp9_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *d
st, 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); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 unsigned int vp9_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uin
t8_t *ref_ptr, int recon_stride, unsigned int *sse); | 389 unsigned int vp9_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uin
t8_t *ref_ptr, int recon_stride, unsigned int *sse); |
386 #define vp9_mse16x8 vp9_mse16x8_c | 390 #define vp9_mse16x8 vp9_mse16x8_c |
387 | 391 |
388 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); | 392 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); |
389 #define vp9_mse8x16 vp9_mse8x16_c | 393 #define vp9_mse8x16 vp9_mse8x16_c |
390 | 394 |
391 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); | 395 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); |
392 #define vp9_mse8x8 vp9_mse8x8_c | 396 #define vp9_mse8x8 vp9_mse8x8_c |
393 | 397 |
394 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); | 398 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); |
395 #define vp9_quantize_b vp9_quantize_b_c | 399 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); |
| 400 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); |
396 | 401 |
397 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); | 402 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); |
398 #define vp9_quantize_b_32x32 vp9_quantize_b_32x32_c | 403 #define vp9_quantize_b_32x32 vp9_quantize_b_32x32_c |
399 | 404 |
400 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); | 405 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); |
401 #define vp9_quantize_fp vp9_quantize_fp_c | 406 #define vp9_quantize_fp vp9_quantize_fp_c |
402 | 407 |
403 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); | 408 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); |
404 #define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c | 409 #define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c |
405 | 410 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 void vp9_rtcd(void); | 747 void vp9_rtcd(void); |
743 | 748 |
744 #ifdef RTCD_C | 749 #ifdef RTCD_C |
745 #include "vpx_ports/x86.h" | 750 #include "vpx_ports/x86.h" |
746 static void setup_rtcd_internal(void) | 751 static void setup_rtcd_internal(void) |
747 { | 752 { |
748 int flags = x86_simd_caps(); | 753 int flags = x86_simd_caps(); |
749 | 754 |
750 (void)flags; | 755 (void)flags; |
751 | 756 |
| 757 vp9_avg_8x8 = vp9_avg_8x8_c; |
| 758 if (flags & HAS_SSE2) vp9_avg_8x8 = vp9_avg_8x8_sse2; |
752 vp9_convolve8 = vp9_convolve8_c; | 759 vp9_convolve8 = vp9_convolve8_c; |
753 if (flags & HAS_SSE2) vp9_convolve8 = vp9_convolve8_sse2; | 760 if (flags & HAS_SSE2) vp9_convolve8 = vp9_convolve8_sse2; |
754 if (flags & HAS_SSSE3) vp9_convolve8 = vp9_convolve8_ssse3; | 761 if (flags & HAS_SSSE3) vp9_convolve8 = vp9_convolve8_ssse3; |
755 vp9_convolve8_avg = vp9_convolve8_avg_c; | 762 vp9_convolve8_avg = vp9_convolve8_avg_c; |
756 if (flags & HAS_SSE2) vp9_convolve8_avg = vp9_convolve8_avg_sse2; | 763 if (flags & HAS_SSE2) vp9_convolve8_avg = vp9_convolve8_avg_sse2; |
757 if (flags & HAS_SSSE3) vp9_convolve8_avg = vp9_convolve8_avg_ssse3; | 764 if (flags & HAS_SSSE3) vp9_convolve8_avg = vp9_convolve8_avg_ssse3; |
758 vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_c; | 765 vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_c; |
759 if (flags & HAS_SSE2) vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_sse2
; | 766 if (flags & HAS_SSE2) vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_sse2
; |
760 if (flags & HAS_SSSE3) vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_sss
e3; | 767 if (flags & HAS_SSSE3) vp9_convolve8_avg_horiz = vp9_convolve8_avg_horiz_sss
e3; |
761 vp9_convolve8_avg_vert = vp9_convolve8_avg_vert_c; | 768 vp9_convolve8_avg_vert = vp9_convolve8_avg_vert_c; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 vp9_lpf_vertical_16_dual = vp9_lpf_vertical_16_dual_c; | 846 vp9_lpf_vertical_16_dual = vp9_lpf_vertical_16_dual_c; |
840 if (flags & HAS_SSE2) vp9_lpf_vertical_16_dual = vp9_lpf_vertical_16_dual_ss
e2; | 847 if (flags & HAS_SSE2) vp9_lpf_vertical_16_dual = vp9_lpf_vertical_16_dual_ss
e2; |
841 vp9_lpf_vertical_4 = vp9_lpf_vertical_4_c; | 848 vp9_lpf_vertical_4 = vp9_lpf_vertical_4_c; |
842 if (flags & HAS_MMX) vp9_lpf_vertical_4 = vp9_lpf_vertical_4_mmx; | 849 if (flags & HAS_MMX) vp9_lpf_vertical_4 = vp9_lpf_vertical_4_mmx; |
843 vp9_lpf_vertical_4_dual = vp9_lpf_vertical_4_dual_c; | 850 vp9_lpf_vertical_4_dual = vp9_lpf_vertical_4_dual_c; |
844 if (flags & HAS_SSE2) vp9_lpf_vertical_4_dual = vp9_lpf_vertical_4_dual_sse2
; | 851 if (flags & HAS_SSE2) vp9_lpf_vertical_4_dual = vp9_lpf_vertical_4_dual_sse2
; |
845 vp9_lpf_vertical_8 = vp9_lpf_vertical_8_c; | 852 vp9_lpf_vertical_8 = vp9_lpf_vertical_8_c; |
846 if (flags & HAS_SSE2) vp9_lpf_vertical_8 = vp9_lpf_vertical_8_sse2; | 853 if (flags & HAS_SSE2) vp9_lpf_vertical_8 = vp9_lpf_vertical_8_sse2; |
847 vp9_lpf_vertical_8_dual = vp9_lpf_vertical_8_dual_c; | 854 vp9_lpf_vertical_8_dual = vp9_lpf_vertical_8_dual_c; |
848 if (flags & HAS_SSE2) vp9_lpf_vertical_8_dual = vp9_lpf_vertical_8_dual_sse2
; | 855 if (flags & HAS_SSE2) vp9_lpf_vertical_8_dual = vp9_lpf_vertical_8_dual_sse2
; |
| 856 vp9_quantize_b = vp9_quantize_b_c; |
| 857 if (flags & HAS_SSE2) vp9_quantize_b = vp9_quantize_b_sse2; |
849 vp9_sad16x16x3 = vp9_sad16x16x3_c; | 858 vp9_sad16x16x3 = vp9_sad16x16x3_c; |
850 if (flags & HAS_SSE3) vp9_sad16x16x3 = vp9_sad16x16x3_sse3; | 859 if (flags & HAS_SSE3) vp9_sad16x16x3 = vp9_sad16x16x3_sse3; |
851 if (flags & HAS_SSSE3) vp9_sad16x16x3 = vp9_sad16x16x3_ssse3; | 860 if (flags & HAS_SSSE3) vp9_sad16x16x3 = vp9_sad16x16x3_ssse3; |
852 vp9_sad16x16x4d = vp9_sad16x16x4d_c; | 861 vp9_sad16x16x4d = vp9_sad16x16x4d_c; |
853 if (flags & HAS_SSE2) vp9_sad16x16x4d = vp9_sad16x16x4d_sse2; | 862 if (flags & HAS_SSE2) vp9_sad16x16x4d = vp9_sad16x16x4d_sse2; |
854 vp9_sad16x32x4d = vp9_sad16x32x4d_c; | 863 vp9_sad16x32x4d = vp9_sad16x32x4d_c; |
855 if (flags & HAS_SSE2) vp9_sad16x32x4d = vp9_sad16x32x4d_sse2; | 864 if (flags & HAS_SSE2) vp9_sad16x32x4d = vp9_sad16x32x4d_sse2; |
856 vp9_sad16x8x3 = vp9_sad16x8x3_c; | 865 vp9_sad16x8x3 = vp9_sad16x8x3_c; |
857 if (flags & HAS_SSE3) vp9_sad16x8x3 = vp9_sad16x8x3_sse3; | 866 if (flags & HAS_SSE3) vp9_sad16x8x3 = vp9_sad16x8x3_sse3; |
858 if (flags & HAS_SSSE3) vp9_sad16x8x3 = vp9_sad16x8x3_ssse3; | 867 if (flags & HAS_SSSE3) vp9_sad16x8x3 = vp9_sad16x8x3_ssse3; |
(...skipping 28 matching lines...) Expand all Loading... |
887 vp9_temporal_filter_apply = vp9_temporal_filter_apply_c; | 896 vp9_temporal_filter_apply = vp9_temporal_filter_apply_c; |
888 if (flags & HAS_SSE2) vp9_temporal_filter_apply = vp9_temporal_filter_apply_
sse2; | 897 if (flags & HAS_SSE2) vp9_temporal_filter_apply = vp9_temporal_filter_apply_
sse2; |
889 } | 898 } |
890 #endif | 899 #endif |
891 | 900 |
892 #ifdef __cplusplus | 901 #ifdef __cplusplus |
893 } // extern "C" | 902 } // extern "C" |
894 #endif | 903 #endif |
895 | 904 |
896 #endif | 905 #endif |
OLD | NEW |