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

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

Issue 111463005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years 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_sadmxn.h ('k') | source/libvpx/vp9/encoder/vp9_subexp.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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (cm->frame_type != KEY_FRAME) { 142 if (cm->frame_type != KEY_FRAME) {
143 const BLOCK_SIZE bsize = mi_8x8[0]->mbmi.sb_type; 143 const BLOCK_SIZE bsize = mi_8x8[0]->mbmi.sb_type;
144 // Test to see if the segment id matches the predicted value. 144 // Test to see if the segment id matches the predicted value.
145 const int pred_segment_id = vp9_get_segment_id(cm, cm->last_frame_seg_map, 145 const int pred_segment_id = vp9_get_segment_id(cm, cm->last_frame_seg_map,
146 bsize, mi_row, mi_col); 146 bsize, mi_row, mi_col);
147 const int pred_flag = pred_segment_id == segment_id; 147 const int pred_flag = pred_segment_id == segment_id;
148 const int pred_context = vp9_get_pred_context_seg_id(xd); 148 const int pred_context = vp9_get_pred_context_seg_id(xd);
149 149
150 // Store the prediction status for this mb and update counts 150 // Store the prediction status for this mb and update counts
151 // as appropriate 151 // as appropriate
152 vp9_set_pred_flag_seg_id(xd, pred_flag); 152 xd->mi_8x8[0]->mbmi.seg_id_predicted = pred_flag;
153 temporal_predictor_count[pred_context][pred_flag]++; 153 temporal_predictor_count[pred_context][pred_flag]++;
154 154
155 if (!pred_flag) 155 if (!pred_flag)
156 // Update the "unpredicted" segment count 156 // Update the "unpredicted" segment count
157 t_unpred_seg_counts[segment_id]++; 157 t_unpred_seg_counts[segment_id]++;
158 } 158 }
159 } 159 }
160 160
161 static void count_segs_sb(VP9_COMP *cpi, const TileInfo *const tile, 161 static void count_segs_sb(VP9_COMP *cpi, const TileInfo *const tile,
162 MODE_INFO **mi_8x8, 162 MODE_INFO **mi_8x8,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // Now choose which coding method to use. 280 // Now choose which coding method to use.
281 if (t_pred_cost < no_pred_cost) { 281 if (t_pred_cost < no_pred_cost) {
282 seg->temporal_update = 1; 282 seg->temporal_update = 1;
283 vpx_memcpy(seg->tree_probs, t_pred_tree, sizeof(t_pred_tree)); 283 vpx_memcpy(seg->tree_probs, t_pred_tree, sizeof(t_pred_tree));
284 vpx_memcpy(seg->pred_probs, t_nopred_prob, sizeof(t_nopred_prob)); 284 vpx_memcpy(seg->pred_probs, t_nopred_prob, sizeof(t_nopred_prob));
285 } else { 285 } else {
286 seg->temporal_update = 0; 286 seg->temporal_update = 0;
287 vpx_memcpy(seg->tree_probs, no_pred_tree, sizeof(no_pred_tree)); 287 vpx_memcpy(seg->tree_probs, no_pred_tree, sizeof(no_pred_tree));
288 } 288 }
289 } 289 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_sadmxn.h ('k') | source/libvpx/vp9/encoder/vp9_subexp.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698