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

Function read_len_table

libavcodec/huffyuv.c:177–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177static int read_len_table(uint8_t *dst, GetBitContext *gb){
178 int i, val, repeat;
179
180 for(i=0; i<256;){
181 repeat= get_bits(gb, 3);
182 val = get_bits(gb, 5);
183 if(repeat==0)
184 repeat= get_bits(gb, 8);
185//printf("%d %d\n", val, repeat);
186 if(i+repeat > 256) {
187 av_log(NULL, AV_LOG_ERROR, "Error reading huffman table\n");
188 return -1;
189 }
190 while (repeat--)
191 dst[i++] = val;
192 }
193 return 0;
194}
195
196static int generate_bits_table(uint32_t *dst, const uint8_t *len_table){
197 int len, index;

Callers 2

read_huffman_tablesFunction · 0.85
read_old_huffman_tablesFunction · 0.85

Calls 2

get_bitsFunction · 0.85
av_logFunction · 0.85

Tested by

no test coverage detected