Commit c7283a40 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Rafaël Carré

Fix Duck DK3/DK4 ADPCM mappings

Also give them VLC_CODEC_ names and use them in the adpcm decoder.

v2: Add codec description strings
Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
parent 5878bce8
...@@ -271,9 +271,8 @@ ATTR_PACKED ...@@ -271,9 +271,8 @@ ATTR_PACKED
#define WAVE_FORMAT_GSM_AMR_FIXED 0x7A21 /* Fixed bitrate, no SID */ #define WAVE_FORMAT_GSM_AMR_FIXED 0x7A21 /* Fixed bitrate, no SID */
#define WAVE_FORMAT_GSM_AMR 0x7A22 /* Variable bitrate, including SID */ #define WAVE_FORMAT_GSM_AMR 0x7A22 /* Variable bitrate, including SID */
/* Need to check these */ #define WAVE_FORMAT_DK3 0x0062
#define WAVE_FORMAT_DK3 0x0061 #define WAVE_FORMAT_DK4 0x0061
#define WAVE_FORMAT_DK4 0x0062
/* At least libavformat use that ID: from libavformat/riff.c ('Vo' == 0x566f) /* At least libavformat use that ID: from libavformat/riff.c ('Vo' == 0x566f)
* { CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id? * { CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id?
...@@ -387,8 +386,8 @@ wave_format_tag_to_fourcc[] = ...@@ -387,8 +386,8 @@ wave_format_tag_to_fourcc[] =
{ WAVE_FORMAT_WMAS, VLC_CODEC_WMAS, "Window Media Audio 9 Speech" }, { WAVE_FORMAT_WMAS, VLC_CODEC_WMAS, "Window Media Audio 9 Speech" },
{ WAVE_FORMAT_ATRAC3, VLC_CODEC_ATRAC3, "Sony Atrac3" }, { WAVE_FORMAT_ATRAC3, VLC_CODEC_ATRAC3, "Sony Atrac3" },
{ WAVE_FORMAT_SONY_ATRAC3,VLC_CODEC_ATRAC3, "Sony Atrac3" }, { WAVE_FORMAT_SONY_ATRAC3,VLC_CODEC_ATRAC3, "Sony Atrac3" },
{ WAVE_FORMAT_DK3, VLC_FOURCC( 'm', 's', 0x00,0x61), "Duck DK3" }, { WAVE_FORMAT_DK3, VLC_CODEC_ADPCM_DK3, "Duck DK3" },
{ WAVE_FORMAT_DK4, VLC_FOURCC( 'm', 's', 0x00,0x62), "Duck DK4" }, { WAVE_FORMAT_DK4, VLC_CODEC_ADPCM_DK4, "Duck DK4" },
{ WAVE_FORMAT_DTS, VLC_CODEC_DTS, "DTS Coherent Acoustics" }, { WAVE_FORMAT_DTS, VLC_CODEC_DTS, "DTS Coherent Acoustics" },
{ WAVE_FORMAT_DTS_MS, VLC_CODEC_DTS, "DTS Coherent Acoustics" }, { WAVE_FORMAT_DTS_MS, VLC_CODEC_DTS, "DTS Coherent Acoustics" },
{ WAVE_FORMAT_DIVIO_AAC, VLC_CODEC_MP4A, "MPEG-4 Audio (Divio)" }, { WAVE_FORMAT_DIVIO_AAC, VLC_CODEC_MP4A, "MPEG-4 Audio (Divio)" },
......
...@@ -306,6 +306,8 @@ ...@@ -306,6 +306,8 @@
#define VLC_CODEC_ADPCM_IMA_AMV VLC_FOURCC('i','m','a','v') #define VLC_CODEC_ADPCM_IMA_AMV VLC_FOURCC('i','m','a','v')
#define VLC_CODEC_ADPCM_IMA_QT VLC_FOURCC('i','m','a','4') #define VLC_CODEC_ADPCM_IMA_QT VLC_FOURCC('i','m','a','4')
#define VLC_CODEC_ADPCM_YAMAHA VLC_FOURCC('m','s',0x00,0x20) #define VLC_CODEC_ADPCM_YAMAHA VLC_FOURCC('m','s',0x00,0x20)
#define VLC_CODEC_ADPCM_DK3 VLC_FOURCC('m','s',0x00,0x62)
#define VLC_CODEC_ADPCM_DK4 VLC_FOURCC('m','s',0x00,0x61)
#define VLC_CODEC_G723_1 VLC_FOURCC('g','7','2', 0x31) #define VLC_CODEC_G723_1 VLC_FOURCC('g','7','2', 0x31)
#define VLC_CODEC_G729 VLC_FOURCC('g','7','2','9') #define VLC_CODEC_G729 VLC_FOURCC('g','7','2','9')
#define VLC_CODEC_VMDAUDIO VLC_FOURCC('v','m','d','a') #define VLC_CODEC_VMDAUDIO VLC_FOURCC('v','m','d','a')
......
...@@ -141,8 +141,8 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -141,8 +141,8 @@ static int OpenDecoder( vlc_object_t *p_this )
case VLC_FOURCC('i','m','a', '4'): /* IMA ADPCM */ case VLC_FOURCC('i','m','a', '4'): /* IMA ADPCM */
case VLC_FOURCC('m','s',0x00,0x02): /* MS ADPCM */ case VLC_FOURCC('m','s',0x00,0x02): /* MS ADPCM */
case VLC_FOURCC('m','s',0x00,0x11): /* IMA ADPCM */ case VLC_FOURCC('m','s',0x00,0x11): /* IMA ADPCM */
case VLC_FOURCC('m','s',0x00,0x61): /* Duck DK4 ADPCM */ case VLC_CODEC_ADPCM_DK3:
case VLC_FOURCC('m','s',0x00,0x62): /* Duck DK3 ADPCM */ case VLC_CODEC_ADPCM_DK4:
case VLC_FOURCC('X','A','J', 0): /* EA ADPCM */ case VLC_FOURCC('X','A','J', 0): /* EA ADPCM */
break; break;
default: default:
...@@ -179,10 +179,10 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -179,10 +179,10 @@ static int OpenDecoder( vlc_object_t *p_this )
case VLC_CODEC_ADPCM_MS: /* MS ADPCM */ case VLC_CODEC_ADPCM_MS: /* MS ADPCM */
p_sys->codec = ADPCM_MS; p_sys->codec = ADPCM_MS;
break; break;
case VLC_FOURCC('m','s',0x00,0x61): /* Duck DK4 ADPCM */ case VLC_CODEC_ADPCM_DK4: /* Duck DK4 ADPCM */
p_sys->codec = ADPCM_DK4; p_sys->codec = ADPCM_DK4;
break; break;
case VLC_FOURCC('m','s',0x00,0x62): /* Duck DK3 ADPCM */ case VLC_CODEC_ADPCM_DK3: /* Duck DK3 ADPCM */
p_sys->codec = ADPCM_DK3; p_sys->codec = ADPCM_DK3;
break; break;
case VLC_FOURCC('X','A','J', 0): /* EA ADPCM */ case VLC_FOURCC('X','A','J', 0): /* EA ADPCM */
......
...@@ -1169,6 +1169,12 @@ static const staticentry_t p_list_audio[] = { ...@@ -1169,6 +1169,12 @@ static const staticentry_t p_list_audio[] = {
B(VLC_CODEC_ADPCM_YAMAHA, "Yamaha ADPCM Audio" ), B(VLC_CODEC_ADPCM_YAMAHA, "Yamaha ADPCM Audio" ),
A("ms\x00\x20"), A("ms\x00\x20"),
B(VLC_CODEC_ADPCM_DK3, "Duck DK3 ADPCM"),
A("ms\x00\x62"),
B(VLC_CODEC_ADPCM_DK4, "Duck DK4 ADPCM"),
A("ms\x00\x61"),
/* AMR */ /* AMR */
B(VLC_CODEC_AMR_NB, "AMR narrow band"), B(VLC_CODEC_AMR_NB, "AMR narrow band"),
A("samr"), A("samr"),
......
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