CN112135147B - Encoding method, decoding method and device - Google Patents

Encoding method, decoding method and device Download PDF

Info

Publication number
CN112135147B
CN112135147B CN201910551639.1A CN201910551639A CN112135147B CN 112135147 B CN112135147 B CN 112135147B CN 201910551639 A CN201910551639 A CN 201910551639A CN 112135147 B CN112135147 B CN 112135147B
Authority
CN
China
Prior art keywords
current image
block
image block
sub
intra
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910551639.1A
Other languages
Chinese (zh)
Other versions
CN112135147A (en
Inventor
孙煜程
徐丽英
曹小强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910551639.1A priority Critical patent/CN112135147B/en
Publication of CN112135147A publication Critical patent/CN112135147A/en
Application granted granted Critical
Publication of CN112135147B publication Critical patent/CN112135147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/18Methods 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 a set of transform coefficients

Landscapes

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

Abstract

The application provides an encoding method, a decoding method and a device, wherein the encoding method comprises the following steps: and when the intra-frame sub-block division mode of the current image block is determined to be a vertical division mode, the size of the current image block is M N, and M is more than or equal to 8, only performing vertical transformation on the current image block, and encoding transformation coefficients into a code stream. The method can avoid frequent hardware address offset caused by the transformation of the horizontal dimension, improve the video coding performance and avoid the condition that the transformation of the horizontal dimension cannot meet the requirement of throughput rate.

Description

Encoding method, decoding method and device
Technical Field
The present application relates to video encoding and decoding technologies, and in particular, to an encoding method, a decoding method, and an apparatus.
Background
Complete video coding generally includes operations of prediction, transformation, quantization, entropy coding, filtering, and so on. Wherein the prediction comprises intra prediction and inter prediction.
In the intra-frame prediction, strong spatial correlation exists between adjacent image blocks in an image, so that pixels which are reconstructed around can be used as reference pixels to predict a current uncoded block, and only a residual signal (an original signal-a prediction signal) needs to be subjected to subsequent coding processing instead of the original signal, so that redundancy in a spatial domain is effectively removed, and the compression efficiency of a video signal is greatly improved.
Transformation refers to the conversion of an image described in the form of pixels in the spatial domain into the transform domain, represented in the form of transform coefficients. Most images contain more flat areas and slowly-changing areas, the image energy can be converted into the relative concentrated distribution in a transform domain through proper transformation, the frequency domain correlation among signals is removed, and code streams can be effectively compressed by matching with a quantization process.
Currently, universal Video Coding (VVC) supports Intra Sub-block partitioning (ISP) technology. The ISP technology divides the intra-prediction block into several sub-blocks, i.e. one Coding Unit (CU) can be divided horizontally or vertically into several small sub-blocks (sub-CUs).
For example, for a 16x8 intra-predicted block, it may be divided horizontally into 4 16x2 sub-blocks, or vertically into 4x8 sub-blocks; for a 4X8 intra-predicted block, it may be divided horizontally into 2 4X4 sub-blocks, or divided vertically into 2X8 sub-blocks.
The intra prediction block may be divided horizontally (may be referred to as an ISP horizontal division mode) or vertically (may be referred to as an ISP vertical division mode) and may be determined based on a Rate-Distortion cost (RDO) at an encoding end.
In current video coding schemes, when the intra-prediction block is transformed in the ISP vertical partition mode, the intra-prediction block is usually divided into a plurality of sub-blocks and then two-dimensionally transformed.
For example, assuming that the intra-prediction block has a size of 8 × n, in the ISP vertical partition mode, the current video coding scheme divides the intra-prediction block into 4 sub-blocks of 2 × n, and performs two-dimensional transformation on each sub-block.
In practice, it has been found that, in the above intra-prediction block transformation scheme, when performing horizontal-dimensional transformation on 2 × n sub-blocks, frequent hardware address offset is caused, video coding performance is reduced, and the horizontal-dimensional transformation is difficult to meet the requirement of throughput.
Disclosure of Invention
In view of the above, the present application provides a video image processing method and apparatus.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of embodiments of the present application, there is provided an encoding method, including:
and when the intra-frame sub-block division mode of the current image block is determined to be a vertical division mode, the size of the current image block is M N, and M is more than or equal to 8, only performing vertical transformation on the current image block, and encoding transformation coefficients into a code stream.
According to a second aspect of embodiments of the present application, there is provided a decoding method, including:
determining the size of the current image block according to the code stream;
judging whether the current image block is in an intra-frame subblock division mode or not according to the code stream;
and when the current image block is in an intra-frame sub-block division mode and is in a vertical division mode, the size of the current image block is M N, and M is more than or equal to 8, only performing vertical inverse transformation on the transformation coefficient of the current image block acquired from the code stream.
According to a third aspect of embodiments of the present application, there is provided an encoding apparatus including:
a determining unit for determining an intra sub-block division mode of a current image block and determining a size of the current image block;
and the coding unit is used for only carrying out vertical transformation on the current image block and coding a transformation coefficient into a code stream when the determining unit determines that the intra-frame sub-block division mode of the current image block is a vertical division mode, the size of the current image block is M x N, and M is more than or equal to 8.
According to a fourth aspect of embodiments of the present application, there is provided a decoding apparatus comprising:
the determining unit is used for determining the size of the current image block according to the code stream;
the judging unit is used for judging whether the current image block is in an intra-frame subblock division mode or not according to the code stream;
and the decoding unit is used for only carrying out vertical inverse transformation on the transformation coefficient of the current image block acquired from the code stream when the current image block is in an intra-frame sub-block division mode and is in a vertical division mode, the size of the current image block is M x N, and M is more than or equal to 8.
According to a fifth aspect of embodiments herein, there is provided an encoding apparatus comprising a processor and a machine-readable storage medium storing machine-readable instructions executable by the processor, the processor being caused by the machine-readable instructions to:
and when the intra-frame subblock division mode of the current image block is determined to be a vertical division mode, the size of the current image block is M x N, and M is more than or equal to 8, only performing vertical transformation on the current image block, and encoding a transformation coefficient into a code stream.
According to a sixth aspect of embodiments herein, there is provided a decoding apparatus comprising a processor and a machine-readable storage medium storing machine-readable instructions executable by the processor, the processor being caused by the machine-readable instructions to:
determining the size of the current image block according to the code stream;
judging whether the current image block is in an intra-frame subblock division mode or not according to the code stream;
and when the current image block is in an intra-frame sub-block division mode and is in a vertical division mode, the size of the current image block is M N, and M is more than or equal to 8, only performing vertical inverse transformation on the transformation coefficient of the current image block acquired from the code stream.
According to the encoding method and the decoding method, for the current image block of which the intra-frame subblock division mode is the vertical division mode and the size is M N, M is more than or equal to 8, when encoding is carried out, only vertical conversion is carried out on the current image block, and a conversion coefficient is encoded into a code stream; when decoding is carried out, only the vertical inverse transformation is carried out on the transformation coefficient of the current image block obtained from the code stream, so that the frequent deviation of a hardware address caused by the transformation of a horizontal dimension is avoided, the video coding performance is improved, and the problem that the transformation of the horizontal dimension cannot meet the requirement of throughput rate is avoided.
Drawings
FIGS. 1A-1B are schematic diagrams of block partitions shown in an exemplary embodiment of the present application;
fig. 2A is a schematic diagram of an intra sub-block division mode;
FIG. 2B is a schematic diagram of a horizontal partition or a vertical partition of a 4x8 or 8x4 intra-predicted block;
FIG. 2C is a schematic diagram of horizontal or vertical partitioning of an intra-predicted block for sizes other than 4x8, 8x4, and 4x 4;
FIG. 3 is a flow chart illustrating an encoding method according to an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of a vertical transform shown in an exemplary embodiment of the present application;
FIG. 5 is a flow chart diagram illustrating a decoding method according to an exemplary embodiment of the present application;
FIG. 6 is a flow chart illustrating an encoding method according to an exemplary embodiment of the present application;
FIG. 7 is a flowchart illustrating a decoding method according to an exemplary embodiment of the present application;
fig. 8 is a schematic diagram illustrating a hardware structure of an encoding apparatus according to an exemplary embodiment of the present application;
fig. 9 is a schematic structural diagram of an encoding apparatus according to an exemplary embodiment of the present application;
fig. 10 is a schematic diagram illustrating a hardware structure of a decoding apparatus according to an exemplary embodiment of the present application;
fig. 11 is a schematic structural diagram of a decoding apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In order to make those skilled in the art better understand the technical solutions provided by the embodiments of the present application, a brief description will be given below of the block division technique in the existing video coding standard, the existing intra sub-block division scheme, and some technical terms related to the embodiments of the present application.
1. Block partitioning techniques in existing video coding standards
In HEVC, one CTU (Coding Tree Unit) is recursively divided into CUs using a quadtree. It is determined at the leaf node CU level whether intra-coding or inter-coding is used. A CU may be further divided into two or four PUs (Prediction units), and the same Prediction information is used in the same PU. After obtaining residual information after prediction is completed, a CU may be further divided into TUs (Transform Units) in four ways. For example, the current image block in this application is a PU.
However, there is a large change in the block partitioning technique in the newly proposed VVC (Video Coding for general purpose). A mixed binary tree/ternary tree/quadtree partition structure replaces the original partition mode, cancels the concept division of original CU, PU and TU, and supports a more flexible partition mode of the CU. The CU may be a square or a rectangular partition. The CTU first performs the partition of the quadtree, and then the leaf nodes of the quadtree partition may further perform the partition of the binary tree and the ternary tree. As shown in fig. 1A, the CU has five partition types, which are quadtree partition, horizontal binary tree partition, vertical binary tree partition, horizontal ternary tree partition and vertical ternary tree partition, respectively, as shown in fig. 1B, a CU partition in a CTU may be any combination of the above five partition types, and different partition manners are known from the above, so that the shape of each PU is different, such as rectangle or square with different sizes.
2. Existing intra sub-block partitioning scheme
Referring to fig. 2A, the current intra sub-block division mode can be as shown in fig. 2A, where W is the width of the sub-block, H is the height of the sub-block, k is the number of sub-blocks, W is the width of the intra prediction block, and H is the height of the intra prediction block. For an intra-prediction block, a Horizontal partition mode (Horizontal Split) or a Vertical partition mode (Vertical Split) is adopted, which can be determined by an encoding end device based on the RDO principle.
For example, as shown in fig. 2B, for a 4x8 or 8x4 intra-predicted block, the intra-predicted block may be divided into 2 sub-blocks in a horizontal or vertical division manner.
For another example, as shown in fig. 2C, for intra-prediction blocks of other sizes than 4x8, 8x4 and 4x4 (both width and height are greater than 4), the intra-prediction blocks may be divided into 4 sub-blocks in a horizontal or vertical division manner.
3. Technical terms
Prediction pixel (Prediction Signal): the method is characterized in that a residual error is obtained through the difference between an original pixel and a predicted pixel according to a pixel value derived from a pixel which is coded and decoded, and then residual error transformation quantization and coefficient coding are carried out.
For example, the inter-frame prediction pixel refers to a pixel value derived from a reference frame (reconstructed pixel frame) of a current image block, and due to the discrete pixel positions, a final prediction pixel needs to be obtained through an interpolation operation. The closer the predicted pixel is to the original pixel, the smaller the residual energy obtained by subtracting the predicted pixel and the original pixel is, and the higher the coding compression performance is.
Intra Prediction (Intra Prediction): refers to a prediction mode for predicting a prediction value of a current image block from reconstructed pixel values of a peripheral decoded area. Common ways include copying pixels in the angular direction and deriving the prediction values according to a certain gradient principle. Intra prediction removes the spatial correlation of the video/image.
Intra-frame sub-block division technique: the intra-frame block (the image block adopting the intra-frame prediction technology) is divided into a plurality of sub-blocks, and the sub-blocks are transformed independently, so that the sub-blocks can use the reconstruction values of other sub-blocks as reference pixels, and the accuracy of intra-frame prediction is improved.
Horizontal transformation (Horizental transform) and Vertical transformation (Vertical transform): in the transform stage of video coding, a two-dimensional residual signal is input, and X = a · f is given as the following expression T Then F = B · X T Namely:
F=B·f·A T =B·(A·f T ) T
therefore, the forward transformation of a two-dimensional signal can be realized by two times of one-dimensional forward transformation. Obtaining an M X N signal X after the first forward transformation, removing the correlation between the horizontal pixels of the two-dimensional residual signal, which can be called horizontal transformation, and A is called a horizontal transformation matrix; the second positive transform removes correlation between vertical direction pixels of the two-dimensional residual signal, and may be referred to as a vertical transform, and B is referred to as a vertical transform matrix.
Rate-distortion cost: the index for evaluating the coding efficiency includes: code rate and Peak Signal to Noise Ratio (PSNR). The smaller the code rate, the larger the compression rate; the larger the PSNR, the better the reconstructed image quality. In the mode selection, the discriminant formula is essentially the comprehensive evaluation of the two.
Cost corresponding to the mode: j (mode) = D + λ R. Wherein D represents Distortion (Distortion), which is usually measured by using SSE (sum of mean square differences) index, where SSE refers to the sum of mean square differences between a reconstructed block and a source image block; λ is the Lagrangian multiplier; r is the actual number of bits required for coding the image block in this mode, including the sum of bits required for coding mode information, motion information, residual, and so on.
When selecting the mode, if the RDO principle is used to make a comparison decision on the coding mode, the best coding performance can be ensured.
In order to make the aforementioned objects, features and advantages of the embodiments of the present application more comprehensible, embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 3, a flowchart of an encoding method provided in an embodiment of the present application is shown, where the encoding method may be applied to an encoding end device, and as shown in fig. 3, the encoding method may include the following steps:
and step S300, when the intra-frame sub-block division mode of the current image block is determined to be a vertical division mode, the size of the current image block is M N, and M is more than or equal to 8, only vertical conversion is carried out on the current image block, and the conversion coefficient is coded into a code stream.
In the embodiment of the present application, when it is determined that the intra prediction technology is adopted for the current image block, on one hand, the size of the current image block may be determined, and on the other hand, when the ISP technology is enabled for the current image block, the intra sub-block division mode of the current image block may be determined.
Illustratively, for the encoding-side device, the current image block is an encoding block, and will not be described below.
Illustratively, the intra subblock division modes of the current image block include a vertical division mode and a horizontal division mode.
Illustratively, when it is determined that the intra sub-block division mode of the current image block is a vertical division mode and the size of the current image block is an image block of M × N (M is greater than or equal to 8), only vertical transformation may be performed on the current image block, that is, vertical transformation is performed on the current image block, instead of horizontal transformation, so as to avoid frequent offset of hardware addresses caused by transformation of horizontal dimensions, improve video coding performance, and avoid that the transformation of horizontal dimensions cannot meet throughput rate requirements.
In one example, taking M =8 as an example, that is, the size of the current image block is 8 × n, when the intra sub-block division mode of the current image block is the vertical division mode, 8 columns of the current image block may be respectively vertically transformed.
For example, referring to fig. 4, a schematic diagram of a vertical transform provided in an embodiment of the present application shows that, for an intra-prediction block with a size of M × N (M ≧ 8) and an intra-subblock partition mode being a vertical partition mode, M columns of the intra-prediction block may be respectively subjected to the vertical transform.
For each column of the intra prediction block, the column of transform coefficients may be obtained by multiplying each row of the vertical transform kernel by the column, respectively (the result of multiplying the first row of the vertical transform kernel by the column is the first value of the column of transform coefficients, \ 8230;, and the result of multiplying the last row of the vertical transform kernel by the column is the last value of the column of transform coefficients).
In a possible implementation manner, the encoding method may further include:
and when the intra sub-block division mode of the current image block is the vertical division mode, performing intra prediction on the whole current image block.
For example, in order to reduce the number of times of prediction of an intra-frame prediction block, for the intra-frame prediction block in which the intra-frame sub-block division mode is the vertical division mode, unlike the implementation manner of intra-frame prediction by sub-block, the encoding-side device may perform intra-frame prediction on the entire current image block instead of performing intra-frame prediction separately after dividing the intra-frame prediction block into a plurality of sub-blocks.
In another possible implementation manner, the encoding method may further include:
when the intra-frame sub-block division mode of the current image block is a vertical division mode, the current image block is divided into K sub-blocks, and intra-frame prediction is respectively carried out on each sub-block, wherein K is more than or equal to 2.
As an example, K is equal to 2 and the size of each sub-block is equal.
For example, in order to reduce the number of predictions of an intra prediction block, for an intra prediction block in which the intra sub-block division mode is a vertical division mode, the intra prediction block may be equally divided into 2 sub-blocks, and the 2 sub-blocks may be intra predicted, respectively.
It can be seen that, in the embodiment of the present application, for the same intra-prediction block, when the intra-prediction block is predicted and transformed, the way of sub-block division of the intra-prediction block may be different.
For example, taking an intra-frame prediction block with a size of 8 × n and an intra-frame sub-block division mode as a vertical division mode as an example, when the intra-frame prediction block is intra-frame predicted, the intra-frame prediction block may not be sub-block divided, that is, the entire intra-frame prediction block is intra-frame predicted; when the intra prediction block is transformed, the intra prediction block may be divided into 8 sub blocks of 1 × n, and each sub block may be transformed vertically, i.e., when the same intra prediction block is predicted and transformed, the sub block division may not be uniform.
For another example, still taking the intra sub-block division mode as the vertical division mode and taking the intra prediction block with the size of 8 × n as an example, when performing intra prediction on the intra prediction block, the intra prediction block may be divided into 2 sub-blocks with equal size, and the 2 sub-blocks are subjected to intra prediction respectively; when the intra prediction block is transformed, the intra prediction block may be divided into 8 sub blocks of 1 × n, and each sub block may be vertically transformed.
It should be noted that, in the embodiment of the present application, in the implementation manner of performing intra prediction on the entire current image block, sub-block division may not be performed on the image block, or sub-blocks may be divided according to requirements, and all sub-blocks are used as one sub-block group (or called as a sub-block group, the same applies below) to perform intra prediction on the entire sub-block group.
Similarly, in an implementation manner of equally dividing the current image block into 2 subblocks and performing intra prediction respectively, the current image block may be equally divided into 2 subblocks, or the current image block may be divided into more (greater than 2) subblocks and all the subblocks are grouped to obtain 2 equally large subblock groups, and the 2 subblock groups are subjected to intra prediction respectively.
As a possible implementation manner, the encoding method further includes:
and when the intra-frame sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M x N, respectively encoding corresponding indication information by each column of transformation coefficients of the current image block.
Illustratively, the indication information corresponding to each column of transform coefficients is used to identify whether all the columns of transform coefficients are 0.
For example, by performing intra prediction on the entire current image block and performing only vertical transformation on the current image block, a prediction value of each pixel in the current image block can be obtained by performing intra prediction on the current image block, and a residual block corresponding to the current image block can be obtained according to the prediction value and an original value of each pixel in the current image block. When transforming, each column of residual in the residual block is transformed and quantized to obtain each column of transform coefficients. For each column of transform coefficients, the encoding end device may identify whether all the column of transform coefficients are 0 by encoding the corresponding indication information.
For example, since the encoding end device performs vertical transform on each column when the intra-frame prediction block with the intra-sub-block division mode being the vertical division mode is transformed, in order to ensure that the decoding end device decodes correctly, for the intra-frame prediction block with the intra-frame sub-block division mode being the vertical division mode and the size being M × N (M ≧ 8), the encoding end device may encode corresponding indication information (which may also be referred to as cbf syntax) for each column of transform coefficients, that is, encode a set of cbf syntax for each column of transform coefficients.
For example, still taking M =8 as an example, that is, the size of the current image block is 8 × n, when the intra sub-block division mode of the current image block is the vertical division mode, for each row of transform coefficients in the transform coefficient block of the current image block (a row of transform coefficients corresponds to a row of pixels of the current image), the encoding side device may encode a set of cbf syntax for each row of transform coefficients respectively, so as to ensure that the decoding side device decodes correctly.
As a possible implementation manner, encoding the transform coefficient into the code stream may include:
and coding each column of transformation coefficients of the current image block into a code stream respectively.
For example, when the encoding end device transforms an intra prediction block of M × N in which an intra sub-block division mode is a vertical division mode, only a current image block is vertically transformed, so that to ensure correct decoding by the decoding end device, for the intra prediction block of which the intra sub-block division mode is the vertical division mode and the size is M × N (M is greater than or equal to 8), when the encoding end device scans a transform coefficient block, each column of transform coefficients of the transform coefficient block is scanned, that is, each column of transform coefficients is sequentially encoded into a code stream.
For example, still taking M =8 as an example, that is, the size of the current image block is 8 × n, when the intra sub-block division mode of the current image block is the vertical division mode, the encoding-side device scans the transform coefficient block (that is, when the transform coefficient block is encoded into the code stream), and may scan each column of transform coefficients of the transform coefficient block, and sequentially encode each column of transform coefficients into the code stream, that is, sequentially encode each column (total 8 columns) of transform coefficients into the code stream according to the order of the 1 st column of transform coefficients, the 2 nd column of transform coefficients, the 8230, and the 8 th column of transform coefficients.
As a possible implementation, the encoding scheme may further include:
and when the intra-frame sub-block division mode of the current image block is determined to be a horizontal division mode, the size of the current image block is M x N, and N is more than or equal to 8, performing only horizontal conversion on the current image block, and encoding conversion coefficients into a code stream.
For example, when it is determined that the intra-frame sub-block division mode of the current image block is a horizontal mode and the size of the current image block is M × N (N is greater than or equal to 8), only horizontal transformation may be performed on the current image block, that is, the current image block is subjected to horizontal transformation, but not vertical transformation, so as to avoid frequent shift of hardware addresses caused by vertical-dimension transformation, improve video coding performance, and avoid that the vertical-dimension transformation cannot meet the throughput rate requirement.
In one example, the encoding method may further include:
and when the intra sub-block division mode of the current image block is the horizontal division mode, performing intra prediction on the whole current image block.
For example, in order to reduce the number of times of prediction of an intra-prediction block, for an intra-prediction block in which an intra-sub-block partition mode is a horizontal partition mode, unlike an implementation manner of intra-prediction by sub-block, an encoding-side device may perform intra-prediction on an entire current image block instead of performing intra-prediction separately after dividing the intra-prediction block into a plurality of sub-blocks.
Referring to fig. 5, a flowchart of a decoding method provided in an embodiment of the present application is shown, where the encoding method may be applied to a decoding-end device, and as shown in fig. 3, the decoding method may include the following steps:
and S500, determining the size of the current image block according to the code stream.
Step S510, judging whether the current image block is in the intra-frame sub-block division mode according to the code stream.
In the embodiment of the application, when the decoding-end equipment receives the code stream, on one hand, the size of the current image block can be determined by analyzing the code stream; on the other hand, whether the current image block is in the intra-frame sub-block division mode or not is judged, namely whether the current block enables the ISP technology or not.
Illustratively, for the decoding-side device, the current image block is a decoded block, which will not be described below.
For example, the encoding end device may notify the decoding end device whether the current image block is in the intra-frame subblock division mode by carrying a preset flag bit in the code stream.
It should be noted that, in the embodiment of the present application, there is no necessary timing relationship between step S500 and step S510, that is, the operation in step S500 may be executed first, and then the operation in step S510 may be executed as shown in fig. 5; the operation in step S510 may be performed first, and then the operation in step S500 may be performed; the operation in step S500 and the operation in step S510 may also be performed in parallel.
And step S520, when the current image block is in an intra-frame sub-block division mode and is in an intra-frame sub-block vertical division mode, and the size of the current image block is M N, wherein M is not less than 8, the transform coefficient of the current image block acquired from the code stream is only subjected to vertical inverse transform.
In the embodiment of the present application, when the decoding-end device determines that the current image block is the intra sub-block division mode, it may also determine that the current image block is the intra sub-block vertical division mode or the intra sub-block horizontal division mode.
Illustratively, in order to avoid frequent hardware address offset caused by horizontal dimension transformation, improve video coding performance, and avoid that the horizontal dimension transformation cannot meet throughput requirements, an encoding end device is in a vertical partition mode for an intra-frame subblock partition mode, and only performs vertical transformation on an image block with the size of M × N (M is greater than or equal to 8), so that, when a decoding end device receives a code stream, and determines that a current image block is in the intra-frame subblock partition mode and in the intra-frame subblock vertical partition mode, and the size of the current image block is M × N (M is greater than or equal to 8), the decoding end device acquires a transformation coefficient of the current image block from the code stream, only performs vertical inverse transformation on the transformation coefficient.
For any column of transform coefficients, when the decoding-end device acquires the column of transform coefficients from the code stream, inverse quantization processing may be performed on the transform coefficients first, and then inverse vertical transform may be performed on the transform coefficients after the inverse quantization processing, so as to obtain a residual error corresponding to the column of transform coefficients.
In an example, taking M =8 as an example, that is, the size of the current image block is 8 × n, when the intra sub-block division mode of the current image block is a vertical division mode, and the decoding-end device acquires the transform coefficient of the current image block from the code stream, the transform coefficient may be only subjected to vertical inverse transform.
As a possible implementation manner, the decoding method may further include:
and when the intra sub-block division mode of the current image block is the vertical division mode, performing intra prediction on the whole current image block.
For example, in order to reduce the number of times of prediction of an intra-frame prediction block, for an intra-frame prediction block in which an intra-frame sub-block division mode is a vertical division mode, unlike an implementation manner of intra-frame prediction by sub-block, a decoding-side device may perform intra-frame prediction on an entire current image block instead of performing intra-frame prediction separately by dividing into a plurality of sub-blocks.
As another possible implementation, the decoding method may further include:
when the intra-frame sub-block division mode of the current image block is a vertical division mode, the current image block is divided into K sub-blocks, and intra-frame prediction is respectively carried out on each sub-block, wherein K is more than or equal to 2.
As an example, K is equal to 2 and the size of each sub-block is equal.
For example, in order to reduce the number of predictions of an intra prediction block, for an intra prediction block in which the intra sub-block division mode is a vertical division mode, the intra prediction block may be equally divided into 2 sub-blocks, and the 2 sub-blocks may be intra predicted, respectively.
It should be noted that, in the embodiment of the present application, in the implementation manner of performing intra prediction on the entire current image block, sub-block division may not be performed on the image block, or sub-blocks may be divided according to requirements, and all sub-blocks are used as one sub-block group (or called as a sub-block group, the same applies below) to perform intra prediction on the entire sub-block group.
Similarly, in an implementation manner of equally dividing the current image block into 2 subblocks and performing intra prediction respectively, the current image block may be equally divided into 2 subblocks, or the current image block may be divided into more (greater than 2) subblocks and all the subblocks are grouped to obtain 2 equally large subblock groups, and the 2 subblock groups are subjected to intra prediction respectively.
As a possible implementation manner, the decoding method may further include:
when the intra sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M x N, a set of cbf syntax is analyzed for each column of transform coefficients of the current image block respectively.
For example, when the intra prediction block with the intra sub-block division mode being M × N is transformed, the encoding end device performs vertical transformation on each column, and encodes corresponding indication information for each column of transform coefficients, so that the decoding end device can analyze corresponding indication information for each column of transform coefficients of the current image block.
As a possible implementation manner, the decoding method may further include: and when the intra-frame sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M x N, analyzing each column of transformation coefficients of the current image block from the code stream respectively.
For example, when the encoding-side device transforms the intra prediction block of M × N in which the intra sub-block partition mode is the vertical partition mode, only the current image block is vertically transformed, and when the transform coefficient block is scanned, each column of transform coefficients of the transform coefficient block is scanned, that is, each column of transform coefficients is sequentially encoded into the code stream, so that when the decoding-side device performs coefficient analysis, each column of transform coefficients of the transform coefficient block is analyzed (the coefficient analysis operation is performed in columns), that is, the decoding-side device may restore the received transform coefficients to the corresponding position of the transform coefficient block in the reverse scanning order.
As a possible implementation, the decoding scheme may further include:
and when the intra-frame sub-block division mode of the current image block is determined to be a horizontal division mode, and the size of the current image block is M x N, wherein N is more than or equal to 8, only horizontal inverse transformation is carried out on the transformation coefficient of the current image block acquired from the code stream.
Illustratively, in order to avoid frequent shift of hardware addresses caused by vertical dimension transformation, improve video coding performance, and avoid that the vertical dimension transformation cannot meet throughput requirements, the coding end device is in a horizontal division mode for intra-frame sub-block division modes, and only performs horizontal transformation on image blocks with the size of M × N (N is greater than or equal to 8), so that when the decoding end device receives a code stream and determines that a current image block is in the intra-frame sub-block division mode and is in the intra-frame sub-block horizontal division mode, and the size of the current image block is M × N (N is greater than or equal to 8), the decoding end device obtains a transformation coefficient of the current image block from the code stream, the transformation coefficient can be only subjected to horizontal inverse transformation.
In one example, the decoding method may further include:
and when the intra sub-block division mode of the current image block is a horizontal division mode, performing intra prediction on the whole current image block.
For example, in order to reduce the number of times of prediction of an intra-frame prediction block, for an intra-frame prediction block in which an intra-frame sub-block division mode is a horizontal division mode, unlike an implementation manner of intra-frame prediction by sub-block, a decoding-side device may perform intra-frame prediction on an entire current image block instead of performing intra-frame prediction separately after dividing the intra-frame prediction block into a plurality of sub-blocks.
In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below with reference to specific examples.
In the following embodiments, all image blocks that enable the ISP technology (hereinafter referred to as ISP blocks, which are encoding blocks for encoding end devices and decoding blocks for decoding end devices) are taken as examples, and the intra sub block division mode of the ISP block is a vertical division mode.
Example one
For example, the prediction block size and transform block size corresponding to the size of the ISP block may be as shown in table 1:
TABLE 1
Figure BDA0002105635240000101
As shown in table 1, for a 4 × 8 ISP block, when performing prediction, intra prediction can be performed on the entire ISP block; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1 × 8, and each sub-block may be transformed vertically.
For ISP blocks of 4xN (N is more than 8), when prediction is carried out, intra-frame prediction can be carried out on the whole ISP block; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1xN, and each sub-block may be transformed vertically.
For an 8x4 ISP block, when performing prediction, the entire ISP block may be divided into 24 x4 sub-blocks, and intra prediction may be performed on each sub-block; in the transformation, the entire ISP block may be divided into 24 × 4 sub-blocks, and each sub-block is transformed in two dimensions (including vertical transformation and horizontal transformation).
For an ISP block of 8xN (N > 4), when performing prediction, the whole ISP block may be divided into 2 subblocks of 4xN, and each subblock is intra-predicted; in the transform, the entire ISP block may be divided into 8 1xN sub-blocks, and each sub-block may be vertically transformed.
Example two
For example, the prediction block size and transform block size corresponding to the size of the ISP block may be as shown in table 2:
TABLE 2
Figure BDA0002105635240000111
As shown in table 2, for a 4 × 8 ISP block, when performing prediction, intra prediction can be performed on the entire ISP block; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1 × 8, and each sub-block may be transformed vertically.
For ISP blocks of 4xN (N is more than 8), when prediction is carried out, intra-frame prediction can be carried out on the whole ISP block; in the transform, the entire ISP block may be divided into 4 1xN sub-blocks, and each sub-block may be vertically transformed.
For an 8x4 ISP block, when performing prediction, the whole ISP block may be divided into 2 sub-blocks of 4x4, and each sub-block is intra-predicted; when performing transformation, the entire ISP block may be divided into 8 1 × 4 sub-blocks, and each sub-block may be vertically transformed.
For an ISP block of 8xN (N > 4), when performing prediction, the whole ISP block may be divided into 2 subblocks of 4xN, and intra prediction may be performed on each subblock; in the transform, the entire ISP block may be divided into 8 1xN sub-blocks, and each sub-block may be vertically transformed.
EXAMPLE III
For example, the prediction block size and transform block size corresponding to the size of the ISP block may be as shown in table 3:
TABLE 3
Figure BDA0002105635240000112
As shown in table 3, for a 4 × 8 ISP block, when performing prediction, intra prediction may be performed on the entire ISP block; in the transformation, the entire ISP block may be divided into 4 1 × 8 sub-blocks, and each sub-block may be transformed vertically.
For ISP blocks of 4xN (N is more than 8), when prediction is carried out, intra-frame prediction can be carried out on the whole ISP block; in the transform, the entire ISP block may be divided into 4 1xN sub-blocks, and each sub-block may be vertically transformed.
For an 8x4 ISP block, intra prediction can be performed on the entire ISP block during prediction; in the transformation, the entire ISP block may be divided into 24 × 4 sub-blocks, and each sub-block may be transformed in two dimensions.
For ISP blocks of 8xN (N is more than 4), when prediction is carried out, intra-frame prediction can be carried out on the whole ISP block; in the transform, the entire ISP block may be divided into 8 1xN sub-blocks, and each sub-block may be vertically transformed.
Example four
For example, the prediction block size and transform block size corresponding to the size of the ISP block may be as shown in table 4:
TABLE 4
Figure BDA0002105635240000121
As shown in Table 4, for ISP blocks of 4xN (N ≧ 8), intra prediction can be performed on the entire ISP block when prediction is performed; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1xN, and each sub-block may be transformed vertically.
For ISP blocks with 8xN (N is more than or equal to 4), the intra-frame prediction can be carried out on the whole ISP blocks when the prediction is carried out; in the transform, the entire ISP block may be divided into 8 1xN sub-blocks, and each sub-block may be vertically transformed.
EXAMPLE five
For example, the prediction block size and transform block size corresponding to the size of the ISP block may be as shown in table 5:
TABLE 5
Figure BDA0002105635240000122
As shown in table 5, for a 4 × 8 ISP block, when performing prediction, intra prediction can be performed on the entire ISP block; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1 × 8, and each sub-block may be transformed vertically.
For ISP blocks of 4xN (N is more than 8), when prediction is carried out, intra-frame prediction can be carried out on the whole ISP block; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1xN, and each sub-block may be transformed vertically.
For an 8x4 ISP block, intra prediction may be performed on the entire ISP block during prediction; when performing transformation, the entire ISP block may be divided into 8 1 × 4 sub-blocks, and each sub-block may be vertically transformed.
For an ISP block of 8xN (N > 4), when performing prediction, the whole ISP block may be divided into 2 subblocks of 4xN, and intra prediction may be performed on each subblock; in the transform, the entire ISP block may be divided into 8 1xN sub-blocks, and each sub-block may be vertically transformed.
Example six
For example, the prediction block size and transform block size corresponding to the size of the ISP block may be as shown in table 6:
TABLE 6
Figure BDA0002105635240000131
As shown in table 6, for a 4 × 8 ISP block, when performing prediction, intra prediction can be performed on the entire ISP block; in the transformation, the entire ISP block may be divided into 4 1 × 8 sub-blocks, and each sub-block may be transformed vertically.
For ISP blocks of 4xN (N is more than 8), when prediction is carried out, intra-frame prediction can be carried out on the whole ISP block; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1xN, and each sub-block may be transformed vertically.
For an 8x4 ISP block, intra prediction may be performed on the entire ISP block during prediction; in the transformation, the entire ISP block may be divided into 24 × 4 sub-blocks, and each sub-block may be transformed in two dimensions.
For an ISP block of 8xN (N > 4), when performing prediction, the whole ISP block may be divided into 2 subblocks of 4xN, and intra prediction may be performed on each subblock; in the transformation, the entire ISP block may be divided into 8 sub-blocks of 1xN, and each sub-block may be transformed vertically.
EXAMPLE seven
For example, the prediction block size and transform block size corresponding to the size of the ISP block may be as shown in table 7:
TABLE 7
Figure BDA0002105635240000132
As shown in table 7, for ISP blocks of 4xN (N > 8), intra prediction can be performed on the entire ISP block when prediction is performed; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1xN, and each sub-block may be transformed vertically.
For an 8x4 ISP block, intra prediction can be performed on the entire ISP block during prediction; in the transformation, the entire ISP block may be divided into 24 × 4 sub-blocks, and each sub-block may be transformed in two dimensions.
For an 8 × 8 ISP block, when performing prediction, the whole ISP block may be divided into 2 sub-blocks of 4 × 8, and intra-frame prediction may be performed on each sub-block; in the transformation, the entire ISP block may be divided into 24 × 8 sub-blocks, and each sub-block may be transformed in two dimensions.
For ISP blocks of 8xN (N is more than 4), when prediction is carried out, intra-frame prediction can be carried out on the whole ISP block; in the transformation, the entire ISP block may be divided into 8 sub-blocks of 1xN, and each sub-block may be transformed vertically.
Example eight
For example, the prediction block size and transform block size corresponding to the size of the ISP block may be as shown in table 8:
TABLE 8
Figure BDA0002105635240000141
As shown in table 8, for an ISP block of 4xN (N > 8), intra prediction can be performed on the entire ISP block when performing prediction; in the transformation, the entire ISP block may be divided into 4 sub-blocks of 1xN, and each sub-block may be transformed vertically.
For an 8 × 4 ISP block, when performing prediction, the whole ISP block may be divided into 2 sub-blocks, and intra prediction may be performed on each sub-block; in the transformation, the entire ISP block may be divided into 24 × 4 sub-blocks, and each sub-block may be transformed in two dimensions.
For an 8 × 8 ISP block, when performing prediction, the whole ISP block may be divided into 2 sub-blocks of 4 × 8, and intra-frame prediction may be performed on each sub-block; in the transformation, the entire ISP block may be divided into 24 × 8 sub-blocks, and each sub-block may be transformed in two dimensions.
For an ISP block of 8xN (N > 4), when performing prediction, the whole ISP block may be divided into 2 sub-blocks of 4 × 8, and each sub-block is intra-predicted; in the transform, the entire ISP block may be divided into 8 1xN sub-blocks, and each sub-block may be vertically transformed.
In the first to eighth embodiments, when an ISP block (an entire ISP block or sub-blocks) is transformed, the ISP block is transformed into a residual block corresponding to the ISP block (the sub-blocks may be transformed into sub-blocks, or after the residual block corresponding to the ISP block is divided into sub-blocks, sub-blocks of the residual blocks are transformed).
Illustratively, for the encoding-side device, the transformation includes a forward transformation and an inverse transformation (the inverse transformation is used for recovering a reconstructed value obtained by the inverse transformation of the decoding-side device); for the decoding side device, when the transform is performed, the inverse transform is performed without performing the forward transform.
For example, in the seventh embodiment or/and the eighth embodiment, the ISP vertical partition mode may not be enabled for the 4 × 8 image blocks.
For example, in the first to eighth embodiments, the transformation manner and/or the prediction manner of the ISP blocks of the same size may be exchanged between the embodiments.
For example, taking the second embodiment and the third embodiment as an example, for an ISP block with a size of 8xN (N > 4), in the second embodiment, the prediction method and the transformation method described in the third embodiment may also be adopted, that is, during prediction, intra prediction may be performed on the entire ISP block; in the transform, the entire ISP block may be divided into 8 1xN sub-blocks, and each sub-block may be vertically transformed.
Similarly, for an ISP block with a size of 8 × 4, in the third embodiment, the prediction method and the transformation method described in the second embodiment may also be adopted, that is, during prediction, the entire ISP block may be divided into 2 sub-blocks of 4 × 4, and intra prediction may be performed on each sub-block; when performing transformation, the entire ISP block may be divided into 8 1 × 4 sub-blocks, and each sub-block may be vertically transformed.
Example nine
For example, on the basis of any one of the first to eighth embodiments, the application unit of the cbf syntax is no longer the transform coefficient block corresponding to the entire ISP block, but each column of transform coefficients in the transform coefficient block.
For the encoding end equipment, respectively encoding a set of cbf syntax for each column of transformation coefficients in the transformation coefficient block corresponding to the ISP block;
for the decoding end equipment, a set of cbf syntax is respectively analyzed for each column of transformation coefficients in the transformation coefficient block corresponding to the ISP block.
Illustratively, the cbf syntax corresponding to each column of transform coefficients is used to identify whether the column of transform coefficients is all 0 s.
EXAMPLE ten
For example, on the basis of the first to ninth embodiments, when the transform coefficients in the transform coefficient block are scanned (the transform coefficients in the transform coefficient block are coded into the bitstream) or restored (the transform coefficients in the bitstream are restored to the transform coefficient block), the application unit is not the transform coefficient block corresponding to the entire ISP block, but each column of the transform coefficients in the transform coefficient block.
For the encoding end equipment, each column of transformation coefficients in the transformation coefficient block can be respectively encoded into a code stream;
for a decoding-end device, the transform coefficients may be parsed from the code stream and restored to the corresponding locations of the transform coefficient blocks in the reverse scan order (i.e., the order opposite to the order in which the transform coefficients are encoded into the code stream).
EXAMPLE eleven
For example, the decoding flow of the decoding-end device may be as shown in fig. 6, which may include the following steps:
and S600, receiving the code stream and analyzing the dividing mode of the current image block.
Step S610, determining whether the current block satisfies the sub-block division condition based on the parsed syntax. If yes, go to step S620; otherwise, the whole current image block is inverse transformed and intra predicted.
And S620, if the ISP technology is enabled in the current image block, performing inverse transformation and intra-frame prediction on the current image block based on the size of the current image block and the intra-frame sub-block division mode.
For example, when the intra sub-block division mode of the current image block is the vertical division mode, the decoding-side device may refer to the description in any one of the first to eighth embodiments for a specific implementation of performing inverse transformation and intra prediction on the current image block based on the size of the current image block and the intra sub-block division mode.
EXAMPLE twelve
For example, the decoding flow of the decoding-side device may be as shown in fig. 7, which may include the following steps:
and step S700, if the current image block meets the coding limiting condition, coding the division mode, the intra-frame prediction mode and the ISP division mode of the current image block into a code stream.
Step S710, if the ISP technology is enabled for the current image block, performing intra prediction and transformation on the current image block based on the size of the current image block and the intra sub-block division mode.
For example, when the intra sub-block division mode of the current image block is the vertical division mode, the encoding-side device may perform intra prediction and transform on the current image block based on the size of the current image block and the intra sub-block division mode, as described in any one of the first to eighth embodiments.
In the embodiment of the application, for the current image block of which the intra-frame subblock division mode is a vertical division mode and the size is M x N, wherein M is more than or equal to 8, when the current image block is coded, only vertical conversion is carried out on the current image block, and a conversion coefficient is coded into a code stream; when decoding is carried out, only the vertical inverse transformation is carried out on the transformation coefficient of the current image block obtained from the code stream, so that the frequent deviation of a hardware address caused by the transformation of a horizontal dimension is avoided, the video coding performance is improved, and the problem that the transformation of the horizontal dimension cannot meet the requirement of throughput rate is avoided.
The methods provided herein are described above. The following describes the apparatus provided in the present application:
please refer to fig. 8, which is a schematic diagram of a hardware structure of an encoding apparatus according to an embodiment of the present disclosure. The encoding apparatus may include a processor 801, a machine-readable storage medium 802 storing machine-executable instructions. The processor 801 and the machine-readable storage medium 802 may communicate via a system bus 803. Also, the processor 801 may perform the encoding method described above by reading and executing machine-executable instructions in the machine-readable storage medium 802 corresponding to the decode control logic.
The machine-readable storage medium 802 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
As shown in fig. 9, the encoding control logic may include, in terms of functional division: a determining unit 910 and an encoding unit 920; wherein:
a determining unit 910 for determining an intra sub-block division mode of a current image block and determining a size of the current image block;
and the encoding unit 920 is configured to, when the determining unit determines that the intra-frame subblock division mode of the current image block is a vertical division mode, and the size of the current image block is M × N, where M is greater than or equal to 8, perform only vertical transform on the current image block, and encode a transform coefficient into a code stream.
As a possible implementation manner, the encoding unit 920 is further configured to perform intra prediction on the entire current image block when the determining unit determines that the intra sub-block division mode of the current image block is the vertical division mode.
As a possible implementation manner, the encoding unit 920 is further configured to, when the determining unit determines that the intra sub-block division mode of the current image block is a vertical division mode, divide the current image block into K sub-blocks, and perform intra prediction on each sub-block, where K is greater than or equal to 2.
As a possible implementation, K is equal to 2, and the size of each sub-block is equal.
As a possible implementation manner, the encoding unit 920 is further configured to, when the determining unit determines that the intra sub-block division mode of the current image block is a vertical division mode, and the size of the current image block is M × N, encode corresponding indication information for each column of transform coefficients of the current image block; the indication information corresponding to each column of transform coefficients is used to identify whether all the columns of transform coefficients are 0.
As a possible implementation manner, the encoding unit 920 is specifically configured to encode each column of transform coefficients of the current image block into a code stream.
Please refer to fig. 10, which is a schematic diagram of a hardware structure of a decoding apparatus according to an embodiment of the present application. The decoding device may include a processor 1001, a machine-readable storage medium 1002 having stored thereon machine-executable instructions. The processor 1001 and the machine-readable storage medium 1002 may communicate via a system bus 1003. Also, the processor 1001 may perform the decoding method described above by reading and executing machine-executable instructions corresponding to the decoding control logic in the machine-readable storage medium 1002.
The machine-readable storage medium 1002 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain, or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
As shown in fig. 11, the decoding control logic may be functionally divided into: a determination unit 1110, a judgment unit 1120, and a decoding unit 1130; wherein:
a determining unit 1110, configured to determine a size of the current image block according to the code stream;
a determining unit 1120, configured to determine whether the current image block is an intra-frame sub-block partition mode according to the code stream;
the decoding unit 1130 is configured to perform only vertical inverse transform on a transform coefficient of the current image block obtained from a code stream when the current image block is in an intra-frame sub-block partition mode and is in a vertical partition mode, and the size of the current image block is M × N, where M is greater than or equal to 8.
As a possible implementation manner, the decoding unit 1130 is further configured to perform intra prediction on the entire current image block when the intra sub-block division mode of the current image block is a vertical division mode.
As a possible implementation manner, the decoding unit 1130 is further configured to, when the intra sub-block division mode of the current image block is a vertical division mode, divide the current image block into K sub-blocks, and perform intra prediction on each sub-block, where K is greater than or equal to 2.
As a possible implementation, K is equal to 2, and the sub-blocks are equal in size.
As a possible implementation manner, the decoding unit 1130 is further configured to, when the intra sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M × N, respectively analyze corresponding indication information for each column of transform coefficients of the current image block; the indication information corresponding to each column of transform coefficients is used to identify whether all the column of transform coefficients are 0.
As a possible implementation manner, the decoding unit 1130 is further configured to, when the intra-sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M × N, respectively analyze each column of transform coefficients of the current image block from the code stream.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (26)

1. A method of encoding, comprising:
when the intra-frame subblock division mode of the current image block is determined to be a vertical division mode, the size of the current image block is M x N, and M is more than or equal to 8, only performing vertical transformation on the current image block, and encoding a transformation coefficient into a code stream;
under the condition that the intra-frame sub-block division mode of the current image block is a vertical division mode, if the ratio of the product of the width and the height of the current image block to 4 is more than or equal to 16, the width of the sub-block is 1/4 of the width of the current image block, and the height of the sub-block is the height of the current image block; if the ratio of the product of the width and the height of the current image block to 4 is less than 16, the width of the sub block is the ratio of 16 to the height of the current image block, and the height of the sub block is the height of the current image block.
2. The method of claim 1, further comprising:
and when the intra-frame sub-block division mode of the current image block is determined to be the vertical division mode, performing intra-frame prediction on the whole current image block.
3. The method of claim 1, further comprising:
and when the intra-frame sub-block division mode of the current image block is determined to be a vertical division mode, dividing the current image block into K sub-blocks, and respectively performing intra-frame prediction on each sub-block, wherein K is more than or equal to 2.
4. The method of claim 3, wherein K is equal to 2 and the sub-blocks are equal in size.
5. The method according to any one of claims 1-4, further comprising:
when the intra-frame sub-block division mode of the current image block is determined to be a vertical division mode and the size of the current image block is M x N, respectively encoding corresponding indication information for each column of transformation coefficients of the current image block; the indication information corresponding to each column of transform coefficients is used to identify whether all the column of transform coefficients are 0.
6. The method according to any of claims 1-4, wherein said encoding the transform coefficients into a code stream comprises:
and respectively coding each column of transformation coefficients of the current image block into a code stream.
7. A method of decoding, comprising:
determining the size of the current image block according to the code stream;
judging whether the current image block is in an intra-frame subblock division mode or not according to the code stream;
when the current image block is in an intra-frame subblock division mode and is in a vertical division mode, the size of the current image block is M N, and M is more than or equal to 8, only performing vertical inverse transformation on a transformation coefficient of the current image block acquired from a code stream;
under the condition that the intra-frame sub-block division mode of the current image block is a vertical division mode, if the ratio of the product of the width and the height of the current image block to 4 is more than or equal to 16, the width of the sub-block is 1/4 of the width of the current image block, and the height of the sub-block is the height of the current image block; if the ratio of the product of the width and the height of the current image block to 4 is less than 16, the width of the sub block is the ratio of 16 to the height of the current image block, and the height of the sub block is the height of the current image block.
8. The method of claim 7, further comprising:
and when the intra-frame sub-block division mode of the current image block is a vertical division mode, performing intra-frame prediction on the whole current image block.
9. The method of claim 7, further comprising:
and when the intra-frame sub-block division mode of the current image block is a vertical division mode, dividing the current image block into K sub-blocks, and respectively performing intra-frame prediction on each sub-block, wherein K is more than or equal to 2.
10. The method of claim 9, wherein K is equal to 2 and the sub-blocks are equal in size.
11. The method according to any one of claims 7-10, further comprising:
when the intra-frame sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M x N, analyzing corresponding indication information for each column of transformation coefficients of the current image block respectively; the indication information corresponding to each column of transform coefficients is used to identify whether all the columns of transform coefficients are 0.
12. The method according to any one of claims 7-10, further comprising:
and when the intra-frame sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M x N, analyzing each column of transformation coefficients of the current image block from the code stream respectively.
13. An encoding apparatus, comprising:
a determining unit for determining an intra sub-block division mode of a current image block and determining a size of the current image block;
the encoding unit is used for only carrying out vertical transformation on the current image block and encoding a transformation coefficient into a code stream when the determining unit determines that the intra-frame sub-block division mode of the current image block is a vertical division mode, the size of the current image block is M x N, and M is more than or equal to 8;
under the condition that the intra-frame sub-block division mode of the current image block is a vertical division mode, if the ratio of the product of the width and the height of the current image block to 4 is more than or equal to 16, the width of the sub-block is 1/4 of the width of the current image block, and the height of the sub-block is the height of the current image block; if the ratio of the product of the width and the height of the current image block to 4 is less than 16, the width of the sub block is the ratio of 16 to the height of the current image block, and the height of the sub block is the height of the current image block.
14. The apparatus of claim 13,
the encoding unit is further configured to perform intra prediction on the entire current image block when the determining unit determines that the intra sub-block division mode of the current image block is the vertical division mode.
15. The apparatus of claim 13,
the encoding unit is further configured to, when the determining unit determines that the intra-frame sub-block division mode of the current image block is the vertical division mode, divide the current image block into K sub-blocks, and perform intra-frame prediction on each sub-block, where K is greater than or equal to 2.
16. The apparatus of claim 15, wherein K is equal to 2 and the sub-blocks are equal in size.
17. The apparatus according to any one of claims 13 to 16,
the encoding unit is further configured to, when the determining unit determines that the intra sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M × N, encode corresponding indication information for each column of transform coefficients of the current image block; the indication information corresponding to each column of transform coefficients is used to identify whether all the column of transform coefficients are 0.
18. The apparatus according to any one of claims 13 to 16,
the coding unit is specifically configured to code each column of transform coefficients of the current image block into a code stream.
19. A decoding apparatus, comprising:
the determining unit is used for determining the size of the current image block according to the code stream;
the judging unit is used for judging whether the current image block is in an intra-frame subblock dividing mode or not according to the code stream;
the decoding unit is used for only carrying out vertical inverse transformation on the transformation coefficient of the current image block acquired from the code stream when the current image block is in an intra-frame sub-block division mode and is in a vertical division mode, the size of the current image block is M x N, and M is more than or equal to 8;
under the condition that the intra-frame sub-block division mode of the current image block is a vertical division mode, if the ratio of the product of the width and the height of the current image block to 4 is more than or equal to 16, the width of the sub-block is 1/4 of the width of the current image block, and the height of the sub-block is the height of the current image block; if the ratio of the product of the width and the height of the current image block to 4 is less than 16, the width of the sub block is the ratio of 16 to the height of the current image block, and the height of the sub block is the height of the current image block.
20. The apparatus of claim 19,
the decoding unit is further configured to perform intra prediction on the entire current image block when the intra sub-block division mode of the current image block is a vertical division mode.
21. The apparatus of claim 19,
and the decoding unit is also used for dividing the current image block into K sub-blocks and respectively carrying out intra-frame prediction on each sub-block when the intra-frame sub-block division mode of the current image block is a vertical division mode, wherein K is more than or equal to 2.
22. The apparatus of claim 21, wherein K is equal to 2 and the sub-blocks are equal in size.
23. The apparatus of any one of claims 19-22,
the decoding unit is further configured to, when the intra-frame sub-block division mode of the current image block is a vertical division mode and the size of the current image block is M × N, analyze corresponding indication information for each column of transform coefficients of the current image block respectively; the indication information corresponding to each column of transform coefficients is used to identify whether all the column of transform coefficients are 0.
24. The apparatus of any one of claims 19-22,
the decoding unit is further configured to analyze each column of transform coefficients of the current image block from the code stream respectively when the intra-frame sub-block partition mode of the current image block is a vertical partition mode and the size of the current image block is M × N.
25. An encoding apparatus comprising a processor and a machine-readable storage medium storing machine-readable instructions executable by the processor, the processor being caused by the machine-readable instructions to:
when the intra-frame subblock division mode of the current image block is determined to be a vertical division mode, the size of the current image block is M x N, and M is more than or equal to 8, only vertical conversion is carried out on the current image block, and a conversion coefficient is coded into a code stream;
under the condition that the intra-frame sub-block division mode of the current image block is a vertical division mode, if the ratio of the product of the width and the height of the current image block to 4 is more than or equal to 16, the width of the sub-block is 1/4 of the width of the current image block, and the height of the sub-block is the height of the current image block; if the ratio of the product of the width and the height of the current image block to 4 is smaller than 16, the width of the sub-block is the ratio of 16 to the height of the current image block, and the height of the sub-block is the height of the current image block.
26. A decoding apparatus comprising a processor and a machine-readable storage medium storing machine-readable instructions executable by the processor, the processor being caused by the machine-readable instructions to:
determining the size of the current image block according to the code stream;
judging whether the current image block is in an intra-frame subblock division mode or not according to the code stream;
when the current image block is in an intra-frame subblock division mode and is in a vertical division mode, the size of the current image block is M N, and M is more than or equal to 8, only performing vertical inverse transformation on a transformation coefficient of the current image block acquired from a code stream;
under the condition that the intra-frame sub-block division mode of the current image block is a vertical division mode, if the ratio of the product of the width and the height of the current image block to 4 is more than or equal to 16, the width of the sub-block is 1/4 of the width of the current image block, and the height of the sub-block is the height of the current image block; if the ratio of the product of the width and the height of the current image block to 4 is less than 16, the width of the sub block is the ratio of 16 to the height of the current image block, and the height of the sub block is the height of the current image block.
CN201910551639.1A 2019-06-24 2019-06-24 Encoding method, decoding method and device Active CN112135147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910551639.1A CN112135147B (en) 2019-06-24 2019-06-24 Encoding method, decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910551639.1A CN112135147B (en) 2019-06-24 2019-06-24 Encoding method, decoding method and device

Publications (2)

Publication Number Publication Date
CN112135147A CN112135147A (en) 2020-12-25
CN112135147B true CN112135147B (en) 2023-02-28

Family

ID=73849896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910551639.1A Active CN112135147B (en) 2019-06-24 2019-06-24 Encoding method, decoding method and device

Country Status (1)

Country Link
CN (1) CN112135147B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117063467A (en) * 2021-04-30 2023-11-14 Oppo广东移动通信有限公司 Block dividing method, encoder, decoder, and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595116A (en) * 2011-01-14 2012-07-18 华为技术有限公司 Encoding and decoding methods and devices for multiple image block division ways
CN102761742A (en) * 2012-07-03 2012-10-31 华为技术有限公司 Transform block division method and transform block division parameter coding/decoding method
CN109923866A (en) * 2016-11-08 2019-06-21 株式会社Kt Video signal processing method and equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5456907B2 (en) * 2009-12-04 2014-04-02 トムソン ライセンシング Texture pattern adaptive division block transform
GB2492333B (en) * 2011-06-27 2018-12-12 British Broadcasting Corp Video encoding and decoding using transforms
US9787982B2 (en) * 2011-09-12 2017-10-10 Qualcomm Incorporated Non-square transform units and prediction units in video coding
WO2016081939A1 (en) * 2014-11-21 2016-05-26 Vid Scale, Inc. One-dimensional transform modes and coefficient scan order
JP2019515570A (en) * 2016-05-02 2019-06-06 漢陽大学校産学協力団Industry−University Cooperation Foundation Hanyang University Video coding / decoding method and apparatus using intra-frame prediction
WO2018066987A1 (en) * 2016-10-04 2018-04-12 김기백 Image data encoding/decoding method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595116A (en) * 2011-01-14 2012-07-18 华为技术有限公司 Encoding and decoding methods and devices for multiple image block division ways
CN102761742A (en) * 2012-07-03 2012-10-31 华为技术有限公司 Transform block division method and transform block division parameter coding/decoding method
CN109923866A (en) * 2016-11-08 2019-06-21 株式会社Kt Video signal processing method and equipment

Also Published As

Publication number Publication date
CN112135147A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
CN109691099B (en) Video encoding/decoding method and apparatus, and recording medium storing bit stream therein
KR100739714B1 (en) Method and apparatus for intra prediction mode decision
KR100667808B1 (en) Method and apparatus for intra prediction encoding and decoding for image
US9661346B2 (en) Method and apparatus for encoding/decoding image
RU2600534C2 (en) Method and apparatus for encoding video and method and apparatus for decoding video through pixel value compensation in accordance with pixel groups
TWI524780B (en) Multiple sign bit hiding within a transform unit
RU2595609C2 (en) Method and apparatus for encoding video based on scanning order of hierarchical encoding units, and method and apparatus for decoding video based on scanning order of hierarchical encoding units
CN102045560B (en) Video encoding and decoding method and video encoding and decoding equipment
KR101228020B1 (en) Video coding method and apparatus using side matching, and video decoding method and appartus thereof
KR101517768B1 (en) Method and apparatus for encoding video and method and apparatus for decoding video
TWI519132B (en) Method and apparatus of deriving intra predicion mode
KR20110116025A (en) Method and apparatus for video encoding using low-complexity frequency transform, and method and apparatus for video decoding using the same
KR20080090937A (en) Method and apparatus for encoding and decoding based on intra prediction using differential equation
KR20110114524A (en) Device, method and program for image prediction encoding, device, method and program for image prediction decoding, and encoding/decoding system and method
KR20110017720A (en) Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
CN114827629B (en) Encoding method, decoding method, apparatus, and machine-readable storage medium
CN101790096B (en) Encoding and decoding method and device based on double prediction
CN112135147B (en) Encoding method, decoding method and device
CN113709476B (en) Encoding method, decoding method, device and machine readable storage medium
KR101366088B1 (en) Method and apparatus for encoding and decoding based on intra prediction
KR20230147149A (en) Intra prediction methods, encoders, decoders and storage media

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant