WO2009111935A1 - 一种视频图像宏块级自适应码率分配方法 - Google Patents

一种视频图像宏块级自适应码率分配方法 Download PDF

Info

Publication number
WO2009111935A1
WO2009111935A1 PCT/CN2008/073061 CN2008073061W WO2009111935A1 WO 2009111935 A1 WO2009111935 A1 WO 2009111935A1 CN 2008073061 W CN2008073061 W CN 2008073061W WO 2009111935 A1 WO2009111935 A1 WO 2009111935A1
Authority
WO
WIPO (PCT)
Prior art keywords
macroblock
image
code rate
rate control
control module
Prior art date
Application number
PCT/CN2008/073061
Other languages
English (en)
French (fr)
Inventor
徐苏珊
Original Assignee
深圳市融创天下科技发展有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市融创天下科技发展有限公司 filed Critical 深圳市融创天下科技发展有限公司
Priority to US12/745,893 priority Critical patent/US8416849B2/en
Priority to EP08873222A priority patent/EP2227022A4/en
Publication of WO2009111935A1 publication Critical patent/WO2009111935A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/115Selection of the code volume for a coding unit prior to coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/149Data rate or code amount at the encoder output by estimating the code amount by means of a model, e.g. mathematical model or statistical model
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Definitions

  • the invention relates to the field of video image rate allocation, and specifically relates to a video image macroblock level adaptive rate allocation method.
  • Rate control is one of the important technologies of video coding, and plays an important role in applications such as video storage and video transmission.
  • the rate control is especially important, which will directly determine the pros and cons of video coding.
  • the rate control in order to make the output rate of the encoder more accurate, the rate control is usually refined to the macroblock level.
  • such a conventional rate control method has a high computational complexity and a large amount of computation, and at the same time as the control accuracy is improved, the image is spatially uneven due to the uneven distribution of the code rate. The quality is uneven. Especially in the case of wireless/low bandwidth, this negative effect is magnified, and the local over-extension in the image leads to uneven image quality, which greatly impairs the subjective effect of the image.
  • the object of the present invention is to solve the problem that the quantization parameter required for encoding the current macroblock and the uneven distribution of the code rate result in uneven macroblock image quality, and a macroblock-level adaptive code rate allocation method is proposed, which ensures accurate bit rate allocation. At the same time, solve the problem of uneven quality in the image space to enhance the subjective effect.
  • the present invention constructs a video image macroblock level adaptive code rate allocation method, which includes the following steps: A.
  • the rate control module performs spatial continuity analysis on the macroblocks of the acquired image and applies a specific motion search algorithm, such as a diamond motion search algorithm, wherein the code rate control module utilizes the sobel operator and the motion prediction SATD (Sum of Absolute Transform Difference) The absolute difference and the calculated macroblock texture complexity factor C f and the motion complexity factor;
  • SATD Sud of Absolute Transform Difference
  • the code rate control module combines the macroblock bit number with the macroblock energy by using a formula, where: ') is the target bit number allocated by the ith macroblock in the nth frame image; is the current macroblock in the image Index number; W is the number of macroblocks in the image; is the number of target bits allocated by the nth frame image; is the i-th macroblock energy;
  • the rate control module uses R-D rate distortion when the number of macroblock bits has been allocated.
  • the (rate-distortion) model calculates the quantization parameter Qp of the code in units of macroblocks.
  • the process of calculating the macroblock texture complexity factor ⁇ further includes:
  • the code rate control module samples the macroblock sub-pixels
  • the rate control module uses the sobel operator to analyze the macroblock spatial redundancy, and extracts the horizontal direction component d Xi , j and the vertical direction component dy ⁇ of the macroblock boundary vector;
  • the modulus defining the boundary direction vector is:
  • the process of calculating the macroblock motion complexity factor further includes:
  • the rate control module performs motion search on the macroblock of the sampled image, the reference image selects the previous frame image, and the motion search method selects the diamond motion search algorithm;
  • A2-2 Calculate the difference between the macroblock prediction data and the original data, and calculate the motion complexity factor ⁇ according to ⁇ 47 ⁇ , where b is the adjustment coefficient.
  • the horizontal direction component dxi, j and the vertical direction component dy ⁇ of the macroblock boundary vector are calculated as follows:
  • dXij Pi- lj+ i +2 /7 ; . J+1 + p i+l +l - Vi-x, x - ⁇ x Pi -i - Pi + j -i
  • d Xi , j and dy ⁇ represent the horizontal and vertical components of the boundary vector respectively;
  • A'-" refers to the pixel P "adjacent pixels in the original image.
  • Absolute Transform Difference the absolute difference sum after the transformation, represents the residual difference in the frequency domain.
  • the RD rate-distortion model is:
  • & is the absolute difference sum of the current macroblock, which can be estimated by the image macroblock of the previous frame
  • cl the quantization parameter of the jth macroblock
  • the present invention analyzes and processes macroblocks in units of macroblocks, and combines bit allocation at macroblock level with macroblock energy.
  • This model combines macroblock bit allocation with macroblock energy.
  • This model can The rate control algorithm is combined with the natural characteristics of the image to obtain the quantized parameter Qp of the code. The smaller the quantization parameter Qp, the more details of the image will be preserved, and the encoder output code rate will become larger, without increasing Under the premise of network bandwidth, the reconstructed image is closer to the subjective effect of people.
  • the macroblock features are extracted and abstracted into macroblock energy, and the rate allocation is closely related to the macroblock energy.
  • the method of the present invention is particularly suitable for video applications at low bit rate or narrowband, and is not widely dependent on a particular coding system, and is widely applicable to H.264, MPEG-4 or other encoders.
  • Figure 1 is a flow chart illustrating the implementation of the method of the present invention
  • FIG. 2 is a schematic diagram of a pixel of a frame image in an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of sub-pixel sampling of a frame image in an embodiment of the present invention.
  • Fig. 4 is a schematic diagram showing the rate distortion of the present invention.
  • the invention analyzes the image macroblock, and the rate control module extracts the macroblock texture complexity factor and the motion complexity factor separately, and calculates the macroblock energy according to a specific manner. As shown in Figure 1, this issue The method steps are as follows:
  • the rate control module performs spatial continuity analysis on the macroblock of the sampled image and applies a specific motion search algorithm, such as a diamond motion search algorithm, wherein the rate control module utilizes the sobel operator and the motion prediction SATD, respectively.
  • a specific motion search algorithm such as a diamond motion search algorithm
  • SATD motion prediction SATD
  • the macroblock texture complexity factor is based on the spatial correlation and continuity of natural images. Each pixel that makes up the image is spatially related to the surrounding pixels. This feature can be exploited to reduce spatial redundancy. If the image space is highly redundant, the image coding complexity is relatively low; the image space redundancy is low, and the image coding complexity is relatively high.
  • the present invention uses a Sobel operator to calculate a macroblock texture complexity factor, and in order to reduce computational complexity, subpixel sampling of pixels in a macroblock is first performed.
  • the step of calculating the texture complexity factor of the macroblock in the step further includes:
  • the present invention performs 2:1 sub-pixel sampling on the input original pixels.
  • the number of pixels after sampling is 1 I 2 of the original number of pixels, and the time taken to calculate the boundary direction vector of the sampled pixels is about 1 I 2 .
  • the solid circle represents the available sampling pixels.
  • the sub-pixel sampled pixel values are averaged by two adjacent pixels before sampling, such as sub-pixels.
  • the pixel value in Figure 3 after sampling is equal to the average of two adjacent raw pixel values in Figure 2 before sub-pixel sampling. Because of the strong spatial correlation of adjacent pixels, the sub-sampled data retains the data characteristics of the original image, which has little impact on the performance of the algorithm, and the computational complexity after sub-pixel sampling is greatly reduced.
  • ⁇ Xi Pi- lj+ i +2 /7 ; . J+1 + p i+lj+l - Vi-x, x - ⁇ x Pi -i - Pi + j -i
  • the macroblock texture complexity factor Cf , ⁇ is the adjustment factor. If the current macroblock has a relatively large correlation with surrounding macroblocks, the texture complexity of the macroblock is small for encoding, and the texture complexity of the macroblock is large.
  • step 200 the rate control module uses the formula Calculating the macroblock energy ⁇ also includes the following steps in this step:
  • Macroblock motion complexity refers to the intensity of the motion of the object in which the macroblock is located.
  • the method of finding the motion complex factor is to perform motion search for the current macroblock, the reference image of the present invention selects the previous frame image, and the motion search method selects the diamond motion search algorithm.
  • the rate control module uses a formula to combine the macroblock bit number with the macroblock energy, where: , ') is the target bit number allocated by the ith macroblock in the nth frame image; is the current macroblock in the image Index number in ; W is the number of macroblocks in the image; ⁇ « is the number of target bits allocated for the image of the nth frame; ⁇ ; is the energy of the i th macroblock.
  • step 400 in the case where the macroblock bit rate has been allocated, the rate control module uses the R-D rate-distortion model to obtain the quantized parameter Qp encoded in units of macroblocks;
  • & is the absolute difference sum of the current macroblock, which can be estimated by the image macroblock of the previous frame
  • cl the quantization parameter of the jth macroblock
  • the macroblock complexity is inversely proportional to the quantization parameter Qp, whereby the macroblock quantization parameter QP can be calculated.
  • the quantization parameter QP is an important parameter for the encoder to control the degree of image compression. The smaller the quantization parameter ⁇ ⁇ is , the finer the quantization is, the higher the image quality is, and the longer the code stream is generated.
  • the parameter controls the quantizer in the code. When Qp decreases, the non-zero coefficient in the quantized coefficient increases, and the code stream output by the encoder becomes larger. Dynamically changing the quantization parameter Qp by the RD model can balance the input image complexity and the output code rate, so that the code output code rate is constant. According to the above method, the code stream sent to the transmission buffer is kept constant to a certain extent, and the purpose of controlling the code rate is achieved.
  • the effect of the experimental test is that after the compression of the image, the motion is severe, and the image quality is relatively uniform, and the effect is improved. Obvious.
  • the rate distortion curve of the present invention is applied to the reference software JM7.6 as shown in Fig. 4.
  • the PSNR peak signal to noise ratio
  • the PSNR in the figure refers to the average PSNR PSNR definition of the entire sequence:
  • is the maximum intensity value of the video signal.
  • V is equal to 255.
  • PSNR is completely determined by the MSE. PSNR is used more often than MSE because people tend to associate image quality with a certain PSNR range.
  • an image with a PSNR higher than 40 dB generally means a good image of water, which is very close to the original image. Between 30 and 40 dB usually means a good image, 20 to 30 dB is better. Poor, image quality with PSNR below 20 dB is unacceptable.
  • the PSNR value of the present invention is higher than the PSNR value of the original image at the same code rate, which means that the image sharpness is improved without increasing the output bit rate.
  • the experimental results show that the encoder can achieve higher stability and the accuracy of rate distortion is improved. Correspondingly, the compression performance is improved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Algebra (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

说明书 一种视频图像宏块级自适应码率分配方法 技术领域
本发明涉及到视频图像码率分配领域, 具体指一种视频图像宏块级自适 应码率分配方法。
背景技术
码率控制是视频编码的重要技术之一, 在视频存储和视频传输等领域的 应用中起着重要作用。 对于码率受限尤其是低码率的视频在线传输来说, 码 率控制显的尤为重要, 将直接决定视频编码的优劣。 在目前已有的视频编码 码率控制方法中, 为了使编码器的输出码率更加精确, 通常会将码率控制精 确到宏块级别。 但是常规上的此类码率控制方法, 计算复杂度很高, 计算量 也很大, 而且在提升控制精度的同时, 由于码率分配不均, 经常会导致同一 幅图像中在空间上的图像质量不均匀。 尤其在无线 /低带宽情况下, 这种负面 效果会被放大, 图像中局部过量化导致图像质量不均匀的情况会非常明显, 这会极大地损伤图像的主观效果。
发明内容
本发明目的在于解决编码当前宏块所需的量化参数与码率分配不均导致 宏块图像质量不均匀的问题, 而提出一种宏块级自适应码率分配方法, 在保 证码率分配精确性的同时, 解决图像空间上质量不均匀的问题, 以提升主观 效果。
为解决上述技术问题, 本发明构造一种视频图像宏块级自适应码率分配 方法, 包括以下步骤: A.码率控制模块对采集图像的宏块进行空间上连续性的分析及运用特定 运动搜索算法, 如菱形运动搜索算法, 所述码率控制模块分别利用 sobel 算 子及运动预测 SATD (Sum of Absolute Transform Difference) 变换后绝对 差值和计算得出宏块紋理复杂因子 Cf和运动复杂因子 ;
Β.码率控制模块运用公式 =lQg2( +^)计算得出宏块能量
Figure imgf000004_0001
C.码率控制模块运用公式 将宏块比特数与宏块能量相 结合, 其中: ,')是第 n帧图像中第 i个宏块分配的目标比特数; 是当前宏 块在图像中的索引号; W是图像中宏块的个数; 是第 n帧图像分配的目标 比特数; 是第 i个宏块能量;
D.在已经分配好宏块比特数的情况下, 码率控制模块使用 R-D 率失真
(rate-distortion)模型以宏块为单位求编码的量化参数 Qp 。
在上述步骤 A中, 计算宏块紋理复杂因子^的过程进一步包括:
A1-1.码率控制模块对宏块亚像素采样;
A1-2.码率控制模块运用 sobel算子对宏块空间冗余度进行分析, 提取宏 块边界向量的水平方向分量 dXi,j和垂直方向分量 dy^;
A1-3. 对亚像素采样后的像素 , 相应的边界向量为 " ^"}, 定义边界方向向量的模是:
Amp {Di j) = dx,t j + dyi j
Al-4. 将宏块亚像素采样后的像素所对应的边界方向向量模相加求和得 到内部变量 ^, 所述变量7 ^表示当前宏块的空间相关性 ,运用公式 Cf =^计 算得出宏块紋理复杂因子 Cf, α是调整因子。 在上述步骤 Α中, 计算宏块运动复杂因子 的过程进一步包括:
A2-1.码率控制模块针对采样图像的宏块做运动搜索, 参考图像选择前一 帧图像, 运动搜索方法选择菱形运动搜索算法;
A2-2.计算宏块预测数据和原始数据的差异, 根据 ^ ^47^计算出运 动复杂因子 ^, 其中 b是调整系数。
在上述步骤 A1-2中,计算宏块边界向量的水平方向分量 dxi, j和垂直方向 分量 dy^公式如下:
dXij = Pi-lj+i +2 /7;.J+1 + pi+l +l - Vi-x, x -^x Pi -i - Pi+ j-i
= PM -i +2 /7;.+1J + pi+l +l - Vi-x, x -^x Pi-i - Pi-i,j+i
其中: dXi,j 和 dy^ 分别代表边界向量水平和垂直方向分量; A'-""是指 像素 P" 在原始图像中的相邻像素。
Figure imgf000005_0001
在上述步骤 A2-2 中, " , 其中 SATD (Sum of
Absolute Transform Difference, 变换后绝对差值和) 表示在频域中残差分 布。
在上述步骤 A中所述的 sobel算子为
Figure imgf000005_0002
在上述步骤 D中,所述的 R-D率失真(rate-distortion)模型为:
Figure imgf000005_0003
其中 是当前帧分配的目标比特数、 & 是当前宏块的绝对差值和, 可 由前一帧图像宏块估计出来; 是第 j个宏块的量化参数、 cl, 是调整 数。
本发明以宏块为单位进行分析处理, 将宏块级别的比特分配与宏块能量 相结合的比特分配模型, 此模型是将各个宏块比特分配与宏块能量相结合, 这种模型可以将码率控制算法与图像的自然特性有机地结合起来求得编码的 量化参数 Qp, 此量化参数 Qp越小, 图象大部分的细节都会被保留, 编码器输 出码率则变大, 在不增加网络带宽的前提下重建图像更贴近人的主观效果。 将宏块特征提取并抽象为宏块能量, 将码率分配与宏块能量密切相关。 这样 既能提供码率控制的精确性, 同时控制编码质量, 又能平滑图像在空间上的 质量变化, 提升图像主观质量。 本发明的方法尤其适用于低码率或窄带下的 视频应用, 不依赖于特定编码体系, 可广泛适用于 H. 264、 MPEG-4或其它编 码器。
说明书附图
图 1为说明实施本发明方法实施过程的流程图;
图 2为本发明实施例中一帧图像的像素示意图;
图 3为本发明实施例中一帧图像的亚像素采样示意图;
图 4为本发明率失真示意曲线图。
具体实施方式
为了使本发明目的、 技术方案及优点更加清楚明白, 以下结合附图及实 施例, 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体实施例 仅仅用以解释本发明, 并不用于限定本发明。
本发明对图像宏块进行分析, 码率控制模块将宏块紋理复杂因子和运动 复杂因子分别提取, 按照特定的方式计算得出宏块能量。 见图 1 所示, 本发 明的方法步骤如下:
在步骤 100 中, 码率控制模块对采样图像的宏块进行空间上连续性的分 析及运用特定运动搜索算法, 如菱形运动搜索算法, 所述码率控制模块分别 利用 sobel算子及运动预测 SATD ( Sum of Absolute Transform Difference ) 变换后绝对差值和计算得出宏块紋理复杂因子 Cf和运动复杂因子 。
宏块紋理复杂因子是基于自然图像在空间上的相关性和连续性。 组成图 像的各像素在空间上与周围像素都有相关性, 这个特性可以被利用来减除空 间冗余度。 如果图像空间冗余度高, 图像编码复杂度相对较低; 图像空间冗 余度低, 图像编码复杂度相对较高。 本发明是使用 Sobel 算子来计算宏块紋 理复杂因子, 为了降低计算复杂度先对宏块中的像素进行亚像素采样。 该步 骤中计算宏块的紋理复杂因子的步骤进一步包括:
( 1 ) 为了降低计算复杂度, 本发明对输入的原始像素进行 2 : 1 亚像素 采样。 采样后的像素个数是原始像素个数的 1 I 2, 对采样后的像素进行边界 方向向量计算所耗费的时间大约是原来的 1 I 2。 如图 2、 3所示, 在亚像素 采样前的图 2 中, 实心圆表示可用的采样像素, 亚像素采样后的像素值是由 采样前的两个相邻像素求平均得到, 如亚像素采样后图 3 中的像素值等于亚 像素采样前的图 2 中两个相邻原始像素值的平均。 因为相邻像素在空间上的 强相关性, 亚像素采样后的数据保留了原图像的数据特征, 对算法的性能影 响很小, 亚像素采样后的计算复杂度也会很大幅度地降低。
(2 )在对宏块亚像素采样的基础上, 对宏块空间冗余度进行分析, 选取
Figure imgf000007_0001
分量。 计算方法如下:
^Xi = Pi-lj+i +2 /7;.J+1 + pi+lj+l - Vi-x, x -^x Pi -i - Pi+ j-i
= PM -i +2x pi+l + pi+l +l - Vi-x, x -^x Pi-i - Pi-i,j+i 其中 dxu 和 dy^ 分别代表边界向量水平和垂直方向分量, 等是指 像素 p" 在原始图像中的相邻像素。
D{ , = {dxt dyt }
(3) 对于亚像素采样后的像素 , 相应的边界向量为
为了方便计算, 定义边界方向向量的模是: A, = +
(4)将宏块亚像素采样后的像素所对应的边界方向向量模相加求和得到 内部变量7^ 所述变量7 ^表示当前宏块的空间相关性 ,运用公式 Cf =^计算 得出宏块紋理复杂因子 Cf, α是调整因子。如果当前宏块与周围宏块相关性比 较大, 对于编码而言宏块的紋理复杂度小, 相反宏块紋理复杂度大。
在步骤 200 中码率控制模块运用公式
Figure imgf000008_0001
计算得出宏块能量 Ε 在此步骤中还包括如下步骤:
(1) 宏块运动复杂度是指宏块所在的物体, 运动的剧烈程度。 求运动复 杂因子的方法是针对当前宏块作运动搜索, 本发明的参考图像选择前一帧图 像, 运动搜索方法选择菱形运动搜索算法。
(2) 计算宏块预测数据和原始数据的差异, 用运动预测后 SATD来计算 运动复杂因子 = ^,其中 b 是根据经验取值的调整系数, SATD
(Sum of Absolute Transform Difference, ) 是运动预测后的变换后绝对差 SATD = ( DijfT( j)\)l2
Figure imgf000009_0001
在步骤 300 中码率控制模块运用公式 将宏块比特数与 宏块能量相结合, 其中: ,')是第 n帧图像中第 i个宏块分配的目标比特数; 是当前宏块在图像中的索引号; W是图像中宏块的个数; β«是第 n帧图像分 配的目标比特数; Ε;是第 i个宏块能量。
在步骤 400 中, 在已经分配好宏块比特率的情况下, 码率控制模块使用 R-D率失真(rate-distortion)模型以宏块为单位求编码的量化参数 Qp;
R-D模型: B SADx (― +^-)
QP QP
其中 是当前帧分配的目标比特数、 & 是当前宏块的绝对差值和, 可以 由前一帧图像宏块估计出来; 是第 j个宏块的量化参数、 cl, 是调整参 数。
从上公式可看出, 目标比特数已知的情况下, 宏块复杂度的^^与量化参 数 Qp成反比, 由此可以计算出宏块量化参数 QP。 量化参数 QP是编码器控制 图象压缩程度的重要参数, 量化参数 βΡ越小, 量化越精细, 图像质量就越高, 而产生的码流也越长。参数 控制编码中的量化器, 当 Qp减小, 则量化后的 系数中非零系数增多, 编码器输出的码流就会变大。 通过 R-D模型动态改变 量化参数 Qp可以平衡输入图像复杂度与输出码率,使编码输出码率恒定。 按 照上述方法, 在一定程度上使发送给发送缓冲器的码流维持恒定, 也就达到 了控制码率的目的。
用本发明所述的方法从实验测试的效果看出, 编码后的图像中运动剧烈 的部分经过压缩后效果明显, 编码后的图像质量相对比较均匀, 效果提升明 显。见图 4所示在参考软件 JM7. 6上应用本发明的率失真曲线,图中的 PSNR (峰 值信噪比)指的是整个序列的平均 PSNR PSNR定义:
Figure imgf000010_0001
这里 ^ 是视频信号的最大强度值。 对于最通常的每彩色 8比特的视频, V 等于 255。 要注意的是对于固定的峰值, PSNR完全由 MSE决定。 PSNR比 MSE 更经常使用, 是因为人们总是倾向于将图像质量和某种 PSNR范围相关联。 作 为一个主要的准则, 对于亮度分量, PSNR高于 40dB的图像一般意味着一水 好的图像, 这与原始图像很接近, 30至 40dB之间通常意味着一个好的图像, 20至 30dB是较差的, PSNR低于 20dB的图像质量是不可接受的。 从本图可以 看出, 在同一码率下本发明的 PSNR值高于原图像的 PSNR值, 这意味着在不 增加输出比特率的前提下, 提升图像清晰度。 实验结果表明: 编码器能够取 得较高的稳定性, 其率失真准确度有所提升, 相应地, 压缩性能有所改善。
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡在本 发明的精神和原则之内所作的任何修改、 等同替换和改进等, 均应包含在本 发明的保护范围之内。

Claims

权利要求书
1、 一种视频图像宏块级自适应码率分配方法, 其特征在于, 包括以下;
A.码率控制模块对采集图像的宏块进行空间上连续性的分析及运用特定 运动搜索算法, 码率控制模块分别利用 sobel算子及运动预测 SATD变换后绝 对差值和计算得出宏块的紋理复杂因子 c(和运动复杂因子 ;
B.码率控制模块运用公式 = lQg2 ( + ^ )计算得出宏块能量
Figure imgf000011_0001
C.码率控制模块运用公式 将宏块比特数与宏块能量相 结合, 其中 ,')是第 n帧图像中第 i个宏块分配的目标比特数; 是当前宏块 在图像中的索引号; W是图像中宏块的个数; 是第 n帧图像分配的目标比 特数; 是第 i个宏块能量;
D.在已经分配好宏块比特数的情况下, 码率控制模块使用 R-D率失真模 型以宏块为单位求编码的量化参数 Qp 。
2、 根据权利要求 1所述的视频图像宏块级自适应码率分配方法, 其特征 在于, 在上述所述的步骤 A中, 计算宏块紋理复杂因子^ 的过程进一步包括:
A1- 1.码率控制模块对宏块亚像素采样;
A1-2.码率控制模块运用 sobel算子对宏块空间冗余度进行分析, 提取宏 块边界向量的水平方向分量 dXi, j和垂直方向分量 dy^;
A1-3. 对亚像素采样后的像素 , 相应的边界向量为 " = μ ^"}, 定义边界方向向量的模是:
Amp {Di j ) = dx,t j + dyi j
Al-4. 将宏块亚像素采样后的像素所对应的边界方向向量模相加求和得 到内部变量 ^, 所述变量7 ^表示当前宏块的空间相关性 ,运用公式 cf =^计 算得出宏块紋理复杂因子 Cf, α是调整因子。
3、 根据权利要求 1所述的视频图像宏块级自适应码率分配方法, 其特征 在于,在上述所述的步骤 Α中, 计算宏块运动复杂因子 的过程进一步包括: A2-1.码率控制模块针对采样图像的宏块做运动搜索, 参考图像选择前一 帧图像, 运动搜索方法选择菱形运动搜索算法;
A2-2.计算宏块预测数据和原始数据的差异, 根据 ^ ^47^计算出运 动复杂因子 ^, 其中 b是调整系数。
4、 根据权利要求 2所述的视频图像宏块级自适应码率分配方法, 其特征 在于, 在所述步骤 A1-2中, 计算宏块边界向量的水平方向分量 dxu和垂直方 向分量 dy^公式如下:
dXij = Pi-lj+i +2 /7;.J+1 + pi+l +l - Vi-x, x -^x Pi -i - Pi+ j-i
= PM -i +2 /7;.+1J + pi+l +l - Vi-x, x -^x Pi-i - Pi-i,j+i
其中: dXi,j 和 dy^ 分别代表边界向量水平和垂直方向分量; A'-""是指 像素 P" 在原始图像中的相邻像素。
5、 根据权利要求 3所述的视频图像宏块级自适应码率分配方法, 其特征
Figure imgf000012_0001
在于, 在上述步骤 A2-2中, " ;
其中 SATD表示在频域中残差分布。
6、 根据权利要求 1所述的视频图像宏块级自适应码率分配方法, 其特征
在于, 在所述步骤 A中所述的 sobel算子为
Figure imgf000012_0002
7、 根据权利要求 1所述的视频图像宏块级自适应码率分配方法, 其特征 在于, 在所述步骤 D中,所述 R-D率失真模型为:
Figure imgf000013_0001
其中: 是当前帧分配的目标比特数、 是当前宏块的绝对差值和, 可 以由前一帧图像宏块估计出来; 是第 j个宏块的量化参数、 cl, 是调整 参数。
PCT/CN2008/073061 2008-03-11 2008-11-14 一种视频图像宏块级自适应码率分配方法 WO2009111935A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US12/745,893 US8416849B2 (en) 2008-03-11 2008-11-14 Self-adapting code rate distribution method of video image macro-block level
EP08873222A EP2227022A4 (en) 2008-03-11 2008-11-14 SELF-ADJUSTING CODER DATA DISTRIBUTION PROCESS FOR VIDEO IMAGES ON MACROBLOCK LEVEL

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810065526.2A CN101534436B (zh) 2008-03-11 2008-03-11 一种视频图像宏块级自适应码率分配方法
CN200810065526.2 2008-03-11

Publications (1)

Publication Number Publication Date
WO2009111935A1 true WO2009111935A1 (zh) 2009-09-17

Family

ID=41064732

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/073061 WO2009111935A1 (zh) 2008-03-11 2008-11-14 一种视频图像宏块级自适应码率分配方法

Country Status (4)

Country Link
US (1) US8416849B2 (zh)
EP (1) EP2227022A4 (zh)
CN (1) CN101534436B (zh)
WO (1) WO2009111935A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428486A (zh) * 2012-05-24 2013-12-04 富士通株式会社 图像压缩方法和装置
CN112637596A (zh) * 2020-12-21 2021-04-09 中国科学院国家空间科学中心 一种码率控制系统

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8396114B2 (en) 2009-01-29 2013-03-12 Microsoft Corporation Multiple bit rate video encoding using variable bit rate and dynamic resolution for adaptive video streaming
US8311115B2 (en) 2009-01-29 2012-11-13 Microsoft Corporation Video encoding using previously calculated motion information
US8270473B2 (en) * 2009-06-12 2012-09-18 Microsoft Corporation Motion based dynamic resolution multiple bit rate video encoding
US8705616B2 (en) 2010-06-11 2014-04-22 Microsoft Corporation Parallel multiple bitrate video encoding to reduce latency and dependences between groups of pictures
CN102298138B (zh) * 2010-06-25 2013-04-17 中国科学院电子学研究所 星载斜视sar原始数据实用化频域压缩比特分配方法
US20120230396A1 (en) * 2011-03-11 2012-09-13 Mitsubishi Electric Research Laboratories, Inc. Method for Embedding Decoding Information in Quantized Transform Coefficients
US9591318B2 (en) 2011-09-16 2017-03-07 Microsoft Technology Licensing, Llc Multi-layer encoding and decoding
US11089343B2 (en) 2012-01-11 2021-08-10 Microsoft Technology Licensing, Llc Capability advertisement, configuration and control for video coding and decoding
CN102685531B (zh) * 2012-04-24 2014-04-16 宁波大学 一种三维视频编码的深度和彩色码率分配方法
CN102984495A (zh) * 2012-12-06 2013-03-20 北京小米科技有限责任公司 一种视频图像的处理方法及装置
US9350989B2 (en) * 2012-12-11 2016-05-24 Megachips Corporation Moving image coding apparatus, code amount control method, and storage medium
CN103327320B (zh) * 2013-03-27 2016-06-22 中山大学 一种用于伪高码率视频的鉴定方法
CN104427336B (zh) * 2013-09-02 2018-09-14 苏州威迪斯特光电科技有限公司 基于感兴趣区域补偿编码的视频质量提高方法
CN103442235B (zh) * 2013-09-06 2017-01-25 融创天下(上海)科技发展有限公司 一种图像处理方法以及装置
CN103888765B (zh) * 2014-03-27 2015-09-30 天格科技(杭州)有限公司 一种改进型R-λ模型H.265码率控制方法
CN106454321A (zh) * 2016-10-26 2017-02-22 深圳市道通智能航空技术有限公司 全景视频的处理方法、装置及系统
US10362080B2 (en) 2017-04-25 2019-07-23 At&T Intellectual Property I, L.P. Methods, systems, and devices for video streaming adaptation using control theoretic approach
US10728180B2 (en) 2018-08-21 2020-07-28 At&T Intellectual Property I, L.P. Apparatus, storage medium and method for adaptive bitrate streaming adaptation of variable bitrate encodings
CN111385576B (zh) * 2018-12-28 2021-08-10 北京字节跳动网络技术有限公司 视频编码方法、装置、移动终端及存储介质
CN110381315B (zh) * 2019-07-01 2021-08-17 西安万像电子科技有限公司 码率控制方法及装置
CN112396559A (zh) * 2019-08-19 2021-02-23 王艳苓 直播画面定向美颜平台
CN114125451B (zh) * 2021-12-01 2022-12-06 锐宸微(上海)科技有限公司 视频编码方法、视频编码装置及影像处理装置
CN114466189B (zh) * 2021-12-27 2024-05-28 浙江大华技术股份有限公司 码率控制方法、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1378384A (zh) * 2001-03-23 2002-11-06 夏普公司 基于比特率预测和预测误差能量的自适应量化
WO2007058515A1 (en) * 2005-11-21 2007-05-24 Electronics And Telecommunications Research Institute Method and apparatus for controlling bitrate of scalable video stream
CN101102494A (zh) * 2007-07-23 2008-01-09 武汉大学 一种视频转码中宏块级码率控制方法
CN101159871A (zh) * 2007-11-12 2008-04-09 中兴通讯股份有限公司 宏块组级视频码率控制方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8311113B2 (en) * 2004-11-12 2012-11-13 Broadcom Corporation Method and system for using motion prediction to equalize video quality across intra-coded frames
CN1658673A (zh) * 2005-03-23 2005-08-24 南京大学 视频压缩编解码方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1378384A (zh) * 2001-03-23 2002-11-06 夏普公司 基于比特率预测和预测误差能量的自适应量化
WO2007058515A1 (en) * 2005-11-21 2007-05-24 Electronics And Telecommunications Research Institute Method and apparatus for controlling bitrate of scalable video stream
CN101102494A (zh) * 2007-07-23 2008-01-09 武汉大学 一种视频转码中宏块级码率控制方法
CN101159871A (zh) * 2007-11-12 2008-04-09 中兴通讯股份有限公司 宏块组级视频码率控制方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2227022A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428486A (zh) * 2012-05-24 2013-12-04 富士通株式会社 图像压缩方法和装置
CN103428486B (zh) * 2012-05-24 2017-06-09 富士通株式会社 图像压缩方法和装置
CN112637596A (zh) * 2020-12-21 2021-04-09 中国科学院国家空间科学中心 一种码率控制系统
CN112637596B (zh) * 2020-12-21 2023-04-11 中国科学院国家空间科学中心 一种码率控制系统

Also Published As

Publication number Publication date
US8416849B2 (en) 2013-04-09
US20100272171A1 (en) 2010-10-28
CN101534436A (zh) 2009-09-16
CN101534436B (zh) 2011-02-02
EP2227022A4 (en) 2011-08-24
EP2227022A1 (en) 2010-09-08

Similar Documents

Publication Publication Date Title
WO2009111935A1 (zh) 一种视频图像宏块级自适应码率分配方法
JP3748717B2 (ja) 動画像符号化装置
JPH08181992A (ja) 動画像符号化装置および領域抽出装置
AU2016388357A1 (en) Real-time video encoder rate control using dynamic resolution switching
CN108989802B (zh) 一种利用帧间关系的hevc视频流的质量估计方法及系统
CN109068137A (zh) 兴趣区域感知的视频编码
US7430329B1 (en) Human visual system (HVS)-based pre-filtering of video data
WO2010078759A1 (zh) 基于码率控制的图像时间域和空间域分辨率处理方法
WO2003003749A1 (en) Image encoder, image decoder, image encoding method, and image decoding method
TW201004357A (en) Rate-distortion quantization for context-adaptive variable length coding (CAVLC)
WO2019104862A1 (en) System and method for reducing video coding fluctuation
WO2006133613A1 (en) Method for reducing image block effects
JP2005328183A5 (zh)
CN107343202B (zh) 基于附加码率的无反馈分布式视频编解码方法
CN116916036A (zh) 视频压缩方法、装置及系统
JP2004215275A (ja) 動き補償に基づいた改善されたノイズ予測方法及びその装置とそれを使用した動画符号化方法及びその装置
JP3982615B2 (ja) 符号化動画像データの方式変換装置
Chi et al. Region-of-interest video coding based on rate and distortion variations for H. 263+
CN115428451A (zh) 视频编码方法、编码器、系统以及计算机存储介质
KR100601846B1 (ko) 동영상 압축 부호화기의 왜곡 최적화 장치 및 방법
CN112243129B (zh) 视频数据处理方法、装置、计算机设备及存储介质
JP5328629B2 (ja) エンコーダおよび画像変換装置
Guo et al. A Bayesian approach to block structure inference in AV1-based multi-rate video encoding
KR101737006B1 (ko) 인지 품질 기반의 변환 부호화 고속화 방법 및 장치
JP5171658B2 (ja) 画像符号化装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08873222

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 12745893

Country of ref document: US

REEP Request for entry into the european phase

Ref document number: 2008873222

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2008873222

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE