]> git.sesse.net Git - ffmpeg/blob - tests/regression.sh
suppress uninerresting output
[ffmpeg] / tests / regression.sh
1 #!/bin/sh
2 #
3 # automatic regression test for ffmpeg
4 #
5 #
6 #set -x
7 # Even in the 21st century some diffs are not supporting -u.
8 diff -u $0 $0 > /dev/null 2>&1
9 if [ $? -eq 0 ]; then
10   diff_cmd="diff -u"
11 else
12   diff_cmd="diff"
13 fi
14
15 diff -w $0 $0 > /dev/null 2>&1
16 if [ $? -eq 0 ]; then
17   diff_cmd="$diff_cmd -w"
18 fi
19
20 set -e
21
22 datadir="./data"
23
24 logfile="$datadir/ffmpeg.regression"
25 outfile="$datadir/a-"
26
27 # tests to do
28 if [ "$1" = "mpeg4" ] ; then
29     do_mpeg4=y
30 elif [ "$1" = "mpeg" ] ; then
31     do_mpeg=y
32     do_mpeg2=y
33 elif [ "$1" = "ac3" ] ; then
34     do_ac3=y
35 elif [ "$1" = "libavtest" ] ; then
36     do_libav=y
37     logfile="$datadir/libav.regression"
38     outfile="$datadir/b-"
39 else
40     do_mpeg=y
41     do_mpeg2=y
42     do_mpeg2thread=y
43     do_msmpeg4v2=y
44     do_msmpeg4=y
45     do_wmv1=y
46     do_wmv2=y
47     do_h261=y
48     do_h263=y
49     do_h263p=y
50     do_mpeg4=y
51     do_huffyuv=y
52     do_mjpeg=y
53     do_ljpeg=y
54     do_rv10=y
55     do_mp2=y
56     do_ac3=y
57     do_g726=y
58     do_adpcm_ima_wav=y
59     do_adpcm_ms=y
60     do_rc=y
61     do_mpeg4adv=y
62     do_mpeg4thread=y
63     do_mpeg4nr=y
64     do_mpeg1b=y
65     do_asv1=y
66     do_asv2=y
67     do_flv=y
68     do_ffv1=y
69     do_error=y
70     do_svq1=y
71 fi
72
73
74 # various files
75 ffmpeg="../ffmpeg_g"
76 tiny_psnr="./tiny_psnr"
77 reffile="$2"
78 benchfile="$datadir/ffmpeg.bench"
79 raw_src="$3/%d.pgm"
80 raw_dst="$datadir/out.yuv"
81 raw_ref="$datadir/ref.yuv"
82 pcm_src="asynth1.sw"
83 pcm_dst="$datadir/out.wav"
84 if [ X"`echo | md5sum 2> /dev/null`" != X ]; then
85     do_md5sum() { md5sum -b $1; }
86 elif [ -x /sbin/md5 ]; then
87     do_md5sum() { /sbin/md5 -r $1 | sed 's# \**\./# *./#'; }
88 else
89     do_md5sum() { echo No md5sum program found; }
90 fi
91
92 # create the data directory if it does not exists
93 mkdir -p $datadir
94
95 do_ffmpeg()
96 {
97     f="$1"
98     shift
99     echo $ffmpeg -y -bitexact -dct_algo 1 -idct_algo 2 $*
100     $ffmpeg -y -bitexact -dct_algo 1 -idct_algo 2 -benchmark $* > $datadir/bench.tmp 2> /tmp/ffmpeg$$
101     egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:)" /tmp/ffmpeg$$ || true
102     rm -f /tmp/ffmpeg$$
103     do_md5sum $f >> $logfile
104     if [ $f = $raw_dst ] ; then
105         $tiny_psnr $f $raw_ref >> $logfile
106     else
107         wc -c $f >> $logfile
108     fi
109     expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
110     echo `cat $datadir/bench2.tmp` $f >> $benchfile
111 }
112
113 do_ffmpeg_crc()
114 {
115     f="$1"
116     shift
117     echo $ffmpeg -y -bitexact -dct_algo 1 -idct_algo 2 $* -f crc $datadir/ffmpeg.crc
118     $ffmpeg -y -bitexact -dct_algo 1 -idct_algo 2 $* -f crc $datadir/ffmpeg.crc > /tmp/ffmpeg$$ 2>&1
119     egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:|ffmpeg version|  configuration|  built)" /tmp/ffmpeg$$ || true
120     rm -f /tmp/ffmpeg$$ 
121     echo "$f `cat $datadir/ffmpeg.crc`" >> $logfile
122 }
123
124 do_ffmpeg_nocheck()
125 {
126     f="$1"
127     shift
128     echo $ffmpeg -y -bitexact -dct_algo 1 -idct_algo 2 $*
129     $ffmpeg -y -bitexact -dct_algo 1 -idct_algo 2 -benchmark $* > $datadir/bench.tmp 2> /tmp/ffmpeg$$
130     egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:)" /tmp/ffmpeg$$ || true
131     rm -f /tmp/ffmpeg$$
132     expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
133     echo `cat $datadir/bench2.tmp` $f >> $benchfile
134 }
135
136 echo "ffmpeg regression test" > $logfile
137 echo "ffmpeg benchmarks" > $benchfile
138
139 ###################################
140 # generate reference for quality check
141 do_ffmpeg_nocheck $raw_ref -y -f pgmyuv -i $raw_src -an -f rawvideo $raw_ref
142
143 ###################################
144 if [ -n "$do_mpeg" ] ; then
145 # mpeg1 encoding
146 file=${outfile}mpeg1.mpg
147 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -f mpeg1video $file 
148
149 # mpeg1 decoding
150 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
151 fi
152
153 ###################################
154 if [ -n "$do_mpeg2" ] ; then
155 # mpeg2 encoding
156 file=${outfile}mpeg2.mpg
157 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video $file 
158
159 # mpeg2 decoding
160 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
161
162 # mpeg2 encoding
163 file=${outfile}mpeg2.mpg
164 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -idct_algo 1 -dct_algo 2 -f mpeg1video $file 
165
166 # mpeg2 decoding
167 do_ffmpeg $raw_dst -y -idct_algo 1 -i $file -f rawvideo $raw_dst
168
169 # mpeg2 encoding interlaced
170 file=${outfile}mpeg2i.mpg
171 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -ildct -ilme $file 
172
173 # mpeg2 decoding
174 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
175 fi
176
177 ###################################
178 if [ -n "$do_mpeg2thread" ] ; then
179 # mpeg2 encoding interlaced
180 file=${outfile}mpeg2thread.mpg
181 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -bf 2 -ildct -ilme -threads 2 $file 
182
183 # mpeg2 decoding
184 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
185 fi
186
187 ###################################
188 if [ -n "$do_msmpeg4v2" ] ; then
189 # msmpeg4 encoding
190 file=${outfile}msmpeg4v2.avi
191 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec msmpeg4v2 $file
192
193 # msmpeg4v2 decoding
194 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
195 fi
196
197 ###################################
198 if [ -n "$do_msmpeg4" ] ; then
199 # msmpeg4 encoding
200 file=${outfile}msmpeg4.avi
201 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec msmpeg4 $file
202
203 # msmpeg4 decoding
204 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
205 fi
206
207 ###################################
208 if [ -n "$do_wmv1" ] ; then
209 # wmv1 encoding
210 file=${outfile}wmv1.avi
211 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec wmv1 $file
212
213 # wmv1 decoding
214 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
215 fi
216
217 ###################################
218 if [ -n "$do_wmv2" ] ; then
219 # wmv2 encoding
220 file=${outfile}wmv2.avi
221 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec wmv2 $file
222
223 # wmv2 decoding
224 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
225 fi
226
227 ###################################
228 if [ -n "$do_h261" ] ; then
229 # h261 encoding
230 file=${outfile}h261.avi
231 do_ffmpeg $file -y -qscale 11 -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h261 $file
232
233 # h261 decoding
234 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
235 fi
236
237 ###################################
238 if [ -n "$do_h263" ] ; then
239 # h263 encoding
240 file=${outfile}h263.avi
241 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263 $file
242
243 # h263 decoding
244 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
245 fi
246
247 ###################################
248 if [ -n "$do_h263p" ] ; then
249 # h263p encoding
250 file=${outfile}h263p.avi
251 do_ffmpeg $file -y -qscale 2 -umv -aiv -aic -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263p -ps 300 $file
252
253 # h263p decoding
254 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
255 fi
256
257 ###################################
258 if [ -n "$do_mpeg4" ] ; then
259 # mpeg4
260 file=${outfile}odivx.mp4
261 do_ffmpeg $file -y -4mv -hq -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
262
263 # mpeg4 decoding
264 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
265 fi
266
267 ###################################
268 if [ -n "$do_huffyuv" ] ; then
269 # huffyuv
270 file=${outfile}huffyuv.avi
271 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec huffyuv -strict -1 $file
272
273 # huffyuv decoding
274 do_ffmpeg $raw_dst -y -i $file -f rawvideo -strict -1 $raw_dst
275 fi
276
277 ###################################
278 if [ -n "$do_rc" ] ; then
279 # mpeg4 rate control
280 file=${outfile}mpeg4-rc.avi
281 do_ffmpeg $file -y -b 400 -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
282
283 # mpeg4 rate control decoding
284 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
285 fi
286
287 ###################################
288 if [ -n "$do_mpeg4adv" ] ; then
289 # mpeg4
290 file=${outfile}mpeg4-adv.avi
291 do_ffmpeg $file -y -qscale 9 -4mv -hq -part -ps 200 -aic -trell -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
292
293 # mpeg4 decoding
294 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
295 fi
296
297 ###################################
298 if [ -n "$do_mpeg4thread" ] ; then
299 # mpeg4
300 file=${outfile}mpeg4-thread.avi
301 do_ffmpeg $file -y -b 500 -4mv -hq -part -ps 200 -aic -trell -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 -threads 2 $file
302
303 # mpeg4 decoding
304 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
305 fi
306
307 ###################################
308 if [ -n "$do_mpeg4adv" ] ; then
309 # mpeg4
310 file=${outfile}mpeg4-Q.avi
311 do_ffmpeg $file -y -qscale 7 -4mv -mbd 2 -qpel -bf 2 -cmp 1 -subcmp 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
312
313 # mpeg4 decoding
314 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
315 fi
316
317 ###################################
318 if [ -n "$do_error" ] ; then
319 # damaged mpeg4
320 file=${outfile}error-mpeg4-adv.avi
321 do_ffmpeg $file -y -qscale 7 -4mv -mbd 2 -part -ps 250 -error 10 -aic -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
322
323 # damaged mpeg4 decoding
324 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
325 fi
326
327 ###################################
328 if [ -n "$do_mpeg4nr" ] ; then
329 # noise reduction
330 file=${outfile}mpeg4-nr.avi
331 do_ffmpeg $file -y -qscale 8 -4mv -mbd 2 -nr 200 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
332
333 # mpeg4 decoding
334 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
335 fi
336
337 ###################################
338 if [ -n "$do_mpeg1b" ] ; then
339 # mpeg1
340 file=${outfile}mpeg1b.mpg
341 do_ffmpeg $file -y -qscale 8 -bf 3 -ps 200 -f pgmyuv -i $raw_src -an -vcodec mpeg1video -f mpeg1video $file
342
343 # mpeg1 decoding
344 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
345 fi
346
347 ###################################
348 if [ -n "$do_mjpeg" ] ; then
349 # mjpeg
350 file=${outfile}mjpeg.avi
351 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mjpeg $file
352
353 # mjpeg decoding
354 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
355 fi
356
357 ###################################
358 if [ -n "$do_ljpeg" ] ; then
359 # ljpeg
360 file=${outfile}ljpeg.avi
361 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec ljpeg $file
362
363 # ljpeg decoding
364 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
365 fi
366
367 ###################################
368 if [ -n "$do_rv10" ] ; then
369 # rv10 encoding
370 file=${outfile}rv10.rm
371 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an $file 
372
373 # rv10 decoding
374 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
375 fi
376
377 ###################################
378 if [ -n "$do_asv1" ] ; then
379 # asv1 encoding
380 file=${outfile}asv1.avi
381 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec asv1 $file
382
383 # asv1 decoding
384 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
385 fi
386
387 ###################################
388 if [ -n "$do_asv2" ] ; then
389 # asv2 encoding
390 file=${outfile}asv2.avi
391 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec asv2 $file
392
393 # asv2 decoding
394 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
395 fi
396
397 ###################################
398 if [ -n "$do_flv" ] ; then
399 # flv encoding
400 file=${outfile}flv.flv
401 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec flv $file
402
403 # flv decoding
404 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
405 fi
406
407 ###################################
408 if [ -n "$do_ffv1" ] ; then
409 # ffv1 encoding
410 file=${outfile}ffv1.avi
411 do_ffmpeg $file -y -strict -1 -f pgmyuv -i $raw_src -an -vcodec ffv1 $file
412
413 # ffv1 decoding
414 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
415 fi
416
417 ###################################
418 if [ -n "$do_svq1" ] ; then
419 # svq1 encoding
420 file=${outfile}svq1.mov
421 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec svq1 -qscale 3 -pix_fmt yuv410p $file
422
423 # svq1 decoding
424 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst 
425 fi
426
427 ###################################
428 if [ -n "$do_mp2" ] ; then
429 # mp2 encoding
430 file=${outfile}mp2.mp2
431 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src $file 
432
433 # mp2 decoding
434 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst 
435 fi
436
437 ###################################
438 if [ -n "$do_ac3" ] ; then
439 # ac3 encoding
440 file=${outfile}ac3.rm
441 do_ffmpeg $file -y -ab 128 -ac 2 -f s16le  -i $pcm_src -vn $file 
442
443 # ac3 decoding
444 #do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst 
445 fi
446
447 ###################################
448 if [ -n "$do_g726" ] ; then
449 # g726 encoding
450 file=${outfile}g726.wav
451 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 32 -ac 1 -ar 8000 -acodec g726 $file 
452
453 # g726 decoding
454 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst 
455 fi
456
457 ###################################
458 if [ -n "$do_adpcm_ima_wav" ] ; then
459 # encoding
460 file=${outfile}adpcm_ima.wav
461 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec adpcm_ima_wav $file 
462
463 # decoding
464 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst 
465 fi
466
467 ###################################
468 if [ -n "$do_adpcm_ms" ] ; then
469 # encoding
470 file=${outfile}adpcm_ms.wav
471 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec adpcm_ms $file 
472
473 # decoding
474 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst 
475 fi
476
477 ###################################
478 # libav testing
479 ###################################
480
481 if [ -n "$do_libav" ] ; then
482
483 # avi
484 file=${outfile}libav.avi
485 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
486 do_ffmpeg_crc $file -i $file
487
488 # asf
489 file=${outfile}libav.asf
490 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
491 do_ffmpeg_crc $file -i $file -r 25
492
493 # rm
494 file=${outfile}libav.rm
495 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
496 # broken
497 #do_ffmpeg_crc $file -i $file
498
499 # mpegps
500 file=${outfile}libav.mpg
501 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
502 do_ffmpeg_crc $file -i $file
503
504 # swf (decode audio only)
505 file=${outfile}libav.swf
506 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
507 do_ffmpeg_crc $file -i $file
508
509 # ffm
510 file=${outfile}libav.ffm
511 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
512 do_ffmpeg_crc $file -i $file
513
514 # flv
515 file=${outfile}libav.flv
516 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -an $file
517 do_ffmpeg_crc $file -i $file
518
519 # mov
520 file=${outfile}libav.mov
521 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec pcm_alaw $file
522 do_ffmpeg_crc $file -i $file
523
524 # nut
525 file=${outfile}libav.nut
526 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
527 do_ffmpeg_crc $file -i $file
528
529 # dv
530 file=${outfile}libav.dv
531 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -ar 48000 -r 25 -s pal -ac 2 $file
532 do_ffmpeg_crc $file -i $file
533
534 # XXX: need mpegts tests (add bitstreams or add output capability in ffmpeg)
535
536 ####################
537 # streamed images
538 # mjpeg
539 #file=${outfile}libav.mjpeg
540 #do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
541 #do_ffmpeg_crc $file -i $file
542
543 # pbmpipe
544 file=${outfile}libav.pbm
545 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f imagepipe $file
546 do_ffmpeg_crc $file -f imagepipe -i $file
547
548 # pgmpipe
549 file=${outfile}libav.pgm
550 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f imagepipe $file
551 do_ffmpeg_crc $file -f imagepipe -i $file
552
553 # ppmpipe
554 file=${outfile}libav.ppm
555 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f imagepipe $file
556 do_ffmpeg_crc $file -f imagepipe -i $file
557
558 # gif
559 file=${outfile}libav.gif
560 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
561 #do_ffmpeg_crc $file -i $file
562
563 # yuv4mpeg
564 file=${outfile}libav.yuv4mpeg
565 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
566 #do_ffmpeg_crc $file -i $file
567
568 ####################
569 # image formats
570 # pgm (we do not do md5 on image files yet)
571 file=${outfile}libav%d.pgm
572 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src $file
573 do_ffmpeg_crc $file -i $file
574
575 # ppm (we do not do md5 on image files yet)
576 file=${outfile}libav%d.ppm
577 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src $file
578 do_ffmpeg_crc $file -i $file
579
580 # jpeg (we do not do md5 on image files yet)
581 file=${outfile}libav%d.jpg
582 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src -f image2 $file
583 do_ffmpeg_crc $file -f image2 -i $file
584
585 ####################
586 # audio only
587
588 # wav
589 file=${outfile}libav.wav
590 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
591 do_ffmpeg_crc $file -i $file
592
593 # alaw
594 file=${outfile}libav.al
595 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
596 do_ffmpeg_crc $file -i $file
597
598 # mulaw
599 file=${outfile}libav.ul
600 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
601 do_ffmpeg_crc $file -i $file
602
603 # au
604 file=${outfile}libav.au
605 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
606 do_ffmpeg_crc $file -i $file
607
608 ####################
609 # pix_fmt conversions
610 conversions="yuv420p yuv422p yuv444p yuv422 yuv410p yuv411p yuvj420p \
611              yuvj422p yuvj444p rgb24 bgr24 rgba32 rgb565 rgb555 gray monow \
612              monob pal8"
613 for pix_fmt in $conversions ; do
614     file=${outfile}libav-${pix_fmt}.yuv
615     do_ffmpeg_nocheck $file -r 1 -t 1 -y -f pgmyuv -i $raw_src \
616                             -f rawvideo -s 352x288 -pix_fmt $pix_fmt $raw_dst
617     do_ffmpeg $file -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $raw_dst \
618                     -f rawvideo -s 352x288 -pix_fmt yuv444p $file
619 done
620
621 fi
622
623
624
625 if $diff_cmd $logfile $reffile ; then
626     echo 
627     echo Regression test succeeded.
628     exit 0
629 else
630     echo 
631     echo Regression test: Error.
632     exit 1
633 fi