Statistics
| Branch: | Revision:

ffmpeg / tests / regression.sh @ 9dc92a38

History | View | Annotate | Download (14.8 KB)

1
#!/bin/sh
2
#
3
# automatic regression test for ffmpeg
4
#
5
#
6
#set -x
7

    
8
set -e
9

    
10
datadir="./tests/data"
11

    
12
test="${1#regtest-}"
13
this="$test.$2"
14
logfile="$datadir/$this.regression"
15
outfile="$datadir/$4-"
16

    
17
eval do_$test=y
18

    
19
# various files
20
ffmpeg="./ffmpeg_g"
21
tiny_psnr="tests/tiny_psnr"
22
benchfile="$datadir/$this.bench"
23
bench="$datadir/$this.bench.tmp"
24
bench2="$datadir/$this.bench2.tmp"
25
raw_src="$3/%02d.pgm"
26
raw_dst="$datadir/$this.out.yuv"
27
raw_ref="$datadir/$2.ref.yuv"
28
pcm_src="tests/asynth1.sw"
29
pcm_dst="$datadir/$this.out.wav"
30
pcm_ref="$datadir/$2.ref.wav"
31
crcfile="$datadir/$this.crc"
32

    
33
if [ X"`echo | md5sum 2> /dev/null`" != X ]; then
34
    do_md5sum() { md5sum -b $1; }
35
elif [ -x /sbin/md5 ]; then
36
    do_md5sum() { /sbin/md5 -r $1 | sed 's# \**\./# *./#'; }
37
else
38
    do_md5sum() { echo No md5sum program found; }
39
fi
40

    
41
# create the data directory if it does not exist
42
mkdir -p $datadir
43

    
44
FFMPEG_OPTS="-y -flags +bitexact -dct fastint -idct simple"
45

    
46
do_ffmpeg()
47
{
48
    f="$1"
49
    shift
50
    echo $ffmpeg $FFMPEG_OPTS $*
51
    $ffmpeg $FFMPEG_OPTS -benchmark $* > $bench 2> /tmp/ffmpeg$$
52
    egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:)" /tmp/ffmpeg$$ || true
53
    rm -f /tmp/ffmpeg$$
54
    do_md5sum $f >> $logfile
55
    if [ $f = $raw_dst ] ; then
56
        $tiny_psnr $f $raw_ref >> $logfile
57
    elif [ $f = $pcm_dst ] ; then
58
        $tiny_psnr $f $pcm_ref 2 >> $logfile
59
    else
60
        wc -c $f >> $logfile
61
    fi
62
    expr "`cat $bench`" : '.*utime=\(.*s\)' > $bench2
63
    echo `cat $bench2` $f >> $benchfile
64
}
65

    
66
do_ffmpeg_nomd5()
67
{
68
    f="$1"
69
    shift
70
    echo $ffmpeg $FFMPEG_OPTS $*
71
    $ffmpeg $FFMPEG_OPTS -benchmark $* > $bench 2> /tmp/ffmpeg$$
72
    egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:)" /tmp/ffmpeg$$ || true
73
    rm -f /tmp/ffmpeg$$
74
    if [ $f = $raw_dst ] ; then
75
        $tiny_psnr $f $raw_ref >> $logfile
76
    elif [ $f = $pcm_dst ] ; then
77
        $tiny_psnr $f $pcm_ref 2 >> $logfile
78
    else
79
        wc -c $f >> $logfile
80
    fi
81
    expr "`cat $bench`" : '.*utime=\(.*s\)' > $bench2
82
    echo `cat $bench2` $f >> $benchfile
83
}
84

    
85
do_ffmpeg_crc()
86
{
87
    f="$1"
88
    shift
89
    echo $ffmpeg $FFMPEG_OPTS $* -f crc "$crcfile"
90
    $ffmpeg $FFMPEG_OPTS $* -f crc "$crcfile" > /tmp/ffmpeg$$ 2>&1
91
    egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:|ffmpeg version|  configuration|  built)" /tmp/ffmpeg$$ || true
92
    rm -f /tmp/ffmpeg$$
93
    echo "$f `cat $crcfile`" >> $logfile
94
    rm -f "$crcfile"
95
}
96

    
97
do_ffmpeg_nocheck()
98
{
99
    f="$1"
100
    shift
101
    echo $ffmpeg $FFMPEG_OPTS $*
102
    $ffmpeg $FFMPEG_OPTS -benchmark $* > $bench 2> /tmp/ffmpeg$$
103
    egrep -v "^(Stream|Press|Input|Output|frame|  Stream|  Duration|video:)" /tmp/ffmpeg$$ || true
104
    rm -f /tmp/ffmpeg$$
105
    expr "`cat $bench`" : '.*utime=\(.*s\)' > $bench2
106
    echo `cat $bench2` $f >> $benchfile
107
}
108

    
109
do_video_decoding()
110
{
111
    do_ffmpeg $raw_dst -y $1 -i $file -f rawvideo $2 $raw_dst
112
    rm -f $raw_dst
113
}
114

    
115
do_video_encoding()
116
{
117
    file=${outfile}$1
118
    do_ffmpeg $file -y $2 -f $3 -i $raw_src $4 $file
119
}
120

    
121
do_audio_encoding()
122
{
123
    file=${outfile}$1
124
    do_ffmpeg $file -y -ab 128k -ac 2 -f s16le -i $pcm_src $3 $file
125
}
126

    
127
do_audio_decoding()
128
{
129
    do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
130
}
131

    
132
do_libav()
133
{
134
    file=${outfile}libav.$1
135
    do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $2 $file
136
    do_ffmpeg_crc $file -i $file $3
137

    
138
}
139

    
140
do_streamed_images()
141
{
142
    file=${outfile}${1}pipe.$1
143
    do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
144
    do_ffmpeg_crc $file -f image2pipe -i $file
145
}
146

    
147
do_image_formats()
148
{
149
    file=${outfile}libav%02d.$1
150
    $ffmpeg -t 0.5 -y -qscale 10 -f pgmyuv -i $raw_src $2 $3 -flags +bitexact $file
151
    do_ffmpeg_crc $file $3 -i $file
152
    do_md5sum ${outfile}libav02.$1 >> $logfile
153
}
154

    
155
do_audio_only()
156
{
157
    file=${outfile}libav.$1
158
    do_ffmpeg $file -t 1 -y -qscale 10 -f s16le -i $pcm_src $file
159
    do_ffmpeg_crc $file -i $file
160
}
161

    
162
rm -f "$logfile"
163
rm -f "$benchfile"
164

    
165
# generate reference for quality check
166
if [ -n "$do_ref" ]; then
167
do_ffmpeg_nocheck $raw_ref -y -f pgmyuv -i $raw_src -an -f rawvideo $raw_ref
168
do_ffmpeg_nocheck $pcm_ref -y -ab 128k -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav $pcm_ref
169
fi
170

    
171
if [ -n "$do_mpeg" ] ; then
172
# mpeg1
173
do_video_encoding mpeg1.mpg "-qscale 10" pgmyuv "-f mpeg1video"
174
do_video_decoding
175
fi
176

    
177
if [ -n "$do_mpeg2" ] ; then
178
# mpeg2
179
do_video_encoding mpeg2.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -f mpeg1video"
180
do_video_decoding
181

    
182
# mpeg2 encoding intra vlc qprd
183
do_video_encoding mpeg2ivlc-qprd.mpg "-vb 500k -bf 2 -flags +trell+qprd+mv0 -flags2 +ivlc -cmp 2 -subcmp 2 -mbd rd" pgmyuv "-vcodec mpeg2video -f mpeg2video"
184

    
185
# mpeg2 decoding
186
do_video_decoding
187

    
188
# mpeg2
189
do_video_encoding mpeg2.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -idct int -dct int -f mpeg1video"
190
do_video_decoding "-idct int"
191

    
192
# mpeg2 encoding interlaced
193
do_video_encoding mpeg2i.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -f mpeg1video -flags +ildct+ilme"
194

    
195
# mpeg2 decoding
196
do_video_decoding
197
fi
198

    
199
if [ -n "$do_mpeg2thread" ] ; then
200
# mpeg2 encoding interlaced
201
do_video_encoding mpeg2thread.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 2"
202

    
203
# mpeg2 decoding
204
do_video_decoding
205

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

    
209
# mpeg2 decoding
210
do_video_decoding
211

    
212
# mpeg2 encoding interlaced
213
file=${outfile}mpeg2reuse.mpg
214
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
215

    
216
# mpeg2 decoding
217
do_video_decoding
218
fi
219

    
220
if [ -n "$do_msmpeg4v2" ] ; then
221
do_video_encoding msmpeg4v2.avi "-qscale 10" pgmyuv "-an -vcodec msmpeg4v2"
222
do_video_decoding
223
fi
224

    
225
if [ -n "$do_msmpeg4" ] ; then
226
do_video_encoding msmpeg4.avi "-qscale 10" pgmyuv "-an -vcodec msmpeg4"
227
do_video_decoding
228
fi
229

    
230
if [ -n "$do_wmv1" ] ; then
231
do_video_encoding wmv1.avi "-qscale 10" pgmyuv "-an -vcodec wmv1"
232
do_video_decoding
233
fi
234

    
235
if [ -n "$do_wmv2" ] ; then
236
do_video_encoding wmv2.avi "-qscale 10" pgmyuv "-an -vcodec wmv2"
237
do_video_decoding
238
fi
239

    
240
if [ -n "$do_h261" ] ; then
241
do_video_encoding h261.avi "-qscale 11" pgmyuv "-s 352x288 -an -vcodec h261"
242
do_video_decoding
243
fi
244

    
245
if [ -n "$do_h263" ] ; then
246
do_video_encoding h263.avi "-qscale 10" pgmyuv "-s 352x288 -an -vcodec h263"
247
do_video_decoding
248
fi
249

    
250
if [ -n "$do_h263p" ] ; then
251
do_video_encoding h263p.avi "-qscale 2 -flags +umv+aiv+aic" pgmyuv "-s 352x288 -an -vcodec h263p -ps 300"
252
do_video_decoding
253
fi
254

    
255
if [ -n "$do_mpeg4" ] ; then
256
do_video_encoding odivx.mp4 "-flags +mv4 -mbd bits -qscale 10" pgmyuv "-an -vcodec mpeg4"
257
do_video_decoding
258
fi
259

    
260
if [ -n "$do_huffyuv" ] ; then
261
do_video_encoding huffyuv.avi "" pgmyuv "-an -vcodec huffyuv -pix_fmt yuv422p"
262
do_video_decoding "" "-strict -2 -pix_fmt yuv420p"
263
fi
264

    
265
if [ -n "$do_rc" ] ; then
266
do_video_encoding mpeg4-rc.avi "-b 400k -bf 2" pgmyuv "-an -vcodec mpeg4"
267
do_video_decoding
268
fi
269

    
270
if [ -n "$do_mpeg4adv" ] ; then
271
do_video_encoding mpeg4-adv.avi "-qscale 9 -flags +mv4+part+aic+trell -mbd bits -ps 200" pgmyuv "-an -vcodec mpeg4"
272
do_video_decoding
273

    
274
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"
275
do_video_decoding
276

    
277
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"
278
do_video_decoding
279

    
280
do_video_encoding mpeg4-Q.avi "-qscale 7 -flags +mv4+qpel -mbd 2 -bf 2 -cmp 1 -subcmp 2" pgmyuv "-an -vcodec mpeg4"
281
do_video_decoding
282
fi
283

    
284
if [ -n "$do_mpeg4thread" ] ; then
285
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"
286
do_video_decoding
287
fi
288

    
289
if [ -n "$do_mp4psp" ] ; then
290
do_video_encoding mpeg4-PSP.mp4 "-vb 768k -s 320x240" psp "-ar 24000 -ab 32k -i $raw_src"
291
fi
292

    
293
if [ -n "$do_error" ] ; then
294
do_video_encoding error-mpeg4-adv.avi "-qscale 7 -flags +mv4+part+aic -mbd rd -ps 250 -error 10" pgmyuv "-an -vcodec mpeg4"
295
do_video_decoding
296
fi
297

    
298
if [ -n "$do_mpeg4nr" ] ; then
299
do_video_encoding mpeg4-nr.avi "-qscale 8 -flags +mv4 -mbd rd -nr 200" pgmyuv "-an -vcodec mpeg4"
300
do_video_decoding
301
fi
302

    
303
if [ -n "$do_mpeg1b" ] ; then
304
do_video_encoding mpeg1b.mpg "-qscale 8 -bf 3 -ps 200" pgmyuv "-an -vcodec mpeg1video -f mpeg1video"
305
do_video_decoding
306
fi
307

    
308
if [ -n "$do_mjpeg" ] ; then
309
do_video_encoding mjpeg.avi "-qscale 10" pgmyuv "-an -vcodec mjpeg -pix_fmt yuvj420p"
310
do_video_decoding "" "-pix_fmt yuv420p"
311
fi
312

    
313
if [ -n "$do_ljpeg" ] ; then
314
do_video_encoding ljpeg.avi "" pgmyuv "-an -vcodec ljpeg -strict -1"
315
do_video_decoding
316
fi
317

    
318
if [ -n "$do_jpegls" ] ; then
319
do_video_encoding jpegls.avi "" pgmyuv "-an -vcodec jpegls -vtag MJPG"
320
do_video_decoding "" "-pix_fmt yuv420p"
321
fi
322

    
323
if [ -n "$do_rv10" ] ; then
324
do_video_encoding rv10.rm "-qscale 10" pgmyuv "-an"
325
do_video_decoding
326
fi
327

    
328
if [ -n "$do_rv20" ] ; then
329
do_video_encoding rv20.rm "-qscale 10" pgmyuv "-vcodec rv20 -an"
330
do_video_decoding
331
fi
332

    
333
if [ -n "$do_asv1" ] ; then
334
do_video_encoding asv1.avi "-qscale 10" pgmyuv "-an -vcodec asv1"
335
do_video_decoding
336
fi
337

    
338
if [ -n "$do_asv2" ] ; then
339
do_video_encoding asv2.avi "-qscale 10" pgmyuv "-an -vcodec asv2"
340
do_video_decoding
341
fi
342

    
343
if [ -n "$do_flv" ] ; then
344
do_video_encoding flv.flv "-qscale 10" pgmyuv "-an -vcodec flv"
345
do_video_decoding
346
fi
347

    
348
if [ -n "$do_ffv1" ] ; then
349
do_video_encoding ffv1.avi "-strict -2" pgmyuv "-an -vcodec ffv1"
350
do_video_decoding
351
fi
352

    
353
if [ -n "$do_snow" ] ; then
354
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"
355
do_video_decoding "" "-s 352x288"
356
fi
357

    
358
if [ -n "$do_snowll" ] ; then
359
do_video_encoding snow53.avi "-strict -2" pgmyuv "-an -vcodec snow -qscale .001 -pred 1 -flags +mv4+qpel"
360
do_video_decoding
361
fi
362

    
363
if [ -n "$do_dv" ] ; then
364
do_video_encoding dv.dv "-dct int" pgmyuv "-s pal -an"
365
do_video_decoding "" "-s cif"
366
fi
367

    
368
if [ -n "$do_dv50" ] ; then
369
do_video_encoding dv50.dv "-dct int" pgmyuv "-s pal -pix_fmt yuv422p -an"
370
do_video_decoding "" "-s cif -pix_fmt yuv420p"
371
fi
372

    
373
if [ -n "$do_svq1" ] ; then
374
do_video_encoding svq1.mov "" pgmyuv "-an -vcodec svq1 -qscale 3 -pix_fmt yuv410p"
375
do_video_decoding "" "-pix_fmt yuv420p"
376
fi
377

    
378
if [ -n "$do_flashsv" ] ; then
379
do_video_encoding flashsv.flv "" pgmyuv "-an -vcodec flashsv "
380
do_video_decoding "" "-pix_fmt yuv420p"
381
fi
382

    
383
if [ -n "$do_mp2" ] ; then
384
do_audio_encoding mp2.mp2 "-ar 44100"
385
do_audio_decoding
386
$tiny_psnr $pcm_dst $pcm_ref 2 1924 >> $logfile
387
fi
388

    
389
if [ -n "$do_ac3" ] ; then
390
do_audio_encoding ac3.rm "" -vn
391
#do_audio_decoding
392
fi
393

    
394
if [ -n "$do_g726" ] ; then
395
do_audio_encoding g726.wav "-ar 44100" "-ab 32k -ac 1 -ar 8000 -acodec g726"
396
do_audio_decoding
397
fi
398

    
399
if [ -n "$do_adpcm_ima_wav" ] ; then
400
do_audio_encoding adpcm_ima.wav "-ar 44100" "-acodec adpcm_ima_wav"
401
do_audio_decoding
402
fi
403

    
404
if [ -n "$do_adpcm_ima_qt" ] ; then
405
do_audio_encoding adpcm_qt.aiff "-ar 44100" "-acodec adpcm_ima_qt"
406
do_audio_decoding
407
fi
408

    
409
if [ -n "$do_adpcm_ms" ] ; then
410
do_audio_encoding adpcm_ms.wav "-ar 44100" "-acodec adpcm_ms"
411
do_audio_decoding
412
fi
413

    
414
if [ -n "$do_adpcm_yam" ] ; then
415
do_audio_encoding adpcm_yam.wav "-ar 44100" "-acodec adpcm_yamaha"
416
do_audio_decoding
417
fi
418

    
419
if [ -n "$do_adpcm_swf" ] ; then
420
do_audio_encoding adpcm_swf.flv "-ar 44100" "-acodec adpcm_swf"
421
do_audio_decoding
422
fi
423

    
424
if [ -n "$do_flac" ] ; then
425
do_audio_encoding flac.flac "-ar 44100" "-acodec flac -compression_level 2"
426
do_audio_decoding
427
fi
428

    
429
if [ -n "$do_wma" ] ; then
430
# wmav1
431
do_audio_encoding wmav1.asf "-ar 44100" "-acodec wmav1"
432
do_ffmpeg_nomd5 $pcm_dst -y -i $file -f wav $pcm_dst
433
$tiny_psnr $pcm_dst $pcm_ref 2 8192 >> $logfile
434
# wmav2
435
do_audio_encoding wmav2.asf "-ar 44100" "-acodec wmav2"
436
do_ffmpeg_nomd5 $pcm_dst -y -i $file -f wav $pcm_dst
437
$tiny_psnr $pcm_dst $pcm_ref 2 8192 >> $logfile
438
fi
439

    
440
#if [ -n "$do_vorbis" ] ; then
441
# vorbis
442
#disabled because it is broken
443
#do_audio_encoding vorbis.asf "-ar 44100" "-acodec vorbis"
444
#do_audio_decoding
445
#fi
446

    
447
# libavformat testing
448

    
449
if [ -n "$do_avi" ] ; then
450
do_libav avi
451
fi
452

    
453
if [ -n "$do_asf" ] ; then
454
do_libav asf "-acodec mp2" "-r 25"
455
fi
456

    
457
if [ -n "$do_rm" ] ; then
458
file=${outfile}libav.rm
459
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
460
# broken
461
#do_ffmpeg_crc $file -i $file
462
fi
463

    
464
if [ -n "$do_mpg" ] ; then
465
do_libav mpg
466
fi
467

    
468
if [ -n "$do_ts" ] ; then
469
do_libav ts
470
fi
471

    
472
if [ -n "$do_swf" ] ; then
473
do_libav swf -an
474
fi
475

    
476
if [ -n "$do_ffm" ] ; then
477
do_libav ffm
478
fi
479

    
480
if [ -n "$do_flv_fmt" ] ; then
481
do_libav flv -an
482
fi
483

    
484
if [ -n "$do_mov" ] ; then
485
do_libav mov "-acodec pcm_alaw"
486
fi
487

    
488
if [ -n "$do_dv_fmt" ] ; then
489
do_libav dv "-ar 48000 -r 25 -s pal -ac 2"
490
fi
491

    
492
if [ -n "$do_gxf" ] ; then
493
do_libav gxf "-ar 48000 -r 25 -s pal -ac 1"
494
fi
495

    
496
if [ -n "$do_nut" ] ; then
497
do_libav nut "-acodec mp2"
498
fi
499

    
500
if [ -n "$do_mkv" ] ; then
501
do_libav mkv
502
fi
503

    
504

    
505
# streamed images
506
# mjpeg
507
#file=${outfile}libav.mjpeg
508
#do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
509
#do_ffmpeg_crc $file -i $file
510

    
511
if [ -n "$do_pbmpipe" ] ; then
512
do_streamed_images pbm
513
fi
514

    
515
if [ -n "$do_pgmpipe" ] ; then
516
do_streamed_images pgm
517
fi
518

    
519
if [ -n "$do_ppmpipe" ] ; then
520
do_streamed_images ppm
521
fi
522

    
523
if [ -n "$do_gif" ] ; then
524
file=${outfile}libav.gif
525
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -pix_fmt rgb24 $file
526
#do_ffmpeg_crc $file -i $file
527
fi
528

    
529
if [ -n "$do_yuv4mpeg" ] ; then
530
file=${outfile}libav.y4m
531
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
532
#do_ffmpeg_crc $file -i $file
533
fi
534

    
535
# image formats
536

    
537
if [ -n "$do_pgm" ] ; then
538
do_image_formats pgm
539
fi
540

    
541
if [ -n "$do_ppm" ] ; then
542
do_image_formats ppm
543
fi
544

    
545
if [ -n "$do_bmp" ] ; then
546
do_image_formats bmp
547
fi
548

    
549
if [ -n "$do_tga" ] ; then
550
do_image_formats tga
551
fi
552

    
553
if [ -n "$do_tiff" ] ; then
554
do_image_formats tiff "-pix_fmt rgb24"
555
fi
556

    
557
if [ -n "$do_sgi" ] ; then
558
do_image_formats sgi
559
fi
560

    
561
if [ -n "$do_jpg" ] ; then
562
do_image_formats jpg "-flags +bitexact -dct fastint -idct simple -pix_fmt yuvj420p" "-f image2"
563
fi
564

    
565
# audio only
566

    
567
if [ -n "$do_wav" ] ; then
568
do_audio_only wav
569
fi
570

    
571
if [ -n "$do_alaw" ] ; then
572
do_audio_only al
573
fi
574

    
575
if [ -n "$do_mulaw" ] ; then
576
do_audio_only ul
577
fi
578

    
579
if [ -n "$do_au" ] ; then
580
do_audio_only au
581
fi
582

    
583
if [ -n "$do_mmf" ] ; then
584
do_audio_only mmf
585
fi
586

    
587
if [ -n "$do_aiff" ] ; then
588
do_audio_only aif
589
fi
590

    
591
if [ -n "$do_voc" ] ; then
592
do_audio_only voc
593
fi
594

    
595
if [ -n "$do_ogg" ] ; then
596
do_audio_only ogg
597
fi
598

    
599
# pix_fmt conversions
600

    
601
if [ -n "$do_pixfmt" ] ; then
602
conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \
603
             yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \
604
             monob pal8 yuv440p yuvj440p"
605
for pix_fmt in $conversions ; do
606
    file=${outfile}libav-${pix_fmt}.yuv
607
    do_ffmpeg_nocheck $file -r 1 -t 1 -y -f pgmyuv -i $raw_src \
608
                            -f rawvideo -s 352x288 -pix_fmt $pix_fmt $raw_dst
609
    do_ffmpeg $file -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $raw_dst \
610
                    -f rawvideo -s 352x288 -pix_fmt yuv444p $file
611
done
612
fi
613

    
614
rm -f "$bench" "$bench2"