[vlc-devel] [PATCH] demux: mp4: Add support for (unpaletted) raw RGB and GREY video
Alex Converse
alex.converse at gmail.com
Fri Dec 18 00:22:55 CET 2015
This fixes playback of the gaming content from derf's video testset
---
modules/demux/mp4/essetup.c | 21 +++++++++++++++++++++
modules/demux/mp4/libmp4.c | 4 +++-
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 3d929ba..11771b3 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -218,6 +218,27 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
case VLC_FOURCC('y','u','v','2'):
p_track->fmt.i_codec = VLC_FOURCC('Y','U','Y','2');
break;
+ case VLC_FOURCC('r','a','w',' '):
+ switch( p_vide->i_depth ) {
+ case 16:
+ p_track->fmt.i_codec = VLC_CODEC_RGB15;
+ break;
+ case 24:
+ p_track->fmt.i_codec = VLC_CODEC_RGB24;
+ break;
+ case 32:
+ p_track->fmt.i_codec = VLC_CODEC_ARGB;
+ break;
+ case 32 + 8:
+ p_track->fmt.i_codec = VLC_CODEC_GREY;
+ break;
+ default:
+ msg_Dbg( p_demux, "Unrecognized raw video format (depth = %d)",
+ p_vide->i_depth );
+ p_track->fmt.i_codec = p_sample->i_type;
+ break;
+ }
+ break;
default:
p_track->fmt.i_codec = p_sample->i_type;
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 8b3ad81..83cbb2b 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3728,7 +3728,6 @@ static const struct
{ ATOM_dvi, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_alaw, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_ulaw, MP4_ReadBox_sample_soun, ATOM_stsd },
- { ATOM_raw, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_MAC3, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_MAC6, MP4_ReadBox_sample_soun, ATOM_stsd },
{ ATOM_Qclp, MP4_ReadBox_sample_soun, ATOM_stsd },
@@ -3745,6 +3744,9 @@ static const struct
{ ATOM_dOps, MP4_ReadBox_Binary, ATOM_Opus },
{ ATOM_wfex, MP4_ReadBox_WMA2, ATOM_wma }, /* ismv formatex */
+ /* Both uncompressed sound and video */
+ { ATOM_raw, MP4_ReadBox_default, ATOM_stsd },
+
{ ATOM_drmi, MP4_ReadBox_sample_vide, ATOM_stsd },
{ ATOM_vide, MP4_ReadBox_sample_vide, ATOM_stsd },
{ ATOM_mp4v, MP4_ReadBox_sample_vide, ATOM_stsd },
--
2.6.0.rc2.230.g3dd15c0
More information about the vlc-devel
mailing list