[FFmpeg-cvslog] Make MLP/TrueHD channel layout functions visible to the decoder.

Carl Eugen Hoyos git at videolan.org
Tue Apr 19 03:33:25 CEST 2011


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Apr 19 03:09:11 2011 +0200| [280a789fe218351a1f137366a1eabde87313049a] | committer: Carl Eugen Hoyos

Make MLP/TrueHD channel layout functions visible to the decoder.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=280a789fe218351a1f137366a1eabde87313049a
---

 libavcodec/mlp_parser.c |   10 +++++-----
 libavcodec/mlp_parser.h |    3 +++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 5f0b49a..834f9d4 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -43,7 +43,7 @@ static const uint8_t mlp_channels[32] = {
     5, 6, 5, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 };
 
-static const uint64_t mlp_layout[32] = {
+const uint64_t ff_mlp_layout[32] = {
     AV_CH_LAYOUT_MONO,
     AV_CH_LAYOUT_STEREO,
     AV_CH_LAYOUT_2_1,
@@ -107,7 +107,7 @@ static int truehd_channels(int chanmap)
     return channels;
 }
 
-static int64_t truehd_layout(int chanmap)
+int64_t ff_truehd_layout(int chanmap)
 {
     int layout = 0, i;
 
@@ -316,15 +316,15 @@ static int mlp_parse(AVCodecParserContext *s,
         if (mh.stream_type == 0xbb) {
             /* MLP stream */
             avctx->channels = mlp_channels[mh.channels_mlp];
-            avctx->channel_layout = mlp_layout[mh.channels_mlp];
+            avctx->channel_layout = ff_mlp_layout[mh.channels_mlp];
         } else { /* mh.stream_type == 0xba */
             /* TrueHD stream */
             if (mh.channels_thd_stream2) {
                 avctx->channels = truehd_channels(mh.channels_thd_stream2);
-                avctx->channel_layout = truehd_layout(mh.channels_thd_stream2);
+                avctx->channel_layout = ff_truehd_layout(mh.channels_thd_stream2);
             } else {
                 avctx->channels = truehd_channels(mh.channels_thd_stream1);
-                avctx->channel_layout = truehd_layout(mh.channels_thd_stream1);
+                avctx->channel_layout = ff_truehd_layout(mh.channels_thd_stream1);
             }
             if (av_get_channel_layout_nb_channels(avctx->channel_layout) != avctx->channels) {
                 avctx->channel_layout = 0;
diff --git a/libavcodec/mlp_parser.h b/libavcodec/mlp_parser.h
index d7ce2b8..6e43bc3 100644
--- a/libavcodec/mlp_parser.h
+++ b/libavcodec/mlp_parser.h
@@ -54,6 +54,9 @@ typedef struct MLPHeaderInfo
 
 
 int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb);
+int64_t ff_truehd_layout(int chanmap);
+
+extern const uint64_t ff_mlp_layout[32];
 
 #endif /* AVCODEC_MLP_PARSER_H */
 



More information about the ffmpeg-cvslog mailing list