OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 208 } |
209 } | 209 } |
210 | 210 |
211 void vp8_vertical_band_2_1_scale_c(unsigned char *source, | 211 void vp8_vertical_band_2_1_scale_c(unsigned char *source, |
212 unsigned int src_pitch, | 212 unsigned int src_pitch, |
213 unsigned char *dest, | 213 unsigned char *dest, |
214 unsigned int dest_pitch, | 214 unsigned int dest_pitch, |
215 unsigned int dest_width) { | 215 unsigned int dest_width) { |
216 (void) dest_pitch; | 216 (void) dest_pitch; |
217 (void) src_pitch; | 217 (void) src_pitch; |
218 vpx_memcpy(dest, source, dest_width); | 218 memcpy(dest, source, dest_width); |
219 } | 219 } |
220 | 220 |
221 void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, | 221 void vp8_vertical_band_2_1_scale_i_c(unsigned char *source, |
222 unsigned int src_pitch, | 222 unsigned int src_pitch, |
223 unsigned char *dest, | 223 unsigned char *dest, |
224 unsigned int dest_pitch, | 224 unsigned int dest_pitch, |
225 unsigned int dest_width) { | 225 unsigned int dest_width) { |
226 int i; | 226 int i; |
227 int temp; | 227 int temp; |
228 int width = dest_width; | 228 int width = dest_width; |
229 | 229 |
230 (void) dest_pitch; | 230 (void) dest_pitch; |
231 | 231 |
232 for (i = 0; i < width; i++) { | 232 for (i = 0; i < width; i++) { |
233 temp = 8; | 233 temp = 8; |
234 temp += source[i - (int)src_pitch] * 3; | 234 temp += source[i - (int)src_pitch] * 3; |
235 temp += source[i] * 10; | 235 temp += source[i] * 10; |
236 temp += source[i + src_pitch] * 3; | 236 temp += source[i + src_pitch] * 3; |
237 temp >>= 4; | 237 temp >>= 4; |
238 dest[i] = (unsigned char)(temp); | 238 dest[i] = (unsigned char)(temp); |
239 } | 239 } |
240 } | 240 } |
OLD | NEW |