summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2012-06-23 16:57:56 -0700
committerAlex Converse <alex.converse@gmail.com>2012-06-27 13:47:58 -0700
commita11282259796562820e2bec371487e19743c7ad6 (patch)
tree2400988d440152af89ee93b183cc2070ae30299e
parent15358ade152ebc28fcc824e09ad9206597c281df (diff)
movenc: Add channel layouts for PCM.
-rw-r--r--libavformat/mov_chan.c26
-rw-r--r--tests/ref/fate/acodec-pcm-s16be2
-rw-r--r--tests/ref/fate/acodec-pcm-s24be2
-rw-r--r--tests/ref/fate/acodec-pcm-s32be2
-rw-r--r--tests/ref/fate/acodec-pcm-s82
5 files changed, 30 insertions, 4 deletions
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index a843e318c4..edd5f6c4da 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -414,6 +414,20 @@ static const enum MovChannelLayoutTag mov_ch_layouts_alac[] = {
0,
};
+static const enum MovChannelLayoutTag mov_ch_layouts_wav[] = {
+ MOV_CH_LAYOUT_MONO,
+ MOV_CH_LAYOUT_STEREO,
+ MOV_CH_LAYOUT_MATRIXSTEREO,
+ MOV_CH_LAYOUT_MPEG_3_0_A,
+ MOV_CH_LAYOUT_QUADRAPHONIC,
+ MOV_CH_LAYOUT_MPEG_5_0_A,
+ MOV_CH_LAYOUT_MPEG_5_1_A,
+ MOV_CH_LAYOUT_MPEG_6_1_A,
+ MOV_CH_LAYOUT_MPEG_7_1_A,
+ MOV_CH_LAYOUT_MPEG_7_1_C,
+ MOV_CH_LAYOUT_SMPTE_DTV,
+};
+
static const struct {
enum CodecID codec_id;
const enum MovChannelLayoutTag *layouts;
@@ -421,6 +435,18 @@ static const struct {
{ CODEC_ID_AAC, mov_ch_layouts_aac },
{ CODEC_ID_AC3, mov_ch_layouts_ac3 },
{ CODEC_ID_ALAC, mov_ch_layouts_alac },
+ { CODEC_ID_PCM_U8, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_S8, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_S16LE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_S16BE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_S24LE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_S24BE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_S32LE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_S32BE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_F32LE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_F32BE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_F64LE, mov_ch_layouts_wav },
+ { CODEC_ID_PCM_F64BE, mov_ch_layouts_wav },
{ CODEC_ID_NONE, NULL },
};
diff --git a/tests/ref/fate/acodec-pcm-s16be b/tests/ref/fate/acodec-pcm-s16be
index 06614e1067..39c3838a89 100644
--- a/tests/ref/fate/acodec-pcm-s16be
+++ b/tests/ref/fate/acodec-pcm-s16be
@@ -1,4 +1,4 @@
-b023c4792bd206fa96f64a8a012b6eb8 *tests/data/fate/acodec-pcm-s16be.mov
+009a446579dd4cba793723b5e2b93c39 *tests/data/fate/acodec-pcm-s16be.mov
1060097 tests/data/fate/acodec-pcm-s16be.mov
64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s16be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/acodec-pcm-s24be b/tests/ref/fate/acodec-pcm-s24be
index c6a5889134..20bc4e0f09 100644
--- a/tests/ref/fate/acodec-pcm-s24be
+++ b/tests/ref/fate/acodec-pcm-s24be
@@ -1,4 +1,4 @@
-3607f8c7029a0c2ca2c8bf2c929518b3 *tests/data/fate/acodec-pcm-s24be.mov
+de27dae0dff0359d8f39449b17d5607f *tests/data/fate/acodec-pcm-s24be.mov
1589297 tests/data/fate/acodec-pcm-s24be.mov
64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s24be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/acodec-pcm-s32be b/tests/ref/fate/acodec-pcm-s32be
index 8d77642b6b..302bc1ab04 100644
--- a/tests/ref/fate/acodec-pcm-s32be
+++ b/tests/ref/fate/acodec-pcm-s32be
@@ -1,4 +1,4 @@
-2a47292543cb0c25583a49397504e6d1 *tests/data/fate/acodec-pcm-s32be.mov
+2db1e7fe92d4006103691a4b59064dc6 *tests/data/fate/acodec-pcm-s32be.mov
2118497 tests/data/fate/acodec-pcm-s32be.mov
64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s32be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/acodec-pcm-s8 b/tests/ref/fate/acodec-pcm-s8
index 2689bf286a..f830d2fb33 100644
--- a/tests/ref/fate/acodec-pcm-s8
+++ b/tests/ref/fate/acodec-pcm-s8
@@ -1,4 +1,4 @@
-953eb563c7ea81c1ec73c5a806975e34 *tests/data/fate/acodec-pcm-s8.mov
+9ee95a7fff38831a1cad3b49c33e6ed9 *tests/data/fate/acodec-pcm-s8.mov
530897 tests/data/fate/acodec-pcm-s8.mov
651d4eb8d98dfcdda96ae6c43d8f156b *tests/data/fate/acodec-pcm-s8.out.wav
stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400