Browse code

PCM regression tests.

Originally committed as revision 14671 to svn://svn.ffmpeg.org/ffmpeg/trunk

Peter Ross authored on 2008/08/09 08:31:43
Showing 4 changed files
... ...
@@ -212,6 +212,7 @@ CODEC_TESTS = $(addprefix regtest-,             \
212 212
         adpcm_swf                               \
213 213
         flac                                    \
214 214
         wma                                     \
215
+        pcm                                     \
215 216
     )
216 217
 
217 218
 LAVF_TESTS = $(addprefix regtest-,              \
... ...
@@ -213,3 +213,63 @@ stddev: 2105.96 PSNR: 29.85 bytes:  1048620/  1058444
213 213
 106044 ./tests/data/a-wmav2.asf
214 214
 stddev:12255.80 PSNR: 14.55 bytes:  1056812/  1058444
215 215
 stddev: 2099.27 PSNR: 29.88 bytes:  1048620/  1058444
216
+89f5b8dd97e0dddbe59af0d44fd229f3 *./tests/data/a-pcm_alaw.wav
217
+529256 ./tests/data/a-pcm_alaw.wav
218
+0568b0b9a72e31559e150e7e09d301cd *./tests/data/pcm.vsynth.out.wav
219
+stddev:  101.67 PSNR: 56.18 bytes:  1058444/  1058444
220
+f443a8eeb1647ec1eeb8370c939e52d4 *./tests/data/a-pcm_mulaw.wav
221
+529256 ./tests/data/a-pcm_mulaw.wav
222
+1c3eeaa8814ebd4916780dff80ed6dc5 *./tests/data/pcm.vsynth.out.wav
223
+stddev:  103.38 PSNR: 56.03 bytes:  1058444/  1058444
224
+9b883ee7a5256b26e16c419b76f373d7 *./tests/data/a-pcm_s8.mov
225
+533937 ./tests/data/a-pcm_s8.mov
226
+652edf30f35ad89bf27bcc9d2f9c7b53 *./tests/data/pcm.vsynth.out.wav
227
+stddev:  147.89 PSNR: 52.92 bytes:  1058444/  1058444
228
+98cadb3502dbdc99e6e077c28b1a036c *./tests/data/a-pcm_u8.wav
229
+529244 ./tests/data/a-pcm_u8.wav
230
+652edf30f35ad89bf27bcc9d2f9c7b53 *./tests/data/pcm.vsynth.out.wav
231
+stddev:  147.89 PSNR: 52.92 bytes:  1058444/  1058444
232
+5c8718508599b5c87af8e9a7158a9e66 *./tests/data/a-pcm_s16be.mov
233
+1063137 ./tests/data/a-pcm_s16be.mov
234
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
235
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
236
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/a-pcm_s16le.wav
237
+1058444 ./tests/data/a-pcm_s16le.wav
238
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
239
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
240
+01c2f68d239f05489369001b548da455 *./tests/data/a-pcm_u16be.mkv
241
+1066121 ./tests/data/a-pcm_u16be.mkv
242
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
243
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
244
+a4d25572221ee6ead64f8372cd72cae5 *./tests/data/a-pcm_u16le.mkv
245
+1066121 ./tests/data/a-pcm_u16le.mkv
246
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
247
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
248
+4bc4cd19722f6456fd0e9b51ee0c30cf *./tests/data/a-pcm_s24be.mov
249
+1592337 ./tests/data/a-pcm_s24be.mov
250
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
251
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
252
+aaba3cf534ddddf5bcf663bc8c5b5331 *./tests/data/a-pcm_s24le.wav
253
+1587644 ./tests/data/a-pcm_s24le.wav
254
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
255
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
256
+e60d8004d926d5f27beeb92a9bdd4b3d *./tests/data/a-pcm_s32be.mov
257
+2121537 ./tests/data/a-pcm_s32be.mov
258
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
259
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
260
+7661c9b6f221d9f57985a9e4d92c4e63 *./tests/data/a-pcm_s32le.wav
261
+2116844 ./tests/data/a-pcm_s32le.wav
262
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
263
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
264
+118ff3dc83c62ce9ce669eef57e55bb2 *./tests/data/a-pcm_f32be.au
265
+2116824 ./tests/data/a-pcm_f32be.au
266
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.vsynth.out.wav
267
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
268
+8c74234928ed425b1171211a89f67ead *./tests/data/a-pcm_zork.wav
269
+529256 ./tests/data/a-pcm_zork.wav
270
+864c8c866ac25642c29a13b122c70709 *./tests/data/pcm.vsynth.out.wav
271
+stddev:  633.10 PSNR: 40.29 bytes:  1058444/  1058444
272
+f0c1c9bae445267d4ab8fb91d4f56071 *./tests/data/a-pcm_s24daud.302
273
+10371830 ./tests/data/a-pcm_s24daud.302
274
+fff1dc03aa2750031203a7d72b832fad *./tests/data/pcm.vsynth.out.wav
275
+stddev: 9416.45 PSNR: 16.84 bytes:  6911840/  1058444
... ...
@@ -126,7 +126,7 @@ do_audio_encoding()
126 126
 
127 127
 do_audio_decoding()
128 128
 {
129
-    do_ffmpeg $pcm_dst -i $file -f wav $pcm_dst
129
+    do_ffmpeg $pcm_dst -i $file -sample_fmt s16 -f wav $pcm_dst
130 130
 }
131 131
 
132 132
 do_libav()
... ...
@@ -437,6 +437,33 @@ fi
437 437
 #do_audio_decoding
438 438
 #fi
439 439
 
440
+do_audio_enc_dec() {
441
+    do_audio_encoding $3.$1 "" "$4 -sample_fmt $2 -acodec $3"
442
+    do_audio_decoding
443
+}
444
+
445
+if [ -n "$do_pcm" ] ; then
446
+do_audio_enc_dec wav s16 pcm_alaw
447
+do_audio_enc_dec wav s16 pcm_mulaw
448
+do_audio_enc_dec mov s16 pcm_s8
449
+do_audio_enc_dec wav s16 pcm_u8
450
+do_audio_enc_dec mov s16 pcm_s16be
451
+do_audio_enc_dec wav s16 pcm_s16le
452
+do_audio_enc_dec mkv s16 pcm_u16be
453
+do_audio_enc_dec mkv s16 pcm_u16le
454
+do_audio_enc_dec mov s16 pcm_s24be
455
+do_audio_enc_dec wav s16 pcm_s24le
456
+#do_audio_enc_dec ??? s16 pcm_u24be #no compatible muxer or demuxer
457
+#do_audio_enc_dec ??? s16 pcm_u24le #no compatible muxer or demuxer
458
+do_audio_enc_dec mov s16 pcm_s32be
459
+do_audio_enc_dec wav s16 pcm_s32le
460
+#do_audio_enc_dec ??? s16 pcm_u32be #no compatible muxer or demuxer
461
+#do_audio_enc_dec ??? s16 pcm_u32le #no compatible muxer or demuxer
462
+do_audio_enc_dec au  flt pcm_f32be
463
+do_audio_enc_dec wav s16 pcm_zork
464
+do_audio_enc_dec 302 s16 pcm_s24daud "-ac 6 -ar 96000"
465
+fi
466
+
440 467
 # libavformat testing
441 468
 
442 469
 if [ -n "$do_avi" ] ; then
... ...
@@ -213,3 +213,63 @@ stddev: 2105.96 PSNR: 29.85 bytes:  1048620/  1058444
213 213
 106044 ./tests/data/a-wmav2.asf
214 214
 stddev:12255.80 PSNR: 14.55 bytes:  1056812/  1058444
215 215
 stddev: 2099.27 PSNR: 29.88 bytes:  1048620/  1058444
216
+89f5b8dd97e0dddbe59af0d44fd229f3 *./tests/data/a-pcm_alaw.wav
217
+529256 ./tests/data/a-pcm_alaw.wav
218
+0568b0b9a72e31559e150e7e09d301cd *./tests/data/pcm.rotozoom.out.wav
219
+stddev:  101.67 PSNR: 56.18 bytes:  1058444/  1058444
220
+f443a8eeb1647ec1eeb8370c939e52d4 *./tests/data/a-pcm_mulaw.wav
221
+529256 ./tests/data/a-pcm_mulaw.wav
222
+1c3eeaa8814ebd4916780dff80ed6dc5 *./tests/data/pcm.rotozoom.out.wav
223
+stddev:  103.38 PSNR: 56.03 bytes:  1058444/  1058444
224
+9b883ee7a5256b26e16c419b76f373d7 *./tests/data/a-pcm_s8.mov
225
+533937 ./tests/data/a-pcm_s8.mov
226
+652edf30f35ad89bf27bcc9d2f9c7b53 *./tests/data/pcm.rotozoom.out.wav
227
+stddev:  147.89 PSNR: 52.92 bytes:  1058444/  1058444
228
+98cadb3502dbdc99e6e077c28b1a036c *./tests/data/a-pcm_u8.wav
229
+529244 ./tests/data/a-pcm_u8.wav
230
+652edf30f35ad89bf27bcc9d2f9c7b53 *./tests/data/pcm.rotozoom.out.wav
231
+stddev:  147.89 PSNR: 52.92 bytes:  1058444/  1058444
232
+5c8718508599b5c87af8e9a7158a9e66 *./tests/data/a-pcm_s16be.mov
233
+1063137 ./tests/data/a-pcm_s16be.mov
234
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
235
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
236
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/a-pcm_s16le.wav
237
+1058444 ./tests/data/a-pcm_s16le.wav
238
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
239
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
240
+01c2f68d239f05489369001b548da455 *./tests/data/a-pcm_u16be.mkv
241
+1066121 ./tests/data/a-pcm_u16be.mkv
242
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
243
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
244
+a4d25572221ee6ead64f8372cd72cae5 *./tests/data/a-pcm_u16le.mkv
245
+1066121 ./tests/data/a-pcm_u16le.mkv
246
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
247
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
248
+4bc4cd19722f6456fd0e9b51ee0c30cf *./tests/data/a-pcm_s24be.mov
249
+1592337 ./tests/data/a-pcm_s24be.mov
250
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
251
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
252
+aaba3cf534ddddf5bcf663bc8c5b5331 *./tests/data/a-pcm_s24le.wav
253
+1587644 ./tests/data/a-pcm_s24le.wav
254
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
255
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
256
+e60d8004d926d5f27beeb92a9bdd4b3d *./tests/data/a-pcm_s32be.mov
257
+2121537 ./tests/data/a-pcm_s32be.mov
258
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
259
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
260
+7661c9b6f221d9f57985a9e4d92c4e63 *./tests/data/a-pcm_s32le.wav
261
+2116844 ./tests/data/a-pcm_s32le.wav
262
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
263
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
264
+118ff3dc83c62ce9ce669eef57e55bb2 *./tests/data/a-pcm_f32be.au
265
+2116824 ./tests/data/a-pcm_f32be.au
266
+95e54b261530a1bcf6de6fe3b21dc5f6 *./tests/data/pcm.rotozoom.out.wav
267
+stddev:    0.00 PSNR:999.99 bytes:  1058444/  1058444
268
+8c74234928ed425b1171211a89f67ead *./tests/data/a-pcm_zork.wav
269
+529256 ./tests/data/a-pcm_zork.wav
270
+864c8c866ac25642c29a13b122c70709 *./tests/data/pcm.rotozoom.out.wav
271
+stddev:  633.10 PSNR: 40.29 bytes:  1058444/  1058444
272
+f0c1c9bae445267d4ab8fb91d4f56071 *./tests/data/a-pcm_s24daud.302
273
+10371830 ./tests/data/a-pcm_s24daud.302
274
+fff1dc03aa2750031203a7d72b832fad *./tests/data/pcm.rotozoom.out.wav
275
+stddev: 9416.45 PSNR: 16.84 bytes:  6911840/  1058444