static int msvideo1_decode_init(AVCodecContext *avctx)

{

    Msvideo1Context *s = avctx->priv_data;



    s->avctx = avctx;



    /* figure out the colorspace based on the presence of a palette */

    if (s->avctx->palctrl) {

        s->mode_8bit = 1;

        avctx->pix_fmt = PIX_FMT_PAL8;

    } else {

        s->mode_8bit = 0;

        avctx->pix_fmt = PIX_FMT_RGB555;

    }



    dsputil_init(&s->dsp, avctx);



    s->frame.data[0] = NULL;



    return 0;

}

static int msvideo1_decode_init(AVCodecContext *avctx)

{

    Msvideo1Context *s = avctx->priv_data;



    s->avctx = avctx;



    

    if (s->avctx->palctrl) {

        s->mode_8bit = 1;

        avctx->pix_fmt = PIX_FMT_PAL8;

    } else {

        s->mode_8bit = 0;

        avctx->pix_fmt = PIX_FMT_RGB555;

    }



    dsputil_init(&s->dsp, avctx);



    s->frame.data[0] = NULL;



    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0)

{

    Msvideo1Context *s = VAR_0->priv_data;



    s->VAR_0 = VAR_0;



    

    if (s->VAR_0->palctrl) {

        s->mode_8bit = 1;

        VAR_0->pix_fmt = PIX_FMT_PAL8;

    } else {

        s->mode_8bit = 0;

        VAR_0->pix_fmt = PIX_FMT_RGB555;

    }



    dsputil_init(&s->dsp, VAR_0);



    s->frame.data[0] = NULL;



    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0)
{ Msvideo1Context *s = VAR_0->priv_data; s->VAR_0 = VAR_0; if (s->VAR_0->palctrl) { s->mode_8bit = 1; VAR_0->pix_fmt = PIX_FMT_PAL8; } else { s->mode_8bit = 0; VAR_0->pix_fmt = PIX_FMT_RGB555; } dsputil_init(&s->dsp, VAR_0); s->frame.data[0] = NULL; return 0; }