diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2009-03-19 21:23:39 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2009-03-19 21:23:39 +0000 |
commit | 9ba4821d933739d923edcb229e7129d939d56d48 (patch) | |
tree | db07388b1b6d2d7d4bb6d098b574347ab24fc3cb /libavcodec | |
parent | 5c3d507f1a9aff13d93fc851a477ddbb2511bf6f (diff) | |
download | ffmpeg-9ba4821d933739d923edcb229e7129d939d56d48.tar.gz |
Split TrueHD decoder from MLP
Originally committed as revision 18045 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/Makefile | 1 | ||||
-rw-r--r-- | libavcodec/allcodecs.c | 1 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 3 | ||||
-rw-r--r-- | libavcodec/mlp_parser.c | 2 | ||||
-rw-r--r-- | libavcodec/mlpdec.c | 17 |
5 files changed, 21 insertions, 3 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 13415fc0d2..62793bf0e6 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -211,6 +211,7 @@ OBJS-$(CONFIG_THP_DECODER) += mjpegdec.o mjpeg.o 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 --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index b024e01dd6..4dcbcd8b13 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -215,6 +215,7 @@ void avcodec_register_all(void) 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 --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3adc941ca8..0519dde1ea 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -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 @@ enum CodecID { CODEC_ID_SIPR, CODEC_ID_MP1, CODEC_ID_TWINVQ, + CODEC_ID_TRUEHD, /* subtitle codecs */ CODEC_ID_DVD_SUBTITLE= 0x17000, diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c index b3e5b3a191..34ee193da2 100644 --- a/libavcodec/mlp_parser.c +++ b/libavcodec/mlp_parser.c @@ -287,7 +287,7 @@ lost_sync: } AVCodecParser mlp_parser = { - { CODEC_ID_MLP }, + { CODEC_ID_MLP, CODEC_ID_TRUEHD }, sizeof(MLPParseContext), mlp_init, mlp_parse, diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 99754b329c..6b825cdea1 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -1038,6 +1038,7 @@ error: return -1; } +#if CONFIG_MLP_DECODER AVCodec mlp_decoder = { "mlp", CODEC_TYPE_AUDIO, @@ -1047,6 +1048,20 @@ AVCodec mlp_decoder = { 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 */ |