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.

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