Video decoding method and apparatus and video encoding method and apparatus
Patent Information
- Application Number
- CN202580008770.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-01-03
- Filing Date
- 2025-01-02
- Publication Date
- 2026-08-04
AI Technical Summary
根据本公开的实施例,在同一帧内基于搜索生成块矢量时,可以提高块矢量搜索的准确性,并利用最少的比特高效地对块矢量信息进行信令。
Smart Images

Figure CN122514960A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video encoding and decoding. More specifically, this disclosure relates to a method for performing prediction using a block vector representing the location of a reference block in the current frame. Background Technology
[0002] With the development and widespread availability of hardware capable of playing and storing high-resolution or high-definition video content, the demand for codecs that can efficiently encode or decode such content is growing. In recent years, various methods for effectively compressing this type of high-resolution or high-definition video content have been implemented. Representative codecs include HEVC (High Efficiency Video Coding) and VVC (Versatile Video Coding).
[0003] In HEVC, an image is segmented into one or more tiles / slices, and then further segmented into multiple CTUs (Coding Tree Units). VVC can first segment an image into multiple sub-pictures. Sub-pictures are defined as rectangular groups of slices, added to VVC to support independent encoding / decoding and transmission of local regions of the image. Similar to HEVC, a sub-picture can also be segmented into tiles / slices. Furthermore, VVC adds a new image segmentation structure—bricks. Bricks are created by horizontally segmenting tiles and are the basic unit for parallel processing. To handle images with higher resolutions than HEVC, VVC uses CTUs (Coding Tree Units) with a maximum size of 256×256 as the basic unit for encoding and decoding, which is 16 times the size of HEVC.
[0004] For intra-frame block prediction, to eliminate redundancy within the frame, a prediction block is generated using the restored pixels adjacent to the current coded block, and a difference value is generated between the current coded block and the prediction block. For inter-frame block prediction, unlike intra-frame block prediction, the most similar block to the current coded block is searched in the previous or next frame, and a prediction block is generated. Recent standard codecs also employ the technique of searching for and utilizing the most similar block in the current frame within intra-frame blocks, similar to inter-frame block prediction. Summary of the Invention
[0005] Technical issues A method and apparatus for searching block vectors based on candidate groups are disclosed. When generating block vectors by searching within the current frame, a more accurate block vector is found, a prediction block most similar to the current frame is generated, and coding efficiency is obtained by minimizing block vector information.
[0006] Technical solution The embodiments of this disclosure disclose a video decoding method and apparatus, as well as a video encoding method and apparatus. By generating multiple block vector candidates through the process of tracking the block vector of the reference block pointed to by the block vector of the current block within the current frame, and generating the best block vector from the multiple block vector candidates, the accuracy of the block vector is improved.
[0007] Furthermore, embodiments of this disclosure disclose a video decoding method and apparatus, as well as a video encoding method and apparatus, which perform intra-frame prediction using multiple block vector candidates obtained through a block vector tracking process of the current frame.
[0008] As an example, a video decoding method according to an embodiment of this disclosure includes the following steps: setting an initial block vector for the current block using at least one block vector derived for at least one neighboring block processed before the current block; determining a first reference block pointed to by the initial block vector within the current image; determining whether the first reference block is encoded in Intra Block Copy (IBC) mode or Intra Template Matching Prediction (IntraTMP) mode; when the first reference block is encoded in IBC mode or IntraTMP mode, determining block vector candidates using the block vector of the first reference block and the initial block vector; determining a block vector candidate list containing the block vector candidates; and obtaining a prediction value for the current block using the block vector selected from the block vector candidates included in the block vector candidate list.
[0009] In one embodiment, the initial block vector of the current block may be set using one of the following: the first block vector candidate with index 0 among at least one block vector candidate derived for a neighboring block having IBC mode or IntraTMP mode; the first block vector candidate with index 0 among reordered block vector candidates after reordering at least one block vector candidate derived for the neighboring block based on cost; a block vector candidate generated by a weighted sum of multiple block vector candidates derived for the neighboring block; and a block vector candidate generated by a weighted sum of multiple reordered block vector candidates after reordering at least one block vector candidate derived for the neighboring block based on cost.
[0010] In one embodiment, the reordered block vector candidate indicated by the block vector selection information can be determined as the initial block vector of the current block based on the block vector selection information contained in the bitstream, among the reordered block vector candidates derived for at least one block vector candidate with IBC mode or IntraTMP mode based on cost reordering.
[0011] In one embodiment, the step of determining whether the first reference block is encoded in IBC mode or IntraTMP mode is as follows: when at least one of the reference pixels in the first reference block at a predetermined position including the center, upper left corner, upper right corner, lower left corner and lower right corner is encoded in the IBC mode or IntraTMP mode, it is determined that the first reference block is encoded in IBC mode or IntraTMP mode.
[0012] In one embodiment, the block vector of the first reference block may be determined as a block vector pointing to a second reference block within the current image that is referenced by a previous block containing reference pixels encoded in the IBC mode or IntraTMP mode.
[0013] In one embodiment, the method may further include the following steps: when at least one of the reference pixels at a predetermined position within the (N+1)th reference block referenced by the Nth reference block is encoded in the IBC mode or IntraTMP mode, a block vector pointing to the (N+2)th reference block referenced by the reference pixel within the (N+1)th reference block is determined, where N is a natural number; it is determined whether to add a block vector candidate generated using the block vector pointing to the (N+2)th reference block to the block vector candidate list; and when it is determined, based on the determination result, that a block vector candidate generated using the block vector pointing to the (N+2)th reference block should be added to the block vector candidate list, the block vector candidate generated using the block vector pointing to the (N+2)th reference block is added to the block vector candidate list.
[0014] In one embodiment, the step of determining whether to add a block vector candidate generated using a block vector pointing to the (N+2)th reference block to the block vector candidate list is as follows: when the number of block vector candidates contained in the block vector candidate list is less than a predetermined number set in advance, it is determined that the block vector candidate generated using a block vector pointing to the (N+2)th reference block will be added to the block vector candidate list.
[0015] In one embodiment, the step of determining whether to add a block vector candidate generated using a block vector pointing to the (N+2)th reference block to the block vector candidate list is as follows: when the number of block vector candidates contained in the block vector candidate list has reached the predetermined number set in advance, or when the reference area referenced by the current block pointed to by the block vector candidate generated using a block vector pointing to the (N+2)th reference block exceeds the search area of the IBC mode or IntraTMP mode, or exceeds any one of the coding tree unit (CTU), slice, tile, or frame boundary, it is determined that the block vector candidate generated using a block vector pointing to the (N+2)th reference block will not be added to the block vector candidate list.
[0016] In one embodiment, the step of determining block vector candidates using the block vector of the first reference block and the initial block vector is as follows: when at least one of the reference pixels at a predetermined position in the (M+1)th reference block referenced by the Mth reference block after the first reference block is encoded in the IBC mode or IntraTMP mode, the process of repeatedly executing the process of determining the block vector of the (M+2)th reference block referenced by the reference pixel in the (M+1)th reference block is executed to determine the final Kth reference block that satisfies the predetermined termination condition, and the block vector of the (K-1)th reference block pointing to the final Kth reference block is determined as the final block vector candidate, and only the final block vector candidate is added to the block vector candidate list, wherein M is an integer greater than or equal to 2, and K is an integer greater than or equal to 2.
[0017] In one embodiment, when there is no reference pixel encoded in the IBC mode or IntraTMP mode among the reference pixels at a predetermined position within the Kth reference block, or when the number of block vector candidates included in the block vector candidate list has reached the predetermined number set in advance, or when the reference region referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the (K+1)th reference block referenced by the Kth reference block exceeds the search region of the IBC mode or IntraTMP mode, or exceeds any one of CTU, slice, tile, or frame boundary, it is determined as the final Kth reference block that satisfies the predetermined termination condition.
[0018] In one embodiment, the step of obtaining the predicted value of the current block using a block vector selected from the block vector candidates included in the block vector candidate list may further include the following steps: reordering the block vector candidates included in the block vector candidate list based on cost, obtaining index information from the bitstream indicating one of the cost-reordered block vector candidates, and determining the block vector of the current block based on the index information.
[0019] In one embodiment, the step of determining block vector candidates using the block vector of the first reference block and the initial block vector is as follows: adding the initial block vector to the block vector of the first reference block to determine the block vector candidates.
[0020] A video encoding method according to an embodiment of the present disclosure includes the following steps: setting an initial block vector for the current block using at least one block vector derived for peripheral blocks processed before the current block; determining a first reference block pointed to by the initial block vector within the current image; determining whether the first reference block is encoded in Intra Block Copy (IBC) mode or Intra Template Matching Prediction (IntraTMP) mode; when the first reference block is encoded in IBC mode or IntraTMP mode, determining block vector candidates using the block vector of the first reference block and the initial block vector; determining a block vector candidate list containing the block vector candidates; obtaining a prediction value for the current block using a block vector selected from the block vector candidates in the block vector candidate list, and determining a final block vector candidate from the block vector candidates based on a cost; and adding index information indicating the final block vector candidate to the bitstream.
[0021] In one embodiment of this disclosure, a video decoding apparatus for performing a video decoding method and a video encoding apparatus for performing a video encoding method are disclosed.
[0022] In one embodiment of this disclosure, a computer-readable recording medium is disclosed, which records a program for performing a video decoding method or a video encoding method on a computer.
[0023] Invention Effects According to embodiments of this disclosure, when generating block vectors based on search within the same frame, the accuracy of block vector search can be improved, and signaling of block vector information can be performed efficiently using the fewest possible bits.
[0024] According to embodiments of this disclosure, when generating block vectors for blocks encoded in IBC (Intra Block Copy) mode or IntraTMP (Intra Template Matching Prediction) mode, the accuracy of block vector search can be improved, and signaling of block vector information can be performed efficiently with the least number of bits.
[0025] Furthermore, according to embodiments of this disclosure, prediction performance can be improved and the amount of data transmitted with prediction-related information can be reduced by utilizing more accurate block vectors to perform predictions. Attached Figure Description
[0026] Figure 1 It is a block diagram used to illustrate the structure and operation of a video encoder used for encoding video.
[0027] Figure 2 This is a schematic diagram illustrating an embodiment of an image block segmentation method.
[0028] Figure 3 and Figure 4 This is a schematic diagram illustrating an embodiment of an intra-frame prediction method.
[0029] Figure 5 It is a block diagram used to illustrate the structure and operation of a video decoder used for decoding video.
[0030] Figure 6 This is an accompanying drawing illustrating an embodiment of an intra-prediction method in IBC (Intra Block Copy) mode.
[0031] Figure 7 This is an accompanying drawing illustrating an embodiment of an intra-prediction method in IntraTMP (Intra Template Matching Prediction) mode.
[0032] Figure 8 This is a flowchart illustrating a video decoding method according to an embodiment of the present disclosure.
[0033] Figure 9 This is a schematic diagram illustrating a block vector generation method according to an embodiment of the present disclosure.
[0034] Figure 10 The reference pixel position within the reference block is shown when generating a block vector according to an embodiment of the present invention.
[0035] Figure 11 An example of a previous block containing reference pixels within a reference block is shown when generating a block vector in an embodiment of this disclosure.
[0036] Figure 12 The process of updating a block vector using a reference block's block vector according to an embodiment of the present disclosure is illustrated.
[0037] Figure 13 This is a flowchart illustrating a video decoding method according to another embodiment of the present disclosure.
[0038] Figure 14 This is a flowchart illustrating a video encoding method according to an embodiment of the present disclosure. Detailed Implementation
[0039] The video encoding and decoding methods and apparatus of the present invention will now be described in detail with reference to the accompanying drawings.
[0040] In describing this invention, detailed descriptions of relevant well-known functions or structures will be omitted where it is deemed unnecessary to obscure the essence of the invention. The terms used below are defined according to their function in this invention and may vary depending on the intention or habit of the user or operator. Therefore, these terms should be defined based on the overall content of this invention.
[0041] Furthermore, in order to effectively explain the technical components constituting the embodiments of the present invention, the preferred embodiments of the present invention described below focus on the functional components that the present invention must additionally include, and where possible, system functional components that have been pre-set in each system function configuration, or system functional components that are generally included in the technical field to which the present invention pertains, are omitted.
[0042] Those skilled in the art to which this invention pertains can readily understand the functions of conventionally used components from the omitted functional configurations shown below, and can clearly understand the relationship between the omitted components and the components added for the present invention.
[0043] In this specification, the apparatus for encoding images to generate video signal bitstreams is referred to as an encoding apparatus, encoding device, or encoder, and the apparatus for decoding video signal bitstreams to restore images is referred to as a decoding apparatus, decoding device, or decoder.
[0044] A pixel, or pel, is the smallest unit that makes up an image. Pixels and samples are used interchangeably. A sample can usually represent a pixel or pixel value, but it can also represent only a pixel or pixel value in the luma component, or only a pixel or pixel value in the chroma component.
[0045] Furthermore, a unit is used to refer to the basic unit of image processing or a specific location in an image, representing an image region containing at least one of the luminance and chrominance components. Specifically, a unit can be used as a concept encompassing Coding Tree Units (CTUs), Coding Units (CUs), Prediction Units (PUs), and Transform Units (TUs). Conversely, a block represents an image region containing a specific component of the luminance and chrominance components; an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. The terms unit, block, region, signal, and area are used interchangeably.
[0046] On the other hand, "picture" refers to either a field or a frame, and these terms are used interchangeably. For example, if the image is interlaced, a frame can be divided into odd fields (or top) and even fields (or bottom), each of which can form a picture unit for encoding or decoding. Furthermore, if the image is progressive, a frame can form a picture for encoding or decoding.
[0047] Figure 1 This is a block diagram of an encoding apparatus according to an embodiment of the present invention, used to illustrate the structure and operation of a video encoder for encoding images.
[0048] like Figure 1 As shown, the video encoder 100 may include a transformation module 110, a quantization module 120, an inverse quantization module 130, an inverse transformation module 140, a filtering module 150, a prediction module 160, a DPB (Decoded Picture Buffer) 170, and an entropy coding module 180.
[0049] The transformation module 110 transforms the residual signal (i.e., the difference between the received video signal and the prediction signal generated by the prediction module 160) to obtain the transformation coefficient values.
[0050] For example, you can use Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), or Wavelet Transform.
[0051] The transform kernel used for the residual block transformation can be a transform kernel with separable vertical and horizontal transform characteristics. In this case, the residual block transformation can be performed separately as a vertical transform and a horizontal transform. For example, the encoder can perform a vertical transform by applying the transform kernel in the vertical direction of the residual block. Similarly, the encoder can perform a horizontal transform by applying the transform kernel in the horizontal direction of the residual block.
[0052] Furthermore, the term "transform kernel" can refer to a set of parameters used for transforming residual signals, such as a transform matrix, transform array, transform function, or the transform itself. It can be any of several available kernels, and transform kernels based on different transform types can be used for vertical and horizontal transforms respectively.
[0053] The transformation coefficients are distributed such that the coefficients are higher closer to the top left of the block, and closer to "0" closer to the bottom right of the block. In addition, as the size of the current block increases, a large number of coefficients with "0" may appear in the bottom right region. In order to reduce the transformation complexity of larger blocks, only a part of the top left region can be retained, and the rest of the region can be reset to "0".
[0054] Furthermore, error signals may only exist in certain regions of a coded block. In such cases, the transformation process can be performed only on these regions. For example, in a 2N×2N block, the error signal may only exist in the first 2N×N block. In this case, the transformation process will only be performed on the first 2N×N block, while the second 2N×N block may not undergo any transformation process and will not be encoded or decoded.
[0055] The encoder can perform additional transformations before quantizing the transform coefficients. The transformation method described above is called a primary transform, while the additional transformation can be called a secondary transform.
[0056] The secondary transform can be performed selectively for each residual block. For example, the encoder can perform the secondary transform on regions where it is difficult to concentrate energy in the low-frequency region through the main transform alone, in order to improve coding efficiency.
[0057] Specifically, a secondary transformation can be performed on blocks with significant residual values in directions other than the horizontal or vertical directions of the residual block. Unlike the main transformation, the secondary transformation can be performed without separating it into vertical and horizontal transformations. This secondary transformation can be called the Low Frequency Non-Separable Transform (LFNST).
[0058] The quantization module 120 quantizes the transformation coefficient values output by the transformation module 110.
[0059] To improve coding efficiency, instead of directly encoding the image signal, a method is adopted in which the prediction module 160 predicts the image using the already encoded region, and then the residual value between the original image and the predicted image is added to the predicted image to obtain the restored image.
[0060] To prevent mismatches between the encoder and decoder, the encoder must use information available to the decoder when performing predictions. To this end, the encoder can perform a reconstruction process on the current encoded block.
[0061] The inverse quantization module 130 performs inverse quantization on the transformation coefficient values, and the inverse transformation module 140 uses the inverse quantized transformation coefficient values to restore the residual values.
[0062] The filtering module 150 uses deblocking filter, sample adaptive offset (SAO), adaptive loop filter (ALF) and other filtering operations to improve the quality of the restored image and enhance coding efficiency.
[0063] Deblocking filters are used to eliminate intra-block distortion at the boundaries between blocks in the restored image. The encoder can determine whether to apply a deblocking filter to the corresponding boundary based on the pixel distribution in several columns or rows around any boundary within the block.
[0064] When applying the deblocking filter, the filtering module 150 can apply a long filter, a strong filter, or a weak filter according to the deblocking filter intensity, and can process horizontal and vertical filtering in parallel.
[0065] Sampling Adaptive Offset (SAO) can be used to correct the offset between the residual block, after applying a deblocking filter, and the original image pixel-by-pixel. To correct the offset of a specific image, the filtering module 150 can employ a method of segmenting the pixels included in the image into a certain number of regions, then determining the regions where offset correction needs to be performed, and applying the offset to these regions (Band Offset). Alternatively, the filtering module 150 can employ a method of applying the offset by considering the edge information of each pixel (Edge Offset).
[0066] An Adaptive Loop Filter (ALF) divides pixels in an image into predetermined groups, determines a filter to apply to each group, and performs differentiated filtering on each group. Information regarding whether to apply an ALF can be signaled at the coding unit level, and the shape and coefficients of the ALF filter to be applied can vary from block to block. Alternatively, the same ALF can be applied regardless of the characteristics of the target block to which it is applied.
[0067] The filtered image can be stored in the DPB 170 as a reference image.
[0068] The prediction module 160 includes an intra / IBC prediction module 161 and an inter-frame prediction module 165. The intra / IBC prediction module 161 performs intra prediction, IntraTMP prediction and IBC prediction within the current image. The inter-frame prediction module 165 performs inter-frame prediction of the current image using a reference image stored in the DPB 170.
[0069] Intra-frame / IBC prediction module 161 performs intra-frame prediction based on the restored region in the current image and transmits the intra-frame coding information to entropy coding module 180. The intra-frame coding information may include at least one of the following: intra-frame prediction mode, Most Probable Mode (MPM) flag, MPM index, and reference sample information.
[0070] Furthermore, the intra-frame / IBC prediction module 161 can perform intra-frame block copy (IBC) prediction based on the restored samples in the current image and transmit the IBC encoding information to the entropy coding module 180. At this time, the intra-frame / IBC prediction module 161 can refer to a specific region in the current image to obtain the block vector value indicating the reference region used to predict the current region, and use the obtained block vector value to perform IBC prediction.
[0071] Furthermore, the intra-frame / IBC prediction module 161 can also perform IntraTMP prediction, which involves autonomously searching for reference blocks and generating prediction information from the restored samples within the current image through a template matching process. In IntraTMP mode, although it is the same as IBC mode, using reference blocks within the same frame as the prediction information for the target block, the block vector (BV) representing the motion information of the target block is not transmitted to the decoding device. Instead, the decoding device searches for reference blocks and generates prediction information through the same template matching process as the encoding side.
[0072] The intra-frame / IBC prediction module 161 can transmit IBC encoding information, including at least one of the following: reference region size information, block vector information (index information of the block vector used to predict the current block in the motion candidate list, and block vector difference information), to the entropy coding module 160.
[0073] The inter-frame prediction module 165 refers to a specific region of the restored reference image, finds the part most similar to the current region and obtains the motion vector value representing the distance between regions, and transmits the obtained motion information of the reference region (reference direction indication information (L0 prediction, L1 prediction, bidirectional prediction), reference image index, motion vector information, etc.) to the entropy coding module 180.
[0074] In addition, the inter-frame prediction module 165 uses motion information to perform motion compensation to generate a prediction block for the current block, and transmits inter-frame coding information containing motion information of the reference region to the entropy coding module 180.
[0075] Meanwhile, the quantization transform coefficients in the form of a two-dimensional array can be rearranged into a one-dimensional array for entropy coding.
[0076] The scanning method for quantization transform coefficients can be determined based on the size of the transform block and the intra-frame prediction mode. Diagonal scanning, vertical scanning, and horizontal scanning can be used. The scanning information can be signaled block by block or derived from the decoder according to predetermined rules.
[0077] The entropy coding module 180 generates a bitstream by entropy coding information representing quantization transform coefficients, intra-frame coding information, and inter-frame coding information. For this purpose, variable length coding (VLC) and arithmetic coding methods can be used.
[0078] Variable-length coding (VLC) transforms input symbols into consecutive codewords, each of which can be of variable length. For example, frequently occurring symbols can be represented by shorter codewords, while less frequently occurring symbols can be represented by longer codewords.
[0079] Context-based Adaptive Variable Length Coding (CAVLC) can be considered a variable length coding method.
[0080] Arithmetic coding uses the probability distribution of each data symbol to convert consecutive data symbols into a decimal, thereby obtaining the optimal number of decimal places required to represent each symbol.
[0081] Context-based Adaptive Binary Arithmetic Code (CABAC) can be used as an arithmetic coding method.
[0082] CABAC is a method of binary arithmetic encoding that uses multiple context models generated based on probabilities obtained from experiments. A context model can also be called a contextual model. First, if the symbol is not in binary form, the encoder uses exp-Golomb or similar methods to binaryize each symbol. The binaryized 0s and 1s can be represented as binary bits (bins).
[0083] The initialization process of CABAC is divided into context initialization and arithmetic coding initialization. Context initialization is the process of initializing the probability of occurrence of each symbol, which is determined by the symbol type, quantization parameter (QP), and slice type (I, P, B). A context model with this initialization information can use probability values obtained experimentally.
[0084] The context model provides the probability of the occurrence of the least probable symbol (LPS) or most probable symbol (MPS) of the symbol to be encoded, as well as information on which bin value (valMPS) between 0 and 1 belongs to the MPS.
[0085] One of multiple context models is selected through a context index (ctxIdx), which can be derived from information about the current block to be encoded or adjacent blocks.
[0086] Based on the probability model selected from the context model, binary arithmetic encoding is initialized. The binary arithmetic encoding process involves dividing the probability interval by the occurrence probabilities of 0 and 1, so that the probability interval corresponding to the current bin to be processed becomes the overall probability interval of the next bin to be processed.
[0087] The program outputs the positional information within the probability interval of the last bin processed. However, since the probability interval cannot be infinitely divided, if it is reduced to a certain size, a renormalization process is performed to expand the probability interval and output the corresponding positional information. Furthermore, after processing each bin, a probability update process can be performed to reset the probability of the next bin to be processed using information from the processed bins.
[0088] The bitstream generated as described above is encapsulated into NAL (Network Abstraction Layer) units as the basic unit.
[0089] NAL units are divided into VCL (Video Coding Layer) NAL units and non-VCL NAL units. VCL NAL units contain image data, while non-VCL NAL units contain parameter information used to decode image data. VCL or non-VCL NAL units can exist in various types.
[0090] A NAL unit consists of a NAL header and an RBSP (Raw ByteSequence Payload) containing the data. The NAL header contains a summary of the RBSP. The RBSP of a VCL NAL unit contains an integer number of encoded coding tree units.
[0091] In order to decode the bitstream in the decoder, the bitstream must first be separated into NAL units, and then each NAL unit is decoded. At the same time, the information required for bitstream decoding can be transmitted in the form of a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), a Video Parameter Set (VPS), etc.
[0092] On the other hand, reference Figure 1 The structure and operation of the encoder described are based on an embodiment of the present invention, and some components may be omitted or added as needed.
[0093] Furthermore, a single image can be segmented into sub-pictures, slices, tiles, etc., and then encoded. A sub-picture can include one or more slices or tiles. When a single image is segmented into multiple slices or tiles and encoded, it can only be output to the screen after all slices or tiles within the image have been decoded.
[0094] When a single image is encoded into multiple sub-images, only any one of the sub-images can be decoded and output in the image. A slice can include multiple tiles or sub-images, and a tile can include multiple sub-images or slices.
[0095] Sub-images, slices, and tiles can be encoded or decoded independently of each other, which is beneficial for parallel processing and improves processing speed. However, since the encoding information of other adjacent sub-images, slices, or tiles cannot be utilized, it may lead to an increase in bit count.
[0096] Furthermore, sub-images, slices, and tiles can be segmented into multiple Coding Tree Units (CTUs) and encoded.
[0097] A coding tree unit can consist of a luminance coding tree block (CTB) of size 128×128 and two chrominance coding tree blocks of size 64×64.
[0098] A single coding tree unit can be formed as a coding unit (CU) without being split, or it can be like... Figure 2 The area is divided into multiple coding units. A coding unit can consist of a luminance coding block (CB) and two chrominance coding blocks.
[0099] A coding unit can consist of one transform unit (TU) or be divided into multiple transform units. A transform unit can consist of a luma transform block (TB) and two chroma transform blocks.
[0100] In this context, the coding unit represents the basic unit used to process an image during prediction, transformation, quantization, entropy coding, and decoding. The size and shape of the coding unit in a single image may not be fixed.
[0101] The shape of the coding unit can be square or non-square. Non-square coding units can include vertical coding units with a height greater than their width and horizontal coding units with a width greater than their height.
[0102] The coding tree unit can be partitioned into a quadtree (QT) structure to divide a 2N×2N node into four N×N nodes. Furthermore, quadtree partitioning can be performed recursively, and all nodes do not need to be partitioned to the same depth.
[0103] The leaf nodes of a quadtree can be further divided into multi-type tree (MTT) structures. For example, in a multi-type tree structure, a single node can be divided into a binary tree or a ternary tree structure through horizontal or vertical partitioning. Therefore, multi-type tree structures can include four partitioning structures: vertical binary partitioning, horizontal binary partitioning, vertical ternary partitioning, and horizontal ternary partitioning.
[0104] In each tree structure, the width and height of a node can both be powers of 2. For example, in a binary tree (BT) structure, a node of size 2N×2N can be divided into two nodes of size N×2N through a vertical binary partition, or it can be divided into two nodes of size 2N×N through a horizontal binary partition.
[0105] Furthermore, in a ternary tree (TT) structure, a node of size 2N×2N can be partitioned into (N / 2)×2N, N×2N, and (N / 2)×2N nodes through vertical ternary partitioning, and also into 2N×(N / 2), 2N×N, and 2N×(N / 2) nodes through horizontal ternary partitioning. This multi-type tree partitioning can be performed recursively.
[0106] Leaf nodes of multi-type trees can be used as coding units. When the coding unit is not greater than the maximum transform length, the corresponding coding unit can be used as a prediction and transform unit without further segmentation. At the same time, if the width or height of the coding unit is greater than the maximum transform length, the corresponding coding unit can be segmented into multiple transform units without explicit signaling regarding the segmentation.
[0107] For the tree segmentation structure described above, luma blocks and chroma blocks can have the same form (Single Tree), or luma blocks and chroma blocks can have different forms (Dual Tree).
[0108] Furthermore, the block partitioning from coding tree unit (CTU) to coding unit (CU) described above can be determined by selecting the partitioning structure with the minimum rate-distortion cost (RD cost) under the allowable size and depth conditions through the rate-distortion optimization (RDO) process, thus determining the final coding unit.
[0109] The following is for reference Figure 3 and Figure 4 An embodiment of the intra-frame prediction method is described in more detail.
[0110] For intra-frame prediction, signaling can be applied to intra-frame prediction mode information that indicates the direction of intra-frame prediction. The intra-frame prediction mode information indicates any one of the multiple intra-frame prediction modes that constitute the intra-frame prediction mode set.
[0111] like Figure 3 As shown, the intra-prediction mode set can include planar mode, DC mode, and 65 directional modes, and each intra-prediction mode can be indicated by the intra-prediction mode index.
[0112] For example, intra-prediction mode index "0" can indicate planar mode, intra-prediction mode index "1" can indicate DC mode, and intra-prediction mode indices "2" to "66" can indicate different directional modes respectively.
[0113] Each directional mode indicates a different angle within a preset angle range. For example, a directional mode can indicate an angle within the range of 45 degrees clockwise to -135 degrees.
[0114] At this time, intra-prediction mode index "2" can indicate the Horizontal Diagonal (HDIA) mode, intra-prediction mode index "18" can indicate the Horizontal (HOR) mode, intra-prediction mode index "34" can indicate the Diagonal (DIA) mode, intra-prediction mode index "50" can indicate the Vertical (VER) mode, and intra-prediction mode index "66" can indicate the Vertical Diagonal (VDIA) mode.
[0115] If the current block is a non-square block, you can further use 20 wideangular patterns to indicate angles greater than 45 degrees clockwise or less than -135 degrees.
[0116] Based on the above intra-prediction mode information, reference samples that will be used for intra-prediction of the current block are determined.
[0117] For example, if the intra-prediction mode index indicates a specific directional mode, then for the current sample of the current block, prediction is performed using a reference sample corresponding to the corresponding angle.
[0118] As described above, intra-frame prediction is performed using surrounding restored samples as reference samples. The reference samples can be restored samples located to the left or top of the current block.
[0119] Reference Figure 4 The reference sample point can be a sample point adjacent to the left and top boundaries of the current block.
[0120] For example, when the current block size is N×N and intra-frame prediction is performed using samples from a single reference line adjacent to the current block, reference samples can be set using (2N*2+1) surrounding samples located to the left (L, Left), top (T, Top), and top-left (TL, Top-left) of the current block.
[0121] On the other hand, intra-frame prediction of the current block can also be performed using samples from multiple reference lines (MRLs). A multiple reference line can consist of n reference lines located within a preset range of the current block. In this case, individual reference line index information can be signaled to indicate the reference line to be set as the reference pixel.
[0122] Furthermore, when at least some of the samples to be used as reference samples have not yet been restored, reference samples can be obtained through a reference sample filling process, and a reference sample filtering process can be performed to reduce intra-frame prediction errors.
[0123] Figure 5 This is a block diagram of a decoding apparatus according to an embodiment of the present invention, used to illustrate the structure and operation of a video decoder for decoding images.
[0124] like Figure 5 As shown, the video decoder 200 may include an entropy decoding module 210, an inverse quantization module 220, an inverse transform module 230, a filtering module 240, a prediction module 260, and a DPB (Decoded Picture Buffer) 270.
[0125] The entropy decoding module 210 performs entropy decoding on the bitstream to extract transform coefficient information, intra-frame coding information, inter-frame coding information, etc. for each region.
[0126] For example, the entropy decoding module 210 can obtain the binary code of the transform coefficient information of a specific region from the bit stream, and perform inverse binaryization on the binary code to obtain the quantized transform coefficients.
[0127] The inverse quantization module 220 performs inverse quantization on the quantized transform coefficients, and the inverse transform module 230 uses the inverse quantized transform coefficients to recover the residual value. After performing an inverse transform on the transform block containing the inverse quantized transform coefficients, the inverse transform module 230 can further perform a second inverse transform to obtain the residual value.
[0128] At the same time, the residual value obtained by the inverse transformation module 230 is added to the predicted value obtained by the prediction module 260 to restore the original pixel value.
[0129] The filtering module 240 performs filtering operations using deblocking filters, sampling adaptive offset, adaptive loop filters, etc., to improve the image quality of the restored image. The filtered image can be output or stored in the DPB 270 as a reference image for the next image.
[0130] The prediction module 260 includes an intra-frame / IBC prediction module 261 and an inter-frame prediction module 265, and generates a prediction image using the coding type decoded by the entropy decoding module 210, the transform coefficients of each region, and the intra-frame / inter-frame coding information.
[0131] To reconstruct the current block being decoded, the current image or a decoding region of another image containing the current block can be used. The image (or tile / slice) that performs intra-frame prediction or intra-frame BC prediction using only the current image during reconstruction is called an intra-frame image or I-image (or tile / slice). The image (or tile / slice) that can perform intra-frame prediction, inter-frame prediction, and intra-frame BC prediction is called an inter-frame image (or tile / slice).
[0132] Furthermore, when predicting the sample values of each block in an inter-frame image (or tile / slice), an image (or tile / slice) that uses at most one motion vector and reference image index is called a predictive picture or P-image (or tile / slice), while an image (or tile / slice) that uses at most two motion vectors and reference image indexes is called a bi-predictive picture or B-image (or tile / slice).
[0133] In other words, a P-image (or tile / slice) uses at most one set of motion information to predict each block, while a B-image (or tile / slice) uses at most two sets of motion information to predict each block. Each set of motion information can contain one or more motion vectors and a reference image index.
[0134] Intra-frame / IBC prediction module 261 generates prediction blocks using intra-frame coding information and restored samples in the current image. The intra-frame coding information may include at least one of intra-frame prediction mode, MPM (Most Probable Mode) flag, and MPM index.
[0135] The intra-frame / IBC prediction module 261 can use restored samples located to the left and / or top of the current block as reference samples to predict the sample values of the current block.
[0136] For example, a reference sample point can be a sample point adjacent to the left boundary and / or the top boundary of the current block, or it can be a sample point on a straight line within a preset distance from the left boundary and / or a sample point on a straight line within a preset distance from the top boundary of the current block among the sample points of the surrounding blocks of the current block. In this case, the surrounding blocks of the current block can include at least one of the following: the left (L) block, the top (A) block, the lower left (BL) block, the upper right (AR) block, or the upper left (AL) block adjacent to the current block.
[0137] Furthermore, the intra-frame / IBC prediction module 261 can reconstruct the current region by referring to a specific region within the current image that contains the reconstructed samples. To this end, the intra-frame / IBC prediction module 261 can perform IBC prediction using IBC encoding information obtained from the entropy decoding module 210, and the IBC encoding information may include block vector information.
[0138] In addition, the intra-frame / IBC prediction module 261 can also perform IntraTMP prediction, which is to autonomously search for reference blocks from the restored samples in the current image and generate prediction information through the template matching process.
[0139] Inter-frame prediction module 265 generates prediction blocks using reference images and inter-frame coding information stored in DPB 270. The inter-frame coding information may include a set of motion information (reference image index, motion vector information, etc.) of the current block relative to the reference block.
[0140] Meanwhile, inter-frame prediction can include L0 prediction, L1 prediction, and bi-prediction.
[0141] L0 prediction refers to prediction using a reference image included in the L0 image list, while L1 prediction refers to prediction using a reference image included in the L1 image list. For this, a set of motion information (e.g., motion vectors and reference image indices) may be required.
[0142] In bidirectional prediction, up to two reference regions can be used. These two reference regions can exist in the same reference image or in different reference images. Therefore, in the maximum two sets of motion information used in bidirectional prediction, the two motion vectors can correspond to the same reference image index or to different reference image indices.
[0143] At this point, the reference image is an image that is located before or after the current image in time. It can be an image that has been restored. In the bidirectional prediction method, the two reference regions can be regions selected from the L0 image list and the L1 image list, respectively.
[0144] The inter-frame prediction module 265 can use motion vectors and reference image indexes to obtain the reference block of the current block, which exists in the reference image corresponding to the reference image index.
[0145] Furthermore, the sample values of the block specified by the motion vector, or their interpolation values, can be used as a predictor for the current block. To achieve motion prediction with sub-pixel accuracy, an 8-tap interpolation filter can be used for the luminance signal, and a 4-tap interpolation filter can be used for the chrominance signal.
[0146] On the other hand, reference Figure 5 The structure and operation of the decoder described are based on an embodiment of the present invention. Some components may be omitted or added as needed. The decoder can decode the image by performing the reverse process of the encoder's encoding method described above.
[0147] Figure 6 An embodiment of an intra-prediction method in IBC (Intra Block Copy) mode is shown.
[0148] Reference Figure 6In IBC mode, prediction information for the current block, which is the target block for encoding, is obtained from a reference block that has been decoded within the same frame.
[0149] At this point, the vector information pointing from the current block (which is the target block for encoding) to the reference block is called the block vector (BV).
[0150] Although the IBC prediction method described above belongs to intra-frame prediction, it is similar to inter-frame prediction methods in deriving and transmitting motion information of the current block, which is the target block for coding.
[0151] IBC prediction methods can be divided into ibc_skip / merge mode and ibc_amvp mode. ibc_skip / merge and ibc_amvp can adopt encoding, information transmission and decoding methods similar to those used in inter-frame prediction, such as skip, merge and AMVP (Advanced Motion Vector Prediction).
[0152] In ibc_skip / merge mode, the block vector (BV) value of the current block can be exported using the merge_idx information. In ibc_amvp mode, the block vector (BV) value of the corresponding block can be exported using the mvd, mvp, and amvr values.
[0153] Figure 7 An embodiment illustrating an intra-prediction method in IntraTMP (Intra Template Matching Prediction) mode.
[0154] As described above, in IBC mode, in order to use the reference block within the same frame as the prediction information of the current block, the block vector (BV) as the motion information of the target block is derived and transmitted to the decoding device.
[0155] On the other hand, in IntraTMP mode, although it is the same as IBC mode, the reference block within the same frame is used as the prediction information of the target block. However, the block vector (BV) that serves as the motion information of the target block is not transmitted to the decoding device. Instead, the decoding device searches for the prediction information by itself through the template matching process.
[0156] Reference Figure 7It can define a template region around the target block (IntraTMP block) and search for the best matching template region that is most similar to the template region of the target block in the area of the reconstructed block in the same frame, thereby obtaining the reference block.
[0157] Furthermore, the block vector (intraTMP BV) value of the target block (IntraTMP block) can be derived based on the position of the reference block (ref. block) obtained as described above.
[0158] As described above, IntraTMP prediction, as one of the intra-frame prediction modes, can derive the block vector (BV) of the target block from the decoding device, and the block vector (BV) value can be used for intra-frame prediction in the same way as the block vector (BV) value of the IBC mode.
[0159] On the other hand, the IntraTMP method described above can also be used for the process of refining or compensating block vector (BV) values.
[0160] For example, for a block encoded in IBC mode, after finding the location of the initial reference block using the transmitted block vector (BV) value, the updated reference block can be obtained by performing template matching in a certain area around the initial reference block to more accurately compensate for the block vector (BV) value.
[0161] The following describes the prediction operation according to embodiments of the present disclosure. In particular, the following description focuses on the prediction operation within the current frame based on IBC mode or IntraTMP mode. However, the present disclosure is not limited thereto, and the intra-frame block vector generation method according to embodiments of the present disclosure can also be applied to inter-frame prediction, that is, the case of searching for motion vectors during inter-frame prediction.
[0162] Additionally, the intra-frame prediction operations based on IBC mode or IntraTMP mode described below can be performed by... Figure 1 The intra-frame / IBC prediction module 161 of the video encoder 100 shown is or Figure 5 The intra-frame / IBC prediction module 261 of the video decoder 200 shown is executed.
[0163] Figure 8 This is a flowchart illustrating a video decoding method according to an embodiment of the present disclosure. Figure 9 This is a schematic diagram illustrating a block vector generation method according to an embodiment of the present disclosure.
[0164] Reference Figure 8 The intra-frame / IBC prediction module 261 sets the initial block vector of the current block using at least one block vector derived from neighboring blocks processed before the current block (S810). For example, referring to... Figure 9 The intra-frame / IBC prediction module 261 sets the initial block vector BV0 of the current block 910 using the block vector NV derived for the peripheral block 905 processed before the current block 910 and encoded in IBC mode or IntraTMP mode. The process of deriving the block vector NV for the peripheral block 905 can be as described above. Figure 6 and Figure 7 It can be performed in IBC mode or IntraTMP mode.
[0165] Syntax information indicating whether to use the method of generating an updated block vector from an initial block vector according to embodiments of this disclosure can be transmitted in units such as sequence, GOP (Group of Pictures), frame, slice, tile, CTU, CU, etc. Hereinafter, the block vector generated by updating the initial block vector using the block vector of at least one reference block according to embodiments of this disclosure will be referred to as AR-BVP (Auto relocated block vector prediction). Without applying AR-BVP according to embodiments of this disclosure, the current block can be predicted using block vectors derived according to existing IBC or IntraTMP modes.
[0166] The intra-frame / IBC prediction module 261 obtains syntax information contained in the bitstream indicating whether AR-BVP is applied. When it is determined that AR-BVP is applied based on the syntax information, the initial block vector of the current block can be set using at least one block vector derived from the surrounding blocks processed before the current block.
[0167] The initial block vector can be set explicitly or implicitly.
[0168] For example, the intra-frame / IBC prediction module 261 can implicitly set the initial block vector by selecting one or more IBC Merge / AMVP and Intra Template Matching (IMM) Merge / AMVP candidates derived from the surrounding blocks of the current block. The surrounding blocks can be adjacent to the current block or they can be non-adjacent blocks that have been processed before the current block. Information regarding whether to use one or more block vector candidates from the IBC Merge / AMVP and IIMM Merge / AMVP candidates derived from the surrounding blocks to derive the initial block vector can be transmitted in units such as sequence, GOP, frame, slice, tile, CTU, CU, etc.
[0169] The intra / IBC prediction module 261 can set the initial block vector using one of the following methods: the first block vector candidate with index 0 among at least one block vector candidate derived for a peripheral block with IBC mode or IntraTMP mode; the first block vector candidate with index 0 among reordered block vector candidates after reordering at least one block vector candidate derived for a peripheral block based on cost; a block vector candidate generated by a weighted sum of multiple block vector candidates derived for a peripheral block; and a block vector candidate generated by a weighted sum of multiple reordered block vector candidates after reordering at least one block vector candidate derived for a peripheral block based on cost. As a cost-based function, various methods such as SAD (Sum of Absolute Difference) and SSE (Sum of Squared Error) can be used.
[0170] When sorting block vector candidates based on cost, the intra-frame / IBC prediction module 261 can arrange the block vector candidates in ascending order. That is, the block vector candidate with the lowest cost is sorted as the first block vector candidate with index 0, and as the cost increases, it can be sorted as the block vector candidate in the subsequent order.
[0171] When the initial block vector is generated by a weighted sum of multiple block vector candidates derived for the surrounding blocks, or by a weighted sum of multiple block vector candidates based on cost, the initial block vector can be implicitly set in any of the following ways.
[0172] - Apply template matching to the block vector candidates of IBC Merge / AMVP and Intra Template Matching (IMM) Merge / AMVP for surrounding blocks. In the block vector candidate group obtained by (Matching), any block vector candidate contained in the block vector candidate group can be set as the initial block vector. (In this case, the intra / IBC prediction module 261 can select any block vector candidate in the block vector candidate group and set the selected block vector candidate as the initial block vector. Then, as described later, the initial block vector is updated and the generated block vector candidate is added to the block vector candidate list. If the number of block vector candidates contained in the block vector candidate list is less than a predetermined number (e.g., 30), the intra / IBC prediction module 261 can repeat the following process: select another block vector candidate contained in the block vector candidate group and set the selected other block vector candidate as the initial block vector again. Then, update the initial block vector set as described later to generate a block vector candidate and add the generated block vector candidate to the block vector candidate list. Any block vector candidate contained in the block vector candidate group can be selected explicitly or implicitly. For example, any block vector candidate can be selected sequentially starting from index 0 (the first candidate).
[0173] - In the block vector candidate group obtained by applying template matching, for the candidate at index 0 (the first candidate) and the candidate at index 1 (the second candidate), the two candidate block vectors are merged according to a weight ratio of 1:1 or based on the weight ratio information contained in the preset table, and the value is set as the initial block vector (in this case, the table containing the ratio information can be signaled in the bit stream).
[0174] - In the block vector candidate group obtained by applying template matching to the block vector candidates of IBC Merge / AMVP and Intra Template Matching (IMM) Merge / AMVP of surrounding blocks, the weights of the candidate at index 0 (first candidate) and the candidate at index 1 (second candidate) are set according to the proportion of template matching cost, and the value after merging according to the corresponding weight ratio is set as the initial block vector.
[0175] - Select three or more block vector candidates from the block vector candidates obtained by IBC Merge / AMVP, Intra Template Matching (IMM) Merge / AMVP of the surrounding blocks, or by applying template matching. Then, set the combined weight ratio of the three or more selected block vectors as the initial block vector. (In this case, the weight ratio can be 1:1:1, or the weight ratio can be signaled separately in the bitstream, or the weight can be set using the ratio of template matching cost.)
[0176] - In the block vector candidate group of IBC Merge / AMVP, Intra Template Matching (IMM) Merge / AMVP of the surrounding blocks, or the block vector candidate group of application template matching based on cost reordering, for the candidate at index 0 (the first candidate) and the candidate at index 1 (the second candidate), the two candidate block vectors are merged according to a weight ratio of 1:1 or based on the weight ratio information contained in the preset table, and the value is set as the initial block vector (in this case, the table containing the ratio information can be signaled in the bitstream; the table can contain multiple preset ratio information, and the index information indicating one of the multiple ratio information can be used as the ratio information for signaling).
[0177] - In the block vector candidate group of IBC Merge / AMVP and Intra Template Matching (IMM) Merge / AMVP of surrounding blocks, the weights of the candidate at index 0 (first candidate) and the candidate at index 1 (second candidate) are set according to the proportion of template matching cost. The value merged according to the corresponding weight ratio is then set as the initial block vector.
[0178] - Select three or more block vector candidates from the block vector candidates of IBC Merge / AMVP, Intra Template Matching (IMM) Merge / AMVP of the surrounding blocks, or the block vector candidate group reordered based on the cost using template matching, and set the combined weight ratio of the three or more selected block vectors as the initial block vector (in this case, the weight ratio can be 1:1:1, or the weight ratio can be signaled separately in the bitstream, or the weight can be set using the ratio of the template matching cost).
[0179] Not limited to this, the intra / IBC prediction module 261 can implicitly set the initial block vector in the block vector candidates included in the cost-reordering block vector candidate group by utilizing information such as the available block vectors in the surrounding area, QP value, ratio of intra / inter blocks, size of coding blocks, aspect ratio of coding blocks, number of block vector candidates included in the block vector candidate group, block vector values in the block vector candidate group, and the number / position information of the number of block vector candidates in the surrounding blocks using intra-search techniques such as IBC and intra-template matching, without the need for separate signaling information.
[0180] For example, the intra-frame / IBC prediction module 261 can explicitly set the initial block vector by selecting one or more IBC Merge / AMVP and Intra Template Matching Merge / AMVP candidates that have been exported from the surrounding blocks of the current block.
[0181] Whether to set the initial block vector based on one or more block vector candidates, signaling can be performed in units such as sequence, GOP, frame, slice, tile, CTU, CU, etc.
[0182] When setting the initial block vector based on a block vector candidate, the intra / IBC prediction module 261 can set the block vector candidate indicated by the block vector selection information (index information) as the initial block vector from at least one block vector candidate derived for a peripheral block having IBC mode or IntraTMP mode, based on the block vector selection information contained in the bitstream.
[0183] Furthermore, when setting the initial block vector based on a block vector candidate, the intra / IBC prediction module 261 may, based on the block vector selection information contained in the bitstream, set the reordered block vector candidate indicated by the block vector selection information (index information) as the initial block vector among the reordered block vector candidates that are reordered based on cost for at least one block vector candidate derived for a peripheral block having IBC mode or IntraTMP mode.
[0184] When setting the initial block vector based on multiple block vector candidates, the intra-frame / IBC prediction module 261 can select multiple block vector candidates from at least one block vector candidate derived for a peripheral block with IBC mode or IntraTMP mode, based on block vector selection information contained in the bitstream. For the selected multiple block vectors, a weighted sum of the multiple block vector candidates is calculated using a 1:1 ratio, a template matching cost ratio, or a weight set based on a pre-defined table to set the initial block vector. When setting weights based on a table, the table information of the weight information of the block vector candidates can be included in the bitstream for signaling.
[0185] Furthermore, when setting the initial block vector based on multiple block vector candidates, the intra / IBC prediction module 261 can select multiple block vector candidates from the reordered block vector candidates derived from at least one block vector candidate for peripheral blocks with IBC mode or IntraTMP mode based on cost reordering, based on block vector selection information contained in the bitstream. For the selected multiple block vectors, the initial block vector is set by calculating a weighted sum of the multiple block vector candidates using a 1:1 ratio, template matching cost ratio, or weights set based on a pre-defined table. When weights are set based on a table, the table information of the weight information of the block vector candidates can be included in the bitstream for signaling.
[0186] Furthermore, the initial block vector is not limited to the block vectors included in the IBC merge / AMVP and Intra Template matching merge / AMVP candidates derived from the surrounding blocks of the current block as described in the foregoing embodiments. The intra / IBC prediction module 261 can also select the initial block vector from the IBC merge / AMVP and Intra Template matching merge / AMVP candidates derived for the current block. When setting the initial block vector of the current block from the IBC merge / AMVP and Intra Template matching merge / AMVP candidates derived for the current block, the initial block vector can be set from the IBC merge / AMVP and Intra Template matching merge / AMVP candidates derived for the current block in various ways, similar to the method described above. (Refer to...) Figure 8 After setting the initial block vector of the current block using the block vector derived for the current block or surrounding blocks according to the above process, the intra-frame / IBC prediction module 261 determines the first reference block within the current image pointed to by the initial block vector (S820). For example, referring to... Figure 9 The intra-frame / IBC prediction module 261 can determine the first reference block 920 in the current image pointed to by the initial block vector BV0.
[0187] The first reference block is a region within the current image that has the same size as the current block. The initial block vector can be a vector between a predetermined pixel position pointing to the first reference block and a corresponding predetermined pixel position in the current block. For example, the initial block vector can be a vector pointing from the center pixel of the current block to the center pixel of the first reference block. Therefore, the intra-frame / IBC prediction module 261 can determine the reference pixel positions in the current image pointed to by the initial block vector from each pixel position within the current block, thereby determining the first reference block.
[0188] After determining the first reference block, the intra-frame / IBC prediction module 261 determines whether the first reference block is encoded in IBC mode or IntraTMP mode (S830).
[0189] When the first reference block is encoded as a single block, the intra / IBC prediction module 261 can determine whether the first reference block is encoded in IBC mode or IntraTMP mode. For example, when all the pixels in the first reference block are contained in a single block (e.g., PU), the intra / IBC prediction module 261 can determine the prediction mode of the first reference block, thereby determining whether the first reference block is encoded in IBC mode or IntraTMP mode.
[0190] The following describes the process of determining whether the Nth (N is a natural number) reference block is encoded in IBC mode or IntraTMP mode. The method described below for determining whether a reference block is encoded in IBC mode or IntraTMP mode applies not only to the first reference block, but also to determining whether the Nth reference block pointed to by the block vector of the (N-1)th reference block is encoded in IBC mode or IntraTMP mode.
[0191] Figure 10 The reference pixel positions within a reference block are shown when generating a block vector according to an embodiment of this disclosure. Figure 11 An example of a previous block containing reference pixels within a reference block is shown when generating a block vector according to an embodiment of this disclosure.
[0192] A reference block can be encoded as different blocks, rather than a single block. That is, the pixels contained in a reference block can be contained in different blocks (e.g., PU). For example, Figure 11 The pixels within the Nth (N is a natural number) reference block 1100, shown by solid lines, are contained within different preceding blocks 1110, 1120, 1130, 1140, and 1150, shown by dashed lines. Specifically, Figure 11The following situations are shown: a portion of the Nth reference block 1100 containing the center pixel C is included in the first previous block 1110; a portion of the Nth reference block 1100 containing the top-left pixel LT is included in the second previous block 1120; a portion of the Nth reference block 1100 containing the top-right pixel RT is included in the third previous block 1130; a portion of the Nth reference block 1100 containing the bottom-left pixel LB is included in the fourth previous block 1140; and a portion of the Nth reference block 1100 containing the bottom-right pixel RB is included in the fifth previous block 1150.
[0193] In this case, when the pixels contained in the Nth reference block are contained in different blocks (e.g., PU), the intra-frame / IBC prediction module 261 can determine whether the Nth reference block is encoded in IBC mode or IntraTMP mode in any of the following ways.
[0194] - When the pixels contained in the Nth reference block are contained in different blocks, and one or more blocks in the different blocks are encoded in IBC mode or IntraTMP mode, it is determined that the Nth reference block is encoded in IBC mode or IntraTMP mode.
[0195] - When the pixels contained in the Nth reference block are contained in different blocks, and a predetermined number or a predetermined proportion of the blocks in the different blocks are encoded in IBC mode or IntraTMP mode, it is determined that the Nth reference block is encoded in IBC mode or IntraTMP mode (the predetermined number or predetermined proportion can be implicitly determined in a predetermined manner, or explicitly contained in the bit stream in units such as sequence, GOP, frame, slice, tile, CTU, CU, etc. for signaling).
[0196] - When one or more pixels in the Nth reference block are encoded in IBC mode or IntraTMP mode, it is determined that the Nth reference block is encoded in IBC mode or IntraTMP mode.
[0197] - When a predetermined number or a predetermined proportion of pixels in the Nth reference block are encoded in IBC mode or IntraTMP mode, determine whether the Nth reference block is encoded in IBC mode or IntraTMP mode (the predetermined number or predetermined proportion can be implicitly determined in a predetermined manner, or explicitly included in the bit stream as a unit of sequence, GOP, frame, slice, tile, CTU, CU, etc. for signaling).
[0198] In addition, when the reference pixel at the predetermined position is encoded in IBC mode or IntraTMP mode, the intra / IBC prediction module 261 can determine whether the Nth reference block is encoded in IBC mode or IntraTMP mode.
[0199] For example, refer to Figure 10 When at least one of the reference pixels at a predetermined position containing the center (C), top-left corner pixel (LT), top-right corner pixel (RT), bottom-left corner pixel (LB), and bottom-right corner pixel (RB) within the Nth reference block 1000 is encoded in IBC mode or IntraTMP mode, the intra-frame / IBC prediction module 261 can determine whether the Nth reference block 1000 is encoded in IBC mode or IntraTMP mode.
[0200] Refer again Figure 8 When it is determined that the first reference block is encoded in IBC mode or IntraTMP mode, the intra / IBC prediction module 261 uses the block vector of the first reference block and the initial block vector to determine the block vector candidates (S840), and determines the block vector candidate list containing the block vector candidates (S850).
[0201] When all pixels in the first reference block are contained in one block and the first reference block is encoded in IBC mode or IntraTMP mode, the intra / IBC prediction module 261 can determine the block vector derived for the first reference block as the block vector of the first reference block.
[0202] When the pixels contained in the Nth reference block are contained in different previous blocks, the intra / IBC prediction module 261 may determine the block vector of the Nth reference block for additional block vector generation in any of the following ways. The block vector determination method of the reference block described below can be applied to determining the block vector of the Nth reference block to which the block vector of the (N-1)th reference block, including the first reference block, points.
[0203] - The block vector of the previous block containing the pixel of the Nth reference block corresponding to the pixel of the current block at a predetermined position is determined as the block vector of the Nth reference block (the predetermined position can be implicitly preset, or the information of the predetermined position can be included in the bit stream for explicit signaling; there can be multiple predetermined positions).
[0204] - Determine one or more block vectors from the block vectors of the previous block that contain pixels at the center, top-left, top-right, bottom-left, and bottom-right positions of the Nth reference block corresponding to the center, top-left, top-right, bottom-left, and bottom-right positions of the current block as the block vector of the Nth reference block (e.g., referencing...). Figure 10 When there are reference pixels encoded in IBC mode or IntraTMP mode among the reference pixels at predetermined positions including the center C, the upper left corner pixel LT, the upper right corner pixel RT, the lower left corner pixel LB, and the lower right corner pixel RB within the Nth reference block 1000, the block vector of the reference pixel position encoded in IBC mode or IntraTMP mode is determined as the block vector of the Nth reference block 1000.
[0205] - According to a predetermined priority order, the block vector of the previous block containing the pixels at the center, top left, top right, bottom left, and bottom right positions of the Nth reference block corresponding to the center, top left, top right, bottom left, and bottom right positions of the current block is determined as the block vector of the Nth reference block (for example, the priority order can be center → top right → bottom right → top left → bottom left, and when the previous block containing the pixels of the Nth reference block is encoded in IBC mode or IntraTMP mode, the block vector of the previous block is determined as the block vector of the Nth reference block in sequence).
[0206] - When the pixels contained in the Nth reference block are contained in different previous blocks, the block vector of the previous blocks encoded in IBC mode or IntraTMP mode is calculated in the different previous blocks to determine the block vector of the Nth reference block (the weights can be implicitly preset or explicitly signaled through the bitstream).
[0207] - When the pixels contained in the Nth reference block are contained in different previous blocks, perform template matching on the previous blocks encoded in IBC mode or IntraTMP mode respectively, and determine the block vector of the previous block with the minimum template matching cost as the block vector of the Nth reference block.
[0208] - When the pixels contained in the Nth reference block are contained in different previous blocks, template matching is performed on the previous blocks encoded in IBC mode or IntraTMP mode respectively, and weights are set according to the proportion of template matching cost. Then, the weighted sum of the block vectors of the previous blocks encoded in IBC mode or IntraTMP mode is calculated to determine the block vector of the Nth reference block.
[0209] -Based on information such as the available block vectors of the surrounding blocks, QP value, ratio of intra / inter blocks, size of the coding block, aspect ratio of the coding block, number of candidate groups, block vector value of the candidate group, number / position of intra-frame search techniques such as IBC and intra-frame template matching in the surrounding blocks, the block vector of the Nth reference block is determined in a pre-defined implicit manner.
[0210] When the pixels contained in the Nth reference block are contained in different previous blocks encoded in IBC or IntraTMP mode, priority information regarding which previous block's block vector to use to determine the block vector of the Nth reference block is explicitly included in the bitstream and transmitted. The block vector of the Nth reference block is determined based on the priority information. (For example, the priority information can be signaled by priority index information indicating one of a plurality of priority orders contained in a pre-defined table; for example, priority index 0 may correspond to the order center → top right → bottom right → top left → bottom left, and priority index 1 may correspond to the order top right → top left → bottom right → bottom left → center, thereby determining the reference image to be inspected based on the priority index value.) The priority order of pixel positions, and the priority index information indicating the priority order of reference pixel positions to be checked, can be included in the bitstream for signaling; when the previous block containing the Nth reference block is encoded in IBC mode or IntraTMP mode according to the priority order, the block vector of the corresponding previous block is determined as the block vector of the Nth reference block in turn; not limited to this, the table can also implicitly constitute information such as the information of available block vectors in the surrounding area, QP value, ratio of intra / inter-block, size of the coded block, aspect ratio of the coded block, number of candidates in the candidate group, block vector value in the candidate group, number / position of the number of intra-search techniques such as IBC and intra-template matching in the surrounding blocks.
[0211] On the other hand, when determining the block vector of the Nth reference block, the precision unit of the block vector can be four-pixel precision (four-pel), two-pixel precision (two-pel), integer-pixel precision (integer-pel), half-pixel precision (half-pel), quarter-pixel precision (quarter-pel), octa-pixel precision (octa-pel), etc. The precision unit of the block vector can be determined explicitly or implicitly. When the precision unit of the block vector is explicitly determined, the precision unit of the block vector can be transmitted to the decoder side according to units such as sequence, GOP, frame, slice, tile, CTU, CU, etc.
[0212] When the precision unit of a block vector is implicitly determined, the block vector precision that needs to be updated may differ from the block vector precision of the starting block in each process of deriving the block vector. That is, the block vector precision unit of the Nth reference block may differ from the block vector precision unit of the (N-1)th reference block pointing to the Nth reference block or the current block.
[0213] When the aforementioned block vector precision difference occurs, the precision of the additional updated block vectors can be changed to match the precision of the starting block, using the block vector precision of the initial block as a reference. That is, the block vector precision unit of the Nth reference block can be changed based on the block vector precision unit of the (N-1)th reference block. For example, if the block vector precision of the first reference block is half a pixel (half-pel) units, and the block vector precision of the second reference block pointed to by the block vector of the first reference block is quarter-pel units, the block vector of the second reference block can be changed to match the block vector precision of the first reference block, i.e., half a pixel (half-pel) units.
[0214] Additionally, when differences in block vector precision occur, the block vector precision of the starting block can be changed to the precision requiring the additional update, using the additional updated block vector precision as a benchmark. That is, the block vector precision unit of the (N-1)th reference block can be changed based on the block vector precision unit of the Nth reference block. For example, if the block vector precision of the first reference block is half-pixel, and the block vector precision of the second reference block pointed to by the first reference block is quarter-pixel, the block vector of the first reference block can be changed to the block vector precision of the second reference block, i.e., quarter-pixel.
[0215] On the other hand, after the block vector of the reference block is determined through the above process, the block vector of the reference block can be used to update the initial block vector of the current block to determine block vector candidates.
[0216] Figure 12 The process of updating a block vector using a reference block's block vector according to an embodiment of the present disclosure is illustrated.
[0217] Reference Figure 12 Let the initial block vector of the current block B1 1210 be represented as BV0, and the block vector of the reference block B1 1220 pointed to by the initial block vector BV0 be represented as BV1. Then, the sum of the initial block vector BV0 and the block vector BV1 of the reference block B1 1220, BV0+BV1, can be used as the block vector candidate BV0' of the current block 1210. The block vector candidate BV0' can be added to the block vector candidate list of the current block, or it can be used directly to generate the prediction value of the current block.
[0218] According to embodiments of this disclosure, the process of updating a previous block vector with the block vector of a reference block to generate a block vector candidate and adding the generated block vector candidate to the block vector candidate list can be performed recursively.
[0219] Specifically, when at least one of the reference pixels at a predetermined position within the (N+1)th reference block referenced by the Nth (N is a natural number) reference block is encoded in IBC mode or IntraTMP mode, the intra-frame / IBC prediction module 261 determines the block vector pointing to the (N+2)th reference block referenced by the (N+1)th reference block, and determines whether to add the block vector candidate generated using the block vector pointing to the (N+2)th reference block to the block vector candidate list. Then, when the determination result is to add the block vector candidate generated using the block vector pointing to the (N+2)th reference block to the block vector candidate list, the block vector candidate generated using the block vector pointing to the (N+2)th reference block can be added to the block vector candidate list.
[0220] For example, refer to again Figure 9 When at least one of the reference pixels at a predetermined position within the second reference block 930, pointed to by the block vector BV1 of the first reference block 952, is encoded in IBC mode or IntraTMP mode, the intra / IBC prediction module 261 can determine the block vector BV2 of the third reference block 940 referenced by the reference pixel within the second reference block 930, and use the block vector BV2 pointing to the third reference block 940 to determine block vector candidates. That is, the intra / IBC prediction module 261 can determine the sum of the initial block vector BV0, the block vector BV1 of the first reference block, and the block vector BV2 of the second reference block, BV0+BV1+BV2, as the updated block vector candidate BV0' for the current block, and add BV0' to the block vector candidate list.
[0221] Similarly, when at least one of the reference pixels at a predetermined position within the (N+1)th reference block 960 pointed to by the block vector BVN of the Nth (N is a natural number) reference block 950 is encoded in IBC mode or IntraTMP mode, the intra / IBC prediction module 261 can determine the block vector BVN+1 of the (N+2)th reference block 970 referenced by the reference pixel within the (N+1)th reference block 960, and use the block vector BVN+1 pointing to the (N+2)th reference block 970 to determine block vector candidates. Specifically, during the process of deriving the block vector BVN+1 pointing to the (N+2)th reference block 970 from the initial block vector BV0, the intra / IBC prediction module 261 can add the accumulated value (BV0+BV1+BV2+……+BVN+1) of all derived block vector candidates to the block vector candidates.
[0222] As described above, according to embodiments of this disclosure, multiple block vector candidates can be obtained during the process of updating a previous block vector using the block vector of a reference block to generate block vector candidates and adding the generated block vector candidates to a block vector candidate list. Therefore, a reference is needed for adding multiple block vector candidates to the block vector candidate list.
[0223] According to one embodiment of this disclosure, when updating a previous block vector using the block vector of a reference block to generate a block vector candidate, and adding the generated block vector candidate to the block vector candidate list, the following method can be used.
[0224] - When adding generated block vector candidates to the block vector candidate list of IBC merge / AMVP, Intra Template matching merge / AMVP, or cost-based reordering of block vector candidates using template matching, block vector candidates can be added according to a preset number and preset position. For example, a predetermined number of block vector candidates can be added after the history-based block vector candidates included in the block vector candidate list. The predetermined number can be preset or set in units such as sequence, GOP, frame, slice, tile, CTU, CU, etc.
[0225] - When a reference block is divided into multiple blocks for encoding, block vector candidates obtained by updating the block vectors of blocks encoded in IBC mode or IntraTMP mode from among the multiple blocks can be added to the block vector candidate list. For example, Figure 11As shown, when a portion of the Nth reference block 1100 containing the center pixel C is included in the first previous block 1110, a portion of the Nth reference block 1100 containing the top-left pixel LT is included in the second previous block 1120, a portion of the Nth reference block 1100 containing the top-right pixel RT is included in the third previous block 1130; a portion of the Nth reference block 1100 containing the bottom-left pixel LB is included in the fourth previous block 1140, and a portion of the Nth reference block 1100 containing the bottom-right pixel RB is included in the fifth previous block 1150, the block vector of the current block can be updated using the block vectors of the blocks encoded in IBC mode or IntraTMP mode in the first to fifth previous blocks 1110 to 1150 to determine block vector candidates, and the updated block vector candidates are added to the block vector candidate list. Furthermore, within a pre-set range of block vector candidate numbers, the updated block vector candidates can be added to the block vector candidate list in priority order. For example, within the pixels of a reference block, the previous block containing the reference pixel at the predetermined position can be checked in the order of center pixel → top-right pixel → bottom-right pixel → top-left pixel → bottom-left pixel to determine whether it is encoded in IBC mode or IntraTMP mode. The block vector of the current block is then updated using the block vector of the block encoded in IBC mode or IntraTMP mode to identify block vector candidates, and the updated block vector candidates are added to the block vector candidate list. If a block vector candidate identical to the updated block vector candidate is already included in the block vector candidate list, the updated block vector candidate will not be added to the block vector candidate list. The preset number of block vector candidates can be arbitrarily set. For example, the total number of block vector candidates included in the block vector candidate list can be set to a maximum of 30.
[0226] - Within a pre-defined range of block vector candidates, when the previous block containing a reference pixel at a specific location of the reference block is encoded in IBC or IntraTMP mode, the block vector of the current block can be updated using the block vector of the previous block at that specific location to determine block vector candidates, and the updated block vector candidates can be added to the block vector candidate list. For example, when the previous block containing the center pixel C of the reference block is encoded in IBC or IntraTMP mode, the block vector of the current block can be updated using the block vector of the previous block containing the center pixel C to determine block vector candidates, and the updated block vector candidates can be added to the block vector candidate list.
[0227] - When generating multiple block vector candidates, all exported block vector candidates can be added to the block vector candidate list within a pre-defined range of block vector candidate numbers. For example, refer to... Figure 9Suppose that the block vector BV1 of the first reference block and the block vector BV2 of the second reference block are determined through the above block vector candidate determination process. In this case, the sum of the initial block vector BV0 and the block vector BV1 of the first reference block (BV0+BV1), and the sum of the initial block vector BV0, the block vector BV1 of the first reference block, and the block vector BV2 of the second reference block (BV0+BV1+BV2) can both be added to the block vector candidate list. That is, if it is within the pre-set range of the number of block vector candidates, both BV0+BV1 and BV0+BV1+BV2 can be added to the block vector candidate list.
[0228] - When multiple block vector candidates are generated, only the final block vector candidate can be added to the block vector candidate list. When at least one of the reference pixels at a predetermined position within the (M+1)th reference block referenced by the Mth reference block (M is an integer greater than 2) after the first reference block is encoded in IBC mode or IntraTMP mode, after repeatedly executing the process of determining the block vector pointing to the (M+2)th reference block referenced by the reference pixel within the (M+1)th reference block, and determining the final Kth reference block (K is an integer greater than 2) that satisfies the predetermined termination condition, the block vector of the (K-1)th reference block pointing to the final Kth reference block can be determined as the final block vector candidate, and only the final block vector candidate is added to the block vector candidate list. The predetermined termination condition is the condition used to terminate the reference block block vector tracking process. For example, when there is no reference pixel encoded in IBC mode or IntraTMP mode among the reference pixels at a predetermined position within the Kth reference block, or when the number of block vector candidates contained in the block vector candidate list has reached a predetermined number, or when the reference region referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the (K+1)th reference block referenced by the Kth reference block exceeds the search region of IBC mode or IntraTMP mode, or exceeds one of the CTU, slice, tile, or frame boundary, the Kth reference block can be determined as the final Kth reference block satisfying the predetermined termination conditions. For example, referring to... Figure 9 Suppose that the block vector BV1 of the first reference block and the block vector BV2 of the second reference block are determined through the above block vector candidate determination process, and the third reference block is the final reference block that satisfies the predetermined termination condition. In this case, the sum of the initial block vector BV0, the block vector BV1 of the first reference block, and the block vector BV2 of the second reference block, BV0+BV1+BV2, can be determined as the updated block vector candidate BV0' of the current block, and only BV0' is added to the block vector candidate list.
[0229] - When generating multiple block vector candidates, within a pre-defined range of block vector candidate numbers, the best block vector candidate based solely on cost can be added to the block vector candidate list from all exported block vector candidates. For example, refer to... Figure 9Suppose that the block vector BV1 of the first reference block and the block vector BV2 of the second reference block are determined through the above block vector candidate determination process. In this case, among the sum of the initial block vector BV0 and the block vector BV1 of the first reference block (BV0+BV1), and the sum of the initial block vector BV0, the block vector BV1 of the first reference block, and the block vector BV2 of the second reference block (BV0+BV1+BV2), only the block vector candidate with the lowest cost can be added to the block vector candidate list. That is, among BV0+BV1 and BV0+BV1+BV2, the block vector candidate with the lower cost can be added to the block vector candidate list.
[0230] On the other hand, if the same block vector candidate already exists in the block vector candidate list among the generated block vector candidates, the generated block vector candidate may not be added to the block vector candidate list.
[0231] According to embodiments of this disclosure, the process of determining multiple reference blocks, updating the block vector of the current block using the block vectors of the determined reference blocks, and adding the updated block vector of the current block to a block vector candidate list can be continuously executed until a predetermined termination condition is met. For example, the predetermined termination condition may be one of the following.
[0232] - When the number of block vector candidates in the block vector candidate list reaches a predetermined number.
[0233] - When there is no previous block encoded in IBC mode or IntraTMP mode in the reference block.
[0234] - When there is no reference pixel encoded in IBC mode or IntraTMP mode in the reference pixel at the predetermined position of the reference block.
[0235] - For the current block, if the reference region pointed to by the generated block vector candidate exceeds the search region of IBC mode or IntraTMP mode, or exceeds one of the CTU (coding tree unit), slice, tile, or frame boundary (e.g., in... Figure 9 In the process of using the block vector candidate of the sum of the initial block vector BV0, the block vector BV1 of the first reference block, and the block vector BV2 of the second reference block (BV0+BV1+BV2) as the block vector of the current block 910, if the area referenced by the current block 910 exceeds the frame boundary due to BV0+BV1+BV2, then the block vector BV2 of the second reference block is not used to generate the block vector candidate; when using the block vector candidate of the sum of the initial block vector BV0 and the block vector BV1 of the first reference block (BV0+BV1) as the block vector of the current block 910, if the area referenced by the current block 910 does not exceed the frame boundary due to BV0+BV1, then BV0+BV1 is determined as a valid block vector candidate.
[0236] Refer again Figure 8 The intra-frame / IBC prediction module 261 can obtain the prediction value of the current block using a block vector selected from the block vector candidates included in the block vector candidate list (S860). Which block vector candidate to select from the block vector candidates included in the block vector candidate list can be determined explicitly or implicitly. For example, the block vector candidates included in the block vector candidate list can be reordered based on cost, and the block vector candidate with the lowest cost can be determined as the block vector of the current block; alternatively, information indicating the block vector of the current block among the block vector candidates included in the block vector candidate list can be included in the bitstream.
[0237] Figure 13 This is a flowchart illustrating a video decoding method according to another embodiment of the present disclosure.
[0238] The video decoding method according to another embodiment of this disclosure is similar to the one described above. Figure 8 Compared to a video decoding method in one embodiment, the process of separately constructing a candidate list of block vectors is omitted, and the block vector generation process is the same as... Figure 8 The block vector generation process is the same in one embodiment. Figure 13 Steps S1310 to S1330 and Figure 8 Steps S810 to S830 are the same, so their specific descriptions are omitted.
[0239] That is, in the video decoding method according to another embodiment of the present disclosure, the current block vector updated during the block vector generation process is not included in a separate block vector candidate list, but the updated current block vector is determined as the final current block vector, and the predicted value of the current block is directly obtained using the current block vector.
[0240] When it is determined that the first reference block is encoded in IBC mode or IntraTMP mode, the intra-frame / IBC prediction module 261 uses the block vector of the first reference block and the initial block vector to update the initial block vector, thereby determining the block vector of the current block (S1340), and obtaining the reference block in the current image pointed to by the determined current block block vector as the prediction value of the current block (S1350).
[0241] For example, refer to Figure 9 When the sum of the initial block vector BV0, the block vector of the first reference block BV1, and the block vector of the second reference block BV2, which is the block vector BV0+BV1+BV2, is determined as the final block vector of the current block 910, the intra-frame / IBC prediction module 261 can use the position of the current block as a reference to determine the reference block pointed to by the block vector BV0+BV1+BV2 as the prediction value of the current block.
[0242] Not limited to this, the intra-frame / IBC prediction module 261 can also export the block vector candidates added to the block vector candidate list according to the aforementioned embodiments, and directly determine the block vector candidate as the final current block vector to obtain the prediction value of the current block, without having to add the block vector candidate to the block vector candidate list separately.
[0243] Figure 14 This is a flowchart illustrating a video encoding method according to an embodiment of the present disclosure. The video encoding method according to an embodiment of the present disclosure is similar to the one described above. Figure 8 The video decoding method similarly constructs a block vector candidate list and determines the block vector of the current block from the block vector candidates included in the block vector candidate list, while including information about the block vector candidates used to determine the block vector of the current block in the bitstream. In a video coding method according to an embodiment of the present disclosure, Figure 14 Steps S1410 to S1450 can be combined with Figure 8 Steps S810 to S850 are performed in the same manner.
[0244] Reference Figure 14 The intra-frame / IBC prediction module 161 sets the initial block vector of the current block using at least one block vector derived from neighboring blocks processed before the current block (S1410). For example, referring to... Figure 9 The intra-frame / IBC prediction module 161 uses the block vector NV derived for the peripheral block 905 processed before the current block 910 and encoded in IBC mode or IntraTMP mode to set the initial block vector BV0 of the current block 910.
[0245] After setting the initial block vector of the current block using the block vector derived from the surrounding blocks, the intra / IBC prediction module 161 determines the first reference block within the current image pointed to by the initial block vector (S1420). For example, referring to... Figure 9 The intra-frame / IBC prediction module 161 can determine the first reference block 920 in the current image pointed to by the initial block vector BV0.
[0246] After determining the first reference block, the intra-frame / IBC prediction module 161 determines whether the first reference block is encoded in IBC mode or IntraTMP mode (S1430).
[0247] When it is determined that the first reference block is encoded in IBC mode or IntraTMP mode, the intra / IBC prediction module 161 uses the block vector of the first reference block and the initial block vector to determine the block vector candidates (S1440), and determines the block vector candidate list containing the block vector candidates (S1450).
[0248] The intra-frame / IBC prediction module 161 can obtain the prediction value of the current block by using the block vector selected from the block vector candidates included in the block vector candidate list, select the block vector candidate with the lowest cost based on the cost, and add the index information indicating the selected block vector candidate to the bit stream (S1460).
[0249] The methods described above in this specification can be executed by the processor of a video encoder or video decoder. Furthermore, the encoder can generate a bitstream decoded according to the video signal processing method, and the bitstream generated by the encoder can be stored in a computer-readable, non-transitory storage medium (recording medium).
[0250] The embodiments of the present invention described above can be implemented in various ways. For example, the embodiments of the present invention can be implemented using hardware, firmware, software, or a combination thereof.
[0251] Some embodiments may also be implemented in the form of a recording medium containing computer-executable instructions (e.g., a program module executed by a computer). A computer-readable medium can be any available medium accessible to a computer, including volatile and non-volatile media, removable media, and non-removable media.
[0252] Furthermore, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile media, removable and non-removable media, implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Communication media includes, but is not limited to, computer-readable instructions, data structures or program modules, and other data or other transmission mechanisms that modulate data signals, and includes any information transmission medium.
Claims
1. A video decoding method, characterized in that, Includes the following steps: The initial block vector of the current block is set using at least one block vector derived from the surrounding blocks processed before the current block; Determine the first reference block pointed to by the initial block vector within the current image; Determine whether the first reference block is encoded in intra-block copy mode or intra-template matching prediction mode; When the first reference block is encoded in the intra-block copy mode or the intra-template matching prediction mode, block vector candidates are determined using the block vector of the first reference block and the initial block vector. Determine a block vector candidate list that includes the block vector candidates; as well as The predicted value of the current block is obtained by using the block vector selected from the block vector candidates included in the block vector candidate list.
2. The video decoding method according to claim 1, characterized in that, The initial block vector of the current block is set using one of the following methods: The first block vector candidate with index 0 among at least one block vector candidate derived for a peripheral block having an intra-block copy mode or an intra-template matching prediction mode; the first block vector candidate with index 0 among reordered block vector candidates that are reordered based on cost for at least one block vector candidate derived for the peripheral block; and a block vector candidate generated by a weighted sum of multiple block vector candidates derived for the peripheral block. And a block vector candidate generated by a weighted sum of multiple reordered block vector candidates after reordering at least one block vector candidate derived for the surrounding block based on cost.
3. The video decoding method according to claim 1, characterized in that, Based on the block vector selection information contained in the bitstream, among the reordered block vector candidates derived from at least one block vector candidate with an intra-block copy mode or an intra-template matching prediction mode, the reordered block vector candidate indicated by the block vector selection information is determined as the initial block vector of the current block.
4. The video decoding method according to claim 1, characterized in that, The steps for determining whether the first reference block is encoded in intra-block copy mode or intra-template matching prediction mode are as follows: When at least one of the reference pixels in the first reference block at a predetermined position including the center, top left corner, top right corner, bottom left corner, and bottom right corner is encoded in the intra-block copy mode or the intra-template matching prediction mode, it is determined that the first reference block is encoded in the intra-block copy mode or the intra-template matching prediction mode.
5. The video decoding method according to claim 4, characterized in that, The block vector of the first reference block is determined to be the block vector of a second reference block within the current image that is referenced by a previous block containing reference pixels encoded in the intra-block copy mode or the intra-template matching prediction mode.
6. The video decoding method according to claim 1, characterized in that, It also includes the following steps: When at least one of the reference pixels at a predetermined position in the (N+1)th reference block referenced by the Nth reference block is encoded in the intra-block copy mode or the intra-template matching prediction mode, a block vector pointing to the (N+2)th reference block referenced by the reference pixel in the (N+1)th reference block is determined, where N is a natural number. Determine whether to add the block vector candidate generated using the block vector pointing to the N+2th reference block to the block vector candidate list; as well as When it is determined, based on the determination result, that a block vector candidate generated using the block vector pointing to the (N+2)th reference block will be added to the block vector candidate list, the block vector candidate generated using the block vector pointing to the (N+2)th reference block will be added to the block vector candidate list.
7. The video decoding method according to claim 6, characterized in that, The step of determining whether to add the block vector candidate generated using the block vector pointing to the (N+2)th reference block to the block vector candidate list is as follows: When the number of block vector candidates in the block vector candidate list is less than a predetermined number, it is determined that the block vector candidate generated using the block vector pointing to the (N+2)th reference block will be added to the block vector candidate list.
8. The video decoding method according to claim 6, characterized in that, The step of determining whether to add the block vector candidate generated using the block vector pointing to the (N+2)th reference block to the block vector candidate list is as follows: When the number of block vector candidates in the block vector candidate list has reached the predetermined number, or when the reference region referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the N+2th reference block exceeds the search region of the intra-block copy mode or the intra-template matching prediction mode, or exceeds any one of the coding tree unit, slice, tile, or frame boundary, it is determined that the block vector candidate generated using the block vector pointing to the N+2th reference block will not be added to the block vector candidate list.
9. The video decoding method according to claim 1, characterized in that, The steps for determining block vector candidates using the block vector of the first reference block and the initial block vector are as follows: When at least one of the reference pixels at a predetermined position in the (M+1)th reference block referenced by the Mth reference block following the first reference block is encoded in the intra-block copy mode or the intra-template matching prediction mode, the process of repeatedly executing the process of determining the block vector pointing to the (M+2)th reference block referenced by the reference pixel in the (M+1)th reference block is used to determine the final Kth reference block that satisfies the predetermined termination condition, and the block vector pointing to the (K-1)th reference block of the final Kth reference block is determined as the final block vector candidate, and only the final block vector candidate is added to the block vector candidate list, where M is an integer greater than or equal to 2, and K is an integer greater than or equal to 2.
10. The video decoding method according to claim 9, characterized in that, When there is no reference pixel encoded in the intra-block copy mode or intra-template matching prediction mode among the reference pixels at a predetermined position within the Kth reference block, or when the number of block vector candidates contained in the block vector candidate list has reached the predetermined number set in advance, or when the reference region referenced by the current block pointed to by the block vector candidate generated using the block vector pointing to the K+1th reference block referenced by the Kth reference block exceeds the search region of the intra-block copy mode or intra-template matching prediction mode, or exceeds any one of the coding tree unit, slice, tile, or frame boundary, it is determined as the final Kth reference block that satisfies the predetermined termination condition.
11. The video decoding method according to claim 1, characterized in that, The step of obtaining the predicted value of the current block using a block vector selected from the block vector candidates included in the block vector candidate list further includes the following steps: The block vector candidates included in the block vector candidate list are reordered based on cost, and index information indicating one of the cost-reordered block vector candidates is obtained from the bit stream. The block vector of the current block is determined based on the index information.
12. The video decoding method according to claim 1, characterized in that, The steps for determining block vector candidates using the block vector of the first reference block and the initial block vector are as follows: The initial block vector is added to the block vector of the first reference block to determine the block vector candidate.
13. A video decoding apparatus for performing the method of any one of claims 1 to 12.
14. A computer-readable recording medium having a program for performing the method of any one of claims 1 to 12 on a computer.
15. A video encoding method, characterized in that, Includes the following steps: The initial block vector of the current block is set using at least one block vector derived from the surrounding blocks processed before the current block; Determine the first reference block pointed to by the initial block vector within the current image; Determine whether the first reference block is encoded in intra-block copy mode or intra-template matching prediction mode; When the first reference block is encoded in the intra-block copy mode or the intra-template matching prediction mode, block vector candidates are determined using the block vector of the first reference block and the initial block vector. Determine a block vector candidate list that includes the block vector candidates; Using a block vector selected from the block vector candidates included in the block vector candidate list, the predicted value of the current block is obtained, and the final block vector candidate is determined from the block vector candidates based on the cost; as well as The index information indicating the final block vector candidate is added to the bitstream.
16. A video encoding apparatus for performing the method of claim 15.
17. A computer-readable recording medium having a program for performing the method of claim 15 on a computer.
