MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / write_quant_table

Function write_quant_table

libavcodec/ffv1enc.c:349–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349static void write_quant_table(RangeCoder *c, int16_t *quant_table)
350{
351 int last = 0;
352 int i;
353 uint8_t state[CONTEXT_SIZE];
354 memset(state, 128, sizeof(state));
355
356 for (i = 1; i < MAX_QUANT_TABLE_SIZE/2; i++)
357 if (quant_table[i] != quant_table[i - 1]) {
358 put_symbol(c, state, i - last - 1, 0);
359 last = i;
360 }
361 put_symbol(c, state, i - last - 1, 0);
362}
363
364static void write_quant_tables(RangeCoder *c,
365 int16_t quant_table[MAX_CONTEXT_INPUTS][MAX_QUANT_TABLE_SIZE])

Callers 1

write_quant_tablesFunction · 0.85

Calls 1

put_symbolFunction · 0.70

Tested by

no test coverage detected