




技术领域technical field
本发明涉及一种高通系数的区块类型信息的产生方法与其产生电路,且特别涉及一种可减少运算时钟数与系数存取次数的高通系数的区块类型信息产生方法与其电路。The present invention relates to a method for generating block type information of high-pass coefficients and a circuit thereof, and in particular to a method for generating block type information of high-pass coefficients and its circuit which can reduce the number of operation clocks and coefficient access times.
背景技术Background technique
在一般的视频压缩编码方式,主要是由一个原始的视频数据经过转换与编码压缩后产生编码串流(Encoded Stream)的方式,包括进行取样及色彩空间转换(Down sampling & Color Space Transform)的处理。In the general video compression encoding method, the encoding stream (Encoded Stream) is mainly generated by an original video data after conversion and encoding compression, including the processing of sampling and color space conversion (Down sampling & Color Space Transform) .
以JPEG标准为例,先将色彩转换至YCbCr色彩空间,再经过离散余弦转换(Discrete Cosine Transform),经过量化处理后,再对DC项系数进行预测差分,最后再将系数以锯齿形扫描(Zig-Zag Scan)顺序扫描成游程编码(Run-Length Encoding),再以可变长度编码(Variable Length Coding)完成编码。Taking the JPEG standard as an example, the color is first converted to the YCbCr color space, and then undergoes discrete cosine transform (Discrete Cosine Transform). -Zag Scan) in order to scan into run-length encoding (Run-Length Encoding), and then complete encoding with variable length encoding (Variable Length Coding).
例如美国微软(Microsoft)公司所推出新的静态视频压缩格式,称为HDPhoto格式,目前已进入JPEG国际标准制订过程中,而命名为JPEG-XR。此HD Photo格式为了减少独立区块转换带来的区块效应,使用了以4乘4区块为单位的重叠转换(Lapped Transform,LT),其中先对4乘4区块交接处的4乘4区块进行重叠滤波(Overlap Filter),再对4乘4区块进行核心转换(Core Transform),重叠滤波与核心转换皆使用了提升式结构(Lift)来确保无失真压缩的可能性。重叠转换后,再进行量化(Quantization)及系数预测(Prediction)并产生区块类型信息(Coded Block Pattern)。接着运用可调式扫描(Adaptive Scan)及进行熵编码(Entropy Coding),以产生编码串流。For example, a new static video compression format introduced by Microsoft Corporation of the United States, called HDPhoto format, has entered the JPEG international standard formulation process and is named JPEG-XR. In order to reduce the block effect caused by independent block conversion, this HD Photo format uses Lapped Transform (LT) in units of 4 by 4 blocks. Overlap Filter is performed on 4 blocks, and Core Transform is performed on 4 by 4 blocks. Both Overlap Filter and Core Transform use Lift structure to ensure the possibility of lossless compression. After overlapping conversion, quantization (Quantization) and coefficient prediction (Prediction) are performed and block type information (Coded Block Pattern) is generated. Then use the adjustable scan (Adaptive Scan) and entropy coding (Entropy Coding) to generate a coded stream.
由于提升式结构每一步骤都是完全可逆(Reversible),若编码过程采取无失真的压缩转换领域的信号,则在解码时先进行逆核心转换,再进行逆重叠滤波转换,就可得到一模一样的原图。在HD Photo格式可自行选择是否进行第一阶的重叠滤波转换与第二阶的重叠滤波转换。得到的DC系数与AC系数经过量化(Quantization)与熵编码(Entropy Coding)处理后,经过分组化(Packetization)后即可得到压缩比特流(Compressed Bitstream)。Since each step of the lifting structure is completely reversible, if the encoding process adopts the signal in the field of compression conversion without distortion, the inverse core conversion is performed first, and then the inverse overlapping filter conversion is performed to obtain exactly the same original picture. In the HD Photo format, you can choose whether to perform the first-order overlap filter conversion and the second-order overlap filter conversion. The obtained DC coefficients and AC coefficients are quantized (Quantization) and entropy coding (Entropy Coding) processed, and after packetization (Packetization), a compressed bit stream (Compressed Bitstream) can be obtained.
此HD Photo规格,与以往JPEG标准有许多不同之处,其中包括可以接受更大范围的像素值域,采用自订的YCoCg色彩空间,自订的两阶重叠转换(Lapped Transform)运算与系数预测(Prediction)运算。This HD Photo specification has many differences from the previous JPEG standard, including accepting a wider range of pixel values, using a custom YCoCg color space, custom two-stage lapped transform (Lapped Transform) calculation and coefficient prediction (Prediction) operation.
而在上述进行转换系数熵编码前,必需先编码区块类型信息(CodedBlock Pattern)。然而,区块类型信息是由经过量化(Quantization)和系数预测(Prediction)后,再经正规化(Normalization)后,以便计数每一小区块的正规系数是否全为零产生的信息。于是,在经过转换和量化后,再经系数预测和正规化,然后再算出区块类型信息后,才能进行转换系数的熵编码。因此,此计算区块类型信息会增加运算的时钟数或增加存储器的存取量。Before the entropy coding of the above-mentioned conversion coefficients, the block type information (CodedBlock Pattern) must be coded first. However, the block type information is generated by quantization (Quantization), coefficient prediction (Prediction), and then normalization (Normalization), so as to count whether the normal coefficients of each small block are all zero. Therefore, after conversion and quantization, coefficient prediction and normalization, and then calculation of block type information, entropy coding of conversion coefficients can be performed. Therefore, the calculation of the block type information will increase the number of clocks for operation or increase the amount of memory access.
符合上述静态视频压缩格式HD Photo的编码过程,如图1所示,经颜色转换后,图像会先经过第一阶段重叠转换(Lapped Transform)运算110与第二阶段重叠转换运算120,其中,第一阶段重叠转换运算110的结果将会作为第二阶段重叠转换运算120的输入。而后,两阶段的重叠转换运算将会产生DC系数(DC Coefficient,如图以“DC”表示)、低通系数(LowpassCoefficient,如图以“LP”表示)、以及高通系数(Highpass Coefficient,如图以“HP”表示)。而后将DC系数122、低通系数124与高通系数126分别进行量化(Quantization)的运算130、132与134后,接着进行DC预测140、低通(LP)预测142与高通(HP)预测144的运算,而后在根据结果进行熵编码(EntropyCoding)运算150。此熵编码运算150包含了系数正规化(Normalization)、可调式系数扫描(Adaptive Scan)和可变长度编码(Variable Length Coding)等等操作。Comply with the encoding process of the above-mentioned static video compression format HD Photo, as shown in Figure 1, after the color conversion, the image will first go through the first stage of lapped transformation (Lapped Transform)
对于YUV_4:4:4格式的重叠转换如图2所示,大区块210代表一个Y、U或V大区块(Macroblock),对于大区块210进行第一阶转换,得到16个小区块220,每个小区块包括一个DC系数(DC Coefficient)222与15个高通系数(Highpass coefficient)224。接着将第一阶转换中的十六个DC系数集成一个4乘4区块再进行第二阶重叠转换,得到由一个DC系数232和15个低通系数(Lowpass coefficient)234所组成的区块230。而关于YUV_4:2:2格式与YUV_4:2:0格式的重叠转换与图2类似。For the overlapping conversion of YUV_4:4:4 format as shown in Figure 2, the
然而,在进行高通系数的熵编码之前,必须先得到其区块类型信息(Coded Block Pattern)。YUV4:4:4格式的高通系数区块类型信息共48位(Bits),每一个位各代表经第一阶转换后Y、U与V的各16个小区块,其中0为此小区块的高通系数经量化、系数预测与正规化运算后全都为0,否则此位的值为1。However, before entropy encoding of high-pass coefficients, the block type information (Coded Block Pattern) must be obtained. The high-pass coefficient block type information in YUV4:4:4 format has a total of 48 bits (Bits), and each bit represents 16 small blocks of Y, U, and V after the first-order conversion, among which 0 is the value of this small block The high-pass coefficients are all 0 after quantization, coefficient prediction and normalization operations, otherwise the value of this bit is 1.
系数预测的方向是以上述大区块(Macroblock)为单位。大区块的DC预测方向由此大区块的左、左上、和上面的大区块的DC值所决定。而大区块的LP系数预测方向则由DC预测方向和量化参数所决定,所以DC和LP的系数预测方向可以在大区块重叠转换前就决定。但是,HP系数的预测方向是由同一个大区块的LP系数经计算后得出,而LP系数又是第二阶转换最后才得出,如图3的流程图所示,为得到高通系数的区块类型信息(CodedBlock Pattern),必须在第二阶转换后,由LP系数算出HP系数预测方向,再将高通系数取出以计算高通系数的区块类型信息。在图3中,在进行二阶转换重叠转换310后,运用产生的LP系数进行计算HP系数预测方向320,而后,才能计算HP系数的区块类型信息330,而后也才能进行HP系数的熵编码340。The direction of coefficient prediction is in units of the aforementioned macroblock. The DC prediction direction of a large block is determined by the left, upper left, and DC values of the large block above the large block. The LP coefficient prediction direction of the large block is determined by the DC prediction direction and quantization parameters, so the DC and LP coefficient prediction directions can be determined before the large block is overlapped and converted. However, the prediction direction of the HP coefficients is obtained after calculation of the LP coefficients of the same large block, and the LP coefficients are obtained at the end of the second-order conversion, as shown in the flow chart of Figure 3. In order to obtain the high-pass coefficients The block type information (CodedBlock Pattern) must be calculated from the LP coefficient to predict the direction of the HP coefficient after the second-order conversion, and then the high-pass coefficient is taken out to calculate the block type information of the high-pass coefficient. In Fig. 3, after performing the second-order
如此的架构将会增加运算时钟数与系数存取的次数,影响整个数据处理的效率。Such a structure will increase the number of operation clocks and the times of coefficient access, which will affect the efficiency of the entire data processing.
发明内容Contents of the invention
本发明提出了一种可减少运算时钟数与系数存取的次数的产生高通系数的区块类型信息的方法与其硬件装置。The present invention proposes a method for generating high-pass coefficient block type information and its hardware device, which can reduce the number of operation clocks and the number of times of coefficient access.
在一实施例中,本发明提出一种产生高通系数的区块类型信息的方法,包括接收量化高通系数,此量化高通系数包括大区块(Macroblock)数据,并分割为多个区块数据。对所述区块数据进行二阶重叠转换运算,并同时进行计算区块数据在所有可能的高通系数预测方向的对应多个区块类型信息。根据二阶重叠转换运算所产生低通系数,进行计算取得高通系数预测方向选择信息。从所述区块类型信息,根据高通系数预测方向选择信息,选择对应的区块类型信息作为高通系数的区块类型信息输出。In one embodiment, the present invention provides a method for generating high-pass coefficient block type information, including receiving quantized high-pass coefficients, the quantized high-pass coefficients include macroblock data, and are divided into multiple block data. Performing a second-order overlapping conversion operation on the block data, and simultaneously calculating a plurality of block type information corresponding to the block data in all possible high-pass coefficient prediction directions. According to the low-pass coefficients generated by the second-order overlapping transformation operation, calculation is performed to obtain the high-pass coefficient prediction direction selection information. From the block type information, according to the high-pass coefficient prediction direction selection information, select the corresponding block type information as the high-pass coefficient block type information and output.
上述产生高通系数的区块类型信息的方法,其中计算区块数据的这些区块类型信息包括取得大区块的高通系数正规化参数组,并计算高通系数正规化参数组在所述高通系数预测方向非零的个数,据以产生多个非零系数个数数据。接着,接收所产生对应于所述高通系数预测方向的非零系数个数数据,产生相对于高通系数预测方向的区块类型信息。The above method for generating block type information of high-pass coefficients, wherein calculating these block type information of block data includes obtaining high-pass coefficient normalization parameter sets of large blocks, and calculating high-pass coefficient normalization parameter sets in the high-pass coefficient prediction The number of non-zero directions, the data to generate multiple non-zero coefficient data. Next, receiving the generated non-zero coefficient number data corresponding to the prediction direction of the high-pass coefficients, and generating block type information corresponding to the prediction direction of the high-pass coefficients.
上述产生高通系数的区块类型信息的方法,其中所述大区块的高通系数正规化参数组是产生方法为根据前一大区块的高通系数正规化参数组和大区块高通系数非零系数个数组所产生。The above-mentioned method for generating block type information of high-pass coefficients, wherein the normalization parameter group of high-pass coefficients of the large block is generated according to the normalization parameter group of high-pass coefficients of the previous large block and the non-zero high-pass coefficients of the large block An array of coefficients is produced.
上述产生高通系数的区块类型信息的方法,其中大区块高通系数非零系数个数组产生方法为累加大区块(Macroblock)数据所具有的区块数据,对应所述高通系数预测方向所得到的非零系数个数数据,并根据高通系数预测方向选择信息,选择其中之一作为大区块高通系数非零系数个数组。The above-mentioned method for generating block type information of high-pass coefficients, wherein the large-block high-pass coefficient non-zero coefficient array generation method is to accumulate the block data of the macroblock (Macroblock) data, and obtain corresponding to the high-pass coefficient prediction direction According to the high-pass coefficient prediction direction selection information, one of them is selected as the non-zero coefficient array of large block high-pass coefficients.
上述的大区块(Macroblock)数据符合YUV_4:4:4色彩格式,而高通系数预测方包括由上预测、由左预测以及无预测。另外也可符合符合YUV_4:2:2色彩格式或YUV_4:2:0色彩格式。The above-mentioned macroblock data conforms to the YUV_4:4:4 color format, and the high-pass coefficient prediction methods include top prediction, left prediction and no prediction. In addition, it can also conform to YUV_4:2:2 color format or YUV_4:2:0 color format.
在一实施例中,本发明提出一种适用于对高通系数的区块类型信息产生电路,包括区块非零系数个数产生器、区块类型信息产生器、区块类型信息暂存区与高通系数预测方向判断器。此区块非零系数个数产生器接收量化后的高通系数与正规化参数,其中量化后的高通系数包括大区块(Macroblock)数据,并分割为多个区块数据。此区块非零系数个数产生器用以计算上述区块在多个高通系数预测方向的正规化后高通系数中非零系数个数。而区块类型信息产生器接收来自区块非零系数个数产生器所产生对应于所有可能的高通系数预测方向的非零系数个数,以产生相对于不同高通系数预测方向的区块类型信息。区块类型信息暂存区用以暂存区块类型信息产生器产生的区块在高通系数预测方向的区块类型信息。高通系数预测方向判断器则用以接收量化后的低通系数,并据以产生出高通系数预测方向选择信号,其中根据该高通系数预测方向选择信号,选择存储于区块类型信息暂存区内对应的高通系数区块类型信息据以输出。In one embodiment, the present invention proposes a block type information generating circuit suitable for high-pass coefficients, including a block non-zero coefficient number generator, a block type information generator, a block type information temporary storage area and The high-pass coefficients predict the direction determinator. The block non-zero coefficient number generator receives quantized high-pass coefficients and normalization parameters, wherein the quantized high-pass coefficients include macroblock data and are divided into multiple block data. The non-zero coefficient number generator for the block is used to calculate the number of non-zero coefficients in the normalized high-pass coefficients of the above-mentioned block in multiple high-pass coefficient prediction directions. The block type information generator receives the number of non-zero coefficients corresponding to all possible high-pass coefficient prediction directions generated by the block non-zero coefficient number generator to generate block type information relative to different high-pass coefficient prediction directions . The block type information temporary storage area is used to temporarily store the block type information of the block generated by the block type information generator in the high-pass coefficient prediction direction. The high-pass coefficient prediction direction determiner is used to receive the quantized low-pass coefficient, and generate a high-pass coefficient prediction direction selection signal accordingly, wherein according to the high-pass coefficient prediction direction selection signal, the selection is stored in the block type information temporary storage area The corresponding high-pass coefficient block type information is output accordingly.
上述的区块类型信息产生电路,连接到区块非零系数个数产生器,更包括大区块(Macroblock)非零系数个数累加器,用以累加大区块所包括的所有区块在可能的高通系数预测方向的正规化后,高通系数中非零系数个数,并据以产生对应的高通非零系数个数组,并根据高通系数预测方向选择信号选择其中之一输出。The above block type information generation circuit is connected to the block non-zero coefficient number generator, and further includes a large block (Macroblock) non-zero coefficient number accumulator, which is used to accumulate all blocks included in the large block. After the normalization of the possible high-pass coefficient prediction directions, the number of non-zero coefficients in the high-pass coefficients is used to generate the corresponding array of high-pass non-zero coefficients, and one of them is selected for output according to the high-pass coefficient prediction direction selection signal.
上述的区块类型信息产生电路,更包括正规化参数产生器,接收大区块(Macroblock)非零系数个数累加器所选择输出的高通非零系数个数组,并根据大区块的高通系数正规化参数组与高通非零系数个数组,产生下一个大区块的高通系数正规化参数组,并输出作为该区块非零系数个数产生器的高通系数非零系数计算的依据。The block type information generation circuit described above further includes a normalized parameter generator, which receives an array of high-pass non-zero coefficients selected and output by a macroblock (Macroblock) non-zero coefficient number accumulator, and according to the high-pass coefficients of the macroblock The normalization parameter group and the array of high-pass non-zero coefficients are used to generate the high-pass coefficient normalization parameter group of the next large block, and output as the basis for calculating the non-zero coefficients of the high-pass coefficients of the non-zero coefficient number generator of the block.
上述的大区块(Macroblock)数据符合YUV_4:4:4色彩格式,而高通系数预测方包括由上预测、由左预测以及无预测。另外也可符合符合YUV_4:2:2色彩格式或YUV_4:2:0色彩格式。The above-mentioned macroblock data conforms to the YUV_4:4:4 color format, and the high-pass coefficient prediction methods include top prediction, left prediction and no prediction. In addition, it can also conform to YUV_4:2:2 color format or YUV_4:2:0 color format.
为让本发明的上述特征和优点能更明显易懂,下文特举优选实施例,并配合附图,作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
图1说明静态视频压缩格式HD Photo的编码流程示意图。Figure 1 illustrates a schematic diagram of the encoding process for the still video compression format HD Photo.
图2为符合YUV_4:4:4格式的数据经过转换、量化及系数预测后得到大区块(Macroblock)的系数。Figure 2 shows the coefficients of the macroblock obtained after conversion, quantization and coefficient prediction of the data conforming to the YUV_4:4:4 format.
图3是说明传统产生高通系数的区块类型信息(Coded Block Pattern)与进行熵编码流程示意图。Fig. 3 is a schematic diagram illustrating the traditional generation of high-pass coefficient block type information (Coded Block Pattern) and entropy coding process.
图4是说明本发明实施例的产生高通系数的区块类型信息方法的流程示意图。FIG. 4 is a flow diagram illustrating a method for generating block type information of high-pass coefficients according to an embodiment of the present invention.
图5是说明本发明实施例的产生高通系数的区块类型信息的电路结构方块示意图。FIG. 5 is a schematic block diagram illustrating a circuit structure for generating block type information of high-pass coefficients according to an embodiment of the present invention.
图6是说明符合YUV_4:4:4格式的高通预测方向示意图。FIG. 6 is a schematic diagram illustrating high-pass prediction directions conforming to the YUV_4:4:4 format.
【主要元件符号说明】[Description of main component symbols]
110:第一阶段重叠转换(Lapped Transform)运算110: The first stage of overlapping conversion (Lapped Transform) operation
120:第二阶段重叠转换运算120: Second-stage overlapping conversion operation
130、132与134:量化(Quantization)运算130, 132 and 134: Quantization (Quantization) operation
140:DC预测140: DC Prediction
142:低通(LP)预测142: Low Pass (LP) Prediction
144:高通(HP)预测144: Qualcomm (HP) Forecast
150:熵编码(Entropy Coding)运算150: Entropy Coding operation
210:大区块210: Big block
220:小区块220: small block
222:DC系数(DC Coefficient)222: DC coefficient (DC Coefficient)
224:高通系数(Highpass coefficient)224: Highpass coefficient
230:区块230: block
232:DC系数232: DC coefficient
234:低通系数(Lowpass coefficient)234: Lowpass coefficient (Lowpass coefficient)
310:二阶转换重叠转换310: Second-Order Transformation Overlapping Transformation
320:计算HP系数预测方向320: Calculate HP coefficient prediction direction
330:HP系数的区块类型信息330: Block type information of HP coefficient
340:HP系数的熵编码340: Entropy Coding of HP Coefficients
410:二阶段重叠转换410: Two-stage overlapping conversion
420:计算HP系数预测方向420: Calculate HP coefficient prediction direction
430:以三种可能方向计算区块类型信息430: Calculate block type information in three possible directions
440:选择对应正确的区块类型信息440: Select the correct block type information
450:进行HP系数熵编码450: Perform HP coefficient entropy coding
500:电路500: circuit
510:4×4区块三种不同方向的HP非零系数计数器510: HP non-zero coefficient counters in three different directions for 4×4 blocks
520:4×4区块三种不同方向的HP区块类型产生器520: 4×4 block HP block type generator in three different directions
530:三种不同方向的HP区块类型暂存器530: HP block type registers in three different directions
540:大区块(Macroblock)非零系数个数累加器540: Large block (Macroblock) non-zero coefficient number accumulator
550:HP预测方向产生器550: HP Predicted Direction Generator
560、570:多工器560, 570: multiplexer
580:正规化参数产生器580: Normalized parameter generator
具体实施方式Detailed ways
本发明提出了一种产生高通系数的区块类型信息的方法与其硬件装置,以实现高处理效率的HD Photo格式的编码。The present invention proposes a method for generating high-pass coefficient block type information and its hardware device, so as to realize high-efficiency HD Photo encoding.
关于区块类型信息(Coded Block Pattern)的编码方式,请参照美国第2007/0036222号专利申请案中所提到的区块类型编码(Block Pattern Coding)的相关技术,包括区块类型(Block Pattern)的介绍与空间预测(SpatialPrediction)的介绍等等,在此参照上述的内容。区块类型(Block Pattern)是一种通过编码器加入压缩比特流(Compressed Bitstream)的标志(Symbol),用以指出哪些小区块(Block)在预先定义的群集(Cluster)中是可以被跳过,也就是具有所有的系数都是零的特性,所以不需要进行编码,可以用以指出哪些小区块并非如此。For the encoding method of the block type information (Coded Block Pattern), please refer to the relevant technology of the block type encoding (Block Pattern Coding) mentioned in the US Patent Application No. 2007/0036222, including the block type (Block Pattern ) and the introduction of spatial prediction (SpatialPrediction), etc., refer to the above content here. The block type (Block Pattern) is a symbol (Symbol) added to the compressed bitstream (Compressed Bitstream) by the encoder to indicate which small blocks (Block) can be skipped in the pre-defined cluster (Cluster) , that is, it has the characteristic that all coefficients are zero, so it does not need to be encoded, and can be used to indicate which small blocks are not the case.
而上述的群集(Cluster)通常指的是大区块(Macroblock),例如对于YUV_4:4:4格式而言,在YUV色彩空间中,Y代表明亮度(Luminance或简称Luma),也就是灰阶值,而U与V则代表色度(Chrominance或简称Chroma)。如图2所示,在YUV色彩空间中,一个大区块(Macroblock)在Y色彩明亮度平面具有16个小区块,每个小区块有4乘4个系数。因此,总共具有16个区块类型(Block Pattern),也就是有16个标志(Symbol),以对应16个小区块。The above-mentioned cluster (Cluster) usually refers to a large block (Macroblock). For example, for the YUV_4:4:4 format, in the YUV color space, Y represents the brightness (Luminance or Luma for short), that is, the gray scale Value, while U and V represent chroma (Chrominance or Chroma for short). As shown in FIG. 2 , in the YUV color space, a macroblock has 16 small blocks on the Y color brightness plane, and each small block has 4 by 4 coefficients. Therefore, there are a total of 16 block types (Block Pattern), that is, 16 symbols (Symbol), corresponding to 16 small blocks.
对于YUV_4:4:4格式而言,不同色彩平面具有的区块分别为Y+U+V=16+16+16=48,也就是具有48个小区块。对于YUV_4:2:2格式而言,不同色彩平面具有的区块分别为Y+U+V=16+8+8=32。而对于YUV_4:2:0格式而言,不同色彩平面具有的区块分别为Y+U+V=16+4+4=24。不同的色彩格式具有不同的小区块数量,端视不同的应用而有所差异。然而,本发明所提出了产生高通系数的区块类型信息的方法,适用于不同类型的色彩格式,并不受限制,但为方便说明,底下将以YUV_4:4:4格式进行说明。For the YUV_4:4:4 format, the blocks of different color planes are respectively Y+U+V=16+16+16=48, that is, there are 48 small blocks. For the YUV_4:2:2 format, the blocks of different color planes are respectively Y+U+V=16+8+8=32. For the YUV_4:2:0 format, the blocks of different color planes are respectively Y+U+V=16+4+4=24. Different color formats have different numbers of tiles, depending on the application. However, the method for generating block type information of high-pass coefficients proposed by the present invention is applicable to different types of color formats and is not limited, but for the convenience of description, the following will be described in YUV_4:4:4 format.
请参照图4,为说明本发明所提出产生高通系数的区块类型信息方法的流程图。为得到高通系数的区块类型信息(Coded Block Pattern),在步骤410进行二阶转换时,同时如步骤430进行计算小区块在高通系数预测方向分别由上预测、由左预测以及无预测等三种可能方向,经正规化后高通系数非零的个数,并据以产生相对于三种预测方向的小区块类型信息,而后加以存储。而如步骤420,根据二阶转换重叠转换后,运用产生的LP系数进行计算HP系数预测方向。而后如步骤440,经由此正确的HP系数预测方向,并且接收由步骤430所产生的相对于三种预测方向的小区块类型信息,选择对应正确的区块类型信息,并据以如步骤450进行高通系数的熵编码。Please refer to FIG. 4 , which is a flowchart illustrating a method for generating block type information of high-pass coefficients proposed by the present invention. In order to obtain the block type information (Coded Block Pattern) of the high-pass coefficient, when the second-order conversion is performed in
而本发明所提出了产生高通系数的区块类型信息的硬件装置,在实施例中,包括小区块非零系数个数产生器、小区块类型信息产生器、区块类型信息暂存器、大区块(Macroblock)非零系数个数累加器、高通系数预测方向判断器或产生器、正规化参数产生器与多工器。However, the present invention proposes a hardware device for generating block type information of high-pass coefficients. In an embodiment, it includes a small block non-zero coefficient number generator, a small block type information generator, a block type information temporary register, a large Accumulator for the number of non-zero coefficients of a block (Macroblock), high-pass coefficient prediction direction determiner or generator, normalization parameter generator and multiplexer.
此小区块非零系数个数产生器用以计算小区块所有可能预测方向的正规化后高通系数非零的个数,例如在YUV_4:4:4格式的小区块高通预测方向包括由上预测、由左预测以及无预测等三种情形,底下以此说明为例,但不受此限制。The small block non-zero coefficient number generator is used to calculate the number of normalized non-zero high-pass coefficients of all possible prediction directions of the small block. The three situations of left prediction and no prediction are described below as an example, but not limited by this.
小区块类型信息产生器则是接收来自小区块非零系数个数产生器所产生对应于三种预测方向的三个非零系数个数,以产生相对于三种预测方向的小区块类型信息。另外,区块类型信息暂存区用以暂存小区块类型信息产生器产生的各小区块的三种可能的区块类型信息。而大区块(Macroblock)非零系数个数累加器,用以累加大区块(Macroblock)内由小区块非零系数个数产生器产生出的三种非零系数个数组。The small block type information generator receives three non-zero coefficient numbers corresponding to three prediction directions from the small block non-zero coefficient number generator to generate small block type information corresponding to the three prediction directions. In addition, the block type information temporary storage area is used to temporarily store three possible block type information of each small block generated by the small block type information generator. The accumulator for the number of non-zero coefficients in the macroblock is used to accumulate three arrays of non-zero coefficients in the macroblock generated by the generator for the number of non-zero coefficients in the small block.
高通系数预测方向判断器则用以接收经量化后的低通系数信号,当所需的低通系数信号皆输入后,可产生出此大区块高通系数的正确预测方向。而两个多工选择器,则依高通系数预测判断器产生的正确预测方向,选择出于区块类型信息暂存区内正确的高通系数区块类型信息,另一个选择出于大区块非零系数个数累加器里正确的大区块高通系数非零系数个数组。正规化参数产生器则是根据大区块的高通系数正规化参数组,和正确的大区块高通系数非零系数个数组,产生下一个大区块的高通系数正规化参数组,用于小区块非零系数个数产生器里的高通系数正规化。The high-pass coefficient prediction direction determiner is used to receive the quantized low-pass coefficient signal, and can generate the correct prediction direction of the large-block high-pass coefficient after all the required low-pass coefficient signals are input. The two multiplexing selectors select the correct high-pass coefficient block type information in the block type information temporary storage area according to the correct prediction direction produced by the high-pass coefficient prediction judger, and the other selects the correct high-pass coefficient block type information based on the large block non-identical direction. Array of non-zero coefficients of the correct large-block high-pass coefficients in the number of zero coefficients accumulator. The normalization parameter generator is based on the high-pass coefficient normalization parameter group of the large block and the correct large-block high-pass coefficient non-zero coefficient array to generate the high-pass coefficient normalization parameter group of the next large block for use in the community High-pass coefficient normalization in the block non-zero coefficient number generator.
上述产生高通系数的区块类型信息的硬件装置,可用于HD Photo编码器中。The above-mentioned hardware device for generating high-pass coefficient block type information can be used in an HD Photo encoder.
在具体实施例中,请参照图5,据以本发明实施例的产生高通系数的区块类型信息的电路方块示意图。此电路500是以YUV_4:4:4格式的高通系数的区块类型信息产生方式进行说明。此电路500包括小区块非零系数个数产生器、小区块类型信息产生器、区块类型信息暂存器、大区块(Macroblock)非零系数个数累加器、高通系数预测方向判断器或产生器、正规化参数产生器与多工器,底下将参照图示说明。In a specific embodiment, please refer to FIG. 5 , which is a schematic block diagram of a circuit for generating high-pass coefficient block type information according to an embodiment of the present invention. The
上述的小区块非零系数个数产生器为如图所示的4×4区块三种不同方向的HP非零系数计数器510,其用以计算4×4区块在YUV_4:4:4格式的高通预测方向包括由上预测、由左预测以及无预测等三种情形的非零系数个数计数器。The generator of the number of non-zero coefficients in the small block mentioned above is the HP
小区块类型信息产生器则是如图所示的4×4区块三种不同方向的HP区块类型产生器520,连接到HP非零系数计数器510,用以接收其所输出的信号512,也就是4×4区块非零系数个数计数器所产生对应于三种预测方向的三个非零系数个数,以产生相对于三种预测方向之4×4区块类型信息,并以信号522输出。The small block type information generator is the HP
而三种不同方向的HP区块类型暂存器530,则是用以接收此信号522,并暂存所接收的三种不同方向的HP区块类型信息4×4区块类型信息,并以三种不同的预测方向分别经由信号532、534与536传送到多工器560的输入端。此HP区块类型暂存器530可用静态随机存取存储器(SRAM)或是多个暂存器加以实现。The HP block type
而大区块(Macroblock)非零系数个数累加器则是如图所示的Macroblock三种不同方向的HP非零系数累加器540,用以累加大区块内由4×4区块三种不同方向的HP非零系数计数器510所产生的三种非零系数个数组,并以三种不同的预测方向分别经由信号542、544与546传送到多工器570的输入端。The macroblock (Macroblock) non-zero coefficient number accumulator is the HP
而高通系数预测方向判断器则是如图所示的HP预测方向产生器550,用以接收经量化后的低通(LP)系数信号,当所需的低通系数信号皆输入后,可产生出此大区块高通系数的正确预测方向,并以信号552传送给多工器560与570。The high-pass coefficient prediction direction determiner is the HP
多工选择器560,依HP预测方向产生器550产生的正确的HP预测方向,也就是信号552,选择出在三种不同方向的HP区块类型暂存器530内正确的高通系数区块类型信息,并输出HP编码类型信息562。另外,多工选择器570则是根据信号552选择出于Macroblock三种不同方向的HP非零系数累加器540里正确的大区块高通系数非零系数个数组,并输出HP非零系数数量信号572。The multiplexing
正规化参数产生器则是如图所示的正规化参数产生器580,用以接收HP非零系数数量信号572,并根据大区块的高通系数正规化参数组,和HP非零系数数量信号572,产生下一个大区块的高通系数正规化参数组,并输出至HP非零系数计数器510,用于小区块非零系数个数产生器510里的高通系数非零系数计算的依据。The normalization parameter generator is the
上述YUV_4:4:4格式的高通预测如图6所示,共有三种,包括由上预测(Predict from Top)、由左预测(Predict from Left)与无预测(Null Prediction),其中由上预测如图标号610、612与614所示,由左预测如图标号620、622与624所示。The high-pass prediction of the above YUV_4:4:4 format is shown in Figure 6. There are three types, including Predict from Top, Predict from Left and Null Prediction. As indicated by
对于YUV_4:4:4格式的一个详细实施例,依序对Y、U、V做二阶重叠转换运算,每当一小区块的第一阶重叠转换完成后,将量化过后的高通系数输入小区块非零系数个数产生器,由其算出每一个小区块若分别为上、左、和无预测之下,正规化过后的系数非零的个数。此结果一边输出给小区块类型信息产生器,得出小区块的类型信息,另一方面则输出给大区块非零系数个数累加器,用以累加三种情况下大区块的非零系数个数组,其中又分为Y的非零系数个数以及U与V的非零系数个数。小区块的类型信息于区块类型信息暂存区处暂存起来。当第二阶重叠转换完成得出低通系数后,再将量化后的低通系数输入高通系数预测方向判断器,即可算出高通系数的预测方向,最后由正确的预测方向选出正确的区块类型信息以及大区块非零系数个数组。而大区块非零系数个数组可输入给正规化参数产生器,用以产生下一大区块所需的高通系数正规化参数组,其中又分为Y的正规化参数以及UV的正规化参数。For a detailed embodiment of the YUV_4:4:4 format, the second-order overlapping conversion operation is performed on Y, U, and V in sequence. After the first-order overlapping conversion of a small block is completed, the high-pass coefficient after quantization is input into the small area. A generator for the number of non-zero coefficients of a block, which calculates the number of non-zero coefficients after normalization if each small block is respectively up, left, and under no prediction. This result is output to the small block type information generator to obtain the type information of the small block, and on the other hand, it is output to the non-zero coefficient number accumulator of the large block to accumulate the non-zero coefficients of the large block in the three cases An array of coefficients, which is further divided into the number of non-zero coefficients of Y and the number of non-zero coefficients of U and V. The type information of the small block is temporarily stored in the block type information temporary storage area. After the second-order overlapping conversion is completed and the low-pass coefficient is obtained, the quantized low-pass coefficient is input into the high-pass coefficient prediction direction judger, and the prediction direction of the high-pass coefficient can be calculated, and finally the correct area is selected from the correct prediction direction Block type information and an array of non-zero coefficients for large blocks. The array of non-zero coefficients of the large block can be input to the normalization parameter generator to generate the high-pass coefficient normalization parameter group required for the next large block, which is divided into the normalization parameters of Y and the normalization of UV parameter.
利用以上实施例的概念,可以轻易的应用在YUV_4:2:2格式和YUV_4:2:0格式,或是其他色彩格式上。The concepts of the above embodiments can be easily applied to YUV_4:2:2 format, YUV_4:2:0 format, or other color formats.
虽然本发明已以优选实施例公开如上,然其并非用以限定本发明,本领域技术人员,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,因此本发明的保护范围当视所附的权利要求书要求保护的范围所界定者为准。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Those skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection should be defined by the scope of protection required by the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200810088449CN101552918B (en) | 2008-03-31 | 2008-03-31 | Method for generating high-pass coefficient block type information and its generating circuit |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200810088449CN101552918B (en) | 2008-03-31 | 2008-03-31 | Method for generating high-pass coefficient block type information and its generating circuit |
| Publication Number | Publication Date |
|---|---|
| CN101552918A CN101552918A (en) | 2009-10-07 |
| CN101552918Btrue CN101552918B (en) | 2011-05-11 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200810088449Expired - Fee RelatedCN101552918B (en) | 2008-03-31 | 2008-03-31 | Method for generating high-pass coefficient block type information and its generating circuit |
| Country | Link |
|---|---|
| CN (1) | CN101552918B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1805547A (en)* | 2004-12-17 | 2006-07-19 | 微软公司 | Reversible overlap operator for efficient lossless data compression |
| CN1805548A (en)* | 2005-01-14 | 2006-07-19 | 微软公司 | Invertible 2D pre/post filtering for overlapping biorthogonal transforms |
| CN1926868A (en)* | 2003-10-17 | 2007-03-07 | 伦斯莱尔工艺研究院 | Overlapped block motion compensation for variable size blocks in the context of mctf scalable video coders |
| CN1965321A (en)* | 2003-09-07 | 2007-05-16 | 微软公司 | Slice layer in video codec |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1965321A (en)* | 2003-09-07 | 2007-05-16 | 微软公司 | Slice layer in video codec |
| CN1926868A (en)* | 2003-10-17 | 2007-03-07 | 伦斯莱尔工艺研究院 | Overlapped block motion compensation for variable size blocks in the context of mctf scalable video coders |
| CN1805547A (en)* | 2004-12-17 | 2006-07-19 | 微软公司 | Reversible overlap operator for efficient lossless data compression |
| CN1805548A (en)* | 2005-01-14 | 2006-07-19 | 微软公司 | Invertible 2D pre/post filtering for overlapping biorthogonal transforms |
| Publication number | Publication date |
|---|---|
| CN101552918A (en) | 2009-10-07 |
| Publication | Publication Date | Title |
|---|---|---|
| KR100566122B1 (en) | Still image compression method for mobile devices | |
| CN100580766C (en) | image decoding system and method | |
| JP4365957B2 (en) | Image processing method and apparatus and storage medium | |
| US7349579B2 (en) | Image processing device, image processing method, and image reading method | |
| US8213727B2 (en) | Image encoding apparatus and image decoding apparatus, and control method thereof | |
| CN103458242A (en) | Method for compressing and uncompressing image based on color classification and cluster | |
| WO2006080240A1 (en) | Encoding device, encoding method, encoding program, and imaging device | |
| CN101453648A (en) | Method and system for encoding source image and method and system for decoding compressed image | |
| CN107105208A (en) | A kind of lossless coding and coding/decoding method of Bayer images | |
| WO2009087783A1 (en) | Data generator for coding, method of generating data for coding, decoder and decoding method | |
| US20090027517A1 (en) | Method, apparatus, and system for pre-compression assessment of compressed data length | |
| JP2011015347A (en) | Apparatus and method for processing image, program and recording medium | |
| CN114788280A (en) | Video coding and decoding method and device | |
| JPH1118089A (en) | Image data compressor | |
| CN110087085A (en) | Image processing apparatus | |
| US8233729B2 (en) | Method and apparatus for generating coded block pattern for highpass coefficients | |
| CN102271251A (en) | Lossless Image Compression Method | |
| CN101406034B (en) | Compression scheme using qualifier watermarking and apparatus using the compression scheme for temporarily storing image data in a frame memory | |
| CN102118616A (en) | Picture decoding method and picture decoder | |
| CN101552918B (en) | Method for generating high-pass coefficient block type information and its generating circuit | |
| US20090304073A1 (en) | Systems and Methods for the Bandwidth Efficient Processing of Data | |
| US11765366B2 (en) | Method for processing transform coefficients | |
| Daho et al. | A JPEG-like algorithm for compression of single-sensor camera image | |
| JP3979020B2 (en) | Image processing apparatus for sampling compressed image | |
| JP2008124530A (en) | Raw data compression method |
| 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 | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20110511 Termination date:20150331 | |
| EXPY | Termination of patent right or utility model |