History

avutil: add AV_PIX_FMT_YA16 pixel format

Vittorio Giovara committed 12 years ago

Commit e9abafc1 parent e96c3b84 files · +29 −2Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavutil/pixdesc.c +19 −0
  3. libavutil/pixfmt.h +5 −0
  4. libavutil/version.h +2 −2
doc/APIchanges+3−0
@@ -13,6 +13,9 @@ libavutil: 2013-12-xx · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2014-08-xx - xxxxxxx - lavu 53.22.0 - pixfmt.h
17+ Add AV_PIX_FMT_YA16 pixel format for 16 bit packed gray with alpha.
18+
1619 2014-08-xx - xxxxxxx - lavu 53.21.1 - avstring.h
1720 Rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8 to better identify the format.
1821 An alias pixel format and color space name are provided for compatibility.
libavutil/pixdesc.c+19−0
@@ -1349,6 +1349,24 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { · 1348 unmodified lines
13491349 .flags = AV_PIX_FMT_FLAG_ALPHA,
13501350 .alias = "gray8a",
13511351 },
1352+ [AV_PIX_FMT_YA16LE] = {
1353+ .name = "ya16le",
1354+ .nb_components = 2,
1355+ .comp = {
1356+ { 0, 3, 1, 0, 15 }, /* Y */
1357+ { 0, 3, 3, 0, 15 }, /* A */
1358+ },
1359+ .flags = AV_PIX_FMT_FLAG_ALPHA,
1360+ },
1361+ [AV_PIX_FMT_YA16BE] = {
1362+ .name = "ya16be",
1363+ .nb_components = 2,
1364+ .comp = {
1365+ { 0, 3, 1, 0, 15 }, /* Y */
1366+ { 0, 3, 3, 0, 15 }, /* A */
1367+ },
1368+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA,
1369+ },
13521370 [AV_PIX_FMT_GBRP] = {
13531371 .name = "gbrp",
13541372 .nb_components = 3,
@@ -1640,6 +1658,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt) · 285 unmodified lines
16401658
16411659 switch (pix_fmt) {
16421660 PIX_FMT_SWAP_ENDIANNESS(GRAY16);
1661+ PIX_FMT_SWAP_ENDIANNESS(YA16);
16431662 PIX_FMT_SWAP_ENDIANNESS(RGB48);
16441663 PIX_FMT_SWAP_ENDIANNESS(RGB565);
16451664 PIX_FMT_SWAP_ENDIANNESS(RGB555);
libavutil/pixfmt.h+5−0
@@ -202,6 +202,10 @@ enum AVPixelFormat { · 201 unmodified lines
202202 AV_PIX_FMT_YVYU422, ///< packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
203203
204204 AV_PIX_FMT_VDA, ///< HW acceleration through VDA, data[3] contains a CVPixelBufferRef
205+
206+ AV_PIX_FMT_YA16BE, ///< 16bit gray, 16bit alpha (big-endian)
207+ AV_PIX_FMT_YA16LE, ///< 16bit gray, 16bit alpha (little-endian)
208+
205209 AV_PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
206210
207211 #if FF_API_PIX_FMT
@@ -221,6 +225,7 @@ enum AVPixelFormat { · 13 unmodified lines
221225 #define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB)
222226
223227 #define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
228+#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
224229 #define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
225230 #define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
226231 #define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE)
libavutil/version.h+2−2
@@ -54,8 +54,8 @@ · 53 unmodified lines
5454 */
5555
5656 #define LIBAVUTIL_VERSION_MAJOR 53
57−#define LIBAVUTIL_VERSION_MINOR 21
58−#define LIBAVUTIL_VERSION_MICRO 1
57+#define LIBAVUTIL_VERSION_MINOR 22
58+#define LIBAVUTIL_VERSION_MICRO 0
5959
6060 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
6161 LIBAVUTIL_VERSION_MINOR, \

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