History

Merge commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5'

* 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

Michael Niedermayer committed 12 years ago

Commit 4c8bc6f2 parents 0b25261 e96c3b815 files · +30 −21Browse files

Unified · Split

15 files
  1. doc/APIchanges +4 −0
  2. libavcodec/brenderpix.c +1 −1
  3. libavcodec/libopenjpegdec.c +1 −1
  4. libavcodec/libopenjpegenc.c +3 −3
  5. libavcodec/pngdec.c +1 −1
  6. libavcodec/raw.c +1 −1
  7. libavutil/pixdesc.c +3 −2
  8. libavutil/pixfmt.h +5 −1
  9. libavutil/version.h +1 −1
  10. libswscale/input.c +2 −2
  11. libswscale/swscale-test.c +1 −1
  12. libswscale/swscale_internal.h +2 −2
  13. libswscale/swscale_unscaled.c +2 −2
  14. libswscale/utils.c +1 −1
  15. libswscale/x86/swscale.c +2 −2
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2012-10-22 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
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+
1822 2014-08-xx - xxxxxxx - lavu 53.21.0 - pixdesc.h
1923 Support name aliases for pixel formats.
2024
libavcodec/brenderpix.c+1−1
@@ -197,7 +197,7 @@ static int pix_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, · 196 unmodified lines
197197 bytes_pp = 4;
198198 break;
199199 case 18:
200− avctx->pix_fmt = AV_PIX_FMT_Y400A;
200+ avctx->pix_fmt = AV_PIX_FMT_YA8;
201201 bytes_pp = 2;
202202 break;
203203 default:
libavcodec/libopenjpegdec.c+1−1
@@ -50,7 +50,7 @@ · 49 unmodified lines
5050 #define RGB_PIXEL_FORMATS AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, \
5151 AV_PIX_FMT_RGB48, AV_PIX_FMT_RGBA64
5252
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, \
5454 AV_PIX_FMT_GRAY16
5555
5656 #define YUV_PIXEL_FORMATS AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUVA420P, \
libavcodec/libopenjpegenc.c+3−3
@@ -93,7 +93,7 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p · 92 unmodified lines
9393
9494 switch (avctx->pix_fmt) {
9595 case AV_PIX_FMT_GRAY8:
96− case AV_PIX_FMT_GRAY8A:
96+ case AV_PIX_FMT_YA8:
9797 case AV_PIX_FMT_GRAY16:
9898 color_space = CLRSPC_GRAY;
9999 break;
@@ -484,7 +484,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 384 unmodified lines
484484 switch (avctx->pix_fmt) {
485485 case AV_PIX_FMT_RGB24:
486486 case AV_PIX_FMT_RGBA:
487− case AV_PIX_FMT_GRAY8A:
487+ case AV_PIX_FMT_YA8:
488488 cpyresult = libopenjpeg_copy_packed8(avctx, frame, image);
489489 break;
490490 case AV_PIX_FMT_XYZ12:
@@ -650,7 +650,7 @@ AVCodec ff_libopenjpeg_encoder = { · 159 unmodified lines
650650 AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48,
651651 AV_PIX_FMT_RGBA64, AV_PIX_FMT_GBR24P,
652652 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,
654654 AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA420P,
655655 AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA422P,
656656 AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA444P,
libavcodec/pngdec.c+1−1
@@ -654,7 +654,7 @@ static int decode_frame(AVCodecContext *avctx, · 653 unmodified lines
654654 avctx->pix_fmt = AV_PIX_FMT_MONOBLACK;
655655 } else if (s->bit_depth == 8 &&
656656 s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
657− avctx->pix_fmt = AV_PIX_FMT_Y400A;
657+ avctx->pix_fmt = AV_PIX_FMT_YA8;
658658 } else {
659659 av_log(avctx, AV_LOG_ERROR, "unsupported bit depth %d "
660660 "and color type %d\n",
libavcodec/raw.c+1−1
@@ -146,7 +146,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { · 145 unmodified lines
146146 { AV_PIX_FMT_YUVA420P, MKTAG('Y', '4', 11 , 8 ) },
147147 { AV_PIX_FMT_YUVA422P, MKTAG('Y', '4', 10 , 8 ) },
148148 { 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 ) },
150150
151151 { AV_PIX_FMT_YUVA420P9LE, MKTAG('Y', '4', 11 , 9 ) },
152152 { AV_PIX_FMT_YUVA420P9BE, MKTAG( 9 , 11 , '4', 'Y') },
libavutil/pixdesc.c+3−2
@@ -1550,14 +1550,15 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { · 1549 unmodified lines
15501550 .log2_chroma_h = 1,
15511551 .flags = AV_PIX_FMT_FLAG_HWACCEL,
15521552 },
1553− [AV_PIX_FMT_GRAY8A] = {
1554− .name = "gray8a",
1553+ [AV_PIX_FMT_YA8] = {
1554+ .name = "ya8",
15551555 .nb_components = 2,
15561556 .comp = {
15571557 { 0, 1, 1, 0, 7 }, /* Y */
15581558 { 0, 1, 2, 0, 7 }, /* A */
15591559 },
15601560 .flags = AV_PIX_FMT_FLAG_ALPHA,
1561+ .alias = "gray8a",
15611562 },
15621563 [AV_PIX_FMT_GBRP] = {
15631564 .name = "gbrp",
libavutil/pixfmt.h+5−1
@@ -145,7 +145,11 @@ enum AVPixelFormat { · 144 unmodified lines
145145 AV_PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
146146 AV_PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
147147 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+
149153 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
150154 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
151155
libavutil/version.h+1−1
@@ -57,7 +57,7 @@ · 56 unmodified lines
5757
5858 #define LIBAVUTIL_VERSION_MAJOR 52
5959 #define LIBAVUTIL_VERSION_MINOR 96
60−#define LIBAVUTIL_VERSION_MICRO 100
60+#define LIBAVUTIL_VERSION_MICRO 101
6161
6262 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
6363 LIBAVUTIL_VERSION_MINOR, \
libswscale/input.c+2−2
@@ -1217,7 +1217,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) · 1216 unmodified lines
12171217 #endif
12181218 case AV_PIX_FMT_YUYV422:
12191219 case AV_PIX_FMT_YVYU422:
1220− case AV_PIX_FMT_Y400A:
1220+ case AV_PIX_FMT_YA8:
12211221 c->lumToYV12 = yuy2ToY_c;
12221222 break;
12231223 case AV_PIX_FMT_UYVY422:
@@ -1332,7 +1332,7 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) · 108 unmodified lines
13321332 case AV_PIX_FMT_ARGB:
13331333 c->alpToYV12 = abgrToA_c;
13341334 break;
1335− case AV_PIX_FMT_Y400A:
1335+ case AV_PIX_FMT_YA8:
13361336 c->alpToYV12 = uyvyToY_c;
13371337 break;
13381338 case AV_PIX_FMT_PAL8 :
libswscale/swscale-test.c+1−1
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 * Should be removed when a cleaner pixel format system exists. */
3838 #define isGray(x) \
3939 ((x) == AV_PIX_FMT_GRAY8 || \
40− (x) == AV_PIX_FMT_Y400A || \
40+ (x) == AV_PIX_FMT_YA8 || \
4141 (x) == AV_PIX_FMT_GRAY16BE || \
4242 (x) == AV_PIX_FMT_GRAY16LE)
4343 #define hasChroma(x) \
libswscale/swscale_internal.h+2−2
@@ -670,7 +670,7 @@ static av_always_inline int isRGB(enum AVPixelFormat pix_fmt) · 669 unmodified lines
670670 #else
671671 #define isGray(x) \
672672 ((x) == AV_PIX_FMT_GRAY8 || \
673− (x) == AV_PIX_FMT_Y400A || \
673+ (x) == AV_PIX_FMT_YA8 || \
674674 (x) == AV_PIX_FMT_GRAY16BE || \
675675 (x) == AV_PIX_FMT_GRAY16LE)
676676 #endif
@@ -775,7 +775,7 @@ static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt) · 98 unmodified lines
775775 || (x)==AV_PIX_FMT_YUYV422 \
776776 || (x)==AV_PIX_FMT_YVYU422 \
777777 || (x)==AV_PIX_FMT_UYVY422 \
778− || (x)==AV_PIX_FMT_Y400A \
778+ || (x)==AV_PIX_FMT_YA8 \
779779 || isRGBinInt(x) \
780780 || isBGRinInt(x) \
781781 )
libswscale/swscale_unscaled.c+2−2
@@ -376,7 +376,7 @@ static int palToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], · 375 unmodified lines
376376 uint8_t *dstPtr = dst[0] + dstStride[0] * srcSliceY;
377377 const uint8_t *srcPtr = src[0];
378378
379− if (srcFormat == AV_PIX_FMT_GRAY8A) {
379+ if (srcFormat == AV_PIX_FMT_YA8) {
380380 switch (dstFormat) {
381381 case AV_PIX_FMT_RGB32 : conv = gray8aToPacked32; break;
382382 case AV_PIX_FMT_BGR32 : conv = gray8aToPacked32; break;
@@ -1729,7 +1729,7 @@ void ff_get_unscaled_swscale(SwsContext *c) · 1346 unmodified lines
17291729 if (srcFormat == AV_PIX_FMT_UYVY422 && dstFormat == AV_PIX_FMT_YUV422P)
17301730 c->swscale = uyvyToYuv422Wrapper;
17311731
1732−#define isPlanarGray(x) (isGray(x) && (x) != AV_PIX_FMT_GRAY8A)
1732+#define isPlanarGray(x) (isGray(x) && (x) != AV_PIX_FMT_YA8)
17331733 /* simple copy */
17341734 if ( srcFormat == dstFormat ||
17351735 (srcFormat == AV_PIX_FMT_YUVA420P && dstFormat == AV_PIX_FMT_YUV420P) ||
libswscale/utils.c+1−1
@@ -161,7 +161,7 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = { · 160 unmodified lines
161161 [AV_PIX_FMT_RGB444BE] = { 1, 1 },
162162 [AV_PIX_FMT_BGR444LE] = { 1, 1 },
163163 [AV_PIX_FMT_BGR444BE] = { 1, 1 },
164− [AV_PIX_FMT_Y400A] = { 1, 0 },
164+ [AV_PIX_FMT_YA8] = { 1, 0 },
165165 [AV_PIX_FMT_BGR48BE] = { 1, 1 },
166166 [AV_PIX_FMT_BGR48LE] = { 1, 1 },
167167 [AV_PIX_FMT_BGRA64BE] = { 1, 1, 1 },
libswscale/x86/swscale.c+2−2
@@ -448,7 +448,7 @@ switch(c->dstBpc){ \ · 447 unmodified lines
448448 ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmxext, cpu_flags & AV_CPU_FLAG_MMXEXT);
449449
450450 switch (c->srcFormat) {
451− case AV_PIX_FMT_Y400A:
451+ case AV_PIX_FMT_YA8:
452452 c->lumToYV12 = ff_yuyvToY_mmx;
453453 if (c->alpPixBuf)
454454 c->alpToYV12 = ff_uyvyToY_mmx;
@@ -497,7 +497,7 @@ switch(c->dstBpc){ \ · 42 unmodified lines
497497 ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2, sse2, 1);
498498
499499 switch (c->srcFormat) {
500− case AV_PIX_FMT_Y400A:
500+ case AV_PIX_FMT_YA8:
501501 c->lumToYV12 = ff_yuyvToY_sse2;
502502 if (c->alpPixBuf)
503503 c->alpToYV12 = ff_uyvyToY_sse2;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t