History

avcodec/proresenc_anatoliy: rework encode_codeword() prototype

This matches the function of the same name in proresenc_kostya.

Clément Bœsch committed 2 years ago

Commit 15744751 parent 1832bd71 file · +5 −5Browse files

Unified · Split

libavcodec/proresenc_anatoliy.c+5−5
@@ -226,7 +226,7 @@ static int int_from_list_or_default(void *ctx, const char *val_name, int val, · 225 unmodified lines
226226 return default_value;
227227 }
228228
229−static void encode_codeword(PutBitContext *pb, int val, unsigned codebook)
229+static void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int val)
230230 {
231231 unsigned int rice_order, exp_order, switch_bits, switch_val;
232232 int exponent;
@@ -277,7 +277,7 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in, · 44 unmodified lines
277277
278278 prev_dc = QSCALE(qmat, 0, in[0] - 16384);
279279 code = TO_GOLOMB(prev_dc);
280− encode_codeword(pb, code, FIRST_DC_CB);
280+ encode_vlc_codeword(pb, FIRST_DC_CB, code);
281281
282282 code = 5; sign = 0; idx = 64;
283283 for (i = 1; i < blocks_per_slice; i++, idx += 64) {
@@ -286,7 +286,7 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in, · 2 unmodified lines
286286 diff_sign = DIFF_SIGN(delta, sign);
287287 new_code = TO_GOLOMB2(get_level(delta), diff_sign);
288288
289− encode_codeword(pb, new_code, ff_prores_dc_codebook[FFMIN(code, 6)]);
289+ encode_vlc_codeword(pb, ff_prores_dc_codebook[FFMIN(code, 6)], new_code);
290290
291291 code = new_code;
292292 sign = delta >> 31;
@@ -306,14 +306,14 @@ static void encode_ac_coeffs(PutBitContext *pb, · 13 unmodified lines
306306 for (j = 0; j < blocks_per_slice; j++) {
307307 int val = QSCALE(qmat, indp, in[(j << 6) + indp]);
308308 if (val) {
309− encode_codeword(pb, run, ff_prores_run_to_cb[FFMIN(prev_run, 15)]);
309+ encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 15)], run);
310310
311311 prev_run = run;
312312 run = 0;
313313 level = get_level(val);
314314 code = level - 1;
315315
316− encode_codeword(pb, code, ff_prores_level_to_cb[FFMIN(prev_level, 9)]);
316+ encode_vlc_codeword(pb, ff_prores_level_to_cb[FFMIN(prev_level, 9)], code);
317317
318318 prev_level = level;
319319

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