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
113 FFMPEG_OPTS="-y -flags +bitexact -dct fastint -idct simple"
119 echo $ffmpeg $FFMPEG_OPTS $*
120 $ffmpeg $FFMPEG_OPTS -benchmark $* > $datadir/bench.tmp 2> /tmp/ffmpeg$$
121 egrep -v "^(Stream|Press|Input|Output|frame| Stream| Duration|video:)" /tmp/ffmpeg$$ || true
123 do_md5sum $f >> $logfile
124 if [ $f = $raw_dst ] ; then
125 $tiny_psnr $f $raw_ref >> $logfile
126 elif [ $f = $pcm_dst ] ; then
127 $tiny_psnr $f $pcm_ref 2 >> $logfile
131 expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
132 echo `cat $datadir/bench2.tmp` $f >> $benchfile
139 echo $ffmpeg $FFMPEG_OPTS $* -f crc $datadir/ffmpeg.crc
140 $ffmpeg $FFMPEG_OPTS $* -f crc $datadir/ffmpeg.crc > /tmp/ffmpeg$$ 2>&1
141 egrep -v "^(Stream|Press|Input|Output|frame| Stream| Duration|video:|ffmpeg version| configuration| built)" /tmp/ffmpeg$$ || true
143 echo "$f `cat $datadir/ffmpeg.crc`" >> $logfile
150 echo $ffmpeg $FFMPEG_OPTS $*
151 $ffmpeg $FFMPEG_OPTS -benchmark $* > $datadir/bench.tmp 2> /tmp/ffmpeg$$
152 egrep -v "^(Stream|Press|Input|Output|frame| Stream| Duration|video:)" /tmp/ffmpeg$$ || true
154 expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
155 echo `cat $datadir/bench2.tmp` $f >> $benchfile
158 echo "ffmpeg regression test" > $logfile
159 echo "ffmpeg benchmarks" > $benchfile
161 ###################################
162 # generate reference for quality check
163 do_ffmpeg_nocheck $raw_ref -y -f pgmyuv -i $raw_src -an -f rawvideo $raw_ref
164 do_ffmpeg_nocheck $pcm_ref -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav $pcm_ref
166 ###################################
167 if [ -n "$do_mpeg" ] ; then
169 file=${outfile}mpeg1.mpg
170 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -f mpeg1video $file
173 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
176 ###################################
177 if [ -n "$do_mpeg2" ] ; then
179 file=${outfile}mpeg2.mpg
180 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video $file
183 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
185 # mpeg2 encoding using intra vlc
186 file=${outfile}mpeg2ivlc.mpg
187 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -flags2 +ivlc $file
190 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
193 file=${outfile}mpeg2.mpg
194 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -idct int -dct int -f mpeg1video $file
197 do_ffmpeg $raw_dst -y -idct int -i $file -f rawvideo $raw_dst
199 # mpeg2 encoding interlaced
200 file=${outfile}mpeg2i.mpg
201 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -flags +ildct+ilme $file
204 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
207 ###################################
208 if [ -n "$do_mpeg2thread" ] ; then
209 # mpeg2 encoding interlaced
210 file=${outfile}mpeg2thread.mpg
211 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 2 $file
214 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
216 # mpeg2 encoding interlaced using intra vlc
217 file=${outfile}mpeg2threadivlc.mpg
218 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
221 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
223 # mpeg2 encoding interlaced
224 file=${outfile}mpeg2reuse.mpg
225 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
228 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
231 ###################################
232 if [ -n "$do_msmpeg4v2" ] ; then
234 file=${outfile}msmpeg4v2.avi
235 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec msmpeg4v2 $file
238 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
241 ###################################
242 if [ -n "$do_msmpeg4" ] ; then
244 file=${outfile}msmpeg4.avi
245 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec msmpeg4 $file
248 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
251 ###################################
252 if [ -n "$do_wmv1" ] ; then
254 file=${outfile}wmv1.avi
255 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec wmv1 $file
258 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
261 ###################################
262 if [ -n "$do_wmv2" ] ; then
264 file=${outfile}wmv2.avi
265 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec wmv2 $file
268 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
271 ###################################
272 if [ -n "$do_h261" ] ; then
274 file=${outfile}h261.avi
275 do_ffmpeg $file -y -qscale 11 -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h261 $file
278 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
281 ###################################
282 if [ -n "$do_h263" ] ; then
284 file=${outfile}h263.avi
285 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263 $file
288 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
291 ###################################
292 if [ -n "$do_h263p" ] ; then
294 file=${outfile}h263p.avi
295 do_ffmpeg $file -y -qscale 2 -flags +umv+aiv+aic -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263p -ps 300 $file
298 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
301 ###################################
302 if [ -n "$do_mpeg4" ] ; then
304 file=${outfile}odivx.mp4
305 do_ffmpeg $file -y -flags +mv4 -mbd bits -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
308 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
311 ###################################
312 if [ -n "$do_huffyuv" ] ; then
314 file=${outfile}huffyuv.avi
315 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec huffyuv -pix_fmt yuv422p $file
318 do_ffmpeg $raw_dst -y -i $file -f rawvideo -strict -2 -pix_fmt yuv420p $raw_dst
321 ###################################
322 if [ -n "$do_rc" ] ; then
324 file=${outfile}mpeg4-rc.avi
325 do_ffmpeg $file -y -b 400k -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
327 # mpeg4 rate control decoding
328 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
331 ###################################
332 if [ -n "$do_mpeg4adv" ] ; then
334 file=${outfile}mpeg4-adv.avi
335 do_ffmpeg $file -y -qscale 9 -flags +mv4+part+aic+trell -mbd bits -ps 200 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
338 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
341 ###################################
342 if [ -n "$do_mpeg4thread" ] ; then
344 file=${outfile}mpeg4-thread.avi
345 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
348 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
351 ###################################
352 if [ -n "$do_mpeg4adv" ] ; then
354 file=${outfile}mpeg4-Q.avi
355 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
358 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
361 ###################################
362 if [ -n "$do_mp4psp" ] ; then
364 file=${outfile}mpeg4-PSP.mp4
365 do_ffmpeg $file -y -b 768k -s 320x240 -f psp -ar 24000 -ab 32 -i $raw_src $file
368 ###################################
369 if [ -n "$do_error" ] ; then
371 file=${outfile}error-mpeg4-adv.avi
372 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
374 # damaged mpeg4 decoding
375 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
378 ###################################
379 if [ -n "$do_mpeg4nr" ] ; then
381 file=${outfile}mpeg4-nr.avi
382 do_ffmpeg $file -y -qscale 8 -flags +mv4 -mbd rd -nr 200 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
385 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
388 ###################################
389 if [ -n "$do_mpeg1b" ] ; then
391 file=${outfile}mpeg1b.mpg
392 do_ffmpeg $file -y -qscale 8 -bf 3 -ps 200 -f pgmyuv -i $raw_src -an -vcodec mpeg1video -f mpeg1video $file
395 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
398 ###################################
399 if [ -n "$do_mjpeg" ] ; then
401 file=${outfile}mjpeg.avi
402 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mjpeg -pix_fmt yuvj420p $file
405 do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
408 ###################################
409 if [ -n "$do_ljpeg" ] ; then
411 file=${outfile}ljpeg.avi
412 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec ljpeg -strict -1 $file
415 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
418 ###################################
419 if [ -n "$do_jpegls" ] ; then
421 file=${outfile}jpegls.avi
422 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec jpegls -vtag MJPG $file
425 do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
428 ###################################
429 if [ -n "$do_rv10" ] ; then
431 file=${outfile}rv10.rm
432 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an $file
435 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
438 ###################################
439 if [ -n "$do_rv20" ] ; then
441 file=${outfile}rv20.rm
442 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec rv20 -an $file
445 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
448 ###################################
449 if [ -n "$do_asv1" ] ; then
451 file=${outfile}asv1.avi
452 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec asv1 $file
455 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
458 ###################################
459 if [ -n "$do_asv2" ] ; then
461 file=${outfile}asv2.avi
462 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec asv2 $file
465 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
468 ###################################
469 if [ -n "$do_flv" ] ; then
471 file=${outfile}flv.flv
472 do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec flv $file
475 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
478 ###################################
479 if [ -n "$do_ffv1" ] ; then
481 file=${outfile}ffv1.avi
482 do_ffmpeg $file -y -strict -2 -f pgmyuv -i $raw_src -an -vcodec ffv1 $file
485 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
488 ###################################
489 if [ -n "$do_snow" ] ; then
491 file=${outfile}snow.avi
492 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
495 do_ffmpeg $raw_dst -y -i $file -f rawvideo -s 352x288 $raw_dst
498 ###################################
499 if [ -n "$do_snowll" ] ; then
501 file=${outfile}snow53.avi
502 do_ffmpeg $file -y -strict -2 -f pgmyuv -i $raw_src -an -vcodec snow -qscale .001 -pred 1 -flags +mv4+qpel $file
505 do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
508 ###################################
509 if [ -n "$do_dv" ] ; then
512 do_ffmpeg $file -dct int -y -f pgmyuv -i $raw_src -s pal -an $file
515 do_ffmpeg $raw_dst -y -i $file -f rawvideo -s cif $raw_dst
518 ###################################
519 if [ -n "$do_dv50" ] ; then
522 do_ffmpeg $file -dct int -y -f pgmyuv -i $raw_src -s pal -pix_fmt yuv422p -an $file
525 do_ffmpeg $raw_dst -y -i $file -f rawvideo -s cif -pix_fmt yuv420p $raw_dst
529 ###################################
530 if [ -n "$do_svq1" ] ; then
532 file=${outfile}svq1.mov
533 do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec svq1 -qscale 3 -pix_fmt yuv410p $file
536 do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
539 ###################################
540 if [ -n "$do_mp2" ] ; then
542 file=${outfile}mp2.mp2
543 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src $file
546 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
547 $tiny_psnr $pcm_dst $pcm_ref 2 1924 >> $logfile
550 ###################################
551 if [ -n "$do_ac3" ] ; then
553 file=${outfile}ac3.rm
554 do_ffmpeg $file -y -ab 128 -ac 2 -f s16le -i $pcm_src -vn $file
557 #do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
560 ###################################
561 if [ -n "$do_g726" ] ; then
563 file=${outfile}g726.wav
564 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -ab 32 -ac 1 -ar 8000 -acodec g726 $file
567 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
570 ###################################
571 if [ -n "$do_adpcm_ima_wav" ] ; then
573 file=${outfile}adpcm_ima.wav
574 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec adpcm_ima_wav $file
577 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
580 ###################################
581 if [ -n "$do_adpcm_ms" ] ; then
583 file=${outfile}adpcm_ms.wav
584 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec adpcm_ms $file
587 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
590 ###################################
591 if [ -n "$do_adpcm_yam" ] ; then
593 file=${outfile}adpcm_yam.wav
594 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec adpcm_yamaha $file
597 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
600 ###################################
601 if [ -n "$do_flac" ] ; then
603 file=${outfile}flac.flac
604 do_ffmpeg $file -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -acodec flac -compression_level 2 $file
607 do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
610 ###################################
612 ###################################
614 if [ -n "$do_libav" ] ; then
617 file=${outfile}libav.avi
618 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
619 do_ffmpeg_crc $file -i $file
622 file=${outfile}libav.asf
623 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
624 do_ffmpeg_crc $file -i $file -r 25
627 file=${outfile}libav.rm
628 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
630 #do_ffmpeg_crc $file -i $file
633 file=${outfile}libav.mpg
634 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
635 do_ffmpeg_crc $file -i $file
638 file=${outfile}libav.ts
639 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
640 do_ffmpeg_crc $file -i $file
642 # swf (decode audio only)
643 file=${outfile}libav.swf
644 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
645 do_ffmpeg_crc $file -i $file
648 file=${outfile}libav.ffm
649 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
650 do_ffmpeg_crc $file -i $file
653 file=${outfile}libav.flv
654 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -an $file
655 do_ffmpeg_crc $file -i $file
658 file=${outfile}libav.mov
659 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec pcm_alaw $file
660 do_ffmpeg_crc $file -i $file
663 file=${outfile}libav.nut
664 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -acodec mp2 $file
665 do_ffmpeg_crc $file -i $file
668 file=${outfile}libav.dv
669 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
670 do_ffmpeg_crc $file -i $file
673 file=${outfile}libav.gxf
674 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
675 do_ffmpeg_crc $file -i $file
680 #file=${outfile}libav.mjpeg
681 #do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
682 #do_ffmpeg_crc $file -i $file
685 file=${outfile}libav.pbm
686 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
687 do_ffmpeg_crc $file -f image2pipe -i $file
690 file=${outfile}libav.pgm
691 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
692 do_ffmpeg_crc $file -f image2pipe -i $file
695 file=${outfile}libav.ppm
696 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
697 do_ffmpeg_crc $file -f image2pipe -i $file
700 file=${outfile}libav.gif
701 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -pix_fmt rgb24 $file
702 #do_ffmpeg_crc $file -i $file
705 file=${outfile}libav.y4m
706 do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
707 #do_ffmpeg_crc $file -i $file
711 # pgm (we do not do md5 on image files yet)
712 file=${outfile}libav%02d.pgm
713 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src $file
714 do_ffmpeg_crc $file -i $file
716 # ppm (we do not do md5 on image files yet)
717 file=${outfile}libav%02d.ppm
718 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src $file
719 do_ffmpeg_crc $file -i $file
721 # jpeg (we do not do md5 on image files yet)
722 file=${outfile}libav%02d.jpg
723 $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src -flags +bitexact -dct fastint -idct simple -pix_fmt yuvj420p -f image2 $file
724 do_ffmpeg_crc $file -f image2 -i $file
730 file=${outfile}libav.wav
731 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
732 do_ffmpeg_crc $file -i $file
735 file=${outfile}libav.al
736 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
737 do_ffmpeg_crc $file -i $file
740 file=${outfile}libav.ul
741 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
742 do_ffmpeg_crc $file -i $file
745 file=${outfile}libav.au
746 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
747 do_ffmpeg_crc $file -i $file
750 file=${outfile}libav.mmf
751 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
752 do_ffmpeg_crc $file -i $file
755 file=${outfile}libav.aif
756 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
757 do_ffmpeg_crc $file -i $file
760 file=${outfile}libav.voc
761 do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
762 do_ffmpeg_crc $file -i $file
765 # pix_fmt conversions
766 conversions="yuv420p yuv422p yuv444p yuv422 yuv410p yuv411p yuvj420p \
767 yuvj422p yuvj444p rgb24 bgr24 rgba32 rgb565 rgb555 gray monow \
769 for pix_fmt in $conversions ; do
770 file=${outfile}libav-${pix_fmt}.yuv
771 do_ffmpeg_nocheck $file -r 1 -t 1 -y -f pgmyuv -i $raw_src \
772 -f rawvideo -s 352x288 -pix_fmt $pix_fmt $raw_dst
773 do_ffmpeg $file -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $raw_dst \
774 -f rawvideo -s 352x288 -pix_fmt yuv444p $file
781 if $diff_cmd "$logfile" "$reffile" ; then
783 echo Regression test succeeded.
787 echo Regression test: Error.