x264编解码器 - Intel IPP

来源:互联网 发布:python 改变图片颜色 编辑:程序博客网 时间:2024/05/01 07:17

1 下载intel xe composer 2011 评估版本:

http://software.intel.com/en-us/articles/intel-composer-xe/

需要填写注册信息,申请一个评估版本,intel会发送下载链接到你的邮箱.


2 raw 264转换工具

http://www.videolan.org/developers/x264.html

x264.exe -o out.h264 my_movie.ts


3 下载编译codecs

http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-code-samples/

打开一个cmd,输入(我的ipp安装在e盘):

set ipproot=E:\Program Files\Intel\Composer XE 2011 SP1\ipp


浏览一下sample解压出来的目录,到

ipp-samples\audio-video-codecs\application\umc_h264_dec_con\

ipp-samples\audio-video-codecs\application\umc_video_enc_con\


分别把这2个目录里面的sln文件拖放到刚才的cmd里面(其实就是设置sln打开时候的环境变量ipproot)


编译通过,得到2个exe:

umc_video_enc_con.exe

umc_h264_dec_con.exe


4 编码测试结果

4.1 yuv文件信息

1920x1080, 2G bytes, 片长13秒左右


4.2 Windows测试,2核,30fps

E:\Documents and Settings\Administrator\videotest>umc_video_enc_con.exe h264 -i tvu.yuv -w 1920 -h 1080 -t 2 -o x2.h264Starting H264 encoding tvu.yuv to file x2.h264Source video width = 1920, height = 1080, frameRate = 30.00Max frames to encode = 2147483647Encoding bit rate = 5000000 bits per second0.10.20.30.40.50.60.70.80.90.100.110.120.130.140.150.160.170.180.190.200.210.220.230.240.250.260.270.280.290.300.310.320.330.340.350.360.370.380.390.400.410.420.430.440.450.460.470.480.490.500.510.520.530.540.550.560.570.580.590.600.610.620.630.640.650.660.670.680.690.700.710.720.730.740.750.760.770.780.790.800.810.Summary:    Num frames encoded = 810    Encoding Time = 278.45 sec, 2.91 fps    Overall  Time = 319.07 sec, 2.54 fps    Average CPU usage = 44.85%    Encoded Size = 17218164 bytes    Compression Ratio = 146.32    EncodedSize/ExpectedSize = 1.02

cpu占用(只有一个核在工作,-t 2参数没有起作用)




4.3 linux上的编码测试结果(4核,fps=60)

localhost videotest # LD_LIBRARY_PATH=/data/intel/composer_xe_2011_sp1.10.319/ipp/lib/ia32/:/data/intel/composer_xe_2011_sp1/lib/ia32/ ./umc_video_enc_con h264 -w 1920 -h 1080 -t 4 -f 60 -i tvu.yuv420 -o tvu.yuv420.h264Starting H264 encoding tvu.yuv420 to file tvu.yuv420.h264Source video width = 1920, height = 1080, frameRate = 60.00Max frames to encode = 2147483647Encoding bit rate = 5000000 bits per second0.10.20.30.40.50.60.70.80.90.100.110.120.130.140.150.160.170.180.190.200.210.220.230.240.250.260.270.280.290.300.310.320.330.340.350.360.370.380.390.400.410.420.430.440.450.460.470.480.490.500.510.520.530.540.550.560.570.580.590.600.610.620.630.640.650.660.670.680.690.Summary:    Num frames encoded = 690    Encoding Time = 30.30 sec, 22.77 fps    Overall  Time = 31.88 sec, 21.64 fps    Average CPU usage = 0.00%    Encoded Size = 7336180 bytes    Compression Ratio = 292.55    EncodedSize/ExpectedSize = 1.02

5 解码测试

环境:Windows,双核cpu

E:\Documents and Settings\Administrator\videotest>umc_h264_dec_con.exe -t1 -i x2.h264 -o xx2.yuv.x2.h264 31      1.1135 s.       27.8402 fps     All - 20.6545 fpsE:\Documents and Settings\Administrator\videotest>umc_h264_dec_con.exe -t2 -i x2.h264 -o xx2.yuv.x2.h264 31      0.3229 s.       95.9932 fps     All - 13.2822 fps



原创粉丝点击