H.264编码实验

实验原理

三种主要技术: 变换,去除空间冗余 基于运动补偿的帧间预测,去除时间冗余 熵编码,去除统计冗余

实验流程

关键代码分析

需要修改的参数

13行 InputFile
30行 SourceWidth = 480 # Source frame width
31行 SourceHeight = 272 # Source frame height
33行 OutputWidth = 480 # Output frame width
34行 OutputHeight = 272 # Output frame height
57行 ReconFile = # Reconstruction YUV file
58行 OutputFile = # Bitstream
72行 IntraPeriod = 0 # Period of I-pictures (0=only first)
73行 IDRPeriod = 15 # Period of IDR pictures (0=only first)
180行 NumberBFrames = 2 # Number of B coded frames inserted (0=not used)
194行 HierarchicalCoding = 0 # B hierarchical coding (0= off, 1= 2 layers, 2= 2 full hierarchy, 3 = explicit)
444行 RateControlEnable = 1 # 0 Disable, 1 Enable
445行 Bitrate = 100000 # Bitrate(bps)
H.264编码实验
H.264编码实验