[vlc-devel] [PATCH 1/4] fourcc: add P016
Steve Lhomme
robux4 at ycbcr.xyz
Tue Sep 10 11:26:17 CEST 2019
It's like P010/NV12 but for up to 16 bits sources
---
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 2f7356e0ec2..c84466575c6 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 a9fa5b5423f..9abf7732f31 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 f57737aa237..7ce049d087e 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
--
2.17.1
More information about the vlc-devel
mailing list