Commit 13b6861d authored by Alex Converse's avatar Alex Converse Committed by François Cartegnie

demux: mp4: Add support for (unpaletted) raw RGB and GREY video

This fixes playback of the gaming content from derf's video testset
Signed-off-by: François Cartegnie's avatarFrancois Cartegnie <fcvlcdev@free.fr>
parent c2cd03e2
......@@ -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;
......
......@@ -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 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment