Statistics
| Branch: | Revision:

ffmpeg / tests / regression.sh @ 45ddd8b0

History | View | Annotate | Download (15.7 KB)

1
#!/bin/sh
2
#
3
# automatic regression test for ffmpeg
4
#
5
#
6
#set -x
7
# Even in the 21st century some diffs do not support -u.
8
diff -u "$0" "$0" > /dev/null 2>&1
9
if [ $? -eq 0 ]; then
10
  diff_cmd="diff -u"
11
else
12
  diff_cmd="diff"
13
fi
14

    
15
diff -w "$0" "$0" > /dev/null 2>&1
16
if [ $? -eq 0 ]; then
17
  diff_cmd="$diff_cmd -w"
18
fi
19

    
20
set -e
21

    
22
datadir="./data"
23

    
24
logfile="$datadir/ffmpeg.regression"
25
outfile="$datadir/a-"
26

    
27
# tests to run
28
if [ "$1" = "mpeg4" ] ; then
29
    do_mpeg4=y
30
elif [ "$1" = "mpeg" ] ; then
31
    do_mpeg=y
32
    do_mpeg2=y
33
elif [ "$1" = "ac3" ] ; then
34
    do_ac3=y
35
elif [ "$1" = "huffyuv" ] ; then
36
    do_huffyuv=y
37
elif [ "$1" = "mpeg2thread" ] ; then
38
    do_mpeg2thread=y
39
elif [ "$1" = "snow" ] ; then
40
    do_snow=y
41
elif [ "$1" = "snowll" ] ; then
42
    do_snowll=y
43
elif [ "$1" = "libavtest" ] ; then
44
    do_libav=y
45
    logfile="$datadir/libav.regression"
46
    outfile="$datadir/b-"
47
else
48
    do_mpeg=y
49
    do_mpeg2=y
50
    do_mpeg2thread=y
51
    do_msmpeg4v2=y
52
    do_msmpeg4=y
53
    do_wmv1=y
54
    do_wmv2=y
55
    do_h261=y
56
    do_h263=y
57
    do_h263p=y
58
    do_mpeg4=y
59
    do_mp4psp=y
60
    do_huffyuv=y
61
    do_mjpeg=y
62
    do_ljpeg=y
63
    do_jpegls=y
64
    do_rv10=y
65
    do_rv20=y
66
    do_mp2=y
67
    do_ac3=y
68
    do_g726=y
69
    do_adpcm_ima_wav=y
70
    do_adpcm_ms=y
71
    do_flac=y
72
    do_rc=y
73
    do_mpeg4adv=y
74
    do_mpeg4thread=y
75
    do_mpeg4nr=y
76
    do_mpeg1b=y
77
    do_asv1=y
78
    do_asv2=y
79
    do_flv=y
80
    do_ffv1=y
81
    do_error=y
82
    do_svq1=y
83
    do_snow=y
84
    do_snowll=y
85
    do_adpcm_yam=y
86
    do_dv=y
87
    do_dv50=y
88
fi
89

    
90

    
91
# various files
92
ffmpeg="../ffmpeg_g"
93
tiny_psnr="./tiny_psnr"
94
reffile="$2"
95
benchfile="$datadir/ffmpeg.bench"
96
bench="$datadir/bench.tmp"
97
bench2="$datadir/bench2.tmp"
98
raw_src="$3/%02d.pgm"
99
raw_dst="$datadir/out.yuv"
100
raw_ref="$datadir/ref.yuv"
101
pcm_src="asynth1.sw"
102
pcm_dst="$datadir/out.wav"
103
pcm_ref="$datadir/ref.wav"
104
if [ X"`echo | md5sum 2> /dev/null`" != X ]; then
105
    do_md5sum() { md5sum -b $1; }
106
elif [ -x /sbin/md5 ]; then
107
    do_md5sum() { /sbin/md5 -r $1 | sed 's# \**\./# *./#'; }
108
else
109
    do_md5sum() { echo No md5sum program found; }
110
fi
111

    
112
# create the data directory if it does not exist
113
mkdir -p $datadir
114

    
115
FFMPEG_OPTS="-y -flags +bitexact -dct fastint -idct simple"
116

    
117
do_ffmpeg()
118
{
119
    f="$1"
120
    shift
121
    echo $ffmpeg $FFMPEG_OPTS $*
122
    $ffmpeg $FFMPEG_OPTS -benchmark $* > $bench 2> /tmp/ffmpeg$$
123
    egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:)" /tmp/ffmpeg$$ || true
124
    rm -f /tmp/ffmpeg$$
125
    do_md5sum $f >> $logfile
126
    if [ $f = $raw_dst ] ; then
127
        $tiny_psnr $f $raw_ref >> $logfile
128
    elif [ $f = $pcm_dst ] ; then
129
        $tiny_psnr $f $pcm_ref 2 >> $logfile
130
    else
131
        wc -c $f >> $logfile
132
    fi
133
    expr "`cat $bench`" : '.*utime=\(.*s\)' > $bench2
134
    echo `cat $bench2` $f >> $benchfile
135
}
136

    
137
do_ffmpeg_crc()
138
{
139
    f="$1"
140
    shift
141
    echo $ffmpeg $FFMPEG_OPTS $* -f crc $datadir/ffmpeg.crc
142
    $ffmpeg $FFMPEG_OPTS $* -f crc $datadir/ffmpeg.crc > /tmp/ffmpeg$$ 2>&1
143
    egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:|ffmpeg version|  configuration|  built)" /tmp/ffmpeg$$ || true
144
    rm -f /tmp/ffmpeg$$
145
    echo "$f `cat $datadir/ffmpeg.crc`" >> $logfile
146
}
147

    
148
do_ffmpeg_nocheck()
149
{
150
    f="$1"
151
    shift
152
    echo $ffmpeg $FFMPEG_OPTS $*
153
    $ffmpeg $FFMPEG_OPTS -benchmark $* > $bench 2> /tmp/ffmpeg$$
154
    egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:)" /tmp/ffmpeg$$ || true
155
    rm -f /tmp/ffmpeg$$
156
    expr "`cat $bench`" : '.*utime=\(.*s\)' > $bench2
157
    echo `cat $bench2` $f >> $benchfile
158
}
159

    
160
do_video_decoding()
161
{
162
    do_ffmpeg $raw_dst -y $1 -i $file -f rawvideo $2 $raw_dst
163
}
164

    
165
do_video_encoding()
166
{
167
    file=${outfile}$1
168
    do_ffmpeg $file -y $2 -f $3 -i $raw_src $4 $file
169
}
170

    
171
do_audio_encoding()
172
{
173
    file=${outfile}$1
174
    do_ffmpeg $file -y -ab 128 -ac 2 -f s16le -i $pcm_src $3 $file
175
}
176

    
177
do_audio_decoding()
178
{
179
    do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
180
}
181

    
182
do_libav()
183
{
184
    file=${outfile}libav.$1
185
    do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $2 $file
186
    do_ffmpeg_crc $file -i $file $3
187

    
188
}
189

    
190
do_streamed_images()
191
{
192
    file=${outfile}libav.$1
193
    do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
194
    do_ffmpeg_crc $file -f image2pipe -i $file
195
}
196

    
197
do_image_formats()
198
{
199
    file=${outfile}libav%02d.$1
200
    $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src $2 $3 $file
201
    do_ffmpeg_crc $file $3 -i $file
202

    
203
}
204

    
205
do_audio_only()
206
{
207
    file=${outfile}libav.$1
208
    do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
209
    do_ffmpeg_crc $file -i $file
210
}
211

    
212
echo "ffmpeg regression test" > $logfile
213
echo "ffmpeg benchmarks" > $benchfile
214

    
215
###################################
216
# generate reference for quality check
217
do_ffmpeg_nocheck $raw_ref -y -f pgmyuv -i $raw_src -an -f rawvideo $raw_ref
218
do_ffmpeg_nocheck $pcm_ref -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav $pcm_ref
219

    
220
###################################
221
if [ -n "$do_mpeg" ] ; then
222
# mpeg1
223
do_video_encoding mpeg1.mpg "-qscale 10" pgmyuv "-f mpeg1video"
224
do_video_decoding
225
fi
226

    
227
###################################
228
if [ -n "$do_mpeg2" ] ; then
229
# mpeg2
230
do_video_encoding mpeg2.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -f mpeg1video"
231
do_video_decoding
232

    
233
# mpeg2 encoding intra vlc qprd
234
do_video_encoding mpeg2ivlc-qprd.mpg "-b 500k -bf 2 -flags +trell+qprd+mv0 -flags2 +ivlc -cmp 2 -subcmp 2 -mbd rd" pgmyuv "-vcodec mpeg2video -f mpeg2video"
235

    
236
# mpeg2 decoding
237
do_video_decoding
238

    
239
# mpeg2
240
do_video_encoding mpeg2.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -idct int -dct int -f mpeg1video"
241
do_video_decoding "-idct int"
242

    
243
# mpeg2 encoding interlaced
244
do_video_encoding mpeg2i.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -f mpeg1video -flags +ildct+ilme"
245

    
246
# mpeg2 decoding
247
do_video_decoding
248
fi
249

    
250
###################################
251
if [ -n "$do_mpeg2thread" ] ; then
252
# mpeg2 encoding interlaced
253
do_video_encoding mpeg2thread.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 2"
254

    
255
# mpeg2 decoding
256
do_video_decoding
257

    
258
# mpeg2 encoding interlaced using intra vlc
259
do_video_encoding mpeg2threadivlc.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -flags2 +ivlc -threads 2"
260

    
261
# mpeg2 decoding
262
do_video_decoding
263

    
264
# mpeg2 encoding interlaced
265
file=${outfile}mpeg2reuse.mpg
266
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
267

    
268
# mpeg2 decoding
269
do_video_decoding
270
fi
271

    
272
###################################
273
if [ -n "$do_msmpeg4v2" ] ; then
274
# msmpeg4
275
do_video_encoding msmpeg4v2.avi "-qscale 10" pgmyuv "-an -vcodec msmpeg4v2"
276
do_video_decoding
277
fi
278

    
279
###################################
280
if [ -n "$do_msmpeg4" ] ; then
281
# msmpeg4
282
do_video_encoding msmpeg4.avi "-qscale 10" pgmyuv "-an -vcodec msmpeg4"
283
do_video_decoding
284
fi
285

    
286
###################################
287
if [ -n "$do_wmv1" ] ; then
288
# wmv1
289
do_video_encoding wmv1.avi "-qscale 10" pgmyuv "-an -vcodec wmv1"
290
do_video_decoding
291
fi
292

    
293
###################################
294
if [ -n "$do_wmv2" ] ; then
295
# wmv2
296
do_video_encoding wmv2.avi "-qscale 10" pgmyuv "-an -vcodec wmv2"
297
do_video_decoding
298
fi
299

    
300
###################################
301
if [ -n "$do_h261" ] ; then
302
# h261
303
do_video_encoding h261.avi "-qscale 11" pgmyuv "-s 352x288 -an -vcodec h261"
304
do_video_decoding
305
fi
306

    
307
###################################
308
if [ -n "$do_h263" ] ; then
309
# h263
310
do_video_encoding h263.avi "-qscale 10" pgmyuv "-s 352x288 -an -vcodec h263"
311
do_video_decoding
312
fi
313

    
314
###################################
315
if [ -n "$do_h263p" ] ; then
316
# h263p
317
do_video_encoding h263p.avi "-qscale 2 -flags +umv+aiv+aic" pgmyuv "-s 352x288 -an -vcodec h263p -ps 300"
318
do_video_decoding
319
fi
320

    
321
###################################
322
if [ -n "$do_mpeg4" ] ; then
323
# mpeg4
324
do_video_encoding odivx.mp4 "-flags +mv4 -mbd bits -qscale 10" pgmyuv "-an -vcodec mpeg4"
325
do_video_decoding
326
fi
327

    
328
###################################
329
if [ -n "$do_huffyuv" ] ; then
330
# huffyuv
331
do_video_encoding huffyuv.avi "" pgmyuv "-an -vcodec huffyuv -pix_fmt yuv422p"
332
do_video_decoding "" "-strict -2 -pix_fmt yuv420p"
333
fi
334

    
335
###################################
336
if [ -n "$do_rc" ] ; then
337
# mpeg4 rate control
338
do_video_encoding mpeg4-rc.avi "-b 400k -bf 2" pgmyuv "-an -vcodec mpeg4"
339
do_video_decoding
340
fi
341

    
342
###################################
343
if [ -n "$do_mpeg4adv" ] ; then
344
# mpeg4
345
do_video_encoding mpeg4-adv.avi "-qscale 9 -flags +mv4+part+aic+trell -mbd bits -ps 200" pgmyuv "-an -vcodec mpeg4"
346
do_video_decoding
347

    
348
# mpeg4
349
do_video_encoding mpeg4-qprd.avi "-b 450k -bf 2 -flags +mv4+trell+qprd+mv0 -cmp 2 -subcmp 2 -mbd rd" pgmyuv "-an -vcodec mpeg4"
350
do_video_decoding
351

    
352
# mpeg4
353
do_video_encoding mpeg4-adap.avi "-b 550k -bf 2 -flags +mv4+trell+mv0 -cmp 1 -subcmp 2 -mbd rd -scplx_mask 0.3" pgmyuv "-an -vcodec mpeg4"
354
do_video_decoding
355

    
356
# mpeg4
357
do_video_encoding mpeg4-Q.avi "-qscale 7 -flags +mv4+qpel -mbd 2 -bf 2 -cmp 1 -subcmp 2" pgmyuv "-an -vcodec mpeg4"
358
do_video_decoding
359
fi
360

    
361
###################################
362
if [ -n "$do_mpeg4thread" ] ; then
363
# mpeg4
364
do_video_encoding mpeg4-thread.avi "-b 500k -flags +mv4+part+aic+trell -mbd bits -ps 200 -bf 2" pgmyuv "-an -vcodec mpeg4 -threads 2"
365
do_video_decoding
366
fi
367

    
368
###################################
369
if [ -n "$do_mp4psp" ] ; then
370
# mp4 PSP style
371
do_video_encoding mpeg4-PSP.mp4 "-b 768k -s 320x240" psp "-ar 24000 -ab 32 -i $raw_src"
372
fi
373

    
374
###################################
375
if [ -n "$do_error" ] ; then
376
# damaged mpeg4
377
do_video_encoding error-mpeg4-adv.avi "-qscale 7 -flags +mv4+part+aic -mbd rd -ps 250 -error 10" pgmyuv "-an -vcodec mpeg4"
378
do_video_decoding
379
fi
380

    
381
###################################
382
if [ -n "$do_mpeg4nr" ] ; then
383
# noise reduction
384
do_video_encoding mpeg4-nr.avi "-qscale 8 -flags +mv4 -mbd rd -nr 200" pgmyuv "-an -vcodec mpeg4"
385
do_video_decoding
386
fi
387

    
388
###################################
389
if [ -n "$do_mpeg1b" ] ; then
390
# mpeg1
391
do_video_encoding mpeg1b.mpg "-qscale 8 -bf 3 -ps 200" pgmyuv "-an -vcodec mpeg1video -f mpeg1video"
392
do_video_decoding
393
fi
394

    
395
###################################
396
if [ -n "$do_mjpeg" ] ; then
397
# mjpeg
398
do_video_encoding mjpeg.avi "-qscale 10" pgmyuv "-an -vcodec mjpeg -pix_fmt yuvj420p"
399
do_video_decoding "" "-pix_fmt yuv420p"
400
fi
401

    
402
###################################
403
if [ -n "$do_ljpeg" ] ; then
404
# ljpeg
405
do_video_encoding ljpeg.avi "" pgmyuv "-an -vcodec ljpeg -strict -1"
406
do_video_decoding
407
fi
408

    
409
###################################
410
if [ -n "$do_jpegls" ] ; then
411
# jpeg ls
412
do_video_encoding jpegls.avi "" pgmyuv "-an -vcodec jpegls -vtag MJPG"
413
do_video_decoding "" "-pix_fmt yuv420p"
414
fi
415

    
416
###################################
417
if [ -n "$do_rv10" ] ; then
418
# rv10 encoding
419
do_video_encoding rv10.rm "-qscale 10" pgmyuv "-an"
420
do_video_decoding
421
fi
422

    
423
###################################
424
if [ -n "$do_rv20" ] ; then
425
# rv20 encoding
426
do_video_encoding rv20.rm "-qscale 10" pgmyuv "-vcodec rv20 -an"
427
do_video_decoding
428
fi
429

    
430
###################################
431
if [ -n "$do_asv1" ] ; then
432
# asv1 encoding
433
do_video_encoding asv1.avi "-qscale 10" pgmyuv "-an -vcodec asv1"
434
do_video_decoding
435
fi
436

    
437
###################################
438
if [ -n "$do_asv2" ] ; then
439
# asv2 encoding
440
do_video_encoding asv2.avi "-qscale 10" pgmyuv "-an -vcodec asv2"
441
do_video_decoding
442
fi
443

    
444
###################################
445
if [ -n "$do_flv" ] ; then
446
# flv encoding
447
do_video_encoding flv.flv "-qscale 10" pgmyuv "-an -vcodec flv"
448
do_video_decoding
449
fi
450

    
451
###################################
452
if [ -n "$do_ffv1" ] ; then
453
# ffv1 encoding
454
do_video_encoding ffv1.avi "-strict -2" pgmyuv "-an -vcodec ffv1"
455
do_video_decoding
456
fi
457

    
458
###################################
459
if [ -n "$do_snow" ] ; then
460
# snow
461
do_video_encoding snow.avi "-strict -2" pgmyuv "-an -vcodec snow -qscale 2 -flags +qpel -me iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64"
462
do_video_decoding "" "-s 352x288"
463
fi
464

    
465
###################################
466
if [ -n "$do_snowll" ] ; then
467
# snow
468
do_video_encoding snow53.avi "-strict -2" pgmyuv "-an -vcodec snow -qscale .001 -pred 1 -flags +mv4+qpel"
469
do_video_decoding
470
fi
471

    
472
###################################
473
if [ -n "$do_dv" ] ; then
474
# dv
475
do_video_encoding dv.dv "-dct int" pgmyuv "-s pal -an"
476
do_video_decoding "" "-s cif"
477
fi
478

    
479
###################################
480
if [ -n "$do_dv50" ] ; then
481
# dv50
482
do_video_encoding dv.dv "-dct int" pgmyuv "-s pal -pix_fmt yuv422p -an"
483
do_video_decoding "" "-s cif -pix_fmt yuv420p"
484
fi
485

    
486

    
487
###################################
488
if [ -n "$do_svq1" ] ; then
489
# svq1
490
do_video_encoding svq1.mov "" pgmyuv "-an -vcodec svq1 -qscale 3 -pix_fmt yuv410p"
491
do_video_decoding "" "-pix_fmt yuv420p"
492
fi
493

    
494
###################################
495
if [ -n "$do_mp2" ] ; then
496
# mp2
497
do_audio_encoding mp2.mp2 "-ar 44100"
498
do_audio_decoding
499
$tiny_psnr $pcm_dst $pcm_ref 2 1924 >> $logfile
500
fi
501

    
502
###################################
503
if [ -n "$do_ac3" ] ; then
504
# ac3
505
do_audio_encoding ac3.rm "" -vn
506
#do_audio_decoding
507
fi
508

    
509
###################################
510
if [ -n "$do_g726" ] ; then
511
# g726
512
do_audio_encoding g726.wav "-ar 44100" "-ab 32 -ac 1 -ar 8000 -acodec g726"
513
do_audio_decoding
514
fi
515

    
516
###################################
517
if [ -n "$do_adpcm_ima_wav" ] ; then
518
# adpcm ima
519
do_audio_encoding adpcm_ima.wav "-ar 44100" "-acodec adpcm_ima_wav"
520
do_audio_decoding
521
fi
522

    
523
###################################
524
if [ -n "$do_adpcm_ms" ] ; then
525
# adpcm ms
526
do_audio_encoding adpcm_ms.wav "-ar 44100" "-acodec adpcm_ms"
527
do_audio_decoding
528
fi
529

    
530
###################################
531
if [ -n "$do_adpcm_yam" ] ; then
532
# adpcm yamaha
533
do_audio_encoding adpcm_yam.wav "-ar 44100" "-acodec adpcm_yamaha"
534
do_audio_decoding
535
fi
536

    
537
###################################
538
if [ -n "$do_flac" ] ; then
539
# flac
540
do_audio_encoding flac.flac "-ar 44100" "-acodec flac -compression_level 2"
541
do_audio_decoding
542
fi
543

    
544
###################################
545
# libav testing
546
###################################
547

    
548
if [ -n "$do_libav" ] ; then
549

    
550
# avi
551
do_libav avi
552

    
553
# asf
554
do_libav asf "-acodec mp2" "-r 25"
555

    
556
# rm
557
file=${outfile}libav.rm
558
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
559
# broken
560
#do_ffmpeg_crc $file -i $file
561

    
562
# mpegps
563
do_libav mpg
564

    
565
# mpegts
566
do_libav ts
567

    
568
# swf
569
do_libav swf -an
570

    
571
# ffm
572
do_libav ffm
573

    
574
# flv
575
do_libav flv -an
576

    
577
# mov
578
do_libav mov "-acodec pcm_alaw"
579

    
580
# nut
581
#do_libav nut "-acodec mp2"
582

    
583
# dv
584
do_libav dv "-ar 48000 -r 25 -s pal -ac 2"
585

    
586
# gxf
587
do_libav gxf "-ar 48000 -r 25 -s pal -ac 1"
588

    
589
####################
590
# streamed images
591
# mjpeg
592
#file=${outfile}libav.mjpeg
593
#do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
594
#do_ffmpeg_crc $file -i $file
595

    
596
# pbmpipe
597
do_streamed_images pbm
598

    
599
# pgmpipe
600
do_streamed_images pgm
601

    
602
# ppmpipe
603
do_streamed_images ppm
604

    
605
# gif
606
file=${outfile}libav.gif
607
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -pix_fmt rgb24 $file
608
#do_ffmpeg_crc $file -i $file
609

    
610
# yuv4mpeg
611
file=${outfile}libav.y4m
612
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
613
#do_ffmpeg_crc $file -i $file
614

    
615
####################
616
# image formats
617
# pgm (we do not do md5 on image files yet)
618
do_image_formats pgm
619

    
620
# ppm (we do not do md5 on image files yet)
621
do_image_formats ppm
622

    
623
# jpeg (we do not do md5 on image files yet)
624
do_image_formats jpg "-flags +bitexact -dct fastint -idct simple -pix_fmt yuvj420p" "-f image2"
625

    
626
####################
627
# audio only
628

    
629
# wav
630
do_audio_only wav
631

    
632
# alaw
633
do_audio_only al
634

    
635
# mulaw
636
do_audio_only ul
637

    
638
# au
639
do_audio_only au
640

    
641
# mmf
642
do_audio_only mmf
643

    
644
# aiff
645
do_audio_only aif
646

    
647
# voc
648
do_audio_only voc
649

    
650
####################
651
# pix_fmt conversions
652
conversions="yuv420p yuv422p yuv444p yuv422 yuv410p yuv411p yuvj420p \
653
             yuvj422p yuvj444p rgb24 bgr24 rgba32 rgb565 rgb555 gray monow \
654
             monob pal8"
655
for pix_fmt in $conversions ; do
656
    file=${outfile}libav-${pix_fmt}.yuv
657
    do_ffmpeg_nocheck $file -r 1 -t 1 -y -f pgmyuv -i $raw_src \
658
                            -f rawvideo -s 352x288 -pix_fmt $pix_fmt $raw_dst
659
    do_ffmpeg $file -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $raw_dst \
660
                    -f rawvideo -s 352x288 -pix_fmt yuv444p $file
661
done
662

    
663
fi
664

    
665

    
666

    
667
if $diff_cmd "$logfile" "$reffile" ; then
668
    echo
669
    echo Regression test succeeded.
670
    exit 0
671
else
672
    echo
673
    echo Regression test: Error.
674
    exit 1
675
fi