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

Function read_bundle

libavcodec/bink.c:292–313  ·  view source on GitHub ↗

* Prepare bundle for decoding data. * * @param gb context for reading bits * @param c decoder context * @param bundle_num number of the bundle to initialize */

Source from the content-addressed store, hash-verified

290 * @param bundle_num number of the bundle to initialize
291 */
292static int read_bundle(GetBitContext *gb, BinkContext *c, int bundle_num)
293{
294 int i;
295
296 if (bundle_num == BINK_SRC_COLORS) {
297 for (i = 0; i < 16; i++) {
298 int ret = read_tree(gb, &c->col_high[i]);
299 if (ret < 0)
300 return ret;
301 }
302 c->col_lastval = 0;
303 }
304 if (bundle_num != BINK_SRC_INTRA_DC && bundle_num != BINK_SRC_INTER_DC) {
305 int ret = read_tree(gb, &c->bundle[bundle_num].tree);
306 if (ret < 0)
307 return ret;
308 }
309 c->bundle[bundle_num].cur_dec =
310 c->bundle[bundle_num].cur_ptr = c->bundle[bundle_num].data;
311
312 return 0;
313}
314
315/**
316 * common check before starting decoding bundle data

Callers 1

bink_decode_planeFunction · 0.85

Calls 1

read_treeFunction · 0.85

Tested by

no test coverage detected