libavcodec/indeo5.c:260: error: Integer Overflow L2
  ([0, +oo] - 23):unsigned32 by call to `bitstream_skip`.

libavcodec/indeo5.c:258:5: Call
256.     }
257. 
258.     bitstream_align(&ctx->bc);
         ^
259. 
260.     bitstream_skip(&ctx->bc, 23); /* FIXME: unknown meaning */

libavcodec/bitstream.h:272:1: Parameter `bc->bits_left`
  270. 
  271. /* Skip bits to a byte boundary. */
  272. static inline const uint8_t *bitstream_align(BitstreamContext *bc)
       ^
  273. {
  274.     unsigned n = -bitstream_tell(bc) & 7;

libavcodec/indeo5.c:260:5: Call
258.     bitstream_align(&ctx->bc);
259. 
260.     bitstream_skip(&ctx->bc, 23); /* FIXME: unknown meaning */
         ^
261. 
262.     /* skip GOP extension if any */

libavcodec/bitstream.h:240:1: Parameter `n`
  238. 
  239. /* Skip n bits in the buffer. */
  240. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
       ^
  241. {
  242.     if (n < bc->bits_left)

libavcodec/bitstream.h:243:9: Call
  241. {
  242.     if (n < bc->bits_left)
  243.         skip_remaining(bc, n);
               ^
  244.     else {
  245.         n -= bc->bits_left;

libavcodec/bitstream.h:229:1: <LHS trace>
227. }
228. 
229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
230. {
231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: Parameter `bc->bits_left`
    227. }
    228. 
    229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    230. {
    231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: <RHS trace>
227. }
228. 
229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
230. {
231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: Parameter `n`
    227. }
    228. 
    229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    230. {
    231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:236:5: Binary operation: ([0, +oo] - 23):unsigned32 by call to `bitstream_skip` 
    234.     bc->bits <<= n;
    235. #endif
    236.     bc->bits_left -= n;
             ^
    237. }
    238. 

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 decode_gop_header(IVI45DecContext *ctx, AVCodecContext *avctx)\n{\n    int             result, i, p, tile_size, pic_size_indx, mb_size, blk_size;\n    int             quant_mat, blk_size_changed = 0;\n    IVIBandDesc     *band, *band1, *band2;\n    IVIPicConfig    pic_conf;\n    ctx->gop_flags = bitstream_read(&ctx->bc, 8);\n    ctx->gop_hdr_size = (ctx->gop_flags & 1) ? bitstream_read(&ctx->bc, 16) : 0;\n    if (ctx->gop_flags & IVI5_IS_PROTECTED)\n        ctx->lock_word = bitstream_read(&ctx->bc, 32);\n    tile_size = (ctx->gop_flags & 0x40) ? 64 << bitstream_read(&ctx->bc, 2) : 0;\n    if (tile_size > 256) {\n        av_log(avctx, AV_LOG_ERROR, "Invalid tile size: %d\\n", tile_size);\n        return AVERROR_INVALIDDATA;\n    }\n    pic_conf.luma_bands   = bitstream_read(&ctx->bc, 2)  * 3 + 1;\n    pic_conf.chroma_bands = bitstream_read_bit(&ctx->bc) * 3 + 1;\n    ctx->is_scalable = pic_conf.luma_bands != 1 || pic_conf.chroma_bands != 1;\n    if (ctx->is_scalable && (pic_conf.luma_bands != 4 || pic_conf.chroma_bands != 1)) {\n        av_log(avctx, AV_LOG_ERROR, "Scalability: unsupported subdivision! Luma bands: %d, chroma bands: %d\\n",\n               pic_conf.luma_bands, pic_conf.chroma_bands);\n        return AVERROR_INVALIDDATA;\n    }\n    pic_size_indx = bitstream_read(&ctx->bc, 4);\n    if (pic_size_indx == IVI5_PIC_SIZE_ESC) {\n        pic_conf.pic_height = bitstream_read(&ctx->bc, 13);\n        pic_conf.pic_width  = bitstream_read(&ctx->bc, 13);\n    } else {\n        pic_conf.pic_height = ivi5_common_pic_sizes[pic_size_indx * 2 + 1] << 2;\n        pic_conf.pic_width  = ivi5_common_pic_sizes[pic_size_indx * 2    ] << 2;\n    }\n    if (ctx->gop_flags & 2) {\n        avpriv_report_missing_feature(avctx, "YV12 picture format");\n        return AVERROR_PATCHWELCOME;\n    }\n    pic_conf.chroma_height = (pic_conf.pic_height + 3) >> 2;\n    pic_conf.chroma_width  = (pic_conf.pic_width  + 3) >> 2;\n    if (!tile_size) {\n        pic_conf.tile_height = pic_conf.pic_height;\n        pic_conf.tile_width  = pic_conf.pic_width;\n    } else {\n        pic_conf.tile_height = pic_conf.tile_width = tile_size;\n    }\n    if (ivi_pic_config_cmp(&pic_conf, &ctx->pic_conf) || ctx->gop_invalid) {\n        result = ff_ivi_init_planes(ctx->planes, &pic_conf, 0);\n        if (result < 0) {\n            av_log(avctx, AV_LOG_ERROR, "Couldn\'t reallocate color planes!\\n");\n            return result;\n        }\n        ctx->pic_conf = pic_conf;\n        blk_size_changed = 1;\n    }\n    for (p = 0; p <= 1; p++) {\n        for (i = 0; i < (!p ? pic_conf.luma_bands : pic_conf.chroma_bands); i++) {\n            band = &ctx->planes[p].bands[i];\n            band->is_halfpel = bitstream_read_bit(&ctx->bc);\n            mb_size  = bitstream_read_bit(&ctx->bc);\n            blk_size = 8 >> bitstream_read_bit(&ctx->bc);\n            mb_size  = blk_size << !mb_size;\n            blk_size_changed = mb_size != band->mb_size || blk_size != band->blk_size;\n            if (blk_size_changed) {\n                band->mb_size  = mb_size;\n                band->blk_size = blk_size;\n            }\n            if (bitstream_read_bit(&ctx->bc)) {\n                avpriv_report_missing_feature(avctx, "Extended transform info");\n                return AVERROR_PATCHWELCOME;\n            }\n            switch ((p << 2) + i) {\n            case 0:\n                band->inv_transform  = ff_ivi_inverse_slant_8x8;\n                band->dc_transform   = ff_ivi_dc_slant_2d;\n                band->scan           = ff_zigzag_direct;\n                band->transform_size = 8;\n                break;\n            case 1:\n                band->inv_transform  = ff_ivi_row_slant8;\n                band->dc_transform   = ff_ivi_dc_row_slant;\n                band->scan           = ff_ivi_vertical_scan_8x8;\n                band->transform_size = 8;\n                break;\n            case 2:\n                band->inv_transform  = ff_ivi_col_slant8;\n                band->dc_transform   = ff_ivi_dc_col_slant;\n                band->scan           = ff_ivi_horizontal_scan_8x8;\n                band->transform_size = 8;\n                break;\n            case 3:\n                band->inv_transform  = ff_ivi_put_pixels_8x8;\n                band->dc_transform   = ff_ivi_put_dc_pixel_8x8;\n                band->scan           = ff_ivi_horizontal_scan_8x8;\n                band->transform_size = 8;\n                break;\n            case 4:\n                band->inv_transform  = ff_ivi_inverse_slant_4x4;\n                band->dc_transform   = ff_ivi_dc_slant_2d;\n                band->scan           = ff_ivi_direct_scan_4x4;\n                band->transform_size = 4;\n                break;\n            }\n            band->is_2d_trans = band->inv_transform == ff_ivi_inverse_slant_8x8 ||\n                                band->inv_transform == ff_ivi_inverse_slant_4x4;\n            if (band->transform_size != band->blk_size)\n                return AVERROR_INVALIDDATA;\n            if (!p) {\n                quant_mat = (pic_conf.luma_bands > 1) ? i+1 : 0;\n            } else {\n                quant_mat = 5;\n            }\n            if (band->blk_size == 8) {\n                band->intra_base  = &ivi5_base_quant_8x8_intra[quant_mat][0];\n                band->inter_base  = &ivi5_base_quant_8x8_inter[quant_mat][0];\n                band->intra_scale = &ivi5_scale_quant_8x8_intra[quant_mat][0];\n                band->inter_scale = &ivi5_scale_quant_8x8_inter[quant_mat][0];\n            } else {\n                band->intra_base  = ivi5_base_quant_4x4_intra;\n                band->inter_base  = ivi5_base_quant_4x4_inter;\n                band->intra_scale = ivi5_scale_quant_4x4_intra;\n                band->inter_scale = ivi5_scale_quant_4x4_inter;\n            }\n            if (bitstream_read(&ctx->bc, 2)) {\n                av_log(avctx, AV_LOG_ERROR, "End marker missing!\\n");\n                return AVERROR_INVALIDDATA;\n            }\n        }\n    }\n    for (i = 0; i < pic_conf.chroma_bands; i++) {\n        band1 = &ctx->planes[1].bands[i];\n        band2 = &ctx->planes[2].bands[i];\n        band2->width         = band1->width;\n        band2->height        = band1->height;\n        band2->mb_size       = band1->mb_size;\n        band2->blk_size      = band1->blk_size;\n        band2->is_halfpel    = band1->is_halfpel;\n        band2->intra_base    = band1->intra_base;\n        band2->inter_base    = band1->inter_base;\n        band2->intra_scale   = band1->intra_scale;\n        band2->inter_scale   = band1->inter_scale;\n        band2->scan          = band1->scan;\n        band2->inv_transform = band1->inv_transform;\n        band2->dc_transform  = band1->dc_transform;\n        band2->is_2d_trans   = band1->is_2d_trans;\n    }\n    if (blk_size_changed) {\n        result = ff_ivi_init_tiles(ctx->planes, pic_conf.tile_width,\n                                   pic_conf.tile_height);\n        if (result < 0) {\n            av_log(avctx, AV_LOG_ERROR,\n                   "Couldn\'t reallocate internal structures!\\n");\n            return result;\n        }\n    }\n    if (ctx->gop_flags & 8) {\n        if (bitstream_read(&ctx->bc, 3)) {\n            av_log(avctx, AV_LOG_ERROR, "Alignment bits are not zero!\\n");\n            return AVERROR_INVALIDDATA;\n        }\n        if (bitstream_read_bit(&ctx->bc))\n            bitstream_skip(&ctx->bc, 24);\n    }\n    bitstream_align(&ctx->bc);\n    bitstream_skip(&ctx->bc, 23);\n    if (bitstream_read_bit(&ctx->bc)) {\n        do {\n            i = bitstream_read(&ctx->bc, 16);\n        } while (i & 0x8000);\n    }\n    bitstream_align(&ctx->bc);\n    return 0;\n}', 'static inline const uint8_t *bitstream_align(BitstreamContext *bc)\n{\n    unsigned n = -bitstream_tell(bc) & 7;\n    if (n)\n        bitstream_skip(bc, n);\n    return bc->buffer + (bitstream_tell(bc) >> 3);\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        bc->bits      = 0;\n        bc->bits_left = 0;\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}']