Commit 3925aae0 authored by Jingning Han's avatar Jingning Han

Skip unnecessary memset operation in lv-map decoding

Speed up the lv-map txb decoding process by 5%.

Change-Id: I5c87666b353a27f7fc67cc55322a30bb417435a3
parent 9cf9e28c
...@@ -78,8 +78,6 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd, ...@@ -78,8 +78,6 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
DECLARE_ALIGNED(16, uint8_t, level_counts[MAX_TX_SQUARE]); DECLARE_ALIGNED(16, uint8_t, level_counts[MAX_TX_SQUARE]);
int8_t signs[MAX_TX_SQUARE]; int8_t signs[MAX_TX_SQUARE];
memset(tcoeffs, 0, sizeof(*tcoeffs) * seg_eob);
int all_zero = av1_read_record_bin( int all_zero = av1_read_record_bin(
counts, r, ec_ctx->txb_skip_cdf[txs_ctx][txb_ctx->txb_skip_ctx], 2, counts, r, ec_ctx->txb_skip_cdf[txs_ctx][txb_ctx->txb_skip_ctx], 2,
ACCT_STR); ACCT_STR);
...@@ -175,6 +173,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd, ...@@ -175,6 +173,7 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
counts, r, ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx], 4, counts, r, ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx], 4,
ACCT_STR); ACCT_STR);
levels[get_paded_idx(scan[c], bwl)] = level; levels[get_paded_idx(scan[c], bwl)] = level;
if (level) *max_scan_line = AOMMAX(*max_scan_line, scan[c]);
// printf("base_cdf: %d %d %2d\n", txs_ctx, plane_type, coeff_ctx); // printf("base_cdf: %d %d %2d\n", txs_ctx, plane_type, coeff_ctx);
// printf("base_cdf: %d %d %2d : %3d %3d %3d\n", txs_ctx, plane_type, // printf("base_cdf: %d %d %2d : %3d %3d %3d\n", txs_ctx, plane_type,
// coeff_ctx, // coeff_ctx,
...@@ -216,13 +215,12 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd, ...@@ -216,13 +215,12 @@ uint8_t av1_read_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCKD *xd,
} }
} }
levels[get_paded_idx(scan[c], bwl)] = k + 1; levels[get_paded_idx(scan[c], bwl)] = k + 1;
*max_scan_line = AOMMAX(*max_scan_line, scan[c]);
} }
#endif #endif
#endif #endif
} }
*max_scan_line = *eob;
#if USE_CAUSAL_BASE_CTX #if USE_CAUSAL_BASE_CTX
update_eob = *eob - 1; update_eob = *eob - 1;
#else #else
......
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