static inline void skip_remaining(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    bc->bits >>= n;
#else
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
}
['int ff_tak_decode_frame_header(AVCodecContext *avctx, BitstreamContext *bc,\n                               TAKStreamInfo *ti, int log_level_offset)\n{\n    if (bitstream_read(bc, TAK_FRAME_HEADER_SYNC_ID_BITS) != TAK_FRAME_HEADER_SYNC_ID) {\n        av_log(avctx, AV_LOG_ERROR + log_level_offset, "missing sync id\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    ti->flags     = bitstream_read(bc, TAK_FRAME_HEADER_FLAGS_BITS);\n    ti->frame_num = bitstream_read(bc, TAK_FRAME_HEADER_NO_BITS);\n    if (ti->flags & TAK_FRAME_FLAG_IS_LAST) {\n        ti->last_frame_samples = bitstream_read(bc, TAK_FRAME_HEADER_SAMPLE_COUNT_BITS) + 1;\n        bitstream_skip(bc, 2);\n    } else {\n        ti->last_frame_samples = 0;\n    }\n    if (ti->flags & TAK_FRAME_FLAG_HAS_INFO) {\n        avpriv_tak_parse_streaminfo(bc, ti);\n        if (bitstream_read(bc, 6))\n            bitstream_skip(bc, 25);\n        bitstream_align(bc);\n    }\n    bitstream_skip(bc, 24);\n    return 0;\n}', 'static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)\n{\n    if (!n)\n        return 0;\n    if (n > bc->bits_left) {\n        refill_32(bc);\n        if (bc->bits_left < 32)\n            bc->bits_left = n;\n    }\n    return get_val(bc, n);\n}', 'static inline void bitstream_skip(BitstreamContext *bc, unsigned n)\n{\n    if (n <= bc->bits_left)\n        skip_remaining(bc, n);\n    else {\n        n -= bc->bits_left;\n        skip_remaining(bc, bc->bits_left);\n        if (n >= 64) {\n            unsigned skip = n / 8;\n            n -= skip * 8;\n            bc->ptr += skip;\n        }\n        refill_64(bc);\n        if (n)\n            skip_remaining(bc, n);\n    }\n}', 'static inline void skip_remaining(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    bc->bits >>= n;\n#else\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n}']