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

Function put_bitstream_info

libavcodec/aacenc.c:781–796  ·  view source on GitHub ↗

* Write some auxiliary information about the created AAC file. */

Source from the content-addressed store, hash-verified

779 * Write some auxiliary information about the created AAC file.
780 */
781static void put_bitstream_info(AACEncContext *s, const char *name)
782{
783 int i, namelen, padbits;
784
785 namelen = strlen(name) + 2;
786 put_bits(&s->pb, 3, TYPE_FIL);
787 put_bits(&s->pb, 4, FFMIN(namelen, 15));
788 if (namelen >= 15)
789 put_bits(&s->pb, 8, namelen - 14);
790 put_bits(&s->pb, 4, 0); //extension type - filler
791 padbits = -put_bits_count(&s->pb) & 7;
792 align_put_bits(&s->pb);
793 for (i = 0; i < namelen - 2; i++)
794 put_bits(&s->pb, 8, name[i]);
795 put_bits(&s->pb, 12 - padbits, 0);
796}
797
798/*
799 * Copy input samples.

Callers 1

aac_encode_frameFunction · 0.85

Calls 3

put_bits_countFunction · 0.85
align_put_bitsFunction · 0.85
put_bitsFunction · 0.70

Tested by

no test coverage detected