static av_always_inline int get_dst_color_err(PaletteUseContext *s,

                                              uint32_t c, int *er, int *eg, int *eb,

                                              const enum color_search_method search_method)

{

    const uint8_t a = c >> 24 & 0xff;

    const uint8_t r = c >> 16 & 0xff;

    const uint8_t g = c >>  8 & 0xff;

    const uint8_t b = c       & 0xff;

    const int dstx = color_get(s, c, a, r, g, b, search_method);

    const uint32_t dstc = s->palette[dstx];

    *er = r - (dstc >> 16 & 0xff);

    *eg = g - (dstc >>  8 & 0xff);

    *eb = b - (dstc       & 0xff);

    return dstx;

}

static av_always_inline int get_dst_color_err(PaletteUseContext *s,

                                              uint32_t c, int *er, int *eg, int *eb,

                                              const enum color_search_method search_method)

{

    const uint8_t a = c >> 24 & 0xff;

    const uint8_t r = c >> 16 & 0xff;

    const uint8_t g = c >>  8 & 0xff;

    const uint8_t b = c       & 0xff;

    const int dstx = color_get(s, c, a, r, g, b, search_method);

    const uint32_t dstc = s->palette[dstx];

    *er = r - (dstc >> 16 & 0xff);

    *eg = g - (dstc >>  8 & 0xff);

    *eb = b - (dstc       & 0xff);

    return dstx;

}

static av_always_inline int FUNC_0(PaletteUseContext *s,

                                              uint32_t c, int *er, int *eg, int *eb,

                                              const enum color_search_method search_method)

{

    const uint8_t VAR_0 = c >> 24 & 0xff;

    const uint8_t VAR_1 = c >> 16 & 0xff;

    const uint8_t VAR_2 = c >>  8 & 0xff;

    const uint8_t VAR_3 = c       & 0xff;

    const int VAR_4 = color_get(s, c, VAR_0, VAR_1, VAR_2, VAR_3, search_method);

    const uint32_t VAR_5 = s->palette[VAR_4];

    *er = VAR_1 - (VAR_5 >> 16 & 0xff);

    *eg = VAR_2 - (VAR_5 >>  8 & 0xff);

    *eb = VAR_3 - (VAR_5       & 0xff);

    return VAR_4;

}

static av_always_inline int FUNC_0(PaletteUseContext *s,
uint32_t c, int *er, int *eg, int *eb,
const enum color_search_method search_method)
{ const uint8_t VAR_0 = c >> 24 & 0xff; const uint8_t VAR_1 = c >> 16 & 0xff; const uint8_t VAR_2 = c >>  8 & 0xff; const uint8_t VAR_3 = c       & 0xff; const int VAR_4 = color_get(s, c, VAR_0, VAR_1, VAR_2, VAR_3, search_method); const uint32_t VAR_5 = s->palette[VAR_4]; *er = VAR_1 - (VAR_5 >> 16 & 0xff); *eg = VAR_2 - (VAR_5 >>  8 & 0xff); *eb = VAR_3 - (VAR_5       & 0xff); return VAR_4; }