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