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

Function context_init

libavcodec/h264.c:813–823  ·  view source on GitHub ↗

* Init context * Allocate buffers which are not shared amongst multiple threads. */

Source from the content-addressed store, hash-verified

811 * Allocate buffers which are not shared amongst multiple threads.
812 */
813static int context_init(H264Context *h){
814 FF_ALLOCZ_OR_GOTO(h->s.avctx, h->top_borders[0], h->s.mb_width * (16+8+8) * sizeof(uint8_t), fail)
815 FF_ALLOCZ_OR_GOTO(h->s.avctx, h->top_borders[1], h->s.mb_width * (16+8+8) * sizeof(uint8_t), fail)
816
817 h->ref_cache[0][scan8[5 ]+1] = h->ref_cache[0][scan8[7 ]+1] = h->ref_cache[0][scan8[13]+1] =
818 h->ref_cache[1][scan8[5 ]+1] = h->ref_cache[1][scan8[7 ]+1] = h->ref_cache[1][scan8[13]+1] = PART_NOT_AVAILABLE;
819
820 return 0;
821fail:
822 return -1; // free_tables will clean up for us
823}
824
825static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size);
826

Callers 1

decode_slice_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected