WO2012122948A1 - 图像编解码方法、图像编解码设备及网络系统 - Google Patents

图像编解码方法、图像编解码设备及网络系统 Download PDF

Info

Publication number
WO2012122948A1
WO2012122948A1 PCT/CN2012/072464 CN2012072464W WO2012122948A1 WO 2012122948 A1 WO2012122948 A1 WO 2012122948A1 CN 2012072464 W CN2012072464 W CN 2012072464W WO 2012122948 A1 WO2012122948 A1 WO 2012122948A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
size
transform
image block
image
Prior art date
Application number
PCT/CN2012/072464
Other languages
English (en)
French (fr)
Inventor
袁媛
郑萧桢
刘凌志
王云飞
曹潇然
何芸
Original Assignee
清华大学
华为技术有限公司
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 清华大学, 华为技术有限公司 filed Critical 清华大学
Publication of WO2012122948A1 publication Critical patent/WO2012122948A1/zh
Priority to US14/026,682 priority Critical patent/US9106897B2/en

Links

Classifications

    • 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
    • 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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • 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/46Embedding additional information in the video signal during the compression process

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to an image encoding and decoding method, an image encoding and decoding device, and a network system. Background technique
  • video data may be compressed using a variety of video compression methods, including: intra-frame compression and inter-frame compression.
  • intra-frame compression and inter-frame compression.
  • inter-frame compression method based on motion estimation is adopted.
  • the process of encoding and encoding the image by the encoding end of the image by the encoding end includes: The encoding end divides the image block to be encoded into several sub-image blocks of equal size.
  • the image block that best matches the current sub-image block as a prediction block and then subtracting the corresponding pixel value of the sub-image block from the prediction block to obtain a residual, and the residual
  • the value obtained by the transform and the quantization is entropy encoded, and finally the bit stream and the motion vector information obtained by the entropy coding are sent to the decoding end, wherein the motion vector information indicates the position difference between the current sub-image block and the prediction block.
  • the entropy encoded bit stream is first obtained, and entropy decoding is performed to obtain a corresponding residual, and corresponding motion vector information; and then the corresponding matching image block is obtained in the reference image according to the motion vector information (ie, the above prediction block) And adding, according to the value of each pixel in the matching image block and the value of the corresponding pixel in the residual value, the value of each pixel in the current sub-image block is obtained.
  • a super-macroblock In existing video codec standards, such as Moving Picture Experts Group (MPEG), H.264/AVC (Advanced Video Coding, Enhanced Video Coding), an image block, or macroblock (macroblock) ), a super-macroblock, etc., are divided into a number of sub-image blocks having sizes of 16x16, 16x8, 8x16, 8x8, 8x4, 4x8, 4x4, etc., and the sub-image blocks are subjected to the above-mentioned sizes.
  • MPEG Moving Picture Experts Group
  • H.264/AVC Advanced Video Coding
  • Enhanced Video Coding Enhanced Video Coding
  • an image block or macroblock (macroblock)
  • macroblock macroblock
  • these sub-image blocks are rectangular blocks of NXM (N and M are integers greater than 0), and N and M have a multiple relationship.
  • image blocks are divided into sub-image blocks.
  • 2Nx2N division image blocks only contain a sub-image block, that is, the image block is not divided into smaller sub-image blocks, as shown in FIG. 1a;
  • 2NxN division mode the image block is divided into upper and lower two sub-image blocks, as shown in FIG. 1b ;
  • Nx2N division mode the image block is divided into two sub-image blocks of the same size as the left and right, as shown in Figure 1c;
  • NxN division mode the image block is divided into four equal-sized sub-image blocks, as shown in Figure 1d.
  • the above N is any positive integer.
  • the image block can also be asymmetrically divided as shown in Figures 2a to 2d.
  • the length of the two blocks is 2N and 0.5N
  • the length of the lower sub-image block is 2N and 1.5N.
  • the U in 2NxnU indicates that the image dividing line moves relative to the vertical bisector of the image block, and 2NxnU indicates image division.
  • the upper sub-image block has two variable lengths of 2N and 1.5N
  • the lower sub-image block has two variable lengths of 2N and 0.5N, wherein D in 2NxnD represents the vertical division of the image dividing line with respect to the image block.
  • the image block has two variable lengths of 0.5 ⁇ and 2 ⁇ , where L in the nLx2N indicates that the image dividing line is shifted to the left by the vertical bisector of the image block, and nLx2N indicates that the image dividing line is shifted to the left of the vertical bisector of the image block.
  • n x * N, where X is greater than or equal to 0 and less than or equal to 1; the right sub-image block has two variable lengths of 1.5N and 2N;
  • the left sub-image block has two variable lengths of 1.5N and 2N
  • the right sub-image block has two variable lengths of 0.5N and 2N
  • R in nRx2N indicates that the image dividing line is perpendicular to the image block.
  • the transform matrix can be used to remove the correlation of the residual of the image block, that is, the redundant information of the image block is removed, so as to improve the coding efficiency, the transformation of the data block in the image block usually adopts two.
  • Dimensional transformation that is, the residual information of the data block is multiplied by the transform matrix of the NXM and its transposed matrix at the encoding end, and the transform coefficients are obtained after multiplication.
  • C represents the residual information of the data block
  • T and T′ represent the transformation matrix and the transposed matrix of the transformation matrix
  • f represents the transformation coefficient matrix obtained by transforming the residual information of the data block.
  • the transformation matrix may be a Discrete Cosine Transform (DCT) matrix, an Integer Transform matrix, a KL transform (KLT) matrix, or the like. Among them, KLT can better consider the texture information of image block or image block residual, so KLT can achieve better results.
  • Performing the above processing on the residual information of the image block is equivalent to converting the residual information of the image block from the spatial domain to the frequency domain, and the processed transform coefficient matrix f is concentrated in the low frequency region; the residual information of the image block at the encoding end
  • the transformed coefficient matrix obtained by the conversion is subjected to quantization, entropy coding, and the like, and then the bit stream obtained by the entropy coding is transmitted to the decoding end.
  • the encoding end sends the indication information indicating the transformation matrix used by the current image block to the decoding end.
  • the subsequent decoding end determines the transform matrix used by the encoding end according to the above indication information, and according to the characteristics of the transform matrix (orthogonality of the transform matrix, etc.), the bit stream sent by the encoding end is decoded to obtain a transform coefficient matrix, and the transform coefficient matrix and transform are performed. Multiplying the matrix and its transposed matrix can recover the residual information of the data block that is approximately consistent with the encoding end.
  • the above steps can be described using the following formula:
  • T and T' represent the transformation matrix of the transformation matrix and the transformation matrix
  • f represents the matrix of transform coefficients obtained by the decoding end.
  • a transform matrix of size 2Nx2N can be used for a 2Nx2N image block, or a transform matrix of size NxN, or a transform matrix of size 0.5Nx0.5N can be used.
  • a tree identification method can be used in order to effectively represent how image blocks use different size transformation matrices. As shown in FIG.
  • the first layer in the code stream has an indication bit for identifying whether the image block uses a size of 2Nx2N transform matrix, if the image block uses a size of 2Nx2N transform matrix (as shown in FIG. 3a), then the indicator bit is 0; if the image block does not use 2Nx2N transform, then the indicator bit is 1, indicating that the size needs to be 2Nx2N transform moment
  • the array is further divided into four transform matrices of size NxN, and four bits are used in the second layer structure of the code stream to identify whether each transform matrix of size NxN is further divided; if the image block is as shown in FIG.
  • the above 4 + 4 bits are all 0, indicating that the partition is not further divided.
  • the layer-by-layer identification in the code stream can effectively and flexibly represent the transform size used by the image block and the sub-image block.
  • the size of the transformation matrix is not associated with the size of the prediction block.
  • the 2Nx2N image block uses asymmetric division (the division line is shown by the thick solid line in the figure)
  • the transformation matrix will cross the prediction block boundary;
  • the current image block uses four transformation matrices of size NxN, the transformation matrix will still cross the prediction block boundary; if the lower left and upper right of the current image block adopts a transformation matrix of size NxN, and the upper left and lower right of the current image block
  • a transform matrix of size 0.5Nx0.5N is used, the transform matrix of the size NxN at the lower left of the current image block will still cross the prediction block boundary.
  • the size of the transform matrix in the prior art is not associated with the size of the prediction block, resulting in the transformation matrix crossing the prediction block boundary. Since the residual data corresponding to the boundary of the two prediction blocks has a hopping transformation, if the transformation matrix crosses the boundary of the two prediction blocks, the effect of the transformation is weakened, and the correlation of the residual of the image block cannot be effectively removed. Sexuality, can not effectively remove redundant information of image blocks, reducing coding efficiency. Summary of the invention
  • Embodiments of the present invention provide an image encoding and decoding method, an image encoding and decoding device, and a network system, which are capable of determining a size of a transform block according to a division manner of an image block, and ensuring that the transform block does not cross the prediction block boundary.
  • An image encoding method comprising:
  • a transform block corresponding to the image block or the prediction block in the image block or the prediction block includes one or more transform blocks; a division manner of the block and the number of division layers determines a size of the transformation block corresponding to the image block or the prediction block;
  • identification information identifying a number of division layers corresponding to the transform block corresponding to the image block or the prediction block
  • the identification information is written to the code stream.
  • An image decoding method includes:
  • identifier information that identifies a number of partition layers corresponding to the transform block corresponding to the image block or the prediction block in the image block or the prediction block, and determining, according to the identifier information, the image block or the prediction block Transforming a corresponding number of layers in an image block or a prediction block; wherein the image block or the transform block corresponding to the prediction block includes one or more transform blocks;
  • the size of the transform block corresponding to the image block or the prediction block is determined according to the division manner of the image block and the number of division layers.
  • An image encoding device comprising:
  • a prediction block determining unit configured to determine a prediction block used by the image block according to a division manner of the image block
  • a division level determining unit configured to determine a number of division layers corresponding to the transform block corresponding to the image block or the prediction block in the image block or the prediction block, where the transform block corresponding to the image block or the prediction block includes one or Multiple transform blocks;
  • a transform block size determining unit configured to determine a size of the transform block corresponding to the image block or the prediction block according to a division manner of the image block and the number of division layers;
  • the identification information determining unit is configured to determine identification information that identifies the number of division layers corresponding to the transform block corresponding to the image block or the prediction block;
  • a writing unit configured to write the identification information into the code stream.
  • An image decoding device comprising: a prediction block determining unit, configured to obtain a division manner of the image block, and determine a prediction block used by the image block according to the division manner of the image block;
  • An identifier information obtaining unit configured to parse the code stream to obtain identification information that identifies a corresponding number of layers of the transform block corresponding to the image block or the prediction block in the image block or the prediction block;
  • a division level determining unit configured to determine, according to the identification information, a number of division layers corresponding to the transform block corresponding to the image block or the prediction block in the image block or the prediction block; where the image block or the prediction block corresponds to the transformation A block includes one or more transform blocks;
  • a transform block size determining unit configured to determine a size of the transform block corresponding to the image block or the prediction block according to a division manner of the image block and the number of division layers.
  • the embodiment of the present invention considers the division manner of the division manner of the image block when determining the size of the transformation block, and writes the identification information of the division layer number corresponding to the transformation block corresponding to the image block or the prediction block into the code stream.
  • the layer-by-layer identification method it not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, effectively improving the coding efficiency.
  • Figure 1 a shows a schematic diagram of the division mode of 2Nx2N
  • Figure 1 b shows a schematic diagram of the division mode of 2NxN
  • Figure 1c shows a schematic diagram of the partitioning mode of Nx2N
  • Figure 1d shows a schematic diagram of the partitioning mode of NxN
  • Figure 2a shows a schematic diagram of the partitioning mode of 2NxnU
  • Figure 2b shows a schematic diagram of the partitioning mode of 2NxnD
  • Figure 2c shows a schematic diagram of the partitioning mode of nLx2N
  • Figure 2d shows a schematic diagram of the division mode n Rx2N
  • Figure 3a shows a schematic diagram of an image block using a 2Nx2N transform block
  • Figure 3b shows a schematic diagram of an image block using four sizes of NxN transform blocks
  • Figure 3c shows a schematic diagram of an image block using a transform block of size NxN transform block and size 0.5 NX0.5N;
  • FIG. 4a shows a schematic diagram of an image block using a 2Nx2N transform block when asymmetrically divided
  • FIG. 4b shows a schematic diagram of an image block using four sizes of NxN transform blocks when asymmetric partitioning
  • FIG. 4c shows an image block use size when asymmetric partitioning is used.
  • FIG. 5 is a flowchart of an image encoding method according to Embodiment 1 of the present invention.
  • FIG. 6 is a flowchart of an image encoding method according to Embodiment 2 of the present invention.
  • Figure 6a shows a schematic diagram of an image block using a size Nx2N transform block
  • Figure 6b shows a schematic diagram of an image block using a 0.5NX2N transform block
  • Figure 6c shows a schematic diagram of image block sizes Nx2N and NxN transform blocks
  • FIG. 6d is a schematic diagram showing an image block using 0.5x2N and 0.5Nx0.5N transform blocks;
  • FIG. 7 is a flowchart of an image encoding method according to Embodiment 3 of the present invention.
  • Figure 7a shows a schematic diagram of an image block using a 2Nx2N transform block
  • Figure 7b shows a schematic diagram of an image block using a 0.5NX2N transform block
  • Figure 7c is a schematic diagram showing an image block using 0.5Nx2N and 0.5Nx0.5N transform blocks;
  • Figure 8 is a flowchart of an image encoding method according to Embodiment 5 of the present invention.
  • Figure 8a shows a schematic diagram of two prediction blocks corresponding to Nx2N transform blocks
  • 8b is a schematic diagram showing a Nx2N transform block corresponding to a left prediction block and an NxN transform block corresponding to a right prediction block;
  • 8c is a schematic diagram showing a left prediction block corresponding to an Nx2N transform block and a right prediction block corresponding to a 0.5x0.5N transform block;
  • FIG. 9 is a flowchart of an image decoding method according to Embodiment 6 of the present invention.
  • FIG. 10 is a flowchart of an image decoding method according to Embodiment 7 of the present invention.
  • FIG. 11 is a flowchart of an image decoding method according to Embodiment 8 of the present invention.
  • FIG. 12 is a structural diagram of an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 13 is a structural diagram of an image decoding apparatus according to an embodiment of the present invention. detailed description
  • Embodiment 1 Referring to FIG. 5, an embodiment of the present invention provides an image coding method, where the method specifically includes:
  • each step of the embodiment can be performed by an image encoding device.
  • the division mode of the image block can be divided into: the division mode of nLx2N and the division mode of 2NxnL.
  • the division mode of nLx2N belongs to vertical division.
  • the image block is divided into a sub-image block of 0.5NX2N and a sub-image block of 1.5Nx2N; wherein the division manner of 2NxnL belongs to horizontal division, for example, the image block is divided into 2Nx0. 5N sub-image block and 2Nx1.5N sub-image block.
  • the determining, according to the division manner of the image block, the prediction block used by the image block specifically includes: determining the size of the prediction block used by the image block according to the division manner of the image block.
  • the size of the prediction block is the same as the size of the sub-image block that is divided.
  • the transform block corresponding to the image block is a transform block used by the image block; and the transform block corresponding to the prediction block is: a sub-image block matched with the prediction block size Transform block.
  • the transform block corresponding to the image block or the prediction block is used in the image block or the prediction block, and the corresponding number of partition layers in the image block or the prediction block is used in the image block or the prediction block. Divide the number of layers.
  • the number of division layers is the number of division layers corresponding to the transformation block corresponding to the image block or the prediction block.
  • the at least one transform block corresponding to the image block (or prediction block) corresponds to the N+1 partition layer in the image block (or prediction block)
  • the at least one transform block The horizontal size is smaller than a horizontal size of the transform block corresponding to the Nth partition layer; and/or the vertical size of the at least one transform block is smaller than a vertical size of the transform block corresponding to the Nth partition layer.
  • the horizontal size of the at least one transform block is smaller than the horizontal size of the transform block corresponding to the Nth partition layer. Specifically, the horizontal size of the at least one transform block is 1/1 of the horizontal size of the transform block corresponding to the Nth partition layer. And the vertical size of the at least one transform block is smaller than the vertical size of the transform block corresponding to the Nth partition layer, specifically: the vertical size of the at least one transform block is the Nth partition layer l/m 2 of the vertical dimension of the corresponding transform block, where m 2 is greater than or equal to 2. Its Medium, 13 ⁇ 4 and 13 ⁇ 4 may or may not be equal.
  • the transformation corresponding to the image block or the prediction block is identified.
  • the identification information of the number of division layers corresponding to the block includes: a flag bit that identifies that the transform block of the first partition layer is not further divided; when one transform block corresponding to the image block or the prediction block is in the image block or the prediction block
  • the identification information of the number of division layers corresponding to the transformation block corresponding to the image block or the prediction block includes: identifying a further division of the transformation block of the first division layer a flag bit, where the transform block corresponding to the image block or the prediction block is a transform block further divided by the transform block of the first partition layer; when the image block or the prediction block corresponds to one transform block in the
  • the identifier of the number of division layers corresponding to the block is the third division layer.
  • the information includes: a flag bit that further divides the transform block of the first partition layer, and a flag bit that further divides the transform block of the second partition layer, where the transform block corresponding to the image block or the prediction block is The transform block of the second partition layer is further divided into transform blocks, and the transform block of the second partition layer is a transform block obtained by further dividing the transform block of the first partition layer.
  • step 502 the number of division layers corresponding to the transform block corresponding to the prediction block in the prediction block may be determined.
  • Step 503 may be: determining, according to the division manner of the image block and the determined number of division layers, the prediction block corresponding to the prediction block. For the specific implementation of the step, refer to the detailed description of the embodiment shown in FIG. 6 , and details are not described herein again. It should be noted that, when the determined transform block corresponding to the prediction block corresponds to the first partition layer in the prediction block, the size of the transform block is the size of the minimum prediction block.
  • Step 504 may be: determining identification information that identifies the number of division layers corresponding to the transformation block corresponding to the prediction block.
  • Step 504 may be: writing identifier information identifying the number of division layers corresponding to the transformation block corresponding to the prediction block into the code stream. And determining, when the at least one transform block corresponding to the prediction block is the Nth partition layer, the identifier of the number of partition layers corresponding to the at least one transform block corresponding to the prediction block.
  • the information includes: identifying a flag bit that is not further divided by the at least one transform block corresponding to the Nth partition layer; when at least one transform block corresponding to the prediction block is in the prediction block When the corresponding number of division layers is greater than the Nth division layer, determining identification information of the number of division layers corresponding to the at least one transformation block corresponding to the prediction block includes: further dividing a transformation block corresponding to the Nth division layer a flag bit, where one transform block corresponding to the Nth partition layer is a previous transform block of the at least one transform block.
  • N is an integer greater than 1, such as 1, 2, 3, 4, 5, and the like.
  • the size of the transform block determined according to the partitioning manner of the image block and the specific partition layer is the smallest when the number of partition layers corresponding to the transform block corresponding to the prediction block is a specific partition layer.
  • the size of the prediction block, wherein the minimum prediction block is the smallest prediction block among the prediction blocks of the determined image block.
  • the specific dividing layer may be the first dividing layer.
  • step 502 the number of division layers corresponding to the transform block corresponding to the image block in the image block is determined.
  • Step 503 is to determine, according to the division manner of the image block and the determined number of division layers, the image block corresponding to the image block.
  • the step refer to the detailed description of the embodiment shown in FIG. 7 , and details are not described herein again.
  • Step 504 may be: determining identification information that identifies a number of division layers corresponding to the transform block corresponding to the image block.
  • Step 504 may be: writing identifier information identifying the number of division layers corresponding to the transform block corresponding to the image block into the code stream.
  • the identifier information that identifies the number of partition layers corresponding to the at least one transform block corresponding to the image block includes: a flag bit further divided by a transform block corresponding to the Nth partition layer, where N is greater than An integer of 1, such as 1, 2, 3, 4, 5, etc.
  • the one transform block corresponding to the Nth partition layer is a previous transform block of the at least one transform block.
  • the size of the transformation block determined according to the division manner of the image block and the first specific division layer Is the size of the image block;
  • the second layer is When the layer is divided, the size of the transform block is determined according to a division manner of the image block and the second specific partition layer, and the minimum prediction block is a prediction block of the determined image block. The smallest size prediction block.
  • the second specific dividing layer is the next first dividing layer of the first specific dividing layer, wherein the first specific dividing layer number may be the first dividing layer, and the second specific dividing layer may be the second dividing layer.
  • the minimum prediction block is the smallest prediction block in the prediction block used by the determined image block, that is, the minimum prediction block is the prediction block in which the horizontal size and/or the vertical size are the smallest among the prediction blocks used by the image block.
  • the embodiment of the present invention considers the division manner of the image block when determining the size of the transform block, and writes the identification information of the number of division layers corresponding to the transform block corresponding to the image block or the prediction block into the code stream, so as to use layer by layer.
  • the method of the identification identifies the size of the transform block, which not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, thereby effectively improving the coding efficiency.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • an embodiment of the present invention provides an image coding method, where the method determines a division level of a transform block used by an image block and a specific size of a transform block used by the image block, and the method specifically includes:
  • the image encoding device searches for a prediction block in the reference image according to a division manner of the image block, where the prediction block is an image block that matches a sub-image block size divided by the image block.
  • the size matching in the embodiments of the present invention may be the same size, or the size difference may be within a predetermined range.
  • the image encoding device obtains residual and motion vector information according to the divided sub-image block and the corresponding prediction block.
  • the residual is the difference between the divided sub-image block and the pixel value of the corresponding pixel of the prediction block; for example, the difference between the divided sub-image block and the brightness value of the corresponding pixel of the prediction block, or the division The difference between the chrominance values of the corresponding pixel points of the sub-image block and the prediction block.
  • the motion vector information indicates a position difference between the divided sub-image block and the prediction block.
  • the image encoding device determines a corresponding number of division layers of the transform block used by the image block in the image block.
  • the size of the transform block corresponding to the first partition layer is the size of the minimum prediction block.
  • the image coding apparatus can traverse the number of division layers that can be used, and determine which division layer number is used to make the transformation effect the best, wherein the first division layer corresponds to The size of the transform block is the size of the smallest prediction block.
  • the image coding apparatus determines a size of the transform block used by the image block according to the division manner of the image block and the determined number of division layers.
  • the image block corresponding to the partitioning mode is Nx2N partitioning
  • the image block is divided into two sub-image blocks of size Nx2N.
  • the size of the prediction block is Nx2N.
  • the first partition in the method of layer-by-layer identification transform size is determined according to the image block dividing manner.
  • the size of the transform corresponding to the layer is Nx2N, that is, the image block is divided into two Nx2N data blocks, and each block uses Nx2N transform blocks, respectively. As shown in FIG.
  • the second size of the image block is Nx2N
  • the further divided transform block is needed, that is, when the changed block of the second divided layer is needed, according to the image block division manner and the number of division layers
  • Determining the size of the transformed block obtained by further transforming the transform block of the Nx2N that is, the size of the transform block of the second partition layer further divided by the transform block of the first partition layer (ie, the transform block of size Nx2N)
  • the horizontal size corresponding to the transform block of the next layer is the same as the horizontal size of the transform block corresponding to the current layer
  • the vertical size corresponding to the transform block of the next layer is half of the vertical size of the transform block corresponding to the current layer, that is, the transform block at this time
  • the size is NxN, where the next layer of transform blocks is the second partition layer, and the current layer is the first partition layer.
  • the image block when the image block is divided into nLx2N partitions, it is assumed that the image block is divided into two sub-image blocks of size 0.5Nx2N and 1.5Nx2N, and the two sub-images at this time 5Nx2N ⁇ 1. 5Nx2N ⁇ The corresponding block size of the block is 0. 5Nx2N and 1. 5Nx2N.
  • the effect of the transform can be made very good, and the size of the transform corresponding to the first partition layer in the method of layer-by-layer identifier transform size is determined according to the image block partition manner.
  • the size of the transform block is the same as the size of the transform block, that is, the size of the transform block is 0. 5Nx2N, that is, the image block is divided into four 0. 5x2N data blocks, and each data block uses a transform of 0. 5x2N.
  • the transformation structure adopted by the nLx2N division method is the same as that of nLx2N. At this time, it can be ensured that the size of the transform does not exceed the prediction block, that is, the transform does not cross the boundary of the prediction block, thereby ensuring the efficiency of the transform. If it is determined that the image block uses the transform block of the first partition layer, the effect of the transform can be made very good. As shown in FIG. 6d, when the second size of the image block is Q.
  • the data block needs to use a further divided transform block, that is, when the transform block of the second partition layer is needed,
  • the transform block of the 0. 5Nx2N is further divided according to the image block division manner and the number of division layers, and the transform block of the first partition layer (ie, the transform block having a size of 0.5Nx2N) is further divided.
  • the size of the transform block of the second partition layer At this time, the horizontal size corresponding to the transform block of the next layer is the same as the horizontal size of the transform block corresponding to the current layer, and the vertical dimension corresponding to the transform block of the next layer is the corresponding layer of the current layer.
  • the transform block has a size of 0. 5NxO. 5N , where the next layer of the transform block is the second partition layer, and the current layer is the first partition layer.
  • the other data blocks that do not use the further divided transform block are still 0. 5Nx2N transform.
  • the image block is divided into two or more sub-image blocks in the horizontal direction by horizontal division, such as 2NxN, 2NxnU, 2NxnD, Nx2N, nRxN, the image block is determined to adopt the transformation structure in the same manner as described above.
  • the number of division layers allowed in a certain division mode, or the minimum allowable transformation size in a certain division manner may be predetermined, wherein the number of division layers allowed in a certain division manner is the division.
  • the maximum number of division layers that can be used can be preset in the codec system.
  • the image coding device and the image decoding device can be preset to use up to two layers; or, image coding
  • the device may also write indication information indicating the maximum number of division layers that can be used in the code stream, so as to notify the image decoding device of the maximum number of division layers that can be used; wherein, the minimum transformation size allowed in a certain division mode is the division.
  • the size of the transform block corresponding to the highest number of layers allowed in the mode that is, setting the minimum transform block size in the image encoding device and the image decoding device, such as presetting the Nx2N image block partition mode in the image encoding device and the image decoding device
  • the minimum allowable transform block size is NxN, and the nLx2N image block partition mode is preset.
  • the minimum transform block size is 0. 5NxO. 5N; or, the image encoding device writes indication information indicating the minimum transform block size allowed in the code stream, so as to notify the image decoding device of the minimum transform block size allowed to be used, such as in the code. 5N ⁇
  • the stream is written in the Nx2N image block partition mode, the minimum transform block size is NxN, and the minimum value of the transform block size is 0. 5NxO. 5N.
  • the image coding apparatus determines identification information of the number of division layers corresponding to the transform block used by the identifier image block.
  • the identifier information for determining the number of division layers corresponding to the transform block corresponding to the identifier image block includes: 2 bits, and the value of the bit is the first specific value, for example, 1 for indicating the pair
  • the Nx2N transform block corresponding to a partition layer is not further divided; for FIG.
  • the identifier information for determining the number of partition layers corresponding to the transform block corresponding to the identifier image block includes: 2 bits, corresponding to the bit of the left Nx2N block
  • the value of the first specific value, for example, 1 is used to indicate that the Nx2N transform block corresponding to the first partition layer is not further divided
  • the value of the bit corresponding to the right Nx2N block is a second specific value, such as 0, for It is indicated that the Nx2N transform block corresponding to the first partition layer needs to be further divided.
  • the identifier information for determining the number of division layers corresponding to the transform block corresponding to the identifier image block includes: 4 bits, and the value of the bit is the first specific value, for example, 1 for indicating The 0.5Nx2N transform block corresponding to the first partition layer is not further divided; for FIG.
  • the identifier information for determining the number of partition layers corresponding to the transform block corresponding to the identifier image block includes: 4 bits, corresponding to the first and third bits
  • the value of the bits of the four 0.5Nx2N transform blocks is a first specific value, such as 1, for indicating that the three 0.5Nx 2N transform blocks are not further divided, corresponding to the bits of the second 0.5Nx2N transform block.
  • the value is a second specific value, such as 0, to indicate that further partitioning is required for this 0.5Nx 2N transform block.
  • the image coding apparatus transforms the residual of the image block by using a corresponding transform block, and then performs quantization, and encodes the quantized value.
  • the image coding apparatus writes the identification information of the division layer number corresponding to the transformation block corresponding to the prediction block, the coding result of step 606, and the indication information indicating the image block division manner into the code stream, and transmits the code stream.
  • the above embodiment of the present invention considers the division manner of the image block when determining the size of the transform block used by the image block, and writes the identification information of the number of division layers in which the transform block used for the image block is located to the code stream, so as to use layer by layer.
  • the method of the identification identifies the size of the transform block, which not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, thereby effectively improving the coding efficiency.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • an embodiment of the present invention provides another image encoding method, which takes into account the jump of the boundary of the two sub-image blocks when the residual values obtained when the two sub-image blocks into which the image block is divided are small.
  • the phenomenon is not obvious.
  • the transform block used by the image across the boundary of the sub-image block does not significantly cause the conversion efficiency to be deteriorated, and the number of coded bits required for identifying a larger-sized transform is smaller than that for the logo.
  • the size is changed, so it may be better to use a larger size transform for the image block.
  • the large-size transform and the small-size transform are combined by using a layer-by-layer identification method, and the embodiment specifically includes:
  • Steps 701-702 are the same as steps 601-602, and are not described herein again. 703.
  • the image encoding device determines a corresponding number of division layers of the transform block used by the image block in the image block.
  • the specific implementation of the step is similar to the step 603, except that: the size of the transform block corresponding to the first partition layer is the size of the image block, that is, 2N x2N; the size of the transform block corresponding to the second partition layer is the minimum prediction. The size of the block.
  • the image encoding device determines a size of the transform block used by the image block according to the division manner of the image block and the determined number of division layers.
  • the size of the transform block used by the image block is determined to be similar to the step 604 according to the manner in which the image block is divided and the determined number of partition layers. The difference is: the transform corresponding to the first partition layer in this embodiment.
  • the size of the block is 2Nx2N, and the size of the transform block corresponding to the second partition layer in this embodiment is equivalent to the size of the transform block corresponding to the first partition layer in the foregoing embodiment.
  • the transform block corresponding to the third partition layer The size corresponds to the size of the transform block corresponding to the second partition layer in the above embodiment, and so on.
  • the image block adopts the division mode of nLx2N, as shown in FIG. 7a, if it is determined in step 703 that the transform block of 2Nx2N is used, the effect of the transform can be made good, and the transform block corresponding to the first partition layer of the image block at this time is used.
  • the size is 2Nx2N, and the transform block can cross the sub-image block boundary; when the image encoding device determines the transform block using the second partition layer, the second partition layer used by the image block is determined according to the division manner of the image block and the number of division layers.
  • the size of the transform block is 0. 5Nx2N, and the image block is divided into four 0.
  • 5Nx2N data blocks each block uses a transform block of 0.5Nx2N, as shown in FIG. 6b.
  • the two 0. 5Nx2N are determined according to the image block division mode and the number of division layers.
  • the horizontal size of the transform block obtained by further transforming the transform block is the same as the horizontal size of the transform block corresponding to the second partition layer, and the vertical size is a quarter of a vertical vertical of the transform block corresponding to the second partition layer.
  • 5NxO. 5N Transformation block The data block of the fourth and the 0. 5x2N is divided into four 0. 5NxO. 5N blocks, each block uses 0. 5NxO. 5N transform block.
  • the image encoding device determines identification information of the number of division layers in which the transform block used to identify the image block is located.
  • the identifier information for determining the number of division layers corresponding to each transform block corresponding to the identifier prediction block includes one bit, and the value is a first specific value, such as 1, for indicating that the first partition layer is corresponding.
  • the transform block ie, the 2 ⁇ 2 ⁇ transform block
  • the identifier information of the partition layer corresponding to each transform block corresponding to the prediction block includes two layers of indication information, and the indication information of the first layer includes 1 bit.
  • the block change (ie, the 2Nx2N transform block) needs to be further divided to obtain four transform blocks of the second partition layer; the indication information of the second layer includes 4 bits, and the values thereof are 1, respectively, indicating that the four second partition layers are The transform block does not need to be further divided.
  • the indication information of the second layer includes 4 bits, and the values thereof are 1, respectively, indicating that the four second partition layers are The transform block does not need to be further divided.
  • the identifier information of the number of partition layers corresponding to each transform block corresponding to the prediction block includes at least two layers of indication information, and the indication information of the first layer includes one bit, and the value thereof is The second specific value, such as 0, is used to indicate that the transform block corresponding to the first partition layer (ie, the 2Nx2N transform block) needs to be further divided to obtain four transform blocks of the second partition layer (ie, 0.5NX2N transform block);
  • the indication information includes 4 bits, and the values of the 2nd and 3rd bits are 1, indicating that it is not necessary to further divide the two transform blocks in the middle of the figure; the values of the first and fourth bits are 0, indicating that the map needs to be
  • the two transform blocks on both sides are further divided to obtain four transform blocks of the third partition layer (ie, 0.5Nx0.5N transform blocks).
  • the corresponding prediction block is identified.
  • the identification information of the number of division layers corresponding to the transformation block only includes two layers of indication information. Otherwise, the identification information further includes indication information of the third layer, and the indication information of the third layer is used to represent the four third division layers. Whether the transform block still needs further division.
  • the image coding device transforms the residual of the image block by using a corresponding transform block, and then performs quantization, and encodes the quantized value.
  • the image coding apparatus writes the identification information of the number of division layers in which the transformation block used for the image block is located, the coding result of step 706, and the indication information indicating the manner of dividing the image block into the code stream, and transmits the code stream.
  • the above embodiment of the present invention considers the division manner of the image block when determining the size of the transform block used by the image block, and writes the identification information of the number of division layers in which the transform block used for the image block is located to the code stream, so as to use layer by layer.
  • the method of the identification identifies the size of the transform block, which not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, thereby effectively improving the coding efficiency.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • the size of the corresponding transform block corresponding to the transform block corresponding to the image block or the prediction block according to the image block division manner is specifically described as follows:
  • the size of the corresponding transform block is obtained by looking up the table:
  • the first method determining a division manner of the image block and a transformation block size corresponding to the number of division layers by using a preset image block division manner and a correspondence between the number of division layers and the transformation block size.
  • the number of division layers is the number of division layers corresponding to the image block or the transformation block corresponding to the prediction block, as shown in Table 1 below.
  • Table 1 The correspondence between the image block division method and the number of division layers and the size of the transformation block.
  • the second method is: determining, by using a preset image block division manner, a correspondence between the number of division layers and a ratio of the first type of size, determining a division ratio of the image block and a first type size ratio corresponding to the number of division layers, wherein The number of division layers is the number of division layers corresponding to the transformation block corresponding to the image block or the prediction block, and then determines the size of the transformation block corresponding to the image block or the prediction block according to the determined first type size ratio and the size of the image block, where
  • the first type of size ratio includes: a ratio of a horizontal size of the transform block corresponding to the image block or the prediction block to a horizontal size of the image block, and a ratio of a vertical size of the transform block corresponding to the image block or the prediction block to a vertical size of the image block,
  • the following table 2 shows the correspondence relationship between the image block division manner and the division layer number and the ratio of the horizontal size of the transform block to the horizontal size of the image block, and the following describes the image
  • the third method determining a division ratio of the image block and a second type size ratio corresponding to the number of division layers by using a preset image block division manner, a division layer number, and a second type size ratio correspondence,
  • the number of division layers is the number of division layers corresponding to the transformation block corresponding to the image block or the prediction block, and then determining the transformation block corresponding to the image block or the prediction block according to the determined size ratio of the second type size and the size of the prediction block.
  • the second type of size ratio includes: a ratio of a horizontal size of the transform block corresponding to the image block or the prediction block to a horizontal size of the prediction block, and a vertical size of the transform block corresponding to the image block or the prediction block and a vertical size of the prediction block.
  • the ratio of the second type of size ratio may specifically include: a ratio of the horizontal size of the transform block corresponding to the image block or the prediction block to the horizontal size of the minimum prediction block, and the image block or the prediction block. And a ratio of a vertical size of the corresponding transform block to a vertical size of the minimum prediction block; and then determining a size of the transform block corresponding to the image block or the prediction block according to the determined second type size ratio and the size of the minimum prediction block.
  • Table 4 shows the correspondence between the image block division mode and the number of division layers and the ratio of the horizontal size of the transformation block to the horizontal size of the minimum prediction block.
  • Table 5 shows the image block division method and the division layer number. Correspondence between the vertical dimension of the transform block and the vertical dimension of the smallest predictor block.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • Another embodiment of the present invention provides an image encoding method, which differs from the above two embodiments mainly in that: This embodiment uses a layer-by-layer identification method in units of prediction blocks.
  • Steps 801-802 are the same as steps 601-602, and are not described herein again. 803.
  • the image coding device determines a corresponding number of division layers of the transform block corresponding to the prediction block in the prediction block.
  • the size of the transform block corresponding to the first partitioning level is the size of the minimum prediction block.
  • step 603 The specific implementation of this step is similar to that of step 603, and details are not described herein.
  • the image coding apparatus determines a size of the transform block corresponding to the prediction block according to the division manner of the image block and the determined number of division layers.
  • the image block corresponding to the partitioning mode is Nx2N partitioning
  • the image block is divided into two sub-image blocks of size Nx2N.
  • the size of the prediction block is Nx2N.
  • the two prediction block corresponding transform blocks are transform blocks of the first partition layer, and the transform block size adopted by the two prediction blocks is Nx 2N, and then the split flag identifier is respectively set for the two prediction blocks.
  • the first partitioning layer is used. As shown in FIG.
  • the partitioning layer of the transforming block corresponding to the prediction block on the left side of the image block is still the first partitioning layer
  • the partitioning layer of the transforming block corresponding to the right-most predicting block is the second partitioning layer. Therefore, the transform block size used by the left prediction block is still Nx2N
  • the transform block size used by the right prediction block is determined to be NxN according to the number of division layers (second division layer) and the image block division manner (Nx2N), and the left and right sides are respectively set subsequently.
  • the partitioning flag of the prediction block is used to identify the left prediction block using the first layer partition, and the right prediction block uses the second partition layer; as shown in FIG.
  • the partition layer of the transform block corresponding to the prediction block on the left side of the image block is still For the first partition layer, the partition layer of the transform block corresponding to the right prediction block is the third partition layer, so the transform block size used by the left prediction block is still Nx2N, right
  • the transform block size used by the prediction block is determined to be 0. 5NxO. 5N according to the number of division layers (third partition layer) and the image block division manner (Nx2N), and the division flags of the left and right prediction blocks are respectively set to identify the left prediction.
  • the block uses the first layer partition, and the right prediction block uses the third layer partition.
  • the image coding device determines identification information of the number of division layers corresponding to the transformation block corresponding to the prediction prediction block.
  • the identification information for determining the number of division layers corresponding to the transform block corresponding to the left prediction block includes: 1 bit, and the value of the bit is a first specific value, such as 1, for indicating the first
  • the Nx2N transform block corresponding to the partition layer is not further divided
  • the identifier information for determining the number of partition layers corresponding to the transform block corresponding to the right prediction block includes: 1 bit, and the value of the bit is the first specific value, used to represent The Nx2N transform block corresponding to the first partition layer is not further divided; as shown in FIG. 8b, the identifier information of the number of partition layers corresponding to the transform block corresponding to the left prediction block is the same as that of FIG.
  • the identification information of the number of division layers corresponding to the transform block includes: 1 bit, and the value of the bit is a second specific value, which is used to indicate further division of the Nx2N transform block corresponding to the first partition layer; as shown in FIG.
  • the identification information for determining the number of division layers corresponding to the transformation block corresponding to the right prediction block includes: two layers of indication information, the first layer indication information includes: 1 bit, the value of the bit is a second specific value, The Nx2N transform block corresponding to the first partition layer is further divided to obtain two transform blocks of the second partition layer (the size is NxN); the second layer indication information includes: 2 bits, which are used to represent two The transform block of the two partition layers is further divided, so that it can be expressed that the right prediction block uses the transform block that obtains the third partition layer.
  • the image coding device transforms the residual of the image block by using a corresponding transform block, and then performs quantization, and encodes the quantized value.
  • the image coding apparatus writes the identification information of the number of division layers in which the transformation block corresponding to the prediction block is located, the coding result of step 806, and the indication information indicating the division manner of the image block into the code stream, and transmits the code stream.
  • the foregoing embodiment of the present invention considers the division manner of the image block when determining the size of the transformation block corresponding to the prediction block, and writes the identification information of the number of division layers in which the transformation block corresponding to the prediction block is located into the code stream, so as to use layer by layer.
  • the method of the identification identifies the size of the transform block, which not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, thereby effectively improving the coding efficiency.
  • an embodiment of the present invention provides an image decoding method, where the method specifically includes:
  • the execution subject of each step of the embodiment is an image decoding device.
  • the image decoding device obtains the division mode of the image block from the code stream transmitted by the image coding device, that is, the resolution code stream obtains the division manner of the image block.
  • the division manner of the image block may be divided into: a division manner of the nLx2N and a division manner of the 2NxnL.
  • the step of determining the prediction block used by the image block according to the division manner of the image block in the step specifically includes: determining the size of the prediction block used by the image block according to the division manner of the image block.
  • the parsing code stream obtains identification information that identifies a corresponding number of layers of the transform block corresponding to the image block or the prediction block in the image block or the prediction block, and determines the image block or the prediction block according to the identifier information. a corresponding number of division layers of the corresponding transform block in the image block or the prediction block; wherein the transform block corresponding to the image block or the prediction block includes one or more transform blocks.
  • the step of the method includes: when the identifier information includes: an identifier for indicating that the transform block corresponding to the Nth partition layer is not further divided, the image decoding device determines, according to the identifier information, that the image block or the prediction block corresponds to The at least one transform block has a corresponding number of partition layers in the image block or the prediction block as an Nth partition layer; and when the identifier information includes: an identifier for indicating further partitioning of at least one transform block corresponding to the Nth partition layer The image decoding device determines, according to the identifier information, that the number of partition layers corresponding to the at least one transform block corresponding to the image block or the prediction block in the image block or the prediction block is greater than the Nth partition layer.
  • the specific process of determining, according to the identifier information, the corresponding number of layers of the transform block corresponding to the prediction block in the prediction block includes:
  • N is equal to M-1
  • the value of the bit in the Nth layer indication information is the first specific value, determining that the number of division layers corresponding to the transform block corresponding to the bit is the Nth division layer
  • the value of the bit in the Nth layer indication information is the second specific value, determining that the number of division layers corresponding to the transform block corresponding to the bit is the Mth division layer; wherein, M is a predetermined division layer Number or the number of division layers corresponding to the predetermined minimum transform block; where N is greater than or equal to 1;
  • the N is less than M-1
  • determining that the number of division layers corresponding to the transform block corresponding to the bit is the Nth division layer
  • the value of the bit in the Nth layer indication information is the second specific value, continue to read the next layer of indication information from the identification information until the M-1 layer indication information is read or read.
  • the value to all the bits is the N+a layer indication information of the first specific value, wherein the N+a is less than or equal to M.
  • the number of bits in the Nth layer indication information is a minimum prediction in the prediction block.
  • the number of bits in the first layer indication information is one;
  • the number of bits in the layer 2 indication information is the number of the smallest prediction blocks in the image block.
  • the embodiment of the present invention considers the division manner of the image block when determining the size of the transform block, and writes the identification information of the number of division layers corresponding to the transform block corresponding to the image block or the prediction block into the code stream, so as to use layer by layer.
  • the method of the identification identifies the size of the transform block, which not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, thereby effectively improving the coding efficiency.
  • an embodiment of the present invention provides an image decoding method, where the image decoding method corresponds to the image encoding method shown in FIG.
  • the image decoding device parses the indication information of the division manner of the image block in the code stream, and obtains a division manner of the image block according to the instruction information.
  • the division manner of the image block may be an Nx2N division manner or an nLx2N division manner.
  • the image decoding device searches for a prediction block in a reference image according to a division manner of the image block, where the prediction block is an image block that matches a sub-image block size divided by the image block.
  • the image decoding device parses the code stream to obtain identification information of the number of division layers corresponding to the transform block used by the identifier image block in the image block, and determines, according to the identifier information, a transform block used by the image block in the image block. Divide the number of layers.
  • the size of the transform block corresponding to the first partition layer is the size of the minimum prediction block.
  • step 1003 and step 1004 include:
  • the image decoding device determines, according to the division manner, the number of bits of the first layer indication information in the identification information, that is, the number of the smallest prediction block in the image block is the number of bits of the first layer indication information, when the image block division mode is Nx2N Determining the number of bits of the first layer indication information is 2; when the image block division mode is nLx2N, for example, dividing the image block into two sub-image blocks of 0.5Nx2N and 1.5Nx2N, the number of bits of the first layer indication information
  • the first layer indicates that the transform block size corresponding to the information identifier image block is not divided into smaller sizes, it is determined that the number of partition layers corresponding to the current image block is the first partition layer, and when the image block partition mode is Nx2N 5Nx2N, ⁇
  • the size of the transform block corresponding to the image block is Nx2N, that is, the size of the transform block corresponding to the first partition layer is consistent with the size of the prediction block; when the image block
  • 5Nx2N that is, the first The transform block size corresponding to the partition layer and the smallest prediction block size in the prediction block Inconsistent.
  • the first layer indication information identifies that the transform block size of some first partition layers is divided into smaller sizes
  • the number of partition layers is added to the current partition layer number, that is, the number of partition layers becomes the second partition layer.
  • the image block division mode is Nx2N
  • the transform block size of the second partition layer corresponding to the image block is NxN, that is, the horizontal size corresponding to the next layer transform block is the same as the horizontal size of the transform block corresponding to the current layer, and the next The size of the transform block of the next layer is 0. 5NxO.
  • the horizontal size corresponding to the next layer of the transform block is the same as the horizontal size of the transform block corresponding to the current layer
  • the vertical size corresponding to the next layer of the transform block is one quarter of the vertical size of the transform block corresponding to the current layer, as shown in the figure. Shown in 6d.
  • the coding and decoding device can be configured to be the same as the coding end, and the specific implementation manner is the same as that of the coding end. .
  • the manner of determining the size of the transform block used by the image block according to the manner of dividing the image block and the number of the divided layers is the same as the method described in the foregoing fourth embodiment, and details are not described herein.
  • the embodiment of the present invention considers the division manner of the image block when determining the size of the transform block used by the image block, and writes the identification information of the number of division layers corresponding to the transform block used by the image block into the code stream, so as to use
  • the method of layer identification identifies the size of the transform block, which not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, thereby effectively improving the coding efficiency.
  • an embodiment of the present invention provides an image decoding method, which corresponds to the image encoding method shown in FIG. 7, and specifically includes:
  • Steps 1111-1102 are the same as steps 1001-1002, and are not described herein again.
  • Step 1113 The image decoding device parses the code stream to obtain identification information of the number of transform block partition layers used by the identifier image block, and determines, according to the identifier information, a corresponding number of partition layers of the transform block used by the image block in the image block.
  • the first layer indication information is obtained from the identifier information of the transform block partition layer corresponding to the prediction block of the identifier image block, where the first layer indication information includes one bit, that is, the first bit is obtained, according to The value of the first bit determines whether the first partition layer is further divided. If the value of the first bit indicates that the first partition layer is not further divided, the transform block corresponding to the determined image block is one transform block, that is, 2Nx2N.
  • Transform block if the value of the first bit indicates further mapping to the first partition And determining, according to the size of the smallest prediction block in the prediction block of the image block, the number of bits of the second layer indication information in the identification information, for example, the division mode is 0.5Nx2N, and the size of the minimum prediction block is also 0.5Nx2N.
  • the image block of size 2Nx2N corresponds to the transform block of the same size and the smallest prediction block size, so the bit of the second layer indication information is determined to be 4, and the 4 bits are read, if the bit value is the first A specific value, such as 1, indicates that the transform block of the second partition layer is not further divided.
  • the transform block indicating the second partition layer needs to be further divided;
  • the four bits are all the first specific values.
  • the transform block used by the image block has a corresponding number of partition layers in the image block as the second partition layer, that is, each transform block used in the image block is determined.
  • the transform block is further divided to determine that the number of partition layers of the transform blocks corresponding to the second and third of the four bits used by the image block is the second partition layer; the first and fourth bits are the second specific value, indicating The transform block corresponding to the first and fourth bits of the second partition layer is further divided to obtain four transform blocks of the third partition layer.
  • the number of partition layers allowed in the partition mode is three layers, or The minimum transform block size allowed in the partitioning mode is 0. 5NxO. 5N, it is determined that the image block needs to be further divided by the transform block corresponding to the first and fourth of the 4 bits, and the corresponding transform block corresponds to The number of division layers is the third division layer.
  • Step 1104 Determine a size of a transform block used by the image block according to a division manner of the image block and the number of division layers.
  • the size of the transform block corresponding to the first partition layer is the size of the image block, that is, 2N x2N; the size of the transform block corresponding to the second partition layer is the size of the minimum prediction block.
  • the size of the transformation block corresponding to the image block is determined to be 2Nx2N, that is, the size of the transformation block corresponding to the first division layer is consistent with the image block. As shown in FIG. 7a); when the number of division layers corresponding to the image block is the second division layer, when the image block division mode is nLx2N, the image is determined according to the division manner of the image block and the number of division layers (ie, the second division layer) The size of the transform block corresponding to the block is 0.
  • the transform block size of the image block is determined to be 0. 5NxO. 5N, that is, the next layer transform according to the partitioning manner of the image block and the number of layers (ie, the third partition layer).
  • the horizontal size corresponding to the block is the same as the horizontal size of the transform block corresponding to the current layer, and the vertical size corresponding to the next layer of the transform block is one quarter of the vertical size of the transform block corresponding to the current layer, as shown in FIG. 7c).
  • the method for determining the size of the image block in the image block according to the division manner of the image block and the number of the division layer is the same as the method described in the foregoing Embodiment 4, and details are not described herein again.
  • the embodiment of the present invention considers the division manner of the image block when determining the size of the transform block used by the image block, and writes the identification information of the number of division layers of the transform block used by the identifier image block into the code stream, so as to use the layer-by-layer identifier.
  • the method identifies the size of the transform block, which ensures that the transform block does not cross the boundary of the prediction block, and at the same time effectively identifies the size of the transform block, thereby effectively improving the coding efficiency.
  • an embodiment of the present invention provides an image decoding method, which corresponds to the image encoding method shown in FIG. 7.
  • the image decoding device separately parses the partitioning flags corresponding to the two prediction blocks (ie, the corresponding transform blocks corresponding to the identifier prediction block).
  • the identification information of the hierarchical layer is determined according to the division flags of the two prediction blocks respectively, and the number of division layers corresponding to the transformation blocks corresponding to the two prediction blocks is respectively determined, and two according to the division manner of the image block and the determined division layer number respectively The size of the transform block corresponding to the prediction block.
  • an embodiment of the present invention provides an image encoding apparatus, including:
  • a prediction block determining unit 10 configured to determine, according to a division manner of the image block, a prediction block used by the image block;
  • a partitioning level determining unit 20 configured to determine a number of partitioning layers corresponding to the transform block corresponding to the image block or the prediction block in the image block or the prediction block, where the transform block corresponding to the image block or the prediction block includes one Or multiple transform blocks;
  • a transform block size determining unit 30 configured to determine a size of the transform block corresponding to the image block or the prediction block according to a division manner of the image block and the number of division layers;
  • the identification information determining unit 40 is configured to determine identification information that identifies the number of division layers corresponding to the transform block corresponding to the image block or the prediction block;
  • the writing unit 50 is configured to write the identification information into the code stream.
  • the relationship between the transform block size corresponding to the upper partition layer and the transform block size corresponding to the lower partition layer (for example, the transform block size corresponding to the Nth partition layer and the transform block size corresponding to the N+1 partition layer) Relationship, wherein the Nth dividing layer is the upper dividing layer of the (N+1)th layer, the N+1th layer is the lower layer of the Nth layer, and the size of the transform block corresponding to the layer is defined
  • the Nth dividing layer is the upper dividing layer of the (N+1)th layer
  • the N+1th layer is the lower layer of the Nth layer
  • the size of the transform block corresponding to the layer is defined
  • the dividing hierarchy determining unit 20 is configured to determine, when the at least one transform block corresponding to the image block or the prediction block has a corresponding number of partition layers in the image block or the prediction block, is an Nth partition layer,
  • the identification information of the number of division layers corresponding to the at least one transform block corresponding to the image block or the prediction block includes: a flag bit that identifies that the at least one transform block of the Nth partition layer is not further divided; or a partitioning hierarchy determining unit 20, configured to determine, when the image block or the at least one transform block corresponding to the image block or the prediction block, has a corresponding number of partitioning layers in the image block or the prediction block that is greater than the Nth partitioning layer,
  • the identification information of the number of division layers corresponding to the at least one transform block corresponding to the prediction block includes: a flag bit further divided by the transform block corresponding to the Nth partition layer.
  • the transform block size determining unit 30 is configured to query a partitioning manner of the image block and a transform block size corresponding to the number of the layered layers, where a specific correspondence relationship may be as shown in Table 1;
  • the transform block size determining unit 30 is configured to query a partitioning manner of the image block and a first type of size ratio corresponding to the number of divided layers; wherein, the first type of size ratio includes: the image block Or a ratio of a horizontal size of the transform block corresponding to the prediction block to a horizontal size of the image block and a ratio of a vertical size of the transform block corresponding to the image block or the prediction block to a vertical size of the image block; according to the first type size ratio Determining, by the horizontal size and the vertical size of the image block, a transform block size corresponding to the image block or the prediction block, wherein the specific correspondence may be as shown in Table 2 and Table 3;
  • the transform block size determining unit 30 is configured to query a dividing manner of the image block and a second type size ratio corresponding to the number of dividing layers; and the second type of size ratio includes: the image block or the prediction block a ratio of a horizontal size of the corresponding transform block to a horizontal size of the prediction block and a vertical size of the transform block corresponding to the image block or the prediction block to a vertical size of the prediction block; according to the second type size ratio and the prediction block Determining, by the horizontal size and the vertical size, the transform block size corresponding to the image block or the prediction block, where the second type of size ratio may specifically include: a horizontal size of the transform block corresponding to the image block or the prediction block and a level of the minimum prediction block a ratio of the size to a ratio of a vertical size of the transform block corresponding to the image block or the prediction block to a vertical size of the minimum prediction block; and then determining the image block or the prediction block according to the determined second type size ratio and the size of the minimum prediction block The size of the
  • the embodiment of the present invention considers the division manner of the division manner of the image block when determining the size of the transformation block, and writes the identification information of the division layer number corresponding to the transformation block corresponding to the image block or the prediction block into the code stream.
  • the layer-by-layer identification method it not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, effectively improving the coding efficiency.
  • an embodiment of the present invention provides an image decoding apparatus, including:
  • a prediction block determining unit 60 configured to obtain a division manner of the image block, and determine, according to a division manner of the image block, a prediction block used by the image block;
  • the identification information obtaining unit 70 is configured to obtain, by the parsing code stream, identification information that identifies a corresponding number of layers of the transform block corresponding to the image block or the prediction block in the image block or the prediction block;
  • a partitioning level determining unit 80 configured to determine, according to the identifier information, a number of partitioning layers corresponding to the transform block corresponding to the image block or the prediction block in the image block or the prediction block; where the image block or the prediction block corresponds to The transform block includes one or more transform blocks;
  • the transform block size determining unit 90 is configured to determine a size of the transform block corresponding to the image block or the prediction block according to a division manner of the image block and the number of division layers.
  • the identifier information includes: an identifier for indicating that the transform block corresponding to the Nth partition layer is not further divided; wherein the partition level determining unit is configured to determine the image block or according to the identifier information And the at least one of the transform blocks corresponding to the block of the prediction block is the Nth partition layer in the image block or the prediction block; or the identifier information includes: An identifier that is further divided by the at least one transform block, the partitioning level determining unit, configured to determine, according to the identifier information, that at least one transform block in the transform block corresponding to the image block or the prediction block is in the image block or the prediction block The corresponding number of division layers is larger than the Nth division layer.
  • transform block size determining unit 90 The structure and function of the transform block size determining unit 90 are similar to those of the transform block size determining unit 30 in the image encoding apparatus, and will not be described herein.
  • the embodiment of the present invention considers the division manner of the division manner of the image block when determining the size of the transformation block, and writes the identification information of the division layer number corresponding to the transformation block corresponding to the image block or the prediction block into the code stream.
  • the layer-by-layer identification method it not only ensures that the transform block does not cross the boundary of the prediction block, but also effectively identifies the size of the transform block, thereby effectively improving the coding and decoding efficiency.
  • transforms usually contain different transform types, such as two-dimensional transforms. That is, a data block is horizontally transformed and then vertically transformed, and the two-dimensional transform is widely applied to a video codec system.
  • one-dimensional horizontal transformation can also be used, that is, only horizontal transformation of the data block; or one-dimensional vertical transformation, that is, only vertical transformation of the data block; or no transformation, That is, the data block is not processed, and quantization and entropy coding are directly performed.
  • Content with horizontal textures is generally more suitable for horizontal transformations, and content with vertical textures is more suitable for vertical transformations.
  • the image block division mode can also reflect the image texture information, for example, the image block adopting the horizontal division mode has a horizontal texture, and the image block adopting the vertical division mode has a vertical texture, so the division mode of the image block can be used in combination with the transformation type. .
  • the two-dimensional transform is still used when the number of transform layers is the first specific partition layer, and the horizontal or vertical transform is used according to the image block partitioning mode when the number of transform layers is the second specific transform layer.
  • the first specific dividing layer is the 0th layer
  • the second specific dividing layer is the 1st layer
  • the first specific dividing layer and the second specific dividing layer can be changed according to the video codec information.
  • Step 1201 Obtain a division mode of the image block.
  • Step 1202 Obtain a corresponding number of division layers of the transform block in the image block
  • Step 1203 When the number of division layers is 0, the transformation type corresponding to the image block is a two-dimensional transformation, that is, horizontal and vertical transformation.
  • Step 1204 When the number of division layers is 1, when the image block adopts horizontal division, the transformation type corresponding to the image block is horizontal transformation, and when the image block adopts vertical division, the transformation type corresponding to the image block is vertical transformation.
  • Embodiment of the present invention provides a network system including an image encoding apparatus and image decoding apparatus, wherein the structure and function of the image coding apparatus 12 shown embodiment the same embodiment; structure and function, and the image decoding apparatus of FIG. 13 The embodiment is the same and will not be described again.

Landscapes

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

Description

图像编解码方法、 图像编解码设备及网络系统
技术领域
本发明涉及通信技术领域, 特别涉及一种图像编解码方法、 图像编解码设 备及网络系统。 背景技术
为了尽量减少传送视频数据所需要的带宽, 可以采用多种视频压缩方法对 视频数据进行压缩, 其中视频压缩方法包括: 帧内压缩和帧间压缩。 现在多采 用基于运动估计的帧间压缩方法, 具体的, 图像的编码端采用帧间压缩方法对 图像压缩并编码的过程包括: 编码端将待编码图像块划分成若干个大小相等的 子图像块, 然后针对每个子图像块, 在参考图像中搜索与当前子图像块最匹配 的图像块作为预测块, 然后将该子图像块与预测块的相应像素值相减得到残差, 并将该残差经变换与量化后得到的值进行熵编码, 最后将熵编码得到的比特流 和运动矢量信息一并发给解码端, 其中, 运动矢量信息表示当前子图像块与预 测块的位置差。 在图像的解码端, 首先获得熵编码比特流后进行熵解码, 得到 相应的残差, 及相应的运动矢量信息; 然后根据运动矢量信息在参考图像中获 得相应的匹配图像块(即上述预测块), 再根据匹配图像块中各像素点的值和残 差值中对应像素点的值相加得到当前子图像块中各像素点的值。
在现有的视频编解码标准中, 如移动图像专家组(Moving Picture Experts Group, MPEG ) , H.264/AVC (Advanced Video Coding , 增强视频编码), 一个 图像块, 或称为宏块 (macroblock)、 超宏块 (super-macroblock)等, 被划分为若 干子图像块, 这些子图像块的尺寸为 16x16、 16x8、 8x16、 8x8、 8x4、 4x8、 4x4等,子图像块以这些尺寸进行上述的运动估计和运动补偿, 图像的编码端需 要将标识图像块划分方式的码字发送给图像的解码端, 以便图像的解码端获知 图像编码端的划分方式, 并根据该划分方式和运动矢量信息, 确定相应的预测 块。 在现有的视频编解码标准中这些子图像块均为 NXM(N和 M均为大于 0的 整数)的矩形块, 并且 N和 M具有倍数关系。
图像块被划分成子图像块的常用方式有: 2Nx2N划分方式, 图像块只包含 一个子图像块, 即该图像块不被划分成更小的子图像块, 如图 1a所示; 2NxN 划分方式, 将图像块划分成上下两个等大的子图像块, 如图 1b所示; Nx2N划 分方式, 将图像块划分成左右两个等大的子图像块, 如图 1c所示; NxN划分方 式,将图像块划分成四个等大的子图像块,如图 1d所示。上述 N为任意正整数。
此外, 图像块还可以采用非对称划分方式, 如图 2a至图 2d所示。 图 2a 和 2b 所示划分方式将一个图像块划分成上下两个不等大的矩形子图像块, 图 2a所示 2NxnU (其中 n = 0.5N)划分出的两个子图像块中, 上边子图像块两条 变长为 2N和 0.5N, 下边子图像块两条变长为 2N和 1.5N, 其中, 2NxnU中的 U表示图像划分线相对该图像块的垂直平分线上移, 2NxnU表示图像划分线相 对该图像块的垂直平分线上移 n, 其中, n=x*N, 其中 x大于或等于 0并小于或 者等于 1;; 图 2b 所示 2NxnD (其中 n = 0.5N)划分出的两个子图像块中, 上 边子图像块两条变长为 2N和 1.5N, 下边子图像块两条变长为 2N和 0.5N, 其 中, 2NxnD中的 D表示图像划分线相对该图像块的垂直平分线下移, 2NxnD表 示图像划分线相对该图像块的垂直平分线下移 n, 其中, n=x*N, 其中 X大于或 等于 0并小于或者等于 1;。 图 2c和 2d所示划分方式将一个图像块划分成左右 两个不等大的矩形子图像块, 图 2c所示 nLx2N (其中 η = 0.5Ν; ) 划分出的两 个子图像块中, 左边子图像块两条变长为 0.5Ν和 2Ν, 其中, nLx2N中的 L表示 图像划分线相对该图像块的垂直平分线左移, nLx2N表示表示图像划分线相对该 图像块的垂直平分线左移 n, 其中, n=x*N, 其中 X大于或等于 0并小于或者等 于 1; , 右边子图像块两条变长为 1.5N和 2N; 图 2d 所示 nRx2N (其中 n = 0.5 N; ) 划分出的两个子图像块中, 左边子图像块两条变长为 1.5N和 2N, 右边子 图像块两条变长为 0.5N和 2N, nRx2N中的 R表示图像划分线相对该图像块的 垂直平分线右移, nRx2N 表示表示图像划分线相对该图像块的垂直平分线右移 n, 其中, n=x*N, 其中 X大于或等于 0并小于或者等于 1。
在现有的视频编码和解码技术中, 可以使用变换矩阵去除图像块的残差的 相关性, 即去除图像块的冗余信息, 以便提高编码效率, 图像块中的数据块的 变换通常采用二维变换,即在编码端将数据块的残差信息分别与一个 NXM的变 换矩阵及其转置矩阵相乘, 相乘之后得到的是变换系数。 上述步骤可以使用以 下公式描述:
f =T xCxT 其中, C代表数据块的残差信息, T和 T'代表变换矩阵和变换矩阵的转置矩 阵, f代表数据块的残差信息经变换后得到的变换系数矩阵。 其中, 变换矩阵可 以是离散余弦变换 (Discrete Cosine Transform, DCT)矩阵, 整数变换 (Integer Transform)矩阵、 KL变换 (Karhunen Loeve Transform, KLT)矩阵等。其中, KLT 可以更好的考虑图像块或图像块残差的纹理信息, 因此使用 KLT可以达到较好 的效果。 对图像块的残差信息进行上述处理相当于将图像块的残差信息从空域转换 至频域,且经处理后得到的变换系数矩阵 f集中于低频区域; 编码端对图像块的 残差信息进行上述变换之后, 对变换后得到的变换系数矩阵再进行量化、 熵编 码等处理后, 将熵编码得到的比特流发送給解码端。 为了使解码端知道编码端 所采用的变换矩阵类型和尺寸, 通常, 编码端会将表示当前图像块所使用的变 换矩阵的指示信息发送給解码端。
后续解码端根据上述指示信息确定编码端采用的变换矩阵, 根据变换矩阵 的特点(变换矩阵的正交性等), 对编码端发送的比特流进行解码得到变换系数 矩阵, 将变换系数矩阵与变换矩阵及其转置矩阵相乘, 可恢复得到与编码端近 似一致的数据块的残差信息。 上述步骤可以使用以下公式描述:
Figure imgf000005_0001
其中, C代表数据块的残差信息, T和 T'代表变换矩阵和变换矩阵的转置矩 阵, f代表解码端得到的变换系数矩阵。
由于图像块的残差可能存在不同的分布规律, 使用某一特定尺寸的变换矩 阵往往达不到好的变换效果, 因此, 现有技术中会尝试对图像块的残差使用不 同尺寸的变换矩阵(也称为变换块); 因此, 对于一个 2Nx2N 的图像块可以使 用尺寸为 2Nx2N的变换矩阵, 也可以使用尺寸为 NxN的变换矩阵、 或尺寸为 0.5Nx0.5N的变换矩阵。 为了有效地表示图像块如何使用不同尺寸的变换矩阵, 可以使用树形标识方法。 如图 3所示, 当标识图像块使用的变换尺寸时, 码流 中第一层有用于标识图像块是否使用尺寸为 2Nx2N变换矩阵的指示位, 如果图 像块使用尺寸为 2Nx2N变换矩阵(如图 3a所示), 则该指示位为 0; 如果图像 块不使用 2Nx2N变换时, 则该指示位为 1 , 表示需要将尺寸为 2Nx2N变换矩 阵进一步划分成四个尺寸为 NxN的变换矩阵, 并在码流第二层结构中用 4个比 特分别标识每一个尺寸为 NxN的变换矩阵是否进一步划分; 如果图像块使用如 图 3b所示的变换结构时, 4个比特都为 0, 表示每一个尺寸为 NxN的变换矩阵 不再进一步划分; 当选用如图 3c所示的变换结构时, 则 4个比特中有 2个比特 为 0, 2个比特为 1 , 2个比特为 0表示对左下和右上的尺寸为 NxN的变换矩阵 不再进行划分; 2个比特为 1表示需要对左上和右下的尺寸为 NxN的变换矩阵 需要进一步划分, 得到尺寸为 0.5NX0.5N的变换矩阵; 然后在码流第三层结构 中用 4个比特表示是否需要对左上的尺寸为 0.5NX0.5N的变换矩阵进行进一步 划分, 用 4个比特表示是否需要对右下的尺寸为 0.5NX0.5N的变换矩阵进行进 一步划分, 如果图像块使用如图 3c所示的变换结构时, 上述 4 + 4个比特都为 0, 表示不再进一步划分。 通过上述在码流中逐层标识可以有效的及灵活的表示 出图像块和子图像块使用的变换尺寸。
现有技术中使用逐层标识的上述方法中, 变换矩阵的尺寸并没有与预测块 的尺寸关联。 如图 4a)所示, 当 2Nx2N图像块使用非对称划分(划分线如图中粗 实线所示)时, 如果当前图像块使用尺寸为 2Nx2N变换矩阵, 则变换矩阵会跨 过预测块边界; 如果当前图像块使用四个尺寸为 NxN的变换矩阵, 则变换矩阵 仍会跨过预测块边界; 如果当前图像块的左下和右上采用尺寸为 NxN的变换矩 阵, 且当前图像块的左上和右下采用尺寸为 0.5Nx0.5N的变换矩阵时, 当前图 像块的左下的尺寸为 NxN的变换矩阵仍然会跨过预测块边界。
现有技术具有如下缺点:
现有技术中变换矩阵的尺寸并没有与预测块的尺寸关联, 导致变换矩阵会 跨过预测块边界。 由于两个预测块边界对应的残差数据会存在跳跃性的变换, 所以如果变换矩阵跨过了两个预测块的边界则会使变换的作用减弱, 不能有效 的去除图像块的残差的相关性, 不能有效的去除图像块的冗余信息, 降低编码 效率。 发明内容
本发明实施例提供一种图像编解码方法、 图像编解码设备及网络系统, 能 够根据图像块的划分方式确定变换块的尺寸, 保证变换块不会跨过预测块边界。
有鉴于此, 本发明实施例提供: 一种图像编码方法, 包括:
根据图像块的划分方式, 确定所述图像块所使用的预测块;
确定所述图像块或预测块对应的变换块在所述图像块或预测块中对应的划 分层数; 其中, 所述图像块或预测块对应的变换块包括一个或者多个变换块; 根据图像块的划分方式和所述划分层数确定所述图像块或预测块对应的变 换块的尺寸;
确定标识所述图像块或预测块对应的变换块所对应的划分层数的标识信 息;
将所述标识信息写入码流。
一种图像解码方法, 包括:
获得图像块的划分方式, 根据所述图像块的划分方式, 确定所述图像块所 使用的预测块;
解析码流获得标识所述图像块或预测块对应的变换块在所述图像块或预测 块中对应的划分层数的标识信息, 根据所述标识信息, 确定所述图像块或预测 块对应的变换块在图像块或预测块中对应的划分层数; 其中, 所述图像块或预 测块对应的变换块包括一个或者多个变换块;
根据图像块的划分方式和所述划分层数确定所述图像块或预测块对应的变 换块的尺寸。
一种图像编码设备, 包括:
预测块确定单元, 用于根据图像块的划分方式, 确定所述图像块所使用的 预测块;
划分层次确定单元, 用于确定所述图像块或预测块对应的变换块在所述图 像块或预测块中对应的划分层数; 其中, 所述图像块或预测块对应的变换块包 括一个或者多个变换块;
变换块尺寸确定单元, 用于根据图像块的划分方式和所述划分层数确定所 述图像块或预测块对应的变换块的尺寸;
标识信息确定单元, 用于确定标识所述图像块或预测块对应的变换块所对 应的划分层数的标识信息;
写入单元, 用于将所述标识信息写入码流。
一种图像解码设备, 包括: 预测块确定单元, 用于获得图像块的划分方式, 根据所述图像块的划分方 式, 确定所述图像块所使用的预测块;
标识信息获得单元, 用于解析码流获得标识所述图像块或预测块对应的变 换块在所述图像块或预测块中对应的划分层数的标识信息;
划分层次确定单元, 用于根据所述标识信息, 确定所述图像块或预测块对 应的变换块在图像块或预测块中对应的划分层数; 其中, 所述图像块或预测块 对应的变换块包括一个或者多个变换块;
变换块尺寸确定单元, 用于根据图像块的划分方式和所述划分层数确定所 述图像块或预测块对应的变换块的尺寸。
本发明实施例在确定变换块尺寸的时候考虑了图像块的划分方式的划分方 式, 并将标识所述图像块或预测块所对应的变换块对应的划分层数的标识信息 写入码流, 以便使用逐层标识的方法标识变换换的尺寸, 既保证了变换块不会 跨过预测块的边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效
附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例中所需要使 用的附图作筒单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些 实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可 以根据这些附图获得其他的附图。
图 1 a表示划分方式为 2Nx2N的示意图;
图 1 b表示划分方式为 2NxN的示意图;
图 1 c表示划分方式为 Nx2N的示意图;
图 1 d表示划分方式为 NxN的示意图;
图 2a表示划分方式为 2NxnU的示意图;
图 2b表示划分方式为 2NxnD的示意图;
图 2c表示划分方式为 nLx2N的示意图;
图 2d表示划分方式为 n Rx2N的示意图;
图 3a表示图像块使用尺寸为 2Nx2N变换块的示意图;
图 3b表示图像块使用 4个尺寸为 NxN变换块的示意图; 图 3c表示图像块使用尺寸为 NxN变换块和尺寸为 0.5NX0.5N的变换块的示 意图;
图 4a表示非对称划分时图像块使用尺寸为 2Nx2N变换块的示意图; 图 4b表示非对称划分时图像块使用 4个尺寸为 NxN变换块的示意图; 图 4c表示非对称划分时图像块使用尺寸为 NxN变换块和尺寸为 0.5NX0.5N 的变换块的示意图;
图 5是本发明实施例一提供的一种图像编码方法流程图;
图 6是本发明实施例二提供的一种图像编码方法流程图;
图 6a表示图像块使用尺寸为 Nx2N变换块的示意图;
图 6b表示图像块使用尺寸为 0.5NX2N变换块的示意图;
图 6c表示图像块使用尺寸为 Nx2N和 NxN变换块的示意图;
图 6d表示图像块使用尺寸为 0.5x2N和 0.5Nx0.5N变换块的示意图; 图 7是本发明实施例三提供的一种图像编码方法流程图;
图 7a表示图像块使用尺寸为 2Nx2N变换块的示意图;
图 7b表示图像块使用尺寸为 0.5NX2N变换块的示意图;
图 7c表示图像块使用尺寸为 0.5Nx2N和 0.5Nx0.5N变换块的示意图; 图 8是本发明实施例五提供的一种图像编码方法流程图;
图 8a表示两个预测块对应 Nx2N变换块的示意图;
图 8b表示左边预测块对应 Nx2N变换块、 右边预测块对应 NxN变换块的示意 图;
图 8c表示左边预测块对应 Nx2N变换块、 右边预测块对应 0.5x0.5N变换块的 示意图;
图 9是本发明实施例六提供的一种图像解码方法流程图;
图 10是本发明实施例七提供的一种图像解码方法流程图;
图 11是本发明实施例八提供的一种图像解码方法流程图;
图 12是本发明一实施例提供的图像编码设备结构图;
图 13是本发明一实施例提供的图像解码设备结构图。 具体实施方式
实施例一: 参阅图 5 , 本发明实施例提供一种图像编码方法, 该方法具体包括:
501、 根据图像块的划分方式, 确定所述图像块所使用的预测块。
其中, 该实施例的各步骤可以由图像编码设备执行。
其中,图像块的划分方式可以分为: nLx2N的划分方式和 2NxnL的划分方式。 其中, nLx2N的划分方式属于垂直划分, 比如, 将图像块划分成 0.5NX2N的子图 像块和 1 .5Nx2N的子图像块; 其中, 2NxnL的划分方式属于水平划分, 比如将图 像块划分成 2Nx0.5N的子图像块和 2Nx1 .5N的子图像块。 其中, 该步骤中根据图 像块的划分方式, 确定所述图像块所使用的预测块具体包括: 根据图像块的划 分方式, 确定所述图像块所使用的预测块的尺寸。 其中, 预测块的尺寸与所划 分成的子图像块的尺寸相同。
502、 确定所述图像块或预测块对应的变换块在所述图像块或预测块中对应 的划分层数; 其中, 所述图像块或预测块对应的变换块包括一个或者多个变换 块。
其中, 本发明各实施例中, 所述图像块对应的变换块是该图像块所采用的 变换块; 所述预测块对应的变换块是: 与所述预测块尺寸匹配的子图像块所采 用的变换块。 其中, 所述图像块或预测块对应的变换块在所述图像块或预测块 中对应的划分层数为所述图像块或预测块对应的变换块在所述图像块或预测块 中使用的划分层数。
503、 根据图像块的划分方式和所述划分层数确定所述图像块或预测块对应 的变换块的尺寸。 其中, 所述划分层数是所述图像块或预测块对应的变换块所 对应的划分层数。
其中, 当所述图像块(或预测块)对应的至少一个变换块在所述图像块(或 预测块) 中对应的划分层数是第 N+1划分层时, 所述至少一个变换块的水平尺 寸小于第 N划分层对应的变换块的水平尺寸; 和 /或所述至少一个变换块的垂直 尺寸小于第 N划分层对应的变换块的垂直尺寸。
其中,所述至少一个变换块的水平尺寸小于第 N划分层对应的变换块的水平 尺寸具体为:所述至少一个变换块的水平尺寸为第 N划分层对应的变换块的水平 尺寸的 1/1¾ , 其中, 1¾大于或者等于 2; 其中, 所述至少一个变换块的垂直尺寸 小于第 N划分层对应的变换块的垂直尺寸具体为:所述至少一个变换块的垂直尺 寸为第 N划分层对应的变换块的垂直尺寸的 l/m2, 其中, m2大于或者等于 2。 其 中, 1¾和1¾可以相等, 也可以不相等。
504、 确定标识所述图像块或预测块对应的变换块所对应的划分层数的标识 信息。
具体的, 当所述图像块或预测块对应的一个变换块在所述图像块或预测块 中对应的划分层数为第 1划分层, 所述标识所述图像块或预测块对应的该变换 块所对应的划分层数的标识信息包括: 标识对第 1 划分层的变换块不进一步划 分的标志位; 当所述图像块或预测块对应的一个变换块在所述图像块或者预测 块中对应的划分层数为第 2 划分层时, 所述标识所述图像块或预测块对应的该 变换块所对应的划分层数的标识信息包括: 标识对第 1 划分层的变换块进一步 划分的标志位, 其中, 所述图像块或预测块对应的该变换块是所述第 1 划分层 的变换块进一步划分得到的变换块; 当所述图像块或预测块对应的一个变换块 在所述图像块或者预测块中对应的划分层数为第 3 划分层时, 所述标识所述图 像块或预测块对应的该变换块所对应的划分层数的标识信息包括: 标识对第 1 划分层的变换块进一步划分的标志位, 和, 标识对第 2 划分层的变换块进一步 划分的标志位, 其中, 所述图像块或预测块对应的该变换块是所述第 2 划分层 的变换块进一步划分得到的变换块, 第 2划分层的变换块是对所述第 1划分层 的变换块进一步划分得到的变换块。
505、 将所述标识信息写入码流。
可选的, 在一种实施方式中:
步骤 502中可以是确定所述预测块对应的变换块在所述预测块中对应的划 分层数; 步骤 503可以是根据图像块的划分方式和所确定的划分层数确定所述预 测块对应的变换块的尺寸, 该步骤具体的实现方式参见后续图 6所示实施例的详 细描述, 在此不再赘述。 需要说明的是, 当所确定的所述预测块对应的变换块 在所述预测块中对应的划分层数为第一划分层时, 该变换块的尺寸是最小预测 块的尺寸。步骤 504可以是确定标识所述预测块对应的变换块对应的划分层数的 标识信息; 步骤 504可以是将标识所述预测块对应的变换块对应的划分层数的标 识信息写入码流。 其中, 当所述预测块对应的至少一个变换块在预测块中对应 的划分层数为第 N划分层时,确定标识所述预测块对应的所述至少一个变换块对 应的划分层数的标识信息包括:标识对对应所述第 N划分层的所述至少一个变换 块不进一步划分的标志位; 当所述预测块对应的至少一个变换块在所述预测块 中对应的划分层数大于第 N划分层时 ,确定标识所述预测块对应的所述至少一个 变换块所对应的划分层数的标识信息包括:对第 N划分层对应的一个变换块进一 步划分的标志位, 其中, 所述第 N划分层对应的一个变换块是所述至少一个变换 块的上一级变换块。 其中, N为大于 1的整数, 比如可以为 1、 2、 3、 4、 5等。 其 中, 当所述预测块对应的变换块在所述预测块中对应的划分层数为特定划分层 时, 根据图像块的划分方式和所述特定划分层确定的所述变换块的尺寸是最小 预测块的尺寸, 其中, 所述最小预测块为所确定的图像块的预测块中尺寸最小 的预测块。 其中, 特定划分层可以为第一划分层。
可选的, 在另一种实施方式中:
步骤 502中是确定所述图像块对应的变换块在所述图像块中对应的划分层 数; 步骤 503可以是根据图像块的划分方式和所确定的述划分层数确定所述图像 块对应的变换块的尺寸; 该步骤具体的实现方式参见后续图 7所示实施例的详细 描述, 在此不再赘述。 需要说明的是: 当所确定的所述图像块对应的变换块在 所述图像块中对应的划分层数为第一划分层时, 根据图像块的划分方式和所确 定的划分层数确定的变换块的尺寸是所述图像块的尺寸; 当所确定的所述图像 块对应的变换块在所述图像块中对应的划分层数为第二划分层时, 根据图像块 的划分方式和所确定的划分层数确定的变换块的尺寸是最小预测块的尺寸。 步 骤 504可以是确定标识所述图像块对应的变换块对应的划分层数的标识信息; 步 骤 504可以是将标识所述图像块对应的变换块对应的划分层数的标识信息写入 码流。 其中, 当所述图像块对应的至少一个变换块在图像块中对应的划分层数 为第 N划分层时,确定标识所述图像块对应的所述至少一个变换块对应的划分层 数的标识信息包括:标识对所述第 N划分层的所述至少一个变换块不进一步划分 的标志位; 当所述图像块对应的至少一个变换块在所述图像块中对应的划分层 数大于第 N划分层时,确定标识所述图像块对应的所述至少一个变换块所对应的 划分层数的标识信息包括: 对第 N划分层对应的一个变换块进一步划分的标志 位, 其中, N为大于 1的整数, 比如可以为 1、 2、 3、 4、 5等。 其中, 所述第 N划 分层对应的一个变换块是所述至少一个变换块的上一级变换块。 其中, 当所述 图像块对应的变换块在所述图像块中对应的划分层数为第一特定划分层时, 根 据图像块的划分方式和第一特定划分层确定的所述变换块的尺寸是所述图像块 的尺寸; 当所述图像块对应的变换块在所述图像块中对应的划分层数为第二特 定划分层时, 根据图像块的划分方式和所述第二特定划分层确定所述变换块的 尺寸是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块的预测块 中尺寸最小的预测块。 其中, 第二特定划分层是第一特定划分层的下一级划分 层数, 其中, 第一特定划分层数可以是第一划分层, 第二特定划分层可以是第 二划分层。
其中, 所述最小预测块为所确定的图像块所使用的预测块中尺寸最小的预 测块, 即最小预测块为图像块所使用的预测块中水平尺寸和 /或垂直尺寸最小的 预测块。
本发明实施例在确定变换块尺寸的时候考虑了图像块的划分方式, 并将标 识所述图像块或预测块对应的变换块对应的划分层数的标识信息写入码流, 以 便使用逐层标识的方法标识变换块的尺寸, 既保证了变换块不会跨过预测块的 边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效率。
实施例二:
为了使本发明提供的上述技术方案更加清楚,如下两个实施例对本发明上述 技术方案进行详细介绍:
参阅图 6, 本发明实施例提供一种图像编码方法, 该方法确定图像块采用的 变换块所在的划分层次和图像块采用的变换块的具体尺寸, 该方法具体包括:
601、 图像编码设备根据图像块的划分方式, 在参考图像中查找预测块, 所 述预测块是与该图像块所划分成的子图像块尺寸匹配的图像块。
其中,本发明各实施例中的尺寸匹配可以是尺寸相同,或者尺寸相差在预定 范围内。
602、 图像编码设备根据所划分成的子图像块和相应的预测块, 获得残差和 运动矢量信息。
其中, 残差为所划分成的子图像块与预测块相应像素点的像素值的差值; 比如, 所划分成的子图像块与预测块相应像素点的亮度值的差值, 或者所划分 成的子图像块与预测块相应像素点的色度值的差值。 其中, 运动矢量信息表示 所划分成的子图像块与预测块的位置差。
603、 图像编码设备确定图像块采用的变换块在图像块中对应的划分层数。 其中, 第一划分层对应的变换块的尺寸为最小预测块的尺寸。
在视频编码方法中, 当图像编码设备存在多种实现方法时通常会采用遍历 的方法获得最优的编码方式。 即, 本发明各描述图像编码的实施例中, 图像编 码设备可以遍历各种可以使用的划分层数, 确定使用哪种划分层数能够使变换 的效果最好, 其中, 第一划分层对应的变换块的尺寸为最小预测块的尺寸。
604、图像编码设备根据图像块的划分方式和所确定的划分层数确定所述图 像块采用的变换块的尺寸。
比如, 当图像块对应的划分方式为 Nx2N划分时, 图像块被划分成两个大小 为 Nx2N子图像块, 此时, 预测块的大小为 Nx2N。 此时, 如图 6a所示, 如果在 步骤 603 中确定图像块采用第一划分层就能够使变换的效果很好, 根据该图像 块划分方式决定在逐层标识变换尺寸的方法中第一划分层对应的变换的尺寸为 Nx2N , 即图像块被划分成两个 Nx2N的数据块, 每个块分别使用 Nx2N的变换块。 如图 5 c所示, 当图像块的第二个尺寸为 Nx2N的数据块需要使用进一步划分的 变换块时, 即需要使用第二划分层的变化块时, 根据图像块划分方式和划分层 数确定这个 Nx2N的变换块进一步划分所得到的变换块的尺寸, 即对第一划分层 的变换块(即尺寸为 Nx2N的变换块)进一步划分得到的第二划分层的变换块的 尺寸, 此时, 下一层变换块对应的水平尺寸与当前层对应的变换块的水平尺寸 相同, 并且下一层变换块对应的垂直尺寸为当前层对应的变换块的垂直尺寸的 一半, 即此时变换块的尺寸为 NxN , 该处下一层变换块为第二划分层, 当前层为 第一划分层。
再如, 如图 6b所示, 当图像块采用的划分方式为 nLx2N划分时, 假定图像 块被划分成两个大小分别为 0. 5Nx2N和 1. 5Nx2N的子图像块, 此时这两个子图 像块分别对应的预测块大小为 0. 5Nx2N和 1. 5Nx2N。 此时, 如果确定图像块采用 第一划分层的变换块就能够使变换的效果很好, 则根据图像块划分方式决定在 逐层标识变换尺寸的方法中第一划分层对应的变换的尺寸与上述预测块中最小 的预测块尺寸一致,即变换块的尺寸为 0. 5Nx2N ,即图像块被划分成四个 0. 5x2N 数据块, 每个数据块分别使用 0. 5x2N的变换。 nLx2N划分方式采用的变换结构 与 nLx2N—致。 此时, 可以保证变换的尺寸不超过预测块, 即变换不会跨过预 测块的边界, 从而保证变换的效率。 如果确定图像块采用第一划分层的变换块 就能够使变换的效果很好。 又如图 6d所示, 当图像块的第二个尺寸为 Q. 5Nx2N 数据块需要使用进一步划分的变换块时, 即需要使用第二划分层的变换块时, 根据图像块划分方式和划分层数确定这个 0. 5Nx2N 的变换块进一步划分所得到 的变换块的尺寸, 即对第一划分层的变换块(即尺寸为 0. 5Nx2N 的变换块)进 一步划分得到的第二划分层的变换块的尺寸, 此时, 下一层变换块对应的水平 尺寸与当前层对应的变换块的水平尺寸相同, 并且下一层变换块对应的垂直尺 寸为当前层对应的变换块的垂直尺寸的一半, 此时变换块的尺寸为 0. 5NxO. 5N , 该处下一层变换块为第二划分层, 当前层为第一划分层。 其它不采用进一步划 分的变换块的数据块则仍采用 0. 5Nx2N变换。
当图像块采用水平划分方式将图像块沿水平方向划分成两个或多个子图像 块时, 如 2NxN、 2NxnU、 2NxnD、 Nx2N、 nRxN , 图像块确定采用变换结构的方式 与前述相同。
在上述编码过程中, 可以预定某个划分方式下允许的划分层数, 或者预定 的某个划分方式下允许的最小变换尺寸时, 其中, 某个划分方式下允许的划分 层数即是该划分方式下最多可使用的划分层数, 该最多可使用的划分层数可在 编解码系统中预先设定, 比如图像编码设备和图像解码设备预先设定最多可使 用两层划分; 或者, 图像编码设备也可以在码流中写入标识最多可使用的划分 层数的指示信息, 以便通知图像解码设备该最多可使用的划分层数; 其中, 某 个划分方式下允许的最小变换尺寸是该划分方式下允许的最高划分层数所对应 的变换块尺寸, 即在图像编码设备和图像解码设备中设定最小变换块尺寸, 如 在图像编码设备和图像解码设备中预先设定 Nx2N图像块划分模式允许的最小变 换块尺寸为 NxN , 预先设定 nLx2N 图像块划分模式允许的最小变换块尺寸为 0. 5NxO. 5N; 或者, 图像编码设备在码流中写入标识允许的最小变换块尺寸的指 示信息, 以便通知图像解码设备允许使用的最小变换块尺寸, 如在码流中写入 标识 Nx2N图像块划分模式允许的最小变换块尺寸为 NxN的指示信息, 在码流中 写入标识 nLx2N图像块划分模式允许的最小变换块尺寸为 0. 5NxO. 5N的指示信 息。
605、图像编码设备确定标识图像块采用的变换块所对应的划分层数的标识 信息。
具体的, 对于图 6a, 确定标识图像块对应的变换块所对应的划分层数的标 识信息包括: 2个比特位, 比特位的值为均第一特定值, 比如 1 , 用于表示对第 一划分层对应的 Nx2N变换块不再进一步划分; 对于图 6 C , 确定标识图像块对 应的变换块所对应的划分层数的标识信息包括: 2个比特位, 对应左边的 Nx2N 块的比特位的值为第一特定值, 比如 1 , 用于表示对该第一划分层对应的 Nx2N 变换块不再进一步划分,对应右边的 Nx2N块的比特位的值为二特定值, 比如 0 , 用于表示对该第一划分层对应的 Nx2N变换块需要进一步划分。
具体的, 如图 6b所示, 确定标识图像块对应的变换块所对应的划分层数的 标识信息包括: 4个比特位, 比特位的值为均第一特定值, 比如 1 , 用于表示对 第一划分层对应的 0.5Nx2N变换块不再进一步划分; 对于图 6 d , 确定标识图像 块对应的变换块所对应的划分层数的标识信息包括: 4个比特位, 对应第 1、 3、 4个 0.5Nx2N变换块的比特位的值为第一特定值,比如 1 ,用于表示对这 3个 0.5Nx 2N变换块不再进一步划分, 对应第 2个 0.5Nx2N变换块的比特位的值为第二特 定值, 比如 0 , 用于表示对这个 0.5Nx 2N变换块需要进一步划分。
606、 图像编码设备将图像块的残差采用相应的变换块进行变换, 然后进行 量化, 将量化后的值进行编码。
607、图像编码设备将标识预测块对应的变换块所对应的划分层数的标识信 息、 步骤 606的编码结果和表示图像块划分方式的指示信息写入码流, 发送码 流。
本发明上述实施例在确定图像块采用的变换块尺寸的时候考虑了图像块的 划分方式, 并将标识图像块采用的变换块所在的划分层数的标识信息写入码流, 以便使用逐层标识的方法标识变换块的尺寸, 既保证了变换块不会跨过预测块 的边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效率。
实施例三:
参阅图 7 , 本发明实施例提供另一种图像编码方法, 该实施例考虑到当图像 块划分成的两个子图像块做预测时得到的残差值较小时这两个子图像块的边界 的跳跃现象不明显, 此时图像采用的变换块跨过子图像块的边界也不会明显导 致变换效率变差, 并且由于用于标识更大尺寸的变换所需的编码比特数少于用 于标识小尺寸的变换, 故此时图像块采用更大尺寸的变换效果可能会更好。 本 实施例利用逐层标识的方法将大尺寸变换和小尺寸变换相结合, 该实施例具体 包括:
步骤 701-702与步骤 601-602相同, 在此不再赘述。 703、 图像编码设备确定图像块采用的变换块在图像块中对应的划分层数。 该步骤的具体实现方式与步骤 603相似, 不同之处在于: 第一划分层对应 的变换块的尺寸为该图像块的尺寸, 即 2N x2N; 第二划分层对应的变换块的尺 寸为最小预测块的尺寸。
704、图像编码设备根据图像块的划分方式和所确定的划分层数确定所述图 像块采用的变换块的尺寸。
其中, 具体的根据图像块的划分方式和所确定的划分层数确定所述图像块 采用的变换块的尺寸与步骤 604相似, 所不同之处在于: 该实施例中第一划分层 对应的变换块的尺寸为 2Nx2N , 该实施例中第二划分层对应的变换块的尺寸相当 于上述实施例中第一划分层对应的变换块的尺寸; 该实施例中第三划分层对应 的变换块的尺寸相当于上述实施例中第二划分层对应的变换块的尺寸, 以此类 推。
比如, 当图像块采用 nLx2N的划分方式时, 如图 7a所示, 如果在步骤 703中 确定采用 2Nx2N的变换块就能够使变换的效果很好, 此时图像块第一划分层对应 的变换块尺寸为 2Nx2N , 此时变换块可跨过子图像块边界; 当图像编码设备确定 采用第二划分层的变换块时, 根据图像块的划分方式和划分层数确定图像块使 用的第二划分层的变换块的尺寸为 0. 5Nx2N , 此时图像块划分成四个 0. 5Nx2N数 据块, 每个块分别使用 0. 5Nx2N的变换块, 如图 6b所示。 如图 6c所示, 当第一个 和第四个 0. 5x2N的数据块需要使用进一步划分的变换块时, 则此时根据图像块 划分方式和所在的划分层数确定这两个 0. 5Nx2N变换块被进一步划分所得到的 变换块的水平尺寸与第二划分层对应的变换块水平尺寸一致、 垂直尺寸为第二 划分层对应的变换块垂直垂直的四分之一, 此时, 第一个和第四个 0. 5x2N的数 据块被划分成 4个 0. 5NxO. 5N块, 每个块分别使用 0. 5NxO. 5N变换块。
705、图像编码设备确定标识图像块采用的变换块所在的划分层数的标识信 息。
具体的, 对于图 7a, 确定标识预测块对应的各变换块对应的划分层数的标 识信息包括 1个比特位, 其值为第一特定值, 比如 1 , 用于表示对第一划分层对 应的变换块(即 2Νχ2Ν 变换块) 不再进一步划分; 对图 7b, 标识预测块对应 的各变换块对应的划分层数的标识信息包括两层指示信息, 第一层的指示信息 包括 1个比特位, 其值为第二特定值, 比如 0, 用于表示对第一划分层对应的变 换块(即 2Nx2N变换块)需要进一步划分, 得到 4个第二划分层的变换块; 第 二层的指示信息包括 4个比特位,其值分别为 1 ,表示对 4个第二划分层的变换 块不需要进一步划分; 对于图 7c, 标识预测块对应的各变换块对应的划分层数 的标识信息至少包括两层指示信息, 第一层的指示信息包括 1 个比特位, 其值 为第二特定值, 比如 0, 用于表示对第一划分层对应的变换块(即 2Nx2N变换 块)需要进一步划分, 得到 4个第二划分层的变换块(即 0.5NX2N变换块); 第二层的指示信息包括 4个比特位, 第 2、 3比特位的值为 1 , 表示不需要对图 中中间的两个变换块进一步划分; 第 1、 4比特位的值为 0, 表示需要对图中两 边的两个变换块进一步划分, 得到 4个第三划分层的变换块(即 0.5Nx0.5N变 换块)。 此时, 当预定的 nLx2N图像块划分方式下允许的划分层数为 3 , 或者, 预定的 nLx2N图像块划分方式下允许的最小变换块尺寸为 0. 5NxO. 5N时, 则标 识预测块对应的变换块对应的划分层数的标识信息只包括两层指示信息就可以 了, 否则, 该标识信息还包括第三层的指示信息, 第三层的指示信息用于表示 4个第三划分层的变换块是否还需要进一步划分。
706、 图像编码设备将图像块的残差采用相应的变换块进行变换, 然后进行 量化, 将量化后的值进行编码。
707、 图像编码设备将标识图像块采用的变换块所在的划分层数的标识信 息、 步骤 706的编码结果、 表示图像块划分方式的指示信息写入码流, 并发送码 流。
本发明上述实施例在确定图像块采用的变换块尺寸的时候考虑了图像块的 划分方式, 并将标识图像块采用的变换块所在的划分层数的标识信息写入码流, 以便使用逐层标识的方法标识变换块的尺寸, 既保证了变换块不会跨过预测块 的边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效率。
实施例四:
如下具体描述根据图像块划分方式与图像块或者预测块对应的变换块所对 应的划分层数通过查表方式获得对应的变换块的尺寸:
第一种方式: 利用预置的图像块划分方式、 划分层数两者与变换块尺寸的 对应关系, 确定该图像块的划分方式和划分层数所对应的变换块尺寸。 其中, 划分层数是图像块或者预测块对应的变换块所对应的划分层数, 如下表 1 示出 了图像块划分方式、 划分层数两者与变换块尺寸的对应关系。
Figure imgf000019_0001
表 1
第二种方式: 利用预置的图像块划分方式、 划分层数两者与第一类尺寸比 值的对应关系, 确定图像块的划分方式和划分层数所对应的第一类尺寸比值, 其中, 划分层数是图像块或者预测块对应的变换块所对应的划分层数, 然后根 据所确定的第一类尺寸比值和图像块的尺寸, 确定图像块或者预测块对应的变 换块的尺寸, 其中, 第一类尺寸比值包括: 图像块或者预测块对应的变换块的 水平尺寸与图像块的水平尺寸的比值和图像块或者预测块对应的变换块的垂直 尺寸与图像块的垂直尺寸的比值, 其中, 如下表 2 示出了图像块划分方式、 划 分层数两者与变换块的水平尺寸与图像块的水平尺寸的比值的对应关系, 如下 表 3 示出了图像块划分方式、 划分层数两者与变换块的垂直尺寸与图像块的垂 直尺寸的比值的对应关系。
Figure imgf000019_0002
表 3
第三种方式: 利用预置的图像块划分方式、 划分层数两者与第二类尺寸比 值的对应关系, 确定图像块的划分方式和划分层数所对应的第二类尺寸比值, 其中, 划分层数是图像块或者预测块对应的变换块所对应的划分层数, 然后根 据所确定的第二类尺寸比值和预测块的尺寸, 确定该图像块或者预测块对应的 变换块的尺寸; 其中, 第二类尺寸比值包括: 图像块或者预测块对应的变换块 的水平尺寸与预测块的水平尺寸的比值和图像块或者预测块对应的变换块的垂 直尺寸与预测块的垂直尺寸的比值; 在一种具体的实施方式中, 其中, 第二类 尺寸比值具体可以包括: 图像块或者预测块对应的变换块的水平尺寸与最小预 测块的水平尺寸的比值和图像块或者预测块对应的变换块的垂直尺寸与最小预 测块的垂直尺寸的比值; 然后根据所确定的第二类尺寸比值和最小预测块的尺 寸, 确定该图像块或者预测块对应的变换块的尺寸。 其中, 表 4 示出了图像块 划分方式、 划分层数两者与变换块的水平尺寸与最小预测块的水平尺寸的比值 的对应关系, 表 5 示出了图像块划分方式、 划分层数两者与变换块的垂直尺寸 与最小预测块的垂直尺寸的比值的对应关系。
Figure imgf000020_0002
Figure imgf000020_0001
需要说明的是, 该实施例所提供的上述获得变换块的尺寸可以应用于其他 各实施例中, 即其他各实施例中获得变换块的尺寸步骤的执行过程都可以采用 本实施例所提供的技术方案。
实施例五:
本发明如下实施例提供另一种图像编码方法, 其与上述两个实施例不同之 处主要在于: 该实施例是与预测块为单位使用逐层标识方法的。
步骤 801-802与步骤 601-602相同, 在此不再赘述。 803、 图像编码设备确定预测块对应的变换块在预测块中对应的划分层数。 其中, 第一划分层次对应的变换块的尺寸为最小预测块的尺寸。
该步骤的具体实现方式与步骤 603相似, 在比不再赘述。
804、 图像编码设备根据图像块的划分方式和所确定的划分层数确定预测块 对应的变换块的尺寸。
比如, 当图像块对应的划分方式为 Nx2N划分时, 图像块被划分成两个大小 为 Nx2N子图像块, 此时, 预测块的大小为 Nx2N。 此时, 如图 8a所示, 两个预测 块对应变换块均为第一划分层的变换块, 两个预测块采用的变换块尺寸为 Nx 2N , 后续针对两个预测块分别设置划分标志标识使用第一划分层; 如图 8b所示, 此 时图像块左边的预测块对应的变换块的划分层仍为第一划分层, 右边的预测块 对应的变换块的划分层为第二划分层, 因此左边预测块使用的变换块尺寸仍为 Nx2N , 右边预测块使用的变换块尺寸根据划分层数(第二划分层)及图像块划 分方式(Nx2N )确定为 NxN, 后续分别设置左边和右边预测块的划分标志, 分别 用于标识左边预测块使用第一层划分, 右边预测块使用第二划分层; 如图 8c所 示, 此时图像块左边的预测块对应的变换块的划分层仍为第一划分层, 右边的 预测块对应的变换块的划分层为第三划分层, 因此左边预测块使用的变换块尺 寸仍为 Nx2N , 右边预测块使用的变换块尺寸根据划分层数(第三划分层)及图 像块划分方式(Nx2N )确定为 0. 5NxO. 5N , 分别设置左边和右边预测块的划分标 志, 分别用于标识左边预测块使用第一层划分, 右边预测块使用第三层划分。
805、图像编码设备确定标识预测块对应的变换块所对应的划分层数的标识 信息。
如图 8a所示, 确定标识左边预测块对应的变换块所对应的划分层数的标识 信息包括: 1个比特位, 比特位的值为第一特定值, 比如 1 , 用于表示对第一划 分层对应的 Nx2N变换块不再进一步划分; 确定标识右边预测块对应的变换块所 对应的划分层数的标识信息包括: 1个比特位, 比特位的值为第一特定值, 用于 表示对第一划分层对应的 Nx2N变换块不再进一步划分; 如图 8b所示, 其标识左 边预测块对应的变换块所对应的划分层数的标识信息与图 8a相同, 确定标识右 边预测块对应的变换块所对应的划分层数的标识信息包括: 1个比特位, 比特位 的值为第二特定值, 用于表示对第一划分层对应的 Nx2N变换块进一步划分; 如 图 8c所示, 其标识左边预测块对应的变换块所对应的划分层数的标识信息与图 8a相同, 确定标识右边预测块对应的变换块所对应的划分层数的标识信息包括: 两层指示信息, 第一层指示信息包括: 1个比特位, 比特位的值为第二特定值, 用于表示对第一划分层对应的 Nx2N变换块进一步划分, 得到 2个第二划分层的变 换块(尺寸为 NxN ); 第二层指示信息包括: 2个比特位, 用于表示 2个第二划分 层的变换块进一步划分, 这样就可以表示右边预测块使用得到第三划分层的变 换块。
806、 图像编码设备将图像块的残差采用相应的变换块进行变换, 然后进行 量化, 将量化后的值进行编码。
807、 图像编码设备将标识预测块对应的变换块所在的划分层数的标识信 息、 步骤 806的编码结果、 表示图像块划分方式的指示信息写入码流, 并发送码 流。
本发明上述实施例在确定预测块对应的变换块尺寸的时候考虑了图像块的 划分方式, 并将标识预测块对应的变换块所在的划分层数的标识信息写入码流, 以便使用逐层标识的方法标识变换块的尺寸, 既保证了变换块不会跨过预测块 的边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效率。
实施例六:
参阅图 9, 本发明实施例提供一种图像解码方法, 该方法具体包括:
901、 获得图像块的划分方式, 根据所述图像块的划分方式, 确定所述图像 块所使用的预测块。
其中, 该实施例的各步骤的执行主体为图像解码设备。
该步骤中图像解码设备从图像编码设备发送的码流中获得图像块的划分方 式, 即解析码流获得图像块的划分方式。 其中, 图像块的划分方式可以分为: nLx2N的划分方式和 2NxnL的划分方式, 具体参见步骤 501的相应描述, 在此不 再赘述。 其中, 该步骤中根据图像块的划分方式, 确定所述图像块所使用的预 测块具体包括: 根据图像块的划分方式, 确定所述图像块所使用的预测块的尺 寸。
902、 解析码流获得标识所述图像块或预测块对应的变换块在所述图像块或 预测块中对应的划分层数的标识信息, 根据所述标识信息, 确定所述图像块或 预测块对应的变换块在图像块或预测块中对应的划分层数; 其中, 所述图像块 或预测块对应的变换块包括一个或者多个变换块。 其中, 该步骤包括: 当所述标识信息包括: 用于表示不对第 N个划分层对应 的变换块进一步划分的标识, 则图像解码设备根据所述标识信息, 确定所述图 像块或预测块对应的至少一个变换块在所述图像块或预测块中对应的划分层数 为第 N划分层; 当所述标识信息包括: 用于表示对第 N划分层对应的至少一个变 换块进一步划分的标识, 则图像解码设备根据所述标识信息, 确定所述图像块 或预测块对应的至少一个变换块在所述图像块或预测块中对应的划分层数是大 于第 N划分层的。
其中, 根据所述标识信息, 确定所述预测块对应的变换块在预测块中对应 的划分层数的具体过程包括:
从所述标识信息中读取第 N层指示信息, 判断所述第 N层指示信息中的比 特位的值是第一特定值还是第二特定值;
当所述 N等于 M-1时,如果所述第 N层指示信息中的比特位的值是第一特定 值, 则确定所述比特位对应的变换块对应的划分层数是第 N划分层; 如果所述第 N层指示信息中的比特位的值是第二特定值,则确定所述比特位对应的变换块对 应的划分层数是第 M划分层; 其中, M是预定的划分层数或者预定的最小变换块 所对应的划分层数; 其中 N大于或者等于 1;
当所述 N小于 M-1时,如果所述第 N层指示信息中的比特位的值是第一特定 值, 则确定所述比特位对应的变换块对应的划分层数是第 N划分层; 如果所述第 N层指示信息中的比特位的值是第二特定值,继续从所述标识信息中读取下一层 指示信息,直到读取到第 M-1层指示信息或者读取到所有比特位的值都为第一特 定值的第 N+a层指示信息为止, 其中所述 N+a小于或者等于 M。
在确定所述预测块对应的变换块在预测块中对应的划分层数的过程中, 当 N 等于 1时, 所述第 N层指示信息中的比特位的数目是所述预测块中最小预测块的 个数; 或者, 确定所述图像块对应的变换块在预测块中对应的划分层数的过程 中, 当 N等于 1时, 第 1层指示信息中比特位的数目是 1个; 当 N等于 2时, 第 2层 指示信息中比特位的数目是所述图像块中最小预测块的个数。
903、 根据图像块的划分方式和所确定的划分层数确定所述图像块或预测块 对应的变换块的尺寸。
其中, 该步骤的具体实现过程与图像编码设备的操作过程相似, 在此不再 赘述。 本发明实施例在确定变换块尺寸的时候考虑了图像块的划分方式,并将标识 所述图像块或预测块对应的变换块对应的划分层数的标识信息写入码流, 以便 使用逐层标识的方法标识变换块的尺寸, 既保证了变换块不会跨过预测块的边 界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效率。
为了使本发明提供的上述技术方案更加清楚,如下两个实施例对本发明上述 技术方案进行详细介绍:
实施例七:
参阅图 10 , 本发明实施例提供一种图像解码方法, 该图像解码方法与图 6所 示图像编码方法相对应, 其具体包括:
1001、 图像解码设备从码流中解析中标识图像块的划分方式的指示信息, 根据该指示信息, 获得图像块的划分方式。
如前述, 该图像块的划分方式可以为 Nx2N划分方式, 或 nLx2N划分方式。
1002、 图像解码设备根据图像块的划分方式, 在参考图像中查找预测块, 所述预测块是与该图像块所划分成的子图像块尺寸匹配的图像块。
1003、 图像解码设备解析码流获得标识图像块采用的变换块在图像块中所 对应的划分层数的标识信息, 根据所述标识信息, 确定图像块采用的变换块在 图像块中所对应的划分层数。
1004、 根据图像块的划分方式和所述划分层数确定所述图像块采用的变换 块的尺寸。 其中, 第一划分层对应的变换块的尺寸为最小预测块的尺寸。
具体的, 步骤 1003和步骤 1004包括:
图像解码设备根据划分方式, 确定标识信息中第一层指示信息的比特位数, 即图像块中最小预测块的个数为第一层指示信息的比特位数, 当图像块划分方 式为 Nx2N时,确定第一层指示信息的比特位数为 2; 当图像块划分方式为 nLx2N 时, 比如将图像块划分成 0.5Nx2N和 1.5Nx2N的两个子图像块, 则第一层指示 信息的比特位数为 4; 当所述第一层指示信息标识图像块对应的变换块尺寸不进 行更小尺寸划分时, 确定当前图像块对应的划分层数为第一划分层, 当图像块 划分方式为 Nx2N时, 确定图像块对应的变换块尺寸为 Nx2N , 即第一划分层对应 的变换块的尺寸与预测块尺寸一致; 当图像块划分方式为 nLx2N 时, 确定变换 块尺寸为 0. 5Nx2N,即第一划分层对应的变换块尺寸与预测块中最小的预测块尺 寸一致。 当第一层指示信息标识某些第一划分层的变换块尺寸往更小尺寸划分 时, 此时划分层数在当前划分层数基础上加一, 即划分层数变为第二划分层。 当图像块划分方式为 Nx2N 时, 确定图像块对应的第二划分层的变换块尺寸为 NxN, 即下一层变换块对应的水平尺寸与当前层对应的变换块的水平尺寸相同, 并且下一层变换块对应的垂直尺寸为当前层对应的变换块的垂直尺寸的一半, 如图 6b 所示; 当图像块划分方式为 nLx2N 时, 确定下一层的变换块尺寸为 0. 5NxO. 5N, 即下一层变换块对应的水平尺寸与当前层对应的变换块的水平尺寸 相同, 并且下一层变换块对应的垂直尺寸为当前层对应的变换块的垂直尺寸的 四分之一, 如图 6d所示。
其中, 可以编解码设备可以预定某个划分方式下允许的划分层数, 或者编 解码设备预定某个划分方式下允许的最小变换尺寸时, 具体的实现方式与编码 端相同, 在此不再赘述。 具体的, 根据图像块的划分方式和所述划分层数确定 所述图像块采用的变换块的尺寸的方式与前述实施例四所述方法相同, 在此不 再赘述。
本发明实施例在确定图像块采用的变换块尺寸的时候考虑了图像块的划分 方式, 并将标识所述图像块采用的变换块对应的划分层数的标识信息写入码流, 以便使用逐层标识的方法标识变换块的尺寸, 既保证了变换块不会跨过预测块 的边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效率。
实施例八:
参阅图 11 , 本发明实施例提供一种图像解码方法, 该图像解码方法与图 7所 示图像编码方法相对应, 其具体包括:
步骤 1111-1102与步骤 1001-1002相同, 在此不再赘述。
步骤 1113、 图像解码设备解析码流获得标识图像块采用的变换块划分层数 的标识信息, 根据所述标识信息, 确定图像块采用的变换块在图像块中对应的 划分层数。
具体的, 从标识图像块的预测块对应的变换块划分层数的标识信息中的获 取第一层指示信息, 第一层指示信息包含一个比特位, 即获取的是第一个比特 位, 根据第一比特位的值确定是否对第一划分层进一步划分, 如果第一个比特 位的值表示不对第一划分层进一步划分, 则该确定图像块对应的变换块为 1 个 变换块, 即 2Nx2N变换块; 如果第一个比特位的值表示对第一划分层进一步划 分, 则根据图像块的预测块中最小预测块的尺寸, 确定所述标识信息中的第二 层指示信息的比特位数, 比如划分方式为 0.5Nx2N , 则最小预测块的尺寸也为 0.5Nx2N,则尺寸为 2Nx2N的图像块对应 4个尺寸与最小预测块尺寸相同的变换 块, 所以确定第二层指示信息的比特位为 4个, 读取这 4个比特位, 如果比特 位值为第一特定值, 比如 1 , 表示第二划分层的该变换块不进一步划分, 如果比 特位值为第二特定值, 比如 0, 表示第二划分层的该变换块需要进一步划分; 对 于图 7b所示意的图, 则这 4个比特位都为第一特定值, 此时确定图像块采用的 变换块在图像块中对应的划分层数为第二划分层, 即确定图像块采用的各变换 块是第二划分层的变换块; 对于图 7c所示意的图, 则这 4个比特位中第 2和 3 比特位为第一特定值, 表示不需要对第二划分层的第 2、 3比特位所对应的变换 块进一步划分, 确定该图像块采用的这 4个比特位中第 2、 3所对应的变换块的 划分层数为第二划分层; 第 1、 4比特位为第二特定值, 表示需要对第二划分层 的第 1、 4比特位所对应的变换块进一步划分, 得到 4个第三划分层的变换块, 此时, 当该划分方式下允许的划分层数是 3层, 或者该划分方式下允许的最小 变换块尺寸为 0. 5NxO. 5N时, 则确定该图像块需对应 4个比特位中第 1、 4所对 应的变换块所进一步划分得到的变换块, 其所对应的划分层数为第三划分层。
步骤 1104、 根据图像块的划分方式和所述划分层数确定所述图像块采用的 变换块的尺寸。 其中, 第一划分层对应的变换块的尺寸为该图像块的尺寸, 即 2N x2N; 第二划分层对应的变换块的尺寸为最小预测块的尺寸。
当图像块对应的划分层数为第一划分层, 如果图像块划分方式为 nLx2N时, 确定图像块对应的变换块尺寸为 2Nx2N ,即第一划分层对应的变换块的尺寸与图 像块一致, 如图 7a)所示; 当图像块对应的划分层数为第二划分层时, 当图像块 划分方式为 nLx2N 时, 根据图像块的划分方式和划分层数(即第二划分层)确 定图像块对应的变换块尺寸为 0. 5Nx2N ,即第二划分层对应的变换的尺寸与预测 块中最小的预测块尺寸一致, 如图 7b)所示; 当图像块中的某个 0. 5Nx2N的数据 块需要采用的第三划分层的变换块时, 根据图像块的划分方式和划分层数(即 第三划分层)确定其采用的变换块尺寸为 0. 5NxO. 5N , 即下一层变换块对应的水 平尺寸与当前层对应的变换块的水平尺寸相同, 并且下一层变换块对应的垂直 尺寸为当前层对应的变换块的垂直尺寸的四分之一, 如图 7c)所示。 具体的, 根据图像块的划分方式和所述划分层数确定图像块采用对应的变 换块的尺寸的方式与前述实施例四所述方法相同, 在此不再赘述。
本发明实施例在确定图像块采用的变换块尺寸的时候考虑了图像块的划分 方式, 并将标识图像块采用的变换块的划分层数的标识信息写入码流, 以便使 用逐层标识的方法标识变换块的尺寸, 既保证了变换块不会跨过预测块的边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效率。
相应的, 本发明实施例提供一种图像解码方法, 其与图 7所示图像编码方法 相对应, 图像解码设备分别解析两个预测块对应的划分标志 (即标识预测块对 应的变换块所对应的划分层次的标识信息), 根据两个预测块的划分标志分别确 定两个预测块对应的变换块所对应的划分层数, 分别根据图像块的划分方式和 所确定的划分层数确定两个预测块对应的变换块的尺寸。
需要说明的是 , 上述各实施例是以 nLx2N的划分方式为例进行描述的, 应 该理解的是,本发明上述各实施例所提供的技术方案同时也适用于 nRxN、 2NxnU、 2NxnD、 2NxN、 Nx2N等划分方式中。
参阅图 12 , 本发明实施例提供一种图像编码设备, 其包括:
预测块确定单元 10 , 用于根据图像块的划分方式, 确定所述图像块所使用 的预测块;
划分层次确定单元 20 , 用于确定所述图像块或预测块对应的变换块在所述 图像块或预测块中对应的划分层数; 其中, 所述图像块或预测块对应的变换块 包括一个或者多个变换块;
变换块尺寸确定单元 30 , 用于根据图像块的划分方式和所述划分层数确定 所述图像块或预测块对应的变换块的尺寸;
标识信息确定单元 40 , 用于确定标识所述图像块或预测块对应的变换块所 对应的划分层数的标识信息;
写入单元 50, 用于将将所述标识信息写入码流。
其中, 对于上级划分层对应的变换块尺寸与下级划分层对应的变换块尺寸 之间的关系 (比如, 第 N划分层对应的变换块尺寸与第 N+1划分层对应的变换块 尺寸间的关系, 其中, 第 N划分层为第 N+1划分层的上级划分层, 第 N+1划分层 为第 N划分层的下级划分层), 以及划分层所对应的变换块的尺寸的规定见方法 实施例的相应描述, 在此不再赘述。 其中, 所述划分层次确定单元 20 , 用于当所述图像块或预测块对应的至少 一个变换块在所述图像块或预测块中对应的划分层数为第 N划分层时,确定标识 所述图像块或预测块对应的所述至少一个变换块对应的划分层数的标识信息包 括:标识对所述第 N划分层的所述至少一个变换块不进一步划分的标志位;或者, 所述划分层次确定单元 20 , 用于当所述图像块或预测块对应的至少一个变换块 在所述图像块或预测块中对应的划分层数大于第 N划分层时,确定标识所述图像 块或预测块对应的所述至少一个变换块所对应的划分层数的标识信息包括: 对 第 N划分层对应的变换块进一步划分的标志位。
其中, 变换块尺寸确定单元 30 , 用于查询所述图像块的划分方式和所述划 分层数所对应的变换块尺寸, 其中, 具体的对应关系可以如表 1所示;
或者, 所述变换块尺寸确定单元 30 , 用用于查询所述图像块的划分方式和 所述划分层数所对应的第一类尺寸比值; 其中, 第一类尺寸比值包括: 所述图 像块或预测块对应的变换块的水平尺寸与图像块的水平尺寸的比值和所述图像 块或预测块对应的变换块的垂直尺寸与图像块的垂直尺寸的比值; 根据所述第 一类尺寸比值和图像块的水平尺寸和垂直尺寸, 确定所述图像块或预测块对应 的变换块尺寸, 其中具体的对应关系可以如表 2和表 3所示;
或者, 所述变换块尺寸确定单元 30 , 用于查询所述图像块的划分方式和所 述划分层数所对应的第二类尺寸比值; 第二类尺寸比值包括: 所述图像块或预 测块对应的变换块的水平尺寸与预测块的水平尺寸的比值和所述图像块或预测 块对应的变换块的垂直尺寸与预测块的垂直尺寸的比值; 根据所述第二类尺寸 比值和预测块的水平尺寸和垂直尺寸, 确定所述图像块或预测块对应的变换块 尺寸, 其中, 第二类尺寸比值具体可以包括: 图像块或者预测块对应的变换块 的水平尺寸与最小预测块的水平尺寸的比值和图像块或者预测块对应的变换块 的垂直尺寸与最小预测块的垂直尺寸的比值; 然后根据所确定的第二类尺寸比 值和最小预测块的尺寸, 确定该图像块或者预测块对应的变换块的尺寸。 具体 的对应关系可以如表 4和表 5所示。
本发明实施例在确定变换块尺寸的时候考虑了图像块的划分方式的划分方 式, 并将标识所述图像块或预测块对应的变换块所对应的划分层数的标识信息 写入码流, 以便使用逐层标识的方法标识变换换的尺寸, 既保证了变换块不会 跨过预测块的边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编码效 参阅图 13 , 本发明实施例提供一种图像解码设备, 其包括:
预测块确定单元 60, 用于获得图像块的划分方式, 根据所述图像块的划分 方式, 确定所述图像块所使用的预测块;
标识信息获得单元 70, 用于解析码流获得标识所述图像块或预测块对应的 变换块在所述图像块或预测块中对应的划分层数的标识信息;
划分层次确定单元 80, 用于根据所述标识信息, 确定所述图像块或预测块 对应的变换块在图像块或预测块中对应的划分层数; 其中, 所述图像块或预测 块对应的变换块包括一个或者多个变换块;
变换块尺寸确定单元 90, 用于根据图像块的划分方式和所述划分层数确定 所述图像块或预测块对应的变换块的尺寸。
其中, 对于上级划分层对应的变换块尺寸与下级划分层对应的变换块尺寸 之间的关系, 以及划分层所对应的变换块的尺寸的规定见方法实施例的相应描 述, 在此不再赘述。
其中, 所述标识信息包括: 用于表示不对第 N个划分层对应的变换块进一 步划分的标识; 此时, 所述划分层次确定单元, 用于根据所述标识信息, 确定 所述图像块或预测块对应的变换块中的至少一个变换块在所述图像块或预测块 中对应的划分层数为第 N划分层; 或者, 所述标识信息包括: 用于表示对第 N划 分层对应的至少一个变换块进一步划分的标识; 所述划分层次确定单元, 用于 根据所述标识信息, 确定所述图像块或预测块对应的变换块中至少一个变换块 在所述图像块或预测块中对应的划分层数是大于第 N划分层的。
其中, 变换块尺寸确定单元 90的结构和功能与上述图像编码设备中变换块 尺寸确定单元 30的结构和功能相似, 在此不再赘述。
本发明实施例在确定变换块尺寸的时候考虑了图像块的划分方式的划分方 式, 并将标识所述图像块或预测块对应的变换块所对应的划分层数的标识信息 写入码流, 以便使用逐层标识的方法标识变换换的尺寸, 既保证了变换块不会 跨过预测块的边界, 同时又有效的标识了变换块的尺寸, 有效的提高了编解码 效率。
实施例九
在现有的视频编解码技术中变换通常包含不同的变换类型, 如二维变换, 即对一个数据块进行水平变换然后再进行垂直变换, 二维变换广泛应用于视频 编解码系统。 此外, 考虑到某些特殊的编码内容, 也可以使用一维的水平变换, 即只对数据块进行水平变换; 或一维的垂直变换, 即只对数据块进行垂直变换; 或者不做变换, 即不对数据块进行处理, 直接进行量化和熵编码。
通常具有水平纹理的内容更适合使用水平变换, 具有垂直纹理的内容更适 合使用垂直变换。 由于图像块的划分模式也能反映图像纹理信息, 如采用水平 划分模式的图像块具有水平纹理, 采用垂直划分模式的图像块具有垂直纹理, 因此可以将图像块的划分模式与变换的类型结合使用。 当变换层数为第一特定 划分层时仍使用二维变换, 当变换层数为第二特定变换层时根据图像块划分模 式使用水平或垂直变换。
在这里第一特定划分层为第 0层, 第二特定划分层为第 1层, 第一特定划分 层和第二特定划分层可根据视频编解码信息进行改变。
该实施例具体包括:
步骤 1201、 获得图像块的划分模式;
步骤 1202、 获得变换块在图像块中对应的划分层数;
步骤 1203、 当划分层数为 0时, 图像块对应的变换类型为二维变换, 即水平 和垂直变换。
步骤 1204、 当划分层数为 1时, 当图像块采用水平划分时, 图像块对应的变 换类型为水平变换, 当图像块采用垂直划分时, 图像块对应的变换类型为垂直 变换。 本发明实施例提供一种网络系统, 其包括图像编码设备和图像解码设备, 其中, 图像编码设备的结构和功能与图 12所示实施例相同; 图像解码设备的结 构和和功能与图13所示实施例相同, 在此不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是 可以通过程序来指令相关的硬件完成, 所述的程序可以存储于一种计算机可读 存储介质中, 例如只读存储器, 磁盘或光盘等。
以上对本发明实施例所提供的图像编解码方法、 编解码设备及网络系统进 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对于 本领域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用范围上均 会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。

Claims

权 利 要 求 书
1、 一种图像编码方法, 其特征在于, 包括:
根据图像块的划分方式, 确定所述图像块所使用的预测块;
确定所述图像块或预测块对应的变换块在所述图像块或预测块中对应的划 分层数; 其中, 所述图像块或预测块对应的变换块包括一个或者多个变换块; 根据图像块的划分方式和所述划分层数确定所述图像块或预测块对应的变 换块的尺寸;
确定标识所述图像块或预测块对应的变换块所对应的划分层数的标识信 息;
将所述标识信息写入码流。
2、 根据权利要求 1所述的方法, 其特征在于,
根据图像块的划分方式, 确定所述图像块所使用的预测块包括:
根据图像块的划分方式, 确定所述图像块所使用的预测块的尺寸。
3、 根据权利要求 1所述的方法, 其特征在于,
确定标识所述图像块或预测块对应的变换块所对应的划分层数的标识信息 包括:
当所述图像块或预测块对应的至少一个变换块在所述图像块或预测块中对 应的划分层数为第 N划分层时,确定标识所述图像块或预测块对应的所述至少一 个变换块所对应的划分层数的标识信息包括:标识对所述第 N划分层的所述至少 一个变换块不进一步划分的标志位。
4、 根据权利要求 1所述的方法, 其特征在于,
确定标识所述图像块或预测块对应的变换块所对应的划分层数的标识信息 包括:
当所述图像块或预测块对应的至少一个变换块在所述图像块或预测块中对 应的划分层数大于第 N划分层时,确定标识所述图像块或预测块对应的所述至少 一个变换块所对应的划分层数的标识信息包括:对第 N划分层对应的变换块进一 步划分的标志位。
5、 根据权利要求 1所述的方法, 其特征在于,
其中, 当所述预测块对应的变换块在所述预测块中对应的划分层数为特定 划分层时, 根据图像块的划分方式和所述特定划分层确定的所述变换块的尺寸 是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块所使用的预测 块中尺寸最小的预测块。
6、 根据权利要求 1所述的方法, 其特征在于,
其中, 当所述图像块对应的变换块在所述图像块中对应的划分层数为第一 特定划分层时, 根据图像块的划分方式和第一特定划分层确定的所述变换块的 尺寸是所述图像块的尺寸;
当所述图像块对应的变换块在所述图像块中对应的划分层数为第二特定划 分层时, 根据图像块的划分方式和所述第二特定划分层确定所述变换块的尺寸 是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块所使用的预测 块中尺寸最小的预测块。
7、 根据权利要求 1、 5或者 6所述的方法, 其特征在于,
所述当所述图像块或预测块对应的至少一个变换块所对应的划分层数是第 N+1划分层时, 所述至少一个变换块的水平尺寸小于第 N划分层对应的变换块的 水平尺寸; 和 /或所述至少一个变换块的垂直尺寸小于第 N划分层对应的变换块 的垂直尺寸。
8、 根据权利要求 7所述的方法, 其特征在于,
其中,所述至少一个变换块的水平尺寸小于第 N划分层对应的变换块的水平 尺寸具体为:
所述至少一个变换块的水平尺寸为第 N划分层对应的变换块的水平尺寸的
1/m! , 其中, 1¾大于或者等于 2。
9、 根据权利要求 7所述的方法, 其特征在于,
所述至少一个变换块的垂直尺寸小于第 N划分层对应的变换块的垂直尺寸 具体为:
所述至少一个变换块的垂直尺寸为第 N划分层对应的变换块的垂直尺寸的 l/m2, 其中, m2大于或者等于 2。
10、 根据权利要求 1、 5或者 6所述的方法, 其特征在于,
根据图像块的划分方式和所述划分层数确定所述图像块或者预测块所对应 的变换块的尺寸包括:
查询所述图像块的划分方式和所述划分层数所对应的变换块尺寸; 或者,
查询所述图像块的划分方式和所述划分层数所对应的第一类尺寸比值; 其 中, 第一类尺寸比值包括: 所述图像块或预测块对应的变换块的水平尺寸与图 像块的水平尺寸的比值和所述图像块或预测块对应的变换块的垂直尺寸与图像 块的垂直尺寸的比值;
根据所述第一类尺寸比值和图像块的水平尺寸和垂直尺寸, 确定所述图像 块或预测块对应的变换块尺寸;
或者,
查询所述图像块的划分方式和所述划分层数所对应的第二类尺寸比值; 第 二类尺寸比值包括: 所述图像块或预测块对应的变换块的水平尺寸与预测块的 水平尺寸的比值和所述图像块或预测块对应的变换块的垂直尺寸与预测块的垂 直尺寸的比值;
根据所述第二类尺寸比值和预测块的水平尺寸和垂直尺寸, 确定所述图像 块或预测块对应的变换块尺寸。
11、 一种图像解码方法, 其特征在于, 包括:
获得图像块的划分方式, 根据所述图像块的划分方式, 确定所述图像块所 使用的预测块;
解析码流获得标识所述图像块或预测块对应的变换块在所述图像块或预测 块中对应的划分层数的标识信息, 根据所述标识信息, 确定所述图像块或预测 块对应的变换块在图像块或预测块中对应的划分层数; 其中, 所述图像块或预 测块对应的变换块包括一个或者多个变换块;
根据图像块的划分方式和所述划分层数确定所述图像块或预测块对应的变 换块的尺寸。
12、 根据权利要求 11所述的方法, 其特征在于,
根据所述图像块的划分方式, 确定所述图像块所使用的预测块包括: 根据所述图像块的划分方式, 确定所述图像块所使用的预测块的尺寸。
13、 根据权利要求 11所述的方法, 其特征在于,
所述标识信息包括:用于表示不对第 N个划分层对应的变换块进一步划分的 标识;
根据所述标识信息, 确定所述图像块或预测块对应的变换块在图像块或预 测块中对应的划分层数具体为:
根据所述标识信息, 确定所述图像块或预测块对应的变换块中的至少一个 变换块在所述图像块或预测块中对应的划分层数为第 N划分层。
14、 根据权利要求 11所述的方法, 其特征在于,
所述标识信息包括:用于表示对第 N划分层对应的至少一个变换块进一步划 分的标识;
根据所述标识信息, 确定所述图像块或预测块对应的变换块在图像块或预 测块中对应的划分层数具体为:
根据所述标识信息, 确定所述图像块或预测块对应的变换块中至少一个变 换块在所述图像块或预测块中对应的划分层数是大于第 N划分层的。
15、 根据权利要求 11所述的方法, 其特征在于,
其中, 当所述预测块对应的变换块在所述预测块中对应的划分层数为特定 划分层时, 根据图像块的划分方式和所述特定划分层确定的所述变换块的尺寸 是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块所使用的预测 块中尺寸最小的预测块。
16、 根据权利要求 11所述的方法, 其特征在于,
其中, 当所述图像块对应的变换块在所述图像块中对应的划分层数为第一 特定划分层时, 根据图像块的划分方式和所述第一特定划分层确定的所述变换 块的尺寸是所述图像块的尺寸;
当所述图像块对应的变换块在所述图像块中对应的划分层数为第二特定划 分层时, 根据图像块的划分方式和所述第二特定划分层确定所述变换块的尺寸 是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块所使用的预测 块中尺寸最小的预测块。
17、 根据权利要求 11、 15或者 16所述的方法, 其特征在于,
所述图像块或预测块对应的变换块中至少一个变换块在所述图像块或预测 块中对应的划分层数为第 N+1划分层时,所述至少一个变换块的水平尺寸小于第 N划分层对应的变换块的水平尺寸; 和 /或所述至少一个变换块的垂直尺寸小于 第 N划分层对应的变换块的垂直尺寸。
18、 根据权利要求 17所述的方法, 其特征在于,
其中,所述至少一个变换块的水平尺寸小于第 N划分层对应的变换块的水平 尺寸具体为:
所述至少一个变换块的水平尺寸为第 N划分层对应的变换块的水平尺寸的 1/m! , 其中, 1¾大于或者等于 2。
19、 根据权利要求 17所述的方法, 其特征在于,
所述至少一个变换块的垂直尺寸小于第 N划分层对应的变换块的垂直尺寸 具体为:
所述至少一个变换块的垂直尺寸为第 N划分层对应的变换块的垂直尺寸的 l/m2, 其中, m2大于或者等于 2。
20、 根据权利要求 11、 15或者 16所述的方法, 其特征在于,
根据图像块的划分方式和所述划分层数确定所述图像块或者预测块对应的 变换块的尺寸包括:
查询所述图像块的划分方式和所述划分层数所对应的变换块尺寸; 或者,
查询所述图像块的划分方式和所述划分层数所对应的第一类尺寸比值; 其 中, 第一类尺寸比值包括: 所述图像块或预测块对应的变换块的水平尺寸与图 像块的水平尺寸的比值和所述图像块或预测块对应的变换块的垂直尺寸与图像 块的垂直尺寸的比值;
根据所述第一类尺寸比值和图像块的水平尺寸和垂直尺寸, 确定所述图像 块或预测块对应的变换块尺寸;
或者,
查询所述图像块的划分方式和所述划分层数所对应的第二类尺寸比值; 第 二类尺寸比值包括: 所述图像块或预测块对应的变换块的水平尺寸与预测块的 水平尺寸的比值和所述图像块或预测块对应的变换块的垂直尺寸与预测块的垂 直尺寸的比值;
根据所述第二类尺寸比值和预测块的水平尺寸和垂直尺寸, 确定所述图像 块或预测块对应的变换块尺寸。
21、 一种图像编码设备, 其特征在于, 包括:
预测块确定单元, 用于根据图像块的划分方式, 确定所述图像块所使用的 预测块;
划分层次确定单元, 用于确定所述图像块或预测块对应的变换块在所述图 像块或预测块中对应的划分层数; 其中, 所述图像块或预测块对应的变换块包 括一个或者多个变换块;
变换块尺寸确定单元, 用于根据图像块的划分方式和所述划分层数确定所 述图像块或预测块对应的变换块的尺寸;
标识信息确定单元, 用于确定标识所述图像块或预测块对应的变换块所对 应的划分层数的标识信息;
写入单元, 用于将所述标识信息写入码流。
22、 根据权利要求 21所述的设备, 其特征在于,
所述划分层次确定单元, 用于当所述图像块或预测块对应的至少一个变换 块在所述图像块或预测块中对应的划分层数为第 N划分层时,确定标识所述图像 块或预测块对应的所述至少一个变换块所对应的划分层数的标识信息包括: 标 识对所述第 N划分层的所述至少一个变换块不进一步划分的标志位;
或者,
所述划分层次确定单元, 用于当所述图像块或预测块对应的至少一个变换 块在所述图像块或预测块中对应的划分层数大于第 N划分层时,确定标识所述图 像块或预测块对应的所述至少一个变换块所对应的划分层数的标识信息包括: 对第 N划分层对应的变换块进一步划分的标志位。
23、 根据权利要求 21所述的设备, 其特征在于,
其中, 当所述预测块对应的变换块在所述预测块中对应的划分层数为特定 划分层时, 根据图像块的划分方式和所述特定划分层确定的所述变换块的尺寸 是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块所使用的预测 块中尺寸最小的预测块。
24、 根据权利要求 21所述的方法, 其特征在于,
其中, 当所述图像块对应的变换块在所述图像块中对应的划分层数为第一 特定划分层时, 根据图像块的划分方式和第一特定划分层确定的所述变换块的 尺寸是所述图像块的尺寸;
当所述图像块对应的变换块在所述图像块中对应的划分层数为第二特定划 分层时, 根据图像块的划分方式和所述第二特定划分层确定所述变换块的尺寸 是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块所使用的预测 块中尺寸最小的预测块。
25、 根据权利要求 21、 22、 23或者 24所述的方法, 其特征在于, 所述变换块尺寸确定单元, 用于查询所述图像块的划分方式和所述划分层 数所对应的变换块尺寸;
或者,
所述变换块尺寸确定单元, 用于查询所述图像块的划分方式和所述划分层 数所对应的第一类尺寸比值; 其中, 第一类尺寸比值包括: 所述图像块或预测 块对应的变换块的水平尺寸与图像块的水平尺寸的比值和所述图像块或预测块 对应的变换块的垂直尺寸与图像块的垂直尺寸的比值; 根据所述第一类尺寸比 值和图像块的水平尺寸和垂直尺寸, 确定所述图像块或预测块对应的变换块尺 寸;
或者,
所述变换块尺寸确定单元, 用于查询所述图像块的划分方式和所述划分层 数所对应的第二类尺寸比值; 第二类尺寸比值包括: 所述图像块或预测块对应 的变换块的水平尺寸与预测块的水平尺寸的比值和所述图像块或预测块对应的 变换块的垂直尺寸与预测块的垂直尺寸的比值; 根据所述第二类尺寸比值和预 测块的水平尺寸和垂直尺寸, 确定所述图像块或预测块对应的变换块尺寸。
26、 一种图像解码设备, 其特征在于, 包括:
预测块确定单元, 用于获得图像块的划分方式, 根据所述图像块的划分方 式, 确定所述图像块所使用的预测块;
标识信息获得单元, 用于解析码流获得标识所述图像块或预测块对应的变 换块在所述图像块或预测块中对应的划分层数的标识信息;
划分层次确定单元, 用于根据所述标识信息, 确定所述图像块或预测块对 应的变换块在图像块或预测块中对应的划分层数; 其中, 所述图像块或预测块 对应的变换块包括一个或者多个变换块;
变换块尺寸确定单元, 用于根据图像块的划分方式和所述划分层数确定所 述图像块或预测块对应的变换块的尺寸。
27、 根据权利要求 26所述的设备, 其特征在于,
所述标识信息包括:用于表示不对第 N个划分层对应的变换块进一步划分的 标识;
所述划分层次确定单元, 用于根据所述标识信息, 确定所述图像块或预测 块对应的变换块中的至少一个变换块在所述图像块或预测块中对应的划分层数 为第 N划分层;
或者, 所述标识信息包括: 用于表示对第 N划分层对应的至少一个变换块 进一步划分的标识;
所述划分层次确定单元, 用于根据所述标识信息, 确定所述图像块或预测 块对应的变换块中至少一个变换块在所述图像块或预测块中对应的划分层数是 大于第 N划分层的。
28、 根据权利要求 26所述的方法, 其特征在于,
其中, 当所述预测块对应的变换块在所述预测块中对应的划分层数为特定 划分层时, 根据图像块的划分方式和所述特定划分层确定的所述变换块的尺寸 是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块的预测块中尺 寸最小的预测块。
29、 根据权利要求 27所述的方法, 其特征在于,
其中, 当所述图像块对应的变换块在所述图像块中对应的划分层数为第一 特定划分层时, 根据图像块的划分方式和所述第一特定划分层确定的所述变换 块的尺寸是所述图像块的尺寸;
当所述图像块对应的变换块在所述图像块中对应的划分层数为第二特定划 分层时, 根据图像块的划分方式和所述第二特定划分层确定所述变换块的尺寸 是最小预测块的尺寸, 其中, 所述最小预测块为所确定的图像块的预测块中尺 寸最小的预测块。
30、 根据权利要求 26、 27、 28或 29所述的方法, 其特征在于,
所述变换块尺寸确定单元, 用于查询所述图像块的划分方式和所述划分层 数所对应的变换块尺寸;
或者,
所述变换块尺寸确定单元, 用于查询所述图像块的划分方式和所述划分层 数所对应的第一类尺寸比值; 其中, 第一类尺寸比值包括: 所述图像块或预测 块对应的变换块的水平尺寸与图像块的水平尺寸的比值和所述图像块或预测块 对应的变换块的垂直尺寸与图像块的垂直尺寸的比值; 根据所述第一类尺寸比 值和图像块的水平尺寸和垂直尺寸, 确定所述图像块或预测块对应的变换块尺 寸; 或者,
所述变换块尺寸确定单元, 用于查询所述图像块的划分方式和所述划分层 数所对应的第二类尺寸比值; 第二类尺寸比值包括: 所述图像块或预测块对应 的变换块的水平尺寸与预测块的水平尺寸的比值和所述图像块或预测块对应的 变换块的垂直尺寸与预测块的垂直尺寸的比值; 根据所述第二类尺寸比值和预 测块的水平尺寸和垂直尺寸, 确定所述图像块或预测块对应的变换块尺寸。
31、 一种图像解码方法, 其特征在于, 包括:
获得图像块的划分方式, 获得标识所述图像块对应的变换块在所述图像块 中对应的划分层数的标识信息, 根据所述标识信息, 确定所述图像块对应的变 换块在图像块中对应的划分层数;
根据图像块的划分方式和所述划分层数确定所述图像块对应的变换类型, 所述变换类型包括水平和垂直二维变换, 或水平变换, 或垂直变换, 或不变换; 根据所述变换类型进行变换操作。
32、 根据权利要求 31和 32所述的方法, 其特征在于, 所述根据所述变换类 型进行变换操作包括根据所述变换的类型和变换块的尺寸进行变换操作。
33、 根据权利要求 32所述的方法, 其特征在于, 所述方法还包括: 根据图像块的划分方式和所述划分层数确定所述图像块对应的变换块的尺 寸。
34、 根据权利要求 31所述的方法, 其特征在于, 所述根据图像块的划分方 式和所述划分层数确定所述图像块对应的变换的类型包括: 当所述划分层数为 第一特定划分层时, 变换类型是水平和垂直二维变换。
35、 根据权利要求 31所述的方法, 其特征在于, 所述根据图像块的划分方 式和所述划分层数确定所述图像块对应的变换的类型包括:
当所述划分层数为第二特定划分层时, 且图像块的划分方式为水平划分方 式时, 变换类型为水平变换;
当所述划分层数为第二特定划分层时, 且图像块的划分方式为垂直划分方 式时, 变换类型为垂直变换。
36、 根据权利要求 31所述的方法, 其特征在于, 所述根据图像块的划分方 式和所述划分层数确定所述图像块对应的变换的类型包括: 当所述划分层数为第二特定划分层时, 且图像块的划分方式为水平划分方 式时, 变换类型为垂直变换;
当所述划分层数为第二特定划分层时, 且图像块的划分方式为垂直划分方 式时, 变换类型为水平变换。
37、 根据权利要求 31所述的方法, 其特征在于, 所述根据图像块的划分方 式和所述划分层数确定所述图像块对应的变换的类型包括:
当所述划分层数为第二特定划分层时, 且图像块的划分方式为水平划分方 式时, 变换块类型为水平变换, 或水平和垂直二维变换;
当所述划分层数为第二特定划分层时, 且图像块的划分方式为垂直划分方 式时, 变换类型为垂直变换, 或水平和垂直二维变换。
38、 根据权利要求 31所述的方法, 其特征在于, 所述根据图像块的划分方 式和所述划分层数确定所述图像块对应的变换的类型包括:
当所述划分层数为第二特定划分层时, 且图像块的划分方式为水平划分方 式时, 变换类型为垂直变换, 或水平和垂直二维变换;
当所述划分层数为第二特定划分层时, 且图像块的划分方式为垂直划分方 式时, 变换类型为水平变换, 或水平和垂直二维变换。
39、 根据权利要求 31所述的方法, 所述的变换操作其特征在于, 当变换类 型为水平和垂直二维变换时, 对变换块数据进行水平变换, 然后对变换块数据 进行垂直变换; 当变换类型为水平变换时, 对变换块数据进行水平变换; 当变 换类型为垂直变换时, 对变换块数进行垂直变换。
40、 一种图像编码方法, 其特征在于, 包括:
确定图像块的划分方式;
确定所述图像块对应的变换块在所述图像块中对应的划分层数, 确定标识 所述图像块对应的变换块所对应的划分层数的标识信息, 将所述标识信息写入 码流;
根据图像块的划分方式和所述划分层数确定所述图像块对应的变换类型, 所述变换类型包括水平和垂直二维变换, 或水平变换, 或垂直变换, 或不变换; 根据所述变换的类型进行变换操作。
41、 根据权利要求 40所述的方法, 其特征在于, 所述根据所述变换的类型 进行变换操作包括根据所述变换的类型和变换块的尺寸进行变换操作。
42、 根据权利要求 40所述的方法, 其特征在于, 根据图像块的划分方式和 所述划分层数确定所述图像块对应的变换块的尺寸。
PCT/CN2012/072464 2011-03-16 2012-03-16 图像编解码方法、图像编解码设备及网络系统 WO2012122948A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/026,682 US9106897B2 (en) 2011-03-16 2013-09-13 Picture encoding and decoding method, picture encoding and decoding device and network system

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201110063466.2 2011-03-16
CN201110063466 2011-03-16
CN201210021060.2A CN102685487B (zh) 2011-03-16 2012-01-30 图像编解码方法、图像编解码设备及网络系统
CN201210021060.2 2012-01-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/026,682 Continuation US9106897B2 (en) 2011-03-16 2013-09-13 Picture encoding and decoding method, picture encoding and decoding device and network system

Publications (1)

Publication Number Publication Date
WO2012122948A1 true WO2012122948A1 (zh) 2012-09-20

Family

ID=46816777

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072464 WO2012122948A1 (zh) 2011-03-16 2012-03-16 图像编解码方法、图像编解码设备及网络系统

Country Status (3)

Country Link
US (1) US9106897B2 (zh)
CN (1) CN102685487B (zh)
WO (1) WO2012122948A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024386B (zh) * 2012-12-14 2016-04-13 北京大学 一种头信息编解码、解码方法及装置
CN104811731A (zh) * 2014-01-03 2015-07-29 上海天荷电子信息有限公司 多层次子块匹配图像压缩方法
US10070070B2 (en) * 2014-05-28 2018-09-04 Mediatek Inc. Video processing apparatus with transform unit size selection, mode information unit size selection and/or picture width/height decision, and related video processing method thereof
CN104284188B (zh) * 2014-10-11 2018-03-13 华为技术有限公司 预测块的划分方法、编码设备和解码设备
US10698139B2 (en) 2016-10-03 2020-06-30 Stephen M. Dillon Diffuse reflecting optical construction
CN112532979A (zh) 2018-03-31 2021-03-19 华为技术有限公司 图像块编码中的变换方法、解码中的反变换方法及装置
WO2020119742A1 (zh) * 2018-12-15 2020-06-18 华为技术有限公司 块划分方法、视频编解码方法、视频编解码器
WO2020263817A1 (en) * 2019-06-25 2020-12-30 Intel Corporation Sub-pictures and sub-picture sets with level derivation
US11375243B2 (en) * 2019-07-17 2022-06-28 Tencent America LLC Method and apparatus for video coding
CN114240975A (zh) * 2022-02-28 2022-03-25 安翰科技(武汉)股份有限公司 图像处理方法和图像处理装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325714A (zh) * 2007-06-13 2008-12-17 华为技术有限公司 变换数据处理方法和装置以及编码、解码方法和装置
CN101350928A (zh) * 2008-07-29 2009-01-21 北京中星微电子有限公司 一种运动估计方法及装置
CN101500160A (zh) * 2008-01-28 2009-08-05 华为技术有限公司 一种码流标识方法、装置及编解码系统
WO2010116869A1 (ja) * 2009-04-08 2010-10-14 シャープ株式会社 動画像符号化装置および動画像復号装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325714A (zh) * 2007-06-13 2008-12-17 华为技术有限公司 变换数据处理方法和装置以及编码、解码方法和装置
CN101500160A (zh) * 2008-01-28 2009-08-05 华为技术有限公司 一种码流标识方法、装置及编解码系统
CN101350928A (zh) * 2008-07-29 2009-01-21 北京中星微电子有限公司 一种运动估计方法及装置
WO2010116869A1 (ja) * 2009-04-08 2010-10-14 シャープ株式会社 動画像符号化装置および動画像復号装置

Also Published As

Publication number Publication date
US20140010469A1 (en) 2014-01-09
CN102685487A (zh) 2012-09-19
CN102685487B (zh) 2015-07-08
US9106897B2 (en) 2015-08-11

Similar Documents

Publication Publication Date Title
WO2013029560A1 (zh) 一种获得变换块尺寸的方法和模块
WO2012122948A1 (zh) 图像编解码方法、图像编解码设备及网络系统
WO2014005500A1 (zh) 变换块划分方法,变换块划分参数的编码方法及解码方法
WO2013029559A1 (zh) 一种变换块位置信息的获取方法和模块
WO2012094921A1 (zh) 多图像块划分的编解码方法和装置
JP2016165125A (ja) 映像復号化装置
JP7197728B2 (ja) 変換インデックスを利用する映像コーディング
KR20110112224A (ko) 부호화 모드에 대한 정보를 부호화, 복호화하는 방법 및 장치
JP7197727B2 (ja) 映像コーディングにおけるマトリクスベースのイントラ予測のための変換
WO2013067962A1 (zh) 图像编码方法及图像编码装置
WO2012167670A1 (zh) 确定变换块尺寸的方法和设备
WO2012097743A1 (zh) 图像编解码方法及编解码设备
JP7302037B2 (ja) 画像コーディングにおいて変換カーネルセットを表す情報のシグナリング
JP7299413B2 (ja) 変換に基づく映像コーディング方法及びその装置
JP7214894B2 (ja) イントラ予測ベースの映像コーディングにおける変換
EP3094095A1 (en) Image encoding/decoding method, device and system
JP2023500732A (ja) 変換に基づく映像コーディング方法及びその装置
AU2020360013A1 (en) Transform-based image coding method, and apparatus therefor
JP7303335B2 (ja) 変換カーネルセットに関する情報に対するコーディング
JP7431995B2 (ja) 変換に基づく映像コーディング方法及びその装置
JP2023501529A (ja) 変換に基づく映像コーディング方法及びその装置
JP2022537160A (ja) 変換に基づく映像コーディング方法及びその装置
JP2023112079A (ja) 画像コーディングシステムにおいて変換カーネルセットに関する情報に対するコンテキストコーディング
JP2023053018A (ja) 変換に基づく映像コーディング方法及びその装置
CN114651445B (zh) 基于变换的视频编码方法及其装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12758027

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 16-01-2014)

122 Ep: pct application non-entry in european phase

Ref document number: 12758027

Country of ref document: EP

Kind code of ref document: A1