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