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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_segmentation.c

Issue 375983002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_rdopt.c ('k') | source/libvpx/vp9/encoder/vp9_speed_features.h » ('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
11 11
12 #include <limits.h> 12 #include <limits.h>
13 13
14 #include "vpx_mem/vpx_mem.h" 14 #include "vpx_mem/vpx_mem.h"
15 15
16 #include "vp9/common/vp9_pred_common.h" 16 #include "vp9/common/vp9_pred_common.h"
17 #include "vp9/common/vp9_tile_common.h" 17 #include "vp9/common/vp9_tile_common.h"
18 18
19 #include "vp9/encoder/vp9_cost.h" 19 #include "vp9/encoder/vp9_cost.h"
20 #include "vp9/encoder/vp9_segmentation.h" 20 #include "vp9/encoder/vp9_segmentation.h"
21 21
22 void vp9_enable_segmentation(struct segmentation *seg) { 22 void vp9_enable_segmentation(struct segmentation *seg) {
23 seg->enabled = 1; 23 seg->enabled = 1;
24 seg->update_map = 1; 24 seg->update_map = 1;
25 seg->update_data = 1; 25 seg->update_data = 1;
26 } 26 }
27 27
28 void vp9_disable_segmentation(struct segmentation *seg) { 28 void vp9_disable_segmentation(struct segmentation *seg) {
29 seg->enabled = 0; 29 seg->enabled = 0;
30 seg->update_map = 0;
31 seg->update_data = 0;
30 } 32 }
31 33
32 void vp9_set_segment_data(struct segmentation *seg, 34 void vp9_set_segment_data(struct segmentation *seg,
33 signed char *feature_data, 35 signed char *feature_data,
34 unsigned char abs_delta) { 36 unsigned char abs_delta) {
35 seg->abs_delta = abs_delta; 37 seg->abs_delta = abs_delta;
36 38
37 vpx_memcpy(seg->feature_data, feature_data, sizeof(seg->feature_data)); 39 vpx_memcpy(seg->feature_data, feature_data, sizeof(seg->feature_data));
38 40
39 // TBD ?? Set the feature mask 41 // TBD ?? Set the feature mask
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 280 }
279 281
280 void vp9_reset_segment_features(struct segmentation *seg) { 282 void vp9_reset_segment_features(struct segmentation *seg) {
281 // Set up default state for MB feature flags 283 // Set up default state for MB feature flags
282 seg->enabled = 0; 284 seg->enabled = 0;
283 seg->update_map = 0; 285 seg->update_map = 0;
284 seg->update_data = 0; 286 seg->update_data = 0;
285 vpx_memset(seg->tree_probs, 255, sizeof(seg->tree_probs)); 287 vpx_memset(seg->tree_probs, 255, sizeof(seg->tree_probs));
286 vp9_clearall_segfeatures(seg); 288 vp9_clearall_segfeatures(seg);
287 } 289 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_rdopt.c ('k') | source/libvpx/vp9/encoder/vp9_speed_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698