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/decoder/vp9_decodemv.c

Issue 1015483002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 /* 1 /*
2 Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 Copyright (c) 2010 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const int xmis = MIN(cm->mi_cols - mi_col, bw); 115 const int xmis = MIN(cm->mi_cols - mi_col, bw);
116 const int ymis = MIN(cm->mi_rows - mi_row, bh); 116 const int ymis = MIN(cm->mi_rows - mi_row, bh);
117 int x, y; 117 int x, y;
118 118
119 for (y = 0; y < ymis; y++) 119 for (y = 0; y < ymis; y++)
120 for (x = 0; x < xmis; x++) 120 for (x = 0; x < xmis; x++)
121 current_segment_ids[mi_offset + y * cm->mi_cols + x] = last_segment_ids ? 121 current_segment_ids[mi_offset + y * cm->mi_cols + x] = last_segment_ids ?
122 last_segment_ids[mi_offset + y * cm->mi_cols + x] : 0; 122 last_segment_ids[mi_offset + y * cm->mi_cols + x] : 0;
123 } 123 }
124 124
125 static int read_intra_segment_id(VP9_COMMON *const cm, MACROBLOCKD *const xd, 125 static int read_intra_segment_id(VP9_COMMON *const cm, BLOCK_SIZE bsize,
126 int mi_row, int mi_col, 126 int mi_row, int mi_col,
127 vp9_reader *r) { 127 vp9_reader *r) {
128 struct segmentation *const seg = &cm->seg; 128 struct segmentation *const seg = &cm->seg;
129 const BLOCK_SIZE bsize = xd->mi[0].src_mi->mbmi.sb_type;
130 int segment_id; 129 int segment_id;
131 130
132 if (!seg->enabled) 131 if (!seg->enabled)
133 return 0; // Default for disabled segmentation 132 return 0; // Default for disabled segmentation
134 133
135 if (!seg->update_map) { 134 if (!seg->update_map) {
136 copy_segment_id(cm, cm->last_frame_seg_map, cm->current_frame_seg_map, 135 copy_segment_id(cm, cm->last_frame_seg_map, cm->current_frame_seg_map,
137 bsize, mi_row, mi_col); 136 bsize, mi_row, mi_col);
138 return 0; 137 return 0;
139 } 138 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 MACROBLOCKD *const xd, 191 MACROBLOCKD *const xd,
193 FRAME_COUNTS *counts, 192 FRAME_COUNTS *counts,
194 int mi_row, int mi_col, vp9_reader *r) { 193 int mi_row, int mi_col, vp9_reader *r) {
195 MODE_INFO *const mi = xd->mi[0].src_mi; 194 MODE_INFO *const mi = xd->mi[0].src_mi;
196 MB_MODE_INFO *const mbmi = &mi->mbmi; 195 MB_MODE_INFO *const mbmi = &mi->mbmi;
197 const MODE_INFO *above_mi = xd->mi[-cm->mi_stride].src_mi; 196 const MODE_INFO *above_mi = xd->mi[-cm->mi_stride].src_mi;
198 const MODE_INFO *left_mi = xd->left_available ? xd->mi[-1].src_mi : NULL; 197 const MODE_INFO *left_mi = xd->left_available ? xd->mi[-1].src_mi : NULL;
199 const BLOCK_SIZE bsize = mbmi->sb_type; 198 const BLOCK_SIZE bsize = mbmi->sb_type;
200 int i; 199 int i;
201 200
202 mbmi->segment_id = read_intra_segment_id(cm, xd, mi_row, mi_col, r); 201 mbmi->segment_id = read_intra_segment_id(cm, bsize, mi_row, mi_col, r);
203 mbmi->skip = read_skip(cm, xd, counts, mbmi->segment_id, r); 202 mbmi->skip = read_skip(cm, xd, counts, mbmi->segment_id, r);
204 mbmi->tx_size = read_tx_size(cm, xd, counts, 1, r); 203 mbmi->tx_size = read_tx_size(cm, xd, counts, 1, r);
205 mbmi->ref_frame[0] = INTRA_FRAME; 204 mbmi->ref_frame[0] = INTRA_FRAME;
206 mbmi->ref_frame[1] = NONE; 205 mbmi->ref_frame[1] = NONE;
207 206
208 switch (bsize) { 207 switch (bsize) {
209 case BLOCK_4X4: 208 case BLOCK_4X4:
210 for (i = 0; i < 4; ++i) 209 for (i = 0; i < 4; ++i)
211 mi->bmi[i].as_mode = 210 mi->bmi[i].as_mode =
212 read_intra_mode(r, get_y_mode_probs(mi, above_mi, left_mi, i)); 211 read_intra_mode(r, get_y_mode_probs(mi, above_mi, left_mi, i));
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 MV_REF *const frame_mv = frame_mvs + h * cm->mi_cols; 605 MV_REF *const frame_mv = frame_mvs + h * cm->mi_cols;
607 for (w = 0; w < x_mis; ++w) { 606 for (w = 0; w < x_mis; ++w) {
608 MV_REF *const mv = frame_mv + w; 607 MV_REF *const mv = frame_mv + w;
609 mv->ref_frame[0] = mi->src_mi->mbmi.ref_frame[0]; 608 mv->ref_frame[0] = mi->src_mi->mbmi.ref_frame[0];
610 mv->ref_frame[1] = mi->src_mi->mbmi.ref_frame[1]; 609 mv->ref_frame[1] = mi->src_mi->mbmi.ref_frame[1];
611 mv->mv[0].as_int = mi->src_mi->mbmi.mv[0].as_int; 610 mv->mv[0].as_int = mi->src_mi->mbmi.mv[0].as_int;
612 mv->mv[1].as_int = mi->src_mi->mbmi.mv[1].as_int; 611 mv->mv[1].as_int = mi->src_mi->mbmi.mv[1].as_int;
613 } 612 }
614 } 613 }
615 } 614 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_thread_common.c ('k') | source/libvpx/vp9/encoder/vp9_aq_cyclicrefresh.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698