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

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

Issue 1217053002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « source/libvpx/vp9/common/vp9_rtcd_defs.pl ('k') | source/libvpx/vp9/common/vp9_seg_common.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) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 uint8_t abs_delta; 42 uint8_t abs_delta;
43 uint8_t temporal_update; 43 uint8_t temporal_update;
44 44
45 vp9_prob tree_probs[SEG_TREE_PROBS]; 45 vp9_prob tree_probs[SEG_TREE_PROBS];
46 vp9_prob pred_probs[PREDICTION_PROBS]; 46 vp9_prob pred_probs[PREDICTION_PROBS];
47 47
48 int16_t feature_data[MAX_SEGMENTS][SEG_LVL_MAX]; 48 int16_t feature_data[MAX_SEGMENTS][SEG_LVL_MAX];
49 unsigned int feature_mask[MAX_SEGMENTS]; 49 unsigned int feature_mask[MAX_SEGMENTS];
50 }; 50 };
51 51
52 int vp9_segfeature_active(const struct segmentation *seg, 52 static INLINE int segfeature_active(const struct segmentation *seg,
53 int segment_id, 53 int segment_id,
54 SEG_LVL_FEATURES feature_id); 54 SEG_LVL_FEATURES feature_id) {
55 return seg->enabled &&
56 (seg->feature_mask[segment_id] & (1 << feature_id));
57 }
55 58
56 void vp9_clearall_segfeatures(struct segmentation *seg); 59 void vp9_clearall_segfeatures(struct segmentation *seg);
57 60
58 void vp9_enable_segfeature(struct segmentation *seg, 61 void vp9_enable_segfeature(struct segmentation *seg,
59 int segment_id, 62 int segment_id,
60 SEG_LVL_FEATURES feature_id); 63 SEG_LVL_FEATURES feature_id);
61 64
62 int vp9_seg_feature_data_max(SEG_LVL_FEATURES feature_id); 65 int vp9_seg_feature_data_max(SEG_LVL_FEATURES feature_id);
63 66
64 int vp9_is_segfeature_signed(SEG_LVL_FEATURES feature_id); 67 int vp9_is_segfeature_signed(SEG_LVL_FEATURES feature_id);
65 68
66 void vp9_set_segdata(struct segmentation *seg, 69 void vp9_set_segdata(struct segmentation *seg,
67 int segment_id, 70 int segment_id,
68 SEG_LVL_FEATURES feature_id, 71 SEG_LVL_FEATURES feature_id,
69 int seg_data); 72 int seg_data);
70 73
71 int vp9_get_segdata(const struct segmentation *seg, 74 static INLINE int get_segdata(const struct segmentation *seg, int segment_id,
72 int segment_id, 75 SEG_LVL_FEATURES feature_id) {
73 SEG_LVL_FEATURES feature_id); 76 return seg->feature_data[segment_id][feature_id];
77 }
74 78
75 extern const vp9_tree_index vp9_segment_tree[TREE_SIZE(MAX_SEGMENTS)]; 79 extern const vp9_tree_index vp9_segment_tree[TREE_SIZE(MAX_SEGMENTS)];
76 80
77 #ifdef __cplusplus 81 #ifdef __cplusplus
78 } // extern "C" 82 } // extern "C"
79 #endif 83 #endif
80 84
81 #endif // VP9_COMMON_VP9_SEG_COMMON_H_ 85 #endif // VP9_COMMON_VP9_SEG_COMMON_H_
82 86
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_rtcd_defs.pl ('k') | source/libvpx/vp9/common/vp9_seg_common.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698