static void put_audio_specific_config(AVCodecContext *avctx)
{
    PutBitContext pb;
    AACEncContext *s = avctx->priv_data;
    init_put_bits(&pb, avctx->extradata, avctx->extradata_size*8);
    put_bits(&pb, 5, 2);
    put_bits(&pb, 4, s->samplerate_index);
    put_bits(&pb, 4, avctx->channels);
    put_bits(&pb, 1, 0);
    put_bits(&pb, 1, 0);
    put_bits(&pb, 1, 0);
    put_bits(&pb, 11, 0x2b7);
    put_bits(&pb, 5,  AOT_SBR);
    put_bits(&pb, 1,  0);
    flush_put_bits(&pb);
}
['static void put_audio_specific_config(AVCodecContext *avctx)\n{\n    PutBitContext pb;\n    AACEncContext *s = avctx->priv_data;\n    init_put_bits(&pb, avctx->extradata, avctx->extradata_size*8);\n    put_bits(&pb, 5, 2);\n    put_bits(&pb, 4, s->samplerate_index);\n    put_bits(&pb, 4, avctx->channels);\n    put_bits(&pb, 1, 0);\n    put_bits(&pb, 1, 0);\n    put_bits(&pb, 1, 0);\n    put_bits(&pb, 11, 0x2b7);\n    put_bits(&pb, 5,  AOT_SBR);\n    put_bits(&pb, 1,  0);\n    flush_put_bits(&pb);\n}', 'static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)\n{\n    if(buffer_size < 0) {\n        buffer_size = 0;\n        buffer = NULL;\n    }\n    s->size_in_bits= 8*buffer_size;\n    s->buf = buffer;\n    s->buf_end = s->buf + buffer_size;\n#ifdef ALT_BITSTREAM_WRITER\n    s->index=0;\n    ((uint32_t*)(s->buf))[0]=0;\n#else\n    s->buf_ptr = s->buf;\n    s->bit_left=32;\n    s->bit_buf=0;\n#endif\n}', 'static inline void put_bits(PutBitContext *s, int n, unsigned int value)\n#ifndef ALT_BITSTREAM_WRITER\n{\n    unsigned int bit_buf;\n    int bit_left;\n    assert(n <= 31 && value < (1U << n));\n    bit_buf = s->bit_buf;\n    bit_left = s->bit_left;\n#ifdef BITSTREAM_WRITER_LE\n    bit_buf |= value << (32 - bit_left);\n    if (n >= bit_left) {\n#if !HAVE_FAST_UNALIGNED\n        if (3 & (intptr_t) s->buf_ptr) {\n            AV_WL32(s->buf_ptr, bit_buf);\n        } else\n#endif\n        *(uint32_t *)s->buf_ptr = av_le2ne32(bit_buf);\n        s->buf_ptr+=4;\n        bit_buf = (bit_left==32)?0:value >> bit_left;\n        bit_left+=32;\n    }\n    bit_left-=n;\n#else\n    if (n < bit_left) {\n        bit_buf = (bit_buf<<n) | value;\n        bit_left-=n;\n    } else {\n        bit_buf<<=bit_left;\n        bit_buf |= value >> (n - bit_left);\n#if !HAVE_FAST_UNALIGNED\n        if (3 & (intptr_t) s->buf_ptr) {\n            AV_WB32(s->buf_ptr, bit_buf);\n        } else\n#endif\n        *(uint32_t *)s->buf_ptr = av_be2ne32(bit_buf);\n        s->buf_ptr+=4;\n        bit_left+=32 - n;\n        bit_buf = value;\n    }\n#endif\n    s->bit_buf = bit_buf;\n    s->bit_left = bit_left;\n}', 'static av_always_inline av_const uint32_t av_bswap32(uint32_t x)\n{\n    x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);\n    x= (x>>16) | (x<<16);\n    return x;\n}']