History

avcodec/proresenc_anatoliy: reduce DC encoding function prototype differences with Kostya encoder

Clément Bœsch committed 2 years ago

Commit dadc5ac1 parent 8e42d3a1 file · +5 −5Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/proresenc_anatoliy.c+5−5
@@ -267,20 +267,20 @@ static av_always_inline int get_level(int val) · 266 unmodified lines
267267 }
268268
269269
270−static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
271− int blocks_per_slice, int *qmat)
270+static void encode_dcs(PutBitContext *pb, int16_t *blocks,
271+ int blocks_per_slice, int *qmat)
272272 {
273273 int prev_dc, codebook;
274274 int i, sign, idx;
275275 int new_dc, delta, diff_sign, code;
276276
277− prev_dc = (in[0] - 0x4000) / qmat[0];
277+ prev_dc = (blocks[0] - 0x4000) / qmat[0];
278278 codebook = TO_GOLOMB(prev_dc);
279279 encode_vlc_codeword(pb, FIRST_DC_CB, codebook);
280280
281281 codebook = 5; sign = 0; idx = 64;
282282 for (i = 1; i < blocks_per_slice; i++, idx += 64) {
283− new_dc = (in[idx] - 0x4000) / qmat[0];
283+ new_dc = (blocks[idx] - 0x4000) / qmat[0];
284284 delta = new_dc - prev_dc;
285285 diff_sign = DIFF_SIGN(delta, sign);
286286 code = TO_GOLOMB2(get_level(delta), diff_sign);
@@ -388,7 +388,7 @@ static int encode_slice_plane(int16_t *blocks, int mb_count, uint8_t *buf, unsig · 101 unmodified lines
388388 blocks_per_slice = mb_count << (2 - sub_sample_chroma);
389389 init_put_bits(&pb, buf, buf_size);
390390
391− encode_dc_coeffs(&pb, blocks, blocks_per_slice, qmat);
391+ encode_dcs(&pb, blocks, blocks_per_slice, qmat);
392392 encode_ac_coeffs(&pb, blocks, blocks_per_slice, qmat, ff_prores_scan);
393393
394394 flush_put_bits(&pb);

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