static inline void dxt1_decode_pixels(const uint8_t *s, uint32_t *d,

                                      unsigned int qstride, unsigned int flag,

                                      uint64_t alpha) {

    unsigned int x, y, c0, c1, a = (!flag * 255u) << 24;

    unsigned int rb0, rb1, rb2, rb3, g0, g1, g2, g3;

    uint32_t colors[4], pixels;



    c0 = AV_RL16(s);

    c1 = AV_RL16(s+2);



    rb0  = (c0<<3 | c0<<8) & 0xf800f8;

    rb1  = (c1<<3 | c1<<8) & 0xf800f8;

    rb0 +=        (rb0>>5) & 0x070007;

    rb1 +=        (rb1>>5) & 0x070007;

    g0   =        (c0 <<5) & 0x00fc00;

    g1   =        (c1 <<5) & 0x00fc00;

    g0  +=        (g0 >>6) & 0x000300;

    g1  +=        (g1 >>6) & 0x000300;



    colors[0] = rb0 + g0 + a;

    colors[1] = rb1 + g1 + a;



    if (c0 > c1 || flag) {

        rb2 = (((2*rb0+rb1) * 21) >> 6) & 0xff00ff;

        rb3 = (((2*rb1+rb0) * 21) >> 6) & 0xff00ff;

        g2  = (((2*g0 +g1 ) * 21) >> 6) & 0x00ff00;

        g3  = (((2*g1 +g0 ) * 21) >> 6) & 0x00ff00;

        colors[3] = rb3 + g3 + a;

    } else {

        rb2 = ((rb0+rb1) >> 1) & 0xff00ff;

        g2  = ((g0 +g1 ) >> 1) & 0x00ff00;

        colors[3] = 0;

    }



    colors[2] = rb2 + g2 + a;



    pixels = AV_RL32(s+4);

    for (y=0; y<4; y++) {

        for (x=0; x<4; x++) {

            a        = (alpha & 0x0f) << 28;

            a       += a >> 4;

            d[x]     = a + colors[pixels&3];

            pixels >>= 2;

            alpha  >>= 4;

        }

        d += qstride;

    }

}

static inline void dxt1_decode_pixels(const uint8_t *s, uint32_t *d,

                                      unsigned int qstride, unsigned int flag,

                                      uint64_t alpha) {

    unsigned int x, y, c0, c1, a = (!flag * 255u) << 24;

    unsigned int rb0, rb1, rb2, rb3, g0, g1, g2, g3;

    uint32_t colors[4], pixels;



    c0 = AV_RL16(s);

    c1 = AV_RL16(s+2);



    rb0  = (c0<<3 | c0<<8) & 0xf800f8;

    rb1  = (c1<<3 | c1<<8) & 0xf800f8;

    rb0 +=        (rb0>>5) & 0x070007;

    rb1 +=        (rb1>>5) & 0x070007;

    g0   =        (c0 <<5) & 0x00fc00;

    g1   =        (c1 <<5) & 0x00fc00;

    g0  +=        (g0 >>6) & 0x000300;

    g1  +=        (g1 >>6) & 0x000300;



    colors[0] = rb0 + g0 + a;

    colors[1] = rb1 + g1 + a;



    if (c0 > c1 || flag) {

        rb2 = (((2*rb0+rb1) * 21) >> 6) & 0xff00ff;

        rb3 = (((2*rb1+rb0) * 21) >> 6) & 0xff00ff;

        g2  = (((2*g0 +g1 ) * 21) >> 6) & 0x00ff00;

        g3  = (((2*g1 +g0 ) * 21) >> 6) & 0x00ff00;

        colors[3] = rb3 + g3 + a;

    } else {

        rb2 = ((rb0+rb1) >> 1) & 0xff00ff;

        g2  = ((g0 +g1 ) >> 1) & 0x00ff00;

        colors[3] = 0;

    }



    colors[2] = rb2 + g2 + a;



    pixels = AV_RL32(s+4);

    for (y=0; y<4; y++) {

        for (x=0; x<4; x++) {

            a        = (alpha & 0x0f) << 28;

            a       += a >> 4;

            d[x]     = a + colors[pixels&3];

            pixels >>= 2;

            alpha  >>= 4;

        }

        d += qstride;

    }

}

static inline void dxt1_decode_pixels(const uint8_t *s, uint32_t *d,     c0 = AV_RL16(s);     c1 = AV_RL16(s+2);     pixels = AV_RL32(s+4);
static inline void FUNC_0(const uint8_t *VAR_0, uint32_t *VAR_1,

                                      unsigned int VAR_2, unsigned int VAR_3,

                                      uint64_t VAR_4) {

    unsigned int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9 = (!VAR_3 * 255u) << 24;

    unsigned int VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15, VAR_16, VAR_17;

    uint32_t colors[4], pixels;



    VAR_7 = AV_RL16(VAR_0);

    VAR_8 = AV_RL16(VAR_0+2);



    VAR_10  = (VAR_7<<3 | VAR_7<<8) & 0xf800f8;

    VAR_11  = (VAR_8<<3 | VAR_8<<8) & 0xf800f8;

    VAR_10 +=        (VAR_10>>5) & 0x070007;

    VAR_11 +=        (VAR_11>>5) & 0x070007;

    VAR_14   =        (VAR_7 <<5) & 0x00fc00;

    VAR_15   =        (VAR_8 <<5) & 0x00fc00;

    VAR_14  +=        (VAR_14 >>6) & 0x000300;

    VAR_15  +=        (VAR_15 >>6) & 0x000300;



    colors[0] = VAR_10 + VAR_14 + VAR_9;

    colors[1] = VAR_11 + VAR_15 + VAR_9;



    if (VAR_7 > VAR_8 || VAR_3) {

        VAR_12 = (((2*VAR_10+VAR_11) * 21) >> 6) & 0xff00ff;

        VAR_13 = (((2*VAR_11+VAR_10) * 21) >> 6) & 0xff00ff;

        VAR_16  = (((2*VAR_14 +VAR_15 ) * 21) >> 6) & 0x00ff00;

        VAR_17  = (((2*VAR_15 +VAR_14 ) * 21) >> 6) & 0x00ff00;

        colors[3] = VAR_13 + VAR_17 + VAR_9;

    } else {

        VAR_12 = ((VAR_10+VAR_11) >> 1) & 0xff00ff;

        VAR_16  = ((VAR_14 +VAR_15 ) >> 1) & 0x00ff00;

        colors[3] = 0;

    }



    colors[2] = VAR_12 + VAR_16 + VAR_9;



    pixels = AV_RL32(VAR_0+4);

    for (VAR_6=0; VAR_6<4; VAR_6++) {

        for (VAR_5=0; VAR_5<4; VAR_5++) {

            VAR_9        = (VAR_4 & 0x0f) << 28;

            VAR_9       += VAR_9 >> 4;

            VAR_1[VAR_5]     = VAR_9 + colors[pixels&3];

            pixels >>= 2;

            VAR_4  >>= 4;

        }

        VAR_1 += VAR_2;

    }

}

static inline void FUNC_0(const uint8_t *VAR_0, uint32_t *VAR_1,
unsigned int VAR_2, unsigned int VAR_3,
uint64_t VAR_4) { unsigned int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9 = (!VAR_3 * 255u) << 24; unsigned int VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15, VAR_16, VAR_17; uint32_t colors[4], pixels; VAR_7 = AV_RL16(VAR_0); VAR_8 = AV_RL16(VAR_0+2); VAR_10  = (VAR_7<<3 | VAR_7<<8) & 0xf800f8; VAR_11  = (VAR_8<<3 | VAR_8<<8) & 0xf800f8; VAR_10 +=        (VAR_10>>5) & 0x070007; VAR_11 +=        (VAR_11>>5) & 0x070007; VAR_14   =        (VAR_7 <<5) & 0x00fc00; VAR_15   =        (VAR_8 <<5) & 0x00fc00; VAR_14  +=        (VAR_14 >>6) & 0x000300; VAR_15  +=        (VAR_15 >>6) & 0x000300; colors[0] = VAR_10 + VAR_14 + VAR_9; colors[1] = VAR_11 + VAR_15 + VAR_9; if (VAR_7 > VAR_8 || VAR_3) { VAR_12 = (((2*VAR_10+VAR_11) * 21) >> 6) & 0xff00ff; VAR_13 = (((2*VAR_11+VAR_10) * 21) >> 6) & 0xff00ff; VAR_16  = (((2*VAR_14 +VAR_15 ) * 21) >> 6) & 0x00ff00; VAR_17  = (((2*VAR_15 +VAR_14 ) * 21) >> 6) & 0x00ff00; colors[3] = VAR_13 + VAR_17 + VAR_9; } else { VAR_12 = ((VAR_10+VAR_11) >> 1) & 0xff00ff; VAR_16  = ((VAR_14 +VAR_15 ) >> 1) & 0x00ff00; colors[3] = 0; } colors[2] = VAR_12 + VAR_16 + VAR_9; pixels = AV_RL32(VAR_0+4); for (VAR_6=0; VAR_6<4; VAR_6++) { for (VAR_5=0; VAR_5<4; VAR_5++) { VAR_9        = (VAR_4 & 0x0f) << 28; VAR_9       += VAR_9 >> 4; VAR_1[VAR_5]     = VAR_9 + colors[pixels&3]; pixels >>= 2; VAR_4  >>= 4; } VAR_1 += VAR_2; } }