Revision 71e445fc

View differences:

ffplay.c
1174 1174
    case PIX_FMT_YUV420P:
1175 1175
    case PIX_FMT_YUV422P:
1176 1176
    case PIX_FMT_YUV444P:
1177
    case PIX_FMT_YUV422:
1177
    case PIX_FMT_YUYV422:
1178 1178
    case PIX_FMT_YUV410P:
1179 1179
    case PIX_FMT_YUV411P:
1180 1180
        is_yuv = 1;
libavcodec/8bps.c
27 27
 *   http://www.pcisys.net/~melanson/codecs/
28 28
 *
29 29
 * Supports: PAL8 (RGB 8bpp, paletted)
30
 *         : BGR24 (RGB 24bpp) (can also output it as RGBA32)
31
 *         : RGBA32 (RGB 32bpp, 4th plane is probably alpha and it's ignored)
30
 *         : BGR24 (RGB 24bpp) (can also output it as RGB32)
31
 *         : RGB32 (RGB 32bpp, 4th plane is probably alpha and it's ignored)
32 32
 *
33 33
 */
34 34

  
......
39 39
#include "avcodec.h"
40 40

  
41 41

  
42
static const enum PixelFormat pixfmt_rgb24[] = {PIX_FMT_BGR24, PIX_FMT_RGBA32, -1};
42
static const enum PixelFormat pixfmt_rgb24[] = {PIX_FMT_BGR24, PIX_FMT_RGB32, -1};
43 43

  
44 44
/*
45 45
 * Decoder context
......
89 89
        if (planes == 4)
90 90
                planes--;
91 91

  
92
        px_inc = planes + (avctx->pix_fmt == PIX_FMT_RGBA32);
92
        px_inc = planes + (avctx->pix_fmt == PIX_FMT_RGB32);
93 93

  
94 94
        for (p = 0; p < planes; p++) {
95 95
                /* Lines length pointer for this plane */
......
181 181
                        c->planemap[2] = 0; // 3rd plane is blue
182 182
                        break;
183 183
                case 32:
184
                        avctx->pix_fmt = PIX_FMT_RGBA32;
184
                        avctx->pix_fmt = PIX_FMT_RGB32;
185 185
                        c->planes = 4;
186 186
#ifdef WORDS_BIGENDIAN
187 187
                        c->planemap[0] = 1; // 1st plane is red
libavcodec/cscd.c
222 222
    switch (avctx->bits_per_sample) {
223 223
        case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
224 224
        case 24: avctx->pix_fmt = PIX_FMT_BGR24; break;
225
        case 32: avctx->pix_fmt = PIX_FMT_RGBA32; break;
225
        case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
226 226
        default:
227 227
            av_log(avctx, AV_LOG_ERROR,
228 228
                   "CamStudio codec error: invalid depth %i bpp\n",
libavcodec/ffv1.c
600 600
    case PIX_FMT_YUV410P:
601 601
        s->colorspace= 0;
602 602
        break;
603
    case PIX_FMT_RGBA32:
603
    case PIX_FMT_RGB32:
604 604
        s->colorspace= 1;
605 605
        break;
606 606
    default:
......
895 895
            av_log(f->avctx, AV_LOG_ERROR, "chroma subsampling not supported in this colorspace\n");
896 896
            return -1;
897 897
        }
898
        f->avctx->pix_fmt= PIX_FMT_RGBA32;
898
        f->avctx->pix_fmt= PIX_FMT_RGB32;
899 899
    }else{
900 900
        av_log(f->avctx, AV_LOG_ERROR, "colorspace not supported\n");
901 901
        return -1;
......
1035 1035
    encode_init,
1036 1036
    encode_frame,
1037 1037
    common_end,
1038
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGBA32, -1},
1038
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGB32, -1},
1039 1039
};
1040 1040
#endif
libavcodec/huffyuv.c
452 452
        break;
453 453
    case 16:
454 454
        if(s->yuy2){
455
            avctx->pix_fmt = PIX_FMT_YUV422;
455
            avctx->pix_fmt = PIX_FMT_YUYV422;
456 456
        }else{
457 457
            avctx->pix_fmt = PIX_FMT_YUV422P;
458 458
        }
......
460 460
    case 24:
461 461
    case 32:
462 462
        if(s->bgr32){
463
            avctx->pix_fmt = PIX_FMT_RGBA32;
463
            avctx->pix_fmt = PIX_FMT_RGB32;
464 464
        }else{
465 465
            avctx->pix_fmt = PIX_FMT_BGR24;
466 466
        }
libavcodec/imgconvert.c
91 91
        .depth = 8,
92 92
        .x_chroma_shift = 0, .y_chroma_shift = 0,
93 93
    },
94
    [PIX_FMT_YUV422] = {
95
        .name = "yuv422",
94
    [PIX_FMT_YUYV422] = {
95
        .name = "yuyv422",
96 96
        .nb_channels = 1,
97 97
        .color_type = FF_COLOR_YUV,
98 98
        .pixel_type = FF_PIXEL_PACKED,
......
167 167
        .depth = 8,
168 168
        .x_chroma_shift = 0, .y_chroma_shift = 0,
169 169
    },
170
    [PIX_FMT_RGBA32] = {
171
        .name = "rgba32",
170
    [PIX_FMT_RGB32] = {
171
        .name = "rgb32",
172 172
        .nb_channels = 4, .is_alpha = 1,
173 173
        .color_type = FF_COLOR_RGB,
174 174
        .pixel_type = FF_PIXEL_PACKED,
......
243 243
    [PIX_FMT_XVMC_MPEG2_IDCT] = {
244 244
        .name = "xvmcidct",
245 245
    },
246
    [PIX_FMT_UYVY411] = {
247
        .name = "uyvy411",
246
    [PIX_FMT_UYYVYY411] = {
247
        .name = "uyyvyy411",
248 248
        .nb_channels = 1,
249 249
        .color_type = FF_COLOR_YUV,
250 250
        .pixel_type = FF_PIXEL_PACKED,
......
432 432
        picture->data[2] = NULL;
433 433
        picture->linesize[0] = width * 3;
434 434
        return size * 3;
435
    case PIX_FMT_RGBA32:
435
    case PIX_FMT_RGB32:
436 436
    case PIX_FMT_BGR32:
437 437
    case PIX_FMT_RGB32_1:
438 438
    case PIX_FMT_BGR32_1:
......
447 447
    case PIX_FMT_BGR565:
448 448
    case PIX_FMT_RGB555:
449 449
    case PIX_FMT_RGB565:
450
    case PIX_FMT_YUV422:
450
    case PIX_FMT_YUYV422:
451 451
        picture->data[0] = ptr;
452 452
        picture->data[1] = NULL;
453 453
        picture->data[2] = NULL;
......
459 459
        picture->data[2] = NULL;
460 460
        picture->linesize[0] = width * 2;
461 461
        return size * 2;
462
    case PIX_FMT_UYVY411:
462
    case PIX_FMT_UYYVYY411:
463 463
        picture->data[0] = ptr;
464 464
        picture->data[1] = NULL;
465 465
        picture->data[2] = NULL;
......
519 519
        return -1;
520 520

  
521 521
    if (pf->pixel_type == FF_PIXEL_PACKED || pf->pixel_type == FF_PIXEL_PALETTE) {
522
        if (pix_fmt == PIX_FMT_YUV422 ||
522
        if (pix_fmt == PIX_FMT_YUYV422 ||
523 523
            pix_fmt == PIX_FMT_UYVY422 ||
524 524
            pix_fmt == PIX_FMT_BGR565 ||
525 525
            pix_fmt == PIX_FMT_BGR555 ||
526 526
            pix_fmt == PIX_FMT_RGB565 ||
527 527
            pix_fmt == PIX_FMT_RGB555)
528 528
            w = width * 2;
529
        else if (pix_fmt == PIX_FMT_UYVY411)
529
        else if (pix_fmt == PIX_FMT_UYYVYY411)
530 530
          w = width + width/2;
531 531
        else if (pix_fmt == PIX_FMT_PAL8)
532 532
          w = width;
......
633 633
    switch(pf->pixel_type) {
634 634
    case FF_PIXEL_PACKED:
635 635
        switch(pix_fmt) {
636
        case PIX_FMT_YUV422:
636
        case PIX_FMT_YUYV422:
637 637
        case PIX_FMT_UYVY422:
638 638
        case PIX_FMT_RGB565:
639 639
        case PIX_FMT_RGB555:
......
641 641
        case PIX_FMT_BGR555:
642 642
            bits = 16;
643 643
            break;
644
        case PIX_FMT_UYVY411:
644
        case PIX_FMT_UYYVYY411:
645 645
            bits = 12;
646 646
            break;
647 647
        default:
......
753 753
    switch(pf->pixel_type) {
754 754
    case FF_PIXEL_PACKED:
755 755
        switch(pix_fmt) {
756
        case PIX_FMT_YUV422:
756
        case PIX_FMT_YUYV422:
757 757
        case PIX_FMT_UYVY422:
758 758
        case PIX_FMT_RGB565:
759 759
        case PIX_FMT_RGB555:
......
761 761
        case PIX_FMT_BGR555:
762 762
            bits = 16;
763 763
            break;
764
        case PIX_FMT_UYVY411:
764
        case PIX_FMT_UYYVYY411:
765 765
            bits = 12;
766 766
            break;
767 767
        default:
......
1931 1931

  
1932 1932
   - all FF_COLOR_GRAY formats must convert to and from PIX_FMT_GRAY8
1933 1933

  
1934
   - all FF_COLOR_RGB formats with alpha must convert to and from PIX_FMT_RGBA32
1934
   - all FF_COLOR_RGB formats with alpha must convert to and from PIX_FMT_RGB32
1935 1935

  
1936 1936
   - PIX_FMT_YUV444P and PIX_FMT_YUVJ444P must convert to and from
1937 1937
     PIX_FMT_RGB24.
......
1942 1942
*/
1943 1943
static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
1944 1944
    [PIX_FMT_YUV420P] = {
1945
        [PIX_FMT_YUV422] = {
1945
        [PIX_FMT_YUYV422] = {
1946 1946
            .convert = yuv420p_to_yuv422,
1947 1947
        },
1948 1948
        [PIX_FMT_RGB555] = {
......
1957 1957
        [PIX_FMT_RGB24] = {
1958 1958
            .convert = yuv420p_to_rgb24
1959 1959
        },
1960
        [PIX_FMT_RGBA32] = {
1960
        [PIX_FMT_RGB32] = {
1961 1961
            .convert = yuv420p_to_rgba32
1962 1962
        },
1963 1963
        [PIX_FMT_UYVY422] = {
......
1965 1965
        },
1966 1966
    },
1967 1967
    [PIX_FMT_YUV422P] = {
1968
        [PIX_FMT_YUV422] = {
1968
        [PIX_FMT_YUYV422] = {
1969 1969
            .convert = yuv422p_to_yuv422,
1970 1970
        },
1971 1971
        [PIX_FMT_UYVY422] = {
......
1990 1990
        [PIX_FMT_RGB24] = {
1991 1991
            .convert = yuvj420p_to_rgb24
1992 1992
        },
1993
        [PIX_FMT_RGBA32] = {
1993
        [PIX_FMT_RGB32] = {
1994 1994
            .convert = yuvj420p_to_rgba32
1995 1995
        },
1996 1996
    },
......
1999 1999
            .convert = yuvj444p_to_rgb24
2000 2000
        },
2001 2001
    },
2002
    [PIX_FMT_YUV422] = {
2002
    [PIX_FMT_YUYV422] = {
2003 2003
        [PIX_FMT_YUV420P] = {
2004 2004
            .convert = yuv422_to_yuv420p,
2005 2005
        },
......
2025 2025
        [PIX_FMT_RGB555] = {
2026 2026
            .convert = rgb24_to_rgb555
2027 2027
        },
2028
        [PIX_FMT_RGBA32] = {
2028
        [PIX_FMT_RGB32] = {
2029 2029
            .convert = rgb24_to_rgba32
2030 2030
        },
2031 2031
        [PIX_FMT_BGR24] = {
......
2047 2047
            .convert = rgb24_to_yuvj444p
2048 2048
        },
2049 2049
    },
2050
    [PIX_FMT_RGBA32] = {
2050
    [PIX_FMT_RGB32] = {
2051 2051
        [PIX_FMT_RGB24] = {
2052 2052
            .convert = rgba32_to_rgb24
2053 2053
        },
......
2071 2071
        },
2072 2072
    },
2073 2073
    [PIX_FMT_BGR24] = {
2074
        [PIX_FMT_RGBA32] = {
2074
        [PIX_FMT_RGB32] = {
2075 2075
            .convert = bgr24_to_rgba32
2076 2076
        },
2077 2077
        [PIX_FMT_RGB24] = {
......
2088 2088
        [PIX_FMT_RGB24] = {
2089 2089
            .convert = rgb555_to_rgb24
2090 2090
        },
2091
        [PIX_FMT_RGBA32] = {
2091
        [PIX_FMT_RGB32] = {
2092 2092
            .convert = rgb555_to_rgba32
2093 2093
        },
2094 2094
        [PIX_FMT_YUV420P] = {
......
2099 2099
        },
2100 2100
    },
2101 2101
    [PIX_FMT_RGB565] = {
2102
        [PIX_FMT_RGBA32] = {
2102
        [PIX_FMT_RGB32] = {
2103 2103
            .convert = rgb565_to_rgba32
2104 2104
        },
2105 2105
        [PIX_FMT_RGB24] = {
......
2141 2141
        [PIX_FMT_BGR24] = {
2142 2142
            .convert = gray_to_bgr24
2143 2143
        },
2144
        [PIX_FMT_RGBA32] = {
2144
        [PIX_FMT_RGB32] = {
2145 2145
            .convert = gray_to_rgba32
2146 2146
        },
2147 2147
        [PIX_FMT_MONOWHITE] = {
......
2180 2180
        [PIX_FMT_RGB24] = {
2181 2181
            .convert = pal8_to_rgb24
2182 2182
        },
2183
        [PIX_FMT_RGBA32] = {
2183
        [PIX_FMT_RGB32] = {
2184 2184
            .convert = pal8_to_rgba32
2185 2185
        },
2186 2186
    },
2187
    [PIX_FMT_UYVY411] = {
2187
    [PIX_FMT_UYYVYY411] = {
2188 2188
        [PIX_FMT_YUV411P] = {
2189 2189
            .convert = uyvy411_to_yuv411p,
2190 2190
        },
......
2499 2499
 no_chroma_filter:
2500 2500

  
2501 2501
    /* try to use an intermediate format */
2502
    if (src_pix_fmt == PIX_FMT_YUV422 ||
2503
        dst_pix_fmt == PIX_FMT_YUV422) {
2502
    if (src_pix_fmt == PIX_FMT_YUYV422 ||
2503
        dst_pix_fmt == PIX_FMT_YUYV422) {
2504 2504
        /* specific case: convert to YUV422P first */
2505 2505
        int_pix_fmt = PIX_FMT_YUV422P;
2506 2506
    } else if (src_pix_fmt == PIX_FMT_UYVY422 ||
2507 2507
        dst_pix_fmt == PIX_FMT_UYVY422) {
2508 2508
        /* specific case: convert to YUV422P first */
2509 2509
        int_pix_fmt = PIX_FMT_YUV422P;
2510
    } else if (src_pix_fmt == PIX_FMT_UYVY411 ||
2511
        dst_pix_fmt == PIX_FMT_UYVY411) {
2510
    } else if (src_pix_fmt == PIX_FMT_UYYVYY411 ||
2511
        dst_pix_fmt == PIX_FMT_UYYVYY411) {
2512 2512
        /* specific case: convert to YUV411P first */
2513 2513
        int_pix_fmt = PIX_FMT_YUV411P;
2514 2514
    } else if ((src_pix->color_type == FF_COLOR_GRAY &&
......
2536 2536
    } else {
2537 2537
        /* the two formats are rgb or gray8 or yuv[j]444p */
2538 2538
        if (src_pix->is_alpha && dst_pix->is_alpha)
2539
            int_pix_fmt = PIX_FMT_RGBA32;
2539
            int_pix_fmt = PIX_FMT_RGB32;
2540 2540
        else
2541 2541
            int_pix_fmt = PIX_FMT_RGB24;
2542 2542
    }
......
2597 2597
    if (!pf->is_alpha)
2598 2598
        return 0;
2599 2599
    switch(pix_fmt) {
2600
    case PIX_FMT_RGBA32:
2600
    case PIX_FMT_RGB32:
2601 2601
        ret = get_alpha_info_rgba32(src, width, height);
2602 2602
        break;
2603 2603
    case PIX_FMT_PAL8:
libavcodec/loco.c
262 262
        avctx->pix_fmt = PIX_FMT_YUV420P;
263 263
        break;
264 264
    case LOCO_CRGBA: case LOCO_RGBA:
265
        avctx->pix_fmt = PIX_FMT_RGBA32;
265
        avctx->pix_fmt = PIX_FMT_RGB32;
266 266
        break;
267 267
    default:
268 268
        av_log(avctx, AV_LOG_INFO, "Unknown colorspace, index = %i\n", l->mode);
libavcodec/mjpeg.c
441 441
    }
442 442

  
443 443
    put_bits(&s->pb, 16, 17);
444
    if(lossless && s->avctx->pix_fmt == PIX_FMT_RGBA32)
444
    if(lossless && s->avctx->pix_fmt == PIX_FMT_RGB32)
445 445
        put_bits(&s->pb, 8, 9); /* 9 bits/component RCT */
446 446
    else
447 447
        put_bits(&s->pb, 8, 8); /* 8 bits/component */
......
700 700

  
701 701
    s->header_bits= put_bits_count(&s->pb);
702 702

  
703
    if(avctx->pix_fmt == PIX_FMT_RGBA32){
703
    if(avctx->pix_fmt == PIX_FMT_RGB32){
704 704
        int x, y, i;
705 705
        const int linesize= p->linesize[0];
706 706
        uint16_t (*buffer)[4]= (void *) s->rd_scratchpad;
......
1209 1209
    case 0x222222:
1210 1210
    case 0x111111:
1211 1211
        if(s->rgb){
1212
            s->avctx->pix_fmt = PIX_FMT_RGBA32;
1212
            s->avctx->pix_fmt = PIX_FMT_RGB32;
1213 1213
        }else if(s->nb_components==3)
1214 1214
            s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P;
1215 1215
        else
libavcodec/png.c
562 562
                    avctx->pix_fmt = PIX_FMT_RGB24;
563 563
                } else if (s->bit_depth == 8 &&
564 564
                           s->color_type == PNG_COLOR_TYPE_RGB_ALPHA) {
565
                    avctx->pix_fmt = PIX_FMT_RGBA32;
565
                    avctx->pix_fmt = PIX_FMT_RGB32;
566 566
                } else if (s->bit_depth == 8 &&
567 567
                           s->color_type == PNG_COLOR_TYPE_GRAY) {
568 568
                    avctx->pix_fmt = PIX_FMT_GRAY8;
......
782 782

  
783 783
    is_progressive = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
784 784
    switch(avctx->pix_fmt) {
785
    case PIX_FMT_RGBA32:
785
    case PIX_FMT_RGB32:
786 786
        bit_depth = 8;
787 787
        color_type = PNG_COLOR_TYPE_RGB_ALPHA;
788 788
        break;
......
961 961
    common_init,
962 962
    encode_frame,
963 963
    NULL, //encode_end,
964
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGBA32, PIX_FMT_PAL8, PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, -1},
964
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_PAL8, PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, -1},
965 965
};
966 966
#endif // CONFIG_PNG_ENCODER
libavcodec/pnm.c
124 124
        } else if (depth == 3) {
125 125
            avctx->pix_fmt = PIX_FMT_RGB24;
126 126
        } else if (depth == 4) {
127
            avctx->pix_fmt = PIX_FMT_RGBA32;
127
            avctx->pix_fmt = PIX_FMT_RGB32;
128 128
        } else {
129 129
            return -1;
130 130
        }
......
240 240
            }
241 241
        }
242 242
        break;
243
    case PIX_FMT_RGBA32:
243
    case PIX_FMT_RGB32:
244 244
        ptr = p->data[0];
245 245
        linesize = p->linesize[0];
246 246
        if(s->bytestream + avctx->width*avctx->height*4 > s->bytestream_end)
......
389 389
        maxval = 255;
390 390
        tuple_type = "RGB";
391 391
        break;
392
    case PIX_FMT_RGBA32:
392
    case PIX_FMT_RGB32:
393 393
        n = w * 4;
394 394
        depth = 4;
395 395
        maxval = 255;
......
406 406
    ptr = p->data[0];
407 407
    linesize = p->linesize[0];
408 408

  
409
    if (avctx->pix_fmt == PIX_FMT_RGBA32) {
409
    if (avctx->pix_fmt == PIX_FMT_RGB32) {
410 410
        int j;
411 411
        unsigned int v;
412 412

  
......
601 601
    pam_encode_frame,
602 602
    NULL, //encode_end,
603 603
    pnm_decode_frame,
604
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGBA32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, -1},
604
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, -1},
605 605
};
606 606
#endif // CONFIG_PAM_ENCODER
libavcodec/qtrle.c
29 29
 * The QT RLE decoder has seven modes of operation:
30 30
 * 1, 2, 4, 8, 16, 24, and 32 bits per pixel. For modes 1, 2, 4, and 8
31 31
 * the decoder outputs PAL8 colorspace data. 16-bit data yields RGB555
32
 * data. 24-bit data is RGB24 and 32-bit data is RGBA32.
32
 * data. 24-bit data is RGB24 and 32-bit data is RGB32.
33 33
 */
34 34

  
35 35
#include <stdio.h>
......
515 515
        break;
516 516

  
517 517
    case 32:
518
        avctx->pix_fmt = PIX_FMT_RGBA32;
518
        avctx->pix_fmt = PIX_FMT_RGB32;
519 519
        break;
520 520

  
521 521
    default:
libavcodec/raw.c
48 48
    { PIX_FMT_GRAY8,   MKTAG(' ', ' ', 'Y', '8') },
49 49

  
50 50

  
51
    { PIX_FMT_YUV422,  MKTAG('Y', 'U', 'Y', '2') }, /* Packed formats */
52
    { PIX_FMT_YUV422,  MKTAG('Y', '4', '2', '2') },
51
    { PIX_FMT_YUYV422, MKTAG('Y', 'U', 'Y', '2') }, /* Packed formats */
52
    { PIX_FMT_YUYV422, MKTAG('Y', '4', '2', '2') },
53 53
    { PIX_FMT_UYVY422, MKTAG('U', 'Y', 'V', 'Y') },
54 54
    { PIX_FMT_GRAY8,   MKTAG('G', 'R', 'E', 'Y') },
55 55
    { PIX_FMT_RGB555,  MKTAG('R', 'G', 'B', 15) },
......
99 99
        case 15: avctx->pix_fmt= PIX_FMT_RGB555; break;
100 100
        case 16: avctx->pix_fmt= PIX_FMT_RGB555; break;
101 101
        case 24: avctx->pix_fmt= PIX_FMT_BGR24 ; break;
102
        case 32: avctx->pix_fmt= PIX_FMT_RGBA32; break;
102
        case 32: avctx->pix_fmt= PIX_FMT_RGB32; break;
103 103
        }
104 104
    }
105 105

  
libavcodec/snow.c
3991 3991
//    case PIX_FMT_YUV410P:
3992 3992
        s->colorspace_type= 0;
3993 3993
        break;
3994
/*    case PIX_FMT_RGBA32:
3994
/*    case PIX_FMT_RGB32:
3995 3995
        s->colorspace= 1;
3996 3996
        break;*/
3997 3997
    default:
libavcodec/targa.c
132 132
        avctx->pix_fmt = PIX_FMT_BGR24;
133 133
        break;
134 134
    case 32:
135
        avctx->pix_fmt = PIX_FMT_RGBA32;
135
        avctx->pix_fmt = PIX_FMT_RGB32;
136 136
        break;
137 137
    default:
138 138
        av_log(avctx, AV_LOG_ERROR, "Bit depth %i is not supported\n", s->bpp);
libavcodec/truemotion1.c
417 417

  
418 418
    // FIXME: where to place this ?!?!
419 419
    if (compression_types[header.compression].algorithm == ALGO_RGB24H)
420
        s->avctx->pix_fmt = PIX_FMT_RGBA32;
420
        s->avctx->pix_fmt = PIX_FMT_RGB32;
421 421
    else
422 422
        s->avctx->pix_fmt = PIX_FMT_RGB555; // RGB565 is supported aswell
423 423

  
libavcodec/tscc.c
283 283
    case 24:
284 284
             avctx->pix_fmt = PIX_FMT_BGR24;
285 285
             break;
286
    case 32: avctx->pix_fmt = PIX_FMT_RGBA32; break;
286
    case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
287 287
    default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_sample);
288 288
             return -1;
289 289
    }
libavcodec/utils.c
172 172

  
173 173
    switch(s->pix_fmt){
174 174
    case PIX_FMT_YUV420P:
175
    case PIX_FMT_YUV422:
175
    case PIX_FMT_YUYV422:
176 176
    case PIX_FMT_UYVY422:
177 177
    case PIX_FMT_YUV422P:
178 178
    case PIX_FMT_YUV444P:
......
186 186
        h_align= 16;
187 187
        break;
188 188
    case PIX_FMT_YUV411P:
189
    case PIX_FMT_UYVY411:
189
    case PIX_FMT_UYYVYY411:
190 190
        w_align=32;
191 191
        h_align=8;
192 192
        break;
libavformat/dc1394.c
42 42
    int frame_size_id;
43 43
} dc1394_frame_formats[] = {
44 44
    { 320, 240, PIX_FMT_UYVY422, MODE_320x240_YUV422 },
45
    { 640, 480, PIX_FMT_UYVY411, MODE_640x480_YUV411 },
45
    { 640, 480, PIX_FMT_UYYVYY411, MODE_640x480_YUV411 },
46 46
    { 640, 480, PIX_FMT_UYVY422, MODE_640x480_YUV422 },
47 47
    {   0,   0, 0, MODE_320x240_YUV422 } /* default -- gotta be the last one */
48 48
};
libavformat/grab.c
124 124
    if (ap->pix_fmt == PIX_FMT_YUV420P) {
125 125
        desired_palette = VIDEO_PALETTE_YUV420P;
126 126
        desired_depth = 12;
127
    } else if (ap->pix_fmt == PIX_FMT_YUV422) {
127
    } else if (ap->pix_fmt == PIX_FMT_YUYV422) {
128 128
        desired_palette = VIDEO_PALETTE_YUV422;
129 129
        desired_depth = 16;
130 130
    } else if (ap->pix_fmt == PIX_FMT_BGR24) {
......
260 260
        break;
261 261
    case VIDEO_PALETTE_YUV422:
262 262
        frame_size = width * height * 2;
263
        st->codec->pix_fmt = PIX_FMT_YUV422;
263
        st->codec->pix_fmt = PIX_FMT_YUYV422;
264 264
        break;
265 265
    case VIDEO_PALETTE_RGB24:
266 266
        frame_size = width * height * 3;
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
libavformat/v4l2.c
74 74
        .v4l2_fmt = V4L2_PIX_FMT_YUV422P,
75 75
    },
76 76
    {
77
        .ff_fmt = PIX_FMT_YUV422,
77
        .ff_fmt = PIX_FMT_YUYV422,
78 78
        .v4l2_fmt = V4L2_PIX_FMT_YUYV,
79 79
    },
80 80
    {
......
99 99
    },
100 100
    /*
101 101
    {
102
        .ff_fmt = PIX_FMT_RGBA32,
102
        .ff_fmt = PIX_FMT_RGB32,
103 103
        .v4l2_fmt = V4L2_PIX_FMT_BGR32,
104 104
    },
105 105
    */
libavformat/x11grab.c
221 221
            return AVERROR_IO;
222 222
        }
223 223
#endif
224
        input_pixfmt = PIX_FMT_RGBA32;
224
        input_pixfmt = PIX_FMT_RGB32;
225 225
        break;
226 226
    default:
227 227
        av_log(s1, AV_LOG_ERROR, "image depth %i not supported ... aborting\n", image->bits_per_pixel);
libavutil/avutil.h
26 26
 * external api header.
27 27
 */
28 28

  
29

  
30
#ifdef __cplusplus
31
extern "C" {
32
#endif
33

  
34 29
#define AV_STRINGIFY(s)         AV_TOSTRING(s)
35 30
#define AV_TOSTRING(s) #s
36 31

  
37
#define LIBAVUTIL_VERSION_INT   ((49<<16)+(3<<8)+0)
38
#define LIBAVUTIL_VERSION       49.3.0
32
#define LIBAVUTIL_VERSION_INT   ((50<<16)+(0<<8)+0)
33
#define LIBAVUTIL_VERSION       50.0.0
39 34
#define LIBAVUTIL_BUILD         LIBAVUTIL_VERSION_INT
40 35

  
41 36
#define LIBAVUTIL_IDENT         "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
......
130 125
#define PIX_FMT_YUV422  PIX_FMT_YUYV422
131 126
#endif
132 127

  
133
#ifdef __cplusplus
134
}
135
#endif
136

  
137 128
#endif /* AVUTIL_H */
vhook/imlib2.c
340 340
    imlib_context_set_image(image);
341 341
    data = imlib_image_get_data();
342 342

  
343
        avpicture_fill(&picture1, (uint8_t *) data, PIX_FMT_RGBA32, width, height);
343
        avpicture_fill(&picture1, (uint8_t *) data, PIX_FMT_RGB32, width, height);
344 344

  
345 345
    // if we already got a SWS context, let's realloc if is not re-useable
346 346
    ci->toRGB_convert_ctx = sws_getCachedContext(ci->toRGB_convert_ctx,
347 347
                                width, height, pix_fmt,
348
                                width, height, PIX_FMT_RGBA32,
348
                                width, height, PIX_FMT_RGB32,
349 349
                                sws_flags, NULL, NULL, NULL);
350 350
    if (ci->toRGB_convert_ctx == NULL) {
351 351
        av_log(NULL, AV_LOG_ERROR,
......
430 430
    }
431 431

  
432 432
    ci->fromRGB_convert_ctx = sws_getCachedContext(ci->fromRGB_convert_ctx,
433
                                    width, height, PIX_FMT_RGBA32,
433
                                    width, height, PIX_FMT_RGB32,
434 434
                                    width, height, pix_fmt,
435 435
                                    sws_flags, NULL, NULL, NULL);
436 436
    if (ci->fromRGB_convert_ctx == NULL) {
vhook/watermark.c
208 208
    int thrG = ci->thrG;
209 209
    int thrB = ci->thrB;
210 210

  
211
    if (pix_fmt != PIX_FMT_RGBA32) {
211
    if (pix_fmt != PIX_FMT_RGB32) {
212 212
        int size;
213 213

  
214
        size = avpicture_get_size(PIX_FMT_RGBA32, src_width, src_height);
214
        size = avpicture_get_size(PIX_FMT_RGB32, src_width, src_height);
215 215
        buf = av_malloc(size);
216 216

  
217
        avpicture_fill(&picture1, buf, PIX_FMT_RGBA32, src_width, src_height);
217
        avpicture_fill(&picture1, buf, PIX_FMT_RGB32, src_width, src_height);
218 218

  
219 219
        // if we already got a SWS context, let's realloc if is not re-useable
220 220
        ci->toRGB_convert_ctx = sws_getCachedContext(ci->toRGB_convert_ctx,
221 221
                                    src_width, src_height, pix_fmt,
222
                                    src_width, src_height, PIX_FMT_RGBA32,
222
                                    src_width, src_height, PIX_FMT_RGB32,
223 223
                                    sws_flags, NULL, NULL, NULL);
224 224
        if (ci->toRGB_convert_ctx == NULL) {
225 225
            av_log(NULL, AV_LOG_ERROR,
......
248 248
    ym_size = ci->y_size;
249 249

  
250 250
    // I'll do the *4 => <<2 crap later. Most compilers understand that anyway.
251
    // According to avcodec.h PIX_FMT_RGBA32 is handled in endian specific manner.
251
    // According to avcodec.h PIX_FMT_RGB32 is handled in endian specific manner.
252 252
    for (y=0; y<src_height; y++) {
253 253
        offs = y * (src_width * 4);
254 254
        offsm = (((y * ym_size) / src_height) * 4) * xm_size; // offsm first in maskline. byteoffs!
......
291 291

  
292 292

  
293 293

  
294
    if (pix_fmt != PIX_FMT_RGBA32) {
294
    if (pix_fmt != PIX_FMT_RGB32) {
295 295
        ci->fromRGB_convert_ctx = sws_getCachedContext(ci->fromRGB_convert_ctx,
296
                                      src_width, src_height, PIX_FMT_RGBA32,
296
                                      src_width, src_height, PIX_FMT_RGB32,
297 297
                                      src_width, src_height, pix_fmt,
298 298
                                      sws_flags, NULL, NULL, NULL);
299 299
        if (ci->fromRGB_convert_ctx == NULL) {
......
339 339
    uint32_t pixel;
340 340
    uint32_t pixelm;
341 341

  
342
    if (pix_fmt != PIX_FMT_RGBA32) {
342
    if (pix_fmt != PIX_FMT_RGB32) {
343 343
        int size;
344 344

  
345
        size = avpicture_get_size(PIX_FMT_RGBA32, src_width, src_height);
345
        size = avpicture_get_size(PIX_FMT_RGB32, src_width, src_height);
346 346
        buf = av_malloc(size);
347 347

  
348
        avpicture_fill(&picture1, buf, PIX_FMT_RGBA32, src_width, src_height);
348
        avpicture_fill(&picture1, buf, PIX_FMT_RGB32, src_width, src_height);
349 349

  
350 350
        // if we already got a SWS context, let's realloc if is not re-useable
351 351
        ci->toRGB_convert_ctx = sws_getCachedContext(ci->toRGB_convert_ctx,
352 352
                                    src_width, src_height, pix_fmt,
353
                                    src_width, src_height, PIX_FMT_RGBA32,
353
                                    src_width, src_height, PIX_FMT_RGB32,
354 354
                                    sws_flags, NULL, NULL, NULL);
355 355
        if (ci->toRGB_convert_ctx == NULL) {
356 356
            av_log(NULL, AV_LOG_ERROR,
......
379 379
    ym_size = ci->y_size;
380 380

  
381 381
    // I'll do the *4 => <<2 crap later. Most compilers understand that anyway.
382
    // According to avcodec.h PIX_FMT_RGBA32 is handled in endian specific manner.
382
    // According to avcodec.h PIX_FMT_RGB32 is handled in endian specific manner.
383 383
    for (y=0; y<src_height; y++) {
384 384
        offs = y * (src_width * 4);
385 385
        offsm = (((y * ym_size) / src_height) * 4) * xm_size; // offsm first in maskline. byteoffs!
......
402 402
        } // foreach X
403 403
    } // foreach Y
404 404

  
405
    if (pix_fmt != PIX_FMT_RGBA32) {
405
    if (pix_fmt != PIX_FMT_RGB32) {
406 406
        ci->fromRGB_convert_ctx = sws_getCachedContext(ci->fromRGB_convert_ctx,
407
                                      src_width, src_height, PIX_FMT_RGBA32,
407
                                      src_width, src_height, PIX_FMT_RGB32,
408 408
                                      src_width, src_height, pix_fmt,
409 409
                                      sws_flags, NULL, NULL, NULL);
410 410
        if (ci->fromRGB_convert_ctx == NULL) {
......
577 577
        }
578 578

  
579 579
        // Determine required buffer size and allocate buffer
580
        ci->numBytes = avpicture_get_size(PIX_FMT_RGBA32, ci->pCodecCtx->width,
580
        ci->numBytes = avpicture_get_size(PIX_FMT_RGB32, ci->pCodecCtx->width,
581 581
            ci->pCodecCtx->height);
582 582
        ci->buffer = av_malloc(ci->numBytes);
583 583

  
584 584
        // Assign appropriate parts of buffer to image planes in pFrameRGB
585
        avpicture_fill((AVPicture *)ci->pFrameRGB, ci->buffer, PIX_FMT_RGBA32,
585
        avpicture_fill((AVPicture *)ci->pFrameRGB, ci->buffer, PIX_FMT_RGB32,
586 586
            ci->pCodecCtx->width, ci->pCodecCtx->height);
587 587
    }
588 588
    // TODO loop, pingpong etc?
......
601 601
                // Did we get a video frame?
602 602
                if(ci->frameFinished)
603 603
                {
604
                    // Convert the image from its native format to RGBA32
604
                    // Convert the image from its native format to RGB32
605 605
                    ci->watermark_convert_ctx =
606 606
                        sws_getCachedContext(ci->watermark_convert_ctx,
607 607
                            ci->pCodecCtx->width, ci->pCodecCtx->height, ci->pCodecCtx->pix_fmt,
608
                            ci->pCodecCtx->width, ci->pCodecCtx->height, PIX_FMT_RGBA32,
608
                            ci->pCodecCtx->width, ci->pCodecCtx->height, PIX_FMT_RGB32,
609 609
                            sws_flags, NULL, NULL, NULL);
610 610
                    if (ci->watermark_convert_ctx == NULL) {
611 611
                        av_log(NULL, AV_LOG_ERROR,

Also available in: Unified diff