WO2015180428A1 - 帧内预测编码的视频编码方法及视频编码装置 - Google Patents
帧内预测编码的视频编码方法及视频编码装置 Download PDFInfo
- Publication number
- WO2015180428A1 WO2015180428A1 PCT/CN2014/091769 CN2014091769W WO2015180428A1 WO 2015180428 A1 WO2015180428 A1 WO 2015180428A1 CN 2014091769 W CN2014091769 W CN 2014091769W WO 2015180428 A1 WO2015180428 A1 WO 2015180428A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- mode
- prediction
- current layer
- sub
- depth
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
- H04N19/11—Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/146—Data rate or code amount at the encoder output
- H04N19/147—Data rate or code amount at the encoder output according to rate distortion criteria
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/187—Methods 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 scalable video layer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Definitions
- Embodiments of the present invention relate to the field of graphics processing, and more particularly, to a video encoding method and a video encoding apparatus for intra prediction encoding.
- encoding is performed one by one according to Coding Tree Unit (CTU) units, and each CTU can be divided into different coding units (CUs), each of which is divided into different coding units (CUs).
- the CU can be further divided into different prediction units (PUs).
- PU prediction units
- the transform is performed according to the transform unit: (Transform Unit, TU) size.
- Intra Prediction Coding (INTRA) prediction predicts the current PU using reconstructed pixel values of the current PU perimeter.
- each PU block has 35 luma prediction modes and 5 chroma prediction modes.
- the purpose of INTRA prediction is to find the best Luma prediction mode and 1 for each PU.
- the best Chroma prediction mode combined with INTER, finds the best prediction method for each CU (INTRA mode or INTER mode), and finally selects the best CU layer for encoding. Due to too many prediction levels, the computational complexity is large.
- the embodiments of the present invention provide a video encoding method and a video encoding apparatus for intra prediction encoding, which can reduce the complexity of encoding to a certain extent.
- a video coding method for intra prediction coding comprising: performing traversal prediction on a current layer coding unit CU having a depth of N to obtain a prediction result of the current layer CU, where the traversal prediction is Does not include predictions that use the current layer CU as a prediction unit, the prediction The result includes an optimal CU partition mode of the current layer CU in the traversal prediction, a prediction mode of the sub-CU divided by the current layer CU according to the optimal CU partition mode, and a syntax element required for the current layer CU coding, The value is 0, 1, or 2; if the best CU partition mode is to divide the current layer CU into 4 sub-CUs with depth N+1, and the prediction modes of the 4 sub-CUs with depth N+1 The same, according to the optimal CU partition mode, the prediction mode of the CU according to the optimal CU partition mode, and the syntax element required for the current layer CU coding, the current layer CU is used as a coding unit.
- the current layer CU partition mode is to divide the current layer
- the specific implementation is as follows: when N is 0, the current layer CU whose depth is N is CU64, and the sub-CU whose depth is N+1 is CU32; Or, when the value of N is 1, the current layer CU whose depth is N is CU32, and the sub-CU whose depth is N+1 is CU16; or, when N is 2, the current layer of the depth is N
- the CU is CU16, and the sub-CU whose depth is N+1 is CU8.
- a video coding method for intra prediction coding includes: performing traversal prediction on a current layer coding unit CU having a depth of N to obtain a first prediction result of the current layer CU, where the traversal The prediction does not include the prediction that the current layer CU is a prediction unit, where the first prediction result includes an optimal CU partition mode of the current layer CU in the traversal prediction, and the current layer CU is divided according to the optimal CU partition mode.
- the prediction mode includes a luma mode and a chroma mode, where N is 0, 1, or 2; if the optimal CU partition mode is the current
- the layer CU is divided into four sub-CUs with a depth of N+1, and the luminance mode difference values of any two sub-CUs of the four sub-CUs with a depth of N+1 are less than a predetermined threshold, and the N depth is N+ according to the depth
- the prediction mode of the sub-CU of 1 determines a re-prediction mode, wherein the luma mode in the re-prediction mode is determined by the brightness mode of the four sub-CUs whose depth is N+1, and the chroma mode in the re-prediction mode is determined by the Chromatic mode of 4 sub-CUs with depth N+1 Determining, predicting, by using the re-prediction mode, the four sub-CUs with a depth of N+1 to obtain a second prediction
- the specific implementation is as follows: when N is 0, the current layer CU whose depth is N is CU64, and the sub-CU whose depth is N+1 is CU32; Or, when the value of N is 1, the current layer CU whose depth is N is CU32, and the depth is N+1.
- the sub-CU is CU16; or, when N is 2, the current layer CU whose depth is N is CU16, and the sub-CU whose depth is N+1 is CU8.
- the brightness mode in the re-prediction mode is determined by the brightness mode of the four sub-CUs whose depth is N+1 Determining that the brightness mode in the re-prediction mode is the maximum value in the brightness mode in the prediction mode of the four sub-CUs with a depth of N+1; or the brightness mode in the re-prediction mode is the a minimum of the luma modes in the prediction mode of the sub-CUs of depth N+1; or the luma mode in the re-prediction mode is the luma mode of the prediction modes of the sub-CUs of the four depths N+1
- the intermediate value in the re-prediction mode; the brightness mode in the re-prediction mode is a minimum integer not smaller than the average value of the brightness mode; or the brightness mode in the re-prediction mode is a maximum integer not greater than the average value of the brightness mode; wherein
- the average brightness value is one of an arithmetic
- the chroma mode in the re-predictive mode is The chrominance mode determination of the four sub-CUs of depth N+1 is specifically implemented as: the chrominance mode in the re-prediction mode is one of the brightness modes of the four sub-CUs of the current layer CU having a depth of N+1.
- a third aspect provides a video encoding apparatus, where the video encoding apparatus includes: an intra prediction encoding unit, configured to perform traversal prediction on a current layer coding unit CU having a depth of N to obtain a prediction result of the current layer CU, where The traversal prediction does not include the prediction that the current layer CU is a prediction unit, where the prediction result includes an optimal CU partition mode of the current layer CU in the traversal prediction, and the current layer CU is divided according to the optimal CU partition mode.
- a prediction mode of the sub-CU and a syntax element required for the current layer CU coding where N is 0, 1, or 2;
- a video coding unit is configured to divide the current layer CU into the best CU partition mode 4 sub-CUs of depth N+1, and the prediction modes of the four sub-CUs with the depth of N+1 are the same, according to the optimal CU partition mode, the current layer CU is divided according to the optimal CU partition mode.
- the prediction mode of the CU and the syntax elements required for the current layer CU coding encode the current layer CU with the current layer CU as a coding unit.
- the video coding apparatus further includes: a first determining unit, configured to determine whether the optimal CU partition mode is to divide the current layer CU into The four sub-CUs of depth N+1 are used by the second determining unit to determine whether the prediction modes of the four sub-CUs with depth N+1 are the same.
- the implementation is as follows: when the value of N is 0, the current layer CU of the depth N is CU64. The sub-CU whose depth is N+1 is CU32; or, when N is 1, the current layer CU whose depth is N is CU32, and the sub-CU whose depth is N+1 is CU16; or, when N is taken When the value is 2, the current layer CU whose depth is N is CU16, and the sub-CU whose depth is N+1 is CU8.
- a fourth aspect provides a video encoding apparatus, where the video encoding apparatus includes: an intra prediction encoding unit, configured to perform traversal prediction on a current layer coding unit CU having a depth of N to obtain a first prediction result of the current layer CU.
- the prediction of the current layer CU is not included in the traversal prediction
- the first prediction result includes an optimal CU partition mode of the current layer CU in the traversal prediction
- the current layer CU is based on the best a prediction mode of a sub-CU divided by the CU partition mode and a syntax element required for the current layer CU coding
- the prediction mode includes a luma mode and a chroma mode, where N is a value of 0, 1, or 2; and a determining unit is used if
- the optimal CU partition mode is to divide the current layer CU into four sub-CUs with a depth of N+1, and the luminance mode difference values of any two sub-CUs of the four sub-CUs with a depth of N+1 are less than a predetermined threshold.
- the intra prediction coding unit is further configured to predict the four sub-CUs with a depth of N+1 by using the re-prediction mode as the specified prediction mode.
- the second prediction result includes a syntax element required for the current layer CU coding in the optimal CU partition mode and the re-prediction mode; a video coding unit, configured to perform, according to the optimal CU division mode And the re-prediction mode and the syntax element required for the current layer CU coding in the second prediction result, and encoding the current layer CU by using the current layer CU as a coding unit.
- the video coding apparatus further includes: a first determining unit, configured to determine whether the optimal CU partition mode is to divide the current layer CU into the four depths a sub-CU of N+1; a second determining unit, configured to determine whether a luminance mode difference value of any two sub-CUs of the four sub-CUs having a depth of N+1 is less than a predetermined threshold.
- the specific implementation is as follows: when the value of N is 0, the current layer CU of the depth N is CU64.
- the sub-CU whose depth is N+1 is CU32; or, when N is 1, the current layer CU whose depth is N is CU32, and the sub-CU whose depth is N+1 is CU16; or, when N is taken
- the value is 2
- the current layer CU whose depth is N is CU16
- the sub-CU whose depth is N+1 is CU8.
- the determining unit is specifically configured to determine one of the following values As the luminance mode in the re-prediction mode: the four depths are the maximum values of the luminance modes of the sub-CUs of N+1; or the minimum of the luminance modes of the sub-CUs of the four depths of N+1; Or the intermediate value in the brightness mode of the four sub-CUs of depth N+1; or the smallest integer not less than the average value of the brightness mode; or the largest integer not greater than the average value of the brightness mode; wherein the brightness average The value is one of an arithmetic mean value, a geometric mean value, a harmonic mean value, a weighted average value, and a square mean value of the brightness patterns of the four sub-CUs having a depth of N+1.
- the determining unit is specifically configured to determine one of the brightness modes of the four sub-CUs of the current layer CU with a depth of N+1 as the chrominance mode in the re-prediction mode.
- the video coding method and the video coding apparatus in the embodiments of the present invention do not perform prediction on the current layer CU when traversing the prediction, and in the scenario where the optimal CU division mode is to divide the current layer CU into four sub-CUs,
- the current layer CU is used as the coding unit according to the prediction result of the traverse prediction, or the four sub-CUs are re-predicted by specifying the similar or the same prediction mode when the prediction modes of the four sub-CUs are similar, and according to The re-predicted prediction result is encoded by the current layer CU as a coding unit, which can reduce the cost of prediction and can reduce the complexity of coding to a certain extent.
- FIG. 1 is a schematic diagram of a frame of an HEVC according to an embodiment of the present invention.
- FIG. 2 is a hierarchical diagram of a CTU of an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a luminance mode of an HEVC according to an embodiment of the present invention.
- FIG. 4 is a schematic view showing the direction of the brightness mode 29 of the embodiment of the present invention.
- FIG. 5 is a flowchart of a video encoding method of INTRA according to an embodiment of the present invention.
- FIG. 6 is a flowchart of a video coding method for INTRA prediction according to an embodiment of the present invention.
- FIG. 7 is a flowchart of another INTRA video coding method according to an embodiment of the present invention.
- FIG. 8 is a flowchart of another video coding method for INTRA prediction according to an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present invention.
- FIG. 10 is a schematic structural diagram of another video encoding apparatus according to an embodiment of the present invention.
- FIG. 11 is a schematic structural diagram of a video encoder according to an embodiment of the present invention.
- FIG. 12 is a schematic structural diagram of another video encoder according to an embodiment of the present invention.
- High Efficiency Video Coding Following H.264's next-generation video coding standard, its core goal is to improve the compression efficiency by one time on the basis of H.264/AVC High Profile. Under the premise of the same video image quality, the bit rate of the video stream is reduced by 50%.
- HEVC adopts a block-based hybrid coding framework, and its coding framework is shown in Figure 1.
- the process in the gray box is an algorithm variable process
- the process in the white box area is a process in which the algorithm is basically fixed.
- the method of the embodiments of the present invention mainly relates to the process of intra prediction in the HEV coding framework.
- Coding Tree Unit is the largest coding unit of HEVC.
- CU is a coding unit of HEVC, and the CTU can be divided into CUs for coding.
- Prediction Unit is a prediction unit of HEVC, and the CU can be divided into different PUs for prediction.
- Transform Unit (TU): is a transform unit of HEVC, and the CU can be divided into TUs for conversion.
- Rate Distortion Optimization is the basis for the best prediction mode for HEVC decision.
- HEVC Validation Model (HEVC Model, HM): is the official reference codec project for HEVC.
- INTRA Intra prediction coding, with reference pixel values coming from the same frame.
- HEVC uses a flexible block structure to encode the encoded image.
- a block structure includes a CU block structure, a PU block structure, and a TU block structure.
- HEVC is generally divided into CUs of different sizes according to the characteristics of the encoded image in a quadtree structure to flexibly match the image content to obtain the best encoding effect.
- 2 is a hierarchical diagram of a CTU of an embodiment of the present invention.
- 2 includes (a), (b), and (c), where (a) is a schematic diagram of CTU partitioning of a coded picture, and (b) is a possible CU partition mode for encoding a CTU in image (a), ( c) For different size coding units, CU64 (64*64), CU32 (32*32), CU16 (16*16) and CU8 (8*8).
- the coded image (a) can be divided into a number of CTUs, which are represented by a grid in (a).
- the CTU is the largest CU
- the size of each CTU is 64*64.
- Each CU64 with a size of 64*64 can be divided into four CU32s with a size of 32*32.
- Each CU32 with a size of 32*32 can be divided into four CU16s with a size of 16*16, each of which is 16*.
- the CU16 of 16 can be divided into four CU8s of size 8*8, and the CU8 of size 8*8 is the smallest CU of HEVC.
- CU64 is generally referred to as a CU of depth 0 or a layer 0 CU
- CU32 is referred to as a CU of depth 1 or a layer 1 CU
- CU 16 is referred to as a CU of depth 2 or a layer 2 CU
- CU8 It is called a CU with a depth of 3 or a Layer 3 CU.
- one optimal prediction mode (including the CTU itself) is selected for each layer, and then each layer is selected, and the optimal CU partition mode of the CTU is selected.
- one CTU can be divided into 1 CU32, 7 CU16, and 20 CU8.
- a luminance mode and a chrominance mode may be included.
- the prediction mode is selected, one of the 35 luminance modes may be selected as the luminance mode of the prediction mode, and one of the five chrominance modes may be selected as the chrominance mode of the prediction mode.
- FIG. 3 is a schematic diagram of a luminance mode of an HEVC according to an embodiment of the present invention.
- HEVC can include 35 different brightness modes.
- the intra prediction technique in HEVC is based on direction prediction. A total of 33 different prediction directions are defined, and a direction prediction value with an accuracy of 1/32 pixel can be obtained.
- the mode number is 2-34.
- the HEVC brightness mode also includes a DC mode numbered 1 and a Planar mode numbered 0. Among them, the DC mode uses the average value of the peripheral pixels as the predicted value, and Planar mainly targets the uniformly changed image.
- the direction diagram of the brightness mode 29 can be as shown in FIG.
- HEVC's five different chromaticity modes are specifically vertical, horizontal, DC, right lower diagonal and "same as brightness”.
- FIG. 5 is a flowchart of a video encoding method of INTRA according to an embodiment of the present invention. The method of Figure 5 is performed by a video encoding device.
- the prediction of the current layer CU is not included in the traversal prediction, and the prediction result includes an optimal CU partition mode of the current layer CU in the traversal prediction, and the current layer CU according to the optimal CU partition mode.
- the prediction mode of the divided sub-CU and the syntax element required for the current layer CU coding, N is 0, 1, or 2.
- the current layer CU whose depth is N is CU64, and the sub-CU whose depth is N+1 is CU32; when N is 2, the current layer of depth N is The CU is CU32, and the sub-CU whose depth is N+1 is CU16; when N is 3, the current layer CU whose depth is N is CU16, and the sub-CU whose depth is N+1 is CU8.
- the optimal CU partition mode is to divide the current layer CU into four sub-CUs with a depth of N+1, and the prediction modes of the four sub-CUs with the depth N+1 are the same, according to the best
- the CU partition mode, the prediction mode of the CU according to the optimal CU partition mode, and the syntax element required for the current layer CU coding the current layer CU is encoded with the current layer CU as a coding unit.
- traversal prediction is performed on the CU partition mode other than the current layer CU to obtain the prediction result when traversing the prediction, and the optimal CU is divided into four sub-CUs of the current layer CU and the prediction modes of the four sub-CUs are obtained.
- coding with the current layer CU as a coding unit can reduce the cost of prediction, and can reduce the complexity of coding to a certain extent.
- the method of the embodiment of the present invention can also reduce hardware power consumption and chip size of the video encoding apparatus.
- the optimal CU partition mode refers to the best CU partition when the traversal prediction does not include the current layer CU for prediction.
- FIG. 6 is a flowchart of a video coding method for INTRA prediction according to an embodiment of the present invention.
- encoding is performed by using CU64 as a coding unit.
- the current layer CU is CU64, which is the size of the CTU.
- the prediction of the CU 64 is not performed, or the traversal prediction of all CU division modes except CU64 is performed.
- the prediction result of CU64 in the current predictive coding mode (excluding the predictive coding mode of CU64 prediction) can be obtained.
- the prediction result may include an optimal CU partition mode of the CU64 in the traversal prediction, a prediction mode of the sub-CU divided by the optimal CU partition mode, and a syntax element required for CU64 encoding, and the like.
- a Rate Decision Correction may be used to perform a mode decision to obtain a prediction result.
- the cost function of the mode decision of the CU partition mode of the current layer CU can be expressed as follows:
- the Distortion indicates the prediction distortion of the current layer CU in the CU partition mode, which may be determined by the luminance variance and the chrominance variance of the current layer CU in the CU partition mode; Bits indicates that the current layer CU is in the CU partition mode.
- the CU partition mode when the Cost is minimum is the optimal CU partition mode of the current layer CU.
- HEVC encoders in a traversal prediction scenario that does not include INTRA CU64 predictions a performance report for a simulation experiment is shown in the following table:
- Class A and Class B are image sequences of two sizes specified in the graphic coding standard, and the resolutions are 2560*1600 and 1920*1080, respectively.
- Surveillance represents a sequence of monitored images
- Motion represents a sequence of moving images.
- Y, U, and V represent the Y component, the U component, and the V component of the YUV color space, respectively.
- the percentage value is BD-rate indicating the increase or decrease of the image signal-to-noise ratio PSNR at the same code rate.
- CU64 encoding can be supported; and in terms of encoding performance, it can be seen from the above table that the encoder only loses 0.2% in encoding performance without INTRA CU64 prediction, but the encoding complexity is reduced by 1 /4 also reduces the power consumption and chip area of the encoder.
- the current optimal CU partition mode is to divide the CU 64 into four CU32s.
- step 303 is performed.
- the optimal CU partition mode of the CU64 is divided into four CU32s, it can be further determined whether the prediction modes of the four CU32s of the CU64 are the same.
- whether the prediction modes of the four CUs 32 of the CU 64 are the same can be determined from the brightness mode and the chrominance mode of the four CU32s.
- the prediction modes of the four CU32s of the CU64 are considered to be the same, and step 304 is performed; otherwise, the prediction modes of the four CU32s of the CU64 are not all the same, and execution is performed. End.
- step 602 and step 603 are both satisfied, then at this time, according to the prediction result, encoding is performed in units of CU64.
- encoding may be performed according to a CU partitioning mode, a prediction mode, and a syntax element required for CU64 encoding in the prediction result.
- the implementation of the code stream coding may be encoded according to the flow specified in the existing protocol standard, and the CU division mode, the prediction mode, and the coding are written in the code stream.
- the information about the syntax elements and the like required for the code, and the detailed implementation process can be referred to the prior art, and details are not described herein again.
- the HEVC encoder does not include INTRA CU64 prediction in the traversal prediction scenario. If the prediction modes of the four CU32s are consistent, the CU64 encoding is supported according to the CU64 encoding, and the encoding quality has a performance improvement for the Surveillance type sequence.
- the performance report of the simulation experiment is shown in the following table:
- the coding result is encoded by using CU64 as a coding unit according to the prediction result, which can reduce the prediction.
- the cost can reduce the complexity of the coding to a certain extent.
- the method of the embodiment of the present invention can also reduce the power consumption and area size of the video encoding apparatus.
- coding method for CU64 may be further extended to coding units of size CU32 or CU16, and correspondingly, the sub-CUs of the next layer are CU16 and CU8, and the specific implementation may refer to the method of FIG. The embodiments are not described herein again.
- FIG. 7 is a flowchart of another video encoding method of INTRA according to an embodiment of the present invention. The method of Figure 7 is performed by a video encoding device.
- the traversal prediction does not include the prediction that the current layer CU is a prediction unit, where the first prediction result includes an optimal CU division mode of the current layer CU in the traversal prediction, and the current layer CU is according to the optimal CU.
- the current layer CU whose depth is N is CU64, and the depth is The sub-CU of the N+1 is CU32; when the value of N is 2, the current layer CU whose depth is N is CU32, and the sub-CU whose depth is N+1 is CU16; when N is 3, The current layer CU with a depth of N is CU16, and the sub-CU with a depth of N+1 is CU8.
- the optimal CU partition mode is to divide the current layer CU into four sub-CUs with a depth of N+1, and the luminance mode differences of any two sub-CUs of the sub-CUs with the depth of N+1 are If it is less than the predetermined threshold, the re-prediction mode is determined according to the prediction mode of the four sub-CUs whose depth is N+1.
- the luma mode in the re-prediction mode is determined by the luma mode of the four sub-CUs whose depth is N+1, and the chroma mode in the re-prediction mode is the color of the sub-CU of the four depths N+1 Degree mode is determined.
- the same re-prediction mode is selected for the four sub-CUs of the current layer CU to perform predictive coding again, which can reduce the coding complexity.
- the brightness mode of the re-prediction mode is determined according to the brightness patterns of the four sub-CUs whose depth is N+1, it can be determined in various ways.
- the maximum value of the brightness mode in the four sub-CUs with depth N+1 may be selected as the brightness mode of the re-prediction mode.
- the minimum value of the brightness mode in the four sub-CUs of depth N+1 may be selected as the brightness mode of the re-prediction mode.
- the intermediate value of the brightness mode in the four sub-CUs with depth N+1 may be selected as the brightness mode of the re-prediction mode.
- the brightness average of the brightness modes of the four sub-CUs with depth N+1 may be selected as the brightness mode of the re-prediction mode.
- the average value of the brightness may be one of an arithmetic mean value, a geometric mean value, a harmonic mean value, a weighted average value, and a squared average value of the brightness modes of the four sub-CUs of the current layer CU having a depth of N+1. If a weighted average is used, it is also necessary to determine the weighting coefficients of the four sub-CUs of the current layer CU whose depth is N+1.
- the luminance average value is not necessarily an integer, in this case, it is conceivable to select a maximum integer which is not larger than the luminance average value or a minimum integer which is not smaller than the luminance average value as the luminance mode of the re-prediction mode.
- one chroma mode may be selected from the chroma modes of the prediction modes of the four sub-CUs of the current layer CU as the chroma mode of the re-prediction mode.
- the second prediction result includes a syntax element required for the current layer CU coding in the optimal CU partition mode and the re-prediction mode.
- the four sub-CUs with the depth of N+1 are subjected to the specified mode prediction, so that the coding is performed according to the re-predicted prediction result at the time of encoding, and the coding complexity can be reduced.
- the CU partition mode other than the current layer CU is traversed and predicted at the time of predictive coding, and when the optimal CU is divided into four sub-CUs of the current layer CU and the brightness modes of the four sub-CUs are similar, according to
- the prediction modes of the four sub-CUs whose prediction modes are similar or identical are re-predicted by the prediction mode, and the current layer CU is used as the coding unit according to the result of the re-prediction, which can reduce the cost of prediction and can be reduced to some extent.
- the complexity of the encoding is traversed and predicted at the time of predictive coding, and when the optimal CU is divided into four sub-CUs of the current layer CU and the brightness modes of the four sub-CUs are similar, according to
- the prediction modes of the four sub-CUs whose prediction modes are similar or identical are re-predicted by the prediction mode, and the current layer CU is used as the coding unit according to the result of the re-prediction, which can reduce the
- the method of the embodiment of the present invention can also reduce power consumption and chip area size of the video encoding apparatus.
- the current best CU partition of the current layer CU refers to the best CU partition when the traversal prediction does not include prediction for the current layer CU.
- FIG. 8 is a flowchart of another video coding method for INTRA prediction according to an embodiment of the present invention.
- encoding is performed by using CU64 as a coding unit.
- the first prediction result may include an optimal CU partition mode of the CU64 in the traversal prediction, a prediction mode of the sub-CU divided by the optimal CU partition mode, and a syntax element required for CU64 encoding, and the like. .
- the method for determining the step 802 is similar to the step 602 of FIG. 6. For the specific implementation, reference may be made to the step 601, which is not described herein again.
- step 803 is performed; otherwise, the execution ends.
- the optimal CU partition mode of the CU64 is divided into four CU32s, it can be further determined whether the prediction modes between the four CU32s are close. Since the luma mode is the most important decision factor in the prediction mode, when the luma mode of the CU is close, the prediction mode of the CU can be considered close. When judging whether the brightness mode is close, it can be judged by the brightness mode difference between the CUs.
- step 804 the execution ends.
- the predetermined threshold may be preset by the video encoding device.
- the predetermined threshold may be a fixed value or may be configurable.
- the predetermined threshold is set to 3, and the brightness modes of the four CU32s are 24, 24, 25, and 26, respectively, and then the values of the luminance mode differences of any two of the four CU32s are 0, 1, or 2, the determination condition is satisfied, and the brightness s patterns of the four CUs 32 are relatively close, and step 804 is performed.
- the predetermined threshold is set to 3, and the brightness modes of the four CU32s are 24, 24, 25, and 27, respectively, and the brightness mode difference value of the two CU32s is 3,
- the determination condition is satisfied, the brightness patterns of the four CUs 32 are not close, and step 804 is performed.
- the prediction modes of the four CU32s are considered to be close.
- one prediction mode can be selected as the prediction mode of the four CU32s and the prediction coding is re-predicted. mode.
- the brightness mode of the re-prediction mode can be determined in a variety of ways.
- the maximum value of the luminance mode in the prediction modes of the four CU32s may be selected as the luminance mode of the re-prediction mode. Taking the luminance modes in the prediction modes of the four CU32s as 24, 24, 25, and 27, respectively, the luminance mode of the re-predictive mode is 27 at this time.
- the minimum value of the luminance mode in the prediction modes of the four CU32s may be selected as the luminance mode of the re-prediction mode. Taking the luminance modes in the prediction modes of the four CU32s as 24, 24, 25, and 27, respectively, the luminance mode of the re-predictive mode is 24 at this time.
- the intermediate value of the brightness mode in the prediction modes of the four CU32s may be selected as the brightness mode of the re-prediction mode. Taking the luminance modes in the prediction modes of the four CU32s as 24, 24, 25, and 27, respectively, the luminance mode of the re-predictive mode is 25 at this time.
- the arithmetic mean of the brightness modes in the prediction modes of the four CU32s can be selected.
- the value is used as the brightness mode of the re-prediction mode. Taking the luminance modes in the prediction modes of the four CU32s as 24, 24, 25, and 27, respectively, the luminance mode of the re-predictive mode is 25 at this time.
- the arithmetic mean can also be replaced by a geometric mean, a harmonic mean, a weighted average or a squared mean, which can be collectively referred to as a brightness average.
- the obtained value may not be an integer. In this case, it may be considered to select the largest integer not greater than the average value of the brightness or the smallest integer not less than the average value of the brightness as the re-degree.
- the brightness mode of the prediction mode may not be an integer. In this case, it may be considered to select the largest integer not greater than the average value of the brightness or the smallest integer not less than the average value of the brightness as the re-degree.
- one of the chrominance modes of the prediction modes of the four CU32s may be selected as the chrominance mode of the re-prediction mode.
- one chroma mode may be randomly selected from the chroma modes of the prediction modes of the four CU32s as the chroma mode of the re-prediction mode; in another manner, the luma mode of the prediction modes of the four CU32s may be selected.
- the chrominance mode corresponding to the prediction mode of the luminance mode equal to the re-prediction mode is used as the chrominance mode of the re-prediction mode.
- the second prediction result may include syntax elements required for CU64 encoding in the optimal CU partition mode and the re-prediction mode.
- the predetermined prediction mode prediction is performed on the re-predicted mode, and the CU64 is encoded according to the re-predicted prediction result, and the image content can be flexibly matched to obtain a better coding effect.
- the CU64 When encoding, the CU64 is used as the coding unit according to the optimal CU partition mode, the re-prediction mode, and the syntax elements required for CU64 coding in the second prediction result.
- the implementation of the code stream coding may be encoded according to the flow specified in the existing protocol standard, and the CU partition mode, the prediction mode, the syntax elements required for coding, and the like are written in the code stream, and the detailed implementation process may be implemented. The embodiments of the present invention are not described herein again.
- the optimal CU partition mode of a CU64-sized coding unit is 4 CU32s and the prediction modes of the 4 CU32s are similar
- a prediction mode that is close to or the same as the prediction mode of the four CU32s is used. Re-predicting the 4 CU32s and based on the re-predicted The prediction result is encoded by CU64 as a coding unit, which can reduce the complexity of video coding to a certain extent.
- the method of the embodiment of the present invention can also reduce power consumption and chip area size of the video encoding apparatus.
- coding method for CU64 may be further extended to coding units of size CU32 or CU16, and correspondingly, the sub-CUs of the next layer are CU16 and CU8, and the specific implementation may refer to the method of FIG. The embodiments are not described herein again.
- FIG. 9 is a schematic structural diagram of a video encoding apparatus 900 according to an embodiment of the present invention.
- the frequency encoding device 900 may include an intra prediction encoding unit 901 and a video encoding unit 902.
- the intra prediction coding unit 901 is configured to perform traversal prediction on the current layer coding unit CU with a depth of N to obtain a prediction result of the current layer CU.
- the prediction of the current layer CU is not included in the traversal prediction, and the prediction result includes an optimal CU partition mode of the current layer CU in the traversal prediction, and the current layer CU according to the optimal CU partition mode.
- the prediction mode of the divided sub-CU and the syntax element required for the current layer CU coding, N is 0, 1, or 2.
- the video encoding unit 902 is configured to: if the optimal CU partition mode is to divide the current layer CU into four sub-CUs with a depth of N+1, and the prediction modes of the four sub-CUs with a depth of N+1 are the same, According to the optimal CU partition mode, the prediction mode of the CU according to the optimal CU partition mode, and the syntax element required for the current layer CU coding, the current layer CU is used as a coding unit for the current layer.
- the CU encodes.
- the video encoding apparatus 900 performs traversal prediction on the CU partition mode other than the current layer CU to obtain the prediction result when traversing the prediction, and divides the optimal CU into 4 sub-CUs of the current layer CU and the 4 sub-CUs.
- the current layer CU is used as the coding unit according to the prediction result, which can reduce the cost of prediction, and can reduce the complexity of the coding to a certain extent.
- the video encoding apparatus 900 of the embodiment of the present invention can also reduce power consumption and chip area size.
- the current best CU partition of the current layer CU refers to the best CU partition when the traversal prediction does not include the current layer CU for prediction.
- the video encoding device 900 may be specifically a video encoder, and the specific implementation may be implemented by hardware, such as a physical chip, or by software.
- the current layer CU whose depth is N is CU64, and the sub-CU whose depth is N+1 is CU32; or, when N is 1, the depth is N.
- the layer CU is CU32, and the sub-CU whose depth is N+1 is CU16; or, when N is 2, the current layer CU whose depth is N is CU16, and the sub-CU whose depth is N+1 is CU8.
- the video encoding device 900 may further include a first determining unit 903 and a second determining unit 904.
- the first determining unit 903 is configured to determine whether the optimal CU partition mode is the four sub-CUs whose depth is N+1
- the second determining unit 904 is configured to determine that the four sub-depths are N+1. Whether the prediction mode of the CU is the same.
- the video encoding apparatus 900 can also perform the method of FIG. 5 and implement the functions of the video encoding apparatus in the embodiment shown in FIG. 5 and FIG. 6 and the generalized embodiment thereof.
- FIG. 5 and FIG. 6 For the specific implementation, reference may be made to the embodiment shown in FIG. 5 and FIG. The embodiments of the present invention are not described herein again.
- FIG. 10 is a schematic structural diagram of a video encoding apparatus 1000 according to an embodiment of the present invention.
- the frequency encoding device 1000 may include an intra prediction encoding unit 1001, a determining unit 1002, and a video encoding unit 1003.
- the intra prediction coding unit 1001 is configured to perform traversal prediction on the current layer coding unit CU with a depth of N to obtain a first prediction result of the current layer CU.
- the traversal prediction does not include the prediction that the current layer CU is a prediction unit, where the first prediction result includes an optimal CU division mode of the current layer CU in the traversal prediction, and the current layer CU is according to the optimal CU.
- the determining unit 1002 is configured to: if the optimal CU partition mode is to divide the current layer CU into four sub-CUs with a depth of N+1, and the four sub-CUs of the sub-CUs with the depth of N+1 are If the luminance mode difference is less than a predetermined threshold, the re-prediction mode is determined according to the prediction mode of the four sub-CUs whose depth is N+1.
- the luma mode in the re-prediction mode is determined by the luma mode of the four sub-CUs whose depth is N+1, and the chroma mode in the re-prediction mode is the color of the sub-CU of the four depths N+1 Degree mode is determined.
- the intra prediction coding unit 1001 is further configured to perform prediction on the four sub-CUs with depth N+1 by using the re-prediction mode as the specified prediction mode to obtain the second prediction result.
- the second prediction result includes a syntax element required for the current layer CU coding in the optimal CU partition mode and the re-prediction mode.
- the video coding unit 1003 is configured to: according to the optimal CU partition mode, the re-prediction mode, and the syntax element required for the current layer CU coding in the second prediction result, the current layer CU is used as a coding unit for the current layer CU. Encode.
- the video encoding apparatus 1000 performs traversal prediction on the CU partition mode other than the current layer CU in predictive coding, and divides the optimal CU into four sub-CUs of the current layer CU, and the brightness modes of the four sub-CUs are similar. Re-determining the prediction mode prediction according to a prediction mode that is close to or the same as the prediction mode of the four sub-CUs, and coding the current layer CU as a coding unit according to the re-predicted result, thereby reducing the cost of prediction, to a certain extent It can reduce the complexity of coding.
- the video encoding apparatus 1000 of the embodiment of the present invention can also reduce power consumption and chip area size.
- the current best CU partition of the current layer CU refers to the best CU partition when the traversal prediction does not include prediction for the current layer CU.
- the current layer CU whose depth is N is CU64, and the sub-CU whose depth is N+1 is CU32; or, when N is 1, the depth is N.
- the layer CU is CU32, and the sub-CU whose depth is N+1 is CU16; or, when N is 2, the current layer CU whose depth is N is CU16, and the sub-CU whose depth is N+1 is CU8.
- the video encoding device 1000 may further include a first determining unit 1004 and a second determining unit 1005.
- the first determining unit 1004 is configured to determine whether the optimal CU partition mode is the four sub-CUs whose depth is N+1
- the second determining unit 1005 is configured to determine that the four sub-depths are N+1. Whether the luminance mode difference of any two sub-CUs in the CU is less than a predetermined threshold.
- the determining unit 1002 can be configured to determine one of the following values as the brightness mode in the re-prediction mode:
- the average value of the brightness is one of an arithmetic mean value, a geometric mean value, a harmonic mean value, a weighted average value, and a squared average value of the brightness patterns of the four sub-CUs having a depth of N+1.
- the determining unit 1002 is further configured to determine that the four depths of the current layer CU are N+1.
- One of the luminance modes of the sub-CU is used as the chrominance mode in the re-prediction mode.
- the video encoding device 1000 can also perform the method of FIG. 7 and implement the functions of the video encoding device in the embodiments shown in FIG. 7 and FIG. 8 and the generalized embodiments thereof.
- FIG. 7 and FIG. 8 For the specific implementation, reference may be made to the embodiments shown in FIG. 7 and FIG. The embodiments of the present invention are not described herein again.
- FIG. 11 is a schematic structural diagram of a video encoder 1100 according to an embodiment of the present invention.
- Video encoder 1100 can include a communication interface 1101, a processor 1102, and a memory 1103.
- the communication interface 1101, the processor 1102, and the memory 1103 are connected to each other through a bus 1103 system.
- the bus 1104 can be an ISA bus, a PCI bus, or an EISA bus.
- the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one double-headed arrow is shown in Figure 8, but it does not mean that there is only one bus or one type of bus.
- the memory 1103 is configured to store a program.
- the program can include program code, the program code including computer operating instructions.
- Memory 1103 can include read only memory and random access memory and provides instructions and data to processor 1102.
- the memory 1103 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
- the processor 1102 is configured to invoke a program stored in the memory 1103, and is specifically configured to perform the following operations:
- the optimal CU partition mode is to divide the current layer CU into four sub-CUs with a depth of N+1, and the prediction modes of the four sub-CUs whose depth is N+1 are the same, according to the optimal CU partition
- the method performed by the video encoding apparatus disclosed in any of the embodiments of FIG. 5 or FIG. 6 of the present invention may be applied to the processor 1102 or implemented by the processor 1102.
- the processor 1102 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 1102 or an instruction in a form of software.
- the processor 1102 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP Processor, etc.), or a digital signal processor (DSP), an application specific integrated circuit. (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
- the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
- the steps of the method disclosed in the embodiments of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
- the storage medium is located in the memory 1103, and the processor 1102 reads the information in the memory 1103 and completes the steps of the above method in combination with its hardware.
- the video encoding apparatus 1100 performs traversal prediction on the CU partition mode other than the current layer CU to obtain the prediction result when traversing the prediction, and divides the optimal CU into 4 sub-CUs of the current layer CU and the 4 sub-CUs.
- the current layer CU is used as the coding unit according to the prediction result, which can reduce the cost of prediction, and can reduce the complexity of the coding to a certain extent.
- the video encoding apparatus 1100 of the embodiment of the present invention can also reduce power consumption and chip area size.
- the current layer CU whose depth is N is CU64, and the sub-CU whose depth is N+1 is CU32; or, when N is 1, the depth is N.
- the layer CU is CU32, and the sub-CU whose depth is N+1 is CU16; or, when N is 2, the current layer CU whose depth is N is CU16, and the sub-CU whose depth is N+1 is CU8.
- the processor 1102 is further configured to determine whether the optimal CU partition mode is to divide the current layer CU into the four sub-CUs whose depth is N+1, and is used to determine that the four depths are N. Whether the prediction mode of the sub-CU of +1 is the same.
- the video encoder 1100 can also perform the method of FIG. 5 and implement the functions of the video encoding apparatus in the embodiments shown in FIG. 5 and FIG. 6 and the generalized embodiments thereof.
- the specific implementation can be implemented by referring to FIG. 5 and FIG. The embodiments of the present invention and the generalized embodiments thereof are not described herein again.
- FIG. 12 is a schematic structural diagram of a video encoder 1200 according to an embodiment of the present invention.
- Video encoder 1200 can include communication interface 1201, processor 1202, and memory 1203.
- the communication interface 1201, the processor 1202, and the memory 1203 are interconnected by a bus 1203 system.
- the bus 1204 may be an ISA bus, a PCI bus, or an EISA bus.
- the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one double-headed arrow is shown in Figure 9, but it does not mean that there is only one bus or one type of bus.
- the memory 1203 is configured to store a program.
- the program can include program code, the program code including computer operating instructions.
- Memory 1203 can include read only memory and random access memory and provides instructions and data to processor 1202.
- the memory 1203 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
- the processor 1202 is configured to invoke a program stored in the memory 1203, and is specifically configured to perform the following operations:
- the first prediction result includes An optimal CU partition mode of the current layer CU, a prediction mode of the CU according to the optimal CU partition mode, and a syntax element required for the current layer CU coding, the prediction mode includes a luma mode and a chroma mode , N is 0, 1, or 2;
- the optimal CU partition mode is to divide the current layer CU into four sub-CUs with a depth of N+1, and the luminance mode difference of any two sub-CUs of the four sub-CUs with the depth N+1 is less than a predetermined a threshold, wherein the re-prediction mode is determined according to the prediction mode of the four sub-CUs whose depth is N+1, wherein the luma mode in the re-prediction mode is determined by the brightness mode of the four sub-CUs whose depth is N+1, The chroma mode in the re-prediction mode is determined by the chrominance mode of the four sub-CUs whose depth is N+1;
- the current layer CU is encoded with the current layer CU as a coding unit according to the optimal CU partition mode, the re-prediction mode, and the syntax element required for the current layer CU coding in the second prediction result.
- Processor 1202 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 1202 or an instruction in a form of software.
- the processor 1202 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP processor, etc.), or a digital signal processor (DSP), an application specific integrated circuit. (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
- the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
- the steps of the method disclosed in the embodiments of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
- the storage medium is located in the memory 1203, and the processor 1202 reads the information in the memory 1203 and completes the steps of the above method in combination with its hardware.
- the video encoding apparatus 1200 performs traversal prediction on the CU partition mode other than the current layer CU during predictive coding, and divides the optimal CU into four sub-CUs of the current layer CU, and the brightness modes of the four sub-CUs are similar. Re-determining the prediction mode prediction according to a prediction mode that is close to or the same as the prediction mode of the four sub-CUs, and coding the current layer CU as a coding unit according to the re-predicted result, thereby reducing the cost of prediction, to a certain extent It can reduce the complexity of coding.
- the video encoding apparatus 1200 of the embodiment of the present invention can also reduce power consumption and chip area size.
- the current layer CU whose depth is N is CU64, and the sub-CU whose depth is N+1 is CU32; or, when N is 1, the depth is N.
- the layer CU is CU32, and the sub-CU whose depth is N+1 is CU16; or, when N is 2, the current layer CU whose depth is N is CU16, and the sub-CU whose depth is N+1 is CU8.
- the processor 1202 is further configured to determine whether the optimal CU partition mode is to divide the current layer CU into the four sub-CUs whose depth is N+1, and is used to determine that the four depths are N+1. Whether the luminance mode difference value of any two sub-CUs in the sub-CU is less than a predetermined threshold.
- the processor 1202 may be configured to determine one of the following values as the brightness mode in the re-prediction mode:
- the average value of the brightness is one of an arithmetic mean value, a geometric mean value, a harmonic mean value, a weighted average value, and a squared average value of the brightness patterns of the four sub-CUs having a depth of N+1.
- the processor 1202 may be further configured to determine that the four depths of the current layer CU are N+1.
- One of the luminance modes of the CU is used as the chrominance mode in the re-prediction mode.
- the video encoder 1200 can also perform the method of FIG. 7 and implement the functions of the video encoding apparatus in the embodiments shown in FIG. 7 and FIG. 8 and the generalized embodiments thereof, and the specific implementation can be implemented by referring to FIG. 7 and FIG. The embodiments of the present invention and the generalized embodiments thereof are not described herein again.
- the disclosed systems, devices, and methods may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in various embodiments of the present invention may be integrated in one processing unit
- each unit may exist physically separately, or two or more units may be integrated into one unit.
- the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
- the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
- the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明实施例提供了一种INTRA的视频编码方法及视频编码装置。该方法包括:对深度为N的当前层编码单元CU进行遍历预测以获取当前层CU的预测结果,其中,遍历预测中不包括以当前层CU为预测单元的预测,预测结果包括在遍历预测中当前层CU的最佳CU划分模式、当前层CU根据最佳CU划分模式划分的子CU的预测模式以及当前层CU编码所需的语法元素;如果最佳CU划分模式为将当前层CU划分成4个深度为N+1的子CU,且4个深度为N+1的子CU的预测模式相同,则根据最佳CU划分模式、当前层CU根据最佳CU划分模式划分的CU的预测模式以及当前层CU编码所需的语法元素,以当前层CU为编码单位对当前层CU进行编码。
Description
本申请要求于2014年5月29日提交中国专利局、申请号为201410233802.7、发明名称为“帧内预测编码的视频编码方法及视频编码装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明实施例涉及图形处理领域,并且更具体地,涉及帧内预测编码的视频编码方法及视频编码装置。
采用高效视频编码(High Efficiency Video Coding,HEVC)进行编码时,按照编码树单元(Coding Tree Unit,CTU)单元逐个编码,每个CTU可以划分为不同的编码单元(Coding Unit,CU),每个CU又可以划分为不同的预测单元(Prediction Unit,PU)。预测时,按照PU大小预测,编码时,按照CU大小进行编码。在PU预测过程中,按照变换单元:(Transform Unit,TU)大小进行变换。
在HEVC的当前标准版本Recommendation ITU-T H.265中,帧内预测编码(INTRA)预测使用当前PU周边的重建像素值预测当前PU。INTRA预测中,每一个PU块都有35个亮度(Luma)预测模式和5个色度(Chroma)预测模式,INTRA预测的目的就是找出每个PU的1个最佳的Luma预测模式和1个最佳的Chroma预测模式,再与INTER相结合,找出每个CU的最佳预测方式(INTRA方式或者INTER方式),最终选出最佳的CU层进行编码。由于预测层次过多,计算复杂度较大。
因此,需要一种合适的方案,以减少HEVC编码的复杂度。
发明内容
本发明实施例提供一种帧内预测编码的视频编码方法和视频编码装置,能够在一定程度上能够减小编码的复杂度。
第一方面,提供了一种帧内预测编码的视频编码方法,该方法包括:对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的预测结果,其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该预测
结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,N取值为0,1,或2;如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU的预测模式相同,则根据该最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的CU的预测模式以及该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
结合第一方面,在第一种可能的实现方式中,具体实现为:当N取值为0时,该深度为N的当前层CU为CU64,该深度为N+1的子CU为CU32;或者,当N取值为1时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;或者,当N取值为2时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
第二方面,提供了一种帧内预测编码的视频编码方法,该方法包括:对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的第一预测结果,其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该第一预测结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,该预测模式包括亮度模式和色度模式,N取值为0,1,或2;如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU中任意两个子CU的亮度模式差值小于预定阈值,则根据所4个深度为N+1的子CU的预测模式确定再度预测模式,其中,该再度预测模式中的亮度模式由该4个深度为N+1的子CU的亮度模式确定,该再度预测模式中的色度模式由该4个深度为N+1的子CU的色度模式确定;以该再度预测模式为指定预测模式对该4个深度为N+1的子CU进行预测以获取第二预测结果,该第二预测结果包括在该最佳CU划分模式以及该再度预测模式下该当前层CU编码所需的语法元素;根据该最佳CU划分模式、该再度预测模式以及该第二预测结果中该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
结合第二方面,在第一种可能的实现方式中,具体实现为:当N取值为0时,该深度为N的当前层CU为CU64,该深度为N+1的子CU为CU32;或者,当N取值为1时,该深度为N的当前层CU为CU32,该深度为N+1
的子CU为CU16;或者,当N取值为2时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
结合第二方面或第二方面的第一种可能的实现方式,在第二种可能的实现方式中,该再度预测模式中的亮度模式由该4个深度为N+1的子CU的亮度模式确定具体实现为:该再度预测模式中的亮度模式为该4个深度为N+1的子CU的预测模式中的亮度模式中的最大值;或者,该再度预测模式中的亮度模式为该4个深度为N+1的子CU的预测模式中的亮度模式中的最小值;或者,该再度预测模式中的亮度模式为该4个深度为N+1的子CU的预测模式中的亮度模式中的中间值;或者,该再度预测模式中的亮度模式为不小于亮度模式平均值的最小整数;或者,该再度预测模式中的亮度模式为不大于亮度模式平均值的最大整数;其中,该亮度平均值为该4个深度为N+1的子CU的亮度模式的算术平均值、几何平均值、调和平均值、加权平均值、平方平均值中的一个
结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二种可能的实现方式,在第三种可能的实现方式中,该再度预测模式中的色度模式由该4个深度为N+1的子CU的色度模式确定具体实现为:该再度预测模式中的色度模式为该当前层CU的4个深度为N+1的子CU的亮度模式之一。
第三方面,提供了一种视频编码装置,该视频编码装置包括:帧内预测编码单元,用于对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的预测结果,其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该预测结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,N取值为0,1,或2;视频编码单元,用于如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU的预测模式相同,则根据该最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的CU的预测模式以及该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
结合第三方面,在第一种可能的实现方式中,该视频编码装置还包括:第一判决单元,用于判断该最佳CU划分模式是否为将该当前层CU划分成
该4个深度为N+1的子CU;第二判决单元,用于判断该4个深度为N+1的子CU的预测模式是否相同。
结合第三方面或第三方面的第一种可能的实现方式,在第二种可能的实现方式中,具体实现为:当N取值为0时,该深度为N的当前层CU为CU64,该深度为N+1的子CU为CU32;或者,当N取值为1时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;或者,当N取值为2时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
第四方面,提供了一种视频编码装置,该视频编码装置包括:帧内预测编码单元,用于对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的第一预测结果,其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该第一预测结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,该预测模式包括亮度模式和色度模式,N取值为0,1,或2;确定单元,用于如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU中任意两个子CU的亮度模式差值小于预定阈值,则根据所4个深度为N+1的子CU的预测模式确定再度预测模式,其中,该再度预测模式中的亮度模式由该4个深度为N+1的子CU的亮度模式确定,该再度预测模式中的色度模式由该4个深度为N+1的子CU的色度模式确定;该帧内预测编码单元还用于以该再度预测模式为指定预测模式对该4个深度为N+1的子CU进行预测以获取第二预测结果,该第二预测结果包括在该最佳CU划分模式以及该再度预测模式下该当前层CU编码所需的语法元素;视频编码单元,用于根据该最佳CU划分模式、该再度预测模式以及该第二预测结果中该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
结合第四方面,在第一种可能的实现方式中,该视频编码装置还包括:第一判决单元,用于判断该最佳CU划分模式是否为将该当前层CU划分成该4个深度为N+1的子CU;第二判决单元,用于判断该4个深度为N+1的子CU中任意两个子CU的亮度模式差值是否小于预定阈值。
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,具体实现为:当N取值为0时,该深度为N的当前层CU为CU64,
该深度为N+1的子CU为CU32;或者,当N取值为1时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;或者,当N取值为2时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
结合第四方面或第四方面的第一种可能的实现方式或第四方面的第二种可能的实现方式,在第三种可能的实现方式中,该确定单元具体用于确定以下值之一作为该再度预测模式中的亮度模式:该4个深度为N+1的子CU的亮度模式中的最大值;或者,该4个深度为N+1的子CU的亮度模式中的最小值;或者,该4个深度为N+1的子CU的亮度模式中的中间值;或者,不小于亮度模式平均值的最小整数;或者,不大于亮度模式平均值的最大整数;其中,该亮度平均值为该4个深度为N+1的子CU的亮度模式的算术平均值、几何平均值、调和平均值、加权平均值、平方平均值中的一个。
结合第四方面或第四方面的第一种可能的实现方式或第四方面的第二种可能的实现方式或第四方面的第三种可能的实现方式,在第四种可能的实现方式中,该确定单元具体用于确定该当前层CU的4个深度为N+1的子CU的亮度模式之一作为该再度预测模式中的色度模式。
本发明实施例的视频编码方法和视频编码装置,通过在遍历预测时对当前层CU不进行预测,并在最佳CU划分模式为将当前层CU划分成4个子CU的场景下,当4个子CU的预测模式相同时根据遍历预测的预测结果以当前层CU为编码单元进行编码,或者当4个子CU的预测模式相近时指定相近或相同的预测模式对该4个子CU进行重新预测,并根据重新预测的预测结果以当前层CU为编码单元进行编码,能够减少预测的代价,在一定程度上能够减小编码的复杂度。
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例HEVC的框架示意图。
图2是本发明实施例CTU层次结构图。
图3是本发明实施例HEVC的亮度模式示意图。
图4是本发明实施例亮度模式29的方向示意图。
图5是本发明实施例INTRA的视频编码方法流程图。
图6是本发明实施例的一种INTRA预测的视频编码方法流程图。
图7是本发明实施例另一种INTRA的视频编码方法流程图。
图8是本发明实施例的另一种INTRA预测的视频编码方法流程图。
图9是本发明实施例视频编码装置的结构示意图。
图10是本发明实施例另一视频编码装置的结构示意图。
图11是本发明实施例视频编码器的结构示意图。
图12是本发明实施例另一视频编码器的结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为了方便理解本发明实施例,首先在此介绍本发明实施例描述中会引入的几个要素。
高效视频编码(High Efficiency Video Coding,HEVC):是继H.264的下一代视频编码标准,其核心目标在于:在H.264/AVC High Profile的基础上,压缩效率提高1倍,即在保证相同视频图像质量的前提下,视频流的码率减少50%。HEVC采用基于块的混合编码框架,其编码框架示意图如图1所示。在图1中,灰色框内的过程为算法可变的过程,白色框区域的过程为算法基本固定的过程。本发明实施例的方法主要涉及HEV编码框架中的帧内预测的过程。
编码树单元(Coding Tree Unit,CTU):是HEVC的最大编码单元。
编码单元(Coding Unit,CU):是HEVC的编码单元,CTU可向下划分为CU进行编码。
预测单元(Prediction Unit,PU):是HEVC的预测单元,CU可划分为不同PU进行预测。
变换单元:(Transform Unit,TU):是HEVC的变换单元,CU可向下划分为TU进行变换。
码率失真最优选择:(Rate Distortion Optimization,RDO):是HEVC决策最佳预测模式的依据。
HEVC验证模型:(HEVC Model,HM):是HEVC的官方参考编解码器工程。
INTRA:帧内预测编码,参考像素值来自于同一帧。
为了更好的适应编码图像的内容,HEVC采用灵活的块结构来对编码图像进行编码。在HEVC中,块结构包括CU块结构、PU块结构以及TU块结构。HEVC在进行CU的划分时,通常根据编码图像的特性以四叉树结构划分为不同大小的CU,以灵活匹配图像内容,得到最佳编码效果。
图2是本发明实施例CTU层次结构图。图2中包括(a)、(b)和(c),其中(a)为编码图像的CTU划分示意图,(b)为编码图像(a)中一个CTU的一种可能的CU划分模式,(c)为不同大小的编码单元,分别为CU64(64*64)、CU32(32*32)、CU16(16*16)和CU8(8*8)。
如图2所示,编码图像(a)可分为若干个CTU,在(a)中用一个格子表示。其中,CTU为最大的CU,每个CTU的大小为64*64。每个大小为64*64的CU64可划分为4个大小为32*32的CU32,每个大小为32*32的CU32可划分为4个大小为16*16的CU16,每个大小为16*16的CU16可划分为4个大小为8*8的CU8,大小为8*8的CU8为HEVC中最小的CU。另外,CU64通常又被称为深度为0的CU或第0层CU,CU32被称为深度为1的CU或第1层CU,CU16被称为深度为2的CU或第2层CU,CU8被称为深度为3的CU或第3层CU。
现有技术中,在对一个CTU进行预测时,通常是每层选择一个最佳预测模式(包括CTU本身),再各层择优,可选出CTU的最佳CU划分模式。例如,图2的(b)中,一个CTU可划分为1个CU32、7个CU16和20个CU8。
HEVC的预测模式中,可包括亮度模式和色度模式。在选择预测模式时,可从35种亮度模式中选择一种作为预测模式的亮度模式,从5种色度模式中选择一种作为预测模式的色度模式。
图3是本发明实施例HEVC的亮度模式示意图。如图3所示,HEVC可包括35种不同的亮度模式。HEVC中的帧内预测技术以方向预测为基础,共定义了33个不同的预测方向,可获得精度为1/32像素的方向预测值,其
模式编号为2-34。另外,HEVC的亮度模式还包括编号为1的DC模式和编号为0的平面(Planar)模式。其中,DC模式采用周边像素的平均值作为预测值,Planar主要针对均匀变化的图像。一个具体的例子,亮度模式29的方向示意图可如图4所示。
另外,HEVC的5种不同的色度模式,具体为垂直、水平、DC、右下对角和“与亮度一样”五种。
图5是本发明实施例INTRA的视频编码方法流程图。图5的方法由视频编码装置执行。
501,对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的预测结果。
其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该预测结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,N取值为0,1,或2。
可选地,当N取值为1时,该深度为N的当前层CU为CU64,该深度为N+1的子CU为CU32;当N取值为2时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;当N取值为3时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
502,如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU的预测模式相同,则根据该最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的CU的预测模式以及该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
本发明实施例中,在遍历预测时对当前层CU以外的CU划分模式进行遍历预测以获取预测结果,并在最佳CU划分为当前层CU的4个子CU且该4个子CU的预测模式相同时根据预测结果以当前层CU为编码单元进行编码,能够减少预测的代价,在一定程度上能够减小编码的复杂度。
另外,本发明实施例的方法,还可降低视频编码装置的硬件功耗和芯片体积。
应理解,该最佳CU划分模式,是指在遍历预测不包括当前层CU进行预测时的最佳CU划分。
下面,将结合具体的实施例,对本发明实施例的方法作进一步的描述。
图6是本发明实施例的一种INTRA预测的视频编码方法流程图。本发明实施例中,以CU64作为编码单元进行编码。
601,对CU64的编码单元进行除CU64以外的划分模式的INTRA遍历预测以获取预测结果。
当前层CU为CU64,也就是CTU的大小。
在对CU64进行INTRA遍历预测时,不进行CU64的预测,或者说进行除CU64以外的所有CU划分模式的遍历预测。
通过进行INTRA遍历预测,可得到CU64在当前预测编码方式(不包括CU64预测的预测编码方式)下的预测结果。该预测结果中,可包括在该遍历预测中CU64的最佳CU划分模式、按该最佳CU划分模式划分的子CU的预测模式、以及CU64编码时所需的语法元素,等等。
通过进行INTRA遍历预测以获取预测结果的具体实现可参考现有技术。为了更好地理解本发明实施例的方法,在此对其判决过程作个简单介绍。本发明实施例的一种具体实现方式,可采用码率失真最优选择(RateDistortion Optimization,RDO)进行模式判决以获取预测结果。此时,当前层CU的CU划分模式的模式判决的代价函数可如下公式所示:
Cost=Distortion+λ*Bits。
其中,Distortion表示当前层CU在该CU划分模式下的预测失真度,具体可由当前层CU在该CU划分模式下的亮度方差和色度方差确定;Bits表示当前层CU在该CU划分模式下的预测编码所占用的字节数;λ表示CU划分模式判决的约束值;Cost表示CU划分模式判决的代价。其中,Cost越小,表示当前层CU的CU划分模式越好。Cost最小时的CU划分模式即为当前层CU的最佳CU划分模式。
当然,还可能通过其它方式获取预测结果,本发明实施例在此不作限制。
另外,HEVC的编码器在不包括INTRA CU64预测的遍历预测场景下,一份仿真实验的性能报告如下述表格所示:
Y | U | V | YUV | |
Class A | 0.0% | 0.1% | 0.1% | 0.0% |
Class B | 0.1% | 0.2% | 0.3% | 0.1% |
Surveillance | 0.5% | 2.1% | 3.4% | 0.9% |
Motion | 0.0% | 0.2% | 0.2% | 0.1% |
综合效果 | 0.1% | 0.5% | 0.7% | 0.2% |
其中,Class A、Class B为图形编码标准中规定的2种尺寸的图像序列,分辨率分别为2560*1600和1920*1080。Surveillance表示监控图像序列,Motion表示运动图像序列。Y、U、V分别表示YUV色彩空间的Y分量、U分量、V分量。其中的百分比数值为BD-rate表示相同码率下图像信噪比PSNR的增加或降低。
对于解码器而言,能够支持CU64编码;而在编码性能上,从上述表格可以看出,在不进行INTRA CU64预测的情况下编码器大约在编码性能只损失0.2%,但编码复杂度降低1/4同时也降低了编码器的功耗和芯片面积。
602,判断最佳CU划分模式是否为将CU64划分成4个CU32。
根据该预测结果,可判断当前最佳CU划分模式是否为将CU64划分成4个CU32。
如果该预测结果表示该CU64的最佳CU划分模式是划分为4个CU32,则执行步骤303。
如果该预测结果表示该CU64的最佳CU划分模式不是划分为4个CU32,执行结束。
603,判断4个CU32的预测模式是否都相同。
当该CU64的最佳CU划分模式是划分为4个CU32,可进一步判断该CU64的4个CU32的预测模式是否相同。
具体地,可从该4个CU32的亮度模式和色度模式判断该CU64的4个CU32的预测模式是否相同。
如果该4个CU32的亮度模式和色度模式都相同,则认为该CU64的4个CU32的预测模式相同,执行步骤304;否则,则认为该CU64的4个CU32的预测模式不是都相同,执行结束。
604,按照CU64进行编码。
如果步骤602和步骤603的判决条件都满足,则此时可根据预测结果,以CU64为编码单位进行编码。
具体地,可根据预测结果中的CU划分模式、预测模式及CU64编码所需的语法元素等进行编码。在具体实现中,其码流编码的实现可按照现有协议标准中规定的流程进行编码,在码流中写入CU划分模式、预测模式、编
码所需的语法元素等信息,详细实现过程可参考现有技术,本发明实施例在此不再赘述。
HEVC的编码器在不包括INTRA CU64预测的遍历预测场景下,如果4个CU32的预测模式一致,则按照CU64编码,既支持了CU64的编码,并且编码质量对于Surveillance类型的序列有性能提升,一份仿真实验的性能报告如下述表格所示:
Y | U | V | YUV | |
Class A | 0.0% | 0.0% | 0.0% | 0.0% |
Class B | 0.0% | 0.0% | 0.0% | 0.0% |
Surveillance | 0.0% | -0.1% | -0.3% | 0.0% |
Motion | 0.0% | 0.0% | 0.0% | 0.0% |
综合效果 | 0.0% | 0.0% | 0.0% | 0.0% |
本发明实施例中,当一个CU64大小的编码单元的最佳CU划分模式为划分成4个CU32且该4个CU32的预测模式相同时,根据预测结果以CU64为编码单元进行编码,能够减少预测的代价,在一定程度上能够减小编码的复杂度。
另外,本发明实施例的方法,还可以减少视频编码装置的功耗和面积大小。
另外,应理解,上述对CU64的编码方法还可以推广到大小为CU32或CU16的编码单元,相应的,其下一层的子CU为CU16、CU8,具体实现可参考图6的方法,本发明实施例在此不再赘述。
图7是本发明实施例另一INTRA的视频编码方法流程图。图7的方法由视频编码装置执行。
701,对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的第一预测结果。
其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该第一预测结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,该预测模式包括亮度模式和色度模式,N取值为0,1,或2。
可选地,当N取值为1时,该深度为N的当前层CU为CU64,该深度
为N+1的子CU为CU32;当N取值为2时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;当N取值为3时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
702,如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU中任意两个子CU的亮度模式差值小于预定阈值,则根据所4个深度为N+1的子CU的预测模式确定再度预测模式。
其中,该再度预测模式中的亮度模式由该4个深度为N+1的子CU的亮度模式确定,该再度预测模式中的色度模式由该4个深度为N+1的子CU的色度模式确定。
应理解,当前层CU的4个子CU的亮度模式差值小于预定阈值时,对当前层CU的4个子CU选择一个相同的再度预测模式重新进行预测编码,能够减小编码的复杂度。
在根据该4个深度为N+1的子CU的亮度模式确定再度预测模式的亮度模式时,可通过多种方式确定。
一种方式,可选择该4个深度为N+1的子CU中亮度模式的最大值作为该再度预测模式的亮度模式。
另一种方式,可选择该4个深度为N+1的子CU中亮度模式的最小值作为该再度预测模式的亮度模式。
再一种方式,可选择该4个深度为N+1的子CU中亮度模式的中间值作为该再度预测模式的亮度模式。
再一种方式,可选择选择该4个深度为N+1的子CU的亮度模式的亮度平均值作为该再度预测模式的亮度模式。其中,该亮度平均值具体可以是当前层CU的4个深度为N+1的子CU的亮度模式的算术平均值、几何平均值、调和平均值、加权平均值、平方平均值中的一个。如果采用加权平均值时,还需确定当前层CU的4个深度为N+1的子CU的加权系数。另外,由于亮度平均值不一定是一个整数,此时,可考虑选择不大于亮度平均值的最大整数或不小于亮度平均值的最小整数作为再度预测模式的亮度模式。
在选择再度预测模式的色度模式时,可从当前层CU的4个子CU的预测模式的色度模式中选择一个色度模式作为再度预测模式的色度模式。
703,以该再度预测模式为指定预测模式对该4个深度为N+1的子CU
进行预测以获取第二预测结果。
其中,该第二预测结果包括在该最佳CU划分模式以及该再度预测模式下该当前层CU编码所需的语法元素。
按照再度预测模式对该4个深度为N+1的子CU进行指定模式预测,以在编码时按照重新预测后的预测结果进行编码,能够减小编码的复杂度。
704,根据该最佳CU划分模式、该再度预测模式以及该第二预测结果中该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
本发明实施例中,在预测编码时对当前层CU以外的CU划分模式进行遍历预测,并在最佳CU划分为当前层CU的4个子CU且该4个子CU的亮度模式相近时,根据与该4个子CU的预测模式相近或相同的一个预测模式重新进行指定预测模式预测,并按照重新预测的结果以当前层CU为编码单元进行编码,能够减少预测的代价,在一定程度上能够减小编码的复杂度。
另外,本发明实施例的方法,还可以减少视频编码装置的功耗和芯片面积大小。
应理解,该当前层CU当前的最佳CU划分,指在遍历预测不包括对当前层CU进行预测时的最佳CU划分。
下面,将结合具体的实施例,对本发明实施例的方法作进一步的描述。
图8是本发明实施例的另一种INTRA预测的视频编码方法流程图。本发明实施例中,以CU64作为编码单元进行编码。
801,对CU64的编码单元进行除CU64以外的划分模式的INTRA遍历预测以获取第一预测结果。
步骤801的方法与图6的步骤601类似。此时,第一预测结果中可包括在该遍历预测中CU64的最佳CU划分模式、按该最佳CU划分模式划分的子CU的预测模式、以及CU64编码时所需的语法元素,等等。
802,判断最佳CU划分模式是否为将CU64划分成4个CU32。
步骤802的判断方法与图6的步骤602类似,具体实现可参考步骤601,本发明实施例在此不再赘述。
如果最佳CU划分模式为将CU64划分成4个CU32,执行步骤803;否则,执行结束。
803,判断4个CU32的亮度模式是否接近。
当该CU64的最佳CU划分模式是划分为4个CU32,可进一步判断4个CU32之间的预测模式是否接近。由于亮度模式是预测模式中最重要的判决因素,当CU的亮度模式接近时,可认为CU的预测模式接近。在判断亮度模式是否接近时,可通过CU之间的亮度模式差值来判断。
具体地,如果4个CU32中任意两个CU32的亮度模式差值都小于预定阈值,则说明4个CU32的亮度模式接近,执行步骤804;否则,执行结束。
应理解,该预定阈值可以由视频编码装置预先设定。其中,该预定阈值可以是固定值,也可以是可配置的。
一个具体的实施例,该预定阈值设定为3,4个CU32的亮度模式分别为24,24,25,26,则此时4个CU32中任意两个CU32的亮度模式差值的取值为0,1,或2,满足判定条件,说明4个CU32的亮度s模式比较接近,执行步骤804。
另一个具体的实施例,该预定阈值设定为3,4个CU32的亮度模式分别为24,24,25,27,则此时有2个CU32的亮度模式差值的取值为3,不满足判定条件,说明4个CU32的亮度模式不接近,执行步骤804。
804,根据4个CU32的预测模式确定再度预测模式,并以再度预测模式为指定预测模式对4个CU32进行预测以获取第二预测结果。
如果4个CU32的亮度模式接近,可认为4个CU32的预测模式接近,此时,可以选择一个预测模式作为该4个CU32的预测模式并重新进行预测编码,不妨将该预测模式称为再度预测模式。
在具体的实现中,可通过多种方式确定再度预测模式的亮度模式。
第一种方式,可选择该4个CU32的预测模式中亮度模式的最大值作为再度预测模式的亮度模式。以4个CU32的预测模式中的亮度模式分别为24,24,25,27为例,则此时再度预测模式的亮度模式为27。
第二种方式,可选择该4个CU32的预测模式中亮度模式的最小值作为再度预测模式的亮度模式。以4个CU32的预测模式中的亮度模式分别为24,24,25,27为例,则此时再度预测模式的亮度模式为24。
第三种方式,可选择该4个CU32的预测模式中亮度模式的中间值作为再度预测模式的亮度模式。以4个CU32的预测模式中的亮度模式分别为24,24,25,27为例,则此时再度预测模式的亮度模式为25。
第四种方式,可选择该4个CU32的预测模式中亮度模式的算术平均
值作为再度预测模式的亮度模式。以4个CU32的预测模式中的亮度模式分别为24,24,25,27为例,则此时再度预测模式的亮度模式为25。当然,该算术平均值还可以换成几何平均值、调和平均值、加权平均值或平方平均值,这些平均值可以统称为亮度平均值。应注意,根据亮度平均值确定再度预测模式的亮度模式时,所得到的数值可能不是一个整数,此时,可考虑选择不大于亮度平均值的最大整数或不小于亮度平均值的最小整数作为再度预测模式的亮度模式。
当然,还可能存在其它确定再度预测模式的亮度模式的方式,本发明实施例在此不作限制。
另外,在确定再度预测模式时,还需要确定再度预测模式的色度模式。具体地,可该4个CU32的预测模式的色度模式中选择一个色度模式作为再度预测模式的色度模式。一种方式,可随机从该4个CU32的预测模式的色度模式中选择一个色度模式作为再度预测模式的色度模式;另一种方式,可选择该4个CU32的预测模式中亮度模式等于再度预测模式的亮度模式的预测模式所对应的色度模式作为再度预测模式的色度模式。当然,还可能存在其它的色度模式选择方案,本发明实施例在此不作限制。
在确定再度预测模式后,以再度预测模式为指定预测模式对该对4个CU32进行预测,以获取第二预测结果。该第二预测结果中可包括在该最佳CU划分模式以及该再度预测模式下CU64编码所需的语法元素。
应理解,以再度预测模式对重新4个CU32进行指定预测模式预测,并根据再预测的预测结果对CU64进行编码,能够灵活匹配图像内容,取得较好的编码效果。
805,按照CU64进行编码。
在进行编码时,根据该最佳CU划分模式、该再度预测模式以及该第二预测结果中CU64编码所需的语法元素,以CU64为编码单元进行编码。在具体实现中,其码流编码的实现可按照现有协议标准中规定的流程进行编码,在码流中写入CU划分模式、预测模式、编码所需的语法元素等信息,详细实现过程可参考现有技术,本发明实施例在此不再赘述。
本发明实施例中,当一个CU64大小的编码单元的最佳CU划分模式为4个CU32且该4个CU32的预测模式相近时,以一个与该4个CU32的预测模式相近或相同的预测模式对该4个CU32重新预测并根据重新预测后的
预测结果以CU64为编码单元进行编码,能够在一定程度上减小视频编码的复杂度。
另外,本发明实施例的方法,还可以减少视频编码装置的功耗和芯片面积大小。
另外,应理解,上述对CU64的编码方法还可以推广到大小为CU32或CU16的编码单元,相应的,其下一层的子CU为CU16、CU8,具体实现可参考图8的方法,本发明实施例在此不再赘述。
图9是本发明实施例视频编码装置900的结构示意图。频编码装置900可包括帧内预测编码单元901和视频编码单元902。
帧内预测编码单元901,用于对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的预测结果。
其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该预测结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,N取值为0,1,或2。
视频编码单元902,用于如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU的预测模式相同,则根据该最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的CU的预测模式以及该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
本发明实施例中,视频编码装置900在遍历预测时对当前层CU以外的CU划分模式进行遍历预测以获取预测结果,并在最佳CU划分为当前层CU的4个子CU且该4个子CU的预测模式相同时根据预测结果以当前层CU为编码单元进行编码,能够减少预测的代价,在一定程度上能够减小编码的复杂度。
另外,本发明实施例的视频编码装置900,还可以减少功耗和芯片面积大小。
应理解,该当前层CU当前的最佳CU划分,指在遍历预测不包括当前层CU进行预测时的最佳CU划分。
应理解,本发明实施例中,视频编码装置900具体可以是一个视频编码器,其具体实现可由硬件,例如物理芯片等实现,或由软件实现。
具体地,当N取值为0时,该深度为N的当前层CU为CU64,该深度为N+1的子CU为CU32;或者,当N取值为1时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;或者,当N取值为2时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
可选地,视频编码装置900还可包括第一判决单元903和第二判决单元904。其中,第一判决单元903,用于判断该最佳CU划分模式是否为该4个深度为N+1的子CU;第二判决单元904,用于判断该4个深度为N+1的子CU的预测模式是否相同。
视频编码装置900还可执行图5的方法,并实现视频编码装置在图5、图6所示实施例及其推广的实施例的功能,具体实现可参考图5、图6所示实施例及其推广的实施例,本发明实施例在此不再赘述。
图10是本发明实施例视频编码装置1000的结构示意图。频编码装置1000可包括帧内预测编码单元1001、确定单元1002和视频编码单元1003。
帧内预测编码单元1001,用于对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的第一预测结果。
其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该第一预测结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,该预测模式包括亮度模式和色度模式,N取值为0,1,或2。
确定单元1002,用于如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU中任意两个子CU的亮度模式差值小于预定阈值,则根据所4个深度为N+1的子CU的预测模式确定再度预测模式。
其中,该再度预测模式中的亮度模式由该4个深度为N+1的子CU的亮度模式确定,该再度预测模式中的色度模式由该4个深度为N+1的子CU的色度模式确定。
帧内预测编码单元1001还用于以该再度预测模式为指定预测模式对该4个深度为N+1的子CU进行预测以获取第二预测结果。
其中,该第二预测结果包括在该最佳CU划分模式以及该再度预测模式下该当前层CU编码所需的语法元素。
视频编码单元1003,用于根据该最佳CU划分模式、该再度预测模式以及该第二预测结果中该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
本发明实施例中,视频编码装置1000在预测编码时对当前层CU以外的CU划分模式进行遍历预测,并在最佳CU划分为当前层CU的4个子CU且该4个子CU的亮度模式相近时,根据与该4个子CU的预测模式相近或相同的一个预测模式重新进行指定预测模式预测,并按照重新预测的结果以当前层CU为编码单元进行编码,能够减少预测的代价,在一定程度上能够减小编码的复杂度。
另外,本发明实施例的视频编码装置1000,还可以减少功耗和芯片面积大小。
应理解,该当前层CU当前的最佳CU划分,指在遍历预测不包括对当前层CU进行预测时的最佳CU划分。
具体地,当N取值为0时,该深度为N的当前层CU为CU64,该深度为N+1的子CU为CU32;或者,当N取值为1时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;或者,当N取值为2时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
可选地,视频编码装置1000还可包括第一判决单元1004和第二判决单元1005。其中,第一判决单元1004,用于判断该最佳CU划分模式是否为该4个深度为N+1的子CU;第二判决单元1005,用于判断该4个深度为N+1的子CU中任意两个子CU的亮度模式差值是否小于预定阈值。
具体地,确定单元1002可用于确定以下值之一作为该再度预测模式中的亮度模式:
该4个深度为N+1的子CU的亮度模式中的最大值;或者
该4个深度为N+1的子CU的亮度模式中的最小值;或者
该4个深度为N+1的子CU的亮度模式中的中间值;或者
不小于亮度模式平均值的最小整数;或者
不大于亮度模式平均值的最大整数;
其中,该亮度平均值为该4个深度为N+1的子CU的亮度模式的算术平均值、几何平均值、调和平均值、加权平均值、平方平均值中的一个。
具体地,确定单元1002还可用于确定该当前层CU的4个深度为N+1
的子CU的亮度模式之一作为该再度预测模式中的色度模式。
视频编码装置1000还可执行图7的方法,并实现视频编码装置在图7、图8所示实施例及其推广的实施例的功能,具体实现可参考图7、图8所示实施例及其推广的实施例,本发明实施例在此不再赘述。
图11是本发明实施例视频编码器1100的结构示意图。视频编码器1100可包括通信接口1101,处理器1102和存储器1103。
通信接口1101、处理器1102和存储器1103通过总线1103系统相互连接。总线1104可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。
存储器1103,用于存放程序。具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。存储器1103可以包括只读存储器和随机存取存储器,并向处理器1102提供指令和数据。存储器1103可能包括高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器1102,用于调用存储器1103所存放的程序,并具体用于执行以下操作:
对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的预测结果,其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该预测结果包括在该遍历预测中该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的子CU的预测模式以及该当前层CU编码所需的语法元素,N取值为0,1,或2;
如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU的预测模式相同,则根据该最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的CU的预测模式以及该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
上述如本发明图5或图6任一实施例揭示的视频编码装置执行的方法可以应用于处理器1102中,或者由处理器1102实现。处理器1102可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1102中的硬件的集成逻辑电路或者软件形式的指令完成。
上述的处理器1102可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1103,处理器1102读取存储器1103中的信息,结合其硬件完成上述方法的步骤。
本发明实施例中,视频编码装置1100在遍历预测时对当前层CU以外的CU划分模式进行遍历预测以获取预测结果,并在最佳CU划分为当前层CU的4个子CU且该4个子CU的预测模式相同时根据预测结果以当前层CU为编码单元进行编码,能够减少预测的代价,在一定程度上能够减小编码的复杂度。
另外,本发明实施例的视频编码装置1100,还可以减少功耗和芯片面积大小。
具体地,当N取值为0时,该深度为N的当前层CU为CU64,该深度为N+1的子CU为CU32;或者,当N取值为1时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;或者,当N取值为2时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
可选地,处理器1102还用于判断用于判断该最佳CU划分模式是否为将该当前层CU划分成该4个深度为N+1的子CU,并用于判断该4个深度为N+1的子CU的预测模式是否相同。
另外,视频编码器1100还可执行图5的方法,并实现视频编码装置在图5、图6所示实施例及其推广的实施例的功能,具体实现可参考图5、图6所示实施例及其推广的实施例,本发明实施例在此不再赘述。
图12是本发明实施例视频编码器1200的结构示意图。视频编码器1200可包括通信接口1201,处理器1202和存储器1203。
通信接口1201、处理器1202和存储器1203通过总线1203系统相互连
接。总线1204可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一个双向箭头表示,但并不表示仅有一根总线或一种类型的总线。
存储器1203,用于存放程序。具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。存储器1203可以包括只读存储器和随机存取存储器,并向处理器1202提供指令和数据。存储器1203可能包括高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器1202,用于调用存储器1203所存放的程序,并具体用于执行以下操作:
对深度为N的当前层编码单元CU进行遍历预测以获取该当前层CU的第一预测结果,其中,该遍历预测中不包括以该当前层CU为预测单元的预测,该第一预测结果包括该当前层CU的最佳CU划分模式、该当前层CU根据该最佳CU划分模式划分的CU的预测模式以及该当前层CU编码所需的语法元素,该预测模式包括亮度模式和色度模式,N取值为0,1,或2;
如果该最佳CU划分模式为将该当前层CU划分成4个深度为N+1的子CU,且该4个深度为N+1的子CU中任意两个子CU的亮度模式差值小于预定阈值,则根据所4个深度为N+1的子CU的预测模式确定再度预测模式,其中,该再度预测模式中的亮度模式由该4个深度为N+1的子CU的亮度模式确定,该再度预测模式中的色度模式由该4个深度为N+1的子CU的色度模式确定;
以该再度预测模式为指定预测模式对该4个深度为N+1的子CU进行预测以获取第二预测结果,其中,该第二预测结果包括在该最佳CU划分模式以及该再度预测模式下该当前层CU编码所需的语法元素;
根据该最佳CU划分模式、该再度预测模式以及该第二预测结果中该当前层CU编码所需的语法元素,以该当前层CU为编码单位对该当前层CU进行编码。
上述如本发明图7或图8任一实施例揭示的视频编码装置执行的方法可以应用于处理器1202中,或者由处理器1202实现。处理器1202可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1202中的硬件的集成逻辑电路或者软件形式的指令完成。
上述的处理器1202可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1203,处理器1202读取存储器1203中的信息,结合其硬件完成上述方法的步骤。
本发明实施例中,视频编码装置1200在预测编码时对当前层CU以外的CU划分模式进行遍历预测,并在最佳CU划分为当前层CU的4个子CU且该4个子CU的亮度模式相近时,根据与该4个子CU的预测模式相近或相同的一个预测模式重新进行指定预测模式预测,并按照重新预测的结果以当前层CU为编码单元进行编码,能够减少预测的代价,在一定程度上能够减小编码的复杂度。
另外,本发明实施例的视频编码装置1200,还可以减少功耗和芯片面积大小。
具体地,当N取值为0时,该深度为N的当前层CU为CU64,该深度为N+1的子CU为CU32;或者,当N取值为1时,该深度为N的当前层CU为CU32,该深度为N+1的子CU为CU16;或者,当N取值为2时,该深度为N的当前层CU为CU16,该深度为N+1的子CU为CU8。
可选地,处理器1202还用于判断该最佳CU划分模式是否为将该当前层CU划分为该4个深度为N+1的子CU,并用于判断该4个深度为N+1的子CU中任意两个子CU的亮度模式差值是否小于预定阈值。
具体地,在用于根据该4个深度为N+1的子CU的预测模式确定再度预测模式的过程中,处理器1202可用于确定以下值之一作为该再度预测模式中的亮度模式:
该4个深度为N+1的子CU的亮度模式中的最大值;或者
该4个深度为N+1的子CU的亮度模式中的最小值;或者
该4个深度为N+1的子CU的亮度模式中的中间值;或者
不小于亮度模式平均值的最小整数;或者
不大于亮度模式平均值的最大整数;
其中,该亮度平均值为该4个深度为N+1的子CU的亮度模式的算术平均值、几何平均值、调和平均值、加权平均值、平方平均值中的一个。
具体地,在用于根据该4个深度为N+1的子CU的预测模式确定再度预测模式的过程中,处理器1202还可用于确定该当前层CU的4个深度为N+1的子CU的亮度模式之一作为该再度预测模式中的色度模式。
另外,视频编码器1200还可执行图7的方法,并实现视频编码装置在图7、图8所示实施例及其推广的实施例的功能,具体实现可参考图7、图8所示实施例及其推广的实施例,本发明实施例在此不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元
中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。
Claims (14)
- 一种帧内预测编码的视频编码方法,其特征在于,包括:对深度为N的当前层编码单元CU进行遍历预测以获取所述当前层CU的预测结果,其中,所述遍历预测中不包括以所述当前层CU为预测单元的预测,所述预测结果包括在所述遍历预测中所述当前层CU的最佳CU划分模式、所述当前层CU根据所述最佳CU划分模式划分的子CU的预测模式以及所述当前层CU编码所需的语法元素,N取值为0,1,或2;如果所述最佳CU划分模式为将所述当前层CU划分成4个深度为N+1的子CU,且所述4个深度为N+1的子CU的预测模式相同,则根据所述最佳CU划分模式、所述当前层CU根据所述最佳CU划分模式划分的CU的预测模式以及所述当前层CU编码所需的语法元素,以所述当前层CU为编码单位对所述当前层CU进行编码。
- 如权利要求1所述的方法,其特征在于,当N取值为0时,所述深度为N的当前层CU为CU64,所述深度为N+1的子CU为CU32;或者当N取值为1时,所述深度为N的当前层CU为CU32,所述深度为N+1的子CU为CU16;或者当N取值为2时,所述深度为N的当前层CU为CU16,所述深度为N+1的子CU为CU8。
- 一种帧内预测编码的视频编码方法,其特征在于,包括:对深度为N的当前层编码单元CU进行遍历预测以获取所述当前层CU的第一预测结果,其中,所述遍历预测中不包括以所述当前层CU为预测单元的预测,所述第一预测结果包括在所述遍历预测中所述当前层CU的最佳CU划分模式、所述当前层CU根据所述最佳CU划分模式划分的子CU的预测模式以及所述当前层CU编码所需的语法元素,所述预测模式包括亮度模式和色度模式,N取值为0,1,或2;如果所述最佳CU划分模式为将所述当前层CU划分成4个深度为N+1的子CU,且所述4个深度为N+1的子CU中任意两个子CU的亮度模式差值小于预定阈值,则根据所4个深度为N+1的子CU的预测模式确定再度预测模式,其中,所述再度预测模式中的亮度模式由所述4个深度为N+1的子 CU的亮度模式确定,所述再度预测模式中的色度模式由所述4个深度为N+1的子CU的色度模式确定;以所述再度预测模式为指定预测模式对所述4个深度为N+1的子CU进行指定预测模式预测以获取第二预测结果,所述第二预测结果包括在所述最佳CU划分模式以及所述再度预测模式下所述当前层CU编码所需的语法元素;根据所述最佳CU划分模式、所述再度预测模式以及所述第二预测结果中所述当前层CU编码所需的语法元素,以所述当前层CU为编码单位对所述当前层CU进行编码。
- 如权利要求3所述的方法,其特征在于,当N取值为0时,所述深度为N的当前层CU为CU64,所述深度为N+1的子CU为CU32;或者当N取值为1时,所述深度为N的当前层CU为CU32,所述深度为N+1的子CU为CU16;或者当N取值为2时,所述深度为N的当前层CU为CU16,所述深度为N+1的子CU为CU8。
- 如权利要求3或4所述的方法,其特征在于,所述再度预测模式中的亮度模式由所述4个深度为N+1的子CU的亮度模式确定具体实现为:所述再度预测模式中的亮度模式为所述4个深度为N+1的子CU的预测模式中的亮度模式中的最大值;或者所述再度预测模式中的亮度模式为所述4个深度为N+1的子CU的预测模式中的亮度模式中的最小值;或者所述再度预测模式中的亮度模式为所述4个深度为N+1的子CU的预测模式中的亮度模式中的中间值;或者所述再度预测模式中的亮度模式为不小于亮度模式平均值的最小整数;或者所述再度预测模式中的亮度模式为不大于亮度模式平均值的最大整数;其中,所述亮度平均值为所述4个深度为N+1的子CU的亮度模式的算术平均值、几何平均值、调和平均值、加权平均值、平方平均值中的一个。
- 如权利要求3至5任一项所述的方法,其特征在于,所述再度预测模式中的色度模式由所述4个深度为N+1的子CU的色度模式确定具体实现 为:所述再度预测模式中的色度模式为所述当前层CU的4个深度为N+1的子CU的亮度模式之一。
- 一种视频编码装置,其特征在于,包括:帧内预测编码单元,用于对深度为N的当前层编码单元CU进行遍历预测以获取所述当前层CU的预测结果,其中,所述遍历预测中不包括以所述当前层CU为预测单元的预测,所述预测结果包括所述遍历预测中所述当前层CU的最佳CU划分模式、所述当前层CU根据所述最佳CU划分模式划分的子CU的预测模式以及所述当前层CU编码所需的语法元素,N取值为0,1,或2;视频编码单元,用于如果所述最佳CU划分模式为将所述当前层CU划分成4个深度为N+1的子CU,且所述4个深度为N+1的子CU的预测模式相同,则根据所述最佳CU划分模式、所述当前层CU根据所述最佳CU划分模式划分的CU的预测模式以及所述当前层CU编码所需的语法元素,以所述当前层CU为编码单位对所述当前层CU进行编码。
- 如权利要求7所述的视频编码装置,其特征在于,所述视频编码装置还包括:第一判决单元,用于判断所述最佳CU划分模式是否为将所述当前层CU划分成所述4个深度为N+1的子CU;第二判决单元,用于判断所述4个深度为N+1的子CU的预测模式是否相同。
- 如权利要求7或8所述的视频编码装置,其特征在于,当N取值为0时,所述深度为N的当前层CU为CU64,所述深度为N+1的子CU为CU32;或者当N取值为1时,所述深度为N的当前层CU为CU32,所述深度为N+1的子CU为CU16;或者当N取值为2时,所述深度为N的当前层CU为CU16,所述深度为N+1的子CU为CU8。
- 一种视频编码装置,其特征在于,包括:帧内预测编码单元,用于对深度为N的当前层编码单元CU进行遍历预测以获取所述当前层CU的第一预测结果,其中,所述遍历预测中不包括以所述当前层CU为预测单元的预测,所述第一预测结果包括在所述遍历预测 中所述当前层CU的最佳CU划分模式、所述当前层CU根据所述最佳CU划分模式划分的子CU的预测模式以及所述当前层CU编码所需的语法元素,所述预测模式包括亮度模式和色度模式,N取值为0,1,或2;确定单元,用于如果所述最佳CU划分模式为将所述当前层CU划分成4个深度为N+1的子CU,且所述4个深度为N+1的子CU中任意两个子CU的亮度模式差值小于预定阈值,则根据所4个深度为N+1的子CU的预测模式确定再度预测模式,其中,所述再度预测模式中的亮度模式由所述4个深度为N+1的子CU的亮度模式确定,所述再度预测模式中的色度模式由所述4个深度为N+1的子CU的色度模式确定;所述帧内预测编码单元还用于以所述再度预测模式为指定预测模式对所述4个深度为N+1的子CU进行指定预测模式预测以获取第二预测结果,所述第二预测结果包括在所述最佳CU划分模式以及所述再度预测模式下所述当前层CU编码所需的语法元素;视频编码单元,用于根据所述最佳CU划分模式、所述再度预测模式以及所述第二预测结果中所述当前层CU编码所需的语法元素,以所述当前层CU为编码单位对所述当前层CU进行编码。
- 如权利要求10所述的视频编码装置,其特征在于,所述视频编码装置还包括:第一判决单元,用于判断所述最佳CU划分模式是否为将所述当前层CU划分成所述4个深度为N+1的子CU;第二判决单元,用于判断所述4个深度为N+1的子CU中任意两个子CU的亮度模式差值是否小于预定阈值。
- 如权利要求10或11所述的视频编码装置,其特征在于,当N取值为0时,所述深度为N的当前层CU为CU64,所述深度为N+1的子CU为CU32;或者当N取值为1时,所述深度为N的当前层CU为CU32,所述深度为N+1的子CU为CU16;或者当N取值为2时,所述深度为N的当前层CU为CU16,所述深度为N+1的子CU为CU8。
- 如权利要求10至12任一项所述的视频编码装置,其特征在于,所述确定单元具体用于确定以下值之一作为所述再度预测模式中的亮度模式:所述4个深度为N+1的子CU的亮度模式中的最大值;或者所述4个深度为N+1的子CU的亮度模式中的最小值;或者所述4个深度为N+1的子CU的亮度模式中的中间值;或者不小于亮度模式平均值的最小整数;或者不大于亮度模式平均值的最大整数;其中,所述亮度平均值为所述4个深度为N+1的子CU的亮度模式的算术平均值、几何平均值、调和平均值、加权平均值、平方平均值中的一个。
- 如权利要求10至13任一项所述的视频编码装置,其特征在于,所述确定单元具体用于确定所述当前层CU的4个深度为N+1的子CU的亮度模式之一作为所述再度预测模式中的色度模式。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP14893107.4A EP3076671A4 (en) | 2014-05-29 | 2014-11-20 | Video coding method and video coding device for intra-frame prediction coding |
US15/204,725 US20160323585A1 (en) | 2014-05-29 | 2016-07-07 | Video coding method for intra-frame predictive coding and video coding apparatus |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410233802.7 | 2014-05-29 | ||
CN201410233802.7A CN104023241B (zh) | 2014-05-29 | 2014-05-29 | 帧内预测编码的视频编码方法及视频编码装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/204,725 Continuation US20160323585A1 (en) | 2014-05-29 | 2016-07-07 | Video coding method for intra-frame predictive coding and video coding apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015180428A1 true WO2015180428A1 (zh) | 2015-12-03 |
Family
ID=51439780
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/091769 WO2015180428A1 (zh) | 2014-05-29 | 2014-11-20 | 帧内预测编码的视频编码方法及视频编码装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20160323585A1 (zh) |
EP (1) | EP3076671A4 (zh) |
CN (1) | CN104023241B (zh) |
WO (1) | WO2015180428A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110572679A (zh) * | 2019-09-27 | 2019-12-13 | 腾讯科技(深圳)有限公司 | 帧内预测的编码方法、装置、设备及可读存储介质 |
CN111654698A (zh) * | 2020-06-12 | 2020-09-11 | 郑州轻工业大学 | 一种针对h.266/vvc的快速cu分区决策方法 |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104023241B (zh) * | 2014-05-29 | 2017-08-04 | 华为技术有限公司 | 帧内预测编码的视频编码方法及视频编码装置 |
WO2016074147A1 (en) | 2014-11-11 | 2016-05-19 | Mediatek Singapore Pte. Ltd. | Separated coding tree for luma and chroma |
CN106911511B (zh) * | 2017-03-10 | 2019-09-13 | 网宿科技股份有限公司 | 一种cdn客户源站的防护方法和系统 |
CN116916009A (zh) | 2017-09-08 | 2023-10-20 | 株式会社Kt | 视频信号处理方法及装置 |
CN108702505B (zh) * | 2017-12-14 | 2020-12-11 | 北京金山云网络技术有限公司 | 一种编码单元划分决策方法、装置、编码器及存储介质 |
CN108337523B (zh) * | 2018-01-31 | 2021-09-17 | 南京理工大学 | 基于dis遗传性的3d视频深度图像帧内快速编码方法 |
CN111385572B (zh) | 2018-12-27 | 2023-06-02 | 华为技术有限公司 | 预测模式确定方法、装置及编码设备和解码设备 |
EP3893505A4 (en) * | 2018-12-27 | 2022-05-11 | Huawei Technologies Co., Ltd. | METHOD AND DEVICE FOR DETERMINING PREDICTION MODE, ENCODING DEVICE AND DECODING DEVICE |
CN109889842B (zh) * | 2019-02-21 | 2022-02-08 | 北方工业大学 | 基于knn分类器的虚拟现实视频cu划分算法 |
WO2020182052A1 (en) | 2019-03-11 | 2020-09-17 | Huawei Technologies Co., Ltd. | An encoder, a decoder and corresponding methods restricting size of sub-partitions from intra sub-partition coding mode tool |
CN112118450B (zh) * | 2019-06-21 | 2022-03-29 | 杭州海康威视数字技术股份有限公司 | 预测模式的解码、编码方法及装置 |
CN112702603A (zh) * | 2019-10-22 | 2021-04-23 | 腾讯科技(深圳)有限公司 | 视频编码方法、装置、计算机设备和存储介质 |
CN112866693B (zh) * | 2021-03-25 | 2023-03-24 | 北京百度网讯科技有限公司 | 编码单元cu的划分方法、装置、电子设备和存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102740078A (zh) * | 2012-07-12 | 2012-10-17 | 北方工业大学 | 基于hevc标准的自适应空间可伸缩编码 |
CN103338371A (zh) * | 2013-06-07 | 2013-10-02 | 东华理工大学 | 一种快速高效率视频编码帧内模式判决方法 |
CN103597827A (zh) * | 2011-06-10 | 2014-02-19 | 联发科技股份有限公司 | 可伸缩视频编码方法及其装置 |
CN104023241A (zh) * | 2014-05-29 | 2014-09-03 | 华为技术有限公司 | 帧内预测编码的视频编码方法及视频编码装置 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101675118B1 (ko) * | 2010-01-14 | 2016-11-10 | 삼성전자 주식회사 | 스킵 및 분할 순서를 고려한 비디오 부호화 방법과 그 장치, 및 비디오 복호화 방법과 그 장치 |
CN102595121A (zh) * | 2011-01-15 | 2012-07-18 | 华为技术有限公司 | 帧内预测模式二进制化的方法、解码方法、装置和系统 |
US8964852B2 (en) * | 2011-02-23 | 2015-02-24 | Qualcomm Incorporated | Multi-metric filtering |
CN103763570B (zh) * | 2014-01-20 | 2017-02-01 | 华侨大学 | 一种基于satd的hevc快速帧内预测方法 |
CN103813178B (zh) * | 2014-01-28 | 2017-01-25 | 浙江大学 | 一种基于编码单元深度时空相关性的快速hevc编码方法 |
-
2014
- 2014-05-29 CN CN201410233802.7A patent/CN104023241B/zh active Active
- 2014-11-20 EP EP14893107.4A patent/EP3076671A4/en not_active Ceased
- 2014-11-20 WO PCT/CN2014/091769 patent/WO2015180428A1/zh active Application Filing
-
2016
- 2016-07-07 US US15/204,725 patent/US20160323585A1/en not_active Abandoned
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103597827A (zh) * | 2011-06-10 | 2014-02-19 | 联发科技股份有限公司 | 可伸缩视频编码方法及其装置 |
CN102740078A (zh) * | 2012-07-12 | 2012-10-17 | 北方工业大学 | 基于hevc标准的自适应空间可伸缩编码 |
CN103338371A (zh) * | 2013-06-07 | 2013-10-02 | 东华理工大学 | 一种快速高效率视频编码帧内模式判决方法 |
CN104023241A (zh) * | 2014-05-29 | 2014-09-03 | 华为技术有限公司 | 帧内预测编码的视频编码方法及视频编码装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3076671A4 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110572679A (zh) * | 2019-09-27 | 2019-12-13 | 腾讯科技(深圳)有限公司 | 帧内预测的编码方法、装置、设备及可读存储介质 |
CN111654698A (zh) * | 2020-06-12 | 2020-09-11 | 郑州轻工业大学 | 一种针对h.266/vvc的快速cu分区决策方法 |
CN111654698B (zh) * | 2020-06-12 | 2022-03-22 | 郑州轻工业大学 | 一种针对h.266/vvc的快速cu分区决策方法 |
Also Published As
Publication number | Publication date |
---|---|
EP3076671A1 (en) | 2016-10-05 |
CN104023241A (zh) | 2014-09-03 |
US20160323585A1 (en) | 2016-11-03 |
EP3076671A4 (en) | 2017-06-14 |
CN104023241B (zh) | 2017-08-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015180428A1 (zh) | 帧内预测编码的视频编码方法及视频编码装置 | |
JP7087071B2 (ja) | 符号化方法及び機器 | |
TW202044834A (zh) | 用於處理視訊內容的方法及系統 | |
TW202025740A (zh) | 濾波器 | |
GB2531004A (en) | Residual colour transform signalled at sequence level for specific coding modes | |
TW202005401A (zh) | 擴展四叉樹、不等四劃分的主要概念以及信令 | |
CN111327904B (zh) | 图像重建方法和装置 | |
TWI820195B (zh) | 分割方法的冗餘移除 | |
WO2020125595A1 (zh) | 视频译码器及相应方法 | |
BR112021004124A2 (pt) | método de decodificação de vídeo e decodificador de vídeo | |
BR112020023927A2 (pt) | método e aparelho para divisão de uma imagem, e um método e aparelho para codificação ou decodificação de uma imagem | |
CN113647104A (zh) | 在以自适应区域数量进行的几何分区中的帧间预测 | |
KR102595146B1 (ko) | 비디오 인코더, 비디오 디코더 및 그에 대응하는 방법 | |
CN111327899A (zh) | 视频译码器及相应方法 | |
WO2020224476A1 (zh) | 一种图像划分方法、装置及设备 | |
CN111327894B (zh) | 块划分方法、视频编解码方法、视频编解码器 | |
WO2020258052A1 (zh) | 图像分量预测方法、装置及计算机存储介质 | |
WO2022217447A1 (zh) | 视频编解码方法与系统、及视频编解码器 | |
WO2020200052A1 (zh) | 视频编码方法、视频解码方法及相关设备 | |
KR102690838B1 (ko) | 픽처 경계 처리를 위한 멀티형 트리 깊이 확장 | |
WO2020143684A1 (zh) | 图像预测方法、装置、设备、系统及存储介质 | |
KR20230174244A (ko) | Abt를 위한 vvc 규범적 및 인코더 측 적응들 | |
EP4136578A1 (en) | Methods and systems for combined lossless and lossy coding | |
BR112021016502A2 (pt) | Sistemas e métodos para aplicar filtros de desbloqueio a dados de vídeo reconstruídos |
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: 14893107 Country of ref document: EP Kind code of ref document: A1 |
|
REEP | Request for entry into the european phase |
Ref document number: 2014893107 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2014893107 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |