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

Function addCode

libavcodec/lzwenc.c:148–158  ·  view source on GitHub ↗

* Add block to LZW code table * @param s LZW state * @param c Last character in block * @param hash_prefix LZW code for prefix * @param hash_code LZW code for bytes block */

Source from the content-addressed store, hash-verified

146 * @param hash_code LZW code for bytes block
147 */
148static inline void addCode(LZWEncodeState * s, uint8_t c, int hash_prefix, int hash_code)
149{
150 s->tab[hash_code].code = s->tabsize;
151 s->tab[hash_code].suffix = c;
152 s->tab[hash_code].hash_prefix = hash_prefix;
153
154 s->tabsize++;
155
156 if (s->tabsize >= (1 << s->bits) + (s->mode == FF_LZW_GIF))
157 s->bits++;
158}
159
160/**
161 * Clear LZW code table

Callers 1

ff_lzw_encodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected