Revision 8badb23e

View differences:

libavcodec/interplayvideo.c
67 67
    const unsigned char *buf;
68 68
    int size;
69 69

  
70
    int is_16bpp;
70 71
    const unsigned char *stream_ptr;
71 72
    const unsigned char *stream_end;
72 73
    unsigned char *pixel_ptr;
......
620 621
        return -1;
621 622
    }
622 623

  
623
    avctx->pix_fmt = PIX_FMT_PAL8;
624
    s->is_16bpp = avctx->bits_per_coded_sample == 16;
625
    avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8;
626
    if (s->is_16bpp) {
627
        av_log(avctx, AV_LOG_ERROR, "16-bit Interplay video is not supported yet.\n");
628
        return -1;
629
    }
624 630
    dsputil_init(&s->dsp, avctx);
625 631

  
626 632
    /* decoding map contains 4 bits of information per 8x8 block */
libavformat/ipmovie.c
93 93

  
94 94
    uint64_t frame_pts_inc;
95 95

  
96
    unsigned int video_bpp;
96 97
    unsigned int video_width;
97 98
    unsigned int video_height;
98 99
    int64_t video_pts;
......
375 376
            }
376 377
            s->video_width = AV_RL16(&scratch[0]) * 8;
377 378
            s->video_height = AV_RL16(&scratch[2]) * 8;
379
            if (opcode_version < 2 || !AV_RL16(&scratch[6])) {
380
                s->video_bpp = 8;
381
            } else {
382
                s->video_bpp = 16;
383
            }
378 384
            debug_ipmovie("video resolution: %d x %d\n",
379 385
                s->video_width, s->video_height);
380 386
            break;
......
565 571
    st->codec->codec_tag = 0;  /* no fourcc */
566 572
    st->codec->width = ipmovie->video_width;
567 573
    st->codec->height = ipmovie->video_height;
574
    st->codec->bits_per_coded_sample = ipmovie->video_bpp;
568 575

  
569 576
    /* palette considerations */
570 577
    st->codec->palctrl = &ipmovie->palette_control;

Also available in: Unified diff