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

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

Issue 232133009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 8 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
11 #include "./vp9_rtcd.h" 11 #include "./vp9_rtcd.h"
12 #include "vp9/common/vp9_filter.h" 12 #include "vp9/common/vp9_filter.h"
13 #include "vp9/common/vp9_scale.h" 13 #include "vp9/common/vp9_scale.h"
14 14
15 static INLINE int scaled_x(int val, const struct scale_factors *sf) { 15 static INLINE int scaled_x(int val, const struct scale_factors *sf) {
16 return val * sf->x_scale_fp >> REF_SCALE_SHIFT; 16 return (int)((int64_t)val * sf->x_scale_fp >> REF_SCALE_SHIFT);
17 } 17 }
18 18
19 static INLINE int scaled_y(int val, const struct scale_factors *sf) { 19 static INLINE int scaled_y(int val, const struct scale_factors *sf) {
20 return val * sf->y_scale_fp >> REF_SCALE_SHIFT; 20 return (int)((int64_t)val * sf->y_scale_fp >> REF_SCALE_SHIFT);
21 } 21 }
22 22
23 static int unscaled_value(int val, const struct scale_factors *sf) { 23 static int unscaled_value(int val, const struct scale_factors *sf) {
24 (void) sf; 24 (void) sf;
25 return val; 25 return val;
26 } 26 }
27 27
28 static int get_fixed_point_scale_factor(int other_size, int this_size) { 28 static int get_fixed_point_scale_factor(int other_size, int this_size) {
29 // Calculate scaling factor once for each reference frame 29 // Calculate scaling factor once for each reference frame
30 // and use fixed point scaling factors in decoding and encoding routines. 30 // and use fixed point scaling factors in decoding and encoding routines.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 sf->predict[0][1][0] = vp9_convolve8; 113 sf->predict[0][1][0] = vp9_convolve8;
114 sf->predict[0][1][1] = vp9_convolve8_avg; 114 sf->predict[0][1][1] = vp9_convolve8_avg;
115 sf->predict[1][0][0] = vp9_convolve8; 115 sf->predict[1][0][0] = vp9_convolve8;
116 sf->predict[1][0][1] = vp9_convolve8_avg; 116 sf->predict[1][0][1] = vp9_convolve8_avg;
117 } 117 }
118 } 118 }
119 // 2D subpel motion always gets filtered in both directions 119 // 2D subpel motion always gets filtered in both directions
120 sf->predict[1][1][0] = vp9_convolve8; 120 sf->predict[1][1][0] = vp9_convolve8;
121 sf->predict[1][1][1] = vp9_convolve8_avg; 121 sf->predict[1][1][1] = vp9_convolve8_avg;
122 } 122 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_rtcd_defs.sh ('k') | source/libvpx/vp9/common/vp9_systemdependent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698