static int decode_dc_progressive(MJpegDecodeContext *s, int16_t *block,

                                 int component, int dc_index,

                                 uint16_t *quant_matrix, int Al)

{

    int val;

    s->bdsp.clear_block(block);

    val = mjpeg_decode_dc(s, dc_index);

    if (val == 0xfffff) {

        av_log(s->avctx, AV_LOG_ERROR, "error dc\n");

        return AVERROR_INVALIDDATA;

    }

    val = (val * (quant_matrix[0] << Al)) + s->last_dc[component];

    s->last_dc[component] = val;

    block[0] = val;

    return 0;

}

static int decode_dc_progressive(MJpegDecodeContext *s, int16_t *block,

                                 int component, int dc_index,

                                 uint16_t *quant_matrix, int Al)

{

    int val;

    s->bdsp.clear_block(block);

    val = mjpeg_decode_dc(s, dc_index);

    if (val == 0xfffff) {

        av_log(s->avctx, AV_LOG_ERROR, "error dc\n");

        return AVERROR_INVALIDDATA;

    }

    val = (val * (quant_matrix[0] << Al)) + s->last_dc[component];

    s->last_dc[component] = val;

    block[0] = val;

    return 0;

}

    int val;
static int FUNC_0(MJpegDecodeContext *VAR_0, int16_t *VAR_1,

                                 int VAR_2, int VAR_3,

                                 uint16_t *VAR_4, int VAR_5)

{

    int VAR_6;

    VAR_0->bdsp.clear_block(VAR_1);

    VAR_6 = mjpeg_decode_dc(VAR_0, VAR_3);

    if (VAR_6 == 0xfffff) {

        av_log(VAR_0->avctx, AV_LOG_ERROR, "error dc\n");

        return AVERROR_INVALIDDATA;

    }

    VAR_6 = (VAR_6 * (VAR_4[0] << VAR_5)) + VAR_0->last_dc[VAR_2];

    VAR_0->last_dc[VAR_2] = VAR_6;

    VAR_1[0] = VAR_6;

    return 0;

}

static int FUNC_0(MJpegDecodeContext *VAR_0, int16_t *VAR_1,
int VAR_2, int VAR_3,
uint16_t *VAR_4, int VAR_5)
{ int VAR_6; VAR_0->bdsp.clear_block(VAR_1); VAR_6 = mjpeg_decode_dc(VAR_0, VAR_3); if (VAR_6 == 0xfffff) { av_log(VAR_0->avctx, AV_LOG_ERROR, "error dc\n"); return AVERROR_INVALIDDATA; } VAR_6 = (VAR_6 * (VAR_4[0] << VAR_5)) + VAR_0->last_dc[VAR_2]; VAR_0->last_dc[VAR_2] = VAR_6; VAR_1[0] = VAR_6; return 0; }