diff options
author | Clément Bœsch <u@pkh.me> | 2023-12-11 02:30:27 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2024-01-10 14:08:00 +0100 |
commit | 1081bae94d793e6be0b2542e57a1d5ab4ccb816b (patch) | |
tree | bae1184a512f02c313de121b5dfbaa1ec655603a | |
parent | cc2206d1422d2cc9cdac90461075b320f90c5217 (diff) |
avcodec/proresenc_kostya: make a few cosmetics in encode_acs()
Unify cosmetics with encode_acs() from proresenc_anatoliy.
-rw-r--r-- | libavcodec/proresenc_kostya.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index c32b734d53..f4674280fd 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -437,11 +437,10 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks, int idx, i; int prev_run = 4; int prev_level = 2; - int run, level; + int run = 0, level; int max_coeffs, abs_level; max_coeffs = blocks_per_slice << 6; - run = 0; for (i = 1; i < 64; i++) { for (idx = scan[i]; idx < max_coeffs; idx += 64) { @@ -449,13 +448,12 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks, if (level) { abs_level = FFABS(level); encode_vlc_codeword(pb, ff_prores_run_to_cb[prev_run], run); - encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level], - abs_level - 1); + encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level], abs_level - 1); put_sbits(pb, 1, GET_SIGN(level)); prev_run = FFMIN(run, 15); prev_level = FFMIN(abs_level, 9); - run = 0; + run = 0; } else { run++; } |