当前位置:文档之家› 视频信号处理实验3

视频信号处理实验3

1.实验目的1)掌握常用的编解码器参数及其用法,实现测试序列的编解码2)了解H.264帧内、帧间编码的基本原理3)通过设置编码参数,对测试序列进行帧内、帧间编码1)学会使用相关的开发工具修改、调试参考软件,掌握使用相应软件实现视频编解码的经验与技巧,锻炼提高分析问题和解决问题的能力2.实验环境(软件、硬件及条件)Windows 73.实验方法利用实验一介绍的生成发行版编码器程序lencod.exe,通过配置编码器参数,分别对实验用测试序列的钱50帧进行全I帧编码额IPPP帧编码。

1)设置编码参数IntraPeriod=1,QPISlice=28、32、36、40实现全I帧编码,分别记录各测试序列在不同QP下编码的平均PSNR、码率和编码时间,画出各序列编码的R-D(率失真)曲线。

2)设置编码参数IntraPeriod=0,QPISlice=28、32、36、40实现IPPP帧编码,分别记录各测试序列在不同QP下编码的平均PSNR、码率和编码时间,画出各序列编码的R-D曲线。

平均PSNR的计算方法:4.实验分析1)全I帧使用序列为:akiyo_cif.yuv①编码参数IntraPeriod=1,QP=28时,命令行为lencod -d encoder_baseline.cfg -p inputfile="akiyo_cif.yuv" -p outputfile="akiyo_cif.264" -p reconfile="akiyo_cif_rec.yuv" -p sourcewidth=352 -p sourceheight=288 -p outputwidth=352 -p outputheight=288 -p framestobeencoded=50 -p intraperiod=1 -p qpislice=28实验结果:②编码参数IntraPeriod=1,QP=32时,命令行为lencod -d encoder_baseline.cfg -p inputfile="akiyo_cif.yuv" -p outputfile="akiyo_cif.264" -p reconfile="akiyo_cif_rec.yuv" -p sourcewidth=352 -p sourceheight=288 -p outputwidth=352 -p outputheight=288 -p framestobeencoded=50 -p intraperiod=1 -p qpislice=32实验结果:②编码参数IntraPeriod=1,QP=36时,命令行为lencod -d encoder_baseline.cfg -p inputfile="akiyo_cif.yuv" -p outputfile="akiyo_cif.264" -p reconfile="akiyo_cif_rec.yuv" -p sourcewidth=352 -p sourceheight=288 -p outputwidth=352 -p outputheight=288 -p framestobeencoded=50 -p intraperiod=1 -p qpislice=36②编码参数IntraPeriod=1,QP=40时,命令行为lencod -d encoder_baseline.cfg -p inputfile="akiyo_cif.yuv" -p outputfile="akiyo_cif.264" -p reconfile="akiyo_cif_rec.yuv" -p sourcewidth=352 -p sourceheight=288 -p outputwidth=352 -p outputheight=288 -p framestobeencoded=50 -p intraperiod=1 -p qpislice=402)IPPP帧使用序列为:akiyo_cif.yuv①编码参数IntraPeriod=0,QP=28时,命令行为lencod -d encoder_baseline.cfg -p inputfile="akiyo_cif.yuv" -p outputfile="akiyo_cif.264" -p reconfile="akiyo_cif_rec.yuv" -p sourcewidth=352 -p sourceheight=288 -p outputwidth=352 -p outputheight=288 -p framestobeencoded=50 -p intraperiod=0 -p qpislice=28------------------ Average data all frames -----------------------------------Total encoding time for the seq. : 1171.185 sec (0.04 fps)Total ME time for sequence : 1159.376 secY { PSNR (dB), cSNR (dB), MSE } : { 38.783, 37.868, 10.62275 }U { PSNR (dB), cSNR (dB), MSE } : { 35.879, 35.672, 17.61587 }V { PSNR (dB), cSNR (dB), MSE } : { 35.616, 35.509, 18.28830 }Total bits : 213704 (I 35368, P 178160, NVB 176)Bit rate (kbit/s) @ 30.00 Hz : 128.22Bits to avoid Startcode Emulation : 0Bits for parameter sets : 176Bits for filler data : 0②编码参数IntraPeriod=0,QP=32时,命令行为lencod -d encoder_baseline.cfg -p inputfile="akiyo_cif.yuv" -p outputfile="akiyo_cif.264" -p reconfile="akiyo_cif_rec.yuv" -p sourcewidth=352 -p sourceheight=288 -p outputwidth=352 -p outputheight=288 -p framestobeencoded=50 -p intraperiod=0 -p qpislice=32实验结果:------------------ Average data all frames -----------------------------------Total encoding time for the seq. : 1265.873 sec (0.04 fps)Total ME time for sequence : 1252.618 secY { PSNR (dB), cSNR (dB), MSE } : { 35.911, 34.750, 21.78355 }U { PSNR (dB), cSNR (dB), MSE } : { 34.090, 33.740, 27.48230 }V { PSNR (dB), cSNR (dB), MSE } : { 33.641, 33.407, 29.67725 }Total bits : 164496 (I 25696, P 138624, NVB 176)Bit rate (kbit/s) @ 30.00 Hz : 98.70Bits to avoid Startcode Emulation : 0Bits for parameter sets : 176Bits for filler data : 0③编码参数IntraPeriod=0,QP=36时,命令行为lencod -d encoder_baseline.cfg -p inputfile="akiyo_cif.yuv" -p outputfile="akiyo_cif.264" -p reconfile="akiyo_cif_rec.yuv" -p sourcewidth=352 -p sourceheight=288 -p outputwidth=352 -p outputheight=288 -p framestobeencoded=50 -p intraperiod=0 -p qpislice=36实验结果:------------------ Average data all frames -----------------------------------Total encoding time for the seq. : 1293.881 sec (0.04 fps)Total ME time for sequence : 1281.451 secY { PSNR (dB), cSNR (dB), MSE } : { 33.243, 31.779, 43.16889 }U { PSNR (dB), cSNR (dB), MSE } : { 31.357, 31.096, 50.52531 }V { PSNR (dB), cSNR (dB), MSE } : { 31.442, 30.925, 52.54616 }Total bits : 131560 (I 18368, P 113016, NVB 176)Bit rate (kbit/s) @ 30.00 Hz : 78.94Bits to avoid Startcode Emulation : 0Bits for parameter sets : 176Bits for filler data : 0④编码参数IntraPeriod=0,QP=40时,命令行为lencod -d encoder_baseline.cfg -p inputfile="akiyo_cif.yuv" -p outputfile="akiyo_cif.264" -p reconfile="akiyo_cif_rec.yuv" -p sourcewidth=352 -p sourceheight=288 -p outputwidth=352 -p outputheight=288 -p framestobeencoded=50 -p intraperiod=0 -p qpislice=40实验结果:------------------ Average data all frames -----------------------------------Total encoding time for the seq. : 1351.108 sec (0.04 fps)Total ME time for sequence : 1338.892 secY { PSNR (dB), cSNR (dB), MSE } : { 30.727, 29.118, 79.67412 }U { PSNR (dB), cSNR (dB), MSE } : { 29.812, 29.435, 74.06075 }V { PSNR (dB), cSNR (dB), MSE } : { 30.054, 29.311, 76.19812 }Total bits : 108848 (I 14112, P 94560, NVB 176) Bit rate (kbit/s) @ 30.00 Hz : 65.31 Bits to avoid Startcode Emulation : 0 Bits for parameter sets : 176 Bits for filler data : 03)数据分析 ①全I 帧总结以上全I 帧在不同QP 参数下编码的数据,如下表:All intra coding Bitrate(kbps) MSE(Y) MSE(U) MSE(V) MSE (平均) PSNR 1410.97 5.482443.636772.68354 4.708345 34.67343805969.23 10.235533 5.67853 3.72817 8.39147229.65404061675.36 18.49719 8.83435 5.90481 14.78798667 24.7326226 469.87 33.9604911.993946.9790525.80249167 19.89757068由上表作R-D 曲线图如下:400600800100012001400160018202224262830323436All intra codingBitrate(kbps)P S N R (d B )①IPPP 帧总结以上IPPP 帧在不同QP 参数下编码的数据,如下表:Intra&inter codingBitrate(kbps) MSE(Y)MSE(U)MSE(V) MSE (平均) PSNR 128.22 10.62275 17.61587 18.288313.06586167 25.8080424998.721.78355 27.4823 29.67725 24.04895833 20.50887821 78.94 43.16889 50.52531 52.54616 45.95783833 14.88361175 65.3179.67412 74.0607576.19812 78.15922510.27119872由上表数据作出IPPP 帧R-D 曲线图:60708090100110120130101214161820222426Intra&inter codingBitrate(kbps)P S N R (d B )5.实验结论帧内预测编码是指利用视频空间域的相关性,使用当前图像已编码的像素预测当前像素,以达到去除视频空域冗余的目的,然后将预测残差作为后续编码模块的输入,进行下一步编码处理。

相关主题