# HG changeset patch # User ramiro # Date 1237497819 0 # Node ID 5b4f4d83431f41f39478b71bd90e75fe9a44f854 # Parent 6d7c38f60b0622b7d588c3d216606c61fb68c6a2 Split TrueHD decoder from MLP diff -r 6d7c38f60b06 -r 5b4f4d83431f Makefile --- a/Makefile Thu Mar 19 09:53:50 2009 +0000 +++ b/Makefile Thu Mar 19 21:23:39 2009 +0000 @@ -211,6 +211,7 @@ OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o faxcompr.o OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o lzwenc.o +OBJS-$(CONFIG_TRUEHD_DECODER) += mlpdec.o mlp_parser.o mlp.o OBJS-$(CONFIG_TRUEMOTION1_DECODER) += truemotion1.o OBJS-$(CONFIG_TRUEMOTION2_DECODER) += truemotion2.o OBJS-$(CONFIG_TRUESPEECH_DECODER) += truespeech.o diff -r 6d7c38f60b06 -r 5b4f4d83431f allcodecs.c --- a/allcodecs.c Thu Mar 19 09:53:50 2009 +0000 +++ b/allcodecs.c Thu Mar 19 21:23:39 2009 +0000 @@ -215,6 +215,7 @@ REGISTER_DECODER (SMACKAUD, smackaud); REGISTER_ENCDEC (SONIC, sonic); REGISTER_ENCODER (SONIC_LS, sonic_ls); + REGISTER_DECODER (TRUEHD, truehd); REGISTER_DECODER (TRUESPEECH, truespeech); REGISTER_DECODER (TTA, tta); REGISTER_DECODER (VMDAUDIO, vmdaudio); diff -r 6d7c38f60b06 -r 5b4f4d83431f avcodec.h --- a/avcodec.h Thu Mar 19 09:53:50 2009 +0000 +++ b/avcodec.h Thu Mar 19 21:23:39 2009 +0000 @@ -30,7 +30,7 @@ #include "libavutil/avutil.h" #define LIBAVCODEC_VERSION_MAJOR 52 -#define LIBAVCODEC_VERSION_MINOR 21 +#define LIBAVCODEC_VERSION_MINOR 22 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ @@ -310,6 +310,7 @@ CODEC_ID_SIPR, CODEC_ID_MP1, CODEC_ID_TWINVQ, + CODEC_ID_TRUEHD, /* subtitle codecs */ CODEC_ID_DVD_SUBTITLE= 0x17000, diff -r 6d7c38f60b06 -r 5b4f4d83431f mlp_parser.c --- a/mlp_parser.c Thu Mar 19 09:53:50 2009 +0000 +++ b/mlp_parser.c Thu Mar 19 21:23:39 2009 +0000 @@ -287,7 +287,7 @@ } AVCodecParser mlp_parser = { - { CODEC_ID_MLP }, + { CODEC_ID_MLP, CODEC_ID_TRUEHD }, sizeof(MLPParseContext), mlp_init, mlp_parse, diff -r 6d7c38f60b06 -r 5b4f4d83431f mlpdec.c --- a/mlpdec.c Thu Mar 19 09:53:50 2009 +0000 +++ b/mlpdec.c Thu Mar 19 21:23:39 2009 +0000 @@ -1038,6 +1038,7 @@ return -1; } +#if CONFIG_MLP_DECODER AVCodec mlp_decoder = { "mlp", CODEC_TYPE_AUDIO, @@ -1047,6 +1048,20 @@ NULL, NULL, read_access_unit, - .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)/TrueHD"), + .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"), }; +#endif /* CONFIG_MLP_DECODER */ +#if CONFIG_TRUEHD_DECODER +AVCodec truehd_decoder = { + "truehd", + CODEC_TYPE_AUDIO, + CODEC_ID_TRUEHD, + sizeof(MLPDecodeContext), + mlp_decode_init, + NULL, + NULL, + read_access_unit, + .long_name = NULL_IF_CONFIG_SMALL("TrueHD"), +}; +#endif /* CONFIG_TRUEHD_DECODER */