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;
}
['static int read_highpass_coeffs(CFHDContext *s, GetByteContext *gb,\n                                int16_t *coeff_data)\n{\n    int i, ret;\n    int highpass_height       = s->plane[s->channel_num].band[s->level][s->subband_num].height;\n    int highpass_width        = s->plane[s->channel_num].band[s->level][s->subband_num].width;\n    int highpass_a_width      = s->plane[s->channel_num].band[s->level][s->subband_num].a_width;\n    int highpass_a_height     = s->plane[s->channel_num].band[s->level][s->subband_num].a_height;\n    ptrdiff_t highpass_stride = s->plane[s->channel_num].band[s->level][s->subband_num].stride;\n    int expected   = highpass_height   * highpass_stride;\n    int a_expected = highpass_a_height * highpass_a_width;\n    int count = 0;\n    unsigned bytes;\n    if (highpass_height > highpass_a_height ||\n        highpass_width  > highpass_a_width  ||\n        a_expected      < expected) {\n        av_log(s->avctx, AV_LOG_ERROR, "Too many highpass coefficients\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    av_log(s->avctx, AV_LOG_DEBUG,\n           "Start subband coeffs plane %i level %i codebook %i expected %i\\n",\n           s->channel_num, s->level, s->codebook, expected);\n    if ((ret = bitstream_init8(&s->bc, gb->buffer,\n                               bytestream2_get_bytes_left(gb))) < 0)\n        return ret;\n    if (!s->codebook) {\n        DECODE_SUBBAND_COEFFS(table_9_rl_vlc, level == 64)\n    } else {\n        DECODE_SUBBAND_COEFFS(table_18_rl_vlc, level == 255 && run == 2)\n    }\n    bytes = FFALIGN(AV_CEIL_RSHIFT(bitstream_tell(&s->bc), 3), 4);\n    if (bytes > bytestream2_get_bytes_left(gb)) {\n        av_log(s->avctx, AV_LOG_ERROR, "Bitstream overread error\\n");\n        return AVERROR_INVALIDDATA;\n    } else\n        bytestream2_seek(gb, bytes, SEEK_CUR);\n    av_log(s->avctx, AV_LOG_DEBUG, "End subband coeffs %i extra %i\\n",\n           count, count - expected);\n    s->codebook = 0;\n    if (highpass_height & 1) {\n        int16_t *last_line = &coeff_data[expected];\n        memcpy(last_line, &last_line[-highpass_stride],\n               highpass_stride * sizeof(*coeff_data));\n    }\n    return 0;\n}', 'static inline int bitstream_init8(BitstreamContext *bc, const uint8_t *buffer,\n                                  unsigned byte_size)\n{\n    if (byte_size > INT_MAX / 8)\n        return AVERROR_INVALIDDATA;\n    return bitstream_init(bc, buffer, byte_size * 8);\n}', 'static inline unsigned bitstream_peek(BitstreamContext *bc, unsigned n)\n{\n    if (n > bc->bits_left)\n        refill_32(bc);\n    return show_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}']