[go: up one dir, main page]

CN1568008A - Motion Image Compression Bit Rate Control Method and Device Using Initial Quantization Scale Estimation - Google Patents

Motion Image Compression Bit Rate Control Method and Device Using Initial Quantization Scale Estimation Download PDF

Info

Publication number
CN1568008A
CN1568008A CN 03147765 CN03147765A CN1568008A CN 1568008 A CN1568008 A CN 1568008A CN 03147765 CN03147765 CN 03147765 CN 03147765 A CN03147765 A CN 03147765A CN 1568008 A CN1568008 A CN 1568008A
Authority
CN
China
Prior art keywords
picture
complexity
present picture
mentioned
activity
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN 03147765
Other languages
Chinese (zh)
Other versions
CN1265648C (en
Inventor
张永清
陈家杰
王登楷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Silicon Integrated Systems Corp
Original Assignee
Silicon Integrated Systems Corp
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 Silicon Integrated Systems Corp filed Critical Silicon Integrated Systems Corp
Priority to CN 03147765 priority Critical patent/CN1265648C/en
Publication of CN1568008A publication Critical patent/CN1568008A/en
Application granted granted Critical
Publication of CN1265648C publication Critical patent/CN1265648C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A method and apparatus for controlling bit rate of motion picture compression, which performs bit allocation at a picture level using an estimated initial quantization level. According to the present invention, a target bit limit is allocated to the current picture to be coded according to the relationship between the pre-analyzed activity of the current picture and the actual complexity of the previously coded picture of the same type, and once the target bit limit is determined, the average quantization level initial value for coding the current picture is determined according to the total activity of the current picture, the target bit limit and the activity-to-complexity ratio of the previously coded picture of the same type. Under the condition of a predetermined bit quota, by using the above average quantization level initial value, a higher picture quality can be obtained.

Description

利用初始量化位阶预估的动态影像压缩位元率控制方法及装置Motion Image Compression Bit Rate Control Method and Device Using Initial Quantization Scale Estimation

技术领域technical field

本发明有关于数据压缩的领域,特别指一种适用于视讯编码系统以估计的初始量化位阶执行位元率控制的方法及装置。The present invention relates to the field of data compression, in particular to a method and device suitable for performing bit rate control with an estimated initial quantization level in a video coding system.

背景技术Background technique

众所周知,电子通讯世界正经历一次数字革命,以数字表示信息的主要优点在于能够几近无误地储存、再生、传收、处理及运用的数据比特流(bitstream)。举例而言,NTSC的彩色视讯影像每秒有29.97张画面,每张画面约480条可见扫瞄线,每条扫瞄线约需480点以红、绿、蓝三色呈现的像素(pixel),但若每种色彩成分以8位编码,则所产生的位率(bitrate)每秒约168兆位(Mbits/s),故各种视讯格式其未经压缩处理的位率是非常高而不经济,因此不适于多数的应用。As we all know, the electronic communication world is undergoing a digital revolution. The main advantage of representing information digitally is the data bit stream (bitstream) that can be stored, reproduced, transmitted, processed and utilized almost without error. For example, NTSC color video images have 29.97 frames per second, and each frame has about 480 visible scan lines, and each scan line requires about 480 pixels in red, green, and blue colors. , but if each color component is encoded with 8 bits, the resulting bit rate (bitrate) is about 168 megabits per second (Mbits/s), so the uncompressed bit rate of various video formats is very high and Uneconomical and therefore unsuitable for most applications.

与计算机、电信网络、消费性产品整合的数字音讯和视讯,更加刺激信息革命的前进,而这革命的核心则是视、音讯的数字压缩技术。许多的压缩标准,包含以压缩技术共通的精髓为基础的算法,如:ITU-T(前身为CCITT)建议书H.261和H.263,以及ISO/IEC的MPEG-1、MPEG-2和MPEG-4标准。MPEG的算法是由动态影像专家群组(Moving Picture Experts Group,MPEG)所发展出来,该动态影像专家群组为国际标准组织(International Standards Organization,ISO)及国际电子技术委员会(International Electrotechnical Commission,IEC)的联合技术委员会,致力于发展视、音讯的压缩及多路传殊的表现方式,这些标准规定了压缩比特流的语法(syntax)以及译码的方法,但对于编码器所使用的算法而言,却为编码的新颖性与多样性保留了相当多的自由度。The integration of digital audio and video with computers, telecommunication networks, and consumer products has further stimulated the progress of the information revolution, and the core of this revolution is the digital compression technology of audio and video. Many compression standards include algorithms based on the common essence of compression technology, such as: ITU-T (formerly known as CCITT) recommendations H.261 and H.263, and ISO/IEC MPEG-1, MPEG-2 and MPEG-4 standard. The algorithm of MPEG is developed by the Moving Picture Experts Group (MPEG), which is the International Standards Organization (International Standards Organization, ISO) and the International Electrotechnical Commission (International Electrotechnical Commission, IEC). ) joint technical committee dedicated to the development of video and audio compression and multi-channel representation. These standards stipulate the syntax (syntax) and decoding method of the compressed bit stream, but the algorithm used by the encoder is different However, it retains a considerable degree of freedom for the novelty and diversity of coding.

根据MPEG,一连串的视讯画面(picture)分成一序列的画面群组(group ofpicture,GOP),其中每组GOP以I-画面开始,后面跟着P-画面和B-画面的安排,图1以显示的顺序说明一组典型的GOP。I-画面的编码毋须参考先前或将来的画面,P-画面则参考连串的视讯画面中在时间上最接近的I-画面或P-画面来进行编码,而B-画面散布于I-画面和P-画面之间。并且利用先前的、将来的或两者兼具的紧邻I-画面和P-画面来编码。虽然好几张B-画面可以紧接着连续出现,但绝不能以B-画面预估其它的画面。According to MPEG, a series of video pictures (pictures) are divided into a sequence of picture groups (group of picture, GOP), wherein each group of GOP starts with I-picture, followed by the arrangement of P-picture and B-picture, as shown in Figure 1 The sequence of shows a typical set of GOPs. The encoding of I-pictures does not need to refer to previous or future pictures. P-pictures are coded with reference to the closest I-picture or P-picture in time in a series of video pictures, and B-pictures are interspersed with I-pictures. and between P-pictures. And coded with immediately adjacent I-pictures and P-pictures, previous, future, or both. Although several B-pictures can appear in succession, B-pictures should never predict other pictures.

每张画面具有三种成分:亮度值(luminance,以Y表示),红色差值(redcolor difference,以Cr表示),以及蓝色差值(blue color difference,以Cb表示)。对于MPEG的4:2:0的格式而言,每一种Cr和Cb成分的取样点在水平与垂直方向只有Y成分的一半。如图2所示,一张MPEG的画面其基本构成方块为大区块(macroblock,以MB表示)。以4:2:0的视讯为例,每个MB包含一个Y成分16×16取样点的数组,以及两个Cr和Cb成分8×8取样点的区块,其中Y成分16×16取样点的数组实际上由4个8×8取样点的区块所组成。Each picture has three components: luminance value (luminance, represented by Y), red color difference (red color difference, represented by Cr), and blue color difference (blue color difference, represented by Cb). For the MPEG 4:2:0 format, the sampling points of each Cr and Cb component are only half of the Y component in the horizontal and vertical directions. As shown in FIG. 2 , the basic blocks of an MPEG picture are macroblocks (denoted by MB). Taking 4:2:0 video as an example, each MB contains an array of 16×16 sampling points for the Y component, and two blocks of 8×8 sampling points for the Cr and Cb components, of which the Y component is 16×16 sampling points The array of is actually composed of 4 blocks of 8×8 sampling points.

编码器的作用在于决定何种画面编码型态以及何种预测模式为最佳。对每张I-画面,MB中的每个8×8方块均经过离散余弦转换(discrete cosinetransform,DCT)而形成8×8转换系数数组,转换系数接着以一量化矩阵进行量化,然后用Z字形(zig-zag)扫瞄DCT系数的量化结果而得到一连串的DCT系数,并且此DCT系数序列以可变长度码(variable length code,VLC)进行编码。P-画面必须决定将每个MB以I型MB或P型MB进行编码,I型MB的编码以上述的方式为之,而对于每个P型MB,则需得到该MB以先前画面所做的预测,此预测由一种移动向量(motion vector)获得,移动向量象征着目前画面中即将编码的MB及其在先前画面中的预估MB之间的变动,预估MB与目前MB间的预测误差则以DCT、量化、Z字形扫瞄以及VLC进行编码。The role of the encoder is to determine which picture coding type and which prediction mode is the best. For each I-picture, each 8×8 block in the MB undergoes a discrete cosine transform (discrete cosine transform, DCT) to form an 8×8 transformation coefficient array. The transformation coefficients are then quantized with a quantization matrix, and then zigzag (zig-zag) scans the quantized result of the DCT coefficients to obtain a series of DCT coefficients, and the DCT coefficient sequence is coded with a variable length code (variable length code, VLC). A P-picture must decide whether to encode each MB as an I-type MB or a P-type MB. The encoding of the I-type MB is done in the above-mentioned way, and for each P-type MB, it is necessary to obtain the MB that was done in the previous picture. The prediction is obtained by a motion vector, which represents the change between the MB to be coded in the current picture and the predicted MB in the previous picture, and the difference between the predicted MB and the current MB Prediction errors are coded in DCT, quantization, zigzag, and VLC.

处理B-画面时,必须决定以下列何种MB模式来编码每个MB:I模式、F模式、B模式以及FB模式。I模式以MB本身而不借助移动补偿来编码(如I型MB一般);F模式为单向的向前预测编码,以先前画面得到移动补偿的预估(如P型MB一般);反之,B模式为单向的向后预测编码,以后来的画面得到移动补偿的预估。特别的是FB模式,其为双向的预测编码,运用向前的和向后的移动补偿预估两者来做内插(interpolation)而得到FB模式的移动补偿预估。对F、B和FB模式而言,预测误差可以使用DCT、量化、Z字形扫瞄以及VLC进行编码。When processing B-pictures, one must decide in which of the following MB modes to encode each MB: I mode, F mode, B mode, and FB mode. I mode is coded by MB itself without motion compensation (like I-type MB); F mode is unidirectional forward predictive coding, and the prediction of motion compensation is obtained from the previous picture (like P-type MB); otherwise, The B mode is unidirectional backward predictive coding, and the motion compensation estimation is obtained from the subsequent pictures. In particular, the FB mode is a bi-directional predictive coding, using both forward and backward motion compensation predictions for interpolation to obtain the motion compensation prediction of the FB mode. For F, B and FB modes, the prediction error can be coded using DCT, quantization, zigzag and VLC.

视讯编码器很重要的一点即为位元率的控制。位元率控制的主要目的为很有智能地分配编码每张画面及其中每个MB所用的位元数,使编码过的视讯于译码器进行译码时,能尽可能的提高编码视讯的视觉品质。编码器必须为整张画面选取量化位阶以便在给定的位元率下控制可见的失真,然而,以选取的量化位阶编码一张画面所用的实际位元数,必然是在实际编码之后才会得知,现实中并不存在一个逆转函数,能够在给定希望达到的量化位阶下,决定一张画面所用的实际位元数。MPEG的关键特征则采用适应性(或是可变的)量化方式,这种技术允许每张画面中的不同区域以不同的程度编码,而使每张画面内及不同的画面间达到平均一致的视觉品质。不过,传统的位元率控制方法却相当复杂,通常需进行好几次才能完成视讯编码的处理,除此之外,先前的技术欠缺一种适应性量化方式可以运用的简单机制,用于设定初始量化位阶而让画面品质更为平均。A very important aspect of a video codec is bit rate control. The main purpose of bit rate control is to intelligently allocate the number of bits used to encode each picture and each MB in it, so that when the encoded video is decoded by the decoder, the efficiency of the encoded video can be improved as much as possible. visual quality. The encoder must choose a quantization level for the entire picture in order to control visible distortion at a given bit rate, however, the actual number of bits used to encode a picture at the chosen quantization level must be after the actual encoding Only then will we know that there is no inversion function in reality, which can determine the actual number of bits used by a picture under the given desired quantization level. The key feature of MPEG is the adaptive (or variable) quantization method, which allows different areas in each picture to be coded to different degrees, so that the average and consistent quality can be achieved within each picture and between different pictures. visual quality. However, the traditional bit rate control method is quite complicated, and it usually takes several times to complete the video encoding process. In addition, the previous technology lacks a simple mechanism that can be used by adaptive quantization methods to set The initial quantization level makes the picture quality more average.

发明内容Contents of the invention

本发明提供一种利用初始量化位阶预估的动态影像压缩位元率控制技术,可用于单次、实时的视讯编码器,再者,亦期待能提供一种位元率控制方法及装置,于画面层级利用估计的初始量化位阶来进行位元分配压缩动态影像。The present invention provides a dynamic image compression bit rate control technology using initial quantization level estimation, which can be used in a single, real-time video encoder. Furthermore, it is also expected to provide a bit rate control method and device, The estimated initial quantization scale is used to bit-allocate and compress the motion picture at the frame level.

根据本发明,每一张画面其目标位元的分配,基于先前画面的编码结果和对即将被编码的目前画面其预先分析的活动量,一旦目标位元分配好之后,则平均量化位阶的初始值也随之决定。由目前画面的预先分析的活动量以及先前编码画面的实际复杂度间的关系,目前画面的复杂度将能够被估计而得,这种预估的目前画面复杂度对视讯编码器是非常有用的,可以更精确地分配目标位元额度给每张画面。再者,利用上述的平均量化位阶初始值,视讯编码器在既定的位元配额条件下,可输出较佳的画面品质。According to the present invention, the allocation of target bits for each picture is based on the encoding results of previous pictures and the pre-analyzed activity of the current picture to be encoded. Once the target bits are allocated, the average quantization level The initial value is also determined accordingly. From the relationship between the pre-analyzed activity of the current picture and the actual complexity of the previously encoded picture, the complexity of the current picture can be estimated. This estimated current picture complexity is very useful for video encoders , can more accurately allocate the target bit quota to each picture. Furthermore, by using the above-mentioned initial value of the average quantization scale, the video encoder can output better picture quality under a given bit quota condition.

本发明针对于一种利用初始量化位阶预估的动态影像压缩位元率控制方法。首先为一即将被编码的目前画面来计算其全活动量,其中该目前画面在一视讯序列的一组连续画面之中;接着基于目前画面的全活动量以及这组连续画面中同型态的先前编码画面其活动量对复杂度之比,估计目前画面的复杂度,并且以目前画面预估的复杂度更新本组连续画面的瞬间复杂度;目前画面的目标位元额度的分配,依预估的复杂度以及瞬间复杂度而定;用来编码目前画面的平均量化位阶初始值,则可根据目前画面的全活动量、目标位元额度以及同型态的先前编码画面其活动量对复杂度之比来决定;因此,基于平均量化位阶初始值,对视讯序列中的目前画面进行编码。在目前画面编码之后,根据目前画面的全活动量、目前画面的实际消耗位元数和目前画面的平均量化位阶,计算目前画面其活动量对复杂度之比,就这点而言,目前画面的活动量对复杂度之比与目前画面的全活动量成正比,而与目前画面的实际消耗位元数以及平均量化位阶成反比。The present invention is directed to a motion image compression bit rate control method using initial quantization scale estimation. Firstly, the total motion is calculated for a current frame to be encoded, wherein the current frame is in a group of consecutive frames of a video sequence; then based on the total motion of the current frame and the same type of frames in the group of consecutive frames The ratio of the amount of activity to the complexity of the previous coded picture estimates the complexity of the current picture, and updates the instantaneous complexity of this group of continuous pictures with the estimated complexity of the current picture; the allocation of the target bit quota of the current picture is based on the expected The estimated complexity and instantaneous complexity are determined; the initial value of the average quantization level used to encode the current picture can be determined according to the total activity of the current picture, the target bit amount, and the activity of the previous encoded picture of the same type. The ratio of complexity; therefore, the current frame in the video sequence is encoded based on the average quantization scale initial value. After the current picture is encoded, the ratio of the current picture's activity to complexity is calculated according to the current picture's total activity, the current picture's actual consumption of bits, and the current picture's average quantization level. In this regard, the current The ratio of activity to complexity of a picture is directly proportional to the total activity of the current picture, and inversely proportional to the actual number of consumed bits and the average quantization level of the current picture.

另一方面,本发明还揭露一种利用初始量化位阶预估的动态影像压缩位元率控制装置,包括一移动估算单元、一复杂度估计器、一配额分派器、一量化位阶估计器以及一参数更新器。移动估算单元接收视讯序列里的一组连续画面中即将被编码的目前画面,用来在执行移动估算的区块匹配时,计算此目前画面的全活动量。基于目前画面的全活动量以及这组连续画面中同型态的先前编码画面其活动量对复杂度之比,复杂度估计器可因此用来估计目前画面的复杂度。以目前画面预估的复杂度,配额分派器更新本组连续画面的瞬间复杂度,且根据预估的复杂度以及瞬间复杂度,分配目标位元额度给目前画面。用来编码目前画面的平均量化位阶初始值,则由量化位阶估计器以目前画面的全活动量、目标位元额度以及同型态的先前编码画面其活动量对复杂度之比为基础来决定。而参数更新器根据目前画面的全活动量、目前画面的实际消耗位元数和目前画面的平均量化位阶,计算目前画面其活动量对复杂度之比,其中,目前画面的活动量对复杂度之比与目前画面的全活动量成正比,而与目前画面的实际消耗位元数以及平均量化位阶成反比。On the other hand, the present invention also discloses a motion image compression bit rate control device using initial quantization level estimation, including a motion estimation unit, a complexity estimator, a quota allocator, and a quantization level estimator and a parameter updater. The motion estimation unit receives a current frame to be encoded in a group of consecutive frames in the video sequence, and is used to calculate the total motion of the current frame when performing block matching for motion estimation. The complexity estimator can thus be used to estimate the complexity of the current picture based on the total activity of the current picture and the activity-to-complexity ratio of previously encoded pictures of the same type in the group of consecutive pictures. Based on the estimated complexity of the current frame, the quota allocator updates the instantaneous complexity of the group of continuous frames, and allocates the target bit quota to the current frame according to the estimated complexity and the instantaneous complexity. The initial value of the average quantization scale used to encode the current picture is based on the total activity of the current picture, the target bit quota, and the activity-to-complexity ratio of previously encoded pictures of the same type by the quantization scale estimator to decide. The parameter updater calculates the ratio of the current picture's activity to the complexity based on the current picture's total activity, the current picture's actual consumption of bits, and the current picture's average quantization level. The ratio of speed is directly proportional to the total activity of the current picture, and inversely proportional to the actual number of consumed bits and the average quantization level of the current picture.

附图说明Description of drawings

图1以显示的顺序呈现典型的画面群组(GOP);Figure 1 presents typical groups of pictures (GOPs) in the order shown;

图2为MPEG的大区块;Fig. 2 is the big block of MPEG;

图3为本发明较佳实施例的位元率控制装置的方块示意图;以及FIG. 3 is a schematic block diagram of a bit rate control device according to a preferred embodiment of the present invention; and

图4为本发明的操作流程图。Fig. 4 is an operation flowchart of the present invention.

图号说明Description of figure number

300     动态影像视讯编码器    310    移动估算单元300 Motion Image Video Encoder 310 Motion Estimation Unit

312     讯号线                320    复杂度估计器312 Signal Line 320 Complexity Estimator

330     配额分派器            340    参数更新器330 Quota Allocator 340 Parameter Updater

350     量化位阶估计器        360    影像编码器350 Quantization Scale Estimator 360 Image Encoder

P(i)   画面                   A(i)  全活动量P (i) screen A (i) full activity

Cest (i)预估复杂度             ACR(i)活动量对复杂度之比C est (i) Estimated complexity ACR (i) Ratio of activity to complexity

EB      超用位量               TB(i) 目标位元额度EB Overused Bits TB (i) Target Bit Quota

AQ(i)  平均量化位阶           UB(i) 实际消耗位元数AQ (i) Average quantization level UB (i) Actual number of bits consumed

Qest (i)平均量化位阶初始值     CD     编码后的数据Q est (i) Average quantization scale initial value CD coded data

具体实施方式Detailed ways

为使本发明的上述目的、特征和优点能更明显易懂,下文特举一较佳实施例,并配合所附图式,作详细说明如下:In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and understandable, a preferred embodiment is specifically cited below, and in conjunction with the accompanying drawings, the detailed description is as follows:

一开始,预测用的I-画面和P-画面必须先在MPEG编码器内译码,利用计算原始画面及译码的画面间的均方根(root mean square)误差,可以得到译码画面其品质的客观量度。以均方根误差作为解码画面的失真度,则解码画面的复杂度(complex)-C定义如下:At the beginning, the I-picture and P-picture used for prediction must be decoded in the MPEG encoder first, and the root mean square (root mean square) error between the original picture and the decoded picture can be calculated to obtain the other parameters of the decoded picture. An objective measure of quality. Taking the root mean square error as the distortion degree of the decoded picture, the complexity (complex)-C of the decoded picture is defined as follows:

C=r×dC=r×d

其中,r系编码该画面所需的位元率,d系译码的画面的失真度。理论上,平均的量化位阶(quantization step size)和失真度之间为一比例关系,故,画面的复杂度可定义成:Wherein, r is the bit rate required for encoding the picture, and d is the distortion degree of the decoded picture. Theoretically, there is a proportional relationship between the average quantization step size and the degree of distortion. Therefore, the complexity of the picture can be defined as:

CC ≈≈ rr ×× qq 22

其中,q系该画面的平均量化位阶。在画面编码之后,将可得知位元率(实际消耗位数)以及平均量化位阶,而该画面的复杂度亦因此获得。Wherein, q is the average quantization level of the picture. After the picture is encoded, the bit rate (actual number of bits consumed) and the average quantization level will be known, and the complexity of the picture will be obtained accordingly.

画面的复杂度端视画面的本质及其编码的形式而定。先前技术利用最近编码画面的复杂度来表示目前画面的复杂度,并且为I-、P-及B-画面分别保持其复杂度以减轻不同编码形式的影响,倘若视讯序列的画面其内容为平顺的变化,则此方式可达到相当不错的效果。然而,由于画面编码的目标位元配额与其实际消耗位元数之间不相符合,如果视讯序列的内容大幅变动,上述方式并不适合用来达成一致的视觉品质。The complexity of the picture depends on the nature of the picture and its encoding form. The prior art uses the complexity of the most recently coded picture to represent the complexity of the current picture, and maintains its complexity for I-, P- and B-pictures respectively to mitigate the impact of different encoding forms, provided that the content of the picture in the video sequence is smooth changes, this method can achieve quite good results. However, due to the discrepancy between the target bit quota of frame coding and the actual consumed bits, if the content of the video sequence changes greatly, the above method is not suitable for achieving consistent visual quality.

根据本发明,预先分析目前画面的活动量(activity)以及先前编码画面的实际复杂度之间的关系,目前画面的复杂度将能由此预估。活动量为一种在画面编码后其位元率和品质的量度尝试,假设一整张画面的全活动量A正比于复杂度C,则According to the present invention, the relationship between the activity of the current picture and the actual complexity of the previously coded picture is pre-analyzed, and the complexity of the current picture can be estimated accordingly. The amount of activity is an attempt to measure the bit rate and quality of a picture after encoding. Assuming that the total amount of activity A of a whole picture is proportional to the complexity C, then

AA == kk ×× CC ≈≈ kk 22 ×× rr ×× qq == kk ′′ ×× rr ×× qq

其中,k系比例常数。若k′为活动量对复杂度之比(activity-to-complexity ratio,ACR),则全活动量A还可以下列式子表示:Among them, k is a constant of proportionality. If k' is the activity-to-complexity ratio (activity-to-complexity ratio, ACR), then the total activity A can also be expressed by the following formula:

A=ACR×r×qA=ACR×r×q

根据本发明,可以从相同型态的先前编码画面来预估ACR。观念上,先在编码一张画面前计算其全活动量A,然后,即将被编码的画面P(i)的复杂度Cest (i)以如下方式估算:According to the present invention, ACR can be estimated from previously coded pictures of the same type. Conceptually, before encoding a picture, its total activity A is calculated, and then the complexity C est (i ) of the picture P (i) to be encoded is estimated as follows:

CC estest (( ii )) == AA (( ii )) ACRACR (( ii -- 11 ))

其中,A(i)系画面P(i)的全活动量,ACR(i-l)系同型态的先前编码画面其活动量对复杂度之比。以下,在符号或变量中的上标(i)表示该符号或变量与即将被编码的目前画面有关;同理,在符号或变量中的上标(i-l)则与先前编码画面相关。Wherein, A (i) is the total activity of the picture P (i) , and ACR (il) is the ratio of the activity to the complexity of the previously coded picture of the same type. Hereinafter, a superscript (i) in a symbol or variable indicates that the symbol or variable is related to the current picture to be encoded; similarly, a superscript (il) in a symbol or variable is related to a previously coded picture.

估计的复杂度Cest (i)可用来为合适型态的画面更新其复杂度,所以三种型态的画面其复杂度CI、CP和CB将分别储存以利后续的处理。一组连续画面的瞬间复杂度(instantaneous complexity)亦以如下方式更新:The estimated complexity C est (i) can be used to update the complexity of the appropriate type of frame, so the complexities C I , CP and C B of the three types of frames are stored for subsequent processing. The instantaneous complexity of a sequence of pictures is also updated as follows:

INST_C=NI×CI+NP×CP+NB×CB INST_C=N I ×C I +N P ×C P +N B ×C B

其中,NI、NP和NB分别是该组连续画面中I-、P-及B-画面之数目,而且此处所指的一组连续画面至少包含一组GOP。一旦瞬间复杂度INST_C已经决定,则目前画面P(i)之目标位额度TB(i)Wherein, N I , N P and N B are respectively the numbers of I-, P- and B-pictures in the group of consecutive pictures, and the group of consecutive pictures referred to here includes at least one group of GOP. Once the instantaneous complexity INST_C has been determined, the target bit amount TB (i ) of the current picture P (i) is

TBTB (( ii )) == CC estest (( ii )) INSTINST __ CC ×× RR effeff

其中,Reff系一组连续画面的有效位用量。由上式可知,目标位额度TB(i)系与复杂度Cest (i)成正比,而与瞬间复杂度INST_C成反比。Wherein, R eff is the effective bit usage of a group of continuous pictures. It can be seen from the above formula that the target bit quota TB (i) is directly proportional to the complexity C est (i) , and inversely proportional to the instantaneous complexity INST_C.

所有的MPEG-2数据比特流均必须遵循MPEG-2标准的视讯缓冲器检验者(Video Buffer Verifier,VBV)规则,分配的目标额度必须受限以使VBV缓冲器不会满溢(overflow)或匮乏(underflow)。原本只有在编码后才能得到目前画面P(i)之平均量化位阶,则能于目标位元额度TB(i)决定之后予以估计,根据本发明,目前画面P(i)其预估的平均量化位阶如下:All MPEG-2 data bit streams must follow the Video Buffer Verifier (VBV) rules of the MPEG-2 standard, and the allocated target quota must be limited so that the VBV buffer will not overflow (overflow) or lack (underflow). Originally, the average quantization level of the current picture P (i) can only be obtained after encoding, and it can be estimated after the target bit amount TB (i) is determined. According to the present invention, the estimated average of the current picture P (i) The quantization scale is as follows:

QQ estest (( ii )) == AA (( ii )) TBTB (( ii )) ×× ACRACR (( ii -- 11 ))

其中,Qest (i)系当做平均量化位阶之初始值。藉助这个平均量化位阶之初始值Qest (i),视讯编码器能在既定的位元额度TB(i)下,输出较佳的画面品质。当目前画面之目标位元额度及量化位阶初始值决定好后,便可利用许多不同型态的影像编码器,像是MPEG-2标准描述的测试原型5(Test Model 5),根据目标位元额度来完成画面的压缩。Wherein, Q est (i) is used as the initial value of the average quantization scale. With the initial value Q est (i) of the average quantization scale, the video encoder can output better picture quality under the given bit quota TB (i) . After the target bit quota and the initial value of the quantization level of the current picture are determined, many different types of image encoders can be used, such as Test Model 5 described in the MPEG-2 standard, according to the target bit The amount of yuan is used to complete the compression of the picture.

目前画面在完成编码之后,其实际的复杂度将可得知,而目前画面的全活动量和实际复杂度之间的关系,ACR(i)可从以下计算得到After the encoding of the current picture is completed, its actual complexity will be known, and the relationship between the total activity of the current picture and the actual complexity, ACR (i) can be calculated from the following

ACRACR (( ii )) == AA (( ii )) AQAQ (( ii )) ×× UBUB (( ii ))

其中,ACR(i)与全活动量A(i)成正比,而与目前画面的实际消耗位元数UB(i)以及平均量化位阶AQ(i)成反比。此ACR(i)可拿来预估下一张同型态的画面之复杂度。ACR(i)可以和ACR(i-l)做线性结合来避免受到那些富含噪声画面的影响。Wherein, ACR (i) is directly proportional to the total activity A (i) , and inversely proportional to the actual consumed bit number UB (i) and the average quantization level AQ (i) of the current frame. This ACR (i) can be used to predict the complexity of the next picture of the same type. ACR (i) can be linearly combined with ACR (il) to avoid the influence of those images rich in noise.

本发明的单次(single-pass)视讯编码可由图3的较佳实施例并配合图4的操作流程图来解释。如图3所示,动态影像视讯编码器300包括一移动估算单元310、一复杂度估计器320、一配额分派器330、一参数更新器340、一量化位阶估计器350以及一影像编码器360。移动估算单元310接收视讯序列里的一组连续画面中即将被编码的目前画面P(i),用来在执行移动估算的区块匹配时,计算此目前画面P(i)的全活动量A(i)(步骤S410)。基于全活动量A(i)以及这组连续画面中同型态的先前编码画面其ACR(i-l),复杂度估计器320可用来估计目前画面的复杂度Cest (i)(步骤S420)。配额分派器330以预估的复杂度Cest (i)更新本组连续画面其瞬间复杂度INST_C,并且根据Cest (i)以及INST_C分配目标位额度TB(i)给目前画面P(i)(步骤S430)。用来编码目前画面P(i)的平均量化位阶初始值Qest (i),则由量化位阶估计器350以全活动量A(i)、目标位元额度TB(i)以及活动量对复杂度的比ACR(i-l)为基础来决定(步骤S440)。在本实施例中,影像编码器360基于初始值Qest (i)以适应性量化方式编码目前画面P(i),并且在完成后,回报实际消耗位元数UB(i)以及平均量化位阶AQ(i)给参数更新器340(步骤S450)。以全活动量A(i)、实际的消耗位元数UB(i)和实际的平均量化位阶AQ(i)为基础,参数更新器340为目前画面P(i)计算其活动量对复杂度之比ACR(i)(步骤S460)。The single-pass video encoding of the present invention can be explained by the preferred embodiment in FIG. 3 and the operation flowchart in FIG. 4 . As shown in FIG. 3, the dynamic image video encoder 300 includes a motion estimation unit 310, a complexity estimator 320, a quota allocator 330, a parameter updater 340, a quantization scale estimator 350 and an image encoder 360. The motion estimation unit 310 receives the current frame P (i) to be encoded in a group of consecutive frames in the video sequence, and is used to calculate the total activity A of the current frame P (i) when performing block matching for motion estimation (i) (step S410). The complexity estimator 320 can estimate the complexity C est (i) of the current picture based on the total activity A (i) and the ACR (il) of the same type of previously coded pictures in the group of consecutive pictures (step S420 ). The quota allocator 330 updates the instantaneous complexity INST_C of this group of continuous pictures with the estimated complexity C est (i) , and allocates the target bit quota TB (i) to the current picture P (i) according to C est (i) and INST_C (step S430). The average quantization scale initial value Q est (i) used to encode the current picture P (i) is calculated by the quantization scale estimator 350 with the total activity A (i) , the target bit quota TB (i) and the activity It is determined based on the ratio ACR (il) to the complexity (step S440). In this embodiment, the video encoder 360 encodes the current picture P (i ) in an adaptive quantization manner based on the initial value Q est (i) , and upon completion, reports the actual consumed bit number UB (i) and the average quantization bit The order AQ (i) is given to the parameter updater 340 (step S450). Based on the full activity A (i) , the actual consumed bits UB (i) and the actual average quantization scale AQ (i) , the parameter updater 340 calculates the activity pair for the current picture P (i) Degree ratio ACR (i) (step S460).

在等效上,图3的较佳实施例可考量以硬件以及/或是软件来实现。根据本发明,移动估算单元310和图3中的其它组件可以管线(pipeline)模式运作,在复杂度估计器320开始计算目前画面的复杂度之前,移动估算单元310必须先完成即将被编码的目前画面其全活动量的计算以及移动向量的估算,并且,当移动估算单元310为下张画面作准备时,复杂度估计器320和其它组件仍正忙于完成所有与目前画面相关的运作。接下来将详细地描述较佳实施例中的每个组件。Equivalently, the preferred embodiment in FIG. 3 can be considered to be implemented by hardware and/or software. According to the present invention, the motion estimation unit 310 and other components in FIG. 3 can operate in a pipeline mode. Before the complexity estimator 320 starts to calculate the complexity of the current picture, the motion estimation unit 310 must first complete the current picture to be encoded. The calculation of the full motion of the frame and the estimation of the motion vector, and when the motion estimation unit 310 is preparing for the next frame, the complexity estimator 320 and other components are still busy completing all operations related to the current frame. Next, each component in the preferred embodiment will be described in detail.

移动估算单元310的主要目的之一为决定用何种预测模式来编码一张画面里的每个MB,如果必要的话,亦进行向前和向后的移动预测,还可从区块匹配运算中提取画面活动量的信息。首先,计算每个MB的自身活动量(intra-activity),将一个MB中4个8×8亮度值区块的像素强度以Ym,n,m=0,...,7,n=0,...,7来表示,并且每个8×8区块其平均值为Y,则每个MB之内活动量IntraAct:One of the main purposes of the motion estimation unit 310 is to decide which prediction mode to use to encode each MB in a picture, and if necessary, to perform forward and backward motion prediction, and also from the block matching operation Information about the amount of screen activity is extracted. Firstly, the intra-activity of each MB is calculated, and the pixel intensities of four 8×8 luminance value blocks in one MB are expressed as Y m,n ,m=0,...,7,n= 0, ..., 7, and the average value of each 8×8 block is Y, then the amount of activity IntraAct within each MB:

IntraActIntraAct == ΣΣ kk == 00 33 σσ kk

其中in

σσ kk == ΣΣ mm == 00 77 ΣΣ nno == 00 77 (( YY mm ,, nno -- YY ‾‾ )) 22

倘若需要较低的计算复杂度,可以相对Y的绝对差值代替:If lower computational complexity is required, it can be replaced by the absolute difference relative to Y:

IntraActIntraAct == ΣΣ kk == 00 33 ΔΔ kk

其中in

ΔΔ kk == ΣΣ mm == 00 77 ΣΣ nno == 00 77 || YY mm ,, nno -- YY ‾‾ ||

由于I-画面中的MB仅有一种模式:I模式,因此IntraAct即为I-画面的每个MB的活动量。Since the MB in the I-picture has only one mode: I-mode, IntraAct is the activity amount of each MB of the I-picture.

如果画面为P-或B-画面,则需进行移动估算。最常使用来发现最佳移动向量的技术系区块匹配。对非自身编码(nonintra coding)而言(如P-和B-画面),利用将失真标准如变异数或失真绝对值和减至最低,来选择向前、向后、双向的预测或不需移动补偿。一旦P-或B-画面中每个MB之MB模式决定,在每个移动补偿的差值MB中4个8×8区块的变异数亦可求得,移动补偿的差值MB系待处理MB和预估MB间像素对像素之差;失真绝对值和通常具有较佳的计算效率,因此可用来取代变异数。将4个8×8区块之变异数或失真绝对值和相加以求得非内编码画面中每个MB之相互活动量(inter-activity),InterAct,然后把非内编码画面中每个MB之IntraAct及其InterAct拿来作比较,以判断InterAct是否较小,若是,则以InterAct作为该MB之活动量,并以相互模式(inter-mode)编码该MB;否则以IntraAct作为该MB之活动量,并以自身模式(intra-mode)编码该MB。最后,对目前的I-、P-或B-画面,将所有MB之活动量相加而得全活动量A(i),移动估算单元310再把全活动量A(i)传送给复杂度估计器320、参数更新器340以及量化位阶估计器350。If the picture is a P- or B-picture, motion estimation is required. The technique most commonly used to find the best movement vector is block matching. For nonintra coding (e.g. P- and B-pictures), selection of forward, backward, bidirectional prediction or no motion compensation. Once the MB mode of each MB in the P- or B-picture is determined, the variance of the 4 8×8 blocks in each motion-compensated difference MB can also be obtained, and the motion-compensated difference MB is to be processed The pixel-by-pixel difference between the MB and estimated MB; the absolute sum of the distortions is usually more computationally efficient and can therefore be used instead of the variance. Add the variance or absolute value of distortion of 4 8×8 blocks to obtain the inter-activity of each MB in the non-intra-coded picture, InterAct, and then calculate the inter-activity of each MB in the non-intra-coded picture The IntraAct and its InterAct are used for comparison to determine whether the InterAct is smaller. If so, use the InterAct as the activity of the MB and encode the MB in inter-mode; otherwise use the IntraAct as the activity of the MB amount, and encode the MB in intra-mode. Finally, for the current I-, P- or B-picture, the total activity A (i) is obtained by adding the activity of all MBs, and the motion estimation unit 310 sends the full activity A (i) to the complexity An estimator 320 , a parameter updater 340 and a quantization scale estimator 350 .

接着,复杂度估计器320为某型态的目前画面P(i)估算其复杂度,且依照三种画面型态,引进加权系数至预估的复杂度Cest (i)。因为绝不能以B-画面预估其它的画面,故可减少B-画面的加权系数以分配较少的位元给B-画面而保留较多的位元给I-和P-画面;一般而言,编码I-画面会产生最多的位元,因此P-画面的加权系数又小于I-画面的加权系数。复杂度估计器320根据目前画面的型态更新复杂度CI、CP或CB三者其中之一,目前画面P(i)的复杂度Cest (i)以如下方式估算:Next, the complexity estimator 320 estimates the complexity of a certain type of current picture P (i) , and introduces weighting coefficients to the estimated complexity C est (i) according to the three picture types. Because B-pictures can never be used to predict other pictures, the weighting coefficients of B-pictures can be reduced to allocate less bits to B-pictures and reserve more bits to I- and P-pictures; generally In other words, encoding I-pictures will generate the most bits, so the weighting coefficients of P-pictures are smaller than those of I-pictures. The complexity estimator 320 updates one of the complexity C I , C P or C B according to the type of the current picture, and the complexity C est (i ) of the current picture P (i ) is estimated as follows:

if(I-画面)if(I-picture)

CC estest (( ii )) == CC II == KK II ×× AA (( ii )) ACRACR II (( ii -- 11 ))

else if(P-画面)else if(P-picture)

CC estest (( ii )) == CC PP == KK PP ×× AA (( ii )) ACRACR PP (( ii -- 11 ))

else if(B-画面)else if(B-picture)

CC estest (( ii )) == CC BB == KK BB ×× AA (( ii )) ACRACR BB (( ii -- 11 ))

其中,ACRI (i-l)、ACRP (i-l)及ACRB (i-l)系一组连续画面中,I、P和B型态的先前编码画面各自的活动量对复杂度之比。这些ACRI (i-l)、ACRP (i-l)和ACRB (i-l)存放在参数更新器340之中,而复杂度估计器320会为适当型态的先前画面读取对应的活动量对复杂度之比。KI、KP及KB分别系I-、P-和B-画面之加权系数,其范围一般是在0到1.0之间。至于I-画面,较佳实施例可以采用KI=1.0。Among them, ACR I (il) , ACR P (il) and ACR B (il) are the respective activity-to-complexity ratios of previously coded pictures of I, P and B types in a group of consecutive pictures. These ACR I (il) , ACR P (il) and ACR B (il) are stored in the parameter updater 340, and the complexity estimator 320 reads the corresponding activity versus complexity for the appropriate type of previous frame Ratio. K I , K P and K B are weighting coefficients of I-, P- and B-pictures respectively, and their ranges are generally between 0 and 1.0. As for I-pictures, a preferred embodiment may use K I =1.0.

当收到Cest (i)之时,配额分派器330为该组连续画面更新其瞬间复杂度INST_C且分配目标位元额度TB(i)给目前画面P(i),瞬间复杂度INST_C的更新如下:When C est (i) is received, the quota allocator 330 updates the instantaneous complexity INST_C for the group of continuous pictures and allocates the target bit quota TB (i) to the current picture P (i) , the update of the instantaneous complexity INST_C as follows:

INST_C=NI×CI+NP×CP+NB×CB其中,NI、NP和NB分别是本组连续画面中I-、P-及B-画面之数目。再者,目前画面P(i)之目标位元额度TB(i)INST_C=N I ×C I +N P ×C P +N B ×C B where N I , N P and N B are respectively the numbers of I-, P- and B-pictures in the group of consecutive pictures. Moreover, the target bit quota TB (i) of the current picture P (i) is

TBTB (( ii )) == CC estest (( ii )) INSTINST __ CC ×× nno ff ×× RR

其中,n系本组连续画面之画面数,f系每秒画面数,即:图帧率(frame rate),R则系每组连续画面之期望平均位元率。然而,实际的消耗位元数并不会和期望的位元额度刚好相等,因此发展一种回授策略来使画面实际消耗的位元数接近于目标位元额度,在较佳实施例中,编码至目前为止的超用位量,可由正在编码的目前画面摊还一部份:Among them, n is the number of frames in this group of continuous frames, f is the number of frames per second, that is, frame rate, and R is the expected average bit rate of each group of consecutive frames. However, the actual number of consumed bits will not be exactly equal to the expected bit quota, so a feedback strategy is developed to make the actual consumed bits of the picture close to the target bit quota. In a preferred embodiment, The excess bits encoded so far can be amortized by the current picture being encoded:

TB(i)=TB(i)-AR×EB其中,EB系参数更新器340传来的超用位元量,AR则为既定的摊还率,其范围一般是在0.05到0.2之间。配额分派器330须调整目标位元额度TB(i)以符合VBV规范,所以还定下额度的上限(U-bound)及下限(L_bound)。就固定位率(constant bitrate,CBR)的操作而言,分配给一张画面的目标位元额度须使VBV缓冲器不会满溢或匮乏,因此目标位元额度TB(i)限制在上、下限范围内:TB (i) = TB (i) −AR×EB where EB is the amount of overused bits sent by the parameter updater 340 , and AR is the predetermined amortization rate, which generally ranges from 0.05 to 0.2. The quota allocator 330 has to adjust the target bit quota TB (i) to comply with the VBV specification, so an upper limit (U-bound) and a lower limit (L_bound) of the quota are also set. For constant bit rate (constant bitrate, CBR) operation, the target bit quota allocated to a picture must be such that the VBV buffer will not overflow or be starved, so the target bit quota TB (i) is limited to Within the lower limit:

if(TB(i)>U_bound)then TB(i)=U_boundif (TB (i) > U_bound) then TB (i) = U_bound

if(TB(i)<L_bound)then TB(i)=L_bound若是可变位元率(variable bitrate,VBR)的操作,则只要防止VBV匮乏即可,故:if (TB (i) < L_bound) then TB (i) = L_bound If it is a variable bit rate (variable bitrate, VBR) operation, it only needs to prevent the lack of VBV, so:

if(TB(i)>U_bound)then TB(i)=U_bound然后,目标位元额度TB(i)会被传送到参数更新器340、量化位阶估计器350以及影像编码器360。if (TB (i) > U_bound) then TB (i) = U_bound Then, the target bit amount TB (i) will be sent to the parameter updater 340 , the quantization scale estimator 350 and the image encoder 360 .

一旦目标位元额度TB(i)决定好之后,量化位阶估计器350即可为目前画面P(i)预估其编码所需的平均量化位阶初始值Qest (i)。用来量化一特定型态的目前画面P(i)之初始值Qest (i)以如下方式估算:Once the target bit quota TB (i) is determined, the quantization scale estimator 350 can estimate the average quantization scale initial value Q est (i) required for coding the current picture P (i) . The initial value Q est (i ) used to quantify the current frame P (i) of a particular type is estimated as follows:

if(I-画面)if(I-picture)

QQ estest (( ii )) == AA (( ii )) TBTB (( ii )) &times;&times; ACRACR II (( ii -- 11 ))

else if(P-画面)else if(P-picture)

QQ estest (( ii )) == AA (( ii )) TBTB (( ii )) &times;&times; ACRACR PP (( ii -- 11 ))

else if(B-画面)else if(B-picture)

QQ estest (( ii )) == AA (( ii )) TBTB (( ii )) &times;&times; ACRACR BB (( ii -- 11 ))

接着将平均量化位阶初始值Qest (i)传给影像编码器360。由对画面中每一空间区域其量化位阶的适应性改变,本实施例的视讯编码器300采用虚拟缓冲器(virtual buffer)以提供位元率控制的回授机制,由于虚拟缓冲器及适应性量化对熟悉此技艺者而言,乃为习知技术,因此不再做赘述。虚拟缓冲器的利用状况(occupancy)控制了量化位阶,从而控制了位元率,然而,虚拟缓冲器必须指定一个初始的利用状况方能运作,并且虚拟缓冲器的利用状况也反应了用来编码每一空间区域的量化位阶,所以虚拟缓冲器的利用状况不仅控制了量化位阶的初始值,亦在给定位元率的条件下,控制了视觉品质。Then the average quantization scale initial value Q est (i) is sent to the video encoder 360 . Due to the adaptive change of the quantization level of each spatial region in the picture, the video encoder 300 of this embodiment uses a virtual buffer (virtual buffer) to provide a feedback mechanism for bit rate control. Due to the virtual buffer and adaptive Sexual quantification is a known technology for those familiar with this art, so it will not be repeated here. The occupancy of the virtual buffer controls the quantization level, thereby controlling the bit rate. However, the virtual buffer must specify an initial occupancy to operate, and the occupancy of the virtual buffer also reflects the used The quantization level of each spatial region is encoded, so the utilization of the virtual buffer not only controls the initial value of the quantization level, but also controls the visual quality at a given bit rate.

在初始值Qest (i)的帮助之下,影像编码器360可以让视讯序列中的画面品质更为一致。透过讯号线312,影像编码器360从移动估算单元310接收画面数据以及每个MB之移动向量和MB模式。为了在给定位元额度TB(i)的情形下,尽可能的减少可见的失真,影像编码器360依据平均量化位阶初始值Qest (i)来决定编码目前画面的每个MB所用之量化位阶,以这些数据为基础,影像编码器360开始对目前画面P(i)进行编码且输出编码后的数据CD。在目前画面P(i)编码之后,影像编码器360将量化位阶做平均并且计算实际消耗位元数UB(i),再回报目前画面的UB(i)以及平均量化位阶AQ(i)给参数更新器340。With the help of the initial value Q est (i) , the video encoder 360 can make the picture quality more consistent in the video sequence. Via signal line 312 , video encoder 360 receives frame data from motion estimation unit 310 along with motion vectors and MB patterns for each MB. In order to reduce the visible distortion as much as possible under the given bit quota TB (i) , the image encoder 360 determines the quantization used to encode each MB of the current picture according to the average quantization scale initial value Q est (i) Based on these data, the video encoder 360 starts to encode the current picture P (i) and outputs the encoded data CD. After the current picture P (i) is encoded, the video encoder 360 averages the quantization level and calculates the actual consumed bit number UB (i) , and then returns the current picture UB (i) and the average quantization level AQ (i) to the parameter updater 340.

画面P(i)之目标位元额度TB(i)以及实际消耗位元数UB(i)间的差距,会由参数更新器340做累计以便在画面P(i)编码之后得到超用位元量EB:The difference between the target bit quota TB (i) of the picture P (i) and the actual consumed bit number UB (i) will be accumulated by the parameter updater 340 so as to obtain the excess bits after encoding the picture P (i) Quantity EB:

EB=EB×(1-AR)+UB(i)-TB(i)其中,AR系既定的摊还率。因此,活动量和实际复杂度之间的关系,ACR(i),可从以下计算得到EB=EB×(1-AR)+UB (i) -TB (i) Among them, AR is the established amortization rate. Therefore, the relationship between the amount of activity and the actual complexity, ACR (i) , can be calculated from

ACRACR (( ii )) == AA (( ii )) AQAQ (( ii )) &times;&times; UBUB (( ii ))

此ACR(i)可用来预估同型态的下张画面之复杂度。为使ACR(i)不会受到富含噪声画面的影响,较佳实施例利用了ACR(i)和ACR(i-l)的线性组合,例如:This ACR (i) can be used to estimate the complexity of the next frame of the same type. In order to make ACR (i) unaffected by noisy pictures, a preferred embodiment utilizes a linear combination of ACR (i) and ACR (il) , for example:

if(I-画面)if(I-picture)

ACRACR II (( ii )) == ACRACR II (( ii -- 11 )) &times;&times; (( 11 -- CWCW )) ++ ACRACR (( ii )) &times;&times; CWCW

else if (P-画面)else if (P-picture)

ACRACR PP (( ii )) == ACRACR PP (( ii -- 11 )) &times;&times; (( 11 -- CWCW )) ++ ACRACR (( ii )) &times;&times; CWCW

else if (B-画面)else if (B-picture)

ACRACR BB (( ii )) == ACRACR BB (( ii -- 11 )) &times;&times; (( 11 -- CWCW )) ++ ACRACR (( ii )) &times;&times; CWCW

其中,CW系线性组合既定之加权系数。更新过的ACRI (i)、ACRP (i)及ACRB (i)会被传送到复杂度估计器320以及量化位阶估计器350,以便为下一张适当型态的画面分别估算其复杂度和量化位阶之初始值,此外,超用位元量EB则送至配额分派器330作为位分配之用。Among them, CW is a linear combination of predetermined weighting coefficients. The updated ACR I (i) , ACR P (i) and ACR B (i) will be sent to the complexity estimator 320 and the quantization scale estimator 350, so as to respectively estimate their The initial values of the complexity and the quantization level, in addition, the excess bit amount EB is sent to the quota allocator 330 for bit allocation.

虽然本发明已以一具体实施例揭露如上,然其仅为了易于说明本发明的技术内容,而并非将本发明狭义地限定于该实施例,任何熟习此技艺者,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,因此本发明的保护范围当视后附的申请专利范围所界定者为准。Although the present invention has been disclosed as above with a specific embodiment, it is only for easy description of the technical content of the present invention, and the present invention is not limited to this embodiment in a narrow sense. Anyone skilled in this art will not depart from the spirit of the present invention Within the scope and scope, some changes and modifications can be made, so the protection scope of the present invention should be defined by the scope of the appended patent application as the criterion.

Claims (10)

1, a kind of dynamic image compressed bits rate control method of utilizing the initial quantization bit-level prediction is characterized in that, comprises the following step at least:
Be that a present picture that is about to be encoded calculates a full activity, this present picture is among one group of continuous pictures of a video signal sequence;
Based on this full activity of this present picture and should the group continuous pictures in one of with its activity of previous coding picture of kenel ratio to complexity, estimate one of this present picture complexity;
This complexity of estimating with this present picture is upgraded the complexity in a flash of this group continuous pictures;
According to this estimate complexity and should moment complexity, distribute a target bit amount to give this present picture;
Based on this target bit amount of this full activity of this present picture, this present picture and should be with its activity of previous coding picture of kenel ratio to complexity, decision is used for one of this present picture of coding rank, average quantization position initial value;
According to this rank, average quantization position initial value, this present picture in this video signal sequence is encoded; And
After this present picture of coding,, calculate the ratio of this its activity of present picture to complexity according to this full activity of this present picture, the actual consumption bit number of this present picture and the rank, average quantization position of this present picture;
Wherein, this activity of this present picture is directly proportional with this full activity of this present picture to the ratio of complexity, and is inversely proportional to the actual consumption bit number of this present picture and the rank, average quantization position of this present picture.
2, dynamic image compressed bits rate control method as claimed in claim 1 is characterized in that, comprises the following step more at least:
Carry out above-mentioned its activity of present picture to the ratio of complexity and above-mentioned its activity of previous coding picture with kenel to the ratio linear combination computing between the two of complexity.
3, dynamic image compressed bits rate control method as claimed in claim 1 is characterized in that, the above-mentioned full activity to above-mentioned present picture when above-mentioned present picture moves estimation calculates.
4, dynamic image compressed bits rate control method as claimed in claim 1 is characterized in that, the step of above-mentioned estimation complexity is calculated according to an equation:
C est = K &times; A ACR
Wherein, C EstThe above-mentioned complexity of estimating for above-mentioned present picture, K is a set weighted value, its scope is between 0 to 1, and A is the above-mentioned full activity of the above-mentioned present picture in above-mentioned one group of continuous pictures, and ACR is the ratio of above-mentioned its activity of previous coding picture with kenel to complexity.
5, dynamic image compressed bits rate control method as claimed in claim 1 is characterized in that, the target bit amount of above-mentioned distribution is directly proportional with the above-mentioned complexity of above-mentioned present picture, and is inversely proportional to above-mentioned moment complexity of above-mentioned one group of continuous pictures.
6, dynamic image compressed bits rate control method as claimed in claim 1 is characterized in that, rank, above-mentioned average quantization position initial value is determined by following array function:
MQ est = A TB &times; ACR
Wherein, MQ EstRepresent rank, above-mentioned average quantization position initial value, A is the above-mentioned full activity of the above-mentioned present picture in above-mentioned one group of continuous pictures, TB is the above-mentioned target bit amount of the above-mentioned present picture of above-mentioned present picture, and ACR is the ratio of above-mentioned its activity of previous coding picture with kenel to complexity.
7, dynamic image compressed bits rate control method as claimed in claim 1 is characterized in that, above-mentioned one group of continuous pictures comprises a picture group at least, and this picture group meets MPEG video signal standard.
8, a kind of dynamic image compressed bits rate control device that utilizes the initial quantization bit-level prediction is characterized in that, comprises at least:
One moves evaluation unit, receives one of to be about to be encoded picture at present in one group of continuous pictures in the video signal sequence, is used for calculating one of this present picture activity entirely when carrying out the block coupling that moves estimation;
One complexity estimator, based on this full activity of this present picture and should the group continuous pictures in together its activity of previous coding picture of kenel the ratio of complexity is used for estimating one of this present picture complexity;
One quota allocator, this complexity of estimating with this present picture is upgraded the complexity in a flash of this group continuous pictures, be used for according to this estimation complexity and should moment complexity, distribute a target bit amount to give this present picture;
One quantization scale estimator, based on this target bit amount of this full activity of this present picture, this present picture and should be with its activity of previous coding picture of kenel ratio to complexity, decision is used for one of this present picture rank, the average quantization position initial value of encoding; And
One parameter update device based on this full activity of this present picture, the actual consumption bit number of this present picture and the rank, average quantization position of this present picture, calculates the ratio of this its activity of present picture to complexity;
Wherein, this activity of this present picture is directly proportional with this full activity of this present picture to the ratio of complexity, and is inversely proportional to the bit number of this present picture consumption and the rank, average quantization position of this present picture.
9, dynamic image compressed bits rate control device as claimed in claim 8, it is characterized in that, the above-mentioned parameter renovator also carry out above-mentioned its activity of present picture to the ratio of complexity and above-mentioned its activity of previous coding picture with kenel to the ratio linear combination computing between the two of complexity.
10, dynamic image compressed bits rate control device as claimed in claim 8, it is characterized in that, more at least comprise an image coder, come above-mentioned present picture is encoded according to rank, above-mentioned average quantization position initial value, and the actual consumption bit number and the used rank, average quantization position of above-mentioned present picture coding of above-mentioned present picture are repaid to the above-mentioned parameter renovator.
CN 03147765 2003-06-24 2003-06-24 Motion Image Compression Bit Rate Control Method and Device Using Initial Quantization Scale Estimation Expired - Fee Related CN1265648C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 03147765 CN1265648C (en) 2003-06-24 2003-06-24 Motion Image Compression Bit Rate Control Method and Device Using Initial Quantization Scale Estimation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 03147765 CN1265648C (en) 2003-06-24 2003-06-24 Motion Image Compression Bit Rate Control Method and Device Using Initial Quantization Scale Estimation

Publications (2)

Publication Number Publication Date
CN1568008A true CN1568008A (en) 2005-01-19
CN1265648C CN1265648C (en) 2006-07-19

Family

ID=34472041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 03147765 Expired - Fee Related CN1265648C (en) 2003-06-24 2003-06-24 Motion Image Compression Bit Rate Control Method and Device Using Initial Quantization Scale Estimation

Country Status (1)

Country Link
CN (1) CN1265648C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399982B (en) * 2007-09-30 2010-12-01 奇景光电股份有限公司 Image compression control method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399982B (en) * 2007-09-30 2010-12-01 奇景光电股份有限公司 Image compression control method and device

Also Published As

Publication number Publication date
CN1265648C (en) 2006-07-19

Similar Documents

Publication Publication Date Title
CN1145363C (en) Quantization matrix for still and motion picture coding
KR100970315B1 (en) Transcoder and Coded Image Conversion Method
US8406297B2 (en) System and method for bit-allocation in video coding
US7095784B2 (en) Method and apparatus for moving picture compression rate control using bit allocation with initial quantization step size estimation at picture level
CN1274446A (en) Appts. and method for macroblock based rate control in coding system
CN1301370A (en) Method and apparatus for reducing breathing artifacts in compressed video
CN1223199C (en) Method of performing video encoding rate control using bit budget
CN1949877A (en) Adaptive quantization controller and method thereof
CN1902939A (en) Encoding method, decoding method, and encoding apparatus for a digital picture sequence
CN1666429A (en) Method and system for selecting interpolation filter type in video coding
CN1691779A (en) Video transcoding method and device and motion vector interpolation method
CN1816151A (en) Video coding method and system for frame layer rate control
CN101098473A (en) Picture coding method and apparatus
CN1777283A (en) Microblock based video signal coding/decoding method
CN1926884A (en) Video encoding method and apparatus
CN1857002A (en) Rate-distortion video data partitioning using convex hull search
CN1178513C (en) Video coding device and video coding method
CN1164124C (en) Image compress processing method
CN1738424A (en) A rate control method for fine-grained scalable coding based on H.264
CN1235413C (en) Method for coding and recoding ripple video frequency based on motion estimation
US7133448B2 (en) Method and apparatus for rate control in moving picture video compression
US20040233984A1 (en) Apparatus for variable bit rate control in video compression and target bit allocator thereof
CN1917646A (en) Method of controlling rate of video compression code based on query table in low memory consumption
JPH07203430A (en) Image coding device
CN1265648C (en) Motion Image Compression Bit Rate Control Method and Device Using Initial Quantization Scale Estimation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20060719