Revision 0f371e3e libavcodec/xan.c

View differences:

libavcodec/xan.c
265 265

  
266 266
    switch (s->avctx->pix_fmt) {
267 267

  
268
    case PIX_FMT_PAL8:
269
        for (i = 0; i < PALETTE_COUNT; i++) {
270
            r = *palette_data++;
271
            g = *palette_data++;
272
            b = *palette_data++;
273
            s->palette[i * 4 + 0] = b;
274
            s->palette[i * 4 + 1] = g;
275
            s->palette[i * 4 + 2] = r;
276
        }
277
        break;
278

  
279 268
    case PIX_FMT_RGB555:
280 269
        palette16 = (unsigned short *)s->palette;
281 270
        for (i = 0; i < PALETTE_COUNT; i++) {
......
321 310
        }
322 311
        break;
323 312

  
313
    case PIX_FMT_PAL8:
324 314
    case PIX_FMT_RGBA32:
325 315
        palette32 = (unsigned int *)s->palette;
326 316
        for (i = 0; i < PALETTE_COUNT; i++) {

Also available in: Unified diff