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

Function encode_frame

libavcodec/wmaenc.c:363–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363static int encode_frame(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
364 uint8_t *buf, int buf_size, int total_gain)
365{
366 init_put_bits(&s->pb, buf, buf_size);
367
368 if (s->use_bit_reservoir)
369 av_unreachable("use_bit_reseroir unimplemented, set to 0 during init");
370 else if (encode_block(s, src_coefs, total_gain) < 0)
371 return INT_MAX;
372
373 align_put_bits(&s->pb);
374
375 return put_bits_count(&s->pb) / 8 - s->avctx->block_align;
376}
377
378static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
379 const AVFrame *frame, int *got_packet_ptr)

Callers 1

encode_superframeFunction · 0.70

Calls 4

init_put_bitsFunction · 0.85
align_put_bitsFunction · 0.85
put_bits_countFunction · 0.85
encode_blockFunction · 0.70

Tested by

no test coverage detected