实验8-H.264实验

该实验涉及视频编码和解码流程,使用ldecod_vc10解码264文件得到YUV,再用lencod_vc10编码为不同码率和GOP结构的264文件。通过码流分析软件检查编码模式和运动矢量信息,并通过播放器观察码流质量。实验表明,GOP长度与比特率影响编码后文件的失真程度,GOP短、比特率低则失真增大。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

实验要求:

1.将两个264文件解码得到相应的YUV文件
2.将以上两个视频序列编码为.264文件
3.用码流分析软件检查所生成的码流中各种编码模式和运动矢量等信息
4.用播放器观看所生成码流的质量

实验过程:

1.使用ldecod_vc10将两个视频进行解码,得到YUV文件
命令行参数
修改decoder.cfg文件中的参数,得到输出
在这里插入图片描述
2.使用lencod_vc10的工程文件将刚刚得到的两个YUV文件按照不同要求编码为264文件
命令行参数
固定码率,已不同的GOP长度及形状编码
InputFile = “128x128_dec.yuv” # Input sequence
FramesToBeEncoded = 50 # Number of frames to be coded
SourceWidth = 128 # Source frame width
SourceHeight = 128 # Source frame height
OutputWidth = 128 # Output frame width
OutputHeight = 128 # Output frame height
ReconFile = “128x128_rec.yuv” # Reconstruction YUV file
OutputFile = “128x128_rec_GOP15-2B.264” # Bitstream

IntraPeriod = 15 # Period of I-pictures (0=only first)
IDRPeriod = 0 # Period of IDR pictures (0=only first)
NumberBFrames = 2 # Number of B coded frames inserted (0=not used)

RateControlEnable = 0 # 0 Disable, 1 Enable

相同的GOP长度及形状,改变码率
InputFile = “flyer_converted_dec.yuv” # Input sequence
InputHeaderLength = 0 # If the inputfile has a header, state it’s length in byte here
StartFrame = 0 # Start frame for encoding. (0-N)
FramesToBeEncoded = 30 # Number of frames to be coded
OutputFile = “flyer_converted_rec_1000kbps.264” # Bitstream

IntraPeriod = 10 # Period of I-pictures (0=only first)
IDRPeriod = 0 # Period of IDR pictures (0=only first)

RateControlEnable = 1 # 0 Disable, 1 Enable
Bitrate = 1000000 # Bitrate(bps) – 可变 –
RCUpdateMode = 2 # Rate Control type. Modes supported :
# 0 = original JM rate control,
# 1 = rate control that is applied to all frames regardless of the slice type,
# 2 = original plus intelligent QP selection for I and B slices (including Hierarchical),
# 3 = original + hybrid quadratic rate control for I and B slice using bit rate statistics
#
3.用码流分析软件检查所生成的码流中编码模式和运动矢量等信息

分析第一个帧


在这里插入图片描述
分析第一个P帧

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
根据率失真曲线判断编码器优劣
GOP=12,2B帧:
在这里插入图片描述
GOP=9,2B帧:
在这里插入图片描述

GOP=4,1B帧:

在这里插入图片描述

GOP=12,无B帧:

在这里插入图片描述

GOP=2,全I帧:

在这里插入图片描述

绘制率失真曲线:
在这里插入图片描述

*固定GOP长度及形状(固定为GOP长度为15,2B帧):

3523kbps:
在这里插入图片描述

1805kbps:

在这里插入图片描述

1000kbps:
在这里插入图片描述

106kbps:
在这里插入图片描述

实验结论:

GOP组结构相同时,比特率越大,编码后文件失真越小;比特率相同时,GOP越短,编码后文件失真越大

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值