diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2015-10-14 19:20:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-15 02:46:29 +0200 |
commit | 96b165fae24b84a703728a8d34ef1ecb944471ab (patch) | |
tree | 15f2ced4434f8465c56fd8a214db5db27bc5751a /libavcodec/dnxhdenc.c | |
parent | 2c2d1624a2e70693045868b8b841a24a9b711507 (diff) | |
download | ffmpeg-96b165fae24b84a703728a8d34ef1ecb944471ab.tar.gz |
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/dnxhdenc.c')
-rw-r--r-- | libavcodec/dnxhdenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index f4a7b9891d..36154acb27 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -163,9 +163,9 @@ static av_cold int dnxhd_init_vlc(DNXHDEncContext *ctx) alevel -= offset << 6; } for (j = 0; j < 257; j++) { - if (ctx->cid_table->ac_level[j] >> 1 == alevel && - (!offset || (ctx->cid_table->ac_flags[j] & 1) && offset) && - (!run || (ctx->cid_table->ac_flags[j] & 2) && run)) { + if (ctx->cid_table->ac_info[2*j+0] >> 1 == alevel && + (!offset || (ctx->cid_table->ac_info[2*j+1] & 1) && offset) && + (!run || (ctx->cid_table->ac_info[2*j+1] & 2) && run)) { av_assert1(!ctx->vlc_codes[index]); if (alevel) { ctx->vlc_codes[index] = |