[go: up one dir, main page]

CN102611882B - A codec method and device - Google Patents

A codec method and device Download PDF

Info

Publication number
CN102611882B
CN102611882B CN201110021859.7A CN201110021859A CN102611882B CN 102611882 B CN102611882 B CN 102611882B CN 201110021859 A CN201110021859 A CN 201110021859A CN 102611882 B CN102611882 B CN 102611882B
Authority
CN
China
Prior art keywords
block
subimage block
subimage
adjacent block
index information
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.)
Active
Application number
CN201110021859.7A
Other languages
Chinese (zh)
Other versions
CN102611882A (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.)
Tsinghua University
Huawei Technologies Co Ltd
Original Assignee
Tsinghua University
Huawei Technologies Co Ltd
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 Tsinghua University, Huawei Technologies Co Ltd filed Critical Tsinghua University
Priority to CN201110021859.7A priority Critical patent/CN102611882B/en
Priority to PCT/CN2012/070610 priority patent/WO2012097747A1/en
Publication of CN102611882A publication Critical patent/CN102611882A/en
Application granted granted Critical
Publication of CN102611882B publication Critical patent/CN102611882B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides an encoding method which comprises the steps of: carrying out non-square division on a currently encoded object to obtain sub-image blocks arranged in order in the horizontal direction or the vertical direction; obtaining index information for indicating sequencing of the sub-image blocks, determining whether to judge the availability of an adjacent block of the sub-image blocks according to the index information, and judging the availability of the adjacent block requiring availability judgment, of the sub-image blocks; obtaining reference pixel values of the sub-image blocks according to availability information of the sub-image blocks, predicting the sub-image blocks according to the reference pixel values to obtain predicted pixel values of the sub-image blocks; obtaining residual error data of the sub-image blocks according to the predicted pixel values and original pixel values of the sub-image blocks, and writing the residual error data into a code stream. By adopting the encoding method provided by the embodiment of the invention, the availability can be judged according to a preset rule, and the resource of an encoding and decoding device is saved.

Description

一种编解码方法和装置A codec method and device

技术领域 technical field

本发明涉及视频编解码技术。The invention relates to video codec technology.

背景技术 Background technique

视频编码压缩的基本原理是,利用空域、时域和码字之间的相关性,尽可能去除冗余。目前流行的做法是采用基于块的混合视频编码框架,通过预测、变换、量化、熵编码等步骤来实现视频编码压缩。这一编码框架,显示了很强的生命力,从最早的MPEG-1到现在最新的视频编码标准H.264/AVC,甚至JCTVC工作组(MPEG和VECG成立的联合工作组)正在制定的下一代视频编码压缩标准HEVC,仍然沿用这种基于块的混合视频编码框架。The basic principle of video coding and compression is to use the correlation between space domain, time domain and code words to remove redundancy as much as possible. The current popular approach is to use a block-based hybrid video coding framework to achieve video coding and compression through steps such as prediction, transformation, quantization, and entropy coding. This coding framework has shown a strong vitality, from the earliest MPEG-1 to the latest video coding standard H.264/AVC, and even the next generation of video coding that is being developed by the JCTVC working group (a joint working group established by MPEG and VECG). The video coding compression standard HEVC still uses this block-based hybrid video coding framework.

在视频编解码中一般都采用基于块的空域预测编码技术,基本原理是利用相邻块之间的相关性去除空域冗余。即利用相邻块作为参考块,对当前块进行预测。为了提高像素预测的准度,现有技术中一般都会将当前图像块进行方块划分,得到四个完全相同的正方形的子图像块,然后分别以这四个子图像块为单位,根据所述当前图像块的相邻块的像素值进行预测。有时候为了进一步的提高预测的准度,还会对这四个子图像块中的一个进行进一步的划分,以得到四个更小的正方形的子图象块。比如,64×64规格的当前图像块可以划分成4个32×32规格的子图像快,一个32×32规格的子图像快可以划分成4个16×16规格的子图像快。但是考虑到图像像素分布的多样性,业界也推出了一种新的非方块划分方法,如图1所示,即将当前编码对象划分成沿水平方向或垂直方向依次排列的子图像块,具体的,在图1中所示的图像块的右上方的子图像块即被划分成1、2、3、4这四个沿垂直方向依次排列的子图象块,而图1所示的图像快的左上块则被划分成了A、B、C、D四个沿水平方向依次排列的子图象块。Block-based spatial domain predictive coding technology is generally used in video coding and decoding. The basic principle is to use the correlation between adjacent blocks to remove spatial redundancy. That is, a neighboring block is used as a reference block to predict the current block. In order to improve the accuracy of pixel prediction, in the prior art, the current image block is generally divided into blocks to obtain four identical square sub-image blocks, and then each of these four sub-image blocks is used as a unit, according to the current image The pixel values of the adjacent blocks of the block are predicted. Sometimes, in order to further improve the prediction accuracy, one of the four sub-image blocks is further divided to obtain four smaller square sub-image blocks. For example, a current image block with a size of 64×64 can be divided into four sub-image blocks with a size of 32×32, and a sub-image block with a size of 32×32 can be divided into four sub-image blocks with a size of 16×16. However, considering the diversity of image pixel distribution, the industry has also introduced a new non-block division method, as shown in Figure 1, which divides the current coding object into sub-image blocks arranged in sequence along the horizontal or vertical direction. Specifically, , the sub-image block on the upper right of the image block shown in Fig. 1 is divided into four sub-image blocks 1, 2, 3, and 4 arranged in sequence along the vertical direction, and the image shown in Fig. 1 is fast The upper left block is divided into four sub-image blocks A, B, C, and D arranged in sequence along the horizontal direction.

当然,无论采取划分方法,如何简化编解码操作,以节省系统资源一直都是业界考虑的方向之一。Of course, regardless of the division method, how to simplify the codec operation to save system resources has always been one of the directions considered by the industry.

发明内容 Contents of the invention

本发明提供了一种编码方法,其包括:对当前编码对象进行非方块划分,得到沿水平方向或垂直方向依次排列的子图像块,其中,所述非方块划分包括垂直划分和水平划分,当所述非方块划分为垂直划分时,所述当前编码对象被划分为沿水平方向依次排列的子图像块,当所述非方块划分为水平划分时,所述当前编码对象被划分成沿垂直方向依次排列的子图像块;获得用于指示子图像块排序的索引信息,根据所述索引信息确定是否对子图像块的相邻块的可用性进行判断,并对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断,其中,当所述非方块划分为垂直划分、且所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,所述子图像块的左相邻块可用,不对所述子图像块的左相邻块的可用性进行判断;当所述非方块划分为水平划分、且所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,所述子图像块的上相邻块可用,不对所述子图像块的上相邻块进行可用性判断;根据所述子图像块的可用性信息获得所述子图像块的参考像素值,并根据所述参考像素值对所述子图像块进行预测,得到所述子图像块的预测像素值;根据所述预测像素值和所述子图像块的原始像素值,得到所述子图像块的残差数据;对所述残差数据进行变换、量化和熵编码,以得到编码后的残差数据;将所述当前编码对象的划分方式和所述残差数据写入码流中。The present invention provides a coding method, which includes: performing non-square division on the current coding object to obtain sub-image blocks arranged in sequence along the horizontal or vertical direction, wherein the non-square division includes vertical division and horizontal division, when When the non-square division is divided into vertical divisions, the current encoding object is divided into sub-image blocks arranged in sequence along the horizontal direction; when the non-square division is divided into horizontal divisions, the current encoding object is divided into sub-image blocks along the vertical direction The sub-image blocks arranged in sequence; obtaining index information for indicating the sorting of the sub-image blocks, determining whether to judge the availability of adjacent blocks of the sub-image blocks according to the index information, and checking the availability of the needs of the sub-image blocks The availability of the determined adjacent blocks is determined, wherein, when the non-square division is vertical division and the index information indicates that the sub-image block is not the first sub-image block arranged in sequence, the sub-image block The left adjacent block of the sub-image block is available, and the availability of the left adjacent block of the sub-image block is not judged; when the non-square partition is a horizontal partition and the index information indicates that the sub-image block is not the first When there are sub-image blocks, the upper adjacent blocks of the sub-image blocks are available, and no availability judgment is performed on the upper adjacent blocks of the sub-image blocks; the reference of the sub-image blocks is obtained according to the availability information of the sub-image blocks pixel value, and predict the sub-image block according to the reference pixel value to obtain the predicted pixel value of the sub-image block; according to the predicted pixel value and the original pixel value of the sub-image block, obtain the Residual data of the sub-image block; transform, quantize, and entropy encode the residual data to obtain coded residual data; write the division method of the current coding object and the residual data into a code stream middle.

本发明还提供了相应的解码方法,其包括:从码流中解析得到当前解码对象的划分方式和残差数据;The present invention also provides a corresponding decoding method, which includes: parsing and obtaining the division mode and residual data of the current decoding object from the code stream;

根据所述划分方式对所述当前解码对象进行划分,得到沿水平方向或垂直方向依次排列的子图像块,其中,所述非方块划分包括垂直划分和水平划分,当所述非方块划分为垂直划分时,所述当前解码对象被划分为沿水平方向依次排列的子图像块,当所述非方块划分为水平划分时,所述当前解码对象被划分成沿垂直方向依次排列的子图像块;Divide the current decoding object according to the division method to obtain sub-image blocks arranged in sequence along the horizontal or vertical direction, wherein the non-square division includes vertical division and horizontal division, and when the non-square division is vertical When dividing, the current decoding object is divided into sub-image blocks arranged in sequence in the horizontal direction, and when the non-square is divided into horizontal divisions, the current decoding object is divided into sub-image blocks arranged in sequence in the vertical direction;

获得用于指示子图像块排序的索引信息,并根据所述子图像块的索引信息,确定是否对子图像块的相邻块的可用性进行判断,并对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断,其中,当所述非方块划分为垂直划分、且所述索引信息指示所述子图像块不是依次排序的第一个子图像块时,所述子图像块的左相邻块可用,不对所述子图像块的左相邻块的可用性进行判断;当所述非方块划分为水平划分、且所述索引信息指示所述子图像块不是依次排序的第一个子图像块时,所述子图像块的上相邻块可用,不对所述子图像块的上相邻块进行可用性判断;根据所述子图像块的可用性信息,获得所述子图像块的参考像素值;根据所述参考像素值和所述残差数据,获得所述子图像块的重构像素数据。Obtaining index information for indicating the sorting of the sub-image blocks, and determining whether to judge the availability of adjacent blocks of the sub-image blocks according to the index information of the sub-image blocks, and performing an availability judgment on the needs of the sub-image blocks Availability of neighboring blocks is judged, wherein, when the non-square partition is vertical partition and the index information indicates that the sub-image block is not the first sub-image block sorted sequentially, the sub-image block's The left adjacent block is available, and the availability of the left adjacent block of the sub-image block is not judged; when the non-square division is horizontal division and the index information indicates that the sub-image block is not the first one in sequence In the case of a sub-image block, the upper adjacent block of the sub-image block is available, and the availability judgment is not performed on the upper adjacent block of the sub-image block; according to the availability information of the sub-image block, the reference of the sub-image block is obtained Pixel value: Obtain reconstructed pixel data of the sub-image block according to the reference pixel value and the residual data.

本发明还提供了应用上述编解码方法的编解码装置。The present invention also provides a codec device applying the above codec method.

本发明所提供的编解码方法和装置,根据索引信息来对相邻块的可用性进行判断,在满足一定条件下,可以按照预先设定的规则对可用性进行判断,节省了编解码设备的资源。The encoding and decoding method and device provided by the present invention judge the availability of adjacent blocks according to the index information. Under certain conditions, the availability can be judged according to preset rules, which saves the resources of the encoding and decoding equipment.

附图说明 Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without paying creative labor.

图1为水平划分和垂直划分的示意图Figure 1 is a schematic diagram of horizontal division and vertical division

图2为本发明实施例提供的编码方法的示意图。FIG. 2 is a schematic diagram of an encoding method provided by an embodiment of the present invention.

图3为本发明实施例提供的解码方法的示意图。Fig. 3 is a schematic diagram of a decoding method provided by an embodiment of the present invention.

图4为本发明实施例提供的编码装置的示意图。Fig. 4 is a schematic diagram of an encoding device provided by an embodiment of the present invention.

图5为本发明实施例提供的解码装置的示意图。Fig. 5 is a schematic diagram of a decoding device provided by an embodiment of the present invention.

具体实施方式 Detailed ways

请参照图2,本发明实施例提供了一种编码方法,其包括:Referring to Fig. 2, an embodiment of the present invention provides an encoding method, which includes:

步骤101:对当前编码对象进行非方块划分,得到沿水平方向或垂直方向依次排列的子图像块;Step 101: Perform non-block division on the current coding object to obtain sub-image blocks arranged in sequence along the horizontal or vertical direction;

其中,所述非方块划分包括垂直划分和水平划分,当所述非方块划分为垂直划分时,所述当前编码对象被划分为沿水平方向依次排列的子图像块,当所述非方块划分为水平划分时,所述当前编码对象被划分成沿垂直方向依次排列的子图像块。Wherein, the non-square division includes vertical division and horizontal division. When the non-square division is vertical division, the current coding object is divided into sub-image blocks arranged in sequence along the horizontal direction. When the non-square division is When dividing horizontally, the current coding object is divided into sub-image blocks arranged in sequence along the vertical direction.

步骤102:获得用于指示子图像块排序的索引信息,并根据所述索引信息,确定是否对子图像块的相邻块的可用性进行判断,并判断所述子图像块的需要进行可用性判断的相邻块的可用性;Step 102: Obtain index information used to indicate the sorting of the sub-image blocks, and determine whether to judge the availability of adjacent blocks of the sub-image blocks according to the index information, and determine whether the sub-image blocks need to be judged for availability Availability of neighboring blocks;

其中,当所述非方块划分为垂直划分、且所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,所述子图像块的左相邻块可用,不对所述子图像块的左相邻块的可用性进行判断;当所述非方块划分为水平划分、且所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,所述子图像块的上相邻块可用,不对所述子图像块的上相邻块进行可用性判断。Wherein, when the non-square division is vertical division and the index information indicates that the sub-image block is not the first sub-image block arranged sequentially, the left adjacent block of the sub-image block is available, and the The availability of the left adjacent block of the sub-image block is judged; when the non-square division is horizontal division and the index information indicates that the sub-image block is not the first sub-image block arranged in sequence, the sub-image The upper adjacent blocks of the block are available, and no availability judgment is performed on the upper adjacent blocks of the sub-image block.

在本发明实施例中,根据索引信息来判断子图像块的排序,当前编码对象被划分成沿水平方向依次排列的子图像块时,排在第一位的子图象块自然就处于当前编码对象的左侧边界上;当前编码对象被划分成沿垂直方向依次排列的子图像块时,排在第一位的子图像块就处于当前编码对象的上侧边界上。具体的,比如,比如将当前编码对象划分成0、1、2、3四个子图像块,其中的“0、1、2、3”就作为这四个子图像块的索引信息。当需要确定这四个子图像块的位置时,只要根据“0、1、2、3”分别对应的子图像块在排序中的位置就可以得到子图像块的位置。比如,子图像块的索引信息为“0”,则说明其排序处在所有子图像块的最前面,而当前编码对象被划分成沿水平方向依次排列的子图像块时,这个子图像块自然就处于当前编码对象的左边界上,而当前编码对象被划分成沿垂直方向依次排列的子图像块时,这个子图像块就位于当前编码对象的上边界,其他索引信息对应的子图像块则在该子图像块后依次排列。当然,也可以将代表为第一子图像块的索引信息设定为“1”等其他数字。In the embodiment of the present invention, the sorting of the sub-image blocks is judged according to the index information. When the current encoding object is divided into sub-image blocks arranged in sequence along the horizontal direction, the first sub-image block is naturally in the current encoding. On the left boundary of the object; when the current coding object is divided into sub-image blocks arranged in sequence along the vertical direction, the first sub-image block is on the upper boundary of the current coding object. Specifically, for example, the current coding object is divided into four sub-image blocks 0, 1, 2, and 3, and "0, 1, 2, and 3" are used as index information of these four sub-image blocks. When it is necessary to determine the positions of the four sub-image blocks, the positions of the sub-image blocks can be obtained according to the positions of the sub-image blocks respectively corresponding to "0, 1, 2, and 3" in the sorting. For example, if the index information of a sub-image block is "0", it means that its sorting is at the front of all sub-image blocks, and when the current coding object is divided into sub-image blocks arranged in sequence along the horizontal direction, this sub-image block will naturally is on the left boundary of the current coding object, and when the current coding object is divided into sub-image blocks arranged in sequence along the vertical direction, this sub-image block is located on the upper boundary of the current coding object, and the sub-image blocks corresponding to other index information are Arranged sequentially after the sub-image block. Of course, the index information representing the first sub-image block may also be set to other numbers such as “1”.

步骤103:根据所述子图像块的可用性信息获得所述子图像块的参考像素值,并根据所述参考像素值对所述子图像块进行预测,得到所述子图像块的预测像素值;Step 103: Obtain a reference pixel value of the sub-image block according to the availability information of the sub-image block, and predict the sub-image block according to the reference pixel value, to obtain a predicted pixel value of the sub-image block;

步骤104:根据所述参考像素值和所述预测像素值,得到当前编码对象的残差数据;Step 104: Obtain the residual data of the current coding object according to the reference pixel value and the predicted pixel value;

步骤105:对所述残差数据进行变换、量化和熵编码,以得到编码后的残差数据;Step 105: Transform, quantize, and entropy encode the residual data to obtain encoded residual data;

步骤106:将所述当前编码对象的划分方式和所述残差数据写入码流中。Step 106: Write the division method of the current coding object and the residual data into a code stream.

更进一步的,在本发明实施例中,如果判断仍需要对相邻块的可用性进行判断,则判断方法可以依照以下原则进行:Furthermore, in the embodiment of the present invention, if the judgment still needs to judge the availability of adjacent blocks, the judgment method can be performed according to the following principles:

当所述编码对象被垂直划分时,所述对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断包括:When the coding object is vertically divided, the judging the availability of adjacent blocks that need to be judged on the availability of the sub-image block includes:

如果所述索引信息指示所述子图像块是依次排列的第一个子图像块时,则当所述当前编码对象的左相邻块可用时,所述子图像块的左相邻块可用;If the index information indicates that the sub-image block is the first sub-image block arranged in sequence, when the left adjacent block of the current coding object is available, the left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排列的第一个子图像块时,则当所述当前编码对象的上相邻块可用时,所述子图像块的上相邻块可用;If the index information indicates that the sub-image block is the first sub-image block arranged in sequence, when the upper adjacent block of the current coding object is available, the upper adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排列的第一个子图像块时,则当所述当前编码对象的左下相邻块可用时,所述子图像块的左下相邻块可用;If the index information indicates that the sub-image block is the first sub-image block arranged in sequence, when the lower-left adjacent block of the current coding object is available, the lower-left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排列的第一个子图像块时,则当所述当前编码对象的右上相邻块可用时,所述子图像块的右上相邻块可用;If the index information indicates that the sub-image block is the first sub-image block arranged in sequence, when the upper-right adjacent block of the current coding object is available, the upper-right adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,则所述子图像块的左下相邻块不可用;If the index information indicates that the sub-image block is not the first sub-image block arranged in sequence, the lower left adjacent block of the sub-image block is unavailable;

如果所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,则当所述当前编码对象的上相邻块可用时,所述子图像块的上相邻块可用;If the index information indicates that the sub-image block is not the first sub-image block arranged in sequence, when the upper adjacent block of the current coding object is available, the upper adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,则当所述当前编码对象的右上相邻块可用时,所述子图像块的上相邻块可用,If the index information indicates that the sub-image block is not the first sub-image block arranged in sequence, when the upper-right adjacent block of the current coding object is available, the upper adjacent block of the sub-image block is available,

当所述编码对象被水平划分时,所述对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断包括:When the coding object is divided horizontally, the judging the availability of adjacent blocks that need to be judged on the availability of the sub-image block includes:

如果所述索引信息指示所述子图像块是依次排列的第一个子图像块时,则当所述当前编码对象的上相邻块可用时,所述子图像块的上相邻块可用;If the index information indicates that the sub-image block is the first sub-image block arranged in sequence, when the upper adjacent block of the current coding object is available, the upper adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排列的第一个子图像块时,则当所述当前编码对象的左相邻块可用时,所述子图像块的左相邻块可用;If the index information indicates that the sub-image block is the first sub-image block arranged in sequence, when the left adjacent block of the current coding object is available, the left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排列的第一个子图像块时,则当所述当前编码对象的左下相邻块可用时,所述子图像块的左下相邻块可用;If the index information indicates that the sub-image block is the first sub-image block arranged in sequence, when the lower-left adjacent block of the current coding object is available, the lower-left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排列的第一个子图像块时,则当所述当前编码对象的右上相邻块可用时,所述子图像块的右上相邻块可用;If the index information indicates that the sub-image block is the first sub-image block arranged in sequence, when the upper-right adjacent block of the current coding object is available, the upper-right adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,则所述子图像块的右上相邻块不可用;If the index information indicates that the sub-image block is not the first sub-image block arranged in sequence, the upper right adjacent block of the sub-image block is unavailable;

如果所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,则当所述当前编码对象的左相邻块可用时,所述子图像块的左下相邻块可用;If the index information indicates that the sub-image block is not the first sub-image block arranged in sequence, when the left adjacent block of the current coding object is available, the lower left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,则当所述当前编码对象的左下相邻块可用时,所述子图像块的左下相邻块可用。If the index information indicates that the sub-image block is not the first sub-image block arranged sequentially, when the lower-left adjacent block of the current coding object is available, the lower-left adjacent block of the sub-image block is available.

当相邻块可用时,则以相邻块的像素值作为参考像素值,对子图像块进行预测,如果相邻块不可用,则使用预设的固定值作为该相邻块的参考像素值,或者将其他相邻块的像素值填充入所述相邻块中作为参考像素值。When the adjacent block is available, the pixel value of the adjacent block is used as the reference pixel value to predict the sub-image block. If the adjacent block is not available, the preset fixed value is used as the reference pixel value of the adjacent block. , or fill the pixel values of other adjacent blocks into the adjacent block as reference pixel values.

一般来说,判断可用性需要判断:相邻块是否处于所述当前编码对象所处的图象的边界内;相邻块是否与所述当前图像块处于同一条带中;以及相邻块是否已经被编码或已解码。如果相邻块满足以上3个条件,则所述相邻块可用,否则相邻块不可用。而进行这样的可用性判断,明显需要获得很多与编码过程相关性不大的信息,并进行逻辑判断,这对系统资源很明显是一种浪费。而采用本发明实施例所提供的方法,当索引信息指示当前的子图象块和相邻块满足一定条件时,不进行可用性判断,节省了编解码资源。而且,当索引信息指示子图象块并非第一序列块时,可以根据已经确认过的当前编码对象的相邻块的可用性状况来直接判断,也节省了系统的资源。In general, judging usability needs to judge: whether the adjacent block is in the boundary of the image where the current coding object is located; whether the adjacent block is in the same band as the current image block; and whether the adjacent block has been Encoded or decoded. If the adjacent block satisfies the above three conditions, the adjacent block is available, otherwise the adjacent block is not available. To make such a usability judgment, it is obviously necessary to obtain a lot of information that is not very relevant to the coding process, and to make a logical judgment, which is obviously a waste of system resources. With the method provided by the embodiment of the present invention, when the index information indicates that the current sub-image block and adjacent blocks meet certain conditions, no availability judgment is performed, which saves encoding and decoding resources. Moreover, when the index information indicates that the sub-image block is not the first sequence block, it can be directly judged according to the confirmed availability of the adjacent blocks of the current coding object, which also saves system resources.

,而这些都是编码过程中会产生或利用的信息,因此有效地节省了系统的资源。, and these are information that will be generated or utilized during the encoding process, thus effectively saving system resources.

请参照图3,本发明实施例还相应的提供了一种解码方法,其包括:Please refer to Fig. 3, the embodiment of the present invention also provides a corresponding decoding method, which includes:

步骤201:从码流中解析得到当前解码对象的划分方式和残差数据;Step 201: Analyze the code stream to obtain the division method and residual data of the current decoding object;

步骤202:根据所述划分方式对所述当前解码对象进行划分,得到沿水平方向或垂直方向依次排列的子图像块;Step 202: Divide the current decoding object according to the division method to obtain sub-image blocks arranged in sequence along the horizontal or vertical direction;

其中,所述非方块划分包括垂直划分和水平划分,当所述非方块划分为垂直划分时,所述当前解码对象被划分为沿水平方向依次排列的子图像块,当所述非方块划分为水平划分时,所述当前解码对象被划分成沿垂直方向依次排列的子图像块。Wherein, the non-square division includes vertical division and horizontal division. When the non-square division is vertical division, the current decoding object is divided into sub-image blocks arranged in sequence along the horizontal direction. When the non-square division is When dividing horizontally, the current decoding object is divided into sub-image blocks arranged in sequence along the vertical direction.

步骤203:获得用于指示子图像块排序的索引信息,并根据索引信息,确定是否对子图像块的相邻块的可用性进行判断,并对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断;Step 203: Obtain the index information used to indicate the ordering of the sub-image blocks, and determine whether to judge the availability of adjacent blocks of the sub-image block according to the index information, and determine the availability of adjacent blocks of the sub-image blocks that need to be judged Block availability is judged;

其中,当所述非方块划分为垂直划分、且所述索引信息指示所述子图像块不是依次排序的第一个子图像块时,所述子图像块的左相邻块可用,不对所述子图像块的左相邻块的可用性进行判断;当所述非方块划分为水平划分、且所述索引信息指示所述子图像块不是依次排序的第一个子图像块时,所述子图像块的上相邻块可用,不对所述子图像块的上相邻块进行可用性判断。Wherein, when the non-square division is vertical division and the index information indicates that the sub-image block is not the first sub-image block sorted sequentially, the left adjacent block of the sub-image block is available, and the The availability of the left adjacent block of the sub-image block is judged; when the non-square division is horizontal division and the index information indicates that the sub-image block is not the first sub-image block in order, the sub-image The upper adjacent blocks of the block are available, and no availability judgment is performed on the upper adjacent blocks of the sub-image block.

步骤204:根据所述子图像块的可用性信息,获得当前解码对象的参考像素值;Step 204: Obtain the reference pixel value of the current decoding object according to the availability information of the sub-image block;

步骤205:根据所述参考像素值和所述残差数据,获得当前解码对象的重构像素数据。Step 205: Obtain reconstructed pixel data of the current decoding object according to the reference pixel value and the residual data.

本发明实施例所提供的解码方法中所涉及的子图像块的索引信息与子图象块之间的对应关系,以及相邻块的可用性的判断可以参照前述解码方法中的叙述进行。The corresponding relationship between the sub-image block index information and the sub-image block involved in the decoding method provided by the embodiment of the present invention, and the determination of the availability of adjacent blocks can be performed with reference to the description in the foregoing decoding method.

同样的,在本发明实施例中,如果判断仍需要对相邻块的可用性进行判断,则判断方法可以依照以下原则进行:Similarly, in the embodiment of the present invention, if the judgment still needs to judge the availability of adjacent blocks, the judgment method can be performed according to the following principles:

当所述解码对象被垂直划分时,所述对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断包括:When the decoding object is divided vertically, the judging the availability of adjacent blocks that need to be judged on the availability of the sub-image block includes:

如果所述索引信息指示所述子图像块是依次排序的第一个子图像块,则当所述当前解码对象的左相邻块可用时,所述子图像块的左相邻块可用;If the index information indicates that the sub-image block is the first sub-image block sorted sequentially, when the left adjacent block of the current decoding object is available, the left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排序的第一个子图像块,则当所述当前解码对象的上相邻块可用时,所述子图像块的上相邻块可用;If the index information indicates that the sub-image block is the first sub-image block sorted in sequence, when the upper adjacent block of the current decoding object is available, the upper adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排序的第一个子图像块,则当所述当前解码对象的左下相邻块可用时,所述子图像块的左下相邻块可用;If the index information indicates that the sub-image block is the first sub-image block sorted in sequence, when the lower-left adjacent block of the current decoding object is available, the lower-left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排序的第一个子图像块,则当所述当前解码对象的右上相邻块可用时,所述子图像块的右上相邻块可用;If the index information indicates that the sub-image block is the first sub-image block sorted in sequence, when the upper-right adjacent block of the current decoding object is available, the upper-right adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块不是依次排序的第一个子图像块,则所述子图像块的左下相邻块不可用;If the index information indicates that the sub-image block is not the first sub-image block sorted sequentially, the lower left adjacent block of the sub-image block is unavailable;

如果所述索引信息指示所述子图像块不是依次排序的第一个子图像块,则当所述当前解码对象的上相邻块可用时,所述子图像块的上相邻块可用;If the index information indicates that the sub-image block is not the first sub-image block sorted in sequence, when the upper adjacent block of the current decoding object is available, the upper adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块不是依次排序的第一个子图像块,则当所述当前解码对象的右上相邻块可用时,所述子图像块的上相邻块可用,If the index information indicates that the sub-image block is not the first sub-image block sorted in sequence, when the upper-right adjacent block of the current decoding object is available, the upper adjacent block of the sub-image block is available,

当所述解码对象被水平划分时,所述对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断包括:When the decoding object is divided horizontally, the judging the availability of adjacent blocks that need to be judged on the availability of the sub-image block includes:

如果所述索引信息指示所述子图像块是依次排序的第一个子图像块,则当所述当前解码对象的上相邻块可用时,所述子图像块的上相邻块可用;If the index information indicates that the sub-image block is the first sub-image block sorted in sequence, when the upper adjacent block of the current decoding object is available, the upper adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排序的第一个子图像块,则当所述当前解码对象的左相邻块可用时,所述子图像块的左相邻块可用;If the index information indicates that the sub-image block is the first sub-image block sorted sequentially, when the left adjacent block of the current decoding object is available, the left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排序的第一个子图像块,则当所述当前解码对象的左下相邻块可用时,所述子图像块的左下相邻块可用;If the index information indicates that the sub-image block is the first sub-image block sorted in sequence, when the lower-left adjacent block of the current decoding object is available, the lower-left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块是依次排序的第一个子图像块,则当所述当前解码对象的右上相邻块可用时,所述子图像块的右上相邻块可用;If the index information indicates that the sub-image block is the first sub-image block sorted in sequence, when the upper-right adjacent block of the current decoding object is available, the upper-right adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块不是依次排序的第一个子图像块,则所述子图像块的右上相邻块不可用;If the index information indicates that the sub-image block is not the first sub-image block sorted sequentially, the upper right adjacent block of the sub-image block is unavailable;

如果所述索引信息指示所述子图像块不是依次排序的第一个子图像块,则当所述当前解码对象的左相邻块可用时,所述子图像块的左下相邻块可用;If the index information indicates that the sub-image block is not the first sub-image block sorted sequentially, when the left adjacent block of the current decoding object is available, the lower left adjacent block of the sub-image block is available;

如果所述索引信息指示所述子图像块不是依次排序的第一个子图像块,则当所述当前解码对象的左下相邻块可用时,所述子图像块的左下相邻块可用。If the index information indicates that the sub-image block is not the first sub-image block sorted sequentially, when the lower-left adjacent block of the current decoding object is available, the lower-left adjacent block of the sub-image block is available.

当相邻块可用时,则以相邻块的像素值作为参考像素值,对子图像块进行预测,如果相邻块不可用,则使用预设的固定植作为该相邻块的参考像素值,或者将其他相邻块的像素值填充入所述相邻块中作为参考像素值。When the adjacent block is available, the pixel value of the adjacent block is used as the reference pixel value to predict the sub-image block. If the adjacent block is not available, the preset fixed plant is used as the reference pixel value of the adjacent block. , or fill the pixel values of other adjacent blocks into the adjacent block as reference pixel values.

请参照图4,本发明实施例还提供了应用上述编码方法的编码装置,其包括:Referring to Fig. 4, an embodiment of the present invention also provides an encoding device applying the above encoding method, which includes:

划分模块401,用于对当前编码对象进行非方块划分,得到沿水平方向或垂直方向依次排列的子图像块。The division module 401 is configured to perform non-block division on the current coding object to obtain sub-image blocks arranged in sequence along the horizontal or vertical direction.

其中,所述非方块划分包括垂直划分和水平划分,当所述非方块划分为垂直划分时,所述当前编码对象被划分为沿水平方向依次排列的子图像块,当所述非方块划分为水平划分时,所述当前编码对象被划分成沿垂直方向依次排列的子图像块。Wherein, the non-square division includes vertical division and horizontal division. When the non-square division is vertical division, the current coding object is divided into sub-image blocks arranged in sequence along the horizontal direction. When the non-square division is When dividing horizontally, the current coding object is divided into sub-image blocks arranged in sequence along the vertical direction.

可用性判断模块402,用于获得用于指示子图像块排序的索引,并根据所述索引信息,确定是否对子图像块的相邻块的可用性进行判断,并对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断。Availability judging module 402, configured to obtain an index used to indicate the sorting of the sub-image blocks, and determine whether to judge the availability of adjacent blocks of the sub-image blocks according to the index information, and determine the needs of the sub-image blocks Availability of neighboring blocks is judged by availability judgment.

其中,当所述非方块划分为垂直划分、且所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,所述子图像块的左相邻块可用,不对所述子图像块的左相邻块的可用性进行判断;当所述非方块划分为水平划分、且所述索引信息指示所述子图像块不是依次排列的第一个子图像块时,所述子图像块的上相邻块可用,不对所述子图像块的上相邻块进行可用性判断。Wherein, when the non-square division is vertical division and the index information indicates that the sub-image block is not the first sub-image block arranged sequentially, the left adjacent block of the sub-image block is available, and the The availability of the left adjacent block of the sub-image block is judged; when the non-square division is horizontal division and the index information indicates that the sub-image block is not the first sub-image block arranged in sequence, the sub-image The upper adjacent blocks of the block are available, and no availability judgment is performed on the upper adjacent blocks of the sub-image block.

像素值获得模块403,用于根据所述子图像块的可用性信息获得所述子图像块的参考像素值,并根据所述参考像素值对所述子图像块进行预测,得到所述子图像块的预测像素值。A pixel value obtaining module 403, configured to obtain a reference pixel value of the sub-image block according to the availability information of the sub-image block, and predict the sub-image block according to the reference pixel value, to obtain the sub-image block The predicted pixel value of .

在本发明实施例中,所述像素值获得模块包括:预测像素值获得子模块,用于当子图像块的相邻块可用时,则以相邻块的像素值作为参考像素值,对子图像块进行预测,得到子图像块的预测像素值;以及当子图像块的相邻块不可用时,以预设的固定值或以其它可用的相邻块的像素值作为参考像素值,对子图像块进行预测,得到子图像块的预测像素值。In the embodiment of the present invention, the pixel value obtaining module includes: a predicted pixel value obtaining sub-module, which is used to use the pixel value of the adjacent block as a reference pixel value when the adjacent block of the sub-image block is available. Predicting the image block to obtain the predicted pixel value of the sub-image block; The image block is predicted to obtain the predicted pixel value of the sub-image block.

残差数据获得模块404,用于根据所述参考像素值和所述预测像素值,得到当前编码对象的残差数据,并对所述残差数据进行变换、量化和熵编码,以得到编码后的残差数据;Residual data obtaining module 404, configured to obtain residual data of the current coding object according to the reference pixel value and the predicted pixel value, and perform transformation, quantization and entropy coding on the residual data to obtain coded residual data;

写入模块405,用于将所述当前编码对象的划分方式和所述残差数据写入码流中。A writing module 405, configured to write the division method of the current coding object and the residual data into a code stream.

请参照图5,本发明实施例还提供了应用上述解码方法的解码装置,其包括:Please refer to Fig. 5, the embodiment of the present invention also provides a decoding device applying the above decoding method, which includes:

参数获得模块501,用于从码流中解析得到当前解码对象的划分方式和残差数据;A parameter obtaining module 501, configured to analyze and obtain the division mode and residual data of the current decoding object from the code stream;

划分模块502,用于根据所述划分方式对所述当前解码对象进行划分,得到沿水平方向或垂直方向依次排列的子图像块;A division module 502, configured to divide the current decoding object according to the division method to obtain sub-image blocks arranged in sequence along the horizontal direction or the vertical direction;

其中,所述非方块划分包括垂直划分和水平划分,当所述非方块划分为垂直划分时,所述当前解码对象被划分为沿水平方向依次排列的子图像块,当所述非方块划分为水平划分时,所述当前解码对象被划分成沿垂直方向依次排列的子图像块。Wherein, the non-square division includes vertical division and horizontal division. When the non-square division is vertical division, the current decoding object is divided into sub-image blocks arranged in sequence along the horizontal direction. When the non-square division is When dividing horizontally, the current decoding object is divided into sub-image blocks arranged in sequence along the vertical direction.

相似的,在本发明实施例中,所述划分模块包括索引信息获得子模块,用于在对当前编码对象进行非方块划分,得到沿水平方向或垂直方向依次排列的子图像块时,获得子图像块的索引信息。Similarly, in the embodiment of the present invention, the division module includes an index information acquisition submodule, which is used to obtain the sub-image blocks when the current coding object is divided into non-square blocks to obtain sub-image blocks arranged in sequence along the horizontal or vertical direction. Index information of the image block.

可用性判断模块503,用于获得用于指示子图像块排序的索引信息,并根据所述索引信息,确定是否对子图像块的相邻块的可用性进行判断,并对所述子图像块的需要进行可用性判断的相邻块的可用性进行判断。Availability judging module 503, configured to obtain index information used to indicate the sorting of sub-image blocks, and determine whether to judge the availability of adjacent blocks of the sub-image blocks according to the index information, and determine the needs of the sub-image blocks Availability of adjacent blocks for which the availability judgment is made is judged.

其中,当所述非方块划分为垂直划分、且所述索引信息指示所述子图像块不是依次排序的第一个子图像块时,所述子图像块的左相邻块可用,不对所述子图像块的左相邻块的可用性进行判断;当所述非方块划分为水平划分、且所述索引信息指示所述子图像块不是依次排序的第一个子图像块时,所述子图像块的上相邻块可用,不对所述子图像块的上相邻块进行可用性判断。Wherein, when the non-square division is vertical division and the index information indicates that the sub-image block is not the first sub-image block sorted sequentially, the left adjacent block of the sub-image block is available, and the The availability of the left adjacent block of the sub-image block is judged; when the non-square division is horizontal division and the index information indicates that the sub-image block is not the first sub-image block in order, the sub-image The upper adjacent blocks of the block are available, and no availability judgment is performed on the upper adjacent blocks of the sub-image block.

像素数据获得模块504,用于根据所述子图像块的可用性信息,获得所述子图像块的参考像素值,并根据所述参考像素值和所述残差数据,获得所述子图像块的重构像素值。A pixel data obtaining module 504, configured to obtain the reference pixel value of the sub-image block according to the availability information of the sub-image block, and obtain the reference pixel value of the sub-image block according to the reference pixel value and the residual data. Reconstruct pixel values.

所述像素值获得模块包括预测像素值获得子模块,用于当子图像块的相邻块可用时,则以相邻块的像素值作为参考像素值,对子图像块进行预测,得到子图像块的预测像素值;以及当子图像块的相邻块不可用时,以预设的固定值或以其它可用的相邻块的像素值作为参考像素值,对子图像块进行预测,得到子图像块的预测像素值。The pixel value obtaining module includes a predicted pixel value obtaining sub-module, which is used to predict the sub-image block by using the pixel value of the adjacent block as a reference pixel value when the adjacent block of the sub-image block is available, to obtain the sub-image The predicted pixel value of the block; and when the adjacent block of the sub-image block is not available, the preset fixed value or the pixel value of other available adjacent blocks are used as the reference pixel value to predict the sub-image block to obtain the sub-image Predicted pixel values for the block.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is a better implementation Way. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , CD, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of the present invention.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications should also be It is regarded as the protection scope of the present invention.

Claims (12)

1. a coding method, is characterized in that, comprising:
Present encoding object is carried out to non-square division, obtain the subimage block that along continuous straight runs or vertical direction are arranged in order, wherein, described non-square is divided and is comprised vertical division and horizontal division, when described non-square is divided into vertical division, described present encoding object is divided into the subimage block that along continuous straight runs is arranged in order, and when described non-square is divided into horizontal division, described present encoding object is divided into the subimage block being vertically arranged in order;
Acquisition is used to indicate the index information of subimage block sequence, according to described index information, determine whether the availability of the adjacent block of subimage block to judge, and the availability that need to carry out the adjacent block of availability judgement of described subimage block is judged, wherein, when described non-square is divided into vertical division and described index information and indicates described subimage block not to be first subimage block being arranged in order, the left adjacent block of described subimage block can be used, and the availability of the left adjacent block of described subimage block is not judged; When described non-square is divided into horizontal division and described index information and indicates described subimage block not to be first subimage block being arranged in order, the upper adjacent block of described subimage block can be used, and the upper adjacent block of described subimage block is not carried out to availability judgement;
According to the availability information of described subimage block, obtain the reference pixel value of described subimage block, and according to described reference pixel value, described subimage block is predicted, obtain the predicted pixel values of described subimage block;
According to the original pixel value of described predicted pixel values and described subimage block, obtain the residual error data of described subimage block;
To described residual error data convert, quantification and entropy coding, with the residual error data after being encoded;
The dividing mode of described present encoding object and described residual error data are write in code stream.
2. coding method as described in claim 1, is characterized in that, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When described coded object is during by vertical division, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the left adjacent block of described present encoding object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper adjacent block of described present encoding object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the lower-left of described present encoding object adjacent block is available, the lower-left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper right of described present encoding object adjacent block is available, the upper right adjacent block of described subimage block can be used;
If when described index information indicates described subimage block not to be first subimage block being arranged in order, the lower-left adjacent block of described subimage block is unavailable;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the upper adjacent block of described present encoding object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the upper right of described present encoding object adjacent block is available, the upper right adjacent block of described subimage block can be used,
When described coded object is during by horizontal division, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper adjacent block of described present encoding object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the left adjacent block of described present encoding object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the lower-left of described present encoding object adjacent block is available, the lower-left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper right of described present encoding object adjacent block is available, the upper right adjacent block of described subimage block can be used;
If when described index information indicates described subimage block not to be first subimage block being arranged in order, the upper right adjacent block of described subimage block is unavailable;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the left adjacent block of described present encoding object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the lower-left of described present encoding object adjacent block is available, the lower-left adjacent block of described subimage block can be used.
3. coding method as described in claim 1, it is characterized in that, the described availability information according to described subimage block obtains the reference pixel value of described subimage block, and according to described reference pixel value, described subimage block is predicted, the predicted pixel values that obtains described subimage block comprises:
When the adjacent block of subimage block is available, using the pixel value of adjacent block as with reference to pixel value, subimage block is predicted, obtain the predicted pixel values of subimage block;
When the adjacent block of subimage block is unavailable, with the fixed value preset or the pixel value of usining other available adjacent block as with reference to pixel value, subimage block is predicted, obtain the predicted pixel values of subimage block.
4. a coding/decoding method, is characterized in that, comprising:
From code stream, resolve dividing mode and the residual error data that obtains current decoder object;
According to described dividing mode, described current decoder object is carried out to non-square division, obtain the subimage block that along continuous straight runs or vertical direction are arranged in order, wherein, described non-square is divided and is comprised vertical division and horizontal division, when described non-square is divided into vertical division, described current decoder object is divided into the subimage block that along continuous straight runs is arranged in order, and when described non-square is divided into horizontal division, described current decoder object is divided into the subimage block being vertically arranged in order;
Acquisition is used to indicate the index information of subimage block sequence, and according to the index information of described subimage block, determine whether the availability of the adjacent block of subimage block to judge, and the availability that need to carry out the adjacent block of availability judgement of described subimage block is judged, wherein, when described non-square is divided into vertical division and described index information and indicates described subimage block not to be first subimage block sorting successively, the left adjacent block of described subimage block can be used, and the availability of the left adjacent block of described subimage block is not judged; When described non-square is divided into horizontal division and described index information and indicates described subimage block not to be first subimage block sorting successively, the upper adjacent block of described subimage block can be used, and the upper adjacent block of described subimage block is not carried out to availability judgement;
According to the availability information of described subimage block, obtain the reference pixel value of described subimage block;
According to described reference pixel value and described residual error data, obtain the reconstructed pixel data of described subimage block.
5. coding/decoding method as described in claim 4, is characterized in that, comprising: the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When described decoder object is during by vertical division, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the left adjacent block of described current decoder object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper adjacent block of described current decoder object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the lower-left of described current decoder object adjacent block is available, the lower-left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper right of described current decoder object adjacent block is available, the upper right adjacent block of described subimage block can be used;
If when described index information indicates described subimage block not to be first subimage block being arranged in order, the lower-left adjacent block of described subimage block is unavailable;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the upper adjacent block of described current decoder object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the upper right of described current decoder object adjacent block is available, the upper right adjacent block of described subimage block can be used,
When described decoder object is during by horizontal division, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper adjacent block of described current decoder object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the left adjacent block of described current decoder object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the lower-left of described current decoder object adjacent block is available, the lower-left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper right of described current decoder object adjacent block is available, the upper right adjacent block of described subimage block can be used;
If when described index information indicates described subimage block not to be first subimage block being arranged in order, the upper right adjacent block of described subimage block is unavailable;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the left adjacent block of described current decoder object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the lower-left of described current decoder object adjacent block is available, the lower-left adjacent block of described subimage block can be used.
6. coding/decoding method as described in claim 4, is characterized in that, described according to the availability information of described subimage block, the reference pixel value that obtains described subimage block comprises:
When the adjacent block of subimage block is available, using the pixel value of adjacent block as with reference to pixel value;
When the adjacent block of subimage block is unavailable, with the fixed value preset or the pixel value of usining other available adjacent block as with reference to pixel value.
7. a code device, is characterized in that, comprising:
Divide module, for present encoding object is carried out to non-square division, obtain the subimage block that along continuous straight runs or vertical direction are arranged in order, wherein, described non-square is divided and is comprised vertical division and horizontal division, and when described non-square is divided into vertical division, described present encoding object is divided into the subimage block that along continuous straight runs is arranged in order, when described non-square is divided into horizontal division, described present encoding object is divided into the subimage block being vertically arranged in order;
Availability judge module, for obtaining the index information that is used to indicate subimage block sequence, and according to the index information of described subimage block, determine whether the availability of the adjacent block of subimage block to judge, and the availability that need to carry out the adjacent block of availability judgement of described subimage block is judged, wherein, when described non-square is divided into vertical division, and when described index information indicates described subimage block not to be first subimage block being arranged in order, the left adjacent block of described subimage block can be used, the availability of the left adjacent block of described subimage block is not judged, when described non-square is divided into horizontal division and described index information and indicates described subimage block not to be first subimage block being arranged in order, the upper adjacent block of described subimage block can be used, and the upper adjacent block of described subimage block is not carried out to availability judgement,
Pixel value obtains module, for obtain the reference pixel value of described subimage block according to the availability information of described subimage block, and according to described reference pixel value, described subimage block is predicted, obtains the predicted pixel values of described subimage block;
Residual error data obtains module, for according to original pixel value and described predicted pixel values, obtains the residual error data of present encoding object, and to described residual error data convert, quantification and entropy coding, with the residual error data after being encoded;
Writing module, for writing code stream by the dividing mode of described present encoding object and described residual error data.
8. code device as described in claim 7, is characterized in that, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When described coded object is during by vertical division, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the left adjacent block of described present encoding object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper adjacent block of described present encoding object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the lower-left of described present encoding object adjacent block is available, the lower-left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper right of described present encoding object adjacent block is available, the upper right adjacent block of described subimage block can be used;
If when described index information indicates described subimage block not to be first subimage block being arranged in order, the lower-left adjacent block of described subimage block is unavailable;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the upper adjacent block of described present encoding object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the upper right of described present encoding object adjacent block is available, the upper right adjacent block of described subimage block can be used,
When described coded object is during by horizontal division, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper adjacent block of described present encoding object is available, the upper adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the left adjacent block of described present encoding object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the lower-left of described present encoding object adjacent block is available, the lower-left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block to be first subimage block being arranged in order,, when the upper right of described present encoding object adjacent block is available, the upper right adjacent block of described subimage block can be used;
If when described index information indicates described subimage block not to be first subimage block being arranged in order, the upper right adjacent block of described subimage block is unavailable;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the left adjacent block of described present encoding object is available, the left adjacent block of described subimage block can be used;
When if described index information indicates described subimage block not to be first subimage block being arranged in order,, when the lower-left of described present encoding object adjacent block is available, the lower-left adjacent block of described subimage block can be used.
9. code device as described in claim 7, is characterized in that, described pixel value obtains module and comprises:
Predicted pixel values obtains submodule, when available for the adjacent block when subimage block, usings the pixel value of adjacent block as with reference to pixel value, and subimage block is predicted, obtains the predicted pixel values of subimage block; And when the adjacent block of subimage block is unavailable, with the fixed value preset or the pixel value of usining other available adjacent block, as with reference to pixel value, subimage block is predicted, obtain the predicted pixel values of subimage block.
10. a decoding device, is characterized in that, comprising:
Gain of parameter module, for resolving dividing mode and the residual error data that obtains current decoder object from code stream;
Divide module, for described current decoder object being carried out to non-square division according to described dividing mode, obtain the subimage block that along continuous straight runs or vertical direction are arranged in order, wherein, described non-square is divided and is comprised vertical division and horizontal division, when described non-square is divided into vertical division, described current decoder object is divided into the subimage block that along continuous straight runs is arranged in order, when described non-square is divided into horizontal division, described current decoder object is divided into the subimage block being vertically arranged in order;
Availability judge module, for obtaining the index information of indication subimage block sequence, and according to the index information of described subimage block, determine whether the availability of the adjacent block of subimage block to judge, and the availability that need to carry out the adjacent block of availability judgement of described subimage block is judged, wherein, when described non-square is divided into vertical division, and when described index information indicates described subimage block not to be first subimage block sorting successively, the left adjacent block of described subimage block can be used, the availability of the left adjacent block of described subimage block is not judged, when described non-square is divided into horizontal division and described index information and indicates described subimage block not to be first subimage block sorting successively, the upper adjacent block of described subimage block can be used, and the upper adjacent block of described subimage block is not carried out to availability judgement,
Pixel data obtains module, for according to the availability information of described subimage block, obtains the reference pixel value of described subimage block, and according to described reference pixel value and described residual error data, obtains the reconstructed pixel value of described subimage block.
11. decoding devices as described in claim 10, is characterized in that, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
When described decoder object is during by vertical division, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
If it is first subimage block sorting successively that described index information is indicated described subimage block,, when the left adjacent block of described current decoder object is available, the left adjacent block of described subimage block can be used;
If it is first subimage block sorting successively that described index information is indicated described subimage block,, when the upper adjacent block of described current decoder object is available, the upper adjacent block of described subimage block can be used;
If it is first subimage block sorting successively that described index information is indicated described subimage block,, when the lower-left of described current decoder object adjacent block is available, the lower-left adjacent block of described subimage block can be used;
If it is first subimage block sorting successively that described index information is indicated described subimage block,, when the upper right of described current decoder object adjacent block is available, the upper right adjacent block of described subimage block can be used;
If it is not first subimage block sorting successively that described index information is indicated described subimage block, the lower-left adjacent block of described subimage block is unavailable;
If it is not first subimage block sorting successively that described index information is indicated described subimage block,, when the upper adjacent block of described current decoder object is available, the upper adjacent block of described subimage block can be used;
If it is not first subimage block sorting successively that described index information is indicated described subimage block,, when the upper right of described current decoder object adjacent block is available, the upper adjacent block of described subimage block can be used,
When described decoder object is during by horizontal division, the described availability that need to carry out the adjacent block of availability judgement to described subimage block judges and comprises:
If it is first subimage block sorting successively that described index information is indicated described subimage block,, when the upper adjacent block of described current decoder object is available, the upper adjacent block of described subimage block can be used;
If it is first subimage block sorting successively that described index information is indicated described subimage block,, when the left adjacent block of described current decoder object is available, the left adjacent block of described subimage block can be used;
If it is first subimage block sorting successively that described index information is indicated described subimage block,, when the lower-left of described current decoder object adjacent block is available, the lower-left adjacent block of described subimage block can be used;
If it is first subimage block sorting successively that described index information is indicated described subimage block,, when the upper right of described current decoder object adjacent block is available, the upper right adjacent block of described subimage block can be used;
If it is not first subimage block sorting successively that described index information is indicated described subimage block, the upper right adjacent block of described subimage block is unavailable;
If it is not first subimage block sorting successively that described index information is indicated described subimage block,, when the left adjacent block of described current decoder object is available, the left adjacent block of described subimage block can be used;
If it is not first subimage block sorting successively that described index information is indicated described subimage block,, when the lower-left of described current decoder object adjacent block is available, the lower-left adjacent block of described subimage block can be used.
12. decoding devices as described in claim 10, is characterized in that, described pixel value obtains module and comprises:
Predicted pixel values obtains submodule, when available for the adjacent block when subimage block, usings the pixel value of adjacent block as with reference to pixel value, and subimage block is predicted, obtains the predicted pixel values of subimage block; And when the adjacent block of subimage block is unavailable, with the fixed value preset or the pixel value of usining other available adjacent block, as with reference to pixel value, subimage block is predicted, obtain the predicted pixel values of subimage block.
CN201110021859.7A 2011-01-19 2011-01-19 A codec method and device Active CN102611882B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110021859.7A CN102611882B (en) 2011-01-19 2011-01-19 A codec method and device
PCT/CN2012/070610 WO2012097747A1 (en) 2011-01-19 2012-01-19 Coding-decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110021859.7A CN102611882B (en) 2011-01-19 2011-01-19 A codec method and device

Publications (2)

Publication Number Publication Date
CN102611882A CN102611882A (en) 2012-07-25
CN102611882B true CN102611882B (en) 2014-02-26

Family

ID=46515168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110021859.7A Active CN102611882B (en) 2011-01-19 2011-01-19 A codec method and device

Country Status (2)

Country Link
CN (1) CN102611882B (en)
WO (1) WO2012097747A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363459A (en) * 2014-10-29 2015-02-18 复旦大学 Hardware filling method applicable to infra-frame prediction reference pixels in HEVC (high efficiency video coding) standard

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589022A (en) * 2004-08-26 2005-03-02 中芯联合(北京)微电子有限公司 Macroblock split mode selecting method in multiple mode movement estimation decided by oriented tree
CN101005623A (en) * 2006-01-21 2007-07-25 宇龙计算机通信科技(深圳)有限公司 Method for determining video frequency frame block in-frame or interframe coding
CN101605255A (en) * 2008-06-12 2009-12-16 华为技术有限公司 Method and device for video encoding and decoding
CN101677406A (en) * 2008-09-19 2010-03-24 华为技术有限公司 Method and apparatus for video encoding and decoding

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100265721B1 (en) * 1997-03-31 2000-09-15 윤종용 Method for estimating the motion of pictures using 2-D triangle-patch wireframe model
KR101365567B1 (en) * 2007-01-04 2014-02-20 삼성전자주식회사 Method and apparatus for prediction video encoding, and method and apparatus for prediction video decoding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589022A (en) * 2004-08-26 2005-03-02 中芯联合(北京)微电子有限公司 Macroblock split mode selecting method in multiple mode movement estimation decided by oriented tree
CN101005623A (en) * 2006-01-21 2007-07-25 宇龙计算机通信科技(深圳)有限公司 Method for determining video frequency frame block in-frame or interframe coding
CN101605255A (en) * 2008-06-12 2009-12-16 华为技术有限公司 Method and device for video encoding and decoding
CN101677406A (en) * 2008-09-19 2010-03-24 华为技术有限公司 Method and apparatus for video encoding and decoding

Also Published As

Publication number Publication date
CN102611882A (en) 2012-07-25
WO2012097747A1 (en) 2012-07-26

Similar Documents

Publication Publication Date Title
US10536714B2 (en) Method for coding and an apparatus
JP7351463B2 (en) Image encoding method and device, image decoding method and device, and program
CN102611885B (en) Encoding and decoding method and device
RU2553063C2 (en) Method for prediction during encoding or decoding and predictor
TWI520579B (en) Picture coding supporting block partitioning and block merging
US20170374379A1 (en) Picture prediction method and related apparatus
TWI521949B (en) Image predictive coding apparatus, method and program, image predictive decoding apparatus, method and program, and coding decoding system and method
CN102595116A (en) Encoding and decoding methods and devices for multiple image block division ways
JP2019528025A5 (en)
CN104853192A (en) Prediction mode selection method and device
TW201524196A (en) Image prediction decoding device, image prediction decoding method, and image prediction decoding program
CN101438597A (en) Image data compression device, compression method, program, and image data decompression device, decompression method, and program
CN108353175A (en) The method and apparatus of prediction processing vision signal caused by coefficient of utilization
CN108337508A (en) Intra prediction device and method
CN109660806B (en) Encoding method and device and electronic equipment
KR20190013908A (en) Interframe predictive coding method and apparatus
CN102377992A (en) Method and device for obtaining predicted value of motion vector
CN102611882B (en) A codec method and device
CN104104947B (en) A kind of method for video coding and device
CN108924551A (en) The prediction technique and relevant device of video image coding pattern
CN102595117B (en) Method and device for coding and decoding
CN104735458B (en) A kind of prediction technique in encoding and decoding and fallout predictor
CN119996655A (en) Video information processing method, system, electronic device and storage medium

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