summaryrefslogtreecommitdiffstats
path: root/libavcodec/mlp.c
diff options
context:
space:
mode:
authorJai Luthra <me@jailuthra.in>2016-08-30 15:53:02 +0530
committerRostislav Pehlivanov <atomnuker@gmail.com>2016-09-17 13:23:56 +0100
commit15b86f480a9c748aeeafb42a877ee755c64f90f2 (patch)
tree140112c91214179d0f8dde574193137d06988424 /libavcodec/mlp.c
parentee88dcb2b0fefb42b0761ddb105c71daf604d791 (diff)
downloadffmpeg-streaming-15b86f480a9c748aeeafb42a877ee755c64f90f2.zip
ffmpeg-streaming-15b86f480a9c748aeeafb42a877ee755c64f90f2.tar.gz
mlpenc: Working MLP/TrueHD encoder
* Multichannel support for TrueHD is experimental There should be downmix substreams present for 2+ channel bitstreams, but ffmpeg decoder doesn't need it. Will add support for this soon. * There might be lossless check failures on LFE channels * 32-bit sample support has been removed for now, will add it later While testing, some samples gave lossless check failures when enforcing s32. Probably this will also get solved with the LFE issues. Signed-off-by: Jai Luthra <me@jailuthra.in>
Diffstat (limited to 'libavcodec/mlp.c')
-rw-r--r--libavcodec/mlp.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libavcodec/mlp.c b/libavcodec/mlp.c
index 87f7c77..ddbab60 100644
--- a/libavcodec/mlp.c
+++ b/libavcodec/mlp.c
@@ -41,6 +41,27 @@ const uint8_t ff_mlp_huffman_tables[3][18][2] = {
}
};
+const ChannelInformation ff_mlp_ch_info[21] = {
+ { 0x01, 0x01, 0x00, 0x1f }, { 0x03, 0x02, 0x00, 0x1b },
+ { 0x07, 0x02, 0x01, 0x1f }, { 0x0F, 0x02, 0x02, 0x19 },
+ { 0x07, 0x02, 0x01, 0x03 }, { 0x0F, 0x02, 0x02, 0x1f },
+ { 0x1F, 0x02, 0x03, 0x01 }, { 0x07, 0x02, 0x01, 0x1a },
+ { 0x0F, 0x02, 0x02, 0x1f }, { 0x1F, 0x02, 0x03, 0x18 },
+ { 0x0F, 0x02, 0x02, 0x02 }, { 0x1F, 0x02, 0x03, 0x1f },
+ { 0x3F, 0x02, 0x04, 0x00 }, { 0x0F, 0x03, 0x01, 0x1f },
+ { 0x1F, 0x03, 0x02, 0x18 }, { 0x0F, 0x03, 0x01, 0x02 },
+ { 0x1F, 0x03, 0x02, 0x1f }, { 0x3F, 0x03, 0x03, 0x00 },
+ { 0x1F, 0x04, 0x01, 0x01 }, { 0x1F, 0x04, 0x01, 0x18 },
+ { 0x3F, 0x04, 0x02, 0x00 },
+};
+
+const uint64_t ff_mlp_channel_layouts[12] = {
+ AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_2_1,
+ AV_CH_LAYOUT_QUAD, AV_CH_LAYOUT_2POINT1, AV_CH_LAYOUT_SURROUND,
+ AV_CH_LAYOUT_4POINT0, AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_3POINT1,
+ AV_CH_LAYOUT_4POINT1, AV_CH_LAYOUT_5POINT1_BACK, 0,
+};
+
static int crc_init = 0;
#if CONFIG_SMALL
#define CRC_TABLE_SIZE 257
OpenPOWER on IntegriCloud