Merge "Renaming skip_coeff to skip for consistency."
This commit is contained in:
Коммит
df6c523fed
|
@ -128,7 +128,7 @@ typedef struct {
|
|||
|
||||
uint8_t mode_context[MAX_REF_FRAMES];
|
||||
|
||||
unsigned char skip_coeff; // 0=need to decode coeffs, 1=no coefficients
|
||||
unsigned char skip; // 0=need to decode coeffs, 1=no coefficients
|
||||
unsigned char segment_id; // Segment id for this block.
|
||||
|
||||
// Flags used for prediction status of various bit-stream signals
|
||||
|
|
|
@ -58,7 +58,7 @@ void vp9_print_modes_and_motion_vectors(VP9_COMMON *cm, char *file) {
|
|||
|
||||
print_mi_data(cm, mvs, "Partitions:", offsetof(MB_MODE_INFO, sb_type));
|
||||
print_mi_data(cm, mvs, "Modes:", offsetof(MB_MODE_INFO, mode));
|
||||
print_mi_data(cm, mvs, "Skips:", offsetof(MB_MODE_INFO, skip_coeff));
|
||||
print_mi_data(cm, mvs, "Skips:", offsetof(MB_MODE_INFO, skip));
|
||||
print_mi_data(cm, mvs, "Ref frame:", offsetof(MB_MODE_INFO, ref_frame[0]));
|
||||
print_mi_data(cm, mvs, "Transform:", offsetof(MB_MODE_INFO, tx_size));
|
||||
print_mi_data(cm, mvs, "UV Modes:", offsetof(MB_MODE_INFO, uv_mode));
|
||||
|
|
|
@ -496,7 +496,7 @@ static void build_masks(const loop_filter_info_n *const lfi_n,
|
|||
const BLOCK_SIZE block_size = mi->mbmi.sb_type;
|
||||
const TX_SIZE tx_size_y = mi->mbmi.tx_size;
|
||||
const TX_SIZE tx_size_uv = get_uv_tx_size(&mi->mbmi);
|
||||
const int skip = mi->mbmi.skip_coeff;
|
||||
const int skip = mi->mbmi.skip;
|
||||
const int seg = mi->mbmi.segment_id;
|
||||
const int ref = mi->mbmi.ref_frame[0];
|
||||
const int filter_level = lfi_n->lvl[seg][ref][mode_lf_lut[mi->mbmi.mode]];
|
||||
|
@ -577,7 +577,7 @@ static void build_y_mask(const loop_filter_info_n *const lfi_n,
|
|||
LOOP_FILTER_MASK *lfm) {
|
||||
const BLOCK_SIZE block_size = mi->mbmi.sb_type;
|
||||
const TX_SIZE tx_size_y = mi->mbmi.tx_size;
|
||||
const int skip = mi->mbmi.skip_coeff;
|
||||
const int skip = mi->mbmi.skip;
|
||||
const int seg = mi->mbmi.segment_id;
|
||||
const int ref = mi->mbmi.ref_frame[0];
|
||||
const int filter_level = lfi_n->lvl[seg][ref][mode_lf_lut[mi->mbmi.mode]];
|
||||
|
@ -937,8 +937,7 @@ static void filter_block_plane_non420(VP9_COMMON *cm,
|
|||
for (c = 0; c < MI_BLOCK_SIZE && mi_col + c < cm->mi_cols; c += col_step) {
|
||||
const MODE_INFO *mi = mi_8x8[c];
|
||||
const BLOCK_SIZE sb_type = mi[0].mbmi.sb_type;
|
||||
const int skip_this = mi[0].mbmi.skip_coeff
|
||||
&& is_inter_block(&mi[0].mbmi);
|
||||
const int skip_this = mi[0].mbmi.skip && is_inter_block(&mi[0].mbmi);
|
||||
// left edge of current unit is block/partition edge -> no skip
|
||||
const int block_edge_left = (num_4x4_blocks_wide_lookup[sb_type] > 1) ?
|
||||
!(c & (num_8x8_blocks_wide_lookup[sb_type] - 1)) : 1;
|
||||
|
|
|
@ -700,7 +700,7 @@ int vp9_post_proc_frame(struct VP9Common *cm,
|
|||
char zz[4];
|
||||
int dc_diff = !(mi[mb_index].mbmi.mode != I4X4_PRED &&
|
||||
mi[mb_index].mbmi.mode != SPLITMV &&
|
||||
mi[mb_index].mbmi.skip_coeff);
|
||||
mi[mb_index].mbmi.skip);
|
||||
|
||||
if (cm->frame_type == KEY_FRAME)
|
||||
snprintf(zz, sizeof(zz) - 1, "a");
|
||||
|
|
|
@ -353,9 +353,9 @@ int vp9_get_tx_size_context(const MACROBLOCKD *xd) {
|
|||
const MB_MODE_INFO *const left_mbmi = get_mbmi(get_left_mi(xd));
|
||||
const int has_above = above_mbmi != NULL;
|
||||
const int has_left = left_mbmi != NULL;
|
||||
int above_ctx = (has_above && !above_mbmi->skip_coeff) ? above_mbmi->tx_size
|
||||
int above_ctx = (has_above && !above_mbmi->skip) ? above_mbmi->tx_size
|
||||
: max_tx_size;
|
||||
int left_ctx = (has_left && !left_mbmi->skip_coeff) ? left_mbmi->tx_size
|
||||
int left_ctx = (has_left && !left_mbmi->skip) ? left_mbmi->tx_size
|
||||
: max_tx_size;
|
||||
if (!has_left)
|
||||
left_ctx = above_ctx;
|
||||
|
|
|
@ -47,8 +47,8 @@ static INLINE vp9_prob vp9_get_pred_prob_seg_id(struct segmentation *seg,
|
|||
static INLINE int vp9_get_skip_context(const MACROBLOCKD *xd) {
|
||||
const MODE_INFO *const above_mi = get_above_mi(xd);
|
||||
const MODE_INFO *const left_mi = get_left_mi(xd);
|
||||
const int above_skip = (above_mi != NULL) ? above_mi->mbmi.skip_coeff : 0;
|
||||
const int left_skip = (left_mi != NULL) ? left_mi->mbmi.skip_coeff : 0;
|
||||
const int above_skip = (above_mi != NULL) ? above_mi->mbmi.skip : 0;
|
||||
const int left_skip = (left_mi != NULL) ? left_mi->mbmi.skip : 0;
|
||||
return above_skip + left_skip;
|
||||
}
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ static void predict_and_reconstruct_intra_block(int plane, int block,
|
|||
dst, pd->dst.stride, dst, pd->dst.stride,
|
||||
x, y, plane);
|
||||
|
||||
if (!mi->mbmi.skip_coeff) {
|
||||
if (!mi->mbmi.skip) {
|
||||
const int eob = vp9_decode_block_tokens(cm, xd, plane, block,
|
||||
plane_bsize, x, y, tx_size,
|
||||
args->r);
|
||||
|
@ -397,7 +397,7 @@ static void decode_modes_b(VP9_COMMON *const cm, MACROBLOCKD *const xd,
|
|||
// Has to be called after set_offsets
|
||||
mbmi = &xd->mi_8x8[0]->mbmi;
|
||||
|
||||
if (mbmi->skip_coeff) {
|
||||
if (mbmi->skip) {
|
||||
reset_skip_context(xd, bsize);
|
||||
} else {
|
||||
if (cm->seg.enabled)
|
||||
|
@ -421,12 +421,12 @@ static void decode_modes_b(VP9_COMMON *const cm, MACROBLOCKD *const xd,
|
|||
vp9_dec_build_inter_predictors_sb(xd, mi_row, mi_col, bsize);
|
||||
|
||||
// Reconstruction
|
||||
if (!mbmi->skip_coeff) {
|
||||
if (!mbmi->skip) {
|
||||
int eobtotal = 0;
|
||||
struct inter_args arg = { cm, xd, r, &eobtotal };
|
||||
vp9_foreach_transformed_block(xd, bsize, reconstruct_inter_block, &arg);
|
||||
if (!less8x8 && eobtotal == 0)
|
||||
mbmi->skip_coeff = 1; // skip loopfilter
|
||||
mbmi->skip = 1; // skip loopfilter
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ static int read_inter_segment_id(VP9_COMMON *const cm, MACROBLOCKD *const xd,
|
|||
return segment_id;
|
||||
}
|
||||
|
||||
static int read_skip_coeff(VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||
static int read_skip(VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||
int segment_id, vp9_reader *r) {
|
||||
if (vp9_segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP)) {
|
||||
return 1;
|
||||
|
@ -169,7 +169,7 @@ static void read_intra_frame_mode_info(VP9_COMMON *const cm,
|
|||
const BLOCK_SIZE bsize = mbmi->sb_type;
|
||||
|
||||
mbmi->segment_id = read_intra_segment_id(cm, xd, mi_row, mi_col, r);
|
||||
mbmi->skip_coeff = read_skip_coeff(cm, xd, mbmi->segment_id, r);
|
||||
mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r);
|
||||
mbmi->tx_size = read_tx_size(cm, xd, cm->tx_mode, bsize, 1, r);
|
||||
mbmi->ref_frame[0] = INTRA_FRAME;
|
||||
mbmi->ref_frame[1] = NONE;
|
||||
|
@ -520,10 +520,10 @@ static void read_inter_frame_mode_info(VP9_COMMON *const cm,
|
|||
mbmi->mv[0].as_int = 0;
|
||||
mbmi->mv[1].as_int = 0;
|
||||
mbmi->segment_id = read_inter_segment_id(cm, xd, mi_row, mi_col, r);
|
||||
mbmi->skip_coeff = read_skip_coeff(cm, xd, mbmi->segment_id, r);
|
||||
mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r);
|
||||
inter_block = read_is_inter_block(cm, xd, mbmi->segment_id, r);
|
||||
mbmi->tx_size = read_tx_size(cm, xd, cm->tx_mode, mbmi->sb_type,
|
||||
!mbmi->skip_coeff || !inter_block, r);
|
||||
!mbmi->skip || !inter_block, r);
|
||||
|
||||
if (inter_block)
|
||||
read_inter_block_mode_info(cm, xd, tile, mi, mi_row, mi_col, r);
|
||||
|
|
|
@ -104,13 +104,13 @@ static void write_selected_tx_size(const VP9_COMP *cpi, MODE_INFO *m,
|
|||
}
|
||||
}
|
||||
|
||||
static int write_skip_coeff(const VP9_COMP *cpi, int segment_id, MODE_INFO *m,
|
||||
static int write_skip(const VP9_COMP *cpi, int segment_id, MODE_INFO *m,
|
||||
vp9_writer *w) {
|
||||
const MACROBLOCKD *const xd = &cpi->mb.e_mbd;
|
||||
if (vp9_segfeature_active(&cpi->common.seg, segment_id, SEG_LVL_SKIP)) {
|
||||
return 1;
|
||||
} else {
|
||||
const int skip = m->mbmi.skip_coeff;
|
||||
const int skip = m->mbmi.skip;
|
||||
vp9_write(w, skip, vp9_get_skip_prob(&cpi->common, xd));
|
||||
return skip;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
|
|||
const MV_REFERENCE_FRAME sec_rf = mi->ref_frame[1];
|
||||
const MB_PREDICTION_MODE mode = mi->mode;
|
||||
const int segment_id = mi->segment_id;
|
||||
int skip_coeff;
|
||||
int skip;
|
||||
const BLOCK_SIZE bsize = mi->sb_type;
|
||||
const int allow_hp = cm->allow_high_precision_mv;
|
||||
|
||||
|
@ -273,14 +273,14 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc) {
|
|||
}
|
||||
}
|
||||
|
||||
skip_coeff = write_skip_coeff(cpi, segment_id, m, bc);
|
||||
skip = write_skip(cpi, segment_id, m, bc);
|
||||
|
||||
if (!vp9_segfeature_active(seg, segment_id, SEG_LVL_REF_FRAME))
|
||||
vp9_write(bc, rf != INTRA_FRAME, vp9_get_intra_inter_prob(cm, xd));
|
||||
|
||||
if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT &&
|
||||
!(rf != INTRA_FRAME &&
|
||||
(skip_coeff || vp9_segfeature_active(seg, segment_id, SEG_LVL_SKIP)))) {
|
||||
(skip || vp9_segfeature_active(seg, segment_id, SEG_LVL_SKIP)))) {
|
||||
write_selected_tx_size(cpi, m, mi->tx_size, bsize, bc);
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ static void write_mb_modes_kf(const VP9_COMP *cpi, MODE_INFO **mi_8x8,
|
|||
if (seg->update_map)
|
||||
write_segment_id(bc, seg, m->mbmi.segment_id);
|
||||
|
||||
write_skip_coeff(cpi, segment_id, m, bc);
|
||||
write_skip(cpi, segment_id, m, bc);
|
||||
|
||||
if (m->mbmi.sb_type >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT)
|
||||
write_selected_tx_size(cpi, m, m->mbmi.tx_size, m->mbmi.sb_type, bc);
|
||||
|
|
|
@ -658,7 +658,7 @@ static void rd_pick_sb_modes(VP9_COMP *cpi, const TileInfo *const tile,
|
|||
x->skip_recode = 0;
|
||||
|
||||
// Set to zero to make sure we do not use the previous encoded frame stats
|
||||
xd->mi_8x8[0]->mbmi.skip_coeff = 0;
|
||||
xd->mi_8x8[0]->mbmi.skip = 0;
|
||||
|
||||
x->source_variance = get_sby_perpixel_variance(cpi, x, bsize);
|
||||
|
||||
|
@ -2100,7 +2100,7 @@ static int get_skip_flag(MODE_INFO **mi_8x8, int mis, int ymbs, int xmbs) {
|
|||
|
||||
for (y = 0; y < ymbs; y++) {
|
||||
for (x = 0; x < xmbs; x++) {
|
||||
if (!mi_8x8[y * mis + x]->mbmi.skip_coeff)
|
||||
if (!mi_8x8[y * mis + x]->mbmi.skip)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -2259,7 +2259,7 @@ static void set_mode_info(MB_MODE_INFO *mbmi, BLOCK_SIZE bsize,
|
|||
mbmi->ref_frame[1] = INTRA_FRAME;
|
||||
mbmi->tx_size = max_txsize_lookup[bsize];
|
||||
mbmi->uv_mode = mode;
|
||||
mbmi->skip_coeff = 0;
|
||||
mbmi->skip = 0;
|
||||
mbmi->sb_type = bsize;
|
||||
mbmi->segment_id = 0;
|
||||
}
|
||||
|
@ -2736,7 +2736,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
|
|||
|
||||
if (!is_inter_block(mbmi)) {
|
||||
int plane;
|
||||
mbmi->skip_coeff = 1;
|
||||
mbmi->skip = 1;
|
||||
for (plane = 0; plane < MAX_MB_PLANE; ++plane)
|
||||
vp9_encode_intra_block_plane(x, MAX(bsize, BLOCK_8X8), plane);
|
||||
if (output_enabled)
|
||||
|
@ -2755,11 +2755,11 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
|
|||
if (!is_inter_block(mbmi)) {
|
||||
vp9_tokenize_sb(cpi, t, !output_enabled, MAX(bsize, BLOCK_8X8));
|
||||
} else if (!x->skip) {
|
||||
mbmi->skip_coeff = 1;
|
||||
mbmi->skip = 1;
|
||||
vp9_encode_sb(x, MAX(bsize, BLOCK_8X8));
|
||||
vp9_tokenize_sb(cpi, t, !output_enabled, MAX(bsize, BLOCK_8X8));
|
||||
} else {
|
||||
mbmi->skip_coeff = 1;
|
||||
mbmi->skip = 1;
|
||||
if (output_enabled)
|
||||
cm->counts.skip[vp9_get_skip_context(xd)][1]++;
|
||||
reset_skip_context(xd, MAX(bsize, BLOCK_8X8));
|
||||
|
@ -2769,7 +2769,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
|
|||
if (cm->tx_mode == TX_MODE_SELECT &&
|
||||
mbmi->sb_type >= BLOCK_8X8 &&
|
||||
!(is_inter_block(mbmi) &&
|
||||
(mbmi->skip_coeff ||
|
||||
(mbmi->skip ||
|
||||
vp9_segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP)))) {
|
||||
++get_tx_counts(max_txsize_lookup[bsize], vp9_get_tx_size_context(xd),
|
||||
&cm->counts.tx)[mbmi->tx_size];
|
||||
|
|
|
@ -32,7 +32,7 @@ struct optimize_ctx {
|
|||
struct encode_b_args {
|
||||
MACROBLOCK *x;
|
||||
struct optimize_ctx *ctx;
|
||||
unsigned char *skip_coeff;
|
||||
unsigned char *skip;
|
||||
};
|
||||
|
||||
void vp9_subtract_block_c(int rows, int cols,
|
||||
|
@ -439,7 +439,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||
}
|
||||
|
||||
if (p->eobs[block])
|
||||
*(args->skip_coeff) = 0;
|
||||
*(args->skip) = 0;
|
||||
|
||||
if (x->skip_encode || p->eobs[block] == 0)
|
||||
return;
|
||||
|
@ -489,7 +489,7 @@ void vp9_encode_sby(MACROBLOCK *x, BLOCK_SIZE bsize) {
|
|||
MACROBLOCKD *const xd = &x->e_mbd;
|
||||
struct optimize_ctx ctx;
|
||||
MB_MODE_INFO *mbmi = &xd->mi_8x8[0]->mbmi;
|
||||
struct encode_b_args arg = {x, &ctx, &mbmi->skip_coeff};
|
||||
struct encode_b_args arg = {x, &ctx, &mbmi->skip};
|
||||
|
||||
vp9_subtract_sby(x, bsize);
|
||||
if (x->optimize)
|
||||
|
@ -503,7 +503,7 @@ void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize) {
|
|||
MACROBLOCKD *const xd = &x->e_mbd;
|
||||
struct optimize_ctx ctx;
|
||||
MB_MODE_INFO *mbmi = &xd->mi_8x8[0]->mbmi;
|
||||
struct encode_b_args arg = {x, &ctx, &mbmi->skip_coeff};
|
||||
struct encode_b_args arg = {x, &ctx, &mbmi->skip};
|
||||
|
||||
if (!x->skip_recode)
|
||||
vp9_subtract_sb(x, bsize);
|
||||
|
@ -648,20 +648,20 @@ static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||
assert(0);
|
||||
}
|
||||
if (*eob)
|
||||
*(args->skip_coeff) = 0;
|
||||
*(args->skip) = 0;
|
||||
}
|
||||
|
||||
void vp9_encode_block_intra(MACROBLOCK *x, int plane, int block,
|
||||
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
|
||||
unsigned char *skip_coeff) {
|
||||
struct encode_b_args arg = {x, NULL, skip_coeff};
|
||||
unsigned char *skip) {
|
||||
struct encode_b_args arg = {x, NULL, skip};
|
||||
encode_block_intra(plane, block, plane_bsize, tx_size, &arg);
|
||||
}
|
||||
|
||||
|
||||
void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
|
||||
const MACROBLOCKD *const xd = &x->e_mbd;
|
||||
struct encode_b_args arg = {x, NULL, &xd->mi_8x8[0]->mbmi.skip_coeff};
|
||||
struct encode_b_args arg = {x, NULL, &xd->mi_8x8[0]->mbmi.skip};
|
||||
|
||||
vp9_foreach_transformed_block_in_plane(xd, bsize, plane, encode_block_intra,
|
||||
&arg);
|
||||
|
|
|
@ -32,7 +32,7 @@ void vp9_subtract_sb(MACROBLOCK *x, BLOCK_SIZE bsize);
|
|||
|
||||
void vp9_encode_block_intra(MACROBLOCK *x, int plane, int block,
|
||||
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
|
||||
unsigned char *skip_coeff);
|
||||
unsigned char *skip);
|
||||
|
||||
void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
|||
tx_mode_to_biggest_tx_size[cpi->common.tx_mode]);
|
||||
mbmi->interp_filter = cpi->common.interp_filter == SWITCHABLE ?
|
||||
EIGHTTAP : cpi->common.interp_filter;
|
||||
mbmi->skip_coeff = 0;
|
||||
mbmi->skip = 0;
|
||||
mbmi->segment_id = 0;
|
||||
|
||||
for (ref_frame = LAST_FRAME; ref_frame <= LAST_FRAME ; ++ref_frame) {
|
||||
|
|
|
@ -650,8 +650,7 @@ static void block_rd_txfm(int plane, int block, BLOCK_SIZE plane_bsize,
|
|||
return;
|
||||
|
||||
if (!is_inter_block(mbmi))
|
||||
vp9_encode_block_intra(x, plane, block, plane_bsize, tx_size,
|
||||
&mbmi->skip_coeff);
|
||||
vp9_encode_block_intra(x, plane, block, plane_bsize, tx_size, &mbmi->skip);
|
||||
else
|
||||
vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
|
||||
|
||||
|
|
|
@ -314,7 +314,7 @@ void vp9_tokenize_sb(VP9_COMP *cpi, TOKENEXTRA **t, int dry_run,
|
|||
const int skip_inc = !vp9_segfeature_active(&cm->seg, mbmi->segment_id,
|
||||
SEG_LVL_SKIP);
|
||||
struct tokenize_b_args arg = {cpi, xd, t, cpi->mb.token_cache};
|
||||
if (mbmi->skip_coeff) {
|
||||
if (mbmi->skip) {
|
||||
if (!dry_run)
|
||||
cm->counts.skip[ctx][1] += skip_inc;
|
||||
reset_skip_context(xd, bsize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче