[vlc-devel] [PATCH] add Apple Pixlet decoder
Paul B Mahol
onemda at gmail.com
Thu Jan 19 15:47:26 CET 2017
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
include/vlc_fourcc.h | 5 +++++
modules/codec/avcodec/chroma.c | 2 ++
modules/codec/avcodec/fourcc.c | 4 ++++
modules/video_chroma/chain.c | 1 +
src/misc/fourcc.c | 12 +++++++++++-
src/misc/fourcc_list.h | 7 +++++++
6 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 09c22cb..08e4af7 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -182,6 +182,7 @@
#define VLC_CODEC_DXV VLC_FOURCC('D','X','D','3')
#define VLC_CODEC_CINEFORM VLC_FOURCC('C','F','H','D')
#define VLC_CODEC_SPEEDHQ VLC_FOURCC('S','H','Q','2')
+#define VLC_CODEC_PIXLET VLC_FOURCC('p','x','l','t')
/***********
* Chromas
@@ -210,6 +211,10 @@
#define VLC_CODEC_I420_12L VLC_FOURCC('I','0','C','L')
#define VLC_CODEC_I420_12B VLC_FOURCC('I','0','C','B')
+/* Planar YUV 4:2:0 Y:U:V 16-bit stored on 16 bits */
+#define VLC_CODEC_I420_16L VLC_FOURCC('I','0','F','L')
+#define VLC_CODEC_I420_16B VLC_FOURCC('I','0','F','B')
+
/* Planar YUV 4:2:2 Y:U:V 8-bit */
#define VLC_CODEC_I422 VLC_FOURCC('I','4','2','2')
/* Planar YUV 4:2:2 Y:U:V 9-bit stored on 16 bits */
diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c
index e700eb1..5f98e87 100644
--- a/modules/codec/avcodec/chroma.c
+++ b/modules/codec/avcodec/chroma.c
@@ -90,6 +90,8 @@ static const struct
{VLC_CODEC_I420_12L, AV_PIX_FMT_YUV420P12LE, 0, 0, 0 },
{VLC_CODEC_I420_12B, AV_PIX_FMT_YUV420P12BE, 0, 0, 0 },
#endif
+ {VLC_CODEC_I420_16L, AV_PIX_FMT_YUV420P16LE, 0, 0, 0 },
+ {VLC_CODEC_I420_16B, AV_PIX_FMT_YUV420P16BE, 0, 0, 0 },
#ifdef AV_PIX_FMT_P010
{VLC_CODEC_P010, AV_PIX_FMT_P010, 0, 0, 0 },
#endif
diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
index dd7a366..5a5c928 100644
--- a/modules/codec/avcodec/fourcc.c
+++ b/modules/codec/avcodec/fourcc.c
@@ -279,6 +279,10 @@ static const struct
/* ffmpeg only: AV_CODEC_ID_SNOW */
/* ffmpeg only: AV_CODEC_ID_SMVJPEG */
+#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 70, 100 )
+ { VLC_CODEC_PIXLET, AV_CODEC_ID_PIXLET, VIDEO_ES },
+#endif
+
#if LIBAVCODEC_VERSION_CHECK( 57, 71, 101, 999, 999 )
{ VLC_CODEC_SPEEDHQ, AV_CODEC_ID_SPEEDHQ, VIDEO_ES },
#endif
diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c
index 0bde2a9..6347d0a 100644
--- a/modules/video_chroma/chain.c
+++ b/modules/video_chroma/chain.c
@@ -65,6 +65,7 @@ static const vlc_fourcc_t pi_allowed_chromas[] = {
VLC_CODEC_I420,
VLC_CODEC_I422,
VLC_CODEC_I420_10L,
+ VLC_CODEC_I420_16L,
VLC_CODEC_RGB32,
VLC_CODEC_RGB24,
0
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 9e42045..20269b6 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -216,7 +216,7 @@ const char *vlc_fourcc_GetDescription(int cat, vlc_fourcc_t fourcc)
VLC_CODEC_NV12, VLC_CODEC_NV21
#define VLC_CODEC_YUV_PLANAR_420_16 \
- VLC_CODEC_I420_12L, VLC_CODEC_I420_12B, VLC_CODEC_I420_10L, VLC_CODEC_I420_10B, VLC_CODEC_I420_9L, VLC_CODEC_I420_9B
+ 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_PLANAR_422 \
VLC_CODEC_I422, VLC_CODEC_J422
@@ -283,6 +283,12 @@ static const vlc_fourcc_t p_I420_12L_fallback[] = {
static const vlc_fourcc_t p_I420_12B_fallback[] = {
VLC_CODEC_I420_12B, VLC_CODEC_I420_12L, VLC_CODEC_FALLBACK_420_16, 0
};
+static const vlc_fourcc_t p_I420_16L_fallback[] = {
+ VLC_CODEC_I420_16L, VLC_CODEC_I420_16B, VLC_CODEC_FALLBACK_420_16, 0
+};
+static const vlc_fourcc_t p_I420_16B_fallback[] = {
+ VLC_CODEC_I420_16B, VLC_CODEC_I420_16L, VLC_CODEC_FALLBACK_420_16, 0
+};
#define VLC_CODEC_FALLBACK_422 \
@@ -412,6 +418,8 @@ static const vlc_fourcc_t *pp_YUV_fallback[] = {
p_I420_10B_fallback,
p_I420_12L_fallback,
p_I420_12B_fallback,
+ p_I420_16L_fallback,
+ p_I420_16B_fallback,
p_J420_fallback,
p_I422_fallback,
p_I422_9L_fallback,
@@ -619,6 +627,8 @@ static const struct
{ { VLC_CODEC_GBR_PLANAR_10L,
VLC_CODEC_GBR_PLANAR_10B }, PLANAR_16(3, 1, 1, 10) },
+ { { VLC_CODEC_I420_16L,
+ VLC_CODEC_I420_16B }, PLANAR_16(3, 2, 2, 16) },
{ { VLC_CODEC_I420_12L,
VLC_CODEC_I420_12B }, PLANAR_16(3, 2, 2, 12) },
{ { VLC_CODEC_I420_10L,
diff --git a/src/misc/fourcc_list.h b/src/misc/fourcc_list.h
index d2fc683..e83ff7d 100644
--- a/src/misc/fourcc_list.h
+++ b/src/misc/fourcc_list.h
@@ -876,6 +876,10 @@ static const staticentry_t p_list_video[] = {
B(VLC_CODEC_I444_12B, "Planar 4:4:4 YUV 12-bit BE"),
A("I4CB"),
+ B(VLC_CODEC_I420_16L, "Planar 4:2:0 YUV 16-bit LE"),
+ A("I0FL"),
+ B(VLC_CODEC_I420_16B, "Planar 4:2:0 YUV 16-bit BE"),
+ A("I0FB"),
B(VLC_CODEC_I444_16L, "Planar 4:4:4 YUV 16-bit LE"),
A("I4FL"),
B(VLC_CODEC_I444_16B, "Planar 4:4:4 YUV 16-bit BE"),
@@ -1107,6 +1111,9 @@ static const staticentry_t p_list_video[] = {
A("SHQ5"),
A("SHQ7"),
A("SHQ9"),
+
+ B(VLC_CODEC_PIXLET, "Apple Pixlet" ),
+ A("pxlt"),
};
static const staticentry_t p_list_audio[] = {
--
2.9.3
More information about the vlc-devel
mailing list