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

Unified Diff: source/libvpx/vp9/decoder/vp9_decodemv.c

Issue 23530058: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: source/libvpx/vp9/decoder/vp9_decodemv.c
===================================================================
--- source/libvpx/vp9/decoder/vp9_decodemv.c (revision 223100)
+++ source/libvpx/vp9/decoder/vp9_decodemv.c (working copy)
@@ -95,7 +95,7 @@
vp9_reader *r) {
MACROBLOCKD *const xd = &pbi->mb;
struct segmentation *const seg = &pbi->common.seg;
- const BLOCK_SIZE bsize = xd->mode_info_context->mbmi.sb_type;
+ const BLOCK_SIZE bsize = xd->this_mi->mbmi.sb_type;
int segment_id;
if (!seg->enabled)
@@ -114,7 +114,7 @@
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
struct segmentation *const seg = &cm->seg;
- const BLOCK_SIZE bsize = xd->mode_info_context->mbmi.sb_type;
+ const BLOCK_SIZE bsize = xd->this_mi->mbmi.sb_type;
int pred_segment_id, segment_id;
if (!seg->enabled)
@@ -128,7 +128,7 @@
if (seg->temporal_update) {
const vp9_prob pred_prob = vp9_get_pred_prob_seg_id(seg, xd);
const int pred_flag = vp9_read(r, pred_prob);
- vp9_set_pred_flag_seg_id(cm, bsize, mi_row, mi_col, pred_flag);
+ vp9_set_pred_flag_seg_id(xd, pred_flag);
segment_id = pred_flag ? pred_segment_id
: read_segment_id(r, seg);
} else {
@@ -156,18 +156,19 @@
MACROBLOCKD *const xd = &pbi->mb;
MB_MODE_INFO *const mbmi = &m->mbmi;
const BLOCK_SIZE bsize = mbmi->sb_type;
- const int mis = cm->mode_info_stride;
+ const MODE_INFO *above_mi = xd->mi_8x8[-cm->mode_info_stride];
+ const MODE_INFO *left_mi = xd->mi_8x8[-1];
mbmi->segment_id = read_intra_segment_id(pbi, mi_row, mi_col, r);
mbmi->skip_coeff = read_skip_coeff(pbi, mbmi->segment_id, r);
- mbmi->txfm_size = read_tx_size(pbi, cm->tx_mode, bsize, 1, r);
+ mbmi->tx_size = read_tx_size(pbi, cm->tx_mode, bsize, 1, r);
mbmi->ref_frame[0] = INTRA_FRAME;
mbmi->ref_frame[1] = NONE;
if (bsize >= BLOCK_8X8) {
- const MB_PREDICTION_MODE A = above_block_mode(m, 0, mis);
+ const MB_PREDICTION_MODE A = above_block_mode(m, above_mi, 0);
const MB_PREDICTION_MODE L = xd->left_available ?
- left_block_mode(m, 0) : DC_PRED;
+ left_block_mode(m, left_mi, 0) : DC_PRED;
mbmi->mode = read_intra_mode(r, vp9_kf_y_mode_prob[A][L]);
} else {
// Only 4x4, 4x8, 8x4 blocks
@@ -178,9 +179,9 @@
for (idy = 0; idy < 2; idy += num_4x4_h) {
for (idx = 0; idx < 2; idx += num_4x4_w) {
const int ib = idy * 2 + idx;
- const MB_PREDICTION_MODE A = above_block_mode(m, ib, mis);
+ const MB_PREDICTION_MODE A = above_block_mode(m, above_mi, ib);
const MB_PREDICTION_MODE L = (xd->left_available || idx) ?
- left_block_mode(m, ib) : DC_PRED;
+ left_block_mode(m, left_mi, ib) : DC_PRED;
const MB_PREDICTION_MODE b_mode = read_intra_mode(r,
vp9_kf_y_mode_prob[A][L]);
m->bmi[ib].as_mode = b_mode;
@@ -453,13 +454,14 @@
ref0 = mbmi->ref_frame[0];
is_compound = has_second_ref(mbmi);
- vp9_find_mv_refs(cm, xd, mi, xd->prev_mode_info_context,
- ref0, mbmi->ref_mvs[ref0], mi_row, mi_col);
+ vp9_find_mv_refs(cm, xd, mi, xd->last_mi, ref0, mbmi->ref_mvs[ref0],
+ mi_row, mi_col);
inter_mode_ctx = mbmi->mode_context[ref0];
if (vp9_segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
mbmi->mode = ZEROMV;
+ assert(bsize >= BLOCK_8X8);
} else {
if (bsize >= BLOCK_8X8)
mbmi->mode = read_inter_mode(cm, r, inter_mode_ctx);
@@ -473,7 +475,7 @@
if (is_compound) {
const MV_REFERENCE_FRAME ref1 = mbmi->ref_frame[1];
- vp9_find_mv_refs(cm, xd, mi, xd->prev_mode_info_context,
+ vp9_find_mv_refs(cm, xd, mi, xd->last_mi,
ref1, mbmi->ref_mvs[ref1], mi_row, mi_col);
if (bsize < BLOCK_8X8 || mbmi->mode != ZEROMV) {
@@ -591,8 +593,8 @@
mbmi->segment_id = read_inter_segment_id(pbi, mi_row, mi_col, r);
mbmi->skip_coeff = read_skip_coeff(pbi, mbmi->segment_id, r);
inter_block = read_is_inter_block(pbi, mbmi->segment_id, r);
- mbmi->txfm_size = read_tx_size(pbi, cm->tx_mode, mbmi->sb_type,
- !mbmi->skip_coeff || !inter_block, r);
+ mbmi->tx_size = read_tx_size(pbi, cm->tx_mode, mbmi->sb_type,
+ !mbmi->skip_coeff || !inter_block, r);
if (inter_block)
read_inter_block_mode_info(pbi, mi, mi_row, mi_col, r);
@@ -668,20 +670,21 @@
void vp9_read_mode_info(VP9D_COMP* pbi, int mi_row, int mi_col, vp9_reader *r) {
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
- MODE_INFO *mi = xd->mode_info_context;
+ MODE_INFO *mi = xd->this_mi;
const BLOCK_SIZE bsize = mi->mbmi.sb_type;
const int bw = 1 << mi_width_log2(bsize);
const int bh = 1 << mi_height_log2(bsize);
const int y_mis = MIN(bh, cm->mi_rows - mi_row);
const int x_mis = MIN(bw, cm->mi_cols - mi_col);
- int x, y;
+ int x, y, z;
if (cm->frame_type == KEY_FRAME || cm->intra_only)
read_intra_frame_mode_info(pbi, mi, mi_row, mi_col, r);
else
read_inter_frame_mode_info(pbi, mi, mi_row, mi_col, r);
- for (y = 0; y < y_mis; y++)
- for (x = !y; x < x_mis; x++)
- mi[y * cm->mode_info_stride + x] = *mi;
+ for (y = 0, z = 0; y < y_mis; y++, z += cm->mode_info_stride)
+ for (x = !y; x < x_mis; x++) {
+ xd->mi_8x8[z + x] = mi;
+ }
}
« no previous file with comments | « source/libvpx/vp9/common/x86/vp9_subpixel_8t_intrin_ssse3.c ('k') | source/libvpx/vp9/decoder/vp9_decodframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698