[vlc-devel] [PATCH 3/6] avcodec: map GameCube THP video and audio

Daniel Verkamp daniel at drv.nu
Sat Jan 11 02:00:19 CET 2014


Sample:
http://samples.mplayerhq.hu/game-formats/thp/AfterCredits.thp
---
 include/vlc_fourcc.h           | 2 ++
 modules/codec/avcodec/fourcc.c | 4 ++--
 src/misc/fourcc.c              | 4 ++++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 3f108bf..dcce5b2 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -142,6 +142,7 @@
 #define VLC_CODEC_XAN_WC4         VLC_FOURCC('X','x','a','n')
 #define VLC_CODEC_LCL_MSZH        VLC_FOURCC('M','S','Z','H')
 #define VLC_CODEC_LCL_ZLIB        VLC_FOURCC('Z','L','I','B')
+#define VLC_CODEC_THP             VLC_FOURCC('T','H','P','0')
 
 /* Planar YUV 4:1:0 Y:V:U */
 #define VLC_CODEC_YV9             VLC_FOURCC('Y','V','U','9')
@@ -317,6 +318,7 @@
 #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_ADPCM_THP                  VLC_FOURCC('T','H','P','A')
 #define VLC_CODEC_G723_1                     VLC_FOURCC('g','7','2', 0x31)
 #define VLC_CODEC_G729                       VLC_FOURCC('g','7','2','9')
 #define VLC_CODEC_VMDAUDIO                   VLC_FOURCC('v','m','d','a')
diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
index 28fc142..dd3411c 100644
--- a/modules/codec/avcodec/fourcc.c
+++ b/modules/codec/avcodec/fourcc.c
@@ -153,7 +153,7 @@ static const struct
     { VLC_CODEC_GIF, AV_CODEC_ID_GIF, VIDEO_ES },
     /* AV_CODEC_ID_DXA */
     { VLC_CODEC_DNXHD, AV_CODEC_ID_DNXHD, VIDEO_ES },
-    /* AV_CODEC_ID_THP */
+    { VLC_CODEC_THP, AV_CODEC_ID_THP, VIDEO_ES },
     { VLC_CODEC_SGI, AV_CODEC_ID_SGI, VIDEO_ES },
     /* AV_CODEC_ID_C93 */
     /* AV_CODEC_ID_BETHSOFTVID */
@@ -331,7 +331,7 @@ static const struct
     /* AV_CODEC_ID_ADPCM_SBPRO_4 */
     /* AV_CODEC_ID_ADPCM_SBPRO_3 */
     /* AV_CODEC_ID_ADPCM_SBPRO_2 */
-    /* AV_CODEC_ID_ADPCM_THP */
+    { VLC_CODEC_ADPCM_THP, AV_CODEC_ID_ADPCM_THP, AUDIO_ES },
     { VLC_CODEC_ADPCM_IMA_AMV, AV_CODEC_ID_ADPCM_IMA_AMV, AUDIO_ES },
     /* AV_CODEC_ID_ADPCM_EA_R1 */
     /* AV_CODEC_ID_ADPCM_EA_R3 */
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index ba600a2..4252e6b 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -1008,6 +1008,8 @@ static const staticentry_t p_list_video[] = {
     B(VLC_CODEC_LCL_ZLIB, "Loss-Less Codec Library AVIzlib"),
         A("ZLIB"),
 
+    B(VLC_CODEC_THP, "GameCube THP video"),
+
     B(0, "")
 };
 static const staticentry_t p_list_audio[] = {
@@ -1193,6 +1195,8 @@ static const staticentry_t p_list_audio[] = {
     B(VLC_CODEC_ADPCM_DK4, "Duck DK4 ADPCM"),
         A("ms\x00\x61"),
 
+    B(VLC_CODEC_ADPCM_THP, "GameCube THP ADPCM"),
+
     /* AMR */
     B(VLC_CODEC_AMR_NB, "AMR narrow band"),
         A("samr"),
-- 
1.8.5.2




More information about the vlc-devel mailing list