Statistics
| Branch: | Revision:

ffmpeg / tests / regression.sh @ 7ef60502

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

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

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

    
157
do_video_decoding()
158
{
159
    do_ffmpeg $raw_dst -y $1 -i $file -f rawvideo $2 $raw_dst
160
}
161

    
162
do_video_encoding()
163
{
164
    file=${outfile}$1
165
    do_ffmpeg $file -y $2 -f $3 -i $raw_src $4 $file
166
}
167

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

    
174
do_audio_decoding()
175
{
176
    do_ffmpeg $pcm_dst -y -i $file -f wav $pcm_dst
177
}
178

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

    
185
}
186

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

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

    
200
}
201

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

    
209
echo "ffmpeg regression test" > $logfile
210
echo "ffmpeg benchmarks" > $benchfile
211

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

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

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

    
230
# mpeg2 encoding intra vlc qprd
231
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"
232

    
233
# mpeg2 decoding
234
do_video_decoding
235

    
236
# mpeg2
237
do_video_encoding mpeg2.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -idct int -dct int -f mpeg1video"
238
do_video_decoding "-idct int"
239

    
240
# mpeg2 encoding interlaced
241
do_video_encoding mpeg2i.mpg "-qscale 10" pgmyuv "-vcodec mpeg2video -f mpeg1video -flags +ildct+ilme"
242

    
243
# mpeg2 decoding
244
do_video_decoding
245
fi
246

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

    
252
# mpeg2 decoding
253
do_video_decoding
254

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

    
258
# mpeg2 decoding
259
do_video_decoding
260

    
261
# mpeg2 encoding interlaced
262
file=${outfile}mpeg2reuse.mpg
263
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
264

    
265
# mpeg2 decoding
266
do_video_decoding
267
fi
268

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

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

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

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

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

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

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

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

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

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

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

    
345
# mpeg4
346
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"
347
do_video_decoding
348

    
349
# mpeg4
350
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"
351
do_video_decoding
352

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

    
358
###################################
359
if [ -n "$do_mpeg4thread" ] ; then
360
# mpeg4
361
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"
362
do_video_decoding
363
fi
364

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

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

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

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

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

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

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

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

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

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

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

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

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

    
455
###################################
456
if [ -n "$do_snow" ] ; then
457
# snow
458
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"
459
do_video_decoding "" "-s 352x288"
460
fi
461

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

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

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

    
483

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

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

    
499
###################################
500
if [ -n "$do_ac3" ] ; then
501
# ac3
502
do_audio_encoding ac3.rm "" -vn
503
#do_audio_decoding
504
fi
505

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

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

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

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

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

    
541
###################################
542
# libav testing
543
###################################
544

    
545
if [ -n "$do_libav" ] ; then
546

    
547
# avi
548
do_libav avi
549

    
550
# asf
551
do_libav asf "-acodec mp2" "-r 25"
552

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

    
559
# mpegps
560
do_libav mpg
561

    
562
# mpegts
563
do_libav ts
564

    
565
# swf
566
do_libav swf -an
567

    
568
# ffm
569
do_libav ffm
570

    
571
# flv
572
do_libav flv -an
573

    
574
# mov
575
do_libav mov "-acodec pcm_alaw"
576

    
577
# nut
578
#do_libav nut "-acodec mp2"
579

    
580
# dv
581
do_libav dv "-ar 48000 -r 25 -s pal -ac 2"
582

    
583
# gxf
584
do_libav gxf "-ar 48000 -r 25 -s pal -ac 1"
585

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

    
593
# pbmpipe
594
do_streamed_images pbm
595

    
596
# pgmpipe
597
do_streamed_images pgm
598

    
599
# ppmpipe
600
do_streamed_images ppm
601

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

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

    
612
####################
613
# image formats
614
# pgm (we do not do md5 on image files yet)
615
do_image_formats pgm
616

    
617
# ppm (we do not do md5 on image files yet)
618
do_image_formats ppm
619

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

    
623
####################
624
# audio only
625

    
626
# wav
627
do_audio_only wav
628

    
629
# alaw
630
do_audio_only al
631

    
632
# mulaw
633
do_audio_only ul
634

    
635
# au
636
do_audio_only au
637

    
638
# mmf
639
do_audio_only mmf
640

    
641
# aiff
642
do_audio_only aif
643

    
644
# voc
645
do_audio_only voc
646

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

    
660
fi
661

    
662

    
663

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