diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-25 01:38:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-25 04:34:44 +0100 |
commit | 92afb431621c79155fcb7171d26f137eb1bee028 (patch) | |
tree | 2beb660ea9fafc1d2d304c0f7df610ebf54117e0 /libavutil | |
parent | 3880b4541ace2697f380ae1f43cb2299efeb2cc7 (diff) | |
parent | 7f1b427018ecff59e0e14031eecc79aac0d91ec8 (diff) | |
download | ffmpeg-92afb431621c79155fcb7171d26f137eb1bee028.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
snow: split snow in snowdec and snowenc
tiffenc: deprecate using compression_level
swscale: fix failing fate tests.
swscale: add support for planar RGB input.
h264: add support for decoding planar RGB images.
Clean up swscale pixfmt macros using av_pix_fmt_descriptors[].
pixfmt: add planar RGB formats.
Conflicts:
libavcodec/h264.c
libavcodec/snow.c
libavcodec/utils.c
libavutil/avutil.h
libavutil/pixdesc.c
libavutil/pixfmt.h
libswscale/swscale.c
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/avutil.h | 2 | ||||
-rw-r--r-- | libavutil/pixdesc.c | 171 | ||||
-rw-r--r-- | libavutil/pixdesc.h | 2 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 23 |
4 files changed, 170 insertions, 28 deletions
diff --git a/libavutil/avutil.h b/libavutil/avutil.h index 37418b5883..a09fe9417b 100644 --- a/libavutil/avutil.h +++ b/libavutil/avutil.h @@ -153,7 +153,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 51 -#define LIBAVUTIL_VERSION_MINOR 28 +#define LIBAVUTIL_VERSION_MINOR 29 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 958499db9d..1d3cfdfedc 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -126,6 +126,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUYV422] = { .name = "yuyv422", @@ -148,6 +149,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,2,2,0,7}, /* G */ {0,2,3,0,7}, /* B */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_BGR24] = { .name = "bgr24", @@ -159,6 +161,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,2,2,0,7}, /* G */ {0,2,3,0,7}, /* R */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_YUV422P] = { .name = "yuv422p", @@ -170,6 +173,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV444P] = { .name = "yuv444p", @@ -181,6 +185,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV410P] = { .name = "yuv410p", @@ -192,6 +197,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV411P] = { .name = "yuv411p", @@ -203,6 +209,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_GRAY8] = { .name = "gray", @@ -212,7 +219,6 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { .comp = { {0,0,1,0,7}, /* Y */ }, - .flags = PIX_FMT_PAL, }, [PIX_FMT_MONOWHITE] = { .name = "monow", @@ -254,6 +260,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUVJ422P] = { .name = "yuvj422p", @@ -265,6 +272,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUVJ444P] = { .name = "yuvj444p", @@ -276,6 +284,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_XVMC_MPEG2_MC] = { .name = "xvmcmc", @@ -317,7 +326,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,0,1,3,2}, /* G */ {0,0,1,0,2}, /* R */ }, - .flags = PIX_FMT_PAL, + .flags = PIX_FMT_PAL | PIX_FMT_RGB, }, [PIX_FMT_BGR4] = { .name = "bgr4", @@ -329,7 +338,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,3,2,0,1}, /* G */ {0,3,4,0,0}, /* R */ }, - .flags = PIX_FMT_BITSTREAM, + .flags = PIX_FMT_BITSTREAM | PIX_FMT_RGB, }, [PIX_FMT_BGR4_BYTE] = { .name = "bgr4_byte", @@ -341,7 +350,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,0,1,1,1}, /* G */ {0,0,1,0,0}, /* R */ }, - .flags = PIX_FMT_PAL, + .flags = PIX_FMT_PAL | PIX_FMT_RGB, }, [PIX_FMT_RGB8] = { .name = "rgb8", @@ -353,7 +362,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,0,1,3,2}, /* G */ {0,0,1,0,2}, /* B */ }, - .flags = PIX_FMT_PAL, + .flags = PIX_FMT_PAL | PIX_FMT_RGB, }, [PIX_FMT_RGB4] = { .name = "rgb4", @@ -365,7 +374,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,3,2,0,1}, /* G */ {0,3,4,0,0}, /* B */ }, - .flags = PIX_FMT_BITSTREAM, + .flags = PIX_FMT_BITSTREAM | PIX_FMT_RGB, }, [PIX_FMT_RGB4_BYTE] = { .name = "rgb4_byte", @@ -377,7 +386,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,0,1,1,1}, /* G */ {0,0,1,0,0}, /* B */ }, - .flags = PIX_FMT_PAL, + .flags = PIX_FMT_PAL | PIX_FMT_RGB, }, [PIX_FMT_NV12] = { .name = "nv12", @@ -389,6 +398,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,7}, /* U */ {1,1,2,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_NV21] = { .name = "nv21", @@ -400,6 +410,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,7}, /* V */ {1,1,2,0,7}, /* U */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_ARGB] = { .name = "argb", @@ -412,6 +423,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,3,3,0,7}, /* G */ {0,3,4,0,7}, /* B */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_RGBA] = { .name = "rgba", @@ -424,6 +436,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,3,3,0,7}, /* B */ {0,3,4,0,7}, /* A */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_ABGR] = { .name = "abgr", @@ -436,6 +449,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,3,3,0,7}, /* G */ {0,3,4,0,7}, /* R */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_BGRA] = { .name = "bgra", @@ -448,6 +462,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,3,3,0,7}, /* R */ {0,3,4,0,7}, /* A */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_GRAY16BE] = { .name = "gray16be", @@ -478,6 +493,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUVJ440P] = { .name = "yuvj440p", @@ -489,6 +505,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,0,1,0,7}, /* U */ {2,0,1,0,7}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUVA420P] = { .name = "yuva420p", @@ -501,6 +518,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {2,0,1,0,7}, /* V */ {3,0,1,0,7}, /* A */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_VDPAU_H264] = { .name = "vdpau_h264", @@ -548,7 +566,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,5,3,0,15}, /* G */ {0,5,5,0,15}, /* B */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_RGB | PIX_FMT_BE, }, [PIX_FMT_RGB48LE] = { .name = "rgb48le", @@ -560,6 +578,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,5,3,0,15}, /* G */ {0,5,5,0,15}, /* B */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_RGBA64BE] = { .name = "rgba64be", @@ -572,7 +591,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,5,5,0,15}, /* B */ {0,5,7,0,15}, /* A */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_RGB | PIX_FMT_BE, }, [PIX_FMT_RGBA64LE] = { .name = "rgba64le", @@ -585,6 +604,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,5,5,0,15}, /* B */ {0,5,7,0,15}, /* B */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_RGB565BE] = { .name = "rgb565be", @@ -596,7 +616,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,5,5}, /* G */ {0,1,1,0,4}, /* B */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_RGB, }, [PIX_FMT_RGB565LE] = { .name = "rgb565le", @@ -608,6 +628,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,5,5}, /* G */ {0,1,1,0,4}, /* B */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_RGB555BE] = { .name = "rgb555be", @@ -619,7 +640,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,5,4}, /* G */ {0,1,1,0,4}, /* B */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_RGB, }, [PIX_FMT_RGB555LE] = { .name = "rgb555le", @@ -631,6 +652,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,5,4}, /* G */ {0,1,1,0,4}, /* B */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_RGB444BE] = { .name = "rgb444be", @@ -642,7 +664,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,4,3}, /* G */ {0,1,1,0,3}, /* B */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_RGB, }, [PIX_FMT_RGB444LE] = { .name = "rgb444le", @@ -654,6 +676,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,4,3}, /* G */ {0,1,1,0,3}, /* B */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_BGR48BE] = { .name = "bgr48be", @@ -665,7 +688,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,5,3,0,15}, /* G */ {0,5,5,0,15}, /* R */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_RGB, }, [PIX_FMT_BGR48LE] = { .name = "bgr48le", @@ -677,6 +700,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,5,3,0,15}, /* G */ {0,5,5,0,15}, /* R */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_BGRA64BE] = { .name = "bgra64be", @@ -713,7 +737,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,5,5}, /* G */ {0,1,1,0,4}, /* R */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_RGB, }, [PIX_FMT_BGR565LE] = { .name = "bgr565le", @@ -725,6 +749,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,5,5}, /* G */ {0,1,1,0,4}, /* R */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_BGR555BE] = { .name = "bgr555be", @@ -736,7 +761,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,5,4}, /* G */ {0,1,1,0,4}, /* R */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_RGB, }, [PIX_FMT_BGR555LE] = { .name = "bgr555le", @@ -748,6 +773,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,5,4}, /* G */ {0,1,1,0,4}, /* R */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_BGR444BE] = { .name = "bgr444be", @@ -759,7 +785,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,4,3}, /* G */ {0,1,1,0,3}, /* R */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_RGB, }, [PIX_FMT_BGR444LE] = { .name = "bgr444le", @@ -771,6 +797,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,1,1,4,3}, /* G */ {0,1,1,0,3}, /* R */ }, + .flags = PIX_FMT_RGB, }, [PIX_FMT_VAAPI_MOCO] = { .name = "vaapi_moco", @@ -806,6 +833,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,8}, /* U */ {2,1,1,0,8}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV420P9BE] = { .name = "yuv420p9be", @@ -817,7 +845,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,8}, /* U */ {2,1,1,0,8}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_YUV420P10LE] = { .name = "yuv420p10le", @@ -829,6 +857,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,9}, /* U */ {2,1,1,0,9}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV420P10BE] = { .name = "yuv420p10be", @@ -840,7 +869,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,9}, /* U */ {2,1,1,0,9}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_YUV420P16LE] = { .name = "yuv420p16le", @@ -852,6 +881,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,15}, /* U */ {2,1,1,0,15}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV420P16BE] = { .name = "yuv420p16be", @@ -863,7 +893,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,15}, /* U */ {2,1,1,0,15}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_YUV422P9LE] = { .name = "yuv422p9le", @@ -875,6 +905,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,8}, /* U */ {2,1,1,0,8}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV422P9BE] = { .name = "yuv422p9be", @@ -886,7 +917,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,8}, /* U */ {2,1,1,0,8}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_YUV422P10LE] = { .name = "yuv422p10le", @@ -898,6 +929,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,9}, /* U */ {2,1,1,0,9}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV422P10BE] = { .name = "yuv422p10be", @@ -909,7 +941,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,9}, /* U */ {2,1,1,0,9}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_YUV422P16LE] = { .name = "yuv422p16le", @@ -921,6 +953,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,15}, /* U */ {2,1,1,0,15}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV422P16BE] = { .name = "yuv422p16be", @@ -932,7 +965,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,15}, /* U */ {2,1,1,0,15}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_YUV444P16LE] = { .name = "yuv444p16le", @@ -944,6 +977,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,15}, /* U */ {2,1,1,0,15}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV444P16BE] = { .name = "yuv444p16be", @@ -955,7 +989,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,15}, /* U */ {2,1,1,0,15}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_YUV444P10LE] = { .name = "yuv444p10le", @@ -967,6 +1001,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,9}, /* U */ {2,1,1,0,9}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV444P10BE] = { .name = "yuv444p10be", @@ -978,7 +1013,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,9}, /* U */ {2,1,1,0,9}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_YUV444P9LE] = { .name = "yuv444p9le", @@ -990,6 +1025,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,8}, /* U */ {2,1,1,0,8}, /* V */ }, + .flags = PIX_FMT_PLANAR, }, [PIX_FMT_YUV444P9BE] = { .name = "yuv444p9be", @@ -1001,7 +1037,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {1,1,1,0,8}, /* U */ {2,1,1,0,8}, /* V */ }, - .flags = PIX_FMT_BE, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR, }, [PIX_FMT_DXVA2_VLD] = { .name = "dxva2_vld", @@ -1031,6 +1067,91 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { {0,0,1,0,7}, /* G */ {2,0,1,0,7}, /* R */ }, + .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, + }, + [PIX_FMT_GBRP] = { + .name = "gbrp", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,0,1,0,7}, /* G */ + {1,0,1,0,7}, /* B */ + {2,0,1,0,7}, /* R */ + }, + .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, + }, + [PIX_FMT_GBRP9LE] = { + .name = "gbrp9le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,8}, /* G */ + {1,1,1,0,8}, /* B */ + {2,1,1,0,8}, /* R */ + }, + .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, + }, + [PIX_FMT_GBRP9BE] = { + .name = "gbrp9be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,8}, /* G */ + {1,1,1,0,8}, /* B */ + {2,1,1,0,8}, /* R */ + }, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB, + }, + [PIX_FMT_GBRP10LE] = { + .name = "gbrp10le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,9}, /* G */ + {1,1,1,0,9}, /* B */ + {2,1,1,0,9}, /* R */ + }, + .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, + }, + [PIX_FMT_GBRP10BE] = { + .name = "gbrp10be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,9}, /* G */ + {1,1,1,0,9}, /* B */ + {2,1,1,0,9}, /* R */ + }, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB, + }, + [PIX_FMT_GBRP16LE] = { + .name = "gbrp16le", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,15}, /* G */ + {1,1,1,0,15}, /* B */ + {2,1,1,0,15}, /* R */ + }, + .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, + }, + [PIX_FMT_GBRP16BE] = { + .name = "gbrp16be", + .nb_components= 3, + .log2_chroma_w= 0, + .log2_chroma_h= 0, + .comp = { + {0,1,1,0,15}, /* G */ + {1,1,1,0,15}, /* B */ + {2,1,1,0,15}, /* R */ + }, + .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB, }, }; diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h index f0de9981ec..2175246785 100644 --- a/libavutil/pixdesc.h +++ b/libavutil/pixdesc.h @@ -87,6 +87,8 @@ typedef struct AVPixFmtDescriptor{ #define PIX_FMT_PAL 2 ///< Pixel format has a palette in data[1], values are indexes in this palette. #define PIX_FMT_BITSTREAM 4 ///< All values of a component are bit-wise packed end to end. #define PIX_FMT_HWACCEL 8 ///< Pixel format is an HW accelerated format. +#define PIX_FMT_PLANAR 16 ///< At least one pixel component is not in the first data plane +#define PIX_FMT_RGB 32 ///< The pixel format contains RGB-like data (as opposed to YUV/grayscale) /** * The array of all the pixel format descriptors. diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index f711de7828..2930a9b681 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -155,16 +155,31 @@ enum PixelFormat { PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian PIX_FMT_VDA_VLD, ///< hardware decoding through VDA +#ifdef AV_PIX_FMT_ABI_GIT_MASTER PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian - PIX_FMT_GBR24P, ///< planar GBR, 24bpp, 8G, 8B, 8R. - +#endif + PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp + PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big endian + PIX_FMT_GBRP9LE, ///< planar GBR 4:4:4 27bpp, little endian + PIX_FMT_GBRP10BE, ///< planar GBR 4:4:4 30bpp, big endian + PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little endian + PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big endian + PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little endian + +#ifndef AV_PIX_FMT_ABI_GIT_MASTER + PIX_FMT_RGBA64BE=0x123, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian + PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian + PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian + PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian +#endif 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 }; #define PIX_FMT_Y400A PIX_FMT_GRAY8A +#define PIX_FMT_GBR24P PIX_FMT_GBRP #if AV_HAVE_BIGENDIAN # define PIX_FMT_NE(be, le) PIX_FMT_##be @@ -199,4 +214,8 @@ enum PixelFormat { #define PIX_FMT_RGBA64 PIX_FMT_NE(RGBA64BE, RGBA64LE) #define PIX_FMT_BGRA64 PIX_FMT_NE(BGRA64BE, BGRA64LE) +#define PIX_FMT_GBRP9 PIX_FMT_NE(GBRP9BE , GBRP9LE) +#define PIX_FMT_GBRP10 PIX_FMT_NE(GBRP10BE, GBRP10LE) +#define PIX_FMT_GBRP16 PIX_FMT_NE(GBRP16BE, GBRP16LE) + #endif /* AVUTIL_PIXFMT_H */ |