CN1290340C - predictive decoding method - Google Patents
predictive decoding method Download PDFInfo
- Publication number
- CN1290340C CN1290340C CN 03154547 CN03154547A CN1290340C CN 1290340 C CN1290340 C CN 1290340C CN 03154547 CN03154547 CN 03154547 CN 03154547 A CN03154547 A CN 03154547A CN 1290340 C CN1290340 C CN 1290340C
- Authority
- CN
- China
- Prior art keywords
- block
- predictors
- target
- target block
- storage
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种使用存储器存取的预测式译码方法,特别是涉及一种使用至少一存储装置存取一视讯画面中的多个预测元,并减少存储装置的使用量的方法。The present invention relates to a predictive decoding method using memory access, in particular to a method for using at least one storage device to access multiple predictors in a video frame and reducing the usage of the storage device.
背景技术Background technique
1988年MPEG(Motion Picture Experts Group,动画专家群组)成立。MPEG为ISO(国际标准组织)的一个工作小组,这个工作小组建立并推广了一些数字视讯及音讯的标准压缩格式,这些压缩格式如今已广泛地应用在全球数字化内容产品的制作上。自1988年成立以来,MPEG公布了数项重要的标准。在影音文件的格式中,动态影像压缩标准MPEG-2和MPEG-4是其中的佼佼者,两者在加译码的操作流程上,也多有相似之处。关于动态影像压缩标准MPEG-4的部分译码程序请参阅图1,图1为一MPEG-4译码器(decoder)10中部分装置的功能方块图。图1的译码器10包含了一可变长度译码单元(variable length decoder)12、一反扫描单元14(inverse scanner)、一反DC/AC预测模块(inverse DC/AC prediction module)16、一反量化单元(inverse quantization unit)18、一反离散余弦转换器(inverse DCT)20、以及一移动补偿单元(motion compensation unit)22。请见图1,经压缩后的视讯(video)数据经过可变长度译码单元12,经一可变长度译码程序处理之后,可将编码端传来的视讯数据作一基本的译码操作,接下来经过反扫描单元14进行一反扫描程序,将一维矩阵格式(one-dimensional array)的视讯数据重新还原为二维矩阵格式(two-dimensional array)的视讯数据,而反DC/AC预测模块16的详细说明将于之后的篇幅提供。前述该此二维矩阵格式的视讯数据会再经过反量化单元18执行反量化程序后,还原成原来在频域(frequencydomain)的离散余弦转换系数(DCT coefficient)。接下来,产生的该离散余弦转换系数随即输入至反离散余弦转换器20,产生许多非零值的输出,将影像在频域上的讯号转换成为在空间(spatial domain)上的讯号,以将讯号回复成压缩前的数据流,最后,由移动补偿单元22进行一移动补偿程序,将所收到的数据流作整合,并根据参考画面的信息与移动向量来产生出最后的解码输出画面。In 1988, MPEG (Motion Picture Experts Group, animation expert group) was established. MPEG is a working group of ISO (International Standards Organization). This working group has established and promoted some standard compression formats for digital video and audio. These compression formats are now widely used in the production of digital content products around the world. Since its establishment in 1988, MPEG has announced several important standards. Among the audio and video file formats, the dynamic image compression standards MPEG-2 and MPEG-4 are among the best, and the two also have many similarities in the operation process of adding and decoding. Please refer to FIG. 1 for a partial decoding procedure of the dynamic image compression standard MPEG-4. FIG. 1 is a functional block diagram of some devices in an MPEG-4 decoder (decoder) 10 . The
请注意,上面简述中未提及的反DC/AC预测模块16的相关功能,实为MPEG-4译码器10最重要的技术特征之一。请参阅图2,图2为一已知反DC/AC预测模块16的运作的示意图。图2承袭了图1的架构,说明了由反扫描单元14所产生的二维矩阵格式的视讯讯号,会再经反DC/AC预测模块16进行一预测操作(预测运算),进一步于二维空间上译码出整个视讯画面的像素系数(pixel coefficient)。而在反DC/AC预测模块16的运作过程中,整个视讯画面被区分为多个8*8像素大小的区块(block),下一个将被解码得出的新的区块的像素系数,则是依据之前已被译码完成的区块的部分像素系数,由预测选择单元24送至反DC/AC预测模块16,再加上由可变长度译码单元12计算出的差动值(difierential value),两者合并完成。为求清楚说明图2的反DC/AC预测模块16及预测选择单元24于一视讯画面上的运作情形,请先参阅图3。图3为于一视讯画面30上的一宏区块(macro-block)32中执行上述预测操作的示意图。在动态影像压缩标准MPEG中,最基本的处理单位是8*8像素大小的区块,而一个宏区块32具有16*16像素大小,包含了四个区块。由于动态影像压缩标准MPEG采用亮度(luminance)及色度(chrominance)的色彩表示格式,在本实施例中的宏区块32实际上指的是亮度宏区块(luminance macro-block)。如此一来,若水平和垂直的色度数据是以相当于亮度的取样频率一半的取样频率取样,则原16×16像素被取样以及该取样的亮度与色度数据被编码以产生一亮度宏区块(Y)与二个色度区块(Cr和Cb),其中该亮度宏区块包含有对应于该16×16像素的亮度信息,而该二色度区块分别包含有对应于该16×16像素的一半的色度信息。Please note that the relevant functions of the inverse DC/
请继续参阅图3,宏区块32包含了一第一区块B、一第二区块C、一第三区块A、及一欲加以解码的第四区块X。欲对第四区块X进行译码的工作前,会于邻近区块(第一区块B、第二区块C、第三区块A)中各自定义出多个预测元(predictor),而此多个预测元依据在每一区块中的空间配置,又可区分成DC系数(DC coefficient)与AC(AC coefficient)系数两种。如图3所示,第一区块B、第二区块C、与第三区块A各自包含一DC系数,分别为DCB、DCC、DCA(图中双斜线填满的格),而对第四区块X而言,在本次预测操作中,第二区块C中还包含了多个(七个)AC系数:ACC(以二维矩阵格式表示:ACC[0][n],n为1到7的整数);同理,第三区块A包含了七个AC系数:ACA(以二维矩阵格式表示:ACA[n][0],n为1到7的整数)。由于第四区块X中的部分像素系数有两个预测元的来源:由位于上方的第二区块C或位于左方的第三区块A,为了判断第四区块X的像素系数是由第二区块C或第三区块A中的预测元而得,必须经由一下述的判断式以决定出一移动向量:(|DCA-DCB|<|DCB-DCC|) (式一)若式一成立,则图2的预测选择单元24会判断第四区块X中的部分像素系数由第二区块C而来,并决定出一第一移动向量(DCAC方向向量)M1,反的,若式一不成立,则判断第四区块X中的部分像素系数由第三区块A而来,并决定出一第二移动向量M2。在确定预测元的来源及移动向量之后,图2的反DC/AC预测模块16则将来源区块的DC系数加上一DC差动值,设为第四区块X的DC系数,也就是图3中所显示的第四区块X中的第一个像素系数。接着,图2的预测选择单元24会将来源区块的预测元的AC系数送至反DC/AC预测模块16,让AC系数加上一AC差动值,设为第四区块X的AC系数,且此AC系数位于第四区块X中的一第一储存列(storingrow)或一第一储存行(storing column)。举例而言,若来源为上方的第二区块C,图2的反DC/AC预测模块16则会将第二区块C的DCC及ACC分别加上由可变长度译码单元12计算出的DC差动值及AC差动值,并将得出的结果值设为第四区块X中一第一储存列(33)的像素系数,再将整个第四区块X解码。同理,若来源为左方的第三区块A,则第三区块A的DCA与ACA则会分别加上由可变长度译码单元12计算出的DC差动值及AC差动值,将得出的结果值设为第四区块X中一第一储存行(35)的像素系数,再将整个第四区块X解码。Please continue to refer to FIG. 3 , the macroblock 32 includes a first block B, a second block C, a third block A, and a fourth block X to be decoded. Before decoding the fourth block X, a plurality of predictors (predictors) are respectively defined in adjacent blocks (the first block B, the second block C, and the third block A), According to the spatial configuration in each block, the plurality of predictors can be further divided into two types: DC coefficient (DC coefficient) and AC (AC coefficient) coefficient. As shown in Figure 3, the first block B, the second block C, and the third block A each contain a DC coefficient, which are respectively DC B , DC C , and DC A (the cells filled with double oblique lines in the figure ), and for the fourth block X, in this prediction operation, the second block C also contains multiple (seven) AC coefficients: AC C (expressed in a two-dimensional matrix format: AC C [ 0][n], n is an integer from 1 to 7); similarly, the third block A contains seven AC coefficients: AC A (expressed in a two-dimensional matrix format: AC A [n][0], n is an integer from 1 to 7). Since some of the pixel coefficients in the fourth block X have two sources of predictors: the second block C located above or the third block A located on the left, in order to determine whether the pixel coefficients of the fourth block X are Obtained from the predictors in the second block C or the third block A, a motion vector must be determined through the following judgment formula: (|DC A -DC B |<|DC B -DC C |) (Equation 1) If
由上可知,MPGE-4的压缩标准会依据空间上相邻且已译码的区块的预测元,得出欲加以解码的区块中的部分像素系数。对整个视讯画面30而言,依序将每一个区块经过上述预测操作的处理后,则可产生整个视讯画面30的像素系数。此外,在译码的过程中,由于需要不断的决定出预测元以供欲加以译码的区块使用,则系统(如图1及图2所示的译码器10)中必须配置至少一存储装置以供储存多个预测元的用。为推演出完整的预测操作的程序,以下述图4的例子描述将一宏区块42译码的情形,同时也观察在过程中所需储存的预测元的数目。请参阅图4,其为已知技术一实施例的示意图。与图3实施例的定义略为不同,于本实施例中欲加以解码的区块包含一第一区块X、一第二区块Y、一第三区块X’、及一第四区块Y’,并将此四区块合并视为一宏区块42。在此四区块的周围分别有一参考区块(reference block)B、一第一邻接区块A(adjacent block)、一第二邻接区块C、一第三邻接区块C’、与一第四邻接区块A’。此时,请回头同时参照图2的架构。承袭图3实施例中利用上方及左方两邻近区块以得出欲加以译码的区块的数据的特征,在处理第一区块X时,需要提供位于其左上方的参考区块B的一预测元(DCB)、位于其上方的第一邻接区块A的八个预测元(一个DCC及七个ACC[0][1-7])、与位于其上方的第二邻接区块C的八个预测元(一个DCC及七个ACC[1-7][0]),在图2中的预测选择单元24由DCB、DCC、及DCA判断出正确的预测元来源后,将其余的AC系数传送至图2中的反DC/AC预测模块16,与可变长度译码单元12送来的差动值结合,得出第一区块X的像素系数。意即,为完成第一区块X的译码,在系统中需设置一可储存相当于17个预测元(17=1+8+8)的容量的存储装置。在完成第一区块X的编码后,在处理第二区块Y前,由于与第二区块Y紧邻的是第一区块X和第三邻接区块C’,则需将第一区块X的最左行设为预测元,继续利用第二邻接区块C的DCC、第一区块X的DCX与ACX[1-7][0]、以及第三邻接区块C’的DCC’与ACC’[0][1-7]以决定出第二区块Y的部分像素系数。同理,第一邻接区块A的DCA、第一区块X的DCX与ACX[0][1-7]、以及第四邻接区块A’的DCA’与ACA’[1-7][0]可决定出第三区块X’的部分像素系数。第一区块X的DCX、第二区块Y的DCY与ACY[0][1-7]、以及第三区块X’的DCX’与ACX’[1-7][0]可决定出第四区块Y’的部分像素系数。It can be seen from the above that the compression standard of MPGE-4 obtains some pixel coefficients in the block to be decoded according to the predictors of the spatially adjacent and decoded blocks. For the entire video frame 30 , after each block is sequentially processed by the above prediction operation, the pixel coefficients of the entire video frame 30 can be generated. In addition, in the process of decoding, since it is necessary to continuously determine the predictors for the blocks to be decoded, the system (
对于每一个宏区块42(包含图3所述的一(16×16像素大小的)亮度宏区块32、一个(8×8像素大小的)Cb色度区块、与一个(8×8像素大小的)Cr色度区块)而言,上述的预测操作与译码程序可归纳于图5,图5为一已知技术的实施例的流程图:For each macroblock 42 (including one (16×16 pixel size) luma macroblock 32 described in FIG. 3 , one (8×8 pixel size) Cb chrominance block, and one (8×8 pixel size) Pixel-sized (Cr chrominance block), the above-mentioned prediction operation and decoding procedure can be summarized in FIG. 5, and FIG. 5 is a flow chart of an embodiment of a known technology:
步骤100:开始;Step 100: start;
步骤101:在处理宏区块中的任一区块时(如图4的第一区块X)时,判断是否具有可执行预测操作的各个预测元。(例如,对于图4的第一区块X而言,所需的预测元包含区块的预测元DCB、第一邻接区块A的预测元DCA及ACA[1-7][0]、第二邻接区块C的预测元DCC与ACC[0][1-7]),若有,则进行步骤103,若无,则进行步骤102;Step 101: When processing any block in the macroblock (such as the first block X in FIG. 4 ), determine whether there are predictors that can perform prediction operations. (For example, for the first block X in FIG. 4, the required predictors include the predictor DC B of the block, the predictors DC A and AC A [1-7][0 of the first adjacent block A ], the predictor DC C and AC C [0][1-7] of the second adjacent block C), if there is, then proceed to
步骤102:以一预定方式设定该欲加以译码的区块所需的预测元,如设定所需的DC系数为一固定值,同时设定所需的AC系数为0,预设完成后进行步骤104;Step 102: Set the predictor required by the block to be decoded in a predetermined manner, such as setting the required DC coefficient to a fixed value, and simultaneously setting the required AC coefficient to 0, and the preset is completed Carry out
步骤103:判断并确定预测元的来源及一相关的移动向量,得出该欲加以译码的区块所需的预测元。于实际实施时,可由上述于系统中用来储存预测元的存储装置中,将所需的预测元读出,并进行步骤104;Step 103: Judging and determining the source of the predictor and a related motion vector to obtain the predictor required by the block to be decoded. In actual implementation, the required predictor can be read from the above-mentioned storage device used to store the predictor in the system, and
步骤104:将多个预测元中的一DC系数加上由可变长度译码单元计算出的一DC差动值,产生该欲加以解码的区块的DC系数;再将多个预测元中多个AC系数加上由可变长度译码单元计算出的AC差动值,产生该欲加以解码的区块的AC系数,并置于该欲加以解码的区块中的第一储存列或第一储存行;Step 104: Add a DC coefficient in multiple predictors to a DC differential value calculated by the variable-length decoding unit to generate a DC coefficient of the block to be decoded; and then add DC coefficients in the multiple predictors The AC coefficients of the block to be decoded are generated by adding the AC differential value calculated by the variable-length decoding unit to the AC coefficients, and placed in the first storage row or in the block to be decoded. first storage line;
步骤105:使用一计数器(counter),将计数器存储器的值(整数)加一;Step 105: use a counter (counter) to add one to the value (integer) of the counter memory;
步骤106:判断计数器存储器的值是否大于4,若否,则回头进行步骤101,继续处理此宏区块中的另一区块,若计数器存储器的值大于4,则代表将此宏区块中的四个区块皆处理完成,则进行步骤107;Step 106: Determine whether the value of the counter memory is greater than 4, if not, go back to
步骤107:执行预测操作与译码程序于一8×8像素大小的Cb色度区块与一8×8像素大小的Cr色度区块;Step 107: Execute prediction operation and decoding procedure on a Cb chrominance block of 8×8 pixel size and a Cr chrominance block of 8×8 pixel size;
步骤108:结束此宏区块中的预测操作与译码程序,跳至下一个宏区块。Step 108: End the prediction operation and decoding procedure in this macroblock, and skip to the next macroblock.
上述的已知技术除了已有部分规范于动态影像压缩标准MPEG-4中之外,许多相关方法及架构披露于Haskell等人提出的US Patent No.6,005,622,“Video coder providing implicit or explicit prediction for image coding andintra coding of video”中。请注意,如图4实施例中所述,在预测操作与译码过程中,由于需要不断决定出预测元以供欲加以译码的区块使用,系统中必须配置至少一存储装置以供储存多个预测元之用。依据图4实施例所述的内容概略推算,宏观而言,于每一宏区块的任一区块中,位于该区块的最左行及最上列的像素系数都会被决定成预测元,而为了将一宏区块译码,系统中必须设置一个可储存相当于17*6个预测元的容量的存储装置(前述的17*6的6的计算方式是:四个Y区块、一个Cb区块与一个Cr区块)。继续以此类推,若欲于二维空间上译码出一整个视讯画面中全部的像素系数,所需存取的预测元的数量则相当可观(以一720×480像素大小的视讯画面为例,约略会决定出30*45*17*4个预测元)。这也意味着,系统中设置的存储装置的容量必须要能储存如此巨大数量的预测元。只是,关于存储装置的容量的考虑,在主要以软件(Software)操作完成译码程序的已知技术(如已知专利US Patent No.6,005,622)中并不重要,然而,在今日产业界均欲以一硬件单元整合相关视讯编/译码器的趋势下,在系统中,以嵌入芯片(On-chip)式的方法设置具有如此庞大容量的存储装置则变的不可行。In addition to the above-mentioned known technologies that have been partly regulated in the dynamic image compression standard MPEG-4, many related methods and structures are disclosed in US Patent No. 6,005,622 proposed by Haskell et al., "Video coder providing implicit or explicit prediction for image coding and intra coding of video". Please note that, as described in the embodiment of FIG. 4, during the prediction operation and decoding process, since it is necessary to continuously determine the predictor for the block to be decoded, at least one storage device must be configured in the system for storage Multiple predictors are used. According to the general calculation of the content described in the embodiment of FIG. 4, macroscopically speaking, in any block of each macroblock, the pixel coefficients located in the leftmost row and the uppermost column of the block will be determined as predictors. In order to decode a macroblock, a storage device capable of storing the capacity equivalent to 17*6 predictors must be provided in the system (the calculation method of 6 of the aforementioned 17*6 is: four Y blocks, one Cb block and a Cr block). Continuing in this way, if it is desired to decode all the pixel coefficients in an entire video frame in two-dimensional space, the number of predictors required to be accessed is considerable (taking a video frame with a size of 720×480 pixels as an example , roughly 30*45*17*4 predictors will be determined). This also means that the capacity of the storage device set in the system must be able to store such a huge number of predictors. Just, the consideration about the capacity of storage device is not important in the known technology (such as known patent US Patent No.6,005,622) that mainly completes the decoding program with software (Software) operation, yet, in today's industry circle all want Under the trend of integrating related video codecs/decoders with one hardware unit, it becomes unfeasible to install such a large-capacity storage device in an on-chip manner in the system.
发明内容Contents of the invention
因此本发明的主要目的在于一种使用较少的存储空间来存取一视讯画面中的多个预测元的方法,以解决上述问题。Therefore, the main purpose of the present invention is to provide a method for accessing multiple predictors in a video frame with less storage space, so as to solve the above-mentioned problems.
本发明提供一种预测式解码方法(predictive decoding method),用以译码一视讯画面(picture)以产生对应于该视讯画面的多个区块的多个预测元(predictor),该预测式解码方法包含有:(a)将一第一区块的多个第一垂直预测元(vertical predictor)储存至一第一存储装置的一储存行(storingcolumn),以及将一第二区块的多个第一水平预测元(horizontal predictor)储存至该第一存储装置的一储存列(storing row);(b)执行一预测运算(prediction operation)以依据该多个第一垂直预测元与该多个第一水平预测元来产生一第一目标区块的多个目标垂直预测元与多个目标水平预测元,其中该第一目标区块相邻于该第一与该第二区块,而该第一区块与该第一目标区块系位于同一行;以及(c)利用该多个目标垂直预测元来更新该第一存储装置的该储存行,以及利用该多个目标水平预测元来更新该第一存储装置的该储存列。The present invention provides a predictive decoding method for decoding a video picture to generate multiple predictors corresponding to multiple blocks of the video picture. The predictive decoding The method includes: (a) storing a plurality of first vertical predictors of a first block into a storage column of a first storage device, and storing a plurality of vertical predictors of a second block The first horizontal predictor (horizontal predictor) is stored in a storage row (storing row) of the first storage device; (b) perform a prediction operation (prediction operation) to base on the plurality of first vertical predictors and the plurality of A first horizontal predictor is used to generate a plurality of target vertical predictors and a plurality of target horizontal predictors of a first target block, wherein the first target block is adjacent to the first and the second blocks, and the first target block is adjacent to the first and the second blocks, and the The first block and the first target block are located in the same row; and (c) using the plurality of target vertical predictors to update the storage row of the first storage device, and using the plurality of target horizontal predictors to update updating the storage rank of the first storage device.
本发明还提供一种用以将一宏区块(macro-block)的多个预测元(predictor)储存至一第一存储装置与一第二存储装置内的方法,该宏区块包含有一第一区块、一第二区块、一第三区块,以及一第四区块,该方法包含有:(a)依据一第一邻接区块(adjacent block)与一第二邻接区块来产生该第一区块的多个预测元;(b)于进行步骤(a)后,将该第一区块的该多个预测元储存至该第一存储装置;(c)于进行步骤(b)后,依据一第三邻接区块与该第一区块产生该第二区块的多个预测元;(d)于进行步骤(c)后,将该第二区块的该多个预测元储存至该第一存储装置内;(e)于进行步骤(d)后,依据一第四邻接区块或该第一区块产生该第三区块的多个预测元;(f)于进行步骤(e)后,将该第三区块的该多个预测元储存至该第一存储装置与该第二存储装置内;(g)于进行步骤(f)后,依据该第二区块与该第三区块来产生该第四区块的多个预测元;以及(h)于进行步骤(g)后,将该第四区块的该多个预测元储存至该第一存储装置与该第二存储装置内。The present invention also provides a method for storing a plurality of predictors of a macro-block comprising a first storage device and a second storage device. A block, a second block, a third block, and a fourth block, the method includes: (a) according to a first adjacent block (adjacent block) and a second adjacent block to Generate a plurality of predictors of the first block; (b) after performing step (a), store the plurality of predictors of the first block in the first storage device; (c) perform step ( b) afterwards, generate a plurality of predictors of the second block according to a third adjacent block and the first block; (d) after performing step (c), generate the plurality of predictors of the second block The predictor is stored in the first storage device; (e) after step (d), a plurality of predictors of the third block are generated according to a fourth adjacent block or the first block; (f) After performing step (e), storing the multiple predictors of the third block in the first storage device and the second storage device; (g) after performing step (f), according to the second block and the third block to generate a plurality of predictors for the fourth block; and (h) after performing step (g), storing the plurality of predictors for the fourth block in the first The storage device and the second storage device.
附图说明Description of drawings
图1为一MPEG-4译码器中部分装置的功能方块图。Fig. 1 is a functional block diagram of some devices in an MPEG-4 decoder.
图2为一已知反DC/AC预测模块的运作的示意图。FIG. 2 is a schematic diagram of the operation of a conventional inverse DC/AC prediction module.
图3为于一视讯画面上一宏区块中执行预测译码的示意图。FIG. 3 is a schematic diagram of performing predictive decoding in a macroblock on a video frame.
图4为已知技术一实施例的示意图。Fig. 4 is a schematic diagram of an embodiment of the known technology.
图5为一已知技术的方法实施例的流程图。FIG. 5 is a flowchart of a method embodiment of a known technology.
图6为一视讯画面的空间配置图。FIG. 6 is a spatial configuration diagram of a video frame.
图7为本发明一实施例的示意图。Fig. 7 is a schematic diagram of an embodiment of the present invention.
图8为本发明的一详细方法实施例的流程图。FIG. 8 is a flowchart of a detailed method embodiment of the present invention.
图9为于图8所示的实施例中再加入一第二存储装置的相关操作的流程图。FIG. 9 is a flowchart of related operations of adding a second storage device in the embodiment shown in FIG. 8 .
图10为图7存储装置中的储存行及储存列的内容变化情形的列表。FIG. 10 is a list of content changes of storage rows and storage columns in the storage device of FIG. 7 .
附图符号说明Description of reference symbols
10 译码器 12 可变长度译码单元10
14 反扫描单元 16 反DC/AC预测模块14
18 反量化单元 20 反离散余弦转换器18
22 移动补偿单元 24 预测选择单元22
30、50 视讯画面 32、42、52 宏区块30, 50
33 第一储存列 35 第一储存行33 The first storage row 35 The first storage row
51 宏区块列 53 Cb色度区块51 Macroblock Column 53 Cb Chroma Block
55 Cr色度区块 56 存储装置55
58 第二存储装置58 Second storage device
具体实施方式Detailed ways
在本发明的预测式译码方法中,该视讯数据比特流(video bitstream)包含有多个视讯画面(picture),而每一该视讯画面可以是一动态影像压缩标准MPEG(moving picture expert group,简称MPEG)的规格所定义的一帧(frame)、一上图场(top field)或是一底图场(bottom field)。一视讯画面可区分成多个宏区块(macro-block)52,而每一个16*16像素(pixel)大小的宏区块52可被视为是一处理单元(processing unit)。请参阅图6,图6为一视讯画面50的空间配置图。视讯画面50包含有多个宏区块列(macro-blockrow)51,每一宏区块列51包含有多个宏区块52,而每一个宏区块52包含了四个8*8像素大小的区块。以一720×480像素大小的视讯画面50为例,其包含了30个宏区块列51,每一宏区块列51包含了45个宏区块52。此外,图6中亦显示出一箭号MR1,其代表了本发明处理宏区块52的顺序依序(由左至右)处理在一宏区块列51中的每一个宏区块52。承袭图4的基本架构,在本实施例中所示的宏区块52可单指一亮度宏区块(luminancemacro-block),而若水平和垂直的色度数据是以相当于亮度的取样频率的一半的取样频率取样,则对应于一宏区块52的两个8×8像素大小的色度区块(分别为Cr和Cb)53、55会先被处理,而接着才会去解码之后的16×16像素大小的宏区块52。In the predictive decoding method of the present invention, the video data bitstream (video bitstream) includes a plurality of video frames (picture), and each of the video frames can be a dynamic image compression standard MPEG (moving picture expert group, A frame (frame), a top field (top field) or a bottom field (bottom field) defined by the specification of MPEG for short. A video frame can be divided into
请参阅图7,图7为本发明一实施例的示意图,显示了本发明如何利用一存储装置进行预测元(predictor)的存取,以降低相关存储装置所需容量的技术特征。类似于图4已知实施例中的定义,于本实施例中欲加以译码的宏区块52包含一第一区块X”、一第二区块Y”、一第三区块X”’,以及一第四区块Y”’。在此四区块的周围分别有一参考区块(reference block)B’、一第一邻接区块A’(adiacent block)、一第二邻接区块C’、一第三邻接区块C”、与一第四邻接区块A”。请注意,于图7中,在欲加以译码的宏区块52的周围显示了一存储装置(memory device)56,存储装置56包含一储存行56C(storing column)及一储存列56R(storing row),用来储存于预测式解码过程中所产生的预测元,为方便说明起见,存储装置56中每一存储单元(memory cell),如图7中储存行56C及储存列56R中的每一区块皆可用来储存一预测元。依循动态影像压缩标准MPEG-4的预测译码规则,在处理欲加以解码的区块时,利用其邻近区块的预测元以得出欲加以译码的区块的数据。请见图7,在处理第一区块X”时,系统需要提供位于其左上方的参考区块B’的一预测元(DCB’)、位于其左方的第一邻接区块A’的八个预测元(DCA’与ACA’[1-7][0])、与位于其上方的第二邻接区块C’的八个预测元(DCC’与ACC’[0][1-7])。Please refer to FIG. 7 . FIG. 7 is a schematic diagram of an embodiment of the present invention, showing how the present invention utilizes a storage device for predictor access to reduce the required capacity of the related storage device. Similar to the definition in the known embodiment of FIG. 4, the
在本发明中,我们将预测元依据她们的空间位置来区分成三类:垂直预测元(vertical predictor)、水平预测元(horizontal predictor)、以及对角预测元(diagonal predictor)。例如,第一邻接区块A’内位于同一行的八个预测元(包含ACA’[1-7][0]与DCA’)皆视为垂直预测元,第二邻接区块C’内位于同一列的八个预测元(包含ACC’[0][1-7]与DCC’)皆视为水平预测元,而位于参考区块B’内左下角的预测元DCB’则被视为一对角预测元。于本实施例中,每一区块内的左上角的预测元皆被定义为另一区块所需的一对角预测元,举例而言,参考区块B’的预测元DCB’是第一区块X”的一对角预测元,而第二邻接区块C’的预测元DCC’是第二区块Y”的一对角预测元;换句话说,一区块的一水平预测元亦可视为是另一区块的一对角预测元,以及/或一区块的一垂直预测元亦可视为是另一区块的一对角预测元。储存列56R的八个存储单元(定义为56R[0-7])将储存第二邻接区块C’的八个水平预测元,而储存行56C的八个存储单元(定义为56C[0-7])将储存第一邻接区块A’的八个垂直预测元,而存储装置56另有一存储单元56D,其被保留以存放参考区块B’的对角预测元DCB’。In the present invention, we divide the predictors into three categories according to their spatial positions: vertical predictors, horizontal predictors, and diagonal predictors. For example, the eight predictors (including AC A' [1-7][0] and DC A' ) located in the same row in the first adjacent block A' are all regarded as vertical predictors, and the second adjacent block C' The eight predictors (including AC C' [0][1-7] and DC C' ) located in the same column are all regarded as horizontal predictors, and the predictor DC B' located in the lower left corner of the reference block B' is treated as a pair of diagonal predictors. In this embodiment, the upper-left predictor in each block is defined as a pair of corner predictors required by another block. For example, the predictor DC B' of the reference block B' is A diagonal predictor of the first block X" and a predictor DC C' of a second adjacent block C' is a diagonal predictor of the second block Y"; in other words, a A horizontal predictor can also be considered as a diagonal predictor of another block, and/or a vertical predictor of one block can also be considered as a diagonal predictor of another block. The eight memory
请继续参阅图7,在系统依据DCB’、DCC’与DCA’判断出正确的预测元来源后,将其余的AC系数与相关的差动值结合(关于与差动值结合的运作程序可参照图2的已知实施例),得出第一区块X”的像素系数(pixelcoefficient)。接着,为完成宏区块52中其余区块的预测解码,将第一区块X”的最左行及最上列的像素系数都设为预测元,并存入存储装置56中。于本实施例中,新决定出的第一区块X”的(水平)预测元DCX”与ACX”[0][1-7]会取代原先储存于储存列56R[0-7]中的第二邻接区块C’的八个水平预测元,并储存至储存列56R[0-7]中。同理,新决定出的第一区块X”的(垂直)预测元DCX”与ACX”[1-7][0]会取代原先储存于储存行56C[0-7]中的第一邻接区块A’的八个垂直预测元,并储存至储存行56C[0-7]中。如此一来,藉由在存储装置56中利用置换取代的方法,即无须浪费额外的空间来储存预测元。在完成第一区块X”的译码后,紧接着准备处理第二区块Y”。由于与第二区块Y”紧邻的是第一区块X”和第三邻接区块C”,因此,需先依据DCC’、DCX”与DCC”来判断出正确的预测元来源,之后再利用第一区块X”的DCX”与ACX”[1-7][0]以及第三邻接区块C”的DCC”与ACC”[0][1-7]以决定出第二区块Y”的预测元的部分像素系数。之后,新决定出的第二区块Y”的(水平)预测元DCY”与ACY”[0][1-7]会取代原先储存于储存列56R[8-15]中的第三邻接区块C”的八个水平预测元,并储存至储存列56R[8-15]中。而新决定出的第二区块Y”的(垂直)预测元DCY”与ACY”[1-7][0]会取代于前一操作中存入储存行56C[0-7]中的第一区块X”的DCX”与ACX”[1-7][0],并储存至储存行56C[0-7]中。Please continue to refer to Figure 7. After the system determines the correct predictor source based on DC B' , DC C' and DC A' , it combines the remaining AC coefficients with the relevant differential values (about the operation of combining with the differential values The program can refer to the known embodiment of FIG. 2 ) to obtain the pixel coefficient (pixelcoefficient) of the first block X ". Then, in order to complete the predictive decoding of the remaining blocks in the
同理,在第一邻接区块A’的DCA’、第一区块X”的DCX”与ACX”[0][1-7],以及第四邻接区块A”的DCA”与ACA”[1-7][0]决定出第三区块X”’的部分像素系数之后,将会决定出第三区块X”’的预测元DCX”’、预测元ACX”’[0][1-7]与预测元ACX”’[1-7][0],随后,新决定出的预测元DCX”’与ACX”’[1-7][0]将会取代原先储存于储存行56C[8-15]中的第四邻接区块A”的八个垂直预测元,并储存至储存行56C[8-15]中。然后,第一区块X”的DCX”、第二区块Y”的DCY”与ACY”[0][1-7],以及第三区块X”’的DCX”’与ACX”’[1-7][0]将会决定出第四区块Y”’的部分像素系数,之后将会决定出第四区块Y”’的预测元DCY”’、预测元ACY”’[0][1-7]与预测元ACY”’[1-7][0],而随后,新决定出的预测元DCY”’与ACY”’[1-7][0]将会取代于前一操作中存入储存行56C[8-15]中的第三区块X”’的DCX”’与ACX”’[1-7][0],并储存至储存行56C[8-15]中。Similarly, DC A' in the first adjacent block A ' , DC X" and AC X " [0][1-7] in the first block X" and DC A in the fourth adjacent block A " After " and AC A" [1-7][0] determine some pixel coefficients of the third block X"', the predictor DC X"' and the predictor AC of the third block X"' will be determined X"' [0][1-7] and predictor AC X"' [1-7][0], and then the newly determined predictor DC X"' and AC X"' [1-7][ 0] will replace the eight vertical predictors of the fourth adjacent block A" originally stored in
本实施例将垂直预测元、水平预测元与对角预测元储存至存储装置56的储存行56C、储存列56R与一另外的存储单元56D,并于存储装置56内利用置换取代的方式来节省存储装置56的空间。而于实际实施时,存储装置56可以为一运作缓存器(processing register),或是在硬件效能容许的情况下,可为一普通的缓存器(register)。本实施例使用一存储装置56存取一视讯画面50中的多个预测元,而执行预测式译码的方法可归纳于下列步骤,并请见图8,图8为本发明的一详细方法实施例的流程图:In this embodiment, the vertical predictor, the horizontal predictor and the diagonal predictor are stored in the
步骤200:开始;Step 200: start;
步骤201:当处理一宏区块52中的一第一区块X”时,参考多个邻接区块以产生第一区块X”所需的多个预测元(包含多个水平预测元、多个垂直预测元,以及一对角预测元),之后进行至步骤202;请参阅图7,其中第一区块X”位于宏区块52的左上方,而前述该多个邻接区块包含有一位于第一区块X”的左上方的参考区块B’、一位于第一区块X”的左方的第一邻接区块A’,以及一位于第一区块X”的上方的第二邻接区块C’;Step 201: When processing a first block X" in a
步骤202:将该多个垂直预测元储存于储存行56C[0-7],将该多个水平预测元储存于储存列56R[0-7],并将一对角预测元储存于上述的存储单元56D,之后进行至步骤203;而新决定出的第一区块X”的该多个水平预测元将会取代原先储存于储存列56R[0-7]内的第二邻接区块C’的该多个水平预测元,新决定出的第一区块X”的该多个垂直预测元将会取代原先储存于储存行56C[0-7]内的第二邻接区块C’的该多个垂直预测元,而第二区块Y”所需的对角预测元DCC’将会取代原先储存于存储单元56D内的第一区块X”所需的对角预测元DCB’;Step 202: Store the plurality of vertical predictors in
步骤203:当处理宏区块52中的一第二区块Y”时,参考多个邻接区块以产生第二区块Y”所需的多个预测元(包含多个水平预测元、多个垂直预测元,以及一对角预测元),之后进行至步骤204。请参阅图7,其中第二区块Y”位于宏区块52的右上方,而前述该多个邻接区块包含有位于第二区块Y”的左上方的第二邻接区块C’、位于第二区块Y”的左方的第一区块X”,以及一位于第二区块Y”的上方的第三邻接区块C”。Step 203: When processing a second block Y" in the
步骤204:将第二区块Y”的该多个垂直预测元(共8个)储存于储存行56C[0-7],将该多个水平预测元(共8个)储存于储存列56R[8-15],并将一对角预测元储存于该存储单元56D,之后进行至步骤205。而新决定出的第二区块Y”的水平预测元将会取代原先储存于储存列56R[8-15]内的第三邻接区块C”的该多个水平预测元,新决定出的第二区块Y”的该多个垂直预测元将会取代原先于步骤202中储存至储存行56C[0-7]内的第一区块X”的该多个垂直预测元(共8个),而第三区块X”’所需的对角预测元DCA’将会取代原先储存于存储单元56D内的第二区块Y”所需的对角预测元DCC’;Step 204: Store the plurality of vertical predictors (8 in total) of the second block Y" in the
步骤205:当处理宏区块52中的一第三区块X”’时,参考多个邻接区块以产生第三区块X”’所需的多个预测元(包含多个垂直预测元,以及一对角预测元),之后进行至步骤206。请参阅图7,其中第三区块X”’位于宏区块52的左下方,而该多个邻接区块包含有位于第三区块X”’的左上方的第一邻接区块A’、位于第三区块X”’的左方的第四邻接区块A”,以及位于第三区块X”’的上方的第一区块X”;Step 205: When processing a third block X"' in the
步骤206:将该多个垂直预测元储存于储存行56C[8-15],并将一对角预测元储存于存储单元56D,之后进行至步骤207。而新决定出的第三区块X”’的该多个垂直预测元将会取代原先储存于储存行56C[8-15]内的第四邻接区块A”的该多个垂直预测元,第四区块Y”’所需的对角预测元DCX”将会取代原先储存于存储单元56D内的第三区块X”’所需的对角预测元DCA’;Step 206 : Store the plurality of vertical predictors in
步骤207:当处理宏区块52中的一第四区块Y”’时,参考多个邻接区块以产生第四区块Y”’所需的多个预测元(包含多个垂直预测元,以及一对角预测元),之后进行至步骤208;请参阅图7,其中第四区块Y”’位于宏区块52的右下方,而该多个邻接区块包含有位于第四区块Y”’的左上方的第一区块X”、位于第四区块Y”’的左方的第三区块X”’,以及位于第四区块Y”’的上方的第二区块Y”;Step 207: When processing a fourth block Y"' in the
步骤208:将该多个垂直预测元储存于储存行56C[8-15],并将一对角预测元储存于存储单元56D,之后进行至步骤209。而新决定出的第四区块Y”’的该多个垂直预测元将会取代原先储存于储存行56C[8-15]内的第三区块X”’的该多个垂直预测元,下一宏区块的一第一区块所需的对角预测元DCC将会取代原先储存于存储单元56D内的第四区块Y”’所需的对角预测元DCX;Step 208 : Store the plurality of vertical predictors in the
步骤209:于一8X8像素大小的Cb色度区块与一8×8像素大小的Cr色度区块执行预测操作与译码程序;以及Step 209: Perform prediction and decoding procedures on a Cb chrominance block of 8×8 pixels and a Cr chrominance block of 8×8 pixels; and
步骤210:结束此宏区块52中的预测操作与译码程序,之后处理下一个宏区块。Step 210: End the prediction operation and decoding procedure in this
请依据图8的流程图,并回头对照图6的空间配置图,可清楚得知本发明实施例于处理每一宏区块52时的预设顺序(如箭号MR2所示)。因此,在处理每一宏区块52时,依照一Z字型的方向依序处理其中四个区块,而处理完此(16×16像素大小的)亮度宏区块52后,再处理其所对应的二个8×8像素大小的的色度区块(分别为Cr和Cb)。处理完一个宏区块52后,再继续处理同一宏区块列中的下一个宏区块52,依序由左至右(如箭号MR1所示)地处理在该宏区块列中的每一个宏区块52。由上可知,宏区块的处理顺序是由左至右于一宏区块列51中进行,因此当系统在处理完一个宏区块52时,由于不须立即处理位于该刚被处理完的宏区块52下方的另一宏区块52,因此,不需要立即将第三区块X”’的水平预测元(DCX与ACX[0][1-7])与第四区块Y”’的水平预测元(DCY与ACY[0][1-7])则存入存储装置56中,此亦是因为上述多个水平预测元与位于该刚被处理完的宏区块52的下方的多个宏区块52的处理是较无关联与帮助的,并且其自身仍然等待被处理,所以,这也是为何于图8的流程图的步骤中,并未出现如「将新决定出的第三区块X”’的水平预测元取代原先储存于储存列56R[0-7]中的第一区块X”的水平预测元」以及/或「将新决定出的第四区块Y”’的水平预测元取代原先储存于储存列56R[8-15]中的第二区块Y”的水平预测元」等操作步骤。于另一实施例中,除了前述的存储装置56外,另规划一第二存储装置58于图9中,而第二存储装置58可用一动态随机存取存储器(DRAM)、一静态随机存取存储器(SRAM)、或是一缓存器来实施,用来储存每一宏区块52中的(左下方)第三区块的水平预测元及(右下方)第四区块的水平预测元,等到处理完整个宏区块列中的所有宏区块52后,则可利用储存于第二存储装置58中的预测元对下一个宏区块列中的宏区块52作预测解码的操作。请见图9,图9为于图8所示的实施例中再加入第二存储装置58的相关操作的流程图:Please refer to the flow chart in FIG. 8 and refer back to the spatial configuration diagram in FIG. 6 , you can clearly see the default sequence (as shown by the arrow MR2 ) when processing each
步骤211:于图8的步骤206中,将第三区块X”’的多个水平预测元储存于第二存储装置58内;Step 211: In
步骤212:于图8的步骤208中,将第四区块Y”’的多个水平预测元储存于第二存储装置58内。Step 212: In
依照图7所披露的实施例,我们可将储存行56C[0-7]、储存行56C[8-15]、储存列56R[0-7]与储存列56R[8-15]中各自内容被取代的情形加以列表整理于图10。在前述预测操作与解码过程中,由于本发明将存储装置区分成一储存行与一储存列,以分别存取并置换储存于其中的多个垂直预测元、多个水平预测元以及对角预测元,因此,即使需要不断地决定出预测元以供欲加以译码的宏区块使用,所以,本发明能以远少于实际产生的预测元数量的存储空间来完整达成预测译码的功能,而无须如已知技术般用大量的存储空间来将所有产生的预测元分别储存。此外,与已知的实施例作比较,在将一宏区块预测译码时,本发明只需要一个具有33个存储单元的存储装置即可(33个存储单元的计算方式是以图7的实施例为例:储存行56C[0-7]、储存行56C[8-15]、储存列56R[0-7]与储存列56R[8-15]共耗费4*8=32(存储单元),再加上储存一对角预测元所需的1存储单元),而即使是将上述一第二存储装置的容量计算进去,一宏区块也只多需要16个额外的存储单元。According to the embodiment disclosed in FIG. 7 , we can store the respective contents in the
于本发明中,系统中所要求的存储装置56的所需使用空间大幅减少,以一整张(如720×480像素大小的)视讯画面为例,能节省下来的存储空间的容量更是惊人,如此一来,不只是减少了以运作缓存器实施的存储装置56的使用空间容量需求,前述以动态随机存取存储器实施的第二存储装置58亦只需被占用很小的容量,便可使如图7所示的存储装置56(及第二存储装置58)能以嵌入芯片(on-chip)式的方法来整合入硬件系统中,以迎合一降低成本并加速以一单一芯片整合相关于视讯编/译码器(video CODECs)所有硬件组件的趋势。In the present invention, the required space of the
以上所述仅为本发明的较佳实施例,凡依本发明权利要求所做的均等变化与修饰,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the claims of the present invention shall fall within the scope of the present invention.
Claims (13)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 03154547 CN1290340C (en) | 2003-08-18 | 2003-08-18 | predictive decoding method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 03154547 CN1290340C (en) | 2003-08-18 | 2003-08-18 | predictive decoding method |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200610108800 Division CN1913643A (en) | 2003-08-18 | 2003-08-18 | Storage method of predictors |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1585485A CN1585485A (en) | 2005-02-23 |
| CN1290340C true CN1290340C (en) | 2006-12-13 |
Family
ID=34597978
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 03154547 Expired - Fee Related CN1290340C (en) | 2003-08-18 | 2003-08-18 | predictive decoding method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1290340C (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101673392B (en) * | 2008-09-12 | 2012-06-06 | 慧国(上海)软件科技有限公司 | Image decoding device and image decoding method |
| CN105072447B (en) * | 2015-07-17 | 2018-03-27 | 福州瑞芯微电子股份有限公司 | A kind of method and apparatus for VP9 decoder motion vector predictions |
| CN109271113B (en) * | 2018-09-28 | 2022-03-29 | 武汉烽火众智数字技术有限责任公司 | Data management system and method based on cloud storage |
-
2003
- 2003-08-18 CN CN 03154547 patent/CN1290340C/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| CN1585485A (en) | 2005-02-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11582459B2 (en) | Method and system for picture segmentation using columns | |
| CN1154344C (en) | Method for reducing demand of video frequency decoder processing ability | |
| KR100624426B1 (en) | Pipeline-type decoding device and method, and computer-readable recording medium storing computer program controlling the device | |
| US9948941B2 (en) | Circuit, method and video decoder for video decoding | |
| US8639049B1 (en) | Systems and methods for image coding and processing | |
| US20120087593A1 (en) | Inverse Quantizer Supporting Multiple Decoding Processes | |
| KR100695141B1 (en) | Memory access device and method, data recording device and method and data reading device and method in image processing system | |
| CN1794814A (en) | Pipelined deblocking filter | |
| US20080298473A1 (en) | Methods for Parallel Deblocking of Macroblocks of a Compressed Media Frame | |
| JP2022140646A (en) | Method and apparatus for video decoding performed by decoder and method for video encoding performed by encoder | |
| TWI785502B (en) | Video coding method and electronic apparatus for specifying slice chunks of a slice within a tile | |
| CN1717055A (en) | Deblocking filter device and method using sub-macroblock shift register array | |
| CN101707716A (en) | Video coder and coding method | |
| CN1792097A (en) | Video processing device with low memory bandwidth requirements | |
| CN1290340C (en) | predictive decoding method | |
| CN1520187A (en) | System and method for video data compression | |
| US20200252613A1 (en) | Embedded codec (ebc) circuitry for position dependent entropy coding of residual level data | |
| CN1913643A (en) | Storage method of predictors | |
| US20050025240A1 (en) | Method for performing predictive picture decoding | |
| US10652543B2 (en) | Embedded codec circuitry and method for frequency-dependent coding of transform coefficients | |
| US20230269368A1 (en) | Supporting multiple partition sizes using a unified pixel input data interface for fetching reference pixels in video encoders | |
| CN1585473A (en) | Memory usage for storing decoded macroblock motion vectors | |
| CN1665307A (en) | Intra coding method | |
| WO2025190013A1 (en) | Video encoding method and video decoding method, apparatus, computer readable medium, and electronic device | |
| CN1505406A (en) | MPEG standard video decoding method and video decoder |
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 | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20061213 Termination date: 20160818 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |