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