Revision 71e445fc libavformat/sgi.c

View differences:

libavformat/sgi.c
101 101
    for (z = 0; z < si->zsize; z++) {
102 102

  
103 103
#ifndef WORDS_BIGENDIAN
104
        /* rgba -> bgra for rgba32 on little endian cpus */
104
        /* rgba -> bgra for rgb32 on little endian cpus */
105 105
        if (si->zsize == 4 && z != 3)
106 106
            chan_offset = 2 - z;
107 107
        else
......
130 130
    int length = 0;
131 131

  
132 132
#ifndef WORDS_BIGENDIAN
133
    /* rgba -> bgra for rgba32 on little endian cpus */
133
    /* rgba -> bgra for rgb32 on little endian cpus */
134 134
    if (pixelstride == 4 && chan_offset != 3) {
135 135
       chan_offset = 2 - chan_offset;
136 136
    }
......
241 241
    } else if (s->zsize == SGI_RGB) {
242 242
        info->pix_fmt = PIX_FMT_RGB24;
243 243
    } else if (s->zsize == SGI_RGBA) {
244
        info->pix_fmt = PIX_FMT_RGBA32;
244
        info->pix_fmt = PIX_FMT_RGB32;
245 245
    } else {
246 246
        return AVERROR_INVALIDDATA;
247 247
    }
......
386 386
            si->dimension = SGI_MULTI_CHAN;
387 387
            si->zsize = SGI_RGB;
388 388
            break;
389
         case PIX_FMT_RGBA32:
389
         case PIX_FMT_RGB32:
390 390
            si->dimension = SGI_MULTI_CHAN;
391 391
            si->zsize = SGI_RGBA;
392 392
            break;
......
408 408
    for (z = 0; z < si->zsize; z++) {
409 409

  
410 410
#ifndef WORDS_BIGENDIAN
411
        /* rgba -> bgra for rgba32 on little endian cpus */
411
        /* rgba -> bgra for rgb32 on little endian cpus */
412 412
        if (si->zsize == 4 && z != 3)
413 413
            chan_offset = 2 - z;
414 414
        else
......
451 451
    "sgi,rgb,rgba,bw",
452 452
    sgi_probe,
453 453
    sgi_read,
454
    (1 << PIX_FMT_GRAY8) | (1 << PIX_FMT_RGB24) | (1 << PIX_FMT_RGBA32),
454
    (1 << PIX_FMT_GRAY8) | (1 << PIX_FMT_RGB24) | (1 << PIX_FMT_RGB32),
455 455
#ifdef CONFIG_MUXERS
456 456
    sgi_write,
457 457
#else

Also available in: Unified diff