Commit c2b82128 authored by Yaowu Xu's avatar Yaowu Xu

misc-fix: separate skip and has_no_coeffs

This commit merges the fix that separates "has_no_coeffs" from skip
flag.

Related tracking issue:
https://bugs.chromium.org/p/webm/issues/detail?id=1014
Original libvpx commit:
a5d930e4

Change-Id: Ieda635c97e08137c20c8a191262ec88f186d7b4e
parent 879b4ff8
......@@ -130,9 +130,7 @@ typedef struct {
PREDICTION_MODE mode;
TX_SIZE tx_size;
int8_t skip;
#if CONFIG_MISC_FIXES
int8_t has_no_coeffs;
#endif
int8_t segment_id;
int8_t seg_id_predicted; // valid only when temporal_update is enabled
......
......@@ -754,13 +754,9 @@ static void build_masks(const loop_filter_info_n *const lfi_n,
*left_y |= left_prediction_mask[block_size] << shift_y;
*left_uv |= left_prediction_mask_uv[block_size] << shift_uv;
// If the block has no coefficients and is not intra we skip applying
// the loop filter on block edges.
#if CONFIG_MISC_FIXES
// If the block has no coefficients and is not intra we skip applying
// the loop filter on block edges.
if ((mbmi->skip || mbmi->has_no_coeffs) && is_inter_block(mbmi)) return;
#else
if (mbmi->skip && is_inter_block(mbmi)) return;
#endif
// Here we are adding a mask for the transform size. The transform
// size mask is set to be correct for a 64x64 prediction block size. We
......@@ -818,11 +814,7 @@ static void build_y_mask(const loop_filter_info_n *const lfi_n,
*above_y |= above_prediction_mask[block_size] << shift_y;
*left_y |= left_prediction_mask[block_size] << shift_y;
#if CONFIG_MISC_FIXES
if ((mbmi->skip || mbmi->has_no_coeffs) && is_inter_block(mbmi)) return;
#else
if (mbmi->skip && is_inter_block(mbmi)) return;
#endif
*above_y |= (size_mask[block_size] & above_64x64_txform_mask[tx_size_y])
<< shift_y;
......
......@@ -549,11 +549,7 @@ static void decode_block(AV1Decoder *const pbi, MACROBLOCKD *const xd,
}
if (!less8x8 && eobtotal == 0)
#if CONFIG_MISC_FIXES
mbmi->has_no_coeffs = 1; // skip loopfilter
#else
mbmi->skip = 1; // skip loopfilter
#endif
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment