3 # automatic regression test for ffmpeg
7 # Even in the 21st century some diffs are not supporting -u.
8 diff -u "$0" "$0" > /dev/null 2>&1
15 diff -w "$0" "$0" > /dev/null 2>&1
17 diff_cmd="$diff_cmd -w"
24 logfile="$datadir/ffmpeg.regression"
28 if [ "$1" = "mpeg4" ] ; then
30 elif [ "$1" = "mpeg" ] ; then
33 elif [ "$1" = "ac3" ] ; then
35 elif [ "$1" = "huffyuv" ] ; then
37 elif [ "$1" = "mpeg2thread" ] ; then
39 elif [ "$1" = "snow" ] ; then
41 elif [ "$1" = "snowll" ] ; then
43 elif [ "$1" = "libavtest" ] ; then
45 logfile="$datadir/libav.regression"
93 tiny_psnr="./tiny_psnr"
95 benchfile="$datadir/ffmpeg.bench"
97 raw_dst="$datadir/out.yuv"
98 raw_ref="$datadir/ref.yuv"
100 pcm_dst="$datadir/out.wav"
101 pcm_ref="$datadir/ref.wav"
102 if [ X"`echo | md5sum 2> /dev/null`" != X ]; then
103 do_md5sum() { md5sum -b $1; }
104 elif [ -x /sbin/md5 ]; then
105 do_md5sum() { /sbin/md5 -r $1 | sed 's# \**\./# *./#'; }
107 do_md5sum() { echo No md5sum program found; }
110 # create the data directory if it does not exists
117 echo $ffmpeg -y -flags +bitexact -dct fastint -idct simple $*
118 $ffmpeg -y -flags +bitexact -dct fastint -idct simple -benchmark $* > $datadir/bench.tmp 2> /tmp/ffmpeg$$
119 egrep -v "^(Stream|Press|Input|Output|frame| Stream| Duration|video:)" /tmp/ffmpeg$$ || true
121 do_md5sum $f >> $logfile
122 if [ $f = $raw_dst ] ; then
123 $tiny_psnr $f $raw_ref >> $logfile
124 elif [ $f = $pcm_dst ] ; then
125 $tiny_psnr $f $pcm_ref 2 >> $logfile
129 expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
130 echo `cat $datadir/bench2.tmp` $f >> $benchfile
137 echo $ffmpeg -y -flags +bitexact -dct fastint -idct simple $* -f crc $datadir/ffmpeg.crc
138 $ffmpeg -y -flags +bitexact -dct fastint -idct simple $* -f crc $datadir/ffmpeg.crc > /tmp/ffmpeg$$ 2>&1
139 egrep -v "^(Stream|Press|Input|Output|frame| Stream| Duration|video:|ffmpeg version| configuration| built)" /tmp/ffmpeg$$ || true
141 echo "$f `cat $datadir/ffmpeg.crc`" >> $logfile
148 echo $ffmpeg -y -flags +bitexact -dct fastint -idct simple $*
149 $ffmpeg -y -flags +bitexact -dct fastint -idct simple -benchmark $* > $datadir/bench.tmp 2> /tmp/ffmpeg$$
150 egrep -v "^(Stream|Press|Input|Output|frame| Stream| Duration|video:)" /tmp/ffmpeg$$ || true
152 expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
153 echo `cat $datadir/bench2.tmp` $f >> $benchfile
156 echo "ffmpeg regression test" > $logfile
157 echo "ffmpeg benchmarks" > $benchfile
159 ###################################
160 # generate reference for quality check
161 do_ffmpeg_nocheck $raw_ref -y -f pgmyuv -i $raw_src -an -f rawvideo $raw_ref
162 do_ffmpeg_nocheck $pcm_ref -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav $pcm_ref
164 ###################################
165 if [ -n "$do_mpeg" ] ; then
167 file=${outfile}mpeg1.mpg
168 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -f mpeg1video $file
171 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
174 ###################################
175 if [ -n "$do_mpeg2" ] ; then
177 file=${outfile}mpeg2.mpg
178 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video $file
181 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
183 # mpeg2 encoding using intra vlc
184 file=${outfile}mpeg2ivlc.mpg
185 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -flags2 +ivlc $file
188 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
191 file=${outfile}mpeg2.mpg
192 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -idct int -dct int -f mpeg1video $file
195 do_ffmpeg $raw_dst -y -idct int -i $file -f rawvideo $raw_dst
197 # mpeg2 encoding interlaced
198 file=${outfile}mpeg2i.mpg
199 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -flags +ildct+ilme $file
202 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
205 ###################################
206 if [ -n "$do_mpeg2thread" ] ; then
207 # mpeg2 encoding interlaced
208 file=${outfile}mpeg2thread.mpg
209 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 2 $file
212 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
214 # mpeg2 encoding interlaced using intra vlc
215 file=${outfile}mpeg2threadivlc.mpg
216 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -flags2 +ivlc -threads 2 $file
219 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
221 # mpeg2 encoding interlaced
222 file=${outfile}mpeg2reuse.mpg
223 do_ffmpeg $file -y -sameq -me_threshold 256 -mb_threshold 1024 -i ${outfile}mpeg2thread.mpg -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 4 $file
226 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
229 ###################################
230 if [ -n "$do_msmpeg4v2" ] ; then
232 file=${outfile}msmpeg4v2.avi
233 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec msmpeg4v2 $file
236 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
239 ###################################
240 if [ -n "$do_msmpeg4" ] ; then
242 file=${outfile}msmpeg4.avi
243 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec msmpeg4 $file
246 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
249 ###################################
250 if [ -n "$do_wmv1" ] ; then
252 file=${outfile}wmv1.avi
253 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec wmv1 $file
256 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
259 ###################################
260 if [ -n "$do_wmv2" ] ; then
262 file=${outfile}wmv2.avi
263 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec wmv2 $file
266 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
269 ###################################
270 if [ -n "$do_h261" ] ; then
272 file=${outfile}h261.avi
273 do_ffmpeg $file -y -qscale 11 -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h261 $file
276 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
279 ###################################
280 if [ -n "$do_h263" ] ; then
282 file=${outfile}h263.avi
283 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263 $file
286 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
289 ###################################
290 if [ -n "$do_h263p" ] ; then
292 file=${outfile}h263p.avi
293 do_ffmpeg $file -y -qscale 2 -flags +umv+aiv+aic -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263p -ps 300 $file
296 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
299 ###################################
300 if [ -n "$do_mpeg4" ] ; then
302 file=${outfile}odivx.mp4
303 do_ffmpeg $file -y -flags +mv4 -mbd bits -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
306 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
309 ###################################
310 if [ -n "$do_huffyuv" ] ; then
312 file=${outfile}huffyuv.avi
313 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec huffyuv -pix_fmt yuv422p $file
316 do_ffmpeg $raw_dst -y -i $file -f rawvideo -strict -2 -pix_fmt yuv420p $raw_dst
319 ###################################
320 if [ -n "$do_rc" ] ; then
322 file=${outfile}mpeg4-rc.avi
323 do_ffmpeg $file -y -b 400k -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
325 # mpeg4 rate control decoding
326 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
329 ###################################
330 if [ -n "$do_mpeg4adv" ] ; then
332 file=${outfile}mpeg4-adv.avi
333 do_ffmpeg $file -y -qscale 9 -flags +mv4+part+aic+trell -mbd bits -ps 200 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
336 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
339 ###################################
340 if [ -n "$do_mpeg4thread" ] ; then
342 file=${outfile}mpeg4-thread.avi
343 do_ffmpeg $file -y -b 500k -flags +mv4+part+aic+trell -mbd bits -ps 200 -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 -threads 2 $file
346 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
349 ###################################
350 if [ -n "$do_mpeg4adv" ] ; then
352 file=${outfile}mpeg4-Q.avi
353 do_ffmpeg $file -y -qscale 7 -flags +mv4+qpel -mbd 2 -bf 2 -cmp 1 -subcmp 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
356 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
359 ###################################
360 if [ -n "$do_mp4psp" ] ; then
362 file=${outfile}mpeg4-PSP.mp4
363 do_ffmpeg $file -y -b 768k -s 320x240 -f psp -ar 24000 -ab 32 -i $raw_src $file
366 ###################################
367 if [ -n "$do_error" ] ; then
369 file=${outfile}error-mpeg4-adv.avi
370 do_ffmpeg $file -y -qscale 7 -flags +mv4+part+aic -mbd rd -ps 250 -error 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
372 # damaged mpeg4 decoding
373 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
376 ###################################
377 if [ -n "$do_mpeg4nr" ] ; then
379 file=${outfile}mpeg4-nr.avi
380 do_ffmpeg $file -y -qscale 8 -flags +mv4 -mbd rd -nr 200 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
383 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
386 ###################################
387 if [ -n "$do_mpeg1b" ] ; then
389 file=${outfile}mpeg1b.mpg
390 do_ffmpeg $file -y -qscale 8 -bf 3 -ps 200 -f pgmyuv -i $raw_src -an -vcodec mpeg1video -f mpeg1video $file
393 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
396 ###################################
397 if [ -n "$do_mjpeg" ] ; then
399 file=${outfile}mjpeg.avi
400 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mjpeg -pix_fmt yuvj420p $file
403 do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
406 ###################################
407 if [ -n "$do_ljpeg" ] ; then
409 file=${outfile}ljpeg.avi
410 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec ljpeg -strict -1 $file
413 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
416 ###################################
417 if [ -n "$do_jpegls" ] ; then
419 file=${outfile}jpegls.avi
420 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec jpegls -vtag MJPG $file
423 do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
426 ###################################
427 if [ -n "$do_rv10" ] ; then
429 file=${outfile}rv10.rm
430 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an $file
433 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
436 ###################################
437 if [ -n "$do_rv20" ] ; then
439 file=${outfile}rv20.rm
440 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec rv20 -an $file
443 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
446 ###################################
447 if [ -n "$do_asv1" ] ; then
449 file=${outfile}asv1.avi
450 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec asv1 $file
453 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
456 ###################################
457 if [ -n "$do_asv2" ] ; then
459 file=${outfile}asv2.avi
460 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec asv2 $file
463 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
466 ###################################
467 if [ -n "$do_flv" ] ; then
469 file=${outfile}flv.flv
470 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec flv $file
473 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
476 ###################################
477 if [ -n "$do_ffv1" ] ; then
479 file=${outfile}ffv1.avi
480 do_ffmpeg $file -y -strict -2 -f pgmyuv -i $raw_src -an -vcodec ffv1 $file
483 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
486 ###################################
487 if [ -n "$do_snow" ] ; then
489 file=${outfile}snow.avi
490 do_ffmpeg $file -y -strict -2 -f pgmyuv -i $raw_src -an -vcodec snow -qscale 2 -flags +qpel -me iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64 $file
493 do_ffmpeg $raw_dst -y -i $file -f rawvideo -s 352x288 $raw_dst
496 ###################################
497 if [ -n "$do_snowll" ] ; then
499 file=${outfile}snow53.avi
500 do_ffmpeg $file -y -strict -2 -f pgmyuv -i $raw_src -an -vcodec snow -qscale .001 -pred 1 -flags +mv4+qpel $file
503 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
506 ###################################
507 if [ -n "$do_dv" ] ; then
510 do_ffmpeg $file -dct int -y -f pgmyuv -i $raw_src -s pal -an $file
513 do_ffmpeg $raw_dst -y -i $file -f rawvideo -s cif $raw_dst
516 ###################################
517 if [ -n "$do_dv50" ] ; then
520 do_ffmpeg $file -dct int -y -f pgmyuv -i $raw_src -s pal -pix_fmt yuv422p -an $file
523 do_ffmpeg $raw_dst -y -i $file -f rawvideo -s cif -pix_fmt yuv420p $raw_dst
527 ###################################
528 if [ -n "$do_svq1" ] ; then
530 file=${outfile}svq1.mov
531 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec svq1 -qscale 3 -pix_fmt yuv410p $file
534 do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
537 ###################################
538 if [ -n "$do_mp2" ] ; then
540 file=${outfile}mp2.mp2
541 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src $file
544 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
545 $tiny_psnr $pcm_dst $pcm_ref 2 1924 >> $logfile
548 ###################################
549 if [ -n "$do_ac3" ] ; then
551 file=${outfile}ac3.rm
552 do_ffmpeg $file -y -ab 128 -ac 2 -f s16le -i $pcm_src -vn $file
555 #do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
558 ###################################
559 if [ -n "$do_g726" ] ; then
561 file=${outfile}g726.wav
562 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 32 -ac 1 -ar 8000 -acodec g726 $file
565 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
568 ###################################
569 if [ -n "$do_adpcm_ima_wav" ] ; then
571 file=${outfile}adpcm_ima.wav
572 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec adpcm_ima_wav $file
575 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
578 ###################################
579 if [ -n "$do_adpcm_ms" ] ; then
581 file=${outfile}adpcm_ms.wav
582 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec adpcm_ms $file
585 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
588 ###################################
589 if [ -n "$do_adpcm_yam" ] ; then
591 file=${outfile}adpcm_yam.wav
592 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec adpcm_yamaha $file
595 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
598 ###################################
599 if [ -n "$do_flac" ] ; then
601 file=${outfile}flac.flac
602 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec flac -compression_level 2 $file
605 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
608 ###################################
610 ###################################
612 if [ -n "$do_libav" ] ; then
615 file=${outfile}libav.avi
616 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
617 do_ffmpeg_crc $file -i $file
620 file=${outfile}libav.asf
621 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
622 do_ffmpeg_crc $file -i $file -r 25
625 file=${outfile}libav.rm
626 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
628 #do_ffmpeg_crc $file -i $file
631 file=${outfile}libav.mpg
632 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
633 do_ffmpeg_crc $file -i $file
636 file=${outfile}libav.ts
637 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
638 do_ffmpeg_crc $file -i $file
640 # swf (decode audio only)
641 file=${outfile}libav.swf
642 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
643 do_ffmpeg_crc $file -i $file
646 file=${outfile}libav.ffm
647 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
648 do_ffmpeg_crc $file -i $file
651 file=${outfile}libav.flv
652 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -an $file
653 do_ffmpeg_crc $file -i $file
656 file=${outfile}libav.mov
657 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec pcm_alaw $file
658 do_ffmpeg_crc $file -i $file
661 file=${outfile}libav.nut
662 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
663 do_ffmpeg_crc $file -i $file
666 file=${outfile}libav.dv
667 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
668 do_ffmpeg_crc $file -i $file
671 file=${outfile}libav.gxf
672 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 1 $file
673 do_ffmpeg_crc $file -i $file
678 #file=${outfile}libav.mjpeg
679 #do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
680 #do_ffmpeg_crc $file -i $file
683 file=${outfile}libav.pbm
684 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
685 do_ffmpeg_crc $file -f image2pipe -i $file
688 file=${outfile}libav.pgm
689 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
690 do_ffmpeg_crc $file -f image2pipe -i $file
693 file=${outfile}libav.ppm
694 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
695 do_ffmpeg_crc $file -f image2pipe -i $file
698 file=${outfile}libav.gif
699 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -pix_fmt rgb24 $file
700 #do_ffmpeg_crc $file -i $file
703 file=${outfile}libav.y4m
704 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
705 #do_ffmpeg_crc $file -i $file
709 # pgm (we do not do md5 on image files yet)
710 file=${outfile}libav%02d.pgm
711 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src $file
712 do_ffmpeg_crc $file -i $file
714 # ppm (we do not do md5 on image files yet)
715 file=${outfile}libav%02d.ppm
716 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src $file
717 do_ffmpeg_crc $file -i $file
719 # jpeg (we do not do md5 on image files yet)
720 file=${outfile}libav%02d.jpg
721 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src -flags +bitexact -dct fastint -idct simple -pix_fmt yuvj420p -f image2 $file
722 do_ffmpeg_crc $file -f image2 -i $file
728 file=${outfile}libav.wav
729 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
730 do_ffmpeg_crc $file -i $file
733 file=${outfile}libav.al
734 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
735 do_ffmpeg_crc $file -i $file
738 file=${outfile}libav.ul
739 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
740 do_ffmpeg_crc $file -i $file
743 file=${outfile}libav.au
744 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
745 do_ffmpeg_crc $file -i $file
748 file=${outfile}libav.mmf
749 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
750 do_ffmpeg_crc $file -i $file
753 file=${outfile}libav.aif
754 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
755 do_ffmpeg_crc $file -i $file
758 file=${outfile}libav.voc
759 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
760 do_ffmpeg_crc $file -i $file
763 # pix_fmt conversions
764 conversions="yuv420p yuv422p yuv444p yuv422 yuv410p yuv411p yuvj420p \
765 yuvj422p yuvj444p rgb24 bgr24 rgba32 rgb565 rgb555 gray monow \
767 for pix_fmt in $conversions ; do
768 file=${outfile}libav-${pix_fmt}.yuv
769 do_ffmpeg_nocheck $file -r 1 -t 1 -y -f pgmyuv -i $raw_src \
770 -f rawvideo -s 352x288 -pix_fmt $pix_fmt $raw_dst
771 do_ffmpeg $file -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $raw_dst \
772 -f rawvideo -s 352x288 -pix_fmt yuv444p $file
779 if $diff_cmd "$logfile" "$reffile" ; then
781 echo Regression test succeeded.
785 echo Regression test: Error.