* commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5': avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8 Conflicts: libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/raw.c libavutil/pixdesc.c libavutil/pixfmt.h libavutil/version.h libswscale/swscale_internal.h libswscale/swscale_unscaled.c
Unified · Split
| @@ -15,6 +15,10 @@ libavutil: 2012-10-22 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | +2014-08-xx - xxxxxxx - lavu 53.21.1 - avstring.h | |
| 19 | + Rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8 to better identify the format. | |
| 20 | + An alias pixel format and color space name are provided for compatibility. | |
| 21 | + | |
| 18 | 22 | 2014-08-xx - xxxxxxx - lavu 53.21.0 - pixdesc.h |
| 19 | 23 | Support name aliases for pixel formats. |
| 20 | 24 | |
| @@ -197,7 +197,7 @@ static int pix_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 196 unmodified lines | ||
| 197 | 197 | bytes_pp = 4; |
| 198 | 198 | break; |
| 199 | 199 | case 18: |
| 200 | − avctx->pix_fmt = AV_PIX_FMT_Y400A; | |
| 200 | + avctx->pix_fmt = AV_PIX_FMT_YA8; | |
| 201 | 201 | bytes_pp = 2; |
| 202 | 202 | break; |
| 203 | 203 | default: |
| @@ -50,7 +50,7 @@ · 49 unmodified lines | ||
| 50 | 50 | #define RGB_PIXEL_FORMATS AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, \ |
| 51 | 51 | AV_PIX_FMT_RGB48, AV_PIX_FMT_RGBA64 |
| 52 | 52 | |
| 53 | −#define GRAY_PIXEL_FORMATS AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A, \ | |
| 53 | +#define GRAY_PIXEL_FORMATS AV_PIX_FMT_GRAY8, AV_PIX_FMT_YA8, \ | |
| 54 | 54 | AV_PIX_FMT_GRAY16 |
| 55 | 55 | |
| 56 | 56 | #define YUV_PIXEL_FORMATS AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUVA420P, \ |
| @@ -93,7 +93,7 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p · 92 unmodified lines | ||
| 93 | 93 | |
| 94 | 94 | switch (avctx->pix_fmt) { |
| 95 | 95 | case AV_PIX_FMT_GRAY8: |
| 96 | − case AV_PIX_FMT_GRAY8A: | |
| 96 | + case AV_PIX_FMT_YA8: | |
| 97 | 97 | case AV_PIX_FMT_GRAY16: |
| 98 | 98 | color_space = CLRSPC_GRAY; |
| 99 | 99 | break; |
| @@ -484,7 +484,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 384 unmodified lines | ||
| 484 | 484 | switch (avctx->pix_fmt) { |
| 485 | 485 | case AV_PIX_FMT_RGB24: |
| 486 | 486 | case AV_PIX_FMT_RGBA: |
| 487 | − case AV_PIX_FMT_GRAY8A: | |
| 487 | + case AV_PIX_FMT_YA8: | |
| 488 | 488 | cpyresult = libopenjpeg_copy_packed8(avctx, frame, image); |
| 489 | 489 | break; |
| 490 | 490 | case AV_PIX_FMT_XYZ12: |
| @@ -650,7 +650,7 @@ AVCodec ff_libopenjpeg_encoder = { · 159 unmodified lines | ||
| 650 | 650 | AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48, |
| 651 | 651 | AV_PIX_FMT_RGBA64, AV_PIX_FMT_GBR24P, |
| 652 | 652 | AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, |
| 653 | − AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A, AV_PIX_FMT_GRAY16, | |
| 653 | + AV_PIX_FMT_GRAY8, AV_PIX_FMT_YA8, AV_PIX_FMT_GRAY16, | |
| 654 | 654 | AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA420P, |
| 655 | 655 | AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA422P, |
| 656 | 656 | AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA444P, |
| @@ -654,7 +654,7 @@ static int decode_frame(AVCodecContext *avctx, · 653 unmodified lines | ||
| 654 | 654 | avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; |
| 655 | 655 | } else if (s->bit_depth == 8 && |
| 656 | 656 | s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { |
| 657 | − avctx->pix_fmt = AV_PIX_FMT_Y400A; | |
| 657 | + avctx->pix_fmt = AV_PIX_FMT_YA8; | |
| 658 | 658 | } else { |
| 659 | 659 | av_log(avctx, AV_LOG_ERROR, "unsupported bit depth %d " |
| 660 | 660 | "and color type %d\n", |
| @@ -146,7 +146,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { · 145 unmodified lines | ||
| 146 | 146 | { AV_PIX_FMT_YUVA420P, MKTAG('Y', '4', 11 , 8 ) }, |
| 147 | 147 | { AV_PIX_FMT_YUVA422P, MKTAG('Y', '4', 10 , 8 ) }, |
| 148 | 148 | { AV_PIX_FMT_YUVA444P, MKTAG('Y', '4', 0 , 8 ) }, |
| 149 | − { AV_PIX_FMT_GRAY8A, MKTAG('Y', '2', 0 , 8 ) }, | |
| 149 | + { AV_PIX_FMT_YA8, MKTAG('Y', '2', 0 , 8 ) }, | |
| 150 | 150 | |
| 151 | 151 | { AV_PIX_FMT_YUVA420P9LE, MKTAG('Y', '4', 11 , 9 ) }, |
| 152 | 152 | { AV_PIX_FMT_YUVA420P9BE, MKTAG( 9 , 11 , '4', 'Y') }, |
| @@ -1550,14 +1550,15 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { · 1549 unmodified lines | ||
| 1550 | 1550 | .log2_chroma_h = 1, |
| 1551 | 1551 | .flags = AV_PIX_FMT_FLAG_HWACCEL, |
| 1552 | 1552 | }, |
| 1553 | − [AV_PIX_FMT_GRAY8A] = { | |
| 1554 | − .name = "gray8a", | |
| 1553 | + [AV_PIX_FMT_YA8] = { | |
| 1554 | + .name = "ya8", | |
| 1555 | 1555 | .nb_components = 2, |
| 1556 | 1556 | .comp = { |
| 1557 | 1557 | { 0, 1, 1, 0, 7 }, /* Y */ |
| 1558 | 1558 | { 0, 1, 2, 0, 7 }, /* A */ |
| 1559 | 1559 | }, |
| 1560 | 1560 | .flags = AV_PIX_FMT_FLAG_ALPHA, |
| 1561 | + .alias = "gray8a", | |
| 1561 | 1562 | }, |
| 1562 | 1563 | [AV_PIX_FMT_GBRP] = { |
| 1563 | 1564 | .name = "gbrp", |
| @@ -145,7 +145,11 @@ enum AVPixelFormat { · 144 unmodified lines | ||
| 145 | 145 | AV_PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0 |
| 146 | 146 | AV_PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1 |
| 147 | 147 | AV_PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1 |
| 148 | − AV_PIX_FMT_GRAY8A, ///< 8bit gray, 8bit alpha | |
| 148 | + AV_PIX_FMT_YA8, ///< 8bit gray, 8bit alpha | |
| 149 | + | |
| 150 | + AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8 | |
| 151 | + AV_PIX_FMT_GRAY8A= AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8 | |
| 152 | + | |
| 149 | 153 | AV_PIX_FMT_BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian |
| 150 | 154 | AV_PIX_FMT_BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian |
| 151 | 155 | |
| @@ -57,7 +57,7 @@ · 56 unmodified lines | ||
| 57 | 57 | |
| 58 | 58 | #define LIBAVUTIL_VERSION_MAJOR 52 |
| 59 | 59 | #define LIBAVUTIL_VERSION_MINOR 96 |
| 60 | −#define LIBAVUTIL_VERSION_MICRO 100 | |
| 60 | +#define LIBAVUTIL_VERSION_MICRO 101 | |
| 61 | 61 | |
| 62 | 62 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| 63 | 63 | LIBAVUTIL_VERSION_MINOR, \ |
| @@ -1217,7 +1217,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) · 1216 unmodified lines | ||
| 1217 | 1217 | #endif |
| 1218 | 1218 | case AV_PIX_FMT_YUYV422: |
| 1219 | 1219 | case AV_PIX_FMT_YVYU422: |
| 1220 | − case AV_PIX_FMT_Y400A: | |
| 1220 | + case AV_PIX_FMT_YA8: | |
| 1221 | 1221 | c->lumToYV12 = yuy2ToY_c; |
| 1222 | 1222 | break; |
| 1223 | 1223 | case AV_PIX_FMT_UYVY422: |
| @@ -1332,7 +1332,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) · 108 unmodified lines | ||
| 1332 | 1332 | case AV_PIX_FMT_ARGB: |
| 1333 | 1333 | c->alpToYV12 = abgrToA_c; |
| 1334 | 1334 | break; |
| 1335 | − case AV_PIX_FMT_Y400A: | |
| 1335 | + case AV_PIX_FMT_YA8: | |
| 1336 | 1336 | c->alpToYV12 = uyvyToY_c; |
| 1337 | 1337 | break; |
| 1338 | 1338 | case AV_PIX_FMT_PAL8 : |
| @@ -37,7 +37,7 @@ · 36 unmodified lines | ||
| 37 | 37 | * Should be removed when a cleaner pixel format system exists. */ |
| 38 | 38 | #define isGray(x) \ |
| 39 | 39 | ((x) == AV_PIX_FMT_GRAY8 || \ |
| 40 | − (x) == AV_PIX_FMT_Y400A || \ | |
| 40 | + (x) == AV_PIX_FMT_YA8 || \ | |
| 41 | 41 | (x) == AV_PIX_FMT_GRAY16BE || \ |
| 42 | 42 | (x) == AV_PIX_FMT_GRAY16LE) |
| 43 | 43 | #define hasChroma(x) \ |
| @@ -670,7 +670,7 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt) · 669 unmodified lines | ||
| 670 | 670 | #else |
| 671 | 671 | #define isGray(x) \ |
| 672 | 672 | ((x) == AV_PIX_FMT_GRAY8 || \ |
| 673 | − (x) == AV_PIX_FMT_Y400A || \ | |
| 673 | + (x) == AV_PIX_FMT_YA8 || \ | |
| 674 | 674 | (x) == AV_PIX_FMT_GRAY16BE || \ |
| 675 | 675 | (x) == AV_PIX_FMT_GRAY16LE) |
| 676 | 676 | #endif |
| @@ -775,7 +775,7 @@ static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt) · 98 unmodified lines | ||
| 775 | 775 | || (x)==AV_PIX_FMT_YUYV422 \ |
| 776 | 776 | || (x)==AV_PIX_FMT_YVYU422 \ |
| 777 | 777 | || (x)==AV_PIX_FMT_UYVY422 \ |
| 778 | − || (x)==AV_PIX_FMT_Y400A \ | |
| 778 | + || (x)==AV_PIX_FMT_YA8 \ | |
| 779 | 779 | || isRGBinInt(x) \ |
| 780 | 780 | || isBGRinInt(x) \ |
| 781 | 781 | ) |
| @@ -376,7 +376,7 @@ static int palToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], · 375 unmodified lines | ||
| 376 | 376 | uint8_t *dstPtr = dst[0] + dstStride[0] * srcSliceY; |
| 377 | 377 | const uint8_t *srcPtr = src[0]; |
| 378 | 378 | |
| 379 | − if (srcFormat == AV_PIX_FMT_GRAY8A) { | |
| 379 | + if (srcFormat == AV_PIX_FMT_YA8) { | |
| 380 | 380 | switch (dstFormat) { |
| 381 | 381 | case AV_PIX_FMT_RGB32 : conv = gray8aToPacked32; break; |
| 382 | 382 | case AV_PIX_FMT_BGR32 : conv = gray8aToPacked32; break; |
| @@ -1729,7 +1729,7 @@ void ff_get_unscaled_swscale(SwsContext *c) · 1346 unmodified lines | ||
| 1729 | 1729 | if (srcFormat == AV_PIX_FMT_UYVY422 && dstFormat == AV_PIX_FMT_YUV422P) |
| 1730 | 1730 | c->swscale = uyvyToYuv422Wrapper; |
| 1731 | 1731 | |
| 1732 | −#define isPlanarGray(x) (isGray(x) && (x) != AV_PIX_FMT_GRAY8A) | |
| 1732 | +#define isPlanarGray(x) (isGray(x) && (x) != AV_PIX_FMT_YA8) | |
| 1733 | 1733 | /* simple copy */ |
| 1734 | 1734 | if ( srcFormat == dstFormat || |
| 1735 | 1735 | (srcFormat == AV_PIX_FMT_YUVA420P && dstFormat == AV_PIX_FMT_YUV420P) || |
| @@ -161,7 +161,7 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = { · 160 unmodified lines | ||
| 161 | 161 | [AV_PIX_FMT_RGB444BE] = { 1, 1 }, |
| 162 | 162 | [AV_PIX_FMT_BGR444LE] = { 1, 1 }, |
| 163 | 163 | [AV_PIX_FMT_BGR444BE] = { 1, 1 }, |
| 164 | − [AV_PIX_FMT_Y400A] = { 1, 0 }, | |
| 164 | + [AV_PIX_FMT_YA8] = { 1, 0 }, | |
| 165 | 165 | [AV_PIX_FMT_BGR48BE] = { 1, 1 }, |
| 166 | 166 | [AV_PIX_FMT_BGR48LE] = { 1, 1 }, |
| 167 | 167 | [AV_PIX_FMT_BGRA64BE] = { 1, 1, 1 }, |
| @@ -448,7 +448,7 @@ switch(c->dstBpc){ \ · 447 unmodified lines | ||
| 448 | 448 | ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmxext, cpu_flags & AV_CPU_FLAG_MMXEXT); |
| 449 | 449 | |
| 450 | 450 | switch (c->srcFormat) { |
| 451 | − case AV_PIX_FMT_Y400A: | |
| 451 | + case AV_PIX_FMT_YA8: | |
| 452 | 452 | c->lumToYV12 = ff_yuyvToY_mmx; |
| 453 | 453 | if (c->alpPixBuf) |
| 454 | 454 | c->alpToYV12 = ff_uyvyToY_mmx; |
| @@ -497,7 +497,7 @@ switch(c->dstBpc){ \ · 42 unmodified lines | ||
| 497 | 497 | ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2, sse2, 1); |
| 498 | 498 | |
| 499 | 499 | switch (c->srcFormat) { |
| 500 | − case AV_PIX_FMT_Y400A: | |
| 500 | + case AV_PIX_FMT_YA8: | |
| 501 | 501 | c->lumToYV12 = ff_yuyvToY_sse2; |
| 502 | 502 | if (c->alpPixBuf) |
| 503 | 503 | c->alpToYV12 = ff_uyvyToY_sse2; |