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

Side by Side Diff: source/libvpx/vp9/common/vp9_convolve.c

Issue 290653003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 void vp9_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, 151 void vp9_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride,
152 uint8_t *dst, ptrdiff_t dst_stride, 152 uint8_t *dst, ptrdiff_t dst_stride,
153 const int16_t *filter_x, int x_step_q4, 153 const int16_t *filter_x, int x_step_q4,
154 const int16_t *filter_y, int y_step_q4, 154 const int16_t *filter_y, int y_step_q4,
155 int w, int h) { 155 int w, int h) {
156 const InterpKernel *const filters_x = get_filter_base(filter_x); 156 const InterpKernel *const filters_x = get_filter_base(filter_x);
157 const int x0_q4 = get_filter_offset(filter_x, filters_x); 157 const int x0_q4 = get_filter_offset(filter_x, filters_x);
158 158
159 (void)filter_y;
160 (void)y_step_q4;
161
159 convolve_horiz(src, src_stride, dst, dst_stride, filters_x, 162 convolve_horiz(src, src_stride, dst, dst_stride, filters_x,
160 x0_q4, x_step_q4, w, h); 163 x0_q4, x_step_q4, w, h);
161 } 164 }
162 165
163 void vp9_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, 166 void vp9_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride,
164 uint8_t *dst, ptrdiff_t dst_stride, 167 uint8_t *dst, ptrdiff_t dst_stride,
165 const int16_t *filter_x, int x_step_q4, 168 const int16_t *filter_x, int x_step_q4,
166 const int16_t *filter_y, int y_step_q4, 169 const int16_t *filter_y, int y_step_q4,
167 int w, int h) { 170 int w, int h) {
168 const InterpKernel *const filters_x = get_filter_base(filter_x); 171 const InterpKernel *const filters_x = get_filter_base(filter_x);
169 const int x0_q4 = get_filter_offset(filter_x, filters_x); 172 const int x0_q4 = get_filter_offset(filter_x, filters_x);
170 173
174 (void)filter_y;
175 (void)y_step_q4;
176
171 convolve_avg_horiz(src, src_stride, dst, dst_stride, filters_x, 177 convolve_avg_horiz(src, src_stride, dst, dst_stride, filters_x,
172 x0_q4, x_step_q4, w, h); 178 x0_q4, x_step_q4, w, h);
173 } 179 }
174 180
175 void vp9_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, 181 void vp9_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride,
176 uint8_t *dst, ptrdiff_t dst_stride, 182 uint8_t *dst, ptrdiff_t dst_stride,
177 const int16_t *filter_x, int x_step_q4, 183 const int16_t *filter_x, int x_step_q4,
178 const int16_t *filter_y, int y_step_q4, 184 const int16_t *filter_y, int y_step_q4,
179 int w, int h) { 185 int w, int h) {
180 const InterpKernel *const filters_y = get_filter_base(filter_y); 186 const InterpKernel *const filters_y = get_filter_base(filter_y);
181 const int y0_q4 = get_filter_offset(filter_y, filters_y); 187 const int y0_q4 = get_filter_offset(filter_y, filters_y);
188
189 (void)filter_x;
190 (void)x_step_q4;
191
182 convolve_vert(src, src_stride, dst, dst_stride, filters_y, 192 convolve_vert(src, src_stride, dst, dst_stride, filters_y,
183 y0_q4, y_step_q4, w, h); 193 y0_q4, y_step_q4, w, h);
184 } 194 }
185 195
186 void vp9_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, 196 void vp9_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride,
187 uint8_t *dst, ptrdiff_t dst_stride, 197 uint8_t *dst, ptrdiff_t dst_stride,
188 const int16_t *filter_x, int x_step_q4, 198 const int16_t *filter_x, int x_step_q4,
189 const int16_t *filter_y, int y_step_q4, 199 const int16_t *filter_y, int y_step_q4,
190 int w, int h) { 200 int w, int h) {
191 const InterpKernel *const filters_y = get_filter_base(filter_y); 201 const InterpKernel *const filters_y = get_filter_base(filter_y);
192 const int y0_q4 = get_filter_offset(filter_y, filters_y); 202 const int y0_q4 = get_filter_offset(filter_y, filters_y);
203
204 (void)filter_x;
205 (void)x_step_q4;
206
193 convolve_avg_vert(src, src_stride, dst, dst_stride, filters_y, 207 convolve_avg_vert(src, src_stride, dst, dst_stride, filters_y,
194 y0_q4, y_step_q4, w, h); 208 y0_q4, y_step_q4, w, h);
195 } 209 }
196 210
197 void vp9_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, 211 void vp9_convolve8_c(const uint8_t *src, ptrdiff_t src_stride,
198 uint8_t *dst, ptrdiff_t dst_stride, 212 uint8_t *dst, ptrdiff_t dst_stride,
199 const int16_t *filter_x, int x_step_q4, 213 const int16_t *filter_x, int x_step_q4,
200 const int16_t *filter_y, int y_step_q4, 214 const int16_t *filter_y, int y_step_q4,
201 int w, int h) { 215 int w, int h) {
202 const InterpKernel *const filters_x = get_filter_base(filter_x); 216 const InterpKernel *const filters_x = get_filter_base(filter_x);
(...skipping 22 matching lines...) Expand all
225 vp9_convolve_avg_c(temp, 64, dst, dst_stride, NULL, 0, NULL, 0, w, h); 239 vp9_convolve_avg_c(temp, 64, dst, dst_stride, NULL, 0, NULL, 0, w, h);
226 } 240 }
227 241
228 void vp9_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, 242 void vp9_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride,
229 uint8_t *dst, ptrdiff_t dst_stride, 243 uint8_t *dst, ptrdiff_t dst_stride,
230 const int16_t *filter_x, int filter_x_stride, 244 const int16_t *filter_x, int filter_x_stride,
231 const int16_t *filter_y, int filter_y_stride, 245 const int16_t *filter_y, int filter_y_stride,
232 int w, int h) { 246 int w, int h) {
233 int r; 247 int r;
234 248
249 (void)filter_x; (void)filter_x_stride;
250 (void)filter_y; (void)filter_y_stride;
251
235 for (r = h; r > 0; --r) { 252 for (r = h; r > 0; --r) {
236 vpx_memcpy(dst, src, w); 253 vpx_memcpy(dst, src, w);
237 src += src_stride; 254 src += src_stride;
238 dst += dst_stride; 255 dst += dst_stride;
239 } 256 }
240 } 257 }
241 258
242 void vp9_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, 259 void vp9_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride,
243 uint8_t *dst, ptrdiff_t dst_stride, 260 uint8_t *dst, ptrdiff_t dst_stride,
244 const int16_t *filter_x, int filter_x_stride, 261 const int16_t *filter_x, int filter_x_stride,
245 const int16_t *filter_y, int filter_y_stride, 262 const int16_t *filter_y, int filter_y_stride,
246 int w, int h) { 263 int w, int h) {
247 int x, y; 264 int x, y;
248 265
266 (void)filter_x; (void)filter_x_stride;
267 (void)filter_y; (void)filter_y_stride;
268
249 for (y = 0; y < h; ++y) { 269 for (y = 0; y < h; ++y) {
250 for (x = 0; x < w; ++x) 270 for (x = 0; x < w; ++x)
251 dst[x] = ROUND_POWER_OF_TWO(dst[x] + src[x], 1); 271 dst[x] = ROUND_POWER_OF_TWO(dst[x] + src[x], 1);
252 272
253 src += src_stride; 273 src += src_stride;
254 dst += dst_stride; 274 dst += dst_stride;
255 } 275 }
256 } 276 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698