[vlc-commits] vlc_fourcc: add a define for "aflt" (Raw IEEE Float PCM)
Steve Lhomme
git at videolan.org
Wed Jul 12 12:23:56 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Jul 6 16:59:33 2017 +0200| [c919ea5a4fa9d376fdd5fc0e9d755218fe6aef6c] | committer: Jean-Baptiste Kempf
vlc_fourcc: add a define for "aflt" (Raw IEEE Float PCM)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c919ea5a4fa9d376fdd5fc0e9d755218fe6aef6c
---
include/vlc_codecs.h | 4 ++--
include/vlc_fourcc.h | 1 +
modules/codec/araw.c | 2 +-
modules/demux/mkv/matroska_segment_parse.cpp | 2 +-
modules/demux/wav.c | 4 ++--
src/misc/fourcc.c | 2 +-
src/misc/fourcc_list.h | 3 +++
7 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/include/vlc_codecs.h b/include/vlc_codecs.h
index 7a79eec043..0b55adcf06 100644
--- a/include/vlc_codecs.h
+++ b/include/vlc_codecs.h
@@ -319,7 +319,7 @@ wave_format_tag_to_fourcc[] =
{ WAVE_FORMAT_PCM, VLC_CODEC_S24L, "PCM S24L audio" },
{ WAVE_FORMAT_PCM, VLC_CODEC_S32L, "PCM S32L audio" },
{ WAVE_FORMAT_ADPCM, VLC_CODEC_ADPCM_MS, "ADPCM" },
- { WAVE_FORMAT_IEEE_FLOAT, VLC_FOURCC( 'a', 'f', 'l', 't' ), "IEEE Float audio" },
+ { WAVE_FORMAT_IEEE_FLOAT, VLC_CODEC_RAW_IEEE_PCM, "IEEE Float audio" },
{ WAVE_FORMAT_IEEE_FLOAT, VLC_CODEC_F32L, "PCM 32 (Float) audio" },
{ WAVE_FORMAT_IEEE_FLOAT, VLC_CODEC_F64L, "PCM 64 (Float) audio" },
{ WAVE_FORMAT_ALAW, VLC_CODEC_ALAW, "A-Law" },
@@ -419,7 +419,7 @@ static const struct
sub_format_tag_to_fourcc[] =
{
{ VLC_AMBISONIC_SUBTYPE_PCM, VLC_CODEC_RAW_PCM, "Ambisonic B format (PCM)" },
- { VLC_AMBISONIC_SUBTYPE_IEEE_FLOAT, VLC_FOURCC( 'a', 'f', 'l', 't' ), "Ambisonic B format (IEEE float)" },
+ { VLC_AMBISONIC_SUBTYPE_IEEE_FLOAT, VLC_CODEC_RAW_IEEE_PCM, "Ambisonic B format (IEEE float)" },
{ VLC_KSDATAFORMAT_SUBTYPE_ATRAC3P, VLC_CODEC_ATRAC3P, "Sony Atrac3+" },
{ VLC_KSDATAFORMAT_SUBTYPE_UNKNOWN, VLC_FOURCC( 'u', 'n', 'd', 'f' ), "Unknown" }
};
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index fc073db5a8..d2a22fbaa1 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -474,6 +474,7 @@
#define VLC_CODEC_RALF VLC_FOURCC('R','A','L','F')
#define VLC_CODEC_RAW_PCM VLC_FOURCC('a','r','a','w')
+#define VLC_CODEC_RAW_IEEE_PCM VLC_FOURCC('a','f','l','t')
#define VLC_CODEC_S8 VLC_FOURCC('s','8',' ',' ')
#define VLC_CODEC_U8 VLC_FOURCC('u','8',' ',' ')
#define VLC_CODEC_S16L VLC_FOURCC('s','1','6','l')
diff --git a/modules/codec/araw.c b/modules/codec/araw.c
index 9fb45f1bec..f38dbe343d 100644
--- a/modules/codec/araw.c
+++ b/modules/codec/araw.c
@@ -117,7 +117,7 @@ static int DecoderOpen( vlc_object_t *p_this )
switch( p_dec->fmt_in.i_codec )
{
case VLC_CODEC_RAW_PCM:
- case VLC_FOURCC('a','f','l','t'):
+ case VLC_CODEC_RAW_IEEE_PCM:
/* _signed_ big endian samples (mov) */
case VLC_FOURCC('t','w','o','s'):
/* _signed_ little endian samples (mov) */
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 4452bbf1a6..a1213c2e89 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1728,7 +1728,7 @@ int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
}
S_CASE("A_PCM/INT/BIG") { A_PCM__helper ( vars, VLC_FOURCC( 't','w','o','s' ) ); }
S_CASE("A_PCM/INT/LIT") { A_PCM__helper ( vars, VLC_CODEC_RAW_PCM ); }
- S_CASE("A_PCM/FLOAT/IEEE") { A_PCM__helper ( vars, VLC_FOURCC( 'a','f','l','t' ) ) ;}
+ S_CASE("A_PCM/FLOAT/IEEE") { A_PCM__helper ( vars, VLC_CODEC_RAW_IEEE_PCM ) ;}
S_CASE("A_REAL/14_4") {
vars.p_fmt->i_codec = VLC_CODEC_RA_144;
vars.p_fmt->audio.i_channels = 1;
diff --git a/modules/demux/wav.c b/modules/demux/wav.c
index 31cefd24be..7b3c1fa9f1 100644
--- a/modules/demux/wav.c
+++ b/modules/demux/wav.c
@@ -300,7 +300,7 @@ static int Open( vlc_object_t * p_this )
if( p_sys->i_channel_mask )
{
if( p_sys->fmt.i_codec == VLC_CODEC_RAW_PCM ||
- p_sys->fmt.i_codec == VLC_FOURCC('a','f','l','t') )
+ p_sys->fmt.i_codec == VLC_CODEC_RAW_IEEE_PCM )
p_sys->i_chans_to_reorder =
aout_CheckChannelReorder( pi_channels_aout, NULL,
p_sys->i_channel_mask,
@@ -339,7 +339,7 @@ static int Open( vlc_object_t * p_this )
switch( p_sys->fmt.i_codec )
{
case VLC_CODEC_RAW_PCM:
- case VLC_FOURCC( 'a', 'f', 'l', 't' ):
+ case VLC_CODEC_RAW_IEEE_PCM:
case VLC_FOURCC( 'u', 'l', 'a', 'w' ):
case VLC_CODEC_ALAW:
case VLC_CODEC_MULAW:
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 41a255979f..2ffa6c2cd1 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -131,7 +131,7 @@ vlc_fourcc_t vlc_fourcc_GetCodecAudio( vlc_fourcc_t i_fourcc, int i_bits )
{
const int i_bytes = ( i_bits + 7 ) / 8;
- if( i_fourcc == VLC_FOURCC( 'a', 'f', 'l', 't' ) )
+ if( i_fourcc == VLC_CODEC_RAW_IEEE_PCM )
{
switch( i_bytes )
{
diff --git a/src/misc/fourcc_list.h b/src/misc/fourcc_list.h
index 400aaf67b5..72d8818640 100644
--- a/src/misc/fourcc_list.h
+++ b/src/misc/fourcc_list.h
@@ -1433,6 +1433,9 @@ static const staticentry_t p_list_audio[] = {
B(VLC_CODEC_RAW_PCM, "Raw PCM"),
A("araw"),
+ B(VLC_CODEC_RAW_IEEE_PCM, "Raw IEEE Float PCM"),
+ A("aflt"),
+
B(VLC_CODEC_S8, "PCM S8"),
A("s8 "),
More information about the vlc-commits
mailing list