static int set_palette(AVFrame * frame, const uint8_t * palette_buffer, int buf_size)

{

    uint32_t * palette = (uint32_t *)frame->data[1];

    int a;



    if (buf_size < 256*3)

        return AVERROR_INVALIDDATA;



    for(a = 0; a < 256; a++){

        palette[a] = AV_RB24(&palette_buffer[a * 3]) * 4;

    }

    frame->palette_has_changed = 1;

    return 256*3;

}

static int set_palette(AVFrame * frame, const uint8_t * palette_buffer, int buf_size)

{

    uint32_t * palette = (uint32_t *)frame->data[1];

    int a;



    if (buf_size < 256*3)

        return AVERROR_INVALIDDATA;



    for(a = 0; a < 256; a++){

        palette[a] = AV_RB24(&palette_buffer[a * 3]) * 4;

    }

    frame->palette_has_changed = 1;

    return 256*3;

}

static int set_palette(AVFrame * frame, const uint8_t * palette_buffer, int buf_size)     uint32_t * palette = (uint32_t *)frame->data[1];     if (buf_size < 256*3)         palette[a] = AV_RB24(&palette_buffer[a * 3]) * 4;     frame->palette_has_changed = 1;
static int FUNC_0(AVFrame * VAR_0, const uint8_t * VAR_1, int VAR_2)

{

    uint32_t * palette = (uint32_t *)VAR_0->data[1];

    int VAR_3;



    if (VAR_2 < 256*3)

        return AVERROR_INVALIDDATA;



    for(VAR_3 = 0; VAR_3 < 256; VAR_3++){

        palette[VAR_3] = AV_RB24(&VAR_1[VAR_3 * 3]) * 4;

    }

    VAR_0->palette_has_changed = 1;

    return 256*3;

}

static int FUNC_0(AVFrame * VAR_0, const uint8_t * VAR_1, int VAR_2)
{ uint32_t * palette = (uint32_t *)VAR_0->data[1]; int VAR_3; if (VAR_2 < 256*3)
return AVERROR_INVALIDDATA; for(VAR_3 = 0; VAR_3 < 256; VAR_3++){ palette[VAR_3] = AV_RB24(&VAR_1[VAR_3 * 3]) * 4; } VAR_0->palette_has_changed = 1; return 256*3; }