[vlc-commits] fourcc: add P016

Steve Lhomme git at videolan.org
Thu Sep 12 14:24:44 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep 10 10:13:36 2019 +0200| [af34b2ce6766818294382f710f441baf0eb1de41] | committer: Steve Lhomme

fourcc: add P016

It's like P010/NV12 but for up to 16 bits sources

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=af34b2ce6766818294382f710f441baf0eb1de41
---

 include/vlc_fourcc.h | 2 ++
 src/misc/es_format.c | 3 +++
 src/misc/fourcc.c    | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 2f7356e0ec..c84466575c 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -291,6 +291,8 @@
 #define VLC_CODEC_NV42            VLC_FOURCC('N','V','4','2')
 /* 2 planes Y/UV 4:2:0 10-bit */
 #define VLC_CODEC_P010            VLC_FOURCC('P','0','1','0')
+/* 2 planes Y/UV 4:2:0 16-bit */
+#define VLC_CODEC_P016            VLC_FOURCC('P','0','1','6')
 
 /* Packed YUV */
 
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index a9fa5b5423..9abf7732f3 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -115,6 +115,9 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
     case VLC_CODEC_P010:
         p_fmt->i_bits_per_pixel = 15;
         break;
+    case VLC_CODEC_P016:
+        p_fmt->i_bits_per_pixel = 20;
+        break;
     case VLC_CODEC_I411:
     case VLC_CODEC_YV12:
     case VLC_CODEC_I420:
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index f57737aa23..7ce049d087 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -219,7 +219,7 @@ const char *vlc_fourcc_GetDescription(int cat, vlc_fourcc_t fourcc)
     VLC_CODEC_I420_16L, VLC_CODEC_I420_16B, VLC_CODEC_I420_12L, VLC_CODEC_I420_12B, VLC_CODEC_I420_10L, VLC_CODEC_I420_10B, VLC_CODEC_I420_9L, VLC_CODEC_I420_9B
 
 #define VLC_CODEC_YUV_SEMIPLANAR_420_16 \
-    VLC_CODEC_P010
+    VLC_CODEC_P010, VLC_CODEC_P016
 
 #define VLC_CODEC_YUV_PLANAR_422 \
     VLC_CODEC_I422, VLC_CODEC_J422



More information about the vlc-commits mailing list