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

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

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 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
« no previous file with comments | « source/libvpx/vp9/common/vp9_rtcd_defs.pl ('k') | source/libvpx/vp9/common/vp9_scale.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 14 matching lines...) Expand all
25 struct scale_factors { 25 struct scale_factors {
26 int x_scale_fp; // horizontal fixed point scale factor 26 int x_scale_fp; // horizontal fixed point scale factor
27 int y_scale_fp; // vertical fixed point scale factor 27 int y_scale_fp; // vertical fixed point scale factor
28 int x_step_q4; 28 int x_step_q4;
29 int y_step_q4; 29 int y_step_q4;
30 30
31 int (*scale_value_x)(int val, const struct scale_factors *sf); 31 int (*scale_value_x)(int val, const struct scale_factors *sf);
32 int (*scale_value_y)(int val, const struct scale_factors *sf); 32 int (*scale_value_y)(int val, const struct scale_factors *sf);
33 33
34 convolve_fn_t predict[2][2][2]; // horiz, vert, avg 34 convolve_fn_t predict[2][2][2]; // horiz, vert, avg
35 #if CONFIG_VP9_HIGHBITDEPTH
36 high_convolve_fn_t high_predict[2][2][2]; // horiz, vert, avg
37 #endif
35 }; 38 };
36 39
37 MV32 vp9_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf); 40 MV32 vp9_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf);
38 41
42 #if CONFIG_VP9_HIGHBITDEPTH
43 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf,
44 int other_w, int other_h,
45 int this_w, int this_h,
46 int use_high);
47 #else
39 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf, 48 void vp9_setup_scale_factors_for_frame(struct scale_factors *sf,
40 int other_w, int other_h, 49 int other_w, int other_h,
41 int this_w, int this_h); 50 int this_w, int this_h);
51 #endif
42 52
43 static INLINE int vp9_is_valid_scale(const struct scale_factors *sf) { 53 static INLINE int vp9_is_valid_scale(const struct scale_factors *sf) {
44 return sf->x_scale_fp != REF_INVALID_SCALE && 54 return sf->x_scale_fp != REF_INVALID_SCALE &&
45 sf->y_scale_fp != REF_INVALID_SCALE; 55 sf->y_scale_fp != REF_INVALID_SCALE;
46 } 56 }
47 57
48 static INLINE int vp9_is_scaled(const struct scale_factors *sf) { 58 static INLINE int vp9_is_scaled(const struct scale_factors *sf) {
49 return vp9_is_valid_scale(sf) && 59 return vp9_is_valid_scale(sf) &&
50 (sf->x_scale_fp != REF_NO_SCALE || sf->y_scale_fp != REF_NO_SCALE); 60 (sf->x_scale_fp != REF_NO_SCALE || sf->y_scale_fp != REF_NO_SCALE);
51 } 61 }
52 62
53 static INLINE int valid_ref_frame_size(int ref_width, int ref_height, 63 static INLINE int valid_ref_frame_size(int ref_width, int ref_height,
54 int this_width, int this_height) { 64 int this_width, int this_height) {
55 return 2 * this_width >= ref_width && 65 return 2 * this_width >= ref_width &&
56 2 * this_height >= ref_height && 66 2 * this_height >= ref_height &&
57 this_width <= 16 * ref_width && 67 this_width <= 16 * ref_width &&
58 this_height <= 16 * ref_height; 68 this_height <= 16 * ref_height;
59 } 69 }
60 70
61 #ifdef __cplusplus 71 #ifdef __cplusplus
62 } // extern "C" 72 } // extern "C"
63 #endif 73 #endif
64 74
65 #endif // VP9_COMMON_VP9_SCALE_H_ 75 #endif // VP9_COMMON_VP9_SCALE_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_rtcd_defs.pl ('k') | source/libvpx/vp9/common/vp9_scale.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698