Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: third_party/libvpx_new/source/config/win/ia32/vp9_rtcd.h

Issue 1734613003: Move libvpx_new to libvpx (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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_common.h"
16 #include "vp9/common/vp9_enums.h"
17
18 struct macroblockd;
19
20 /* Encoder forward decls */
21 struct macroblock;
22 struct vp9_variance_vtable;
23 struct search_site_config;
24 struct mv;
25 union int_mv;
26 struct yv12_buffer_config;
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
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);
33 int64_t vp9_block_error_sse2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
34 int64_t vp9_block_error_avx2(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
35 RTCD_EXTERN int64_t (*vp9_block_error)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz);
36
37 int64_t vp9_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, int b lock_size);
38 int64_t vp9_block_error_fp_sse2(const int16_t *coeff, const int16_t *dqcoeff, in t block_size);
39 RTCD_EXTERN int64_t (*vp9_block_error_fp)(const int16_t *coeff, const int16_t *d qcoeff, int block_size);
40
41 int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, const uint8_t *mc_ avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BL OCK_SIZE bs, int motion_magnitude);
42 int vp9_denoiser_filter_sse2(const uint8_t *sig, int sig_stride, const uint8_t * mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude);
43 RTCD_EXTERN int (*vp9_denoiser_filter)(const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_ denoising, BLOCK_SIZE bs, int motion_magnitude);
44
45 int vp9_diamond_search_sad_c(const struct macroblock *x, const struct search_sit e_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);
46 int vp9_diamond_search_sad_avx(const struct macroblock *x, const struct search_s ite_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int s ad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct m v *center_mv);
47 RTCD_EXTERN int (*vp9_diamond_search_sad)(const struct macroblock *x, const stru ct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_p aram, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, con st struct mv *center_mv);
48
49 void 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 *zbin_ptr, const int16_t *rou nd_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qc oeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr , const int16_t *scan, const int16_t *iscan);
50 void vp9_fdct8x8_quant_sse2(const int16_t *input, int stride, 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_ptr, const int16_t *quant_shift_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);
51 void vp9_fdct8x8_quant_ssse3(const int16_t *input, int stride, 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_ptr, const int16_t *quant_shift_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);
52 RTCD_EXTERN void (*vp9_fdct8x8_quant)(const int16_t *input, int stride, 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_ptr, const int16_t *quant_shift_ptr, t ran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint 16_t *eob_ptr, const int16_t *scan, const int16_t *iscan);
53
54 void vp9_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx _type);
55 void vp9_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, int tx_type);
56 RTCD_EXTERN void (*vp9_fht16x16)(const int16_t *input, tran_low_t *output, int s tride, int tx_type);
57
58 void vp9_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_t ype);
59 void vp9_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, int t x_type);
60 RTCD_EXTERN void (*vp9_fht4x4)(const int16_t *input, tran_low_t *output, int str ide, int tx_type);
61
62 void vp9_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_t ype);
63 void vp9_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, int t x_type);
64 RTCD_EXTERN void (*vp9_fht8x8)(const int16_t *input, tran_low_t *output, int str ide, int tx_type);
65
66 void vp9_filter_by_weight16x16_c(const uint8_t *src, int src_stride, uint8_t *ds t, int dst_stride, int src_weight);
67 void vp9_filter_by_weight16x16_sse2(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight);
68 RTCD_EXTERN void (*vp9_filter_by_weight16x16)(const uint8_t *src, int src_stride , uint8_t *dst, int dst_stride, int src_weight);
69
70 void vp9_filter_by_weight8x8_c(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight);
71 void vp9_filter_by_weight8x8_sse2(const uint8_t *src, int src_stride, uint8_t *d st, int dst_stride, int src_weight);
72 RTCD_EXTERN void (*vp9_filter_by_weight8x8)(const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight);
73
74 int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, i nt sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const st ruct mv *center_mv, struct mv *best_mv);
75 int vp9_full_search_sadx3(const struct macroblock *x, const struct mv *ref_mv, i nt sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const st ruct mv *center_mv, struct mv *best_mv);
76 int vp9_full_search_sadx8(const struct macroblock *x, const struct mv *ref_mv, i nt sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const st ruct mv *center_mv, struct mv *best_mv);
77 RTCD_EXTERN int (*vp9_full_search_sad)(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);
78
79 void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride);
80 void vp9_fwht4x4_mmx(const int16_t *input, tran_low_t *output, int stride);
81 RTCD_EXTERN void (*vp9_fwht4x4)(const int16_t *input, tran_low_t *output, int st ride);
82
83 void vp9_iht16x16_256_add_c(const tran_low_t *input, uint8_t *output, int pitch, int tx_type);
84 void vp9_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *output, int pit ch, int tx_type);
85 RTCD_EXTERN void (*vp9_iht16x16_256_add)(const tran_low_t *input, uint8_t *outpu t, int pitch, int tx_type);
86
87 void vp9_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride , int tx_type);
88 void vp9_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int dest_str ide, int tx_type);
89 RTCD_EXTERN void (*vp9_iht4x4_16_add)(const tran_low_t *input, uint8_t *dest, in t dest_stride, int tx_type);
90
91 void vp9_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride , int tx_type);
92 void vp9_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int dest_str ide, int tx_type);
93 RTCD_EXTERN void (*vp9_iht8x8_64_add)(const tran_low_t *input, uint8_t *dest, in t dest_stride, int tx_type);
94
95 void vp9_mbpost_proc_across_ip_c(uint8_t *src, int pitch, int rows, int cols, in t flimit);
96 void vp9_mbpost_proc_across_ip_xmm(uint8_t *src, int pitch, int rows, int cols, int flimit);
97 RTCD_EXTERN void (*vp9_mbpost_proc_across_ip)(uint8_t *src, int pitch, int rows, int cols, int flimit);
98
99 void vp9_mbpost_proc_down_c(uint8_t *dst, int pitch, int rows, int cols, int fli mit);
100 void vp9_mbpost_proc_down_xmm(uint8_t *dst, int pitch, int rows, int cols, int f limit);
101 RTCD_EXTERN void (*vp9_mbpost_proc_down)(uint8_t *dst, int pitch, int rows, int cols, int flimit);
102
103 void vp9_plane_add_noise_c(uint8_t *Start, char *noise, char blackclamp[16], cha r whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, i nt Pitch);
104 void vp9_plane_add_noise_wmt(uint8_t *Start, char *noise, char blackclamp[16], c har whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, int Pitch);
105 RTCD_EXTERN void (*vp9_plane_add_noise)(uint8_t *Start, char *noise, char blackc lamp[16], char whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, int Pitch);
106
107 void vp9_post_proc_down_and_across_c(const uint8_t *src_ptr, uint8_t *dst_ptr, i nt src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit) ;
108 void vp9_post_proc_down_and_across_xmm(const uint8_t *src_ptr, uint8_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimi t);
109 RTCD_EXTERN void (*vp9_post_proc_down_and_across)(const uint8_t *src_ptr, uint8_ t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols , int flimit);
110
111 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, uint16_t *eob_ptr, const int16_t *scan, const i nt16_t *iscan);
112 void vp9_quantize_fp_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int sk ip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quan t_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoe ff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, cons t int16_t *iscan);
113 RTCD_EXTERN void (*vp9_quantize_fp)(const tran_low_t *coeff_ptr, intptr_t n_coef fs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int 16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_lo w_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t * scan, const int16_t *iscan);
114
115 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, uint16_t *eob_ptr, const int16_t *scan, c onst int16_t *iscan);
116 #define vp9_quantize_fp_32x32 vp9_quantize_fp_32x32_c
117
118 void vp9_scale_and_extend_frame_c(const struct yv12_buffer_config *src, struct y v12_buffer_config *dst);
119 void vp9_scale_and_extend_frame_ssse3(const struct yv12_buffer_config *src, stru ct yv12_buffer_config *dst);
120 RTCD_EXTERN void (*vp9_scale_and_extend_frame)(const struct yv12_buffer_config * src, struct yv12_buffer_config *dst);
121
122 void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t * frame2, unsigned int block_width, unsigned int block_height, int strength, int f ilter_weight, unsigned int *accumulator, uint16_t *count);
123 void vp9_temporal_filter_apply_sse2(uint8_t *frame1, unsigned int stride, uint8_ t *frame2, unsigned int block_width, unsigned int block_height, int strength, in t filter_weight, unsigned int *accumulator, uint16_t *count);
124 RTCD_EXTERN void (*vp9_temporal_filter_apply)(uint8_t *frame1, unsigned int stri de, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int st rength, int filter_weight, unsigned int *accumulator, uint16_t *count);
125
126 void vp9_rtcd(void);
127
128 #ifdef RTCD_C
129 #include "vpx_ports/x86.h"
130 static void setup_rtcd_internal(void)
131 {
132 int flags = x86_simd_caps();
133
134 (void)flags;
135
136 vp9_block_error = vp9_block_error_c;
137 if (flags & HAS_SSE2) vp9_block_error = vp9_block_error_sse2;
138 if (flags & HAS_AVX2) vp9_block_error = vp9_block_error_avx2;
139 vp9_block_error_fp = vp9_block_error_fp_c;
140 if (flags & HAS_SSE2) vp9_block_error_fp = vp9_block_error_fp_sse2;
141 vp9_denoiser_filter = vp9_denoiser_filter_c;
142 if (flags & HAS_SSE2) vp9_denoiser_filter = vp9_denoiser_filter_sse2;
143 vp9_diamond_search_sad = vp9_diamond_search_sad_c;
144 if (flags & HAS_AVX) vp9_diamond_search_sad = vp9_diamond_search_sad_avx;
145 vp9_fdct8x8_quant = vp9_fdct8x8_quant_c;
146 if (flags & HAS_SSE2) vp9_fdct8x8_quant = vp9_fdct8x8_quant_sse2;
147 if (flags & HAS_SSSE3) vp9_fdct8x8_quant = vp9_fdct8x8_quant_ssse3;
148 vp9_fht16x16 = vp9_fht16x16_c;
149 if (flags & HAS_SSE2) vp9_fht16x16 = vp9_fht16x16_sse2;
150 vp9_fht4x4 = vp9_fht4x4_c;
151 if (flags & HAS_SSE2) vp9_fht4x4 = vp9_fht4x4_sse2;
152 vp9_fht8x8 = vp9_fht8x8_c;
153 if (flags & HAS_SSE2) vp9_fht8x8 = vp9_fht8x8_sse2;
154 vp9_filter_by_weight16x16 = vp9_filter_by_weight16x16_c;
155 if (flags & HAS_SSE2) vp9_filter_by_weight16x16 = vp9_filter_by_weight16x16_ sse2;
156 vp9_filter_by_weight8x8 = vp9_filter_by_weight8x8_c;
157 if (flags & HAS_SSE2) vp9_filter_by_weight8x8 = vp9_filter_by_weight8x8_sse2 ;
158 vp9_full_search_sad = vp9_full_search_sad_c;
159 if (flags & HAS_SSE3) vp9_full_search_sad = vp9_full_search_sadx3;
160 if (flags & HAS_SSE4_1) vp9_full_search_sad = vp9_full_search_sadx8;
161 vp9_fwht4x4 = vp9_fwht4x4_c;
162 if (flags & HAS_MMX) vp9_fwht4x4 = vp9_fwht4x4_mmx;
163 vp9_iht16x16_256_add = vp9_iht16x16_256_add_c;
164 if (flags & HAS_SSE2) vp9_iht16x16_256_add = vp9_iht16x16_256_add_sse2;
165 vp9_iht4x4_16_add = vp9_iht4x4_16_add_c;
166 if (flags & HAS_SSE2) vp9_iht4x4_16_add = vp9_iht4x4_16_add_sse2;
167 vp9_iht8x8_64_add = vp9_iht8x8_64_add_c;
168 if (flags & HAS_SSE2) vp9_iht8x8_64_add = vp9_iht8x8_64_add_sse2;
169 vp9_mbpost_proc_across_ip = vp9_mbpost_proc_across_ip_c;
170 if (flags & HAS_SSE2) vp9_mbpost_proc_across_ip = vp9_mbpost_proc_across_ip_ xmm;
171 vp9_mbpost_proc_down = vp9_mbpost_proc_down_c;
172 if (flags & HAS_SSE2) vp9_mbpost_proc_down = vp9_mbpost_proc_down_xmm;
173 vp9_plane_add_noise = vp9_plane_add_noise_c;
174 if (flags & HAS_SSE2) vp9_plane_add_noise = vp9_plane_add_noise_wmt;
175 vp9_post_proc_down_and_across = vp9_post_proc_down_and_across_c;
176 if (flags & HAS_SSE2) vp9_post_proc_down_and_across = vp9_post_proc_down_and _across_xmm;
177 vp9_quantize_fp = vp9_quantize_fp_c;
178 if (flags & HAS_SSE2) vp9_quantize_fp = vp9_quantize_fp_sse2;
179 vp9_scale_and_extend_frame = vp9_scale_and_extend_frame_c;
180 if (flags & HAS_SSSE3) vp9_scale_and_extend_frame = vp9_scale_and_extend_fra me_ssse3;
181 vp9_temporal_filter_apply = vp9_temporal_filter_apply_c;
182 if (flags & HAS_SSE2) vp9_temporal_filter_apply = vp9_temporal_filter_apply_ sse2;
183 }
184 #endif
185
186 #ifdef __cplusplus
187 } // extern "C"
188 #endif
189
190 #endif
OLDNEW
« no previous file with comments | « third_party/libvpx_new/source/config/win/ia32/vp8_rtcd.h ('k') | third_party/libvpx_new/source/config/win/ia32/vpx_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698