WO2010078758A1 - Method for encoding video signal - Google Patents
Method for encoding video signal Download PDFInfo
- Publication number
- WO2010078758A1 WO2010078758A1 PCT/CN2009/073589 CN2009073589W WO2010078758A1 WO 2010078758 A1 WO2010078758 A1 WO 2010078758A1 CN 2009073589 W CN2009073589 W CN 2009073589W WO 2010078758 A1 WO2010078758 A1 WO 2010078758A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- macroblock
- slice
- video signal
- frame
- rate
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000013139 quantization Methods 0.000 claims description 16
- 238000007906 compression Methods 0.000 description 5
- 230000003044 adaptive effect Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/174—Methods 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 slice, e.g. a line of blocks or a group of blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/146—Data rate or code amount at the encoder output
- H04N19/152—Data rate or code amount at the encoder output by measuring the fullness of the transmission buffer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
Definitions
- the present invention relates to video signal processing, and more particularly to a video signal encoding method.
- Mobile wireless channels have the property of error-prone:.
- the image compression after encoding by modern compression coding techniques such as H.264 is very small, which is particularly sensitive to packet loss and bit error.
- the bit error rate of the wireless channel is related to factors such as the moving speed, the bit rate, the time span of the packet, and the packet size.
- Table 1 exemplifies six application modes, which represent different motion speeds, bit rates, and time spans of packets. 6 possible application modes in wireless transmission
- bit Error Ratio refers to the Bit Error Ratio.
- BER refers to a bit error ratio (Bit Error Ratio)
- BEP refers to a bit error pattern.
- the bit error rate of the six modes increases almost linearly as the packet size increases (as the number of packets decreases). From the experiment of Fig. 1, reducing the size of the packet has a positive effect on the transmission efficiency.
- the decision of the packet size is an important factor. People try to find a balance point, even if the rate distortion performance of the encoder is not significantly reduced, and a certain network passability can be obtained. This first requires the ability to arbitrarily control the size of the encoder output packet at the NAL layer.
- Figure 2 shows the number of bits of each frame of image output encoded by the FOREMAN test sequence in a 120 kbps CBR (Constants Bit Rate). It can be seen that since the complexity of the video sequence in nature always fluctuates, and the coding modes of the individual frames are different, even if the code is coded according to the CBR mode, the number of bits generated per frame image is always larger. Fluctuations in magnitude. H.264 has designed the structure of the slice, allowing each frame of image to be cut into several slices, thus providing the conditions for the present invention. However, one of the challenges still to be solved is how to predict and control the size of each slice in real time and accurately. Summary of the invention
- the technical problem to be solved by the present invention is that the size of the above-mentioned data packet for the prior art cannot dynamically control the defect that the redundant information is increased or the rate distortion performance is not balanced, and a video signal coding capable of dynamically controlling the size of the data packet is provided. method.
- the technical solution adopted by the present invention to solve the technical problem thereof is: providing a video signal encoding method: analyzing the complexity of the previous macroblock in the current slice relative to the complexity of the already encoded macroblock in the entire slice, to predict the current Encoded macroblock "number of output bits b" ; if bicide exceeds G.8 - ⁇ m ), the current slice is cut off; if bicide does not exceed G .8 - ⁇ m ), continue to encode the macroblock ⁇ is the predicted NAL The number of bytes. ruler
- the Qp ni S frame is the quantization parameter of the ith macroblock of the frame image
- Q Pn is the normalized quantization parameter of the i th macroblock of the «th frame image.
- the " 1.1.
- the s min( , 1024).
- the video signal coding method of the present invention has the following beneficial effects: the encoder can calculate the current bit rate, the frame rate, the NAL length under the network parameters, and count the complexity of the coded macroblock and the number of output bits, and predict the current in real time.
- the complexity of the coded macroblock and the expected number of coded bits determine the slice cutoff condition, thereby controlling the size of the slice, and achieving an adaptive balance between the rate distortion performance and the bit error rate of the data packet.
- Figure 1 is the relationship between the bit error rate and the packet length
- 2 is a schematic diagram showing the fluctuation of the number of bits per frame of the FOREMAN 300 frame image
- FIG. 3 is a flow chart of a video signal encoding method of the present invention. detailed description
- the video signal encoding method of the present invention is designed to dynamically determine a target value of a packet size of each type of image, and then guide the workflow of the encoder, the method including (1) a NAL length prediction method and (2) Adaptive slice (Slice) cutoff method.
- the NAL length prediction method is used to predict the current bit rate, frame rate, and NAL length under network parameters to balance the rate-distortion performance with the channel error rate.
- the adaptive slice cutoff method is used for counting the complexity of the coded macroblock and the number of output bits, real-time predicting the complexity of the currently coded macroblock and the expected number of coded bits, and determining the slice cutoff condition, thereby controlling the slice size.
- the target average code rate t the frame rate /, s be the number of bytes predicted by the corresponding image NAL, which are:
- Equation 1 it is the adjustment factor, which is determined according to the type of image, the degree of image over-compression, and the like. Since the image compression loss basically occurs in the quantization stage, the RD (Rate Distortion) performance of the image can be roughly estimated using the quantization parameter values.
- the quantization parameter of the macroblock is Qp ⁇ the quantization parameter of each macroblock of the previous frame image Fmme ⁇ is till -1>;
- the quantization parameter is too high, it means that F rawegestion—, if the over-compression condition is serious, increase the size of NAL in F ra ⁇ admir (That is, the number of bits), thereby compensating for the rate-distortion performance; conversely, if the quantization parameter of F rawegestion ⁇ is low, meaning that the quality of Fra ⁇ is good, the size of the NAL (ie, the number of bits) in ⁇ is reduced, thereby Reduce the bit error rate in the channel and improve the network passability of the code stream.
- the types of macroblocks of type I, P, and B are different, and the quantization strategy will be different.
- the I picture as the motion reference source of the entire GOP needs to have the highest rate distortion performance, and its quantization parameter is generally 2 ⁇ 3 higher than the P picture ; P and B pictures also have a high reference value in time, and the quantization parameter is usually 2 higher than the B picture. So you can do similar normalization on Qp ⁇ :
- Equation (3) ⁇ Value according to equation (3).
- the model described by equation (3) has the advantage of small computation, simple and accurate.
- 21 is almost the starting point of the quantization parameter at the low bit rate, and the encoder works at the low code rate. In the interval, it is hardly lower than 21.
- the encoder works according to the bit number principle of the NAL analyzed above, that is, the larger the quantization parameter, the larger the distortion, and the NAL size is expanded to improve the rate distortion performance; the smaller the quantization parameter, the rate distortion performance quality. High, you can reduce the number of NAL bytes to reduce the network error rate.
- the main idea of the method is to predict the number of output bits of the current coded macroblock by analyzing the complexity of the previous macroblock in the current slice relative to the complexity of the coded macroblock in the entire slice; Deadline.
- the encoder can calculate the current bit rate, the frame rate, the NAL length under the network parameters, and calculate the complexity of the coded macroblock and the number of output bits, and predict the complexity of the current coded macroblock in real time.
- the degree and the expected number of coded bits determine the condition of the slice cutoff, thereby controlling the size of the slice, and achieving an adaptive balance between the rate distortion performance and the bit error rate of the data packet.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
A method for encoding video information is provided, and it includes the steps as follows: in present slice, analyzing the change of the complexity of previous macro-block(MB) relative to the complexity of the MB encoded in the entire slice, predicting the outputted amount of bits bn of current encoded MB n, if bn has exceeded Formula (I), stopping encoding the present slice, if bn has not exceeded Formula (I), continuing to encode the MB; said s is the amount of predicted NAL bytes.
Description
一种视频信号编码方法 技术领域 Video signal coding method
本发明涉及视频信号处理, 更具体地说, 涉及一种视频信号编码方法。 The present invention relates to video signal processing, and more particularly to a video signal encoding method.
背景技术 Background technique
移动无线信道具有易错 ( error-prone:)的性质。 而象 H.264这类现代压縮 编码技术编码后的图象冗余度非常小, 从而对数据包的丢失、 误码特别敏感。 无线信道的误码率与移动速度、 比特率、 包的时间跨度、 包大小等因素相关。 表 1例举了 6种应用模式,分别表示不同的运动速度、比特率、包的时间跨度。 无线传输中可能的 6种应用模式 Mobile wireless channels have the property of error-prone:. However, the image compression after encoding by modern compression coding techniques such as H.264 is very small, which is particularly sensitive to packet loss and bit error. The bit error rate of the wireless channel is related to factors such as the moving speed, the bit rate, the time span of the packet, and the packet size. Table 1 exemplifies six application modes, which represent different motion speeds, bit rates, and time spans of packets. 6 possible application modes in wireless transmission
*BER, 是指比特误码率 (Bit Error Ratio)。 图 1中显示了这 6种模式在无线信道中的误码率随着包尺寸改变的变化。 图 1中, BER是指比特误码率 (Bit Error Ratio), BEP是指比特误码的模式(Bit Error Pattern)。从图 1中可以看到,随着包尺寸的增加(伴随着包数目的减少), 6种模式的误码率几乎都呈线性增长。从图 1的实验来看,减少包尺寸的大小, 对传输效率有正面影响, 然而, 从编码器率失真性能看, 包尺寸减小, 意味着 NAL (网络提取层) 数目增多, 由于每个 NAL必须独立被解码, 意味着冗余 信息的增多, 这会导致: Slice NAL (片网络提取层) 内部的 Slice (片) 片头
必须包含重复的 slice header (片头)句法元素, Slice NAL内部的 Slice不能互 相参考, 从而降低帧内编码宏块的率失真性能。 *BER, refers to the Bit Error Ratio. The change in the bit error rate of the six modes in the wireless channel as the packet size changes is shown in FIG. In Fig. 1, BER refers to a bit error ratio (Bit Error Ratio), and BEP refers to a bit error pattern. As can be seen from Figure 1, the bit error rate of the six modes increases almost linearly as the packet size increases (as the number of packets decreases). From the experiment of Fig. 1, reducing the size of the packet has a positive effect on the transmission efficiency. However, from the perspective of the encoder rate distortion performance, the packet size is reduced, which means that the number of NALs (network abstraction layers) increases, because each NAL must be decoded independently, which means that redundant information is increased, which leads to: Slice NAL (slice network extraction layer) internal slice (slice) slice header Must include duplicate slice header syntax elements. Slices inside Slice NAL cannot refer to each other, thus reducing the rate-distortion performance of intra-coded macroblocks.
在无线信道中传输,数据包大小的决策问题是一个重要的因素。人们试图 找到一个平衡点, 既使编码器的率失真性能不明显下降, 又能得到一定的网络 通过性。 这首先需要能够在 NAL层任意控制编码器输出数据包的尺寸。 In the wireless channel transmission, the decision of the packet size is an important factor. People try to find a balance point, even if the rate distortion performance of the encoder is not significantly reduced, and a certain network passability can be obtained. This first requires the ability to arbitrarily control the size of the encoder output packet at the NAL layer.
图 2显示了按照 120kbps CBR (Constants Bit Rate, 恒比特率) 方式编码 FOREMAN测试序列的每帧图象输出的比特数。 可以看到, 由于自然界中的 视频序列在时间上的复杂度总是波动的, 而且各个帧的编码模式不一, 即使是 按照 CBR模式编码, 每帧图象产生的比特数总是在较大幅度上波动。 H.264 设计了片的结构, 允许每一帧图象可以切割为若干个片, 从而为本发明提供了 条件。 然而, 仍然要解决的一个难题是如何能实时、 精确地预测、 控制每个片 的尺寸大小。 发明内容 Figure 2 shows the number of bits of each frame of image output encoded by the FOREMAN test sequence in a 120 kbps CBR (Constants Bit Rate). It can be seen that since the complexity of the video sequence in nature always fluctuates, and the coding modes of the individual frames are different, even if the code is coded according to the CBR mode, the number of bits generated per frame image is always larger. Fluctuations in magnitude. H.264 has designed the structure of the slice, allowing each frame of image to be cut into several slices, thus providing the conditions for the present invention. However, one of the challenges still to be solved is how to predict and control the size of each slice in real time and accurately. Summary of the invention
本发明要解决的技术问题在于,针对现有技术的上述数据包的大小不能动 态控制导致冗余信息增多或者率失真性能不能均衡的缺陷,提供能够动态控制 数据包的大小的一种视频信号编码方法。 The technical problem to be solved by the present invention is that the size of the above-mentioned data packet for the prior art cannot dynamically control the defect that the redundant information is increased or the rate distortion performance is not balanced, and a video signal coding capable of dynamically controlling the size of the data packet is provided. method.
本发明解决其技术问题所采用的技术方案是: 提供一种视频信号编码方 法: 分析当前片中, 前一个宏块的复杂度相对于整个片中已经编码宏块的复杂 度变化, 来预测当前编码宏块《输出比特数目 b„; 如果 b„超过 G .8 - ^m ), 则当前片截止;如果 b„不超过 G .8 - ^m ),则继续编码宏块 ^是预测的 NAL 字节数。
尺 The technical solution adopted by the present invention to solve the technical problem thereof is: providing a video signal encoding method: analyzing the complexity of the previous macroblock in the current slice relative to the complexity of the already encoded macroblock in the entire slice, to predict the current Encoded macroblock "number of output bits b"; if b„ exceeds G.8 - ^ m ), the current slice is cut off; if b„ does not exceed G .8 - ^ m ), continue to encode the macroblock ^ is the predicted NAL The number of bytes. ruler
在本发明所述的视频信号编码方法中, 所述 b„=6, ■a In the video signal encoding method of the present invention, the b„=6, ■a
其中, b„即为宏块《编码比特数的预测值,
, 表示宏 块《内部所有 4 X 4小块残差系数的平方和; C„ ;^(0≤ ^,/≤3)是宏块《内部位 于坐标 (, 的^/个残差系数; "是调节因子, 其取值范围为 0.5〜2; 所述. Where b „ is the macroblock “predicted value of the number of coded bits, , denotes the macroblock "the sum of the squares of all internal 4 X 4 small residual coefficients; C „ ; ^(0 ≤ ^, / ≤ 3) is the macroblock "internal coordinates (, ^ / residual coefficients; " Is an adjustment factor, which ranges from 0.5 to 2 ;
8 · / 21 其中, 为目标平均码率, /为帧率, 8 · / 21 where, for the target average bit rate, / for the frame rate,
/帧 /frame
所述 Qpt Qp„厂 2 尸帧 The Qp t Qp„厂 2 corpse frame
Qpn i S帧 为第《帧图象的第 i宏块的量化参数, QPn 为第 «帧图象的第 i个宏 块的归一化量化参数。 在本发明所述的视频信号编码方法中, 所述《=1.1。 The Qp ni S frame is the quantization parameter of the ith macroblock of the frame image, and Q Pn is the normalized quantization parameter of the i th macroblock of the «th frame image. In the video signal encoding method of the present invention, the "=1.1.
在本发明所述的视频信号编码方法中, 所述 s = min( ,1024)。 In the video signal encoding method of the present invention, the s = min( , 1024).
实施本发明的视频信号编码方法,具有以下有益效果:编码器可以计算出 当前比特率、 帧率、 网络参数下的 NAL长度, 并统计已经编码宏块的复杂度 及输出比特数, 实时预测当前编码宏块的复杂度及预期编码比特数,判断片截 止的条件, 从而控制片的尺寸, 达到自适应地在率失真性能及数据包的误码率 之间作平衡的效果。 The video signal coding method of the present invention has the following beneficial effects: the encoder can calculate the current bit rate, the frame rate, the NAL length under the network parameters, and count the complexity of the coded macroblock and the number of output bits, and predict the current in real time. The complexity of the coded macroblock and the expected number of coded bits determine the slice cutoff condition, thereby controlling the size of the slice, and achieving an adaptive balance between the rate distortion performance and the bit error rate of the data packet.
附图说明 DRAWINGS
下面将结合附图及实施例对本发明作进一歩说明, 附图中: The present invention will be further described with reference to the accompanying drawings and embodiments in which:
图 1是误码率与包长度的关系; Figure 1 is the relationship between the bit error rate and the packet length;
图 2是 FOREMAN 300帧图象每一帧比特数的波动示意图; 2 is a schematic diagram showing the fluctuation of the number of bits per frame of the FOREMAN 300 frame image;
图 3是本发明的一种视频信号编码方法的流程图。
具体实施方式 3 is a flow chart of a video signal encoding method of the present invention. detailed description
参考图 3, 本发明的视频信号编码方法, 其思想是动态地判断各种类型图 象的数据包尺寸的目标值,继而指导编码器的工作流程,该方法包括(l ) NAL 长度预测方法和 (2) 自适应片 (Slice)截止方法。 Referring to FIG. 3, the video signal encoding method of the present invention is designed to dynamically determine a target value of a packet size of each type of image, and then guide the workflow of the encoder, the method including (1) a NAL length prediction method and (2) Adaptive slice (Slice) cutoff method.
NAL长度预测方法用于预测计算当前比特率、 帧率、 网络参数下的 NAL 长度, 以便在率失真性能与信道误码率之间作权衡。 The NAL length prediction method is used to predict the current bit rate, frame rate, and NAL length under network parameters to balance the rate-distortion performance with the channel error rate.
自适应片截止方法用于统计已经编码宏块的复杂度及输出比特数,实时预 测当前编码宏块的复杂度及预期编码比特数,判断片截止的条件,从而控制片 的尺寸。 The adaptive slice cutoff method is used for counting the complexity of the coded macroblock and the number of output bits, real-time predicting the complexity of the currently coded macroblock and the expected number of coded bits, and determining the slice cutoff condition, thereby controlling the slice size.
设目标平均码率 t, 帧率 /, s为所求取的对应图象 NAL预测的字节数, 有: Let the target average code rate t, the frame rate /, s be the number of bytes predicted by the corresponding image NAL, which are:
式 1中, 是调节因子,根据图象类型、图象过压縮程度等情况来决定 的 值。 由于图象压縮损失基本发生在量化阶段, 所以可以用量化参数值粗略地估 算图象的 RD (率失真, Rate Distortion) 性能。 In Equation 1, it is the adjustment factor, which is determined according to the type of image, the degree of image over-compression, and the like. Since the image compression loss basically occurs in the quantization stage, the RD (Rate Distortion) performance of the image can be roughly estimated using the quantization parameter values.
设当前编码图象 Fmmen, 第 宏块的量化参数为 Qp^前一帧图象 Fmme^的 各宏块量化参数为 „—1>;。 为减少计算量, 通过分析 F ,中的 1;i, 粗略 推算 Fr 的率失真性能, 然后以此预测 Fr 的情况, 如果 的量化 参数偏高,意味着 Frawe„— ,过压縮的情况严重,则增加 Fra^„中 NAL的尺寸(即 比特数), 从而补偿率失真性能; 反之, 如果 Frawe„— ,的量化参数偏低, 意味着 Fra ^— ,的质量良好, 则减少 ^^ 中 NAL的尺寸 (即比特数), 从而减少信 道中的误码率, 提高码流的网络通过性。 实际编码中, I、 P、 B类型的宏块类型不同, 量化的策略会有不同。 在编
码器中, I图象作为整个 GOP (Group of Pictures, 画面组) 的运动参考源需要 有最高的率失真性能, 它的量化参数一般会比 P图象高 2〜3; P图象对于后续 P及 B图象,在时间上也具有较高的参考价值,量化参数通常比 B图象高出 2。 所以可以对 Qp^ ,作类似归一化处理:Let the current coded image Fmme n , the quantization parameter of the macroblock is Qp^ the quantization parameter of each macroblock of the previous frame image Fmme^ is „ -1>; To reduce the calculation amount, by analyzing 1 in F, i , roughly calculate the rate distortion performance of Fr, and then predict the situation of Fr. If the quantization parameter is too high, it means that F rawe „—, if the over-compression condition is serious, increase the size of NAL in F ra ^ „ ( That is, the number of bits), thereby compensating for the rate-distortion performance; conversely, if the quantization parameter of F rawe „− is low, meaning that the quality of Fra ^− is good, the size of the NAL (ie, the number of bits) in ^^ is reduced, thereby Reduce the bit error rate in the channel and improve the network passability of the code stream. In the actual coding, the types of macroblocks of type I, P, and B are different, and the quantization strategy will be different. Editing In the encoder, the I picture as the motion reference source of the entire GOP (Group of Pictures) needs to have the highest rate distortion performance, and its quantization parameter is generally 2~3 higher than the P picture ; P and B pictures also have a high reference value in time, and the quantization parameter is usually 2 higher than the B picture. So you can do similar normalization on Qp^:
4 /帧 4 / frame
2 尸帧 (2) 2 corpse frames (2)
^按式(3 )取值。 式(3 )所描述的模型具有计算量小、 简单准确的优点, 之所以选用 21作为临界值,是因为 21几乎是低码率下压縮时量化参数的起点, 编码器工作在低码率区间时, 几乎不会低于 21。 ^ Value according to equation (3). The model described by equation (3) has the advantage of small computation, simple and accurate. The reason why 21 is used as the critical value is because 21 is almost the starting point of the quantization parameter at the low bit rate, and the encoder works at the low code rate. In the interval, it is hardly lower than 21.
0 >21时, 编码器按照上述分析的 NAL的比特数原则工作, 即量化参 数越大, 表明失真越大, 此时扩大 NAL尺寸以提升率失真性能; 量化参数越 小,表明率失真性能质量高,可以縮小 NAL的字节数以减少网络误码率。 Qpn When 0 > 21, the encoder works according to the bit number principle of the NAL analyzed above, that is, the larger the quantization parameter, the larger the distortion, and the NAL size is expanded to improve the rate distortion performance; the smaller the quantization parameter, the rate distortion performance quality. High, you can reduce the number of NAL bytes to reduce the network error rate. Qp n
<21时, 此模型不能工作。 ϊ (3 ) <21, this model does not work. ϊ (3)
21 确定 后, 就可以得出 ^的最终表达式: After 21 is determined, you can get the final expression of ^:
(4) (4)
8 · / 21 最后还需要满足 s = min(s,1024), min( ·, ·)表示最小值函数, 即当 s比 1024大 时, s的值被改为为 1024, 当 s比 1024小时, s的值不变。 这是因为 IP网络 中路由器有 MTU (Maximum Transmission Unit, 最大传输单元) 的问题。 8 · / 21 Finally, it is necessary to satisfy s = min(s, 1024), min( ·, ·) to represent the minimum function, that is, when s is larger than 1024, the value of s is changed to 1024, when s is more than 1024 hours. , the value of s does not change. This is because routers in IP networks have problems with MTU (Maximum Transmission Unit).
本方法的主要思想是, 通过分析在当前片中, 前一个宏块的复杂度相对 于整个片中已编码宏块的复杂度变化, 来预测当前编码宏块输出比特数目; 如
截止。 The main idea of the method is to predict the number of output bits of the current coded macroblock by analyzing the complexity of the previous macroblock in the current slice relative to the complexity of the coded macroblock in the entire slice; Deadline.
这个方法的优势是不需要实际编码各个宏块就能提前判断截止。 设《是当 前片中编码宏块的序号, 设^,^(0≤ , ,/≤3)是宏块《内部位于坐标(, 的 个残差系数。
∑∑C2 nM,j , R„表示第《个宏块内部所有 4X4小 块残差系数的平方和。 The advantage of this method is that the cutoff can be determined in advance without actually coding each macroblock. Let "is the serial number of the coded macroblock in the current slice, set ^, ^ (0 ≤ , , / ≤ 3) is the macroblock "the internal residual coefficient of coordinates (,. ∑∑C 2 nM , j , R „ denotes the sum of the squares of the residual coefficients of all 4×4 small blocks within the “macroblock”.
式 (5) 给出第《个宏块编码比特数的预测值, 设 是第 w个宏块编码的比 特数。 6„由6„— 寸复杂度加权后预测得来: bn = bn l' R" 1 -a (5) Equation (5) gives the predicted value of the number of bits of the macroblock code, and is set to the number of bits of the wth macroblock code. 6„ is predicted by the weight of 6„-inch complexity: b n = b nl ' R " 1 -a (5)
丄 式 5中《是调节因子, 在实验中观察, 取值 1.1是比较合适的值, 在具体实 施时也可以根据需要调节。 下面给出片的截止条件的算法描述: 如果 ( >^8- ^m), 则当前片截止; 否则, 继续编码第《个宏块。 通过本发明的视频信号编码方法, 编码器可以计算出当前比特率、 帧率、 网络参数下的 NAL长度, 并统计已经编码宏块的复杂度及输出比特数, 实时 预测当前编码宏块的复杂度及预期编码比特数,判断片截止的条件,从而控制 片的尺寸, 达到自适应地在率失真性能及数据包的误码率之间作平衡的效果。
In the formula 5, "is the adjustment factor. In the experiment, the value of 1.1 is a suitable value, and can be adjusted as needed in the specific implementation. The algorithm description of the slice's cutoff condition is given below: If ( >^8- ^ m ), the current slice is cut off; otherwise, the first "macroblock" is encoded. With the video signal encoding method of the present invention, the encoder can calculate the current bit rate, the frame rate, the NAL length under the network parameters, and calculate the complexity of the coded macroblock and the number of output bits, and predict the complexity of the current coded macroblock in real time. The degree and the expected number of coded bits determine the condition of the slice cutoff, thereby controlling the size of the slice, and achieving an adaptive balance between the rate distortion performance and the bit error rate of the data packet.
Claims
1、 一种视频信号编码方法, 其特征在于, 包括下列步骤: A video signal encoding method, comprising the steps of:
分析当前片中,前一个宏块的复杂度相对于整个片中已经编码宏块的复杂 度变化, 来预测当前编码宏块《输出比特数目 ¾; 如果 ¾超过 G.8- bm), 帧帧帧 In the current slice, the complexity of the previous macroblock is compared with the complexity of the already coded macroblock in the entire slice to predict the current coded macroblock "output bit number 3⁄4 ; if 3⁄4 exceeds G.8-b m ), frame Frame
则当前片截止; 如果 不超过 G.8- bm), 则继续编码第《个宏块; 所述 ^ 是预测的 NAL字节数; 所述 bm表示前 n-1个宏块的输出比特数目之和。 Then the current slice is cut off; if it does not exceed G.8-b m ), continue to encode the first macroblock; the ^ is the predicted number of NAL bytes; the b m represents the output of the first n-1 macroblocks The sum of the number of bits.
2、 根据权利要求 1所述的视频信号编码方法, 其特征在于, 所述 a
其中, 即为当前宏块 M 编码比特数的预测值, R iiiic , 2. The video signal encoding method according to claim 1, wherein said a Where is the predicted value of the number of bits of the current macroblock M code, R iiiic ,
R„表示第 M个宏块内部所有 4X4小块残差系数的平方和; Cn (0 < i, j,k,l≤ 3)是 第《个宏块内部位于坐标 (^)的 个残差系数; 《是调节因子,其取值范围为 R „ denotes the sum of the squares of the residual coefficients of all 4×4 small blocks in the Mth macroblock; C n (0 < i, j, k, l ≤ 3) is the residual of the coordinates (^) inside the macroblock Difference coefficient; "is an adjustment factor, its value range is
0.5-2; 所述0.5-2;
Q 为第 n帧图象的第 i个宏块的量化参数, QPn 为第 n帧图象的第 i个 宏块的归一化量化参数。 Q is a quantization parameter of the i-th macroblock of the nth frame image, and Q Pn is a normalized quantization parameter of the i-th macroblock of the n-th frame image.
3、 根据权利要求 2所述的视频信号编码方法, 其特征在于, 所述《=1.1。
3. The video signal encoding method according to claim 2, wherein said "=1.1.
4、 根据权利要求 1 所述 I 顷信号编码方法, 其特征在于, 所 s = min(s,1024)。
4. The method of encoding a signal according to claim 1, wherein s = min(s, 1024).
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910104867.0 | 2009-01-09 | ||
CN 200910104867 CN101778296B (en) | 2009-01-09 | 2009-01-09 | Method for coding video signal |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2010078758A1 true WO2010078758A1 (en) | 2010-07-15 |
Family
ID=42316222
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2009/073589 WO2010078758A1 (en) | 2009-01-09 | 2009-08-28 | Method for encoding video signal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101778296B (en) |
WO (1) | WO2010078758A1 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5949490A (en) * | 1997-07-08 | 1999-09-07 | Tektronix, Inc. | Distributing video buffer rate control over a parallel compression architecture |
WO2000046999A1 (en) * | 1999-02-03 | 2000-08-10 | Sarnoff Corporation | Quantizer selection based on region complexities derived using a rate distortion model |
US20070081590A1 (en) * | 2005-10-04 | 2007-04-12 | Stmicroelectronics Asia Pacific Pte Ltd | Macro-block quantization reactivity compensation |
WO2007143876A1 (en) * | 2006-06-09 | 2007-12-21 | Thomson Licensing | Method and apparatus for adaptively determining a bit budget for encoding video pictures |
CN101094411A (en) * | 2007-07-03 | 2007-12-26 | 芯瀚电子技术(上海)有限公司 | Code rate control method of video code |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1658673A (en) * | 2005-03-23 | 2005-08-24 | 南京大学 | Video compression codec method |
-
2009
- 2009-01-09 CN CN 200910104867 patent/CN101778296B/en not_active Expired - Fee Related
- 2009-08-28 WO PCT/CN2009/073589 patent/WO2010078758A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5949490A (en) * | 1997-07-08 | 1999-09-07 | Tektronix, Inc. | Distributing video buffer rate control over a parallel compression architecture |
WO2000046999A1 (en) * | 1999-02-03 | 2000-08-10 | Sarnoff Corporation | Quantizer selection based on region complexities derived using a rate distortion model |
US20070081590A1 (en) * | 2005-10-04 | 2007-04-12 | Stmicroelectronics Asia Pacific Pte Ltd | Macro-block quantization reactivity compensation |
WO2007143876A1 (en) * | 2006-06-09 | 2007-12-21 | Thomson Licensing | Method and apparatus for adaptively determining a bit budget for encoding video pictures |
CN101094411A (en) * | 2007-07-03 | 2007-12-26 | 芯瀚电子技术(上海)有限公司 | Code rate control method of video code |
Also Published As
Publication number | Publication date |
---|---|
CN101778296B (en) | 2012-05-30 |
CN101778296A (en) | 2010-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103841418B (en) | The optimization method of video monitor Rate Control and system in a kind of 3G network | |
CN102065302B (en) | H.264 based flexible video coding method | |
CN101895759B (en) | A H.264 code rate control method | |
TWI446754B (en) | Methods and apparatus for adaptive encoding of real-time information in packet-switched wireless communications | |
CN100591124C (en) | Video coding code rate control method and video data transmitting equipment | |
CN101917614B (en) | Bit rate control method based on H.264 hierarchical B-frame coding structure | |
CN101895758B (en) | H.264 code rate control method based on frame complexity | |
CN101867802A (en) | Two-stage code rate control method based on encoder and buffer memory | |
KR101482484B1 (en) | A video packet scheduling method for multimedia streaming | |
CN100563338C (en) | A constant code rate control method | |
CN102075784B (en) | Video quality assessment method under condition of comprehensively considering compression and packet loss impairment | |
CN102752591B (en) | H.264 code rate control method based on comprehensive factor | |
WO2014209494A1 (en) | Video streaming quality of experience degradation control using a video quality metric | |
CN102724502B (en) | The control method of code check and device in a kind of Video coding | |
CN102158702B (en) | Adaptive H.264 code rate control method | |
CN102271248B (en) | A H.264/AVC Macroblock-Level Rate Control Algorithm Based on Weighted Window Model | |
Kuo et al. | Modeling and analysis of frame-level forward error correction for MPEG video over burst-loss channels | |
WO2010078758A1 (en) | Method for encoding video signal | |
JP5212319B2 (en) | Encoding apparatus, encoding method, and encoding program | |
CN100448295C (en) | A Low Complexity Integral Code Rate Control Method | |
CN115550655A (en) | Code rate control method for real-time monitoring scene | |
Dhamodaran et al. | Adaptive bitstream prioritization for dual TCP/UDP streaming of HD video | |
Zhu et al. | Cross-layer design of source rate control and QoS-aware congestion control for wireless video streaming | |
TWI847618B (en) | Encoder and associated signal processing method | |
Choi et al. | Cross-layer transmission scheme for wireless H. 264 using distortion measure and MAC-level error-control |
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: 09837316 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29/11/11. |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 09837316 Country of ref document: EP Kind code of ref document: A1 |