History

avcodec/proresenc_anatoliy: execute AC run/level FFMIN() at assignment

This matches the logic from the function of the same name in proresenc_kostya.

Clément Bœsch committed 2 years ago

Commit 8fb2e961 parent 096a69a1 file · +6 −6Browse files

Unified · Split

libavcodec/proresenc_anatoliy.c+6−6
@@ -298,18 +298,18 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks, · 297 unmodified lines
298298 for (idx = scan[i]; idx < max_coeffs; idx += 64) {
299299 int val = blocks[idx] / qmat[scan[i]];
300300 if (val) {
301− encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 15)], run);
301+ encode_vlc_codeword(pb, ff_prores_run_to_cb[prev_run], run);
302302
303− prev_run = run;
304− run = 0;
305303 level = FFABS(val);
306304 code = level - 1;
307305
308− encode_vlc_codeword(pb, ff_prores_level_to_cb[FFMIN(prev_level, 9)], code);
309−
310− prev_level = level;
306+ encode_vlc_codeword(pb, ff_prores_level_to_cb[prev_level], code);
311307
312308 put_sbits(pb, 1, GET_SIGN(val));
309+
310+ prev_run = FFMIN(run, 15);
311+ prev_level = FFMIN(level, 9);
312+ run = 0;
313313 } else {
314314 ++run;
315315 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t