CN112135128B - Image prediction method, coding tree node division method and device thereof - Google Patents
Image prediction method, coding tree node division method and device thereof Download PDFInfo
- Publication number
- CN112135128B CN112135128B CN201910551446.6A CN201910551446A CN112135128B CN 112135128 B CN112135128 B CN 112135128B CN 201910551446 A CN201910551446 A CN 201910551446A CN 112135128 B CN112135128 B CN 112135128B
- Authority
- CN
- China
- Prior art keywords
- current coding
- tree node
- block
- coding unit
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 161
- 238000012545 processing Methods 0.000 claims description 139
- 241000023320 Luma <angiosperm> Species 0.000 claims description 82
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical group COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 claims description 82
- 230000015654 memory Effects 0.000 claims description 79
- 238000000638 solvent extraction Methods 0.000 claims description 26
- 238000003860 storage Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 2
- 238000013139 quantization Methods 0.000 description 80
- 230000006854 communication Effects 0.000 description 50
- 238000004891 communication Methods 0.000 description 50
- 230000008569 process Effects 0.000 description 27
- 238000005192 partition Methods 0.000 description 25
- 238000010586 diagram Methods 0.000 description 24
- 239000013598 vector Substances 0.000 description 19
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 17
- 230000005540 biological transmission Effects 0.000 description 12
- 230000006835 compression Effects 0.000 description 12
- 238000007906 compression Methods 0.000 description 12
- 230000003044 adaptive effect Effects 0.000 description 11
- 230000009466 transformation Effects 0.000 description 11
- 238000003491 array Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000005070 sampling Methods 0.000 description 7
- 238000001914 filtration Methods 0.000 description 6
- 230000002123 temporal effect Effects 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 4
- 238000005457 optimization Methods 0.000 description 4
- 230000003068 static effect Effects 0.000 description 4
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000011664 signaling Effects 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000002146 bilateral effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000012432 intermediate storage Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 229910052710 silicon Inorganic materials 0.000 description 2
- 239000010703 silicon Substances 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 241000985610 Forpus Species 0.000 description 1
- 238000012952 Resampling Methods 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
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/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/107—Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
-
- 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/124—Quantisation
-
- 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/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- 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/186—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 colour or a chrominance component
-
- 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
-
- 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/80—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
- H04N19/82—Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
-
- 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/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/96—Tree coding, e.g. quad-tree coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The application provides an image prediction method, a coding tree node dividing method and a device thereof, wherein the image prediction method comprises the following steps: determining the type of a current coding unit, wherein the type of the current coding unit is a luminance and chrominance coding unit, a luminance and chrominance coding unit or a chrominance coding unit; determining a prediction mode of a current coding unit according to the type of the current coding unit and/or the prediction mode of an adjacent image block, wherein the image block in the current coding unit and the adjacent image block are spatially adjacent image blocks, and the adjacent image block comprises an adjacent brightness block and/or an adjacent chroma block; and predicting the image block in the current coding unit according to the prediction mode of the current coding unit. The method in the embodiment of the application can improve the video coding and decoding efficiency.
Description
Technical Field
The present application relates to the field of video encoding and decoding, and more particularly, to an image prediction method, a coding tree node division method, and an apparatus thereof.
Background
Digital video capabilities can be incorporated into a wide variety of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal Digital Assistants (PDAs), laptop or desktop computers, tablet computers, electronic book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radio telephones (so-called "smartphones"), video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video compression techniques such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4 part 10 advanced video coding (advanced video coding, AVC), the video coding standard H.265/High Efficiency Video Coding (HEVC) standard, and extensions of such standards. Video devices may more efficiently transmit, receive, encode, decode, and/or store digital video information by implementing such video compression techniques.
Video compression techniques perform spatial (intra-picture) prediction and/or temporal (inter-picture) prediction to reduce or eliminate redundancy inherent in video sequences. For block-based video coding, a video slice (i.e., a video frame or a portion of a video frame) may be partitioned into tiles, which may also be referred to as treeblocks, coding Units (CUs), and/or coding nodes. Image blocks in a slice to be intra-coded (I) of an image are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same image. Image blocks in a to-be-inter-coded (P or B) stripe of an image may use spatial prediction with respect to reference samples in neighboring blocks in the same image or temporal prediction with respect to reference samples in other reference images. An image may be referred to as a frame and a reference image may be referred to as a reference frame.
In the entropy encoding and entropy decoding processes, a context model for each bit corresponding to a syntax element needs to be determined according to context information (e.g., coding information in a reconstructed region around a node corresponding to the syntax element), which may also be generally referred to as context modeling. However, if the context modeling method is not appropriate, video codec efficiency may be reduced.
Disclosure of Invention
The application provides an image prediction method, a coding tree node dividing method and a device thereof, which can improve video coding and decoding efficiency.
In a first aspect, there is provided an image prediction method, the method comprising: determining the type of a current coding unit, wherein the type of the current coding unit is a luminance and chrominance coding unit, a luminance and chrominance coding unit or a chrominance coding unit; determining a prediction mode of the current coding unit according to the type of the current coding unit and/or the prediction mode of the adjacent image blocks, wherein the image blocks in the current coding unit and the adjacent image blocks are spatially adjacent image blocks, and the adjacent image blocks comprise adjacent brightness blocks and/or adjacent chroma blocks; and predicting the image block in the current coding unit according to the prediction mode of the current coding unit.
According to the application, according to the type of the current coding unit, the prediction mode of the adjacent image block matched with the type of the current coding unit is selected, context modeling is carried out, the prediction mode of the current coding unit is determined, and the image block in the current coding unit is predicted according to the prediction mode, so that the video coding and decoding efficiency can be improved.
With reference to the first aspect, in certain implementation manners of the first aspect, the determining a prediction mode of the current coding unit according to a type of the current coding unit and/or a prediction mode of a neighboring image block includes: determining a context model number corresponding to a syntax element of the current coding unit according to the type of the current coding unit and/or a prediction mode of an adjacent image block; and determining the prediction mode of the current coding unit according to the context model number.
With reference to the first aspect, in certain implementation manners of the first aspect, the determining, according to a type of the current coding unit and/or a prediction mode of a neighboring image block, a context model number corresponding to a syntax element of the current coding unit includes: if the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or if the current coding unit is a chroma coding unit, determining condL according to the prediction mode of the left neighboring chroma block and determining condA according to the prediction mode of the upper neighboring chroma block; determining the context model number from the condL and the condA; wherein condL and condA are binary variables.
In the application, when the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, a context model corresponding to the syntax element of the current coding unit is determined according to the prediction mode of the adjacent luminance block, and when the current coding unit is a chrominance coding unit, a context model corresponding to the syntax element of the current coding unit is determined according to the prediction mode of the adjacent chrominance block, so that the prediction mode of the adjacent image block selected by context modeling can be ensured to be matched with the type of the current coding unit, thereby reducing the number of coding bits and improving the compression efficiency, and therefore, the efficiency of entropy coding and entropy decoding can be improved.
With reference to the first aspect, in certain implementations of the first aspect, the determining the context model number includes determining the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is the context model number, ctxSetIdx is the number of the context group; in the case that the current encoding unit is a luma chroma encoding unit or a luma encoding unit, the condL indicates whether a prediction mode of the left neighboring luma block is intra block copy prediction, the condA indicates whether a prediction mode of the upper neighboring luma block is intra block copy prediction, availableL indicates whether the left neighboring luma block is available, and availableA indicates whether the upper neighboring luma block is available; or if the current coding unit is a chroma coding unit, the condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, the condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
With reference to the first aspect, in certain implementation manners of the first aspect, the determining, according to a type of the current coding unit and/or a prediction mode of the neighboring image block, a context model number corresponding to a syntax element of the current coding unit includes: if the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; or determining the context model number from the condL and the condA; determining the context model number according to a preset condL and a preset condA when the current coding unit is a chroma coding unit; wherein condL and condA are binary variables.
In the present application, when the current coding unit is a chroma coding unit, the condL and the condA are preset values, and at this time, the context model corresponding to the syntax element of the current coding unit is irrelevant to the neighboring image block, so that the complexity of entropy coding and entropy decoding can be reduced, and the video coding and decoding efficiency can be improved.
With reference to the first aspect, in certain implementations of the first aspect, the determining the context model number includes determining the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is the context model number, ctxSetIdx is the number of the context group; in the case that the current encoding unit is a luma chroma encoding unit or a luma encoding unit, the condL indicates whether a prediction mode of the left neighboring luma block is intra block copy prediction, the condA indicates whether a prediction mode of the upper neighboring luma block is intra block copy prediction, availableL indicates whether the left neighboring luma block is available, and availableA indicates whether the upper neighboring luma block is available; or in the case that the current coding unit is a chroma coding unit, the condL is a preset value, the condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
With reference to the first aspect, in certain implementations of the first aspect, the syntax element is a pred_mode_ ibc _flag, the syntax element is used to identify whether the current coding unit uses intra block copy prediction, condL is used to indicate whether a prediction mode of a left neighboring image block is intra block copy prediction, and condA is used to indicate whether a prediction mode of an upper neighboring image block is intra block copy prediction.
In a second aspect, there is provided a method of code tree node partitioning, the method comprising: determining the type of a current coding tree node, wherein the type of the current coding tree node is a brightness and chrominance coding tree node, a brightness coding tree node or a chrominance coding tree node; determining a dividing mode of the current coding tree node according to the type of the current coding tree node and/or the coding information of the adjacent image blocks, wherein the image blocks in the current coding tree node and the adjacent image blocks are spatially adjacent image blocks, the coding information comprises the quadtree depth of the adjacent image blocks and/or the width and height of the adjacent image blocks, and the adjacent image blocks comprise adjacent brightness blocks and/or adjacent chroma blocks; and dividing the current coding tree node according to the dividing mode of the coding tree node.
In the application, according to the type of the current coding unit, the coding information of the adjacent image blocks matched with the type of the current coding unit is selected, the context modeling is carried out, the dividing mode of the current coding unit is determined, and the current coding tree node is divided according to the dividing mode, so that the video coding and decoding efficiency can be improved.
With reference to the second aspect, in some implementations of the second aspect, the determining a partition manner of the current coding tree node according to a type of the current coding tree node and/or coding information of the neighboring image blocks includes: determining a context model number corresponding to a syntax element of the current coding tree node according to the type of the current coding tree node and/or coding information of the adjacent image blocks; and determining the dividing mode of the current coding tree node according to the context model number.
With reference to the second aspect, in some implementations of the second aspect, the determining, according to the type of the current coding tree node and/or coding information of the neighboring image blocks, a context model number corresponding to a syntax element of the current coding tree node includes: determining the context model number according to the quadtree depth of the adjacent luminance block and the quadtree depth of the current coding tree node when the current coding tree node is a luminance-chrominance coding tree node or a luminance coding tree node; or determining the context model number according to the quadtree depth of the current coding tree node under the condition that the current coding tree node is a chroma coding tree node.
In the present application, when the current coding tree node is a chroma coding tree node, the condL and the condA are preset values, and at this time, the context model corresponding to the syntax element of the current coding unit is irrelevant to the quadtree depth of the adjacent image block, so that the complexity of entropy coding and entropy decoding can be reduced, and the video coding and decoding efficiency can be improved.
With reference to the second aspect, in certain implementations of the second aspect, the determining the context model number includes determining the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is the context model number, ctxSetIdx is the number of the context group; in the case that the current coding tree node is a luma chroma coding tree node or a luma coding tree node, the condL represents whether a quadtree depth of the left-side neighboring luma block is greater than a quadtree depth of the current coding tree node, the condA represents whether a quadtree depth of the top-side neighboring luma block is greater than a quadtree depth of the current coding tree node, availableL represents whether the left-side neighboring luma block is available, and availableA represents whether the top-side neighboring luma block is available; or in the case that the current coding unit is a chroma coding unit, the condL is a preset value, the condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
With reference to the second aspect, in some implementations of the second aspect, the syntax element is a split_qt_flag for identifying whether a current coding tree node uses quadtree partitioning.
With reference to the second aspect, in some implementations of the second aspect, the determining, according to the type of the current coding tree node and/or coding information of the neighboring image blocks, a context model number corresponding to a syntax element of the current coding tree node includes: determining the context model number according to the width and height of the adjacent brightness blocks and the availability of the current coding tree node dividing mode under the condition that the current coding tree node is a brightness chromaticity coding tree node or a brightness coding tree node; or determining the context model number according to the availability of the current coding tree node dividing mode under the condition that the current coding tree node is a chroma coding unit.
In the present application, when the current coding tree node is a chroma coding tree node, the condL and the condA are preset values, and at this time, the context model corresponding to the syntax element of the current coding unit is irrelevant to the width and height of the adjacent image block, so that the complexity of entropy coding and entropy decoding can be reduced, and the video coding and decoding efficiency can be improved.
With reference to the second aspect, in certain implementations of the second aspect, the determining the context model number includes determining the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is the context model number, ctxSetIdx is the number of the context group; in the case where the current encoding tree node is a luminance-chrominance encoding tree node or a luminance-encoding tree node, condL represents whether the width and height of the left-side neighboring luminance block are greater than those of the current encoding tree node, condA represents whether the width and height of the upper-side neighboring luminance block are greater than those of the current encoding tree node, availableL represents whether the left-side neighboring luminance block is available, availableA represents whether the upper-side neighboring luminance block is available; or, if the current coding unit is a chroma coding unit, condL is a predicted value or determined by the current coding tree node, condA is a preset value, availableL indicates whether the left neighboring chroma block is available, and availableA indicates whether the upper neighboring chroma block is available.
With reference to the second aspect, in some implementations of the second aspect, the syntax element is a split_cu_flag, for identifying whether a current coding tree node is partitioned.
In a third aspect, there is provided an image prediction method, the method comprising: in the case that the current coding unit is a chroma coding unit, determining a context model number corresponding to a syntax element of the current coding unit according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether the left-side neighboring chroma block is available, availableA indicates whether the upper-side neighboring chroma block is available; the condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, and the condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction; or the condL and the condA are both preset values; determining a prediction mode of the current coding unit according to the context model number; and predicting the image block in the current coding unit according to the prediction mode of the current coding unit.
In a fourth aspect, there is provided a method of partitioning nodes of a coding tree, the method comprising: in the case that the current coding tree node is a chroma coding tree node, determining a context model number corresponding to a syntax element of the current coding tree node according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether the left-side neighboring chroma block is available, availableA indicates whether the upper-side neighboring chroma block is available; both condL and condA are preset values; or the condL is determined by the current coding tree node, the condA is a preset value; determining the dividing mode of the current coding tree node according to the context model number; and dividing the current coding tree node according to the dividing mode of the coding tree node.
In a fifth aspect, there is provided an image prediction apparatus including: the determining module is used for determining the type of the current coding unit, wherein the type of the current coding unit is a luminance and chrominance coding unit, a luminance and chrominance coding unit or a chrominance coding unit; the processing module is used for determining the prediction mode of the current coding unit according to the type of the current coding unit and/or the prediction mode of the adjacent image blocks, wherein the image blocks in the current coding unit and the adjacent image blocks are spatially adjacent image blocks, and the adjacent image blocks comprise adjacent brightness blocks and/or adjacent chroma blocks; and the prediction module is used for predicting the image block in the current coding unit according to the prediction mode of the current coding unit.
According to the image prediction device, the prediction mode of the adjacent image block matched with the type of the current coding unit is selected according to the type of the current coding unit, context modeling is conducted, the prediction mode of the current coding unit is determined, and the image block in the current coding unit is predicted according to the prediction mode, so that the video coding and decoding efficiency can be improved.
With reference to the fifth aspect, in certain implementation manners of the fifth aspect, the processing module is specifically configured to: determining a context model number corresponding to a syntax element of the current coding unit according to the type of the current coding unit and/or a prediction mode of an adjacent image block; and determining the prediction mode of the current coding unit according to the context model number.
With reference to the fifth aspect, in certain implementation manners of the fifth aspect, the processing module is specifically configured to: if the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or if the current coding unit is a chroma coding unit, determining condL according to the prediction mode of the left neighboring chroma block and determining condA according to the prediction mode of the upper neighboring chroma block; determining the context model number from the condL and the condA; wherein condL and condA are binary variables.
With reference to the fifth aspect, in certain implementations of the fifth aspect, the processing module is specifically configured to determine the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is the context model number, ctxSetIdx is the number of the context group; in the case that the current encoding unit is a luma chroma encoding unit or a luma encoding unit, the condL indicates whether a prediction mode of the left neighboring luma block is intra block copy prediction, the condA indicates whether a prediction mode of the upper neighboring luma block is intra block copy prediction, availableL indicates whether the left neighboring luma block is available, and availableA indicates whether the upper neighboring luma block is available; or if the current coding unit is a chroma coding unit, the condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, the condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
With reference to the fifth aspect, in certain implementation manners of the fifth aspect, the processing module is specifically configured to: if the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or determining the context model number according to a preset condL and a preset condA when the current coding unit is a chroma coding unit; wherein condL and condA are binary variables.
With reference to the fifth aspect, in certain implementations of the fifth aspect, the processing module is specifically configured to determine the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is the context model number, ctxSetIdx is the number of the context group; in the case that the current encoding unit is a luma chroma encoding unit or a luma encoding unit, the condL indicates whether a prediction mode of the left neighboring luma block is intra block copy prediction, the condA indicates whether a prediction mode of the upper neighboring luma block is intra block copy prediction, availableL indicates whether the left neighboring luma block is available, and availableA indicates whether the upper neighboring luma block is available; or in the case that the current coding unit is a chroma coding unit, the condL is a preset value, the condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
With reference to the fifth aspect, in certain implementations of the fifth aspect, the syntax element is pred_mode_ ibc _flag, the syntax element is used to identify whether the current coding unit uses intra block copy prediction, condL is used to indicate whether a prediction mode of a left neighboring image block is intra block copy prediction, and condA is used to indicate whether a prediction mode of an upper neighboring image block is intra block copy prediction.
In a sixth aspect, there is provided an encoding tree node dividing apparatus, comprising: the determining module is used for determining the type of the current coding tree node, wherein the type of the current coding tree node is a brightness and chrominance coding tree node, a brightness coding tree node or a chrominance coding tree node; the processing module is used for determining the division mode of the current coding tree node according to the type of the current coding tree node and/or the coding information of the adjacent image blocks, wherein the image blocks in the current coding tree node and the adjacent image blocks are spatially adjacent image blocks, the coding information comprises the quadtree depth of the adjacent image blocks and/or the width and height of the adjacent image blocks, and the adjacent image blocks comprise adjacent brightness blocks and/or adjacent chroma blocks; and the dividing module is used for dividing the current coding tree node according to the dividing mode of the coding tree node.
According to the coding tree node dividing device, the coding information of the adjacent image blocks matched with the type of the current coding unit is selected according to the type of the current coding unit, context modeling is conducted, the dividing mode of the current coding unit is determined, and the current coding tree node is divided according to the dividing mode, so that the video coding and decoding efficiency can be improved.
With reference to the sixth aspect, in certain implementations of the sixth aspect, the processing module is specifically configured to: determining a context model number corresponding to a syntax element of the current coding tree node according to the type of the current coding tree node and/or coding information of the adjacent image blocks; and determining the dividing mode of the current coding tree node according to the context model number.
With reference to the sixth aspect, in certain implementations of the sixth aspect, the processing module is specifically configured to: determining the context model number according to the quadtree depth of the adjacent luminance block and the quadtree depth of the current coding tree node when the current coding tree node is a luminance-chrominance coding tree node or a luminance coding tree node; or determining the context model number according to the quadtree depth of the current coding tree node under the condition that the current coding tree node is a chroma coding tree node.
With reference to the sixth aspect, in certain implementations of the sixth aspect, the processing module is specifically configured to determine the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is the context model number, ctxSetIdx is the number of the context group; in the case that the current coding tree node is a luma chroma coding tree node or a luma coding tree node, the condL represents whether a quadtree depth of the left-side neighboring luma block is greater than a quadtree depth of the current coding tree node, the condA represents whether a quadtree depth of the top-side neighboring luma block is greater than a quadtree depth of the current coding tree node, availableL represents whether the left-side neighboring luma block is available, and availableA represents whether the top-side neighboring luma block is available; or in the case that the current coding unit is a chroma coding unit, the condL is a preset value, the condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
With reference to the sixth aspect, in some implementations of the sixth aspect, the syntax element is a split_qt_flag, for identifying whether a current coding tree node uses quadtree partitioning.
With reference to the sixth aspect, in certain implementations of the sixth aspect, the processing module is specifically configured to: determining the context model number according to the width and height of the adjacent brightness blocks and the availability of the current coding tree node dividing mode under the condition that the current coding tree node is a brightness chromaticity coding tree node or a brightness coding tree node; or determining the context model number according to the availability of the current coding tree node dividing mode under the condition that the current coding tree node is a chroma coding unit.
With reference to the sixth aspect, in certain implementations of the sixth aspect, the processing module is specifically configured to determine the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is the context model number, ctxSetIdx is the number of the context group; in the case where the current encoding tree node is a luminance-chrominance encoding tree node or a luminance-encoding tree node, condL represents whether the width and height of the left-side neighboring luminance block are greater than those of the current encoding tree node, condA represents whether the width and height of the upper-side neighboring luminance block are greater than those of the current encoding tree node, availableL represents whether the left-side neighboring luminance block is available, availableA represents whether the upper-side neighboring luminance block is available; or, if the current coding unit is a chroma coding unit, condL is a predicted value or determined by the current coding tree node, condA is a preset value, availableL indicates whether the left neighboring chroma block is available, and availableA indicates whether the upper neighboring chroma block is available.
With reference to the sixth aspect, in some implementations of the sixth aspect, the syntax element is a split_cu_flag, for identifying whether a current coding tree node is partitioned.
In a seventh aspect, there is provided an image prediction apparatus comprising: the processing module is used for determining a context model number corresponding to a syntax element of the current coding unit according to the following formula when the current coding unit is a chroma coding unit:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether the left-side neighboring chroma block is available, availableA indicates whether the upper-side neighboring chroma block is available; the condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, and the condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction; or the condL and the condA are both preset values; the processing module is used for determining the prediction mode of the current coding unit according to the context model number; and the prediction module is used for predicting the image block in the current coding unit according to the prediction mode of the current coding unit.
An eighth aspect provides an encoding tree node dividing apparatus, including: the processing module is used for determining a context model number corresponding to a syntax element of the current coding tree node according to the following formula when the current coding tree node is a chroma coding tree node:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether the left-side neighboring chroma block is available, availableA indicates whether the upper-side neighboring chroma block is available; both condL and condA are preset values; or the condL is determined by the current coding tree node, the condA is a preset value; the processing module is used for determining the dividing mode of the current coding tree node according to the context model number; and the dividing module is used for dividing the current coding tree node according to the dividing mode of the coding tree node.
In a ninth aspect, an embodiment of the present application provides an apparatus for decoding video data, the apparatus comprising:
a memory for storing video data in the form of a code stream;
A video decoder for implementing part or all of the steps of any of the methods of the first or second or third or fourth aspects.
In a tenth aspect, embodiments of the present application provide an apparatus for decoding video data, the apparatus comprising:
a memory for storing video data in the form of a code stream;
A video decoder for implementing part or all of the steps of any of the methods of the first or second or third or fourth aspects.
In an eleventh aspect, an embodiment of the present application provides an apparatus for encoding video data, including: a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to perform part or all of the steps of any of the methods of the first or second or third or fourth aspects.
Optionally, the memory is a nonvolatile memory.
Optionally, the memory and the processor are coupled to each other.
In a twelfth aspect, an embodiment of the present application provides an apparatus for decoding video data, including: a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to perform part or all of the steps of any of the methods of the first or second or third or fourth aspects.
Optionally, the memory is a nonvolatile memory.
Optionally, the memory and the processor are coupled to each other.
In a thirteenth aspect, embodiments of the present application provide a computer readable storage medium storing program code, wherein the program code comprises instructions for performing part or all of the steps of any one of the methods of the first or second or third or fourth aspects.
In a fourteenth aspect, embodiments of the present application provide a computer program product which, when run on a computer, causes the computer to perform part or all of the steps of any one of the methods of the first or second or third or fourth aspects.
It should be understood that, the second to fourteenth aspects of the present application are consistent with the technical solutions of the first aspect of the present application, and the advantages obtained by each aspect and the corresponding possible embodiments are similar, and are not repeated.
It can be seen that in the present application, according to the type of the current coding unit, a prediction mode of an adjacent image block matched with the type of the current coding unit is selected, context modeling is performed, a prediction mode of the current coding unit is determined, and according to the prediction mode, the image block in the current coding unit is predicted, so that the video coding and decoding efficiency can be improved.
Drawings
Fig. 1 is a schematic block diagram of an example video coding system for implementing an embodiment of the present application.
Fig. 2 is a schematic block diagram of an example video encoder for implementing an embodiment of the present application.
Fig. 3 is a schematic block diagram of an example of a video decoder for implementing an embodiment of the present application.
Fig. 4 is a schematic block diagram of an example video coding system for implementing an embodiment of the present application.
Fig. 5 is a schematic block diagram of an example of a video coding apparatus for implementing an embodiment of the present application.
Fig. 6 is a schematic block diagram of an example of an encoding apparatus or a decoding apparatus for implementing an embodiment of the present application.
Fig. 7 is a schematic block diagram of a video communication system for implementing an embodiment of the present application.
Fig. 8 is a schematic flow chart of an image prediction method of an embodiment of the present application.
Fig. 9 is a schematic flow chart of a coding tree node partitioning method of an embodiment of the present application.
Fig. 10 is a schematic block diagram of an image prediction apparatus according to an embodiment of the present application.
Fig. 11 is a schematic block diagram of an apparatus for partitioning nodes of a code tree according to an embodiment of the present application.
Fig. 12 is a schematic block diagram of another image prediction apparatus according to an embodiment of the present application.
Fig. 13 is a schematic block diagram of another code tree node dividing apparatus of an embodiment of the present application.
Fig. 14 is a schematic block diagram of an image encoding/decoding apparatus of an embodiment of the present application.
Detailed Description
The technical scheme of the application will be described below with reference to the accompanying drawings.
In the following description, reference is made to the accompanying drawings which form a part hereof and which show by way of illustration specific aspects in which embodiments of the application may be practiced. It is to be understood that embodiments of the application may also be used in other aspects and may include structural or logical changes not depicted in the drawings. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present application is defined by the appended claims.
For example, it should be understood that the disclosure in connection with the described methods may be equally applicable to a corresponding apparatus or system performing the methods, and vice versa.
As another example, if one or more specific method steps are described, the corresponding apparatus may comprise one or more units, such as functional units, to perform the one or more described method steps (e.g., one unit performs one or more steps, or multiple units, each of which performs one or more of the multiple steps), even if such one or more units are not explicitly described or illustrated in the figures.
Furthermore, if a specific apparatus is described based on one or more units, such as functional units, the corresponding method may include one step to perform the function of the one or more units (e.g., one step to perform the function of the one or more units, or multiple steps, each of which performs the function of one or more units, even if such one or more steps are not explicitly described or illustrated in the figures). Further, it is to be understood that features of the various exemplary embodiments and/or aspects described herein may be combined with each other, unless explicitly stated otherwise.
The technical scheme related to the embodiment of the application can be applied to the H.266 standard and future video coding standards. The terminology used in the description of the embodiments of the application herein is for the purpose of describing particular embodiments of the application only and is not intended to be limiting of the application. Some concepts that may be related to embodiments of the present application are briefly described below.
Video coding generally refers to processing a sequence of pictures that form a video or video sequence. In the field of video coding, the terms "picture", "frame" or "image" may be used as synonyms. Video encoding as used herein refers to video encoding or video decoding. Video encoding is performed on the source side, typically including processing (e.g., by compression) the original video picture to reduce the amount of data required to represent the video picture, thereby more efficiently storing and/or transmitting. Video decoding is performed on the destination side, typically involving inverse processing with respect to the encoder to reconstruct the video pictures. The embodiment relates to video picture "encoding" is understood to relate to "encoding" or "decoding" of a video sequence. The combination of the encoding portion and the decoding portion is also called codec (encoding and decoding).
A video sequence comprises a series of pictures (pictures) which are further divided into slices (slices) which are further divided into blocks (blocks). Video coding performs coding processing in units of blocks, and in some new video coding standards, the concept of blocks is further extended. For example, in the h.264 standard, there are Macro Blocks (MBs), which can be further divided into a plurality of prediction blocks (partition) that can be used for predictive coding. In the high performance video coding (HEVC) standard, basic concepts such as a Coding Unit (CU), a Prediction Unit (PU), and a Transform Unit (TU) are used, and various block units are functionally divided and described by using a completely new tree-based structure. For example, a CU may be divided into smaller CUs according to a quadtree, and the smaller CUs may continue to be divided, thereby forming a quadtree structure, where a CU is a basic unit for dividing and encoding an encoded image. Similar tree structures exist for PUs and TUs, which may correspond to prediction blocks, being the basic unit of predictive coding. The CU is further divided into a plurality of PUs according to a division pattern. The TU may correspond to a transform block, which is a basic unit for transforming a prediction residual. However, whether CU, PU or TU, essentially belongs to the concept of blocks (or picture blocks).
For example, in HEVC, a CTU is split into multiple CUs by using a quadtree structure denoted as a coding tree. A decision is made at the CU level whether to encode a picture region using inter-picture (temporal) or intra-picture (spatial) prediction. Each CU may be further split into one, two, or four PUs depending on the PU split type. The same prediction process is applied within one PU and the relevant information is transmitted to the decoder on a PU basis. After the residual block is obtained by applying the prediction process based on the PU split type, the CU may be partitioned into Transform Units (TUs) according to other quadtree structures similar to the coding tree for the CU. In a recent development of video compression techniques, the coded blocks are partitioned using quadtree and binary tree (quad-tree and binary tree, QTBT) partition frames. In the QTBT block structure, the CU may be square or rectangular in shape.
Herein, for convenience of description and understanding, an image block to be encoded in a current encoded image may be referred to as a current image block, for example, in encoding, a block currently being encoded; in decoding, a block currently being decoded is referred to. A decoded image block in a reference image used for prediction of a current image block is referred to as a reference block, i.e. a reference block is a block providing a reference signal for the current image block, wherein the reference signal represents pixel values within the image block. A block in the reference image that provides a prediction signal for the current image block may be referred to as a prediction block, where the prediction signal represents pixel values or sample signals within the prediction block. For example, after traversing multiple reference blocks, the best reference block is found, which will provide prediction for the current image block, which is referred to as the prediction block.
In the case of lossless video coding, the original video picture may be reconstructed, i.e., the reconstructed video picture has the same quality as the original video picture (assuming no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, the amount of data needed to represent a video picture is reduced by performing further compression, e.g. quantization, whereas the decoder side cannot reconstruct the video picture completely, i.e. the quality of the reconstructed video picture is lower or worse than the quality of the original video picture.
Several video coding standards of h.261 belong to the "lossy hybrid video codec" (i.e. spatial and temporal prediction in the sample domain is combined with 2D transform coding in the transform domain for applying quantization). Each picture of a video sequence is typically partitioned into non-overlapping sets of blocks, typically encoded at the block level. In other words, the encoder side typically processes, i.e. encodes, video at the block (video block) level, e.g. generates a prediction block by spatial (intra-picture) prediction and temporal (inter-picture) prediction, subtracts the prediction block from the current image block (the currently processed or to-be-processed block) to obtain a residual block, transforms the residual block in the transform domain and quantizes the residual block to reduce the amount of data to be transmitted (compressed), while the decoder side applies the inverse processing part of the relative encoder to the encoded or compressed block to reconstruct the current image block for representation. In addition, the encoder replicates the decoder processing loop so that the encoder and decoder generate the same predictions (e.g., intra-prediction and inter-prediction) and/or reconstructions for processing, i.e., encoding, the subsequent blocks.
The system architecture to which the embodiments of the present application are applied is described below. Referring to fig. 1, fig. 1 schematically shows a block diagram of a video encoding and decoding system 10 to which embodiments of the present application are applied. As shown in fig. 1, video encoding and decoding system 10 may include a source device 12 and a destination device 14, source device 12 generating encoded video data, and thus source device 12 may be referred to as a video encoding apparatus. Destination device 14 may decode encoded video data generated by source device 12, and thus destination device 14 may be referred to as a video decoding apparatus. Various embodiments of source device 12, destination device 14, or both may include one or more processors and memory coupled to the one or more processors. The memory may include, but is not limited to, read-only memory (ROM), random access memory (random access memory, RAM), erasable programmable read-only memory (EPROM), flash memory, or any other medium from which desired program code can be stored in the form of instructions or data structures accessible by a computer, as described herein. The source device 12 and the destination device 14 may include a variety of devices including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, vehicle mount computers, wireless communication devices, or the like.
Although fig. 1 depicts source device 12 and destination device 14 as separate devices, device embodiments may also include the functionality of both source device 12 and destination device 14, or both, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such embodiments, the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality may be implemented using the same hardware and/or software, or using separate hardware and/or software, or any combination thereof.
A communication connection may be made between source device 12 and destination device 14 via link 13, and destination device 14 may receive encoded video data from source device 12 via link 13. Link 13 may include one or more media or devices capable of moving encoded video data from source device 12 to destination device 14. In one example, link 13 may include one or more communication media that enable source device 12 to transmit encoded video data directly to destination device 14 in real-time. In this example, source apparatus 12 may modulate the encoded video data according to a communication standard, such as a wireless communication protocol, and may transmit the modulated video data to destination apparatus 14. The one or more communication media may include wireless and/or wired communication media such as a Radio Frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the internet). The one or more communication media may include routers, switches, base stations, or other devices facilitating communication from source device 12 to destination device 14.
Source device 12 includes an encoder 20 and, alternatively, source device 12 may also include a picture source 16, a picture preprocessor 18, and a communication interface 22. In a specific implementation, the encoder 20, the picture source 16, the picture preprocessor 18, and the communication interface 22 may be hardware components in the source device 12 or may be software programs in the source device 12. The descriptions are as follows:
The picture source 16 may include or be any type of picture capture device for capturing, for example, real world pictures, and/or any type of picture or comment (for screen content encoding, some text on the screen is also considered part of the picture or image to be encoded), for example, a computer graphics processor for generating computer animated pictures, or any type of device for capturing and/or providing real world pictures, computer animated pictures (e.g., screen content, virtual Reality (VR) pictures), and/or any combination thereof (e.g., live (augmented reality, AR) pictures). Picture source 16 may be a camera for capturing pictures or a memory for storing pictures, picture source 16 may also include any type of (internal or external) interface for storing previously captured or generated pictures and/or for capturing or receiving pictures. When picture source 16 is a camera, picture source 16 may be, for example, an integrated camera, either local or integrated in the source device; when picture source 16 is memory, picture source 16 may be local or integrated memory integrated in the source device, for example. When the picture source 16 comprises an interface, the interface may for example be an external interface receiving pictures from an external video source, for example an external picture capturing device, such as a camera, an external memory or an external picture generating device, for example an external computer graphics processor, a computer or a server. The interface may be any kind of interface according to any proprietary or standardized interface protocol, e.g. a wired or wireless interface, an optical interface.
Wherein a picture can be regarded as a two-dimensional array or matrix of pixel elements. The pixels in the array may also be referred to as sampling points. The number of sampling points of the array or picture in the horizontal and vertical directions (or axes) defines the size and/or resolution of the picture. To represent color, three color components are typically employed, i.e., a picture may be represented as or contain three sample arrays. For example, in RBG format or color space, the picture includes corresponding red, green, and blue sample arrays. In video coding, however, each pixel is typically represented in a luminance/chrominance format or color space, e.g., for a picture in YUV format, comprising a luminance component indicated by Y (which may sometimes be indicated by L) and two chrominance components indicated by U and V. The luminance (luma) component Y represents the luminance or grayscale level intensity (e.g., the same in a grayscale picture), while the two chrominance (chroma) components U and V represent the chrominance or color information components. Accordingly, a picture in YUV format includes a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (U and V). Pictures in RGB format may be converted or transformed into YUV format and vice versa, a process also known as color transformation or conversion. If the picture is black and white, the picture may include only an array of luma samples. In the embodiment of the present application, the picture transmitted from the picture source 16 to the picture processor may also be referred to as the original picture data 17.
A picture preprocessor 18 for receiving the original picture data 17 and performing preprocessing on the original picture data 17 to obtain a preprocessed picture 19 or preprocessed picture data 19. For example, the preprocessing performed by the picture preprocessor 18 may include truing, color format conversion (e.g., from RGB format to YUV format), toning, or denoising.
Encoder 20 (or video encoder 20) receives pre-processed picture data 19, and processes pre-processed picture data 19 using an associated prediction mode (e.g., a prediction mode in various embodiments herein) to provide encoded picture data 21 (details of the structure of encoder 20 will be described further below based on fig. 2 or fig. 4 or fig. 5). In some embodiments, encoder 20 may be used to perform various embodiments described below to implement the application of the image prediction method described in the present application on the encoding side.
Communication interface 22 may be used to receive encoded picture data 21 and may transmit encoded picture data 21 over link 13 to destination device 14 or any other device (e.g., memory) for storage or direct reconstruction, which may be any device for decoding or storage. Communication interface 22 may be used, for example, to encapsulate encoded picture data 21 into a suitable format, such as a data packet, for transmission over link 13.
Destination device 14 includes a decoder 30, and alternatively destination device 14 may also include a communication interface 28, a picture post-processor 32, and a display device 34. The descriptions are as follows:
Communication interface 28 may be used to receive encoded picture data 21 from source device 12 or any other source, such as a storage device, such as an encoded picture data storage device. The communication interface 28 may be used to transmit or receive encoded picture data 21 via a link 13 between the source device 12 and the destination device 14, such as a direct wired or wireless connection, or via any type of network, such as a wired or wireless network or any combination thereof, or any type of private and public networks, or any combination thereof. Communication interface 28 may, for example, be used to decapsulate data packets transmitted by communication interface 22 to obtain encoded picture data 21.
Both communication interface 28 and communication interface 22 may be configured as unidirectional communication interfaces or bidirectional communication interfaces and may be used, for example, to send and receive messages to establish connections, to acknowledge and to exchange any other information related to the communication link and/or to the transmission of data, for example, encoded picture data transmissions.
Decoder 30 (or referred to as decoder 30) for receiving encoded picture data 21 and providing decoded picture data 31 or decoded picture 31 (details of the structure of decoder 30 will be described below further based on fig. 3 or fig. 4 or fig. 5). In some embodiments, the decoder 30 may be configured to perform various embodiments described below to implement the application of the image prediction method described in the present application on the decoding side.
A picture post-processor 32 for performing post-processing on the decoded picture data 31 (also referred to as reconstructed slice data) to obtain post-processed picture data 33. The post-processing performed by the picture post-processor 32 may include: color format conversion (e.g., from YUV format to RGB format), toning, truing, or resampling, or any other process, may also be used to transmit post-processed picture data 33 to display device 34.
A display device 34 for receiving the post-processed picture data 33 for displaying pictures to, for example, a user or viewer. The display device 34 may be or include any type of display for presenting reconstructed pictures, for example, an integrated or external display or monitor. For example, the display may include a Liquid CRYSTAL DISPLAY (LCD), an Organic LIGHT EMITTING Diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (liquid crystal on silicon, LCoS), a digital light processor (DIGITAL LIGHT processor, DLP), or any other type of display.
Although source device 12 and destination device 14 are depicted in fig. 1 as separate devices, device embodiments may also include both source device 12 and destination device 14 or both functionality, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such embodiments, the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality may be implemented using the same hardware and/or software, or using separate hardware and/or software, or any combination thereof.
It will be apparent to those skilled in the art from this description that the functionality of the different units or the presence and (exact) division of the functionality of the source device 12 and/or destination device 14 shown in fig. 1 may vary depending on the actual device and application. Source device 12 and destination device 14 may comprise any of a variety of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, mobile phone, smart phone, tablet or tablet computer, video camera, desktop computer, set-top box, television, camera, in-vehicle device, display device, digital media player, video game console, video streaming device (e.g., content service server or content distribution server), broadcast receiver device, broadcast transmitter device, etc., and may not use or use any type of operating system.
Encoder 20 and decoder 30 may each be implemented as any of a variety of suitable circuits, such as, for example, one or more microprocessors, digital Signal Processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combinations thereof. If the techniques are implemented in part in software, an apparatus may store instructions for the software in a suitable non-transitory computer-readable storage medium and may execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors.
In some cases, the video encoding and decoding system 10 shown in fig. 1 is merely an example, and the techniques of this disclosure may be applied to video encoding settings (e.g., video encoding or video decoding) that do not necessarily involve any data communication between encoding and decoding devices. In other examples, the data may be retrieved from local memory, streamed over a network, and the like. The video encoding device may encode and store data to the memory and/or the video decoding device may retrieve and decode data from the memory. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but instead only encode data to memory and/or retrieve data from memory and decode data.
Referring to fig. 2, fig. 2 shows a schematic/conceptual block diagram of an example of an encoder 20 for implementing an embodiment of the application. In the example of fig. 2, encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (decoded picture buffer, DPB) 230, a prediction processing unit 260, and an entropy encoding unit 270. The prediction processing unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a mode selection unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The encoder 20 shown in fig. 2 may also be referred to as a hybrid video encoder or a video encoder according to a hybrid video codec.
For example, residual calculation unit 204, transform processing unit 206, quantization unit 208, prediction processing unit 260, and entropy encoding unit 270 form a forward signal path of encoder 20, while, for example, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, buffer 216, loop filter 220, decoded picture buffer (decoded picture buffer, DPB) 230, prediction processing unit 260 form a backward signal path of the encoder, where the backward signal path of the encoder corresponds to the signal path of the decoder (see decoder 30 in fig. 3).
Encoder 20 receives picture 201 or an image block 203 of picture 201, e.g., a picture in a sequence of pictures forming a video or video sequence, through, e.g., input 202. Image block 203 may also be referred to as a current picture block or a picture block to be encoded, and picture 201 may be referred to as a current picture or a picture to be encoded (especially when distinguishing the current picture from other pictures in video encoding, such as previously encoded and/or decoded pictures in the same video sequence, i.e., a video sequence that also includes the current picture).
An embodiment of encoder 20 may comprise a partitioning unit (not shown in fig. 2) for partitioning picture 201 into a plurality of blocks, e.g. image blocks 203, typically into a plurality of non-overlapping blocks. The segmentation unit may be used to use the same block size for all pictures in the video sequence and a corresponding grid defining the block size, or to alter the block size between pictures or subsets or groups of pictures and to segment each picture into corresponding blocks.
In one example, prediction processing unit 260 of encoder 20 may be used to perform any combination of the above-described partitioning techniques.
Like picture 201, image block 203 is also or may be considered as a two-dimensional array or matrix of sampling points having sampling values, albeit of smaller size than picture 201. In other words, the image block 203 may comprise, for example, one sampling array (e.g., a luminance array in the case of a black-and-white picture 201) or three sampling arrays (e.g., one luminance array and two chrominance arrays in the case of a color picture) or any other number and/or class of arrays depending on the color format applied. The number of sampling points in the horizontal and vertical directions (or axes) of the image block 203 defines the size of the image block 203.
The encoder 20 as shown in fig. 2 is used for encoding a picture 201 block by block, for example, performing encoding and prediction for each image block 203.
The residual calculation unit 204 is configured to calculate a residual block 205 based on the picture image block 203 and the prediction block 265 (further details of the prediction block 265 are provided below), for example, by subtracting sample values of the prediction block 265 from sample values of the picture image block 203 on a sample-by-sample (pixel-by-pixel) basis to obtain the residual block 205 in a sample domain.
The transform processing unit 206 is configured to apply a transform, such as a discrete cosine transform (discrete cosine transform, DCT) or a discrete sine transform (DISCRETE SINE transform, DST), on the sample values of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and represent the residual block 205 in the transform domain.
The transform processing unit 206 may be used to apply integer approximations of DCT/DST, such as the transforms specified for HEVC/H.265. Such integer approximations are typically scaled by some factor compared to the orthogonal DCT transform. To maintain the norms of the forward and inverse transformed processed residual blocks, an additional scaling factor is applied as part of the transformation process. The scaling factor is typically selected based on certain constraints, e.g., the scaling factor is a tradeoff between power of 2, bit depth of transform coefficients, accuracy, and implementation cost for shift operations, etc. For example, a specific scaling factor is specified for inverse transformation by, for example, the inverse transformation processing unit 212 on the decoder 30 side (and for corresponding inverse transformation by, for example, the inverse transformation processing unit 212 on the encoder 20 side), and accordingly, a corresponding scaling factor may be specified for positive transformation by the transformation processing unit 206 on the encoder 20 side.
The quantization unit 208 is for quantizing the transform coefficients 207, for example by applying scalar quantization or vector quantization, to obtain quantized transform coefficients 209. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, n-bit transform coefficients may be rounded down to m-bit transform coefficients during quantization, where n is greater than m. The quantization level may be modified by adjusting quantization parameters (quantization parameter, QP). For example, for scalar quantization, different scales may be applied to achieve finer or coarser quantization. Smaller quantization step sizes correspond to finer quantization, while larger quantization step sizes correspond to coarser quantization. The appropriate quantization step size may be indicated by a quantization parameter (quantization parameter, QP). For example, the quantization parameter may be an index of a predefined set of suitable quantization steps. For example, smaller quantization parameters may correspond to fine quantization (smaller quantization step size) and larger quantization parameters may correspond to coarse quantization (larger quantization step size) and vice versa. Quantization may involve division by a quantization step size and corresponding quantization or inverse quantization, e.g., performed by inverse quantization 210, or may involve multiplication by a quantization step size. Embodiments according to some standards, such as HEVC, may use quantization parameters to determine quantization step sizes. In general, the quantization step size may be calculated based on quantization parameters using a fixed-point approximation of an equation that includes division. Additional scaling factors may be introduced for quantization and inverse quantization to recover norms of residual blocks that may be modified due to the scale used in the fixed point approximation of the equation for quantization step size and quantization parameters. In one example embodiment, the inverse transformed and inverse quantized scales may be combined. Or may use a custom quantization table and signal it from the encoder to the decoder in, for example, a bitstream. Quantization is a lossy operation, where the larger the quantization step size, the larger the loss.
The inverse quantization unit 210 is configured to apply inverse quantization of the quantization unit 208 on the quantized coefficients to obtain inverse quantized coefficients 211, e.g., apply an inverse quantization scheme of the quantization scheme applied by the quantization unit 208 based on or using the same quantization step size as the quantization unit 208. The dequantized coefficients 211 may also be referred to as dequantized residual coefficients 211, correspond to the transform coefficients 207, although the losses due to quantization are typically different from the transform coefficients.
The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, for example, an inverse discrete cosine transform (discrete cosine transform, DCT) or an inverse discrete sine transform (DISCRETE SINE transform, DST), to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transformed inverse quantized block 213 or an inverse transformed residual block 213.
A reconstruction unit 214 (e.g., a summer 214) is used to add the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain the reconstructed block 215 in the sample domain, e.g., to add sample values of the reconstructed residual block 213 to sample values of the prediction block 265.
Optionally, a buffer unit 216, e.g. a line buffer 216 (or simply "buffer" 216), is used to buffer or store the reconstructed block 215 and the corresponding sample values for e.g. intra prediction. In other embodiments, the encoder may be configured to use the unfiltered reconstructed block and/or the corresponding sample values stored in the buffer unit 216 for any kind of estimation and/or prediction, such as intra prediction.
For example, embodiments of encoder 20 may be configured such that buffer unit 216 is used not only to store reconstructed blocks 215 for intra prediction 254, but also for loop filter unit 220 (not shown in fig. 2), and/or such that buffer unit 216 and decoded picture buffer unit 230 form one buffer, for example. Other embodiments may be used to use the filtered block 221 and/or blocks or samples (neither shown in fig. 2) from the decoded picture buffer 230 as an input or basis for the intra prediction 254.
The loop filter unit 220 (or simply loop filter 220) is configured to filter the reconstructed block 215 to obtain a filtered block 221, thereby facilitating pixel transitions or improving video quality. Loop filter unit 220 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (adaptive loop filter, ALF), or a sharpening or smoothing filter, or a collaborative filter. Although loop filter unit 220 is shown in fig. 2 as an in-loop filter, in other configurations loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221. Decoded picture buffer 230 may store the reconstructed encoded block after loop filter unit 220 performs a filtering operation on the reconstructed encoded block.
Embodiments of encoder 20 (and correspondingly loop filter unit 220) may be configured to output loop filter parameters (e.g., sample adaptive offset information), e.g., directly or after entropy encoding by entropy encoding unit 270 or any other entropy encoding unit, e.g., such that decoder 30 may receive and apply the same loop filter parameters for decoding.
Decoded picture buffer (decoded picture buffer, DPB) 230 may be a reference picture memory that stores reference picture data for use by encoder 20 in encoding video data. DPB 230 may be formed of any of a variety of memory devices, such as dynamic random access memory (dynamic random access memory, DRAM) (including Synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RESISTIVE RAM, RRAM)) or other types of memory devices. DPB 230 and buffer 216 may be provided by the same memory device or separate memory devices. In a certain example, a decoded picture buffer (decoded picture buffer, DPB) 230 is used to store the filtered block 221. The decoded picture buffer 230 may further be used to store the same current picture or other previously filtered blocks, e.g., previously reconstructed and filtered blocks 221, of different pictures, e.g., previously reconstructed pictures, and may provide complete previously reconstructed, i.e., decoded pictures (and corresponding reference blocks and samples) and/or partially reconstructed current pictures (and corresponding reference blocks and samples), e.g., for inter prediction. In a certain example, if reconstructed block 215 is reconstructed without in-loop filtering, decoded picture buffer (decoded picture buffer, DPB) 230 is used to store reconstructed block 215.
The prediction processing unit 260, also referred to as block prediction processing unit 260, is adapted to receive or obtain image blocks 203 (current image blocks 203 of a current picture 201) and reconstructed slice data, e.g. reference samples of the same (current) picture from the buffer 216 and/or reference picture data 231 of one or more previously decoded pictures from the decoded picture buffer 230, and to process such data for prediction, i.e. to provide a prediction block 265, which may be an inter-predicted block 245 or an intra-predicted block 255.
The mode selection unit 262 may be used to select a prediction mode (e.g., intra or inter prediction mode) and/or a corresponding prediction block 245 or 255 used as the prediction block 265 to calculate the residual block 205 and reconstruct the reconstructed block 215.
Embodiments of mode selection unit 262 may be used to select the prediction mode (e.g., from those supported by prediction processing unit 260) that provides the best match or minimum residual (minimum residual meaning better compression in transmission or storage), or that provides the minimum signaling overhead (minimum signaling overhead meaning better compression in transmission or storage), or both. The mode selection unit 262 may be arranged to determine a prediction mode based on a rate-distortion optimization (rate distortion optimization, RDO), i.e. to select the prediction mode that provides the least rate-distortion optimization, or to select the prediction mode for which the associated rate-distortion at least meets a prediction mode selection criterion.
The prediction processing performed by an instance of encoder 20 (e.g., by prediction processing unit 260) and the mode selection performed (e.g., by mode selection unit 262) will be explained in detail below.
As described above, the encoder 20 is configured to determine or select the best or optimal prediction mode from a (predetermined) set of prediction modes. The set of prediction modes may include, for example, intra prediction modes and/or inter prediction modes.
The set of intra prediction modes may include 35 different intra prediction modes, for example, a non-directional mode such as a DC (or mean) mode and a planar mode, or a directional mode as defined in h.265, or 67 different intra prediction modes, for example, a non-directional mode such as a DC (or mean) mode and a planar mode, or a directional mode as defined in h.266 under development.
In a possible implementation, the set of inter prediction modes may comprise, for example, advanced motion vector (advanced motion vector prediction, AMVP) modes and fusion (merge) modes depending on available reference pictures (i.e., at least part of the decoded pictures stored in the DBP230, for example, as described above) and other inter prediction parameters, for example, depending on whether to use the entire reference picture or only a portion of the reference picture, e.g., a search window region surrounding a region of the current image block, to search for a best matching reference block, and/or depending on whether to apply pixel interpolation, e.g., half-pixel and/or quarter-pixel interpolation. In particular implementations, the set of inter prediction modes may include an improved control point-based AMVP mode, and an improved control point-based merge mode, according to embodiments of the present application. In one example, intra-prediction unit 254 may be used to perform any combination of the inter-prediction techniques described below.
In addition to the above prediction modes, embodiments of the present application may also apply skip modes and/or direct modes.
The prediction processing unit 260 may be further operative to partition the image block 203 into smaller block partitions or sub-blocks, for example, by iteratively using a quad-tree (QT) partition, a binary-tree (BT) partition, or a ternary-tree (TT) partition, or any combination thereof, and to perform prediction for each of the block partitions or sub-blocks, for example, wherein the mode selection includes selecting a tree structure of the partitioned image block 203 and selecting a prediction mode applied to each of the block partitions or sub-blocks.
The inter prediction unit 244 may include a motion estimation (motion estimation, ME) unit (not shown in fig. 2) and a motion compensation (motion compensation, MC) unit (not shown in fig. 2). The motion estimation unit is used to receive or obtain a picture image block 203 (current picture image block 203 of current picture 201) and a decoded picture 231, or at least one or more previously reconstructed blocks, e.g. reconstructed blocks of one or more other/different previously decoded pictures 231, for motion estimation. For example, the video sequence may include a current picture and a previously decoded picture 31, or in other words, the current picture and the previously decoded picture 31 may be part of, or form, a sequence of pictures that form the video sequence.
For example, encoder 20 may be configured to select a reference block from a plurality of reference blocks of the same or different pictures of a plurality of other pictures, and provide the reference picture and/or an offset (spatial offset) between a position (X, Y coordinates) of the reference block and a position of a current image block to a motion estimation unit (not shown in fig. 2) as an inter prediction parameter. This offset is also called Motion Vector (MV).
The motion compensation unit is used to acquire inter prediction parameters and perform inter prediction based on or using the inter prediction parameters to acquire the inter prediction block 245. The motion compensation performed by the motion compensation unit (not shown in fig. 2) may involve fetching or generating a prediction block based on motion/block vectors determined by motion estimation (possibly performing interpolation of sub-pixel accuracy). Interpolation filtering may generate additional pixel samples from known pixel samples, potentially increasing the number of candidate prediction blocks available for encoding a picture block. Upon receiving the motion vector for the PU of the current picture block, motion compensation unit 246 may locate the prediction block to which the motion vector points in a reference picture list. Motion compensation unit 246 may also generate syntax elements associated with the blocks and video slices for use by decoder 30 in decoding the picture blocks of the video slices.
Specifically, the inter prediction unit 244 may transmit a syntax element including inter prediction parameters (such as indication information of an inter prediction mode selected for prediction of the current image block after traversing a plurality of inter prediction modes) to the entropy encoding unit 270. In a possible application scenario, if the inter prediction mode is only one, the inter prediction parameter may not be carried in the syntax element, and the decoding end 30 may directly use the default prediction mode for decoding. It is appreciated that the inter prediction unit 244 may be used to perform any combination of inter prediction techniques.
The intra prediction unit 254 is used to obtain, for example, a picture block 203 (current picture block) that receives the same picture and one or more previously reconstructed blocks, for example, reconstructed neighboring blocks, for intra estimation. For example, encoder 20 may be configured to select an intra-prediction mode from a plurality of (predetermined) intra-prediction modes.
Embodiments of encoder 20 may be used to select an intra-prediction mode based on optimization criteria, such as based on a minimum residual (e.g., the intra-prediction mode that provides a prediction block 255 most similar to current picture block 203) or minimum rate distortion.
The intra prediction unit 254 is further adapted to determine an intra prediction block 255 based on intra prediction parameters like the selected intra prediction mode. In any case, after the intra-prediction mode for the block is selected, the intra-prediction unit 254 is also configured to provide the intra-prediction parameters, i.e., information indicating the selected intra-prediction mode for the block, to the entropy encoding unit 270. In one example, intra-prediction unit 254 may be used to perform any combination of intra-prediction techniques.
Specifically, the intra-prediction unit 254 may transmit a syntax element including an intra-prediction parameter (such as indication information of an intra-prediction mode selected for prediction of the current image block after traversing a plurality of intra-prediction modes) to the entropy encoding unit 270. In a possible application scenario, if there is only one intra prediction mode, the intra prediction parameter may not be carried in the syntax element, and the decoding end 30 may directly use the default prediction mode for decoding.
The entropy encoding unit 270 is used to apply an entropy encoding algorithm or scheme (e.g., a variable length coding (variable length coding, VLC) scheme, a context adaptive VLC (context ADAPTIVE VLC, CAVLC) scheme, an arithmetic coding scheme, a context adaptive binary arithmetic coding (context adaptive binary arithmetic coding, CABAC), syntax-based context-based-adaptive binary arithmetic coding, SBAC), probability interval partitioning entropy (probability interval partitioning entropy, PIPE) coding, or other entropy encoding methods or techniques) to single or all of the quantized residual coefficients 209, inter-prediction parameters, intra-prediction parameters, and/or loop filter parameters (or not applied) to obtain encoded picture data 21 that may be output by output 272 in the form of, for example, an encoded bitstream 21. The encoded bitstream may be transmitted to video decoder 30 or archived for later transmission or retrieval by video decoder 30. Entropy encoding unit 270 may also be used to entropy encode other syntax elements of the current video slice being encoded.
Other structural variations of video encoder 20 may be used to encode the video stream. For example, the non-transform based encoder 20 may directly quantize the residual signal without a transform processing unit 206 for certain blocks or frames. In another embodiment, encoder 20 may have quantization unit 208 and inverse quantization unit 210 combined into a single unit.
In particular, in embodiments of the present application, encoder 20 may be used to implement the video encoding process described in embodiments below.
It should be understood that the video encoder of the present application may include only a part of the modules in the video encoder 20, for example, the video encoder of the present application may include an image decoding unit and a dividing unit. Wherein the image decoding unit may be composed of one or more units of an entropy decoding unit, a prediction unit, an inverse transform unit, and an inverse quantization unit.
In addition, other structural variations of video encoder 20 may be used to encode the video stream. For example, for some image blocks or image frames, video encoder 20 may directly quantize the residual signal without processing by transform processing unit 206, and accordingly without processing by inverse transform processing unit 212; or for some image blocks or image frames, video encoder 20 does not generate residual data and accordingly does not need to be processed by transform processing unit 206, quantization unit 208, inverse quantization unit 210, and inverse transform processing unit 212; or video encoder 20 may store the reconstructed image block directly as a reference block without processing by filter 220; or the quantization unit 208 and the inverse quantization unit 210 in the video encoder 20 may be combined together. The loop filter 220 is optional, and in the case of lossless compression encoding, the transform processing unit 206, quantization unit 208, inverse quantization unit 210, and inverse transform processing unit 212 are optional. It should be appreciated that inter-prediction unit 244 and intra-prediction unit 254 may be selectively enabled depending on the different application scenarios.
Referring to fig. 3, fig. 3 shows a schematic/conceptual block diagram of an example of a decoder 30 for implementing an embodiment of the application. Video decoder 30 is operative to receive encoded picture data (e.g., encoded bitstream) 21, e.g., encoded by encoder 20, to obtain decoded picture 231. During the decoding process, video decoder 30 receives video data, such as an encoded video bitstream representing picture blocks of an encoded video slice and associated syntax elements, from video encoder 20.
In the example of fig. 3, decoder 30 includes entropy decoding unit 304, inverse quantization unit 310, inverse transform processing unit 312, reconstruction unit 314 (e.g., summer 314), buffer 316, loop filter 320, decoded picture buffer 330, and prediction processing unit 360. The prediction processing unit 360 may include an inter prediction unit 344, an intra prediction unit 354, and a mode selection unit 362. In some examples, video decoder 30 may perform a decoding pass that is substantially reciprocal to the encoding pass described with reference to video encoder 20 of fig. 2.
Entropy decoding unit 304 is used to perform entropy decoding on encoded picture data 21 to obtain, for example, quantized coefficients 309 and/or decoded encoding parameters (not shown in fig. 3), e.g., any or all of inter-prediction, intra-prediction parameters, loop filter parameters, and/or other syntax elements (decoded). Entropy decoding unit 304 is further configured to forward inter-prediction parameters, intra-prediction parameters, and/or other syntax elements to prediction processing unit 360. Video decoder 30 may receive syntax elements at the video stripe level and/or the video block level.
Inverse quantization unit 310 may be functionally identical to inverse quantization unit 110, inverse transform processing unit 312 may be functionally identical to inverse transform processing unit 212, reconstruction unit 314 may be functionally identical to reconstruction unit 214, buffer 316 may be functionally identical to buffer 216, loop filter 320 may be functionally identical to loop filter 220, and decoded picture buffer 330 may be functionally identical to decoded picture buffer 230.
The prediction processing unit 360 may include an inter prediction unit 344 and an intra prediction unit 354, where the inter prediction unit 344 may be similar in function to the inter prediction unit 244 and the intra prediction unit 354 may be similar in function to the intra prediction unit 254. The prediction processing unit 360 is typically used to perform block prediction and/or to obtain a prediction block 365 from the encoded data 21, as well as to receive or obtain prediction related parameters and/or information about the selected prediction mode (explicitly or implicitly) from, for example, the entropy decoding unit 304.
When a video slice is encoded as an intra-coded (I) slice, the intra-prediction unit 354 of the prediction processing unit 360 is used to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra-prediction mode and data from a previously decoded block of the current frame or picture. When a video frame is encoded as an inter-coded (i.e., B or P) slice, an inter-prediction unit 344 (e.g., a motion compensation unit) of prediction processing unit 360 is used to generate a prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from entropy decoding unit 304. For inter prediction, a prediction block may be generated from one reference picture within one reference picture list. Video decoder 30 may construct a reference frame list based on the reference pictures stored in DPB 330 using default construction techniques: list 0 and list 1.
The prediction processing unit 360 is configured to determine prediction information for a video block of a current video slice by parsing the motion vector and other syntax elements, and generate a prediction block for the current video block being decoded using the prediction information. In an example of this disclosure, prediction processing unit 360 uses some syntax elements received to determine a prediction mode (e.g., intra or inter prediction) for encoding video blocks of a video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), construction information for one or more of a reference picture list of the slice, motion vectors for each inter-encoded video block of the slice, inter prediction state for each inter-encoded video block of the slice, and other information to decode video blocks of a current video slice. In another example of this disclosure, the syntax elements received by video decoder 30 from the bitstream include syntax elements received in one or more of an adaptation parameter set (ADAPTIVE PARAMETER SET, APS), a Sequence Parameter Set (SPS) PARAMETER SET, a picture PARAMETER SET, PPS), or a slice header.
Inverse quantization unit 310 may be used to inverse quantize (i.e., inverse quantize) the quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 304. The inverse quantization process may include using quantization parameters calculated by video encoder 20 for each video block in a video stripe to determine the degree of quantization that should be applied and likewise the degree of inverse quantization that should be applied.
The inverse transform processing unit 312 is configured to apply an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients in order to generate a residual block in the pixel domain.
A reconstruction unit 314 (e.g., a summer 314) is used to add the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365 to obtain a reconstructed block 315 in the sample domain, e.g., by adding sample values of the reconstructed residual block 313 to sample values of the prediction block 365.
Loop filter unit 320 is used (during or after the encoding cycle) to filter reconstructed block 315 to obtain filtered block 321, to smooth pixel transitions or improve video quality. In one example, loop filter unit 320 may be used to perform any combination of the filtering techniques described below. Loop filter unit 320 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (adaptive loop filter, ALF), or a sharpening or smoothing filter, or a collaborative filter. Although loop filter unit 320 is shown in fig. 3 as an in-loop filter, in other configurations loop filter unit 320 may be implemented as a post-loop filter.
The decoded video blocks 321 in a given frame or picture are then stored in a decoded picture buffer 330 that stores reference pictures for subsequent motion compensation.
Decoder 30 is for outputting decoded picture 31, e.g., via output 332, for presentation to a user or for viewing by a user.
Other variations of video decoder 30 may be used to decode the compressed bitstream. For example, decoder 30 may generate the output video stream without loop filter unit 320. For example, the non-transform based decoder 30 may directly inverse quantize the residual signal without an inverse transform processing unit 312 for certain blocks or frames. In another embodiment, the video decoder 30 may have an inverse quantization unit 310 and an inverse transform processing unit 312 combined into a single unit.
Specifically, in the embodiment of the present application, the decoder 30 is used to implement the video decoding method described in the later embodiments.
It should be understood that the video encoder of the present application may include only a part of the modules in the video encoder 30, for example, the video encoder of the present application may include a dividing unit and an image encoding unit. Wherein the image encoding unit may be composed of one or more of a prediction unit, a transformation unit, a quantization unit, and an entropy encoding unit.
In addition, other structural variations of video decoder 30 may be used to decode the encoded video bitstream. For example, video decoder 30 may generate an output video stream without processing by filter 320; or for some image blocks or image frames, the entropy decoding unit 304 of the video decoder 30 does not decode quantized coefficients, and accordingly does not need to be processed by the inverse quantization unit 310 and the inverse transform processing unit 312. Loop filter 320 is optional; and for the case of lossless compression, the inverse quantization unit 310 and the inverse transform processing unit 312 are optional. It should be appreciated that the inter prediction unit and the intra prediction unit may be selectively enabled according to different application scenarios.
It should be understood that, in the encoder 20 and the decoder 30 of the present application, the processing result for a certain link may be further processed and then output to a next link, for example, after the links such as interpolation filtering, motion vector derivation or loop filtering, the processing result for the corresponding link may be further subjected to operations such as clipping (clip) or shifting (shift).
For example, the motion vector of the control point of the current image block derived from the motion vector of the neighboring affine encoded block (the encoded block predicted using the affine motion model may be referred to as an affine encoded block), or the motion vector of the sub-block of the current image block derived may be further processed, which is not limited in the present application. For example, the range of motion vectors is constrained to be within a certain bit width. Assuming that the bit width of the allowed motion vector is bitDepth, the range of motion vectors is-2 (bitDepth-1) to 2 (bitDepth-1) -1, where the "≡sign represents the power. If bitDepth is 16, the value range is-32768-32767. If bitDepth is 18, the value range is-131072 ~ 131071.
For another example, the motion vectors (e.g., motion vectors MV of four 4x4 sub-blocks within an 8x8 image block) may also be constrained to take values such that the maximum difference between the integer portions of the four 4x4 sub-blocks MV does not exceed N (e.g., N may take 1 pixel).
Referring to fig. 4, fig. 4 is an illustration of an example of a video coding system 40 including encoder 20 of fig. 2 and/or decoder 30 of fig. 3, according to an example embodiment. Video coding system 40 may implement a combination of the various techniques of embodiments of the present application. In the illustrated embodiment, video coding system 40 may include an imaging device 41, an encoder 20, a decoder 30 (and/or a video codec implemented via logic circuits 47 of a processing unit 46), an antenna 42, one or more processors 43, one or more memories 44, and/or a display device 45.
As shown in fig. 4, the imaging device 41, the antenna 42, the processing unit 46, the logic circuit 47, the encoder 20, the decoder 30, the processor 43, the memory 44, and/or the display device 45 can communicate with each other. As discussed, although video coding system 40 is depicted with encoder 20 and decoder 30, in different examples, video coding system 40 may include only encoder 20 or only decoder 30.
In some examples, antenna 42 may be used to transmit or receive an encoded bitstream of video data. Additionally, in some examples, display device 45 may be used to present video data. In some examples, logic 47 may be implemented by processing unit 46. The processing unit 46 may comprise application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, or the like. Video coding system 40 may also include an optional processor 43, which optional processor 43 may similarly include application-specific integrated circuit (ASIC) logic, a graphics processor, a general purpose processor, or the like. In some examples, logic 47 may be implemented in hardware, such as video encoding dedicated hardware, processor 43 may be implemented in general purpose software, an operating system, or the like. In addition, the memory 44 may be any type of memory, such as volatile memory (e.g., static random access memory (static random access memory, SRAM), dynamic random access memory (dynamic random access memory, DRAM), etc.) or non-volatile memory (e.g., flash memory, etc.), and the like. In a non-limiting example, the memory 44 may be implemented by an overspeed cache. In some examples, logic circuitry 47 may access memory 44 (e.g., for implementing an image buffer). In other examples, logic 47 and/or processing unit 46 may include memory (e.g., a cache, etc.) for implementing an image buffer, etc.
In some examples, encoder 20 implemented by logic circuitry may include an image buffer (e.g., implemented by processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include encoder 20 implemented by logic circuitry 47 to implement the various modules discussed with reference to fig. 2 and/or any other encoder system or subsystem described herein. Logic circuitry may be used to perform various operations discussed herein.
In some examples, decoder 30 may be implemented in a similar manner by logic circuit 47 to implement the various modules discussed with reference to decoder 30 of fig. 3 and/or any other decoder system or subsystem described herein. In some examples, decoder 30 implemented by logic circuitry may include an image buffer (implemented by processing unit 2820 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include decoder 30 implemented by logic circuit 47 to implement the various modules discussed with reference to fig. 3 and/or any other decoder system or subsystem described herein.
In some examples, antenna 42 may be used to receive an encoded bitstream of video data. As discussed, the encoded bitstream may include data related to the encoded video frame, indicators, index values, mode selection data, etc., discussed herein, such as data related to the encoded partitions (e.g., transform coefficients or quantized transform coefficients, optional indicators (as discussed), and/or data defining the encoded partitions). Video coding system 40 may also include a decoder 30 coupled to antenna 42 and used to decode the encoded bitstream. The display device 45 is used to present video frames.
It should be understood that decoder 30 may be used to perform the reverse process for the example described with reference to encoder 20 in embodiments of the present application. Regarding signaling syntax elements, decoder 30 may be configured to receive and parse such syntax elements and decode the associated video data accordingly. In some examples, encoder 20 may entropy encode the syntax elements into an encoded video bitstream. In such examples, decoder 30 may parse such syntax elements and decode the relevant video data accordingly.
Referring to fig. 5, fig. 5 is a schematic diagram of a structure of a video decoding apparatus 400 (e.g., a video encoding apparatus 400 or a video decoding apparatus 400) according to an embodiment of the present application. The video coding apparatus 400 is adapted to implement the embodiments described herein. In one embodiment, video coding device 400 may be a video decoder (e.g., decoder 30 of fig. 3) or a video encoder (e.g., encoder 20 of fig. 2). In another embodiment, video coding apparatus 400 may be one or more of the components described above in decoder 30 of fig. 3 or encoder 20 of fig. 2.
The video coding apparatus 400 includes: an ingress port 410 and a receiving unit (Rx) 420 for receiving data, a processor, logic unit or Central Processing Unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an egress port 450 for transmitting data, and a memory 460 for storing data. The video decoding apparatus 400 may further include a photoelectric conversion component and an electro-optical (EO) component coupled to the inlet port 410, the receiver unit 420, the transmitter unit 440, and the outlet port 450 for the outlet or inlet of optical or electrical signals.
The processor 430 is implemented in hardware and software. Processor 430 may be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. Processor 430 is in communication with inlet port 410, receiver unit 420, transmitter unit 440, outlet port 450, and memory 460. The processor 430 includes a coding module 470 (e.g., an encoding module 470 or a decoding module 470). The encoding/decoding module 470 implements the embodiments disclosed herein to implement the image prediction method provided by the embodiments of the present application. For example, the encoding/decoding module 470 implements, processes, or provides various encoding operations. Thus, substantial improvements are provided to the functionality of the video coding device 400 by the encoding/decoding module 470 and affect the transition of the video coding device 400 to different states. Or the encoding/decoding module 470 may be implemented in instructions stored in the memory 460 and executed by the processor 430.
Memory 460 includes one or more disks, tape drives, and solid state drives, and may be used as an overflow data storage device for storing programs when selectively executing such programs, as well as storing instructions and data read during program execution. Memory 460 may be volatile and/or nonvolatile and may be Read Only Memory (ROM), random Access Memory (RAM), random access memory (ternary content-addressable memory, TCAM), and/or Static Random Access Memory (SRAM).
Referring to fig. 6, fig. 6 is a simplified block diagram of an apparatus 500 that may be used as either or both of the source device 12 and the destination device 14 in fig. 1, according to an example embodiment. The apparatus 500 may implement the image prediction method of the embodiment of the present application. In other words, fig. 6 is a schematic block diagram of one implementation of an encoding device or decoding device (simply referred to as decoding device 500) of an embodiment of the present application. The decoding device 500 may include, among other things, a processor 510, a memory 530, and a bus system 550. The processor is connected with the memory through the bus system, the memory is used for storing instructions, and the processor is used for executing the instructions stored by the memory. The memory of the decoding device stores program codes, and the processor can call the program codes stored in the memory to perform various video encoding or decoding methods described in the present application, particularly various new image block dividing methods. To avoid repetition, a detailed description is not provided herein.
In an embodiment of the present application, the processor 510 may be a central processing unit (central processing unit, CPU), and the processor 510 may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 530 may include a Read Only Memory (ROM) device or a Random Access Memory (RAM) device. Any other suitable type of storage device may also be used as memory 530. Memory 530 may include code and data 531 accessed by processor 510 using bus 550. Memory 530 may further include an operating system 533 and an application 535, which application 535 includes at least one program that allows processor 510 to perform the video encoding or decoding methods described herein. For example, applications 535 may include applications 1 through N, which further include video encoding or decoding applications (simply video coding applications) that perform the video encoding or decoding methods described in this disclosure.
The bus system 550 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus. For clarity of illustration, the various buses are labeled in the figure as bus system 550.
Optionally, the decoding device 500 may also include one or more output devices, such as a display 570. In one example, the display 570 may be a touch sensitive display that incorporates a display with a touch sensitive unit operable to sense touch input. A display 570 may be connected to processor 510 via bus 550.
Fig. 7 is a schematic block diagram of a video communication system of an embodiment of the present application.
The video communication system 500 shown in fig. 7 includes a source device 600 and a destination device 700, wherein the source device 600 can encode an acquired video and transmit the encoded video code stream to the receiving device 700, and the destination device 700 can parse the received video code stream to obtain a video image and display the video through a display device.
The image prediction method of the embodiment of the application can be applied to entropy coding processing of a video encoder or entropy decoding processing of a video decoder. As shown in fig. 7, the image prediction method of the embodiment of the present application may be performed by the source device 600 or the destination device 700. Specifically, the image prediction method of the embodiment of the present application may be performed by the video encoder 603 or the video decoder 702.
The video communication system 500 may also be referred to as a video codec system, the source device 600 may also be referred to as a video encoding device or video encoding apparatus, and the destination device 700 may also be referred to as a video decoding device or video decoding apparatus.
In fig. 7, source device 600 includes a video capture device 601, a video memory 602, a video encoder 603, and a transmitter 604. Video memory 602 may store video obtained by video capture device 601 and video encoder 603 may encode video data from video memory 602 and video capture device 601. In some examples, source device 600 transmits encoded video data directly to destination device 700 via transmitter 604. The encoded video data may also be stored on a storage medium or file server for later retrieval by the destination device 700 for decoding and/or playback.
In fig. 7, a destination device 700 includes a receiver 701, a video decoder 702, and a display device 703. In some examples, receiver 701 may receive encoded video data via channel 800. The display device 703 may be integral with the destination device 700 or may be external to the destination device 7000. In general, the display device 700 displays decoded video data. The display device 700 may include a variety of display devices, such as a liquid crystal display, a plasma display, an organic light emitting diode display, or other types of display devices.
The specific implementation form of the source apparatus 600 and the destination apparatus 700 may be any one of the following devices: a desktop computer, mobile computing device, notebook (e.g., laptop) computer, tablet computer, set-top box, smart phone, handset, television, camera, display device, digital media player, video game console, vehicle computer, or other similar device.
The destination device 700 may receive the encoded video data from the source device 600 via the channel 800. Channel 800 may comprise one or more media and/or devices capable of moving encoded video data from source device 600 to destination device 700. In one example, channel 800 may include one or more communication media that enable source device 600 to transmit encoded video data directly to destination device 700 in real-time, in which case source device 600 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and may transmit the modulated video data to destination device 700. The one or more communication media may include wireless and/or wired communication media such as a Radio Frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media described above may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the internet). The one or more communication media described above may include routers, switches, base stations, or other devices enabling communication from source device 600 to destination device 700.
In another example, channel 800 may comprise a storage medium storing encoded video data generated by source device 600. In this example, destination device 700 may access the storage medium via a disk access or a card access. The storage medium may include a variety of locally accessed data storage media such as blu-ray discs, high density digital video discs (digital video disc, DVD), read-only memory (CD-ROM), flash memory, or other suitable digital storage media for storing encoded video data.
In another example, channel 800 may include a file server or another intermediate storage device that stores encoded video data generated by source device 600. In this example, destination device 700 may access encoded video data stored at a file server or other intermediate storage device via streaming or download. The file server may be a server type capable of storing encoded video data and transmitting the encoded video data to the destination device 700. For example, the file server may include a world wide Web (Web) server (e.g., for a website), a File Transfer Protocol (FTP) server, a network attached storage (network attached storage, NAS) device, and a local disk drive.
The destination device 700 may access the encoded video data via a standard data connection, such as an internet connection. Example types of data connections include wireless channels suitable for accessing encoded video data stored on a file server, wired connections (e.g., cable modems, etc.), or a combination of both. The transmission of encoded video data from the file server may be streaming, download transmission, or a combination of both.
Context-based adaptive binary arithmetic coding (CABAC) is a commonly used entropy coding (entropy coding) technique for coding and decoding syntax element values, and is applied to standards such as h.264/AVC, h.265/HEVC, and h.266/VVC.
The entropy coding process, taking the normal mode (regular mode) in HEVC as an example, mainly comprises three steps:
(1) Binarizing a syntax element into one or more binary bits (bins), each bit having a value of 0 or 1;
(2) For each bit, determining a context model for the bit based on context information (e.g., the syntax element corresponds to coding information in the reconstructed region around the node);
(3) The bits are encoded according to probability values in the context model of the bits, and the probability values in the context model are updated according to the values of the bits.
Accordingly, the entropy decoding process mainly includes three steps:
(1) For each bit, determining a context model for the bit based on context information (e.g., the syntax element corresponds to coding information in the reconstructed region around the node);
(2) Decoding the bits according to the probability values in the context model, and updating the probability values in the context model according to the values of the bits;
(3) And obtaining the value of the syntax element according to the value of one or more bits obtained by decoding.
The above-described process of determining a context model of a voxel from context information may also be referred to as context modeling. Generally, the context modeling method is the same during the encoding process and decoding process.
It should be noted that, the bits obtained by binarizing the syntax element may be referred to as bits corresponding to the syntax element, and the context model of the bits refers to the context model of the bits corresponding to the syntax element. For ease of understanding, the context model of the bit corresponding to the syntax element is collectively referred to as simply the context model corresponding to the syntax element.
In VTM5, there may be multiple context models corresponding to one syntax element, for example, there may be 2,3,6 or 9 context models corresponding to one syntax element according to coding information of surrounding blocks, such syntax elements include split_cu_flag, split_qt_flag, cu_skip_flag, pred_mode_flag and pred_mode_ ibc _flag, and the context model number corresponding to the syntax element of the current coding unit may be determined according to coding information of neighboring image blocks of the current coding unit during the coding and decoding processes.
In HEVC, a luminance block and a chrominance block of a coding tree node are divided into sub-nodes using the same division, referred to as a single tree (SINGLE TREE) division structure, and thus, a luminance pixel and a chrominance pixel are included in one coding unit. In VTM5, a separate tree (SEPARATE TREE) partition structure is allowed for the intra-frame image (I picture), and at this time, from a certain node a on the coding tree, the luminance block of the node a may be partitioned by using a luminance coding tree (luma coding tree), where the leaf node of the luminance coding tree is a luminance coding unit (luma CU), and only luminance pixels are included therein; the chroma blocks of node a may be partitioned using a chroma coding tree (chroma coding tree) whose leaf nodes are chroma coding units (chroma CUs), which contain only chroma pixels.
For a single tree partition structure, the coding information of the luminance block at any one position and the coding information of the chrominance block at the position are the same; for the split tree partition structure, there may be a case where the encoding information of the luminance block at a position is different from the encoding information of the chrominance block at the position, for example, the prediction MODE of the luminance block at a position is an INTRA block copy prediction MODE (mode_ibc), and the prediction MODE of the chrominance block at the position is an INTRA prediction MODE (mode_intra); for another example, the luminance block width of a location is 4, and the chrominance block width of the location is 16; for another example, the quadtree depth of a luminance block at a location is 3, and the quadtree depth of a chrominance block at the location is 1.
In VTM5, the prediction MODE of the luminance block condL for the left neighboring block in the context model number determination MODE of the pred_mode_ IBC _flag of the chroma coding unit is equal to mode_ibc, and the prediction MODE of the luminance block condA for the upper neighboring block is equal to mode_ibc.
Therefore, in the case where the current coding unit is a chroma coding unit, determining the context model number of the current coding unit using coding information of neighboring luma blocks during the coding process and the decoding process may result in low coding and decoding efficiency.
In view of the above problems, the present application provides an image prediction method, which can improve the compression efficiency of video encoding and decoding, so as to improve the encoding and decoding efficiency.
The image prediction method according to the embodiment of the present application will be described in detail with reference to the accompanying drawings.
Fig. 8 is a schematic flow chart of an image prediction method of an embodiment of the present application. The image prediction method shown in fig. 8 may be performed by an image prediction apparatus (the image prediction apparatus may be located in an image decoding apparatus (system) or an image encoding apparatus (system)), and in particular, the method shown in fig. 8 may be performed by the image encoding apparatus or the image decoding apparatus. The method shown in fig. 8 may be performed either at the encoding side or the decoding side, and the method 800 shown in fig. 8 includes steps 810, 820, and 830, which are described in detail below.
S810, determining the type of the current coding unit.
The current coding unit may be of the type luma chroma coding unit, luma coding unit or chroma coding unit. Wherein, luminance chroma coding unit refers to the coding unit including luminance block and chroma block, luminance coding unit refers to the coding unit including luminance block, chroma coding unit refers to the coding unit including chroma block.
S820, determining the prediction mode of the current coding unit according to the type of the current coding unit and/or the prediction modes of the adjacent image blocks.
The image blocks in the current coding unit and the adjacent image blocks are spatially adjacent image blocks, and the adjacent image blocks comprise adjacent brightness blocks and/or adjacent chroma blocks.
Optionally, the determining the prediction mode of the current coding unit according to the type of the current coding unit and/or the prediction modes of the neighboring image blocks may include: determining a context model number corresponding to a syntax element of the current coding unit according to the type of the current coding unit and/or a prediction mode of an adjacent image block; and determining the prediction mode of the current coding unit according to the context model number.
The context model number may be represented by ctxInc, and for example, the context model number ctxInc may be determined by the following equation (1).
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3(1)
Wherein availableL =1 indicates that a left-side neighboring image block of the current coding unit is available, and availableL =0 indicates that a left-side neighboring image block of the current coding unit is not available; availableA =1 indicates that an upper-side neighboring image block of the current coding unit is available, and availableA =0 indicates that an upper-side neighboring image block of the current coding unit is not available. condL and condA are binary variables, i.e. condL and condA have a value of 0 or 1, condL is used to indicate whether the prediction mode of the image block adjacent to the left is intra block copy prediction, condA is used to indicate whether the prediction mode of the image block adjacent to the upper is intra block copy prediction, ctxSetIdx is the number of the context group, ctxSetIdx may be 0, or ctxSetIdx may be determined by the coding information of the current coding unit.
The prediction modes in VTM5 include three types: INTRA prediction MODE (MODE INTRA), INTER prediction MODE (MODE INTER), and INTRA block copy prediction MODE (MODE IBC).
It should be noted that, the above-mentioned adjacent image blocks may refer to: the image block has been decoded and is within the video image; neighboring image block unavailable means: the image block is not decoded or within the video image. In different video coding standards, whether a tile is available may also include other constraints, such as in HEVC, if the tile and neighboring tile are not within the same slice, then the neighboring tile is also considered impossible.
When ctxSetIdx corresponding to the syntax element is 0, the formula (1) may be simplified to the following formula (2), and at this time, it may be determined that the values of the context model numbers ctxInc, ctxInc are only three, i.e., 0, 1,2, through the above formula (2).
ctxInc=(condL&&availableL)+(condA&&availableA) (2)
In the present application, the syntax element may be pred_mode_ ibc _flag, and the syntax element may be used to identify whether the current coding unit uses intra block copy prediction, and accordingly, ctxSetIdx corresponding to the syntax element is 0.
The meanings condL, condA, availableL and availableA in the formula (2) are the same as those in the formula (1), and are not described here again.
In the present application, the method for determining the context model number according to the type of the current coding unit may specifically include the following two methods.
The method comprises the following steps:
In the case that the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, condL may be determined according to a prediction mode of a luminance block adjacent to the left side, condA may be determined according to a prediction mode of a luminance block adjacent to the upper side; the context model number may be determined from the condL and the condA;
In the case that the current coding unit is a chroma coding unit, condL may be determined according to a prediction mode of a left-side neighboring chroma block, condA may be determined according to a prediction mode of an upper-side neighboring chroma block; the context model number may be determined from the condL and the condA;
wherein condL and condA are binary variables, and the values are, for example, 0 and 1.
For example, in method one, condL and condA may be determined by equation (1) above.
In case that the syntax element of the current coding unit is pred_mode_ ibc _flag, ctxSetIdx may be 0, and at this time, condL and condA may be determined by the above formula (2).
The value of condL may be the decision result of CuPredMode [ chType ] [ xNbL ] [ yNbL ] = mode_ibc, cuPredMode [ chType ] [ xNbL ] [ yNbL ] = mode_ibc represents that the prediction MODE of the left adjacent image block (xNbL, yNbL) is intra block copy prediction, that is, when CuPredMode [ chType ] [ xNbL ] [ yNbL ] = mode_ibc is true, the value of condL is 1, and when CuPredMode [ chType ] [ xNbL ] = yNbL ] = mode_ibc is false, the value of condL is 0;
The value of condA may be the decision result of CuPredMode [ chType ] [ xNbA ] [ yNbA ] = mode_ibc, cuPredMode [ chType ] [ xNbA ] [ yNbA ] = mode_ibc represents that the prediction MODE of the left adjacent image block (xNbA, yNbA) is intra block copy prediction, that is, when CuPredMode [ chType ] [ xNbA ] [ yNbA ] = mode_ibc is true, the value of condA is 1, and when CuPredMode [ chType ] [ xNbA ] = yNbA ] = mode_ibc is false, the value of condA is 0;
Wherein, (xNbL, yNbL) represents the position of the left neighboring image block in the video image, (xNbA, yNbA) represents the position of the upper neighboring image block in the video image, cuPredMode [1] [ x ] [ y ] represents the prediction mode of the chroma block with the coordinate position (x, y), cuPredMode [0] [ x ] [ y ] represents the prediction mode of the luma block with the coordinate position (x, y), ctxSetIdx is the number of the context group, and chType is determined by the current coding unit type. For example, chType may be 1 in the case where the current coding unit is a chroma coding unit, and chType may be 0 in the case where the current coding unit is a luma chroma coding unit or a luma coding unit.
Optionally, the sitting of the upper left corner of the current coding unit in the video image is marked as (x 0, y 0), the width of the current coding unit is marked as cbWidth, the height of the current coding unit is marked as cbHeight, and the coordinates of the left adjacent image block (xNbL, yNbL) can be (x 0-1, y 0), and the coordinates of the upper adjacent image block (xNbA, yNbA) can be (x 0, y 0-1) in units of luminance pixels; alternatively, the coordinates of the left-side neighboring image block (xNbL, yNbL) may be (x 0-1, y0+ cbHeight/2), and the coordinates of the left-side neighboring image block (xNbA, yNbA) may be (x0+ cbWidth/2, y 0-1).
As can be seen from the foregoing description, in the method, according to the type of the current coding block and the above formula (1) or formula (2), the context model number ctxInc corresponding to the syntax element of the current coding unit can be determined.
The second method is as follows:
In the case that the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, condL may be determined according to a prediction mode of a luminance block adjacent to the left side, condA may be determined according to a prediction mode of a luminance block adjacent to the upper side; the context model number may be determined from the condL and the condA;
in the case that the current coding unit is a chroma coding unit, the condL and the condA may be preset values; the context model number may be determined according to condL and condA;
Wherein condL and condA are binary variables.
For example, in the second method, in the case where the current encoding unit is a luminance-chrominance encoding unit or a luminance encoding unit, condL and condA may be determined by the above formula (1).
In case that the syntax element of the current coding unit is pred_mode_ ibc _flag, ctxSetIdx may be 0, and at this time, condL and condA may be determined by the above formula (2).
The value of condL may be the result of determining CuPredMode [ xNbL ] [ yNbL ] = mode_ibc, where CuPredMode [ xNbL ] [ yNbL ] = mode_ibc represents that the prediction MODE of the left neighboring image block (xNbL, yNbL) is an intra-block copy prediction MODE, that is, when CuPredMode [ xNbL ] [ yNbL ] = mode_ibc is true, the value of condL is 1, and when CuPredMode [ xNbL ] [ yNbL ] = mode_ibc is false, the value of condL is 0;
the value of condA may be the result of determining CuPredMode [ xNbA ] [ yNbA ] = mode_ibc, where CuPredMode [ xNbA ] [ yNbA ] = mode_ibc indicates that the prediction MODE of the left neighboring image block (xNbA, yNbA) is an intra block copy prediction MODE, that is, when CuPredMode [ xNbA ] [ yNbA ] = mode_ibc is true, the value of condA is 1, and when CuPredMode [ xNbA ] [ yNbA ] = mode_ibc is false, the value of condA is 0.
The descriptions of other variables (or parameters) in the formula (1) and the formula (2) are similar to the first method, and are not repeated here.
In the case where the current coding unit is a chroma coding unit, condL and condA may be preset values.
For example, condL and condA may both be set to 0. At this time, if ctxSetIdx is 0, it can be seen from the above formula (2) that the context model number ctxInc corresponding to the syntax element of the current coding unit is also 0.
That is, in the case where the current coding unit is a chroma coding unit, it is equivalent to the context model number ctxInc preset to 0.
It should be understood that the above examples are only examples and not limiting, condL and condA may be set to other values, which are repeated herein.
According to the method in the second method, the context model number ctxInc corresponding to the syntax element of the current coding unit may be determined.
At this time, according to the context model number ctxInc, a bit corresponding to the syntax element of the current coding unit may be decoded to obtain a value of the syntax element (e.g., pred_mode_ ibc _flag). For example, the bits may be decoded according to a common mode in CABAC, and reference may be made to the prior art, which is not described herein.
Alternatively, according to the value of the syntax element, the prediction mode of the current coding unit may be determined and the prediction mode information of the current coding unit may be saved.
The pred_mode_ ibc _flag is described as an example.
For example, if the pred_mode_ IBC _flag value is 1, the prediction MODE of the current coding unit is mode_ibc, and accordingly, the CuPredMode [ chType ] [ x ] [ y ] value of any position covered by the current coding unit may be set to mode_ibc to save the prediction MODE of the current coding unit, where chType is the same as in the determining method one, x0 is less than or equal to x < x0+ cbWidth, and y0 is less than or equal to y0+ cbHeight.
If the pred_mode_ ibc _flag value is 0, the prediction MODE of the current coding unit may be determined by another syntax element pred_mode_flag, and if the pred_mode_flag is 0, the prediction MODE of the current coding unit is mode_inter, and accordingly, the CuPredMode [ chType ] [ x ] [ y ] value of any position covered by the current coding unit may be set to mode_inter to save the prediction MODE of the current coding unit; otherwise, the prediction MODE of the current coding unit is mode_intra, and accordingly, the CuPredMode [ chType ] [ x ] [ y ] value of any position covered by the current coding unit may be set to mode_intra.
S830, according to the prediction mode of the current coding unit, predicting the image block in the current coding unit.
Optionally, after obtaining the prediction mode of the current coding unit, performing prediction information analysis, residual information analysis, prediction, inverse quantization, inverse transformation, reconstruction and other processes on the current coding unit, so as to obtain a reconstructed pixel of the current coding unit.
In the embodiment of the present application, how to implement these processes is not limited, for example, processes such as prediction information analysis, residual information analysis, intra-frame prediction, inter-frame prediction, intra-frame block copy prediction, inverse quantization, inverse transformation, reconstruction, etc. in HEVC or VVC may be used to obtain the reconstructed pixel of the current coding unit, which may refer to the prior art specifically and will not be described herein.
The following describes the node dividing method of the coding tree in detail with reference to the specific drawings.
Fig. 9 is a schematic flow chart of a coding tree node partitioning method of an embodiment of the present application. The encoding tree node dividing method shown in fig. 9 may be performed by an encoding tree node dividing apparatus (the encoding tree node dividing apparatus may be located in an image decoding apparatus (system) or an image encoding apparatus (system)), and in particular, the method shown in fig. 9 may be performed by an image encoding apparatus or an image decoding apparatus. The method shown in fig. 9 may be performed either at the encoding side or the decoding side, and the method 900 shown in fig. 9 includes steps 910, 920, and 930, which are described in detail below.
S910, determining the type of the current coding tree node.
The current coding tree node is a luma chroma coding tree node, a luma coding tree node or a chroma coding tree node. The luminance-chrominance coding tree node refers to a coding tree node comprising luminance blocks and chrominance blocks, the luminance coding tree node refers to a coding tree node comprising luminance blocks, and the chrominance coding tree node refers to a coding tree node comprising chrominance blocks.
S920, determining the dividing mode of the current coding tree node according to the type of the current coding tree node and/or the coding information of the adjacent image blocks.
Wherein the image blocks in the current encoding tree node and the adjacent image blocks are spatially adjacent image blocks, the encoding information comprises quadtree depth (Quad-TREE DEPTH) of the adjacent image blocks and/or width and height of the adjacent image blocks, and the adjacent image blocks comprise adjacent luminance blocks and/or adjacent chrominance blocks.
Optionally, the determining the partition mode of the current coding tree node according to the type of the current coding tree node and/or the coding information of the adjacent image blocks may include: determining a context model number corresponding to a syntax element of the current coding tree node according to the type of the current coding tree node and/or coding information of the adjacent image blocks; and determining the dividing mode of the current coding tree node according to the context model number.
Similar to the embodiment of the method 800 in fig. 8, the context model number may be denoted by ctxInc, and may be determined by the above formula (1) and formula (2), and specific reference may be made to the description in the method 800, which is not repeated herein.
In the present application, the method for determining the context model number according to the syntax element of the current coding unit may specifically include the following two methods.
The method comprises the following steps:
Alternatively, the syntax element of the current coding unit may be used to identify whether the current coding tree node uses quadtree partitioning, e.g., the syntax element may be split_qt_flag.
When the current coding tree node is a luminance and chrominance coding tree node or a luminance coding tree node, determining the context model number according to the quadtree depth of the adjacent luminance blocks and the quadtree depth of the current coding tree node;
In the case that the current coding tree node is a chroma coding tree node, a context model number of a syntax element of the current coding tree node may be determined according to a quadtree depth of the current coding tree node.
For example, in the case where the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, condL and condA may be determined by the above formula (1) or formula (2).
Wherein condL is a decision result of cqtDepth [ xNbL ] [ yNbL ] > cqtDepth, condA is a decision result of cqtDepth [ xNbA ] [ yNbA ] > cqtDepth, cqtDepth [ xNbL ] [ yNbL ] represents a quadtree depth of the left neighboring image block (xNbL, yNbL), cqtDepth [ xNbA ] [ yNbA ] represents a quadtree depth of the upper neighboring image block (xNbA, yNbA), and cqtDepth represents a quadtree depth of the current coding tree node.
The descriptions of other variables (or parameters) in the formula (1) and the formula (2) are similar to the method one in S820, and are not repeated here.
In the case where the current coding unit is a chroma coding unit, condL and condA may be preset values.
For example, condL and condA may both be set to 0.
At this point, the context model number ctxInc may be determined in one of two ways:
Mode one:
condL and condA are set to 0 in advance, ctxsetidx is also set to 0, and at this time, as can be seen from the above formula (2), the context model number ctxInc corresponding to the syntax element of the current coding unit is also 0.
Mode two:
condL and condA are preset to 0, ctxsetidx is (cqtDepth < 2)? 0:1, cqtDepth represents the quadtree depth of the current coding tree node, and according to the above formula (2), ctxInc is 0 if the quadtree depth of the current coding tree node is less than 2; otherwise ctxInc is 3.
It can be seen that, in case the type of the current coding tree node is a chroma coding tree node, the context model number ctxInc can be determined according to the quadtree depth of the current coding tree node, that is, the determination of the context model number ctxInc may not depend on the coding information of the neighboring image blocks.
At this time, according to the context model number ctxInc, a bit corresponding to the syntax element of the current coding unit may be decoded to obtain a value of the syntax element (split_qt_flag). Reference may be made specifically to the prior art and will not be described here in detail.
Alternatively, the split_qt_flag may indicate whether the current encoding tree node uses quadtree partitioning, e.g., a split_qt_flag of 1 indicates that the current node uses quadtree partitioning into four child nodes, and a split_qt_flag of 0 indicates that the current node does not use quadtree partitioning.
Optionally, according to the value of the syntax element (split_qt_flag), the partition mode of the current coding tree node may be determined, a plurality of coding units subordinate to the current coding tree node may be obtained, and the quadtree depth of the current coding unit may be saved.
For example, if the current coding unit is of luma chroma coding unit or luma coding unit type, the quadtree depth of the current coding unit may be saved to variable cqtDepth [ x ] [ y ], where cqtDepth [ x ] [ y ] represents the quadtree depth with coordinate position (x, y), x0+.x0+ cbWidth, y0+.y0+.y0+ cbHeight, cbWidth is the width of the current coding unit and cbHeight is the height of the current coding unit.
The above-mentioned method for determining the current coding tree node according to the value of the syntax element (split_qt_flag) is prior art. For example, if the split_qt_flag is 1, the current encoding tree node is divided into four sub-nodes by using a quadtree division mode, and the quadtree depth of the sub-nodes is equal to the quadtree depth of the current encoding tree node plus 1; if the split_qt_flag is 0, the current coding tree node is divided into one of a binary tree division or a trigeminal tree division, and the code stream is further analyzed to determine the node division mode, wherein the binary tree division mode comprises horizontal bisection and vertical bisection, and the trigeminal tree division comprises horizontal trisection and vertical trisection. The child nodes of the current encoding tree node may continue to divide or not. When the coding tree node is not divided, it corresponds to a coding unit whose quadtree depth is equal to the quadtree depth of the coding tree node.
The second method is as follows:
alternatively, the syntax element of the current coding unit may be used to identify whether the current coding tree node is partitioned, for example, the syntax element may be split_cu_flag.
When the current coding tree node is a luminance and chrominance coding tree node or a luminance coding tree node, determining the context model number according to the width and height of the adjacent luminance blocks and the availability of the current coding tree node dividing mode;
in the case that the current coding tree node is a chroma coding unit, a context model number of a syntax element of the current coding tree node may be determined according to availability of a partitioning manner of the current coding tree node.
For example, in the case where the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, condL and condA may be determined by the above formula (1) or formula (2).
Wherein condL has a value CbHeight [ chType ] [ xNbL ] [ yNbL ] < cbHeight, condA has a value CbWidth [ chType ] [ xNbA ] [ yNbA ] < cbWidth, cbHeight [0] [ x ] [ y ] represents the height of the left adjacent luminance block (xNbL, yNbL), cbWidth [0] [ x ] [ y ] represents the width of the left adjacent luminance block (xNbL, yNbL), cbHeight represents the height of the current coding tree node, and cbWidth represents the width of the current coding tree node.
The descriptions of other variables (or parameters) in the formula (1) and the formula (2) are similar to the method one in S820, and are not repeated here.
In the case where the current coding unit is a chroma coding unit, condL and condA may be preset values.
At this point, the context model number ctxInc may be determined in one of several ways:
Mode one:
condL is preset to 0, condA is preset to 0, ctxsetidx is also set to 0, at this time, as can be seen from the above formula (2), the context model number ctxInc corresponding to the syntax element of the current coding unit is also 0.
Mode two:
condL is preset to 0, condA is preset to 1, and ctxsetidx is set to 0, at this time, according to the above formula (2), it is known that the context model number ctxInc corresponding to the syntax element of the current coding unit is 1.
Mode three:
condL is preset to 0 and condA is preset to 0, at this time, according to the above formula (1), ctxInc is equal to 3×ctxsetidx, wherein ctxSetIdx can be determined by referring to the prior art.
Alternatively, reference may be made to a method of determining ctxSetIdx (corresponding to split_cu_flag) in VTM5 based on the availability of the current coding tree node partition. For example, in the case that ctxSetIdx has values of 0,1, and 2, the context model number ctxInc is equal to 0, 3, and 6, respectively.
Mode four:
condA is preset to 0, and the condl may be determined by the high of the chroma block adjacent to the left side and the high of the chroma block of the current coding unit, at this time, the context model number ctxInc may be obtained from the above formula (1), where the determination method of ctxSetIdx may refer to the prior art.
Alternatively, reference may be made to a method of determining ctxSetIdx (corresponding to split_cu_flag) in VTM5 based on the availability of the current coding tree node partition mode.
As can be seen from the first to fourth modes, in the case that the current coding tree node is of a chroma coding tree node type, the context model number ctxInc may be determined according to the availability of the current coding tree node division mode, that is, the determination of the context model number ctxInc may not depend on the coding information of the upper neighboring image block.
At this time, according to the context model number ctxInc, a bit corresponding to the syntax element of the current coding unit may be decoded to obtain a value of the syntax element (split_cu_flag). Reference may be made specifically to the prior art and will not be described here in detail.
Alternatively, the split_cu_flag may indicate whether the current coding tree node is partitioned. For example, a split_cu_flag of 1 indicates that the current node is divided into child nodes, and a split_cu_flag of 0 indicates that the current node is not divided.
Optionally, according to the value of the syntax element (split_cu_flag), the partition manner of the current coding tree node may be determined, so as to obtain one or more coding units subordinate to the current coding tree node.
For example, if the type of coding unit (of the one or more coding units) is luma chroma coding unit or luma coding unit, the width of the luma block of the coding unit may be saved to variable CbWidth [0] [ x ] [ y ], the height of the luma block of the coding unit may be saved to variable CbHeight [0] [ x ] [ y ], where x0 is equal to or less than x < x0+ cbWidth1, y0 is equal to or less than y < y0+ cbHeight1, cbWidth1 is the width of the coding unit, cbHeight1 is the height of the coding unit; if the coding unit type is a chroma coding unit, the width of the chroma block of the coding unit may be saved to variable CbWidth [1] [ x ] [ y ], and the height of the chroma block of the coding unit may be saved to variable CbHeight [1] [ x ] [ y ], where x0.ltoreq.x0+ cbWidth1, y0.ltoreq.y0+ cbHeight1, cbWidth1 is the width of the coding unit, and cbHeight1 is the height of the coding unit.
It should be noted that when the coding tree node is no longer divided, it corresponds to one coding unit. At this time, the width and height of the coding unit are equal to those of the coding tree node to which the coding unit belongs, that is, cbWidth is equal to cbWidth and cbHeight1 is equal to cbHeight at this time.
And determining the dividing mode of the current coding tree node as the prior art according to the value of the flag bit split_cu_flag. For example, if the flag bit split_cu_flag is 1, the current coding tree node is divided into child nodes; if the split_cu_flag is 0, the current coding tree node is not divided, wherein the dividing mode of dividing the coding tree node into sub-nodes comprises four-way, horizontal two-way, vertical two-way, horizontal three-way and vertical three-way. As the encoding tree nodes continue to partition, the particular partitioning may be determined by other syntax elements, such as split qt flag, etc.
And S930, dividing the current coding tree node according to the dividing mode of the coding tree node.
In the embodiment of the present application, how to implement the processing of S930 is not limited, for example, a coding tree node dividing method in VVC may be used, and will not be described herein. According to the coding tree division, leaf nodes on the coding tree can be finally determined, each leaf node corresponds to one coding unit, and the decoding coding unit can obtain a reconstructed image of the coding unit.
The image prediction method and the coding tree node dividing method according to the embodiments of the present application are described in detail above with reference to fig. 8 and 9, and the image prediction apparatus and the coding tree node dividing apparatus according to the embodiments of the present application are described below with reference to fig. 10 and 11. It should be appreciated that the image prediction apparatus shown in fig. 10 is capable of performing the various steps in the image prediction method 800 of fig. 8.
Fig. 10 is a schematic block diagram of an image prediction apparatus according to an embodiment of the present application.
The image prediction apparatus 1000 shown in fig. 10 includes: a determination module 1010, a processing module 1020, and a prediction module 1030.
A determining module 1010, configured to determine a type of a current coding unit, where the type of the current coding unit is a luma chroma coding unit, a luma coding unit, or a chroma coding unit;
A processing module 1020, configured to determine a prediction mode of the current coding unit according to a type of the current coding unit and/or a prediction mode of an adjacent image block, where the image block in the current coding unit and the adjacent image block are spatially adjacent image blocks, and the adjacent image block includes an adjacent luminance block and/or an adjacent chrominance block;
and a prediction module 1030, configured to predict the image block in the current coding unit according to the prediction mode of the current coding unit.
Optionally, the processing module 1020 is specifically configured to: determining a context model number corresponding to a syntax element of the current coding unit according to the type of the current coding unit and/or a prediction mode of an adjacent image block; and determining the prediction mode of the current coding unit according to the context model number.
Optionally, the processing module 1020 is specifically configured to: if the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or if the current coding unit is a chroma coding unit, determining condL according to the prediction mode of the left neighboring chroma block and determining condA according to the prediction mode of the upper neighboring chroma block; determining the context model number from the condL and the condA; wherein condL and condA are binary variables.
Optionally, the processing module 1020 is specifically configured to: if the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or determining the context model number according to preset condL and condA when the current coding unit is a chroma coding unit; wherein condL and condA are binary variables.
Optionally, the syntax element is pred_mode_ ibc _flag, the syntax element is used to identify whether the current coding unit uses intra block copy prediction, condL is used to indicate whether a prediction mode of a left neighboring image block is intra block copy prediction, and condA is used to indicate whether a prediction mode of an upper neighboring image block is intra block copy prediction.
It should be appreciated that the code tree node dividing apparatus shown in fig. 11 is capable of performing the various steps in the code tree node dividing method 900 of fig. 9.
Fig. 11 is a schematic block diagram of an encoding tree node dividing apparatus of an embodiment of the present application.
The code tree node dividing apparatus 1100 shown in fig. 11 includes: a determination module 1110, a processing module 1120, and a partitioning module 1130.
A determining module 1110, configured to determine a type of a current coding tree node, where the type of the current coding tree node is a luma chroma coding tree node, a luma coding tree node or a chroma coding tree node;
A processing module 1120, configured to determine a partition manner of the current coding tree node according to a type of the current coding tree node and/or coding information of an adjacent image block, where the image block in the current coding tree node and the adjacent image block are spatially adjacent image blocks, the coding information includes a quadtree depth of the adjacent image block and/or a width and a height of the adjacent image block, and the adjacent image block includes an adjacent luminance block and/or an adjacent chrominance block;
the dividing module 1130 is configured to divide the current coding tree node according to the dividing manner of the coding tree node.
Optionally, the processing module 1120 is specifically configured to: determining a context model number corresponding to a syntax element of the current coding tree node according to the type of the current coding tree node and/or coding information of the adjacent image blocks; and determining the dividing mode of the current coding tree node according to the context model number.
Optionally, the processing module 1120 is specifically configured to: determining the context model number according to the quadtree depth of the adjacent luminance block and the quadtree depth of the current coding tree node when the current coding tree node is a luminance-chrominance coding tree node or a luminance coding tree node; or determining a context model number of a syntax element of the current coding tree node according to a quadtree depth of the current coding tree node in the case that the current coding tree node is a chroma coding tree node.
Optionally, the syntax element is a split_qt_flag for identifying whether a current coding tree node uses quadtree partitioning.
Optionally, the processing module 1120 is specifically configured to: determining the context model number according to the width and height of the adjacent brightness blocks and the availability of the current coding tree node dividing mode under the condition that the current coding tree node is a brightness chromaticity coding tree node or a brightness coding tree node; and under the condition that the current coding tree node is a chroma coding unit, determining a context model number of a syntax element of the current coding tree node according to the availability of the current coding tree node dividing mode.
Optionally, the syntax element is a split_cu_flag, which is used to identify whether the current coding tree node is partitioned.
Fig. 12 is a schematic block diagram of an image prediction apparatus according to an embodiment of the present application.
The image prediction apparatus 1200 shown in fig. 12 includes: a processing module 1210 and a prediction module 1220.
The processing module 1210 is configured to determine, when the current coding unit is a chroma coding unit, a context model number corresponding to a syntax element of the current coding unit according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether the left-side neighboring chroma block is available, availableA indicates whether the upper-side neighboring chroma block is available; the condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, and the condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction; or the condL and the condA are both preset values;
the processing module 1210 is configured to determine a prediction mode of the current coding unit according to the context model number;
a prediction module 1220, configured to predict the image block in the current coding unit according to the prediction mode of the current coding unit.
Fig. 13 is a schematic block diagram of an encoding tree node dividing apparatus of an embodiment of the present application.
The code tree node dividing apparatus 1300 shown in fig. 13 includes: a processing module 1310 and a partitioning module 1320.
A processing module 1310, configured to determine, when the current coding tree node is a chroma coding tree node, a context model number corresponding to a syntax element of the current coding tree node according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether the left-side neighboring chroma block is available, availableA indicates whether the upper-side neighboring chroma block is available; both condL and condA are preset values; or the condL is determined by the current coding tree node, the condA is a preset value;
The processing module 1310 is configured to determine, according to the context model number, a partition manner of the current coding tree node;
The partitioning module 1320 is configured to partition the current coding tree node according to the partition manner of the coding tree node.
Fig. 14 is a schematic diagram of a hardware configuration of an image encoding/decoding apparatus according to an embodiment of the present application. The apparatus 1400 shown in fig. 14 (the apparatus 1400 may be a computer device in particular) includes a memory 1410, a processor 1420, a communication interface 1430, and a bus 1440. Wherein the memory 1410, the processor 1420, and the communication interface 1430 implement communication connection therebetween through a bus 1440.
The memory 1410 may be a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a random access memory (random access memory, RAM). The memory 1410 may store a program, and the processor 1420 is configured to perform various steps of the image prediction method of the embodiment of the present application when the program stored in the memory 1410 is executed by the processor 1420.
The processor 1420 may be a general-purpose central processing unit (central processing unit, CPU), microprocessor, application SPECIFIC INTEGRATED Circuit (ASIC), graphics processor (graphics processing unit, GPU) or one or more integrated circuits for executing associated programs to implement the image prediction method of the present application.
Processor 1420 may also be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the image prediction method of the present application may be performed by integrated logic circuitry of hardware in the processor 1420 or instructions in the form of software.
The processor 1420 may also be a general purpose processor, a digital signal processor (DIGITAL SIGNAL processing unit, DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 1420, and the processor 1420 reads the information in the memory 1420, in combination with its hardware, performs the functions to be performed by the units comprised in the image prediction apparatus or performs the image prediction method according to the method embodiment of the present application.
Communication interface 1430 enables communication between apparatus 1400 and other devices or communication networks using transceiving apparatus such as, but not limited to, transceivers. For example, information of the neural network to be constructed and training data required in constructing the neural network may be acquired through the communication interface 1430.
Bus 1440 may include a path for transferring information between components of device 1400 (e.g., memory 1410, processor 1420, communication interface 1430).
The determination module 1010, the processing module 1020, and the prediction module 1030 in the apparatus 1000 in fig. 10 described above correspond to the processor 1420 in the image encoding/decoding apparatus 1400.
Or the determination module 1110, the processing module 1120, and the division module 1130 in the apparatus 1100 in fig. 11 described above correspond to the processor 1420 in the image encoding/decoding apparatus 1400.
Or the processing module 1210 and the prediction module 1220 in the apparatus 1200 in fig. 12 described above correspond to the processor 1420 in the image encoding/decoding apparatus 1400.
Or the processing module 1310 and the dividing module 1320 in the apparatus 1300 in fig. 13 correspond to the processor 1420 in the image encoding/decoding apparatus 1400.
In addition, when the image encoding/decoding apparatus 1400 encodes a video image, the video image may be acquired through a communication interface, and then the acquired video image may be encoded to obtain encoded video data, which may be transmitted to a video decoding device through the communication interface 1430.
When the image encoding/decoding apparatus 1400 decodes a video image, the video image may be acquired through the communication interface 1430, and then the acquired video image may be decoded to obtain a video image to be displayed.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (35)
1. An image prediction method, comprising:
Determining the type of a current coding unit, wherein the type of the current coding unit is a luminance and chrominance coding unit, a luminance and chrominance coding unit or a chrominance coding unit;
Determining a prediction mode of a current coding unit according to the type of the current coding unit and/or the prediction mode of an adjacent image block, wherein the image block in the current coding unit and the adjacent image block are spatially adjacent image blocks, and the adjacent image block comprises an adjacent brightness block and/or an adjacent chroma block;
Predicting the image block in the current coding unit according to the prediction mode of the current coding unit;
The determining the prediction mode of the current coding unit according to the type of the current coding unit and/or the prediction modes of the adjacent image blocks comprises the following steps:
Determining a context model number corresponding to a syntax element of the current coding unit according to the type of the current coding unit and/or a prediction mode of an adjacent image block;
and determining the prediction mode of the current coding unit according to the context model number.
2. The method according to claim 1, wherein determining a context model number corresponding to a syntax element of the current coding unit according to a type of the current coding unit and/or a prediction mode of a neighboring image block comprises:
If the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or (b)
If the current coding unit is a chroma coding unit, determining condL according to a prediction mode of a left neighboring chroma block and determining condA according to a prediction mode of an upper neighboring chroma block; determining the context model number from the condL and the condA;
Wherein condL and condA are binary variables.
3. The method of claim 2, wherein the determining the context model number comprises determining the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is the context model number, ctxSetIdx is the number of the context group;
In the case that the current encoding unit is a luma chroma encoding unit or a luma encoding unit, the condL indicates whether a prediction mode of the left neighboring luma block is intra block copy prediction, the condA indicates whether a prediction mode of the upper neighboring luma block is intra block copy prediction, availableL indicates whether the left neighboring luma block is available, and availableA indicates whether the upper neighboring luma block is available; or (b)
In the case where the current coding unit is a chroma coding unit, condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
4. The method according to claim 1, wherein determining a context model number corresponding to a syntax element of the current coding unit according to a type of the current coding unit and/or a prediction mode of a neighboring image block comprises:
If the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or (b)
Determining the context model number according to a preset condL and a preset condA when the current coding unit is a chroma coding unit;
Wherein condL and condA are binary variables.
5. The method of claim 4, wherein the determining the context model number comprises determining the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is the context model number, ctxSetIdx is the number of the context group;
In the case that the current encoding unit is a luma chroma encoding unit or a luma encoding unit, the condL indicates whether a prediction mode of the left neighboring luma block is intra block copy prediction, the condA indicates whether a prediction mode of the upper neighboring luma block is intra block copy prediction, availableL indicates whether the left neighboring luma block is available, and availableA indicates whether the upper neighboring luma block is available; or (b)
In the case where the current coding unit is a chroma coding unit, condL is a preset value, condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
6. The method according to any of claims 3 to 5, wherein the syntax element is a pred_mode_ ibc _flag, the syntax element is used to identify whether the current coding unit uses intra block copy prediction, condL is used to indicate whether the prediction mode of the left neighboring image block is intra block copy prediction, and condA is used to indicate whether the prediction mode of the upper neighboring image block is intra block copy prediction.
7. A method for partitioning nodes of a coding tree, comprising:
Determining the type of a current coding tree node, wherein the type of the current coding tree node is a brightness and chrominance coding tree node, a brightness coding tree node or a chrominance coding tree node;
Determining a dividing mode of the current coding tree node according to the type of the current coding tree node and/or the coding information of the adjacent image blocks, wherein the image blocks in the current coding tree node and the adjacent image blocks are spatially adjacent image blocks, the coding information comprises the quadtree depth of the adjacent image blocks and/or the width and height of the adjacent image blocks, and the adjacent image blocks comprise adjacent brightness blocks and/or adjacent chroma blocks;
dividing the current coding tree node according to the dividing mode of the coding tree node;
The determining the dividing mode of the current coding tree node according to the type of the current coding tree node and/or the coding information of the adjacent image blocks comprises the following steps:
determining a context model number corresponding to a syntax element of the current coding tree node according to the type of the current coding tree node and/or coding information of the adjacent image blocks;
And determining the dividing mode of the current coding tree node according to the context model number.
8. The method according to claim 7, wherein determining a context model number corresponding to a syntax element of the current coding tree node according to the type of the current coding tree node and/or coding information of neighboring image blocks comprises:
Determining the context model number according to the quadtree depth of the adjacent luminance block and the quadtree depth of the current coding tree node when the current coding tree node is a luminance-chrominance coding tree node or a luminance coding tree node; or (b)
And under the condition that the current coding tree node is a chromaticity coding tree node, determining the context model number according to the quadtree depth of the current coding tree node.
9. The method of claim 8, wherein the determining the context model number comprises determining the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is the context model number, ctxSetIdx is the number of the context group;
In the case that the current coding tree node is a luminance-chrominance coding tree node or a luminance coding tree node, the condL represents whether a quadtree depth of a left-side neighboring luminance block is greater than a quadtree depth of the current coding tree node, the condA represents whether a quadtree depth of an upper-side neighboring luminance block is greater than a quadtree depth of the current coding tree node, availableL represents whether the left-side neighboring luminance block is available, and availableA represents whether the upper-side neighboring luminance block is available; or (b)
In the case that the current coding unit is a chroma coding unit, condL is a preset value, condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
10. The method according to claim 8 or 9, wherein the syntax element is a split qt flag for identifying whether a current coding tree node uses quadtree partitioning.
11. The method according to claim 7, wherein determining a context model number corresponding to a syntax element of the current coding tree node according to the type of the current coding tree node and/or coding information of neighboring image blocks comprises:
Determining the context model number according to the width and height of the adjacent brightness blocks and the availability of the current coding tree node dividing mode under the condition that the current coding tree node is a brightness chromaticity coding tree node or a brightness coding tree node; or (b)
And under the condition that the current coding tree node is a chroma coding unit, determining the context model number according to the availability of the current coding tree node dividing mode.
12. The method of claim 11, wherein the determining the context model number comprises determining the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is the context model number, ctxSetIdx is the number of the context group;
In the case where the current encoding tree node is a luminance-chrominance encoding tree node or a luminance-encoding tree node, condL represents whether the width and height of a left-side neighboring luminance block are greater than those of the current encoding tree node, condA represents whether the width and height of an upper-side neighboring luminance block are greater than those of the current encoding tree node, availableL represents whether the left-side neighboring luminance block is available, availableA represents whether the upper-side neighboring luminance block is available; or (b)
In the case where the current coding unit is a chroma coding unit, condL is a predicted value or determined by the current coding tree node, condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
13. The method according to claim 11 or 12, wherein the syntax element is a split_cu_flag for identifying whether a current coding tree node is partitioned.
14. An image prediction method, comprising:
in the case that the current coding unit is a chroma coding unit, determining a context model number corresponding to a syntax element of the current coding unit according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether a left-side neighboring chroma block is available, availableA indicates whether an upper-side neighboring chroma block is available;
The condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, and the condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction; or the condL and the condA are both preset values;
Determining a prediction mode of the current coding unit according to the context model number;
And predicting the image block in the current coding unit according to the prediction mode of the current coding unit.
15. A method for partitioning nodes of a coding tree, comprising:
In the case that the current coding tree node is a chroma coding tree node, determining a context model number corresponding to a syntax element of the current coding tree node according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether a left-side neighboring chroma block is available, availableA indicates whether an upper-side neighboring chroma block is available;
Both condL and condA are preset values; or the condL is determined by the current coding tree node, the condA is a preset value;
determining the dividing mode of the current coding tree node according to the context model number;
And dividing the current coding tree node according to the dividing mode of the coding tree node.
16. An image prediction apparatus, comprising:
The determining module is used for determining the type of the current coding unit, wherein the type of the current coding unit is a luminance and chrominance coding unit, a luminance and chrominance coding unit or a chrominance coding unit;
The processing module is used for determining the prediction mode of the current coding unit according to the type of the current coding unit and/or the prediction mode of the adjacent image blocks, wherein the image blocks in the current coding unit and the adjacent image blocks are spatially adjacent image blocks, and the adjacent image blocks comprise adjacent brightness blocks and/or adjacent chroma blocks;
The prediction module is used for predicting the image block in the current coding unit according to the prediction mode of the current coding unit;
the processing module is specifically configured to:
Determining a context model number corresponding to a syntax element of the current coding unit according to the type of the current coding unit and/or a prediction mode of an adjacent image block;
and determining the prediction mode of the current coding unit according to the context model number.
17. The apparatus of claim 16, wherein the processing module is specifically configured to:
If the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or (b)
If the current coding unit is a chroma coding unit, determining condL according to a prediction mode of a left neighboring chroma block and determining condA according to a prediction mode of an upper neighboring chroma block; determining the context model number from the condL and the condA;
Wherein condL and condA are binary variables.
18. The apparatus according to claim 17, wherein the processing module is configured to determine the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is the context model number, ctxSetIdx is the number of the context group;
In the case that the current encoding unit is a luma chroma encoding unit or a luma encoding unit, the condL indicates whether a prediction mode of the left neighboring luma block is intra block copy prediction, the condA indicates whether a prediction mode of the upper neighboring luma block is intra block copy prediction, availableL indicates whether the left neighboring luma block is available, and availableA indicates whether the upper neighboring luma block is available; or (b)
In the case where the current coding unit is a chroma coding unit, condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
19. The apparatus of claim 16, wherein the processing module is specifically configured to:
If the current coding unit is a luminance-chrominance coding unit or a luminance coding unit, determining condL according to a prediction mode of a luminance block adjacent to the left side, and determining condA according to a prediction mode of a luminance block adjacent to the upper side; determining the context model number from the condL and the condA; or (b)
Determining the context model number according to a preset condL and a preset condA when the current coding unit is a chroma coding unit;
Wherein condL and condA are binary variables.
20. The apparatus according to claim 19, wherein the processing module is configured to determine the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is the context model number, ctxSetIdx is the number of the context group;
In the case that the current encoding unit is a luma chroma encoding unit or a luma encoding unit, the condL indicates whether a prediction mode of the left neighboring luma block is intra block copy prediction, the condA indicates whether a prediction mode of the upper neighboring luma block is intra block copy prediction, availableL indicates whether the left neighboring luma block is available, and availableA indicates whether the upper neighboring luma block is available; or (b)
In the case where the current coding unit is a chroma coding unit, condL is a preset value, condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
21. The apparatus according to any one of claims 17 to 20, wherein the syntax element is a pred_mode_ ibc _flag, the syntax element is used to identify whether the current coding unit uses intra block copy prediction, the condL is used to indicate whether a prediction mode of a left neighboring image block is intra block copy prediction, and the condA is used to indicate whether a prediction mode of an upper neighboring image block is intra block copy prediction.
22. A code tree node dividing apparatus, comprising:
the determining module is used for determining the type of the current coding tree node, wherein the type of the current coding tree node is a brightness and chrominance coding tree node, a brightness coding tree node or a chrominance coding tree node;
The processing module is used for determining the division mode of the current coding tree node according to the type of the current coding tree node and/or the coding information of the adjacent image blocks, wherein the image blocks in the current coding tree node and the adjacent image blocks are spatially adjacent image blocks, the coding information comprises the quadtree depth of the adjacent image blocks and/or the width and height of the adjacent image blocks, and the adjacent image blocks comprise adjacent brightness blocks and/or adjacent chroma blocks;
The dividing module is used for dividing the current coding tree node according to the dividing mode of the coding tree node;
the processing module is specifically configured to:
determining a context model number corresponding to a syntax element of the current coding tree node according to the type of the current coding tree node and/or coding information of the adjacent image blocks;
And determining the dividing mode of the current coding tree node according to the context model number.
23. The apparatus of claim 22, wherein the processing module is specifically configured to:
Determining the context model number according to the quadtree depth of the adjacent luminance block and the quadtree depth of the current coding tree node when the current coding tree node is a luminance-chrominance coding tree node or a luminance coding tree node; or (b)
And under the condition that the current coding tree node is a chromaticity coding tree node, determining the context model number according to the quadtree depth of the current coding tree node.
24. The apparatus according to claim 23, wherein the processing module is configured to determine the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is the context model number, ctxSetIdx is the number of the context group;
In the case that the current coding tree node is a luminance-chrominance coding tree node or a luminance coding tree node, the condL represents whether a quadtree depth of a left-side neighboring luminance block is greater than a quadtree depth of the current coding tree node, the condA represents whether a quadtree depth of an upper-side neighboring luminance block is greater than a quadtree depth of the current coding tree node, availableL represents whether the left-side neighboring luminance block is available, and availableA represents whether the upper-side neighboring luminance block is available; or (b)
In the case that the current coding unit is a chroma coding unit, condL is a preset value, condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
25. The apparatus of claim 23 or 24, wherein the syntax element is a split qt flag for identifying whether a current coding tree node uses quadtree partitioning.
26. The apparatus of claim 22, wherein the processing module is specifically configured to:
Determining the context model number according to the width and height of the adjacent brightness blocks and the availability of the current coding tree node dividing mode under the condition that the current coding tree node is a brightness chromaticity coding tree node or a brightness coding tree node; or (b)
And under the condition that the current coding tree node is a chroma coding unit, determining the context model number according to the availability of the current coding tree node dividing mode.
27. The apparatus of claim 26, wherein the processing module is configured to determine the context model number according to the following formula:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
wherein ctxInc is the context model number, ctxSetIdx is the number of the context group;
In the case where the current encoding tree node is a luminance-chrominance encoding tree node or a luminance-encoding tree node, condL represents whether the width and height of a left-side neighboring luminance block are greater than those of the current encoding tree node, condA represents whether the width and height of an upper-side neighboring luminance block are greater than those of the current encoding tree node, availableL represents whether the left-side neighboring luminance block is available, availableA represents whether the upper-side neighboring luminance block is available; or (b)
In the case where the current coding unit is a chroma coding unit, condL is a predicted value or determined by the current coding tree node, condA is a preset value, availableL indicates whether the left-side neighboring chroma block is available, and availableA indicates whether the upper-side neighboring chroma block is available.
28. The apparatus of claim 26 or 27, wherein the syntax element is a split_cu_flag for identifying whether a current coding tree node is partitioned.
29. An image prediction apparatus, comprising:
The processing module is used for determining a context model number corresponding to a syntax element of the current coding unit according to the following formula when the current coding unit is a chroma coding unit:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether a left-side neighboring chroma block is available, availableA indicates whether an upper-side neighboring chroma block is available;
The condL indicates whether the prediction mode of the left-side neighboring chroma block is intra block copy prediction, and the condA indicates whether the prediction mode of the upper-side neighboring chroma block is intra block copy prediction; or the condL and the condA are both preset values;
the processing module is used for determining the prediction mode of the current coding unit according to the context model number;
And the prediction module is used for predicting the image block in the current coding unit according to the prediction mode of the current coding unit.
30. A code tree node dividing apparatus, comprising:
the processing module is used for determining a context model number corresponding to a syntax element of the current coding tree node according to the following formula when the current coding tree node is a chroma coding tree node:
ctxInc=(condL&&availableL)+(condA&&availableA)+ctxSetIdx*3
Wherein ctxInc is a context model number, ctxSetIdx is a context group number, availableL indicates whether a left-side neighboring chroma block is available, availableA indicates whether an upper-side neighboring chroma block is available;
Both condL and condA are preset values; or the condL is determined by the current coding tree node, the condA is a preset value;
The processing module is used for determining the dividing mode of the current coding tree node according to the context model number;
and the dividing module is used for dividing the current coding tree node according to the dividing mode of the coding tree node.
31. A video encoding and decoding apparatus, comprising:
a memory for storing a program;
A processor for executing a program stored in the memory, which processor, when executed by the processor, performs the method of any one of claims 1-6 or 7-13 or 14 or 15.
32. A video encoder comprising the apparatus of any of claims 16-21 or 22-28 or 29 or 30 or 31.
33. A video decoder comprising the apparatus of any of claims 16-21 or 22-28 or 29 or 30 or 31.
34. A video codec device comprising the video encoder of claim 32 and/or the video decoder of claim 33.
35. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program executable by a processor, which when executed by the processor performs the method of any one of claims 1-6 or 7-13 or 14 or 15.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910551446.6A CN112135128B (en) | 2019-06-24 | 2019-06-24 | Image prediction method, coding tree node division method and device thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910551446.6A CN112135128B (en) | 2019-06-24 | 2019-06-24 | Image prediction method, coding tree node division method and device thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112135128A CN112135128A (en) | 2020-12-25 |
CN112135128B true CN112135128B (en) | 2024-07-05 |
Family
ID=73849917
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910551446.6A Active CN112135128B (en) | 2019-06-24 | 2019-06-24 | Image prediction method, coding tree node division method and device thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112135128B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023016424A1 (en) * | 2021-08-11 | 2023-02-16 | Beijing Bytedance Network Technology Co., Ltd. | Method, apparatus, and medium for video processing |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109076210A (en) * | 2016-05-28 | 2018-12-21 | 联发科技股份有限公司 | Method and device for current image reference of video coding and decoding |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101739987B1 (en) * | 2010-12-28 | 2017-05-26 | 에스케이 텔레콤주식회사 | Video Encoding/Decoding Method and Apparatus Using Feature Vector of Adjacent Block |
WO2016074147A1 (en) * | 2014-11-11 | 2016-05-19 | Mediatek Singapore Pte. Ltd. | Separated coding tree for luma and chroma |
CN108605130B (en) * | 2015-11-27 | 2021-05-11 | 联发科技股份有限公司 | A kind of method and device for entropy encoding and decoding of block-related symbols |
CN109792516B (en) * | 2016-10-04 | 2021-05-25 | 联发科技股份有限公司 | Method and device for intra-frame chroma coding and decoding in image and video coding and decoding |
CA3070507A1 (en) * | 2017-07-24 | 2019-01-31 | Arris Enterprises Llc | Intra mode jvet coding |
-
2019
- 2019-06-24 CN CN201910551446.6A patent/CN112135128B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109076210A (en) * | 2016-05-28 | 2018-12-21 | 联发科技股份有限公司 | Method and device for current image reference of video coding and decoding |
Also Published As
Publication number | Publication date |
---|---|
CN112135128A (en) | 2020-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115243048B (en) | Video image decoding and encoding method and device | |
CN112204962B (en) | Image prediction method, apparatus and computer-readable storage medium | |
CN112055200A (en) | MPM list construction method, and chroma block intra-frame prediction mode acquisition method and device | |
CN111526362B (en) | Inter-frame prediction method and device | |
CN111385572B (en) | Prediction mode determining method and device, encoding device and decoding device | |
CN119420901A (en) | Image prediction method, device and computer readable storage medium | |
CN112135149B (en) | Entropy encoding/decoding method and device of syntax element and codec | |
CN111432219B (en) | Inter-frame prediction method and device | |
CN111355959B (en) | Image block dividing method and device | |
CN111294603B (en) | Video encoding and decoding method and device | |
CN113366850B (en) | Video encoder, video decoder and corresponding methods | |
CN112135137B (en) | Video encoder, video decoder and corresponding methods | |
CN111277840B (en) | Transform method, inverse transform method, and video encoder and video decoder | |
CN112135128B (en) | Image prediction method, coding tree node division method and device thereof | |
CN115714861A (en) | Video decoder and corresponding method | |
CN111901593A (en) | Image dividing method, device and equipment | |
CN112055211B (en) | Video encoder and QP setting method | |
CN111726617B (en) | Optimization method, device and coder-decoder for fusing motion vector difference technology | |
CN111372086B (en) | Video image decoding method and device | |
CN113316939A (en) | Context modeling method and device for zone bit | |
CN112135129B (en) | Inter-frame prediction method and device | |
CN112135148B (en) | Non-separable transformation method and device | |
CN113766227B (en) | Quantization and inverse quantization method and apparatus for image encoding and decoding | |
CN111726630B (en) | Processing method and device based on triangular prediction unit mode | |
CN113615191B (en) | Method and device for determining image display sequence and video encoding and decoding equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |