You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

592 lines
15KB

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