diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-02-13 17:54:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-02-13 17:54:10 +0000 |
commit | 9c3d33d67f2260d5ddc888e8ea380c3913e38a72 (patch) | |
tree | 46c82202d3f7c2964f7cace9e1131e97ada124bb /tests | |
parent | 7984082a08cf2119da3433c245b72a91020b879d (diff) | |
download | ffmpeg-9c3d33d67f2260d5ddc888e8ea380c3913e38a72.tar.gz |
multithreaded/SMP motion estimation
multithreaded/SMP encoding for MPEG1/MPEG2/MPEG4/H263
all pthread specific code is in pthread.c
to try it, run configure --enable-pthreads and ffmpeg ... -threads <num>
the internal thread API is a simple AVCodecContext.execute() callback which executes a given function pointer with different arguments and returns after finishing all, that way no mutexes or other thread-mess is needed outside pthread.c
Originally committed as revision 2772 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ffmpeg.regression.ref | 8 | ||||
-rwxr-xr-x | tests/regression.sh | 24 | ||||
-rw-r--r-- | tests/rotozoom.regression.ref | 8 |
3 files changed, 37 insertions, 3 deletions
diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref index cfbb2469ac..82d65e3bf8 100644 --- a/tests/ffmpeg.regression.ref +++ b/tests/ffmpeg.regression.ref @@ -8,6 +8,9 @@ stddev: 7.65 PSNR:30.44 bytes:7602176 13336cffcba456ff4a7607b2a7e57b33 *./data/a-mpeg2i.mpg 4c9701eb83ed81dd9a328af83d7d7c8a *./data/out.yuv stddev: 7.66 PSNR:30.43 bytes:7602176 +8c4a7744f40a1e7aa16b985ecaad176a *./data/a-mpeg2thread.mpg +12ab090b699c130e5aef8e050965f092 *./data/out.yuv +stddev: 9.44 PSNR:28.62 bytes:7299072 d0dc46dd831398237a690ebbeff18b64 *./data/a-msmpeg4v2.avi 712aa6c959d1d90a78fe98657cbff19c *./data/out.yuv stddev: 8.11 PSNR:29.94 bytes:7602176 @@ -38,10 +41,13 @@ stddev: 10.18 PSNR:27.96 bytes:7145472 64b4b917014169294d59fe43ad6b3da9 *./data/a-mpeg4-adv.avi 8069deacba9756fd25ad37b467eb6365 *./data/out.yuv stddev: 10.23 PSNR:27.92 bytes:7602176 +96453d489d5418e382824cfb2673ac58 *./data/a-mpeg4-thread.avi +17ec2d72186dbb72d8a79cd448796cef *./data/out.yuv +stddev: 12.09 PSNR:26.47 bytes:7145472 f863f4198521bd76930ea33991b47273 *./data/a-error-mpeg4-adv.avi ba7fcd126c7c9fead5a5de71aaaf0624 *./data/out.yuv stddev: 16.80 PSNR:23.61 bytes:7602176 -198ad515da4f330d780c54fd8d6186ab *./data/a-error-mpeg4-nr.avi +198ad515da4f330d780c54fd8d6186ab *./data/a-mpeg4-nr.avi ebdb326e19aeab8e3c70d7050dc3b240 *./data/out.yuv stddev: 7.02 PSNR:31.19 bytes:7602176 328ebd044362116e274739e23c482ee7 *./data/a-mpeg1b.mpg diff --git a/tests/regression.sh b/tests/regression.sh index d7883136e9..69e8a849cb 100755 --- a/tests/regression.sh +++ b/tests/regression.sh @@ -33,6 +33,7 @@ elif [ "$1" = "libavtest" ] ; then else do_mpeg=y do_mpeg2=y + do_mpeg2thread=y do_msmpeg4v2=y do_msmpeg4=y do_wmv1=y @@ -51,6 +52,7 @@ else do_adpcm_ms=y do_rc=y do_mpeg4adv=y + do_mpeg4thread=y do_mpeg4nr=y do_mpeg1b=y do_asv1=y @@ -149,6 +151,16 @@ do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst fi ################################### +if [ -n "$do_mpeg2thread" ] ; then +# mpeg2 encoding interlaced +file=${outfile}mpeg2thread.mpg +do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -bf 2 -ildct -ilme -threads 2 $file + +# mpeg2 decoding +do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst +fi + +################################### if [ -n "$do_msmpeg4v2" ] ; then # msmpeg4 encoding file=${outfile}msmpeg4v2.avi @@ -249,6 +261,16 @@ do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst fi ################################### +if [ -n "$do_mpeg4thread" ] ; then +# mpeg4 +file=${outfile}mpeg4-thread.avi +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 + +# mpeg4 decoding +do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst +fi + +################################### if [ -n "$do_error" ] ; then # damaged mpeg4 file=${outfile}error-mpeg4-adv.avi @@ -261,7 +283,7 @@ fi ################################### if [ -n "$do_mpeg4nr" ] ; then # noise reduction -file=${outfile}error-mpeg4-nr.avi +file=${outfile}mpeg4-nr.avi do_ffmpeg $file -y -qscale 8 -4mv -mbd 2 -nr 200 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file # mpeg4 decoding diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref index 9a2729ca79..d67aa7916a 100644 --- a/tests/rotozoom.regression.ref +++ b/tests/rotozoom.regression.ref @@ -8,6 +8,9 @@ stddev: 4.95 PSNR:34.22 bytes:7602176 6da01fd0d910fbfcdc5b212ef3dd65cb *./data/a-mpeg2i.mpg 1e21fd7ed53abf352f9ea8548afa80a3 *./data/out.yuv stddev: 4.96 PSNR:34.20 bytes:7602176 +a3dd9c2911c9556d377ab1465f7365b4 *./data/a-mpeg2thread.mpg +8cf98fa5c59c959e35389a1a7180b379 *./data/out.yuv +stddev: 5.55 PSNR:33.22 bytes:7299072 14db391f167b52b21a983157b410affc *./data/a-msmpeg4v2.avi fc8881e0904af9491d5fa0163183954b *./data/out.yuv stddev: 5.29 PSNR:33.64 bytes:7602176 @@ -38,10 +41,13 @@ stddev: 4.20 PSNR:35.64 bytes:7145472 accf60d11aceecabb3c1997aec6e18b5 *./data/a-mpeg4-adv.avi a287b07b812fbeeb5364517303178ac7 *./data/out.yuv stddev: 4.77 PSNR:34.54 bytes:7602176 +8750b3935266211fea6b062f445bb305 *./data/a-mpeg4-thread.avi +aee1867b77490b3f8d58fcc9b7c5b535 *./data/out.yuv +stddev: 3.92 PSNR:36.25 bytes:7145472 03ff35856faefb4882eaf4d86d95bea7 *./data/a-error-mpeg4-adv.avi 8550acff0851ee915bd5800f1e20f37c *./data/out.yuv stddev: 9.66 PSNR:28.42 bytes:7602176 -74dbbba19d250a712702b1893c003461 *./data/a-error-mpeg4-nr.avi +74dbbba19d250a712702b1893c003461 *./data/a-mpeg4-nr.avi 81b985840c03bf101302abde131e3900 *./data/out.yuv stddev: 4.67 PSNR:34.73 bytes:7602176 671802a2c5078e69f7f422765ea87f2a *./data/a-mpeg1b.mpg |