SEG_LVL_ALT_Q = 0, // Use alternate Quantizer ....
SEG_LVL_ALT_LF = 1, // Use alternate loop filter value...
SEG_LVL_REF_FRAME = 2, // Optional Segment reference frame
- SEG_LVL_MODE = 3, // Optional Segment mode
- SEG_LVL_EOB = 4, // EOB end stop marker.
- SEG_LVL_TRANSFORM = 5, // Block transform size.
- SEG_LVL_MAX = 6 // Number of MB level features supported
+ SEG_LVL_SKIP = 3, // Optional Segment (0,0) + skip mode
+ SEG_LVL_TRANSFORM = 4, // Block transform size.
+ SEG_LVL_MAX = 5 // Number of MB level features supported
} SEG_LVL_FEATURES;
// Segment level features.
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_seg_common.h"
-static const int segfeaturedata_signed[SEG_LVL_MAX] = { 1, 1, 0, 0, 0, 0 };
+static const int segfeaturedata_signed[SEG_LVL_MAX] = { 1, 1, 0, 0, 0 };
static const int seg_feature_data_max[SEG_LVL_MAX] =
- { MAXQ, 63, 0xf, MB_MODE_COUNT - 1, 255, TX_SIZE_MAX_SB - 1};
+ { MAXQ, 63, 0xf, 0xf, TX_SIZE_MAX_SB - 1};
// These functions provide access to new segment level features.
// Eventually these function may be "optimized out" but for the moment,
m->mbmi.mb_skip_coeff = 0;
if (pbi->common.mb_no_coeff_skip &&
(!vp9_segfeature_active(&pbi->mb,
- m->mbmi.segment_id, SEG_LVL_EOB) ||
- (vp9_get_segdata(&pbi->mb,
- m->mbmi.segment_id, SEG_LVL_EOB) != 0))) {
+ m->mbmi.segment_id, SEG_LVL_SKIP))) {
MACROBLOCKD *const xd = &pbi->mb;
m->mbmi.mb_skip_coeff =
vp9_read(bc, vp9_get_pred_prob(cm, xd, PRED_MBSKIP));
} else {
if (vp9_segfeature_active(&pbi->mb,
- m->mbmi.segment_id, SEG_LVL_EOB) &&
- (vp9_get_segdata(&pbi->mb,
- m->mbmi.segment_id, SEG_LVL_EOB) == 0)) {
+ m->mbmi.segment_id, SEG_LVL_SKIP)) {
m->mbmi.mb_skip_coeff = 1;
} else
m->mbmi.mb_skip_coeff = 0;
read_mb_segment_id(pbi, mb_row, mb_col, bc);
if (pbi->common.mb_no_coeff_skip &&
- (!vp9_segfeature_active(xd,
- mbmi->segment_id, SEG_LVL_EOB) ||
- (vp9_get_segdata(xd, mbmi->segment_id, SEG_LVL_EOB) != 0))) {
+ (!vp9_segfeature_active(xd, mbmi->segment_id, SEG_LVL_SKIP))) {
// Read the macroblock coeff skip flag if this feature is in use,
// else default to 0
mbmi->mb_skip_coeff = vp9_read(bc, vp9_get_pred_prob(cm, xd, PRED_MBSKIP));
} else {
- if (vp9_segfeature_active(xd,
- mbmi->segment_id, SEG_LVL_EOB) &&
- (vp9_get_segdata(xd, mbmi->segment_id, SEG_LVL_EOB) == 0)) {
+ if (vp9_segfeature_active(xd, mbmi->segment_id, SEG_LVL_SKIP)) {
mbmi->mb_skip_coeff = 1;
} else
mbmi->mb_skip_coeff = 0;
}
// Read the reference frame
- if (vp9_segfeature_active(xd, mbmi->segment_id, SEG_LVL_MODE)
- && vp9_get_segdata(xd, mbmi->segment_id, SEG_LVL_MODE) < NEARESTMV)
- mbmi->ref_frame = INTRA_FRAME;
- else
- mbmi->ref_frame = read_ref_frame(pbi, bc, mbmi->segment_id);
+ mbmi->ref_frame = read_ref_frame(pbi, bc, mbmi->segment_id);
/*
if (pbi->common.current_video_frame == 1)
}
*/
- // Is the segment level mode feature enabled for this segment
- if (vp9_segfeature_active(xd, mbmi->segment_id, SEG_LVL_MODE)) {
- mbmi->mode =
- vp9_get_segdata(xd, mbmi->segment_id, SEG_LVL_MODE);
+ // Is the segment level skip mode enabled
+ if (vp9_segfeature_active(xd, mbmi->segment_id, SEG_LVL_SKIP)) {
+ mbmi->mode = ZEROMV;
} else {
if (mbmi->sb_type)
mbmi->mode = read_sb_mv_ref(bc, mv_ref_p);
/* required for left and above block mv */
mbmi->mv[0].as_int = 0;
- if (vp9_segfeature_active(xd, mbmi->segment_id, SEG_LVL_MODE)) {
- mbmi->mode = (MB_PREDICTION_MODE)
- vp9_get_segdata(xd, mbmi->segment_id, SEG_LVL_MODE);
- } else if (mbmi->sb_type) {
+ if (mbmi->sb_type) {
mbmi->mode = (MB_PREDICTION_MODE)
read_sb_ymode(bc, pbi->common.fc.sb_ymode_prob);
pbi->common.fc.sb_ymode_counts[mbmi->mode]++;
}
static int get_eob(MACROBLOCKD* const xd, int segment_id, int eob_max) {
- int active = vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB);
- int eob = vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
+ int eob;
- if (!active || eob > eob_max)
+ if (vp9_get_segdata(xd, segment_id, SEG_LVL_SKIP)) {
+ eob = 0;
+ } else {
eob = eob_max;
+ }
return eob;
}
if (!pc->mb_no_coeff_skip) {
skip_coeff = 0;
- } else if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0) {
+ } else if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
skip_coeff = 1;
} else {
const int nmbs = mb_size;
}
// Encode the reference frame.
- if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE)
- || vp9_get_segdata(xd, segment_id, SEG_LVL_MODE) >= NEARESTMV) {
- encode_ref_frame(bc, pc, xd, segment_id, rf);
- } else {
- assert(rf == INTRA_FRAME);
- }
+ encode_ref_frame(bc, pc, xd, segment_id, rf);
if (rf == INTRA_FRAME) {
#ifdef ENTROPY_STATS
active_section = 6;
#endif
- if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE)) {
- if (m->mbmi.sb_type)
- write_sb_ymode(bc, mode, pc->fc.sb_ymode_prob);
- else
- write_ymode(bc, mode, pc->fc.ymode_prob);
- }
+ if (m->mbmi.sb_type)
+ write_sb_ymode(bc, mode, pc->fc.sb_ymode_prob);
+ else
+ write_ymode(bc, mode, pc->fc.ymode_prob);
+
if (mode == B_PRED) {
int j = 0;
do {
active_section = 3;
#endif
- // Is the segment coding of mode enabled
- if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE)) {
+ // Is segment skip is not enabled code the mode.
+ if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
if (mi->sb_type) {
write_sb_mv_ref(bc, mode, mv_ref_p);
} else {
mi->partitioning == PARTITIONING_4X4))) &&
pc->txfm_mode == TX_MODE_SELECT &&
!((pc->mb_no_coeff_skip && skip_coeff) ||
- (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0))) {
+ (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)))) {
TX_SIZE sz = mi->txfm_size;
// FIXME(rbultje) code ternary symbol once all experiments are merged
vp9_write(bc, sz != TX_4X4, pc->prob_tx[0]);
if (!c->mb_no_coeff_skip) {
skip_coeff = 0;
- } else if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0) {
+ } else if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
skip_coeff = 1;
} else {
const int nmbs = 1 << m->mbmi.sb_type;
if (ym <= I8X8_PRED && c->txfm_mode == TX_MODE_SELECT &&
!((c->mb_no_coeff_skip && skip_coeff) ||
- (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0))) {
+ (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)))) {
TX_SIZE sz = m->mbmi.txfm_size;
// FIXME(rbultje) code ternary symbol once all experiments are merged
vp9_write(bc, sz != TX_4X4, c->prob_tx[0]);
{
int segment_id = mbmi->segment_id;
- if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) ||
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB)) {
+ if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
for (i = 0; i < NB_TXFM_MODES; i++) {
cpi->rd_tx_select_diff[i] += ctx->txfm_rd_diff[i];
}
const int segment_id = mbmi->segment_id;
xd->mode_info_context = mi;
- assert((vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0) ||
+ assert((vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) ||
(cm->mb_no_coeff_skip && mbmi->mb_skip_coeff));
mbmi->txfm_size = txfm_max;
}
const int xmbs = MIN(2, mb_cols_left);
xd->mode_info_context = mi;
- assert((vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0) ||
+ assert((vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) ||
(cm->mb_no_coeff_skip && get_skip_flag(mi, mis, ymbs, xmbs)));
set_txfm_flag(mi, mis, ymbs, xmbs, txfm_max);
}
const int xmbs = MIN(4, mb_cols_left);
xd->mode_info_context = mi;
- assert((vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0) ||
+ assert((vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) ||
(cm->mb_no_coeff_skip && get_skip_flag(mi, mis, ymbs, xmbs)));
set_txfm_flag(mi, mis, ymbs, xmbs, txfm_max);
}
int segment_id = mbmi->segment_id;
if (cpi->common.txfm_mode == TX_MODE_SELECT &&
!((cpi->common.mb_no_coeff_skip && mbmi->mb_skip_coeff) ||
- (vp9_segfeature_active(&x->e_mbd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(&x->e_mbd, segment_id, SEG_LVL_EOB) == 0))) {
+ (vp9_segfeature_active(&x->e_mbd, segment_id, SEG_LVL_SKIP)))) {
assert(mbmi->txfm_size <= TX_16X16);
if (mbmi->mode != B_PRED && mbmi->mode != I8X8_PRED &&
mbmi->mode != SPLITMV) {
if (output_enabled) {
if (cm->txfm_mode == TX_MODE_SELECT &&
!((cm->mb_no_coeff_skip && skip[0] && skip[1] && skip[2] && skip[3]) ||
- (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0))) {
+ (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)))) {
cpi->txfm_count_32x32p[mi->mbmi.txfm_size]++;
} else {
TX_SIZE sz = (cm->txfm_mode == TX_MODE_SELECT) ?
skip[4] && skip[5] && skip[6] && skip[7] &&
skip[8] && skip[9] && skip[10] && skip[11] &&
skip[12] && skip[13] && skip[14] && skip[15]))) ||
- (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) &&
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) == 0))) {
+ (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)))) {
cpi->txfm_count_32x32p[mi->mbmi.txfm_size]++;
} else {
int x, y;
else if (xd->segmentation_enabled) {
// First normal frame in a valid gf or alt ref group
if (cpi->common.frames_since_golden == 0) {
- // Set up segment features for normal frames in an af group
+ // Set up segment features for normal frames in an arf group
if (cpi->source_alt_ref_active) {
xd->update_mb_segmentation_map = 0;
xd->update_mb_segmentation_data = 1;
// Segment coding disabled for compred testing
if (high_q || (cpi->static_mb_pct == 100)) {
- // set_segref(xd, 1, LAST_FRAME);
vp9_set_segref(xd, 1, ALTREF_FRAME);
vp9_enable_segfeature(xd, 1, SEG_LVL_REF_FRAME);
-
- vp9_set_segdata(xd, 1, SEG_LVL_MODE, ZEROMV);
- vp9_enable_segfeature(xd, 1, SEG_LVL_MODE);
-
- // EOB segment coding not fixed for 8x8 yet
- vp9_set_segdata(xd, 1, SEG_LVL_EOB, 0);
- vp9_enable_segfeature(xd, 1, SEG_LVL_EOB);
+ vp9_enable_segfeature(xd, 1, SEG_LVL_SKIP);
}
}
// Disable segmentation and clear down features if alt ref
}
// Special case where we are coding over the top of a previous
- // alt ref frame
+ // alt ref frame.
// Segment coding disabled for compred testing
else if (cpi->is_src_frame_alt_ref) {
- // Enable mode and ref frame features for segment 0 as well
+ // Enable ref frame features for segment 0 as well
vp9_enable_segfeature(xd, 0, SEG_LVL_REF_FRAME);
- vp9_enable_segfeature(xd, 0, SEG_LVL_MODE);
vp9_enable_segfeature(xd, 1, SEG_LVL_REF_FRAME);
- vp9_enable_segfeature(xd, 1, SEG_LVL_MODE);
- // All mbs should use ALTREF_FRAME, ZEROMV exclusively
+ // All mbs should use ALTREF_FRAME
vp9_clear_segref(xd, 0);
vp9_set_segref(xd, 0, ALTREF_FRAME);
vp9_clear_segref(xd, 1);
vp9_set_segref(xd, 1, ALTREF_FRAME);
- vp9_set_segdata(xd, 0, SEG_LVL_MODE, ZEROMV);
- vp9_set_segdata(xd, 1, SEG_LVL_MODE, ZEROMV);
- // Skip all MBs if high Q
+ // Skip all MBs if high Q (0,0 mv and skip coeffs)
if (high_q) {
- vp9_enable_segfeature(xd, 0, SEG_LVL_EOB);
- vp9_set_segdata(xd, 0, SEG_LVL_EOB, 0);
- vp9_enable_segfeature(xd, 1, SEG_LVL_EOB);
- vp9_set_segdata(xd, 1, SEG_LVL_EOB, 0);
+ vp9_enable_segfeature(xd, 0, SEG_LVL_SKIP);
+ vp9_enable_segfeature(xd, 1, SEG_LVL_SKIP);
}
// Enable data udpate
xd->update_mb_segmentation_data = 1;
x->block[i].zrun_zbin_boost = cpi->zrun_zbin_boost_y1[QIndex];
x->block[i].zbin_extra = (int16_t)zbin_extra;
- // Segment max eob offset feature.
- if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB)) {
- x->block[i].eob_max_offset =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
- x->block[i].eob_max_offset_8x8 =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
- x->block[i].eob_max_offset_16x16 =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
- x->block[i].eob_max_offset_32x32 =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
+ // Segment skip feature.
+ if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
+ x->block[i].eob_max_offset = 0;
+ x->block[i].eob_max_offset_8x8 = 0;
+ x->block[i].eob_max_offset_16x16 = 0;
+ x->block[i].eob_max_offset_32x32 = 0;
} else {
x->block[i].eob_max_offset = 16;
x->block[i].eob_max_offset_8x8 = 64;
x->block[i].zbin_extra = (int16_t)zbin_extra;
- // Segment max eob offset feature.
- if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB)) {
- x->block[i].eob_max_offset =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
- x->block[i].eob_max_offset_8x8 =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
- x->block[i].eob_max_offset_16x16 =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
+ // Segment skip feature.
+ if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
+ x->block[i].eob_max_offset = 0;
+ x->block[i].eob_max_offset_8x8 = 0;
+ x->block[i].eob_max_offset_16x16 = 0;
} else {
x->block[i].eob_max_offset = 16;
x->block[i].eob_max_offset_8x8 = 64;
x->block[24].zbin_extra = (int16_t)zbin_extra;
// TBD perhaps not use for Y2
- // Segment max eob offset feature.
- if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB)) {
- x->block[24].eob_max_offset =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
- x->block[24].eob_max_offset_8x8 =
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
+ // Segment skip feature.
+ if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
+ x->block[24].eob_max_offset = 0;
+ x->block[24].eob_max_offset_8x8 = 0;
} else {
x->block[24].eob_max_offset = 16;
x->block[24].eob_max_offset_8x8 = 4;
pn = pt;
#endif
- if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB))
- seg_eob = vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
+ if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP))
+ seg_eob = 0;
if (tx_type != DCT_DCT) {
for (; c < eob; c++) {
MACROBLOCKD *xd = &cpi->mb.e_mbd;
int segment_id = xd->mode_info_context->mbmi.segment_id;
- // If the mode coding is done entirely at the segment level
- // we should not account for it at the per mb level in rd code.
- // Note that if the segment level coding is expanded from single mode
- // to multiple mode masks as per reference frame coding we will need
- // to do something different here.
- if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE)) {
+ // Dont account for mode here if segment skip is enabled.
+ if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
VP9_COMMON *pc = &cpi->common;
vp9_prob p [VP9_MVREFS - 1];
if (vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME) &&
!vp9_check_segref(xd, segment_id, mbmi->ref_frame)) {
continue;
- // If the segment mode feature is enabled....
+ // If the segment skip feature is enabled....
// then do nothing if the current mode is not allowed..
- } else if (vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE) &&
- (this_mode !=
- vp9_get_segdata(xd, segment_id, SEG_LVL_MODE))) {
+ } else if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP) &&
+ (this_mode != ZEROMV)) {
continue;
- // Disable this drop out case if either the mode or ref frame
- // segment level feature is enabled for this segment. This is to
+ // Disable this drop out case if the ref frame segment
+ // level feature is enabled for this segment. This is to
// prevent the possibility that the we end up unable to pick any mode.
- } else if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME) &&
- !vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE)) {
- // Only consider ZEROMV/ALTREF_FRAME for alt ref frame,
+ } else if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME)) {
+ // Only consider ZEROMV/ALTREF_FRAME for alt ref frame overlay,
// unless ARNR filtering is enabled in which case we want
// an unfiltered alternative
if (cpi->is_src_frame_alt_ref && (cpi->oxcf.arnr_max_frames == 0)) {
if (cpi->common.mb_no_coeff_skip) {
int mb_skip_allowed;
- // Is Mb level skip allowed for this mb.
- mb_skip_allowed =
- !vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) ||
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
+ // Is Mb level skip allowed (i.e. not coded at segment level).
+ mb_skip_allowed = !vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP);
if (skippable) {
mbmi->mb_skip_coeff = 1;
cpi->rd_thresh_mult[best_mode_index];
}
- // This code force Altref,0,0 and skip for the frame that overlays a
+ // This code forces Altref,0,0 and skip for the frame that overlays a
// an alrtef unless Altref is filtered. However, this is unsafe if
- // segment level coding of ref frame or mode is enabled for this
+ // segment level coding of ref frame is enabled for this
// segment.
if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME) &&
- !vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE) &&
cpi->is_src_frame_alt_ref &&
(cpi->oxcf.arnr_max_frames == 0) &&
(best_mbmode.mode != ZEROMV || best_mbmode.ref_frame != ALTREF_FRAME)) {
if (vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME) &&
!vp9_check_segref(xd, segment_id, ref_frame)) {
continue;
- // If the segment mode feature is enabled....
+ // If the segment skip feature is enabled....
// then do nothing if the current mode is not allowed..
- } else if (vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE) &&
- (this_mode != vp9_get_segdata(xd, segment_id, SEG_LVL_MODE))) {
+ } else if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP) &&
+ (this_mode != ZEROMV)) {
continue;
- // Disable this drop out case if either the mode or ref frame
+ // Disable this drop out case if the ref frame
// segment level feature is enabled for this segment. This is to
// prevent the possibility that we end up unable to pick any mode.
- } else if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME) &&
- !vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE)) {
+ } else if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME)) {
// Only consider ZEROMV/ALTREF_FRAME for alt ref frame,
// unless ARNR filtering is enabled in which case we want
// an unfiltered alternative
if (cpi->common.mb_no_coeff_skip) {
int mb_skip_allowed;
- // Is Mb level skip allowed for this mb.
- mb_skip_allowed =
- !vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) ||
- vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
+ // Is Mb level skip allowed (i.e. not coded at segment level).
+ mb_skip_allowed = !vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP);
if (skippable) {
// Back out the coefficient coding costs
// This code forces Altref,0,0 and skip for the frame that overlays a
// an alrtef unless Altref is filtered. However, this is unsafe if
- // segment level coding of ref frame or mode is enabled for this
- // segment.
+ // segment level coding of ref frame is enabled for this segment.
if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_REF_FRAME) &&
- !vp9_segfeature_active(xd, segment_id, SEG_LVL_MODE) &&
cpi->is_src_frame_alt_ref &&
(cpi->oxcf.arnr_max_frames == 0) &&
(best_mbmode.mode != ZEROMV || best_mbmode.ref_frame != ALTREF_FRAME)) {
pn = pt;
#endif
- if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB))
- seg_eob = vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
+ if (vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP))
+ seg_eob = 0;
do {
const int band = bands[c];
(ENTROPY_CONTEXT *) (xd->left_context + 1), };
const int mb_skip_context = vp9_get_pred_context(cm, xd, PRED_MBSKIP);
const int segment_id = mbmi->segment_id;
- const int skip_inc = !vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) ||
- (vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) != 0);
+ const int skip_inc = !vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP);
int b;
mbmi->mb_skip_coeff = sb_is_skippable_32x32(xd);
int skip_inc;
int segment_id = xd->mode_info_context->mbmi.segment_id;
- if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB) ||
- (vp9_get_segdata(xd, segment_id, SEG_LVL_EOB) != 0)) {
+ if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
skip_inc = 1;
} else
skip_inc = 0;