diff options
author | Christophe Gisquet | 2015-10-14 19:20:49 +0200 |
---|---|---|
committer | Michael Niedermayer | 2015-10-15 02:46:29 +0200 |
commit | 96b165fae24b84a703728a8d34ef1ecb944471ab (patch) | |
tree | 15f2ced4434f8465c56fd8a214db5db27bc5751a /libavcodec/dnxhddec.c | |
parent | 2c2d1624a2e70693045868b8b841a24a9b711507 (diff) |
dnxhd: interleave AC levels and flags
This allows more efficient access to the array as the level and flags
are contiguous. Around 4% faster coefficient decoding.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dnxhddec.c')
-rw-r--r-- | libavcodec/dnxhddec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 3b1fbdb0c9..2eb07ec5d8 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -327,8 +327,7 @@ static av_always_inline int dnxhd_decode_dct_block(const DNXHDContext *ctx, int level, component, sign; const int *scale; const uint8_t *weight_matrix; - const uint8_t *ac_level = ctx->cid_table->ac_level; - const uint8_t *ac_flags = ctx->cid_table->ac_flags; + const uint8_t *ac_info = ctx->cid_table->ac_info; int16_t *block = row->blocks[n]; const int eob_index = ctx->cid_table->eob_index; int ret = 0; @@ -375,8 +374,8 @@ static av_always_inline int dnxhd_decode_dct_block(const DNXHDContext *ctx, DNXHD_VLC_BITS, 2); while (index1 != eob_index) { - level = ac_level[index1]; - flags = ac_flags[index1]; + level = ac_info[2*index1+0]; + flags = ac_info[2*index1+1]; sign = SHOW_SBITS(bs, &row->gb, 1); SKIP_BITS(bs, &row->gb, 1); |