Video decoding method, video encoding method, codec, device and medium
By using reconstruction information and original prediction information of adjacent areas of the target block in the video decoding and encoding method, the target prediction information of the target block is determined, and the problem of spatial discontinuity between the image block and surrounding pixels in the intra-block copy prediction mode is solved, and the image quality and encoding and decoding performance are improved.
Patent Information
- Application Number
- CN202311702301.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-10
- Publication Date
- 2025-06-10
AI Technical Summary
In the prior art, the intra-block copy (IBC) prediction mode has airspace discontinuity between the image block and the surrounding pixels, affecting image quality and encoding and decoding performance.
By applying a method in the decoder and the encoder, the target prediction information of the target block is determined using reconstruction information of adjacent regions of the target block and the original prediction information of the target block, thereby reducing the spatial discontinuity between the image block and the surrounding pixels.
This method effectively reduces the spatial discontinuity between the image block and the surrounding pixels, improves image quality, and improves encoding and decoding performance.
Smart Images

Figure CN120128718A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of video coding and decoding technologies, and in particular, to a video decoding method, a video encoding method, a decoder, an encoder, an electronic device, and a computer-readable storage medium. Background Art
[0002] Currently, mainstream video coding standards, such as High Efficiency Video Coding (HEVC), Versatile Video Coding (VVC), and Audio Video Coding Standard (AVS) 3, all adopt a hybrid coding framework based on image blocks. They divide an original frame of image into a series of image blocks, and combine video coding methods such as prediction, transformation, and entropy coding to achieve compression of video data. Among them, motion compensation is a commonly used prediction method in video coding and decoding. Motion compensation is based on the redundancy characteristics of video content in the time domain or spatial domain, and determines the predicted value of the current block to be coded according to the reference block. Such prediction methods based on motion compensation include: inter-frame prediction, Intra Block Copy (IBC), intra-frame string copy, etc.
[0003] IBC is an intra-frame coding tool adopted in the Screen Content Coding (SCC) extension of HEVC. In the related art, there is a problem of poor spatial continuity between the IBC reconstructed image block and the surrounding pixels, which affects the image quality and is not conducive to improving the coding and decoding performance. Summary of the Invention
[0004] The present application provides a video decoding method, a video encoding method, a decoder, an encoder, and a computer-readable storage medium, which at least to some extent reduce the spatial discontinuity between the predicted block and the surrounding pixels, and are conducive to improving the image quality and the coding and decoding performance.
[0005] In a first aspect, the present application provides a video decoding method, which is applied to a decoder. The method includes: parsing a code stream to determine a target block, where the prediction mode of the target block is Intra Block Copy (IBC) prediction; determining target prediction information of the target block according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block; and determining the reconstruction information of the target block according to the target prediction information.
[0006] Second aspect, the present application provides a video encoding method, which is applied to an encoder. The method includes: determining a target block, where the prediction mode of the target block is intra block copy (IBC) prediction; determining target prediction information of the target block according to the reconstruction information of the adjacent area of the target block and the original prediction information of the target block; and determining the reconstruction information of the target block according to the target prediction information.
[0007] Third aspect, the present application provides a decoder, which includes: a first determination module, a second determination module, and a third determination module;
[0008] Among them, the above-mentioned first determination module is used to parse the bitstream to determine a target block, where the prediction mode of the target block is intra block copy (IBC) prediction; the above-mentioned second determination module is used to determine the target prediction information of the target block according to the reconstruction information of the adjacent area of the target block and the original prediction information of the target block; and the above-mentioned third determination module is used to determine the reconstruction information of the target block according to the target prediction information.
[0009] Fourth aspect, the present application provides an encoder, which includes: a first determination module, a second determination module, and a third determination module;
[0010] Among them, the above-mentioned first determination module is used to: determine a target block, where the prediction mode of the target block is intra block copy (IBC) prediction; the above-mentioned second determination module is used to: determine the target prediction information of the target block according to the reconstruction information of the adjacent area of the target block and the original prediction information of the target block; the above-mentioned third determination module is used to: determine the reconstruction information of the target block according to the target prediction information.
[0011] Fifth aspect, there is provided an electronic device, including a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the methods in the first aspect or the second aspect and their respective implementation manners above.
[0012] Sixth aspect, there is provided a chip for implementing the methods in any one of the first aspects or their respective implementation manners above. Specifically, the chip includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes the methods in the first aspect or the second aspect and their respective implementation manners above.
[0013] Seventh aspect, there is provided a computer-readable storage medium for storing a computer program, and the computer program enables a computer to execute the methods in the first aspect or the second aspect and their respective implementation manners above.
[0014] In an eighth aspect, there is provided a computer program product including computer program instructions that cause a computer to execute the methods in the first aspect or the second aspect and their respective implementations as described above.
[0015] In a ninth aspect, there is provided a computer program that, when running on a computer, causes the computer to execute the methods in the first aspect or the second aspect and their respective implementations as described above.
[0016] In summary, for a target block with an intra block copy (IBC) prediction mode, if a reconstructed block is obtained based on the original prediction information of the target block, there may be discontinuous boundaries in the reconstructed block, and thus there may be poor spatial continuity between the block and its surrounding pixels. In the embodiments of the present application, the target prediction information of the target block is jointly determined according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block. Since the reconstruction information of the surrounding region of the block is added to the target prediction information, it is beneficial for a smooth transition between the target block and its surrounding region, thereby facilitating a reduction in the spatial continuity between the target block and its surrounding region, further improving the image quality, and being beneficial for improving the encoding and decoding performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following described drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0018] Figure 1 It is a structural example diagram of a video encoder to which the embodiments of the present application can be applied;
[0019] Figure 2 It is a structural example diagram of a video decoder to which the embodiments of the present application can be applied;
[0020] Figure 3 It is an example diagram of an IBC prediction mode to which the embodiments of the present application can be applied;
[0021] Figure 4 It is a schematic diagram of the slice-level syntax structure in the bitstream applicable to the embodiments of the present application;
[0022] Figure 5 It is a schematic flowchart of the video decoding method provided by the embodiments of the present application;
[0023] Figure 6 It is a schematic flowchart of the method for determining a target block provided by an embodiment of the present application;
[0024] Figure 7Schematic flowchart of the method for determining a target block provided in another embodiment of the present application;
[0025] Figure 8 Schematic flowchart of the method for determining a target block provided in yet another embodiment of the present application;
[0026] Figure 9 Schematic flowchart of the method for determining a target block provided in another embodiment of the present application;
[0027] Figure 10 Schematic flowchart of the method for determining a target block provided in yet another embodiment of the present application;
[0028] Figure 11 Schematic flowchart of the method for determining target prediction information provided in an embodiment of the present application;
[0029] Figure 12 Schematic diagram of the structure of a target block and its adjacent regions provided in an embodiment of the present application;
[0030] Figure 13 Schematic flowchart of the method for determining target prediction information provided in another embodiment of the present application;
[0031] Figure 14 Schematic flowchart of the video encoding method provided in an embodiment of the present application;
[0032] Figure 15 Schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0033] Figure 16 Schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0034] Figure 17 Schematic diagram of the structure of an encoding and decoding system provided in an embodiment of the present application;
[0035] Figure 18 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Detailed implementation manners
[0036] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0037] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In the embodiments of this application, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices. In the description of this application, unless otherwise specified, "a plurality of" means two or more than two.
[0038] In the embodiments of this application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of that module or unit.
[0039] Figure 1 FIG. is a structural example diagram of a video encoder 100 to which the embodiments of this application can be applied. The video encoder 100 can be used for lossy compression of images, and can also be used for lossless compression of images. The lossless compression can be visually lossless compression or mathematically lossless compression.
[0040] Video encoder 100 can be applied to image data in the luminance-chrominance (YCbCr, YUV) format. For example, the YUV ratio can be 4:2:0, 4:2:2, or 4:4:4. Y represents luminance, Cb (U) represents blue chrominance, Cr (V) represents red chrominance, and U and V represent chrominance used to describe color and saturation. For example, in terms of color format, 4:2:0 means there are 4 luminance components and 2 chrominance components for every 4 pixels (YYYYCbCr), 4:2:2 means there are 4 luminance components and 4 chrominance components for every 4 pixels (YYYYCbCrCbCr), and 4:4:4 means full pixel display (YYYYCbCrCbCrCbCrCbCr).
[0041] For example, the video encoder 100 reads video data. For each image in the video data, an image is divided into several coding tree units (CTUs). In some examples, a CTU can be referred to as a "tree block", "Largest Coding Unit" (LCU), or "coding tree block" (CTB). Each CTU can be associated with a pixel block of equal size within the image. Each pixel can correspond to one luminance sample and two chrominance samples. Therefore, each CTU can be associated with a luminance sample block and two chrominance sample blocks. The size of a CTU is, for example, 128×128, 64×64, 32×32, etc. A CTU can be further divided into several coding units (CUs) for encoding. A CU can be a rectangular block or a square block. A CU can correspond to a prediction unit (PU) and a transform unit (TU).
[0042] Reference Figure 1 , the video encoder 100 may include: a prediction module 110, a residual module 120, a transform / quantization module 130, an inverse transform / quantization module 140, a reconstruction module 150, a loop filter module 160, a decoded image buffer 170, and an entropy encoding module 180. It should be noted that the video encoder 100 may include more, fewer, or different functional components.
[0043] Optionally, in the present application, the current block may be referred to as the current coding unit (CU). The prediction block may also be referred to as the prediction image block or the image prediction block, and the reconstructed image block may also be referred to as the reconstruction block or the image reconstruction block. Due to the need for parallel processing, an image may be divided into slices. Slices in the same image can be processed in parallel, that is, there is no data dependency between them. And "frame" is a common term, and generally, a frame can be understood as an image. The frame described in this article can also be replaced by an image or a slice, etc.
[0044] In some embodiments, the prediction module 110 includes an inter-frame prediction module 111 and an intra-frame prediction module 112. Since there is a strong correlation between adjacent pixels in an image of a video, the intra-frame prediction method is used in video coding and decoding technologies to eliminate the spatial redundancy between adjacent pixels. Since there is a strong similarity between adjacent images in a video, the inter-frame prediction method is used in video coding and decoding technologies to eliminate the temporal redundancy between adjacent images, thereby improving the coding efficiency.
[0045] The inter-frame prediction module 111 can be used for inter-frame prediction. Inter-frame prediction may include motion estimation and motion compensation. It can refer to the image information of different images. Inter-frame prediction uses motion information to find a reference block from a reference image and generates a prediction block according to the reference block to eliminate temporal redundancy. Inter-frame prediction uses motion information to find a reference block from a reference image and generates a prediction block according to the reference block. The motion information includes the reference image list where the reference image is located, the reference image index, and the motion vector. The motion vector can be an integer pixel or a fractional pixel. If the motion vector is a fractional pixel, then an interpolation filter needs to be used in the reference image to create the required fractional pixel block. Here, the integer pixel or fractional pixel block found in the reference image according to the motion vector is called the reference block. Some technologies directly use the reference block as the prediction block, and some technologies further process the reference block to generate the prediction block. Further processing the reference block to generate the prediction block can also be understood as using the reference block as the prediction block and then processing the prediction block to generate a new prediction block.
[0046] The intra-frame prediction module 112 only refers to the information of the same image and predicts the pixel information within the current coded image block to eliminate spatial redundancy.
[0047] There are multiple prediction modes for intra-frame prediction. Taking the international digital video coding standard H series as an example, the H.264 / AVC standard has 8 angular prediction modes and 1 non-angular prediction mode, and H.265 / HEVC is extended to 33 angular prediction modes and 2 non-angular prediction modes. The intra-frame prediction modes used in HEVC include Planar mode, DC mode, and 33 angular modes, a total of 35 prediction modes. The intra-frame modes used in versatile video coding (VVC) include Planar, DC, and 65 angular modes, a total of 67 prediction modes.
[0048] It should be noted that with the increase in the angular mode, the intra-frame prediction will be more accurate and more in line with the requirements for the development of high-definition and ultra-high-definition digital videos.
[0049] The residual module 120 can generate the residual block of the CU based on the pixel block of the CU and the prediction block of the CU. For example, the residual module 120 can generate the residual block of the CU such that each sample in the residual block has a value equal to the difference between the sample in the pixel block of the CU and the corresponding sample in the prediction block of the CU.
[0050] The transform / quantization module 130 can quantize the transform coefficients. The transform / quantization module 130 can quantize the transform coefficients associated with the CU based on the quantization parameter (QP) value associated with the CU. The video encoder 100 can adjust the quantization degree applied to the transform coefficients associated with the CU by adjusting the QP value associated with the CU.
[0051] The inverse transform / quantization module 140 can apply inverse quantization and inverse transform to the quantized transform coefficients respectively to reconstruct the residual block from the quantized transform coefficients.
[0052] The reconstruction module 150 can add the samples of the reconstructed residual block to the corresponding samples of one or more prediction blocks generated by the prediction module 110 to generate the reconstructed image block associated with the CU. By reconstructing each sampling block of the CU in this way, the video encoder 100 can reconstruct the pixel block of the CU.
[0053] The loop filter module 160 is used to process the pixels after inverse transform and inverse quantization, compensate for the distorted information, and provide a better reference for subsequent encoding pixels. For example, it can perform deblocking filter operations to reduce the blocking effect of the pixel block associated with the CU.
[0054] In some embodiments, the loop filter module 160 includes a deblocking filter module and a sample adaptive offset / Adaptive Loop Filter (SAO / ALF) module, where the deblocking filter module is used to remove the blocking effect and the SAO / ALF module is used to remove the ringing effect.
[0055] The decoded image buffer 170 can store the reconstructed pixel blocks. The inter prediction module 111 can use the reference images containing the reconstructed pixel blocks to perform inter prediction on the PUs of other images. Additionally, the intra prediction module 112 can use the reconstructed pixel blocks in the decoded image buffer 170 to perform intra prediction on other PUs in the same image as the CU.
[0056] The entropy encoding module 180 can receive the quantized transform coefficients from the transform / quantization module 130. The entropy encoding module 180 can perform one or more entropy encoding operations on the quantized transform coefficients to generate the entropy encoded data.
[0057] Figure 2 It is a schematic structural diagram of the video decoder 200 according to an embodiment of the present application. Refer to Figure 2 , the video decoder 200 includes: an entropy decoding module 210, a prediction module 220, an inverse quantization / transformation module 230, a reconstruction module 240, a loop filtering module 250, and a decoded image buffer 260. It should be noted that the video decoder 200 may include more, fewer, or different functional components.
[0058] The video decoder 200 can receive a bitstream. The entropy decoding module 210 can parse the bitstream to extract syntax elements from the bitstream. As part of parsing the bitstream, the entropy decoding module 210 can parse the entropy encoded syntax elements in the bitstream. The prediction module 220, the inverse quantization / transformation module 230, the reconstruction module 240, and the loop filtering module 250 can decode the video data according to the syntax elements extracted from the bitstream, that is, generate the decoded video data.
[0059] In some embodiments, the prediction module 220 includes an intra prediction module 222 and an inter prediction module 221.
[0060] The intra prediction module 222 can perform intra prediction to generate a prediction block for the PU. The intra prediction module 222 can use the intra prediction mode to generate a prediction block for the PU based on the pixel blocks of spatially adjacent PUs. The intra prediction module 222 can also determine the intra prediction mode of the PU according to one or more syntax elements parsed from the bitstream.
[0061] The inter prediction module 221 can construct a first reference image list (list 0) and a second reference image list (list 1) according to the syntax elements parsed from the bitstream. Additionally, if the PU is encoded using inter prediction, the entropy decoding module 210 can parse the motion information of the PU. The inter prediction module 221 can determine one or more reference blocks of the PU according to the motion information of the PU. The inter prediction module 221 can generate a prediction block for the PU according to one or more reference blocks of the PU.
[0062] The inverse quantization / transformation module 230 inversely quantizes (i.e., dequantizes) the transform coefficients associated with the TU. The inverse quantization / transformation module 230 can use the QP value associated with the CU of the TU to determine the degree of quantization.
[0063] After inversely quantizing the transform coefficients, the inverse quantization / transformation module 230 can apply one or more inverse transforms to the inversely quantized transform coefficients to generate a residual block associated with the TU.
[0064] The reconstruction module 240 uses the residual block associated with the TU of the CU and the prediction block of the PU of the CU to reconstruct the pixel block of the CU. For example, the reconstruction module 240 can add the samples of the residual block to the corresponding samples of the prediction block to reconstruct the pixel block of the CU, obtaining a reconstructed image block.
[0065] The loop filter module 250 can perform deblocking filter operations to reduce the blocking artifacts of the pixel block associated with the CU.
[0066] The video decoder 200 can store the reconstructed image of the CU in the decoded image buffer 260. The video decoder 200 can use the reconstructed image in the decoded image buffer 260 as a reference image for subsequent prediction, or transmit the reconstructed image to a display device for presentation.
[0067] The basic process of video coding and decoding is as follows: At the encoding end, an image is divided into blocks. For the current block, the prediction module 110 generates a prediction block for the current block using intra prediction or inter prediction. The residual module 120 can calculate a residual block based on the prediction block and the original block of the current block, that is, the difference between the prediction block and the original block of the current block. This residual block can also be referred to as residual information. The residual block undergoes processes such as transformation and quantization by the transform / quantization module 130, which can remove information that is insensitive to the human eye to eliminate visual redundancy. Optionally, the residual block before being transformed and quantized by the transform / quantization module 130 can be referred to as a temporal residual block, and the temporal residual block after being transformed and quantized by the transform / quantization module 130 can be referred to as a frequency residual block or a frequency-domain residual block. The entropy coding module 180 receives the quantized transform coefficients output by the transform quantization module 130 and can perform entropy coding on the quantized transform coefficients to output a bitstream. For example, the entropy coding module 180 can eliminate character redundancy according to the target context model and the probability information of the binary bitstream.
[0068] At the decoding end, the entropy decoding module 210 can parse the bitstream to obtain prediction information, quantization coefficient matrix, etc. of the current block. The prediction module 220 generates a predicted block of the current block using intra prediction or inter prediction based on the prediction information. The inverse quantization / transformation module 230 uses the quantization coefficient matrix obtained from the bitstream to perform inverse quantization and inverse transformation on the quantization coefficient matrix to obtain a residual block. The reconstruction module 240 adds the predicted block and the residual block to obtain a reconstructed block. The reconstructed blocks form a reconstructed image, and the loop filtering module 250 performs loop filtering on the reconstructed image based on the image or based on blocks to obtain a decoded image. The encoding end also needs to perform similar operations as the decoding end to obtain a decoded image. This decoded image can also be referred to as a reconstructed image, and the reconstructed image can be used as a reference image for inter prediction of subsequent images.
[0069] It should be noted that the block partitioning information determined by the encoding end, as well as mode information or parameter information such as prediction, transformation, quantization, entropy encoding, and loop filtering, are carried in the bitstream when necessary. The decoding end determines the same block partitioning information, prediction, transformation, quantization, entropy encoding, loop filtering, etc. mode information or parameter information as the encoding end by parsing the bitstream and analyzing based on the existing information, so as to ensure that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end.
[0070] It can be understood that the "inverse transformation" of the transform coefficients at the decoding end can also be referred to as "transformation" in the standard text. The "transformation" and "inverse transformation" in the embodiments of the present application correspond to two opposite processes. For example, if "transformation" converts the values in the spatial domain to the coefficients in the frequency domain, then "inverse transformation" converts the coefficients in the frequency domain to the values in the spatial domain. If the standard only specifies decoding, then the "transformation" in the standard text is part of the decoding, referring to the "inverse transformation" in this article. The "inverse transformation" of the transform coefficients at the decoding end can also be referred to as "transformation" in the standard text.
[0071] Currently, mainstream video coding standards, such as HEVC, VVC, AVS3, the second-generation video coding standard (Alliance for Open Media Video 2, AV2) developed by the Alliance for Open Media, and the first-generation video coding standard (Alliance for Open Media Video 1, AV1) developed by the Alliance for Open Media, all adopt the above-mentioned block-based hybrid coding framework. With the development of technology, some modules or steps of this framework or process may be optimized. This application is applicable to the basic process of video codecs under this block-based hybrid coding framework, but is not limited to this framework and process.
[0072] As described above, motion compensation is a common prediction mode in video coding, which may include: inter-frame prediction mode, intra-block copy IBC prediction mode, intra-string copy prediction mode, etc. In specific coding implementations, these prediction modes may be used alone or in combination. For coding blocks using these prediction modes, it is usually necessary to explicitly or implicitly code one or more two-dimensional displacement vectors in the bitstream to indicate the displacement of the current block (or the co-located block of the current block) relative to one or more of its reference blocks. It should be noted that under different prediction modes and different implementations, the displacement vector may have different names, such as: 1) The displacement vector in inter-frame prediction is called a motion vector (Motion Vector, abbreviated as MV); 2) The displacement vector in intra-block copy is called a block vector (Block Vector, abbreviated as BV); 3) The displacement vector in intra-string copy is called a string vector (String Vector, abbreviated as SV).
[0073] This application relates to the IBC prediction mode, and the related technologies of the IBC prediction mode are introduced below.
[0074] Figure 3 FIG. is an example diagram of the IBC prediction mode applicable to the embodiments of the present application. In the IBC prediction mode, the predicted value of the current block is derived with reference to the reconstructed area of the current frame. Refer to Figure 3 , and the shaded area is the encoded and reconstructed area. The current coding block to be encoded determines its reference block in the encoded area. Specifically, the displacement between the current block and its reference block is the block vector BV of the current block. The IBC prediction mode utilizes the spatial correlation of screen content videos and uses the pixels of the encoded image on the current image to predict the pixels of the current block to be encoded, which can effectively save the bits required for encoding pixels. In AVS3, VVC, and AV1, the IBC technology is also adopted to improve the performance of screen content coding.
[0075] In the related technologies, the predicted blocks obtained by using the IBC mode are prone to discontinuous boundaries, that is, the transition between the reconstructed block and the surrounding pixels is not natural, and there is a problem of poor spatial continuity, which affects the image quality and is not conducive to the improvement of the coding and decoding performance.
[0076] In view of the above problems existing in the related technologies, the technical solutions of the embodiments of the present application are provided. In the embodiments of the present application, for a target block with an intra-block copy IBC prediction mode, the target prediction information of the target block is jointly determined according to the reconstruction information of the adjacent area of the target block and the original prediction information of the target block. Since the reconstruction information of the area around the block is added to the target prediction information, it is beneficial to the smooth transition between the target block and its surrounding area, thereby being beneficial to reducing the spatial continuity between the target block and its surrounding area, and further improving the image quality and being beneficial to improving the coding and decoding performance.
[0077] Among them, the terms involved in the IBC toolset are as follows:
[0078] SIBC: Symmetric Intra Block Copy, an in-frame prediction mode for mirror block copy
[0079] RRIBC: Reconstruction-Reordered IBC, an in-frame prediction mode for block copy based on the flipped reconstruction value
[0080] FIBC: Filtered Intra Block Copy:, in-frame prediction filtering for block copy
[0081] IBC-PC: IBC-Prediction Correction, inter-frame prediction correction
[0082] IBC-LIC: IBC with Local Illumination Compensation, in-frame prediction for block copy with local illumination compensation
[0083] IBC-MBVD: IBC merge mode with block vector differences, an IBC merge mode with block vector residuals
[0084] IBC-TM: IBC with Template Matching, an IBC mode with template matching
[0085] IBC-TM-AMVP: IBC with Template Matching, an IBC with the AMVP mode with template matching
[0086] IBC-TM-MRG: IBC with Template Matching, an IBC with the merge mode with template matching
[0087] IBC-CIIP: Combined intra block copy and intra prediction, an IBC and in-frame prediction merge mode
[0088] IBC-GPM: IBC with Geometry Partitioning, an IBC mode with geometry partitioning
[0089] Before formally introducing the embodiments of the present application, the syntax levels of the coded bitstream are introduced.
[0090] 1. Video sequence
[0091] The video sequence is the highest-level syntax structure of the bitstream. The video sequence starts with the first sequence header, and the sequence end code or video edit code indicates the end of a video sequence. The sequence headers between the first sequence header of the video sequence and the first occurrence of the sequence end code or video edit code are duplicate sequence headers. One or more coded pictures follow each sequence header, and a picture header should precede each picture. The coded pictures are arranged in the bitstream order in the bitstream, and the bitstream order should be the same as the decoding order. The decoding order may not be the same as the display order.
[0092] 2. Picture Frame
[0093] A picture can be a frame or a field, and its coded data starts with the picture start code and ends with the sequence start code, sequence end code, or the next picture start code. In the bitstream, the coded data of the two fields of an interlaced picture can appear sequentially or in an interleaved manner. The decoding and display order of the two fields of data are specified in the picture header. Picture types include: I picture; P picture; B picture.
[0094] 3. Slice
[0095] A slice is a rectangular area in a picture, which contains parts of several largest coding units within the picture, and slices should not overlap. The slice structure can refer to slice structure A - structure F in Figure 4 .
[0096] 4. Largest Coding Unit (LCU), Coding Tree, and Coding Unit (CU)
[0097] A picture is divided into largest coding units, and the largest coding units should not overlap. The samples at the upper left corner of the largest coding unit should not exceed the picture boundary, and the samples at the lower right corner of the largest coding unit may exceed the picture boundary.
[0098] The largest coding unit is divided into one or more coding units, which is determined by the coding tree. The coding unit is divided into one or more transform blocks.
[0099] Before formally introducing the embodiments of the present application, descriptions related to the bitstream description are introduced.
[0100] 1. Description Method
[0101] The bitstream syntax description method is similar to the C language. The syntax elements of the bitstream are represented in boldface, and each syntax element is described by a name (a group of English letters separated by underscores, all letters are in lowercase), syntax, and semantics. The values of the syntax elements in the syntax table and the text are represented in regular font.
[0102] In some cases, other variable values derived from syntax elements can be applied in the syntax table. Such variables are named with a mixture of lowercase and uppercase letters without underlines in the syntax table or the text. Variables starting with uppercase letters are used to decode the current and related syntax structures, and can also be used to decode subsequent syntax structures. Variables starting with lowercase letters are only used within the section where they are located.
[0103] The relationship between the mnemonics of syntax element values and variable values and their values is described in the text. In some cases, the two are used equivalently. Mnemonics are represented by one or more groups of letters separated by underscores, with each group starting with an uppercase letter and may also include multiple uppercase letters.
[0104] 2. Descriptor
[0105] The descriptor represents the parsing process of different syntax elements, as shown in the following table:
[0106]
[0107] The technical solutions of the embodiments of the present application will be described in detail below through some embodiments. These embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0108] Figure 5 It is a schematic flowchart of the video decoding method P500 provided by the embodiments of the present application. Among them, the execution subject of the method P500 is a decoder that can decode the bitstream, such as an electronic device with decoding function. Refer to Figure 5 , the method P500 includes: S510 to S530.
[0109] In S510, the bitstream is parsed to determine a target block, and the prediction mode of the target block is intra block copy (IBC) prediction.
[0110] The above target block is the current coding unit (CU). In the embodiments of the present application, the above target block is a CU predicted by the IBC prediction mode. Further, since the embodiments of the present application will perform filtering processing on the original prediction information of the target block, the above target block in the embodiments of the present application should also support the use of intra block copy prediction filter (IBCPF).
[0111] In the embodiments of the present application, the current block can be explicitly determined whether it is the above target block according to the flag about the IBC mode and / or the IBCPF mode. The following combines Figures 6 to 10 the provided embodiments to introduce the embodiments of how to explicitly determine the target block according to the above flag flag:
[0112] Figure 6 The flowchart of method P600 for determining a target block provided by an embodiment of this application. The embodiment shown in this figure can be a specific implementation of S510. Refer to Figure 6 , the embodiment shown in this figure includes S610 - S660.
[0113] In S610, parse the bitstream to obtain a first IBC flag of a first - level syntax structure. The first IBC flag is used to indicate whether the coding information of the first - level syntax structure of the bitstream adopts the IBC mode, and whether it supports the Intra - Block Copy Prediction Filtering (IBCPF) mode when adopting the IBC mode.
[0114] As described above, the syntax levels of the coded bitstream include: sequence level, frame level, slice level, block level, etc. In the embodiments of this application, the above - mentioned first - level syntax structure can be any one of the sequence level, frame level, slice level, and block level.
[0115] In S620, determine whether the first IBC flag indicates that the coding information of the first - level syntax structure adopts the IBC mode and supports the IBCPF mode.
[0116] In the case where the first IBC flag indicates that the coding information of the first - level syntax structure does not adopt the IBC mode, or in the case where the first IBC flag indicates that the coding information of the first - level syntax structure adopts the IBC mode but does not support the IBCPF mode, execute S630: Determine that the coding information of the first - level syntax structure does not contain the target block.
[0117] In the case where the first IBC flag indicates that the coding information of the first - level syntax structure adopts the IBC mode and supports the IBCPF mode, execute S640: Determine whether the first - level syntax structure is the block level.
[0118] In the case where the first - level syntax structure is the block level, execute S650: Determine the current block as the target block;
[0119] In the case where the first - level syntax structure is not the block level, execute S660: Parse the bitstream to obtain the flag of the next - level syntax structure, so as to determine the target block according to the flag of the next - level syntax structure.
[0120] Regarding Embodiment 1 of method P600: The above - mentioned first - level syntax structure is the sequence level. Suppose the above - mentioned first IBC flag can be expressed as: seq_ibc_flag. The semantic information represented when seq_ibc_flag takes different values is shown in Table 1.
[0121] Table 1
[0122]
[0123] The syntax structure regarding Table 1 is as follows:
[0124]
[0125] Or
[0126]
[0127] Where seq_ibc_flag is the sequence header block copy mode flag;
[0128] Indicates the mode type of the block copy intra prediction mode. A value of '0' means that IBC should not be used, and a value greater than '0' allows the use of IBC and indicates whether IBCPF is allowed. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0129] In S620, it is judged whether the value of seq_ibc_flag is 2. If the value is not 2, it means that the current sequence is not allowed the IBC mode, or it means that the current sequence allows the use of the IBC mode but does not allow the use of the IBCPF mode. That is to say, there is no target block in the current sequence that meets the above conditions of this application. Therefore, it is not necessary to further parse the sequence regarding IB or IBCPF (such as frame-level flags, slice-level flags, etc.), and S630 can be directly executed: determining that the current sequence does not contain a target block, thereby saving decoding time and improving decoding efficiency.
[0130] In S620, it is judged whether the value of seq_ibc_flag is 2. If the value is 2, it means that the current sequence is allowed the IBC mode and allows the use of the IBCPF mode. That is to say, there is a target block in the current sequence that meets the above conditions of this application. Therefore, it is necessary to further determine in which frame the above target block exists. Therefore, an operation such as S660 is executed: parsing the frame-level flag to determine the above target block according to the flag of the next-level syntax structure. For the specific implementation manner of S660 in this embodiment, reference can be made to Embodiment 2 of Method P600. Of course, it is not limited to Embodiment 2 of Method P600, and it can also be other embodiments that judge according to frame-level flags.
[0131] Embodiment 2 of Method P600: The above first-level syntax structure is at the frame level. Suppose the above first IBC flag can be expressed as: pic_ibc_flag. The semantic information represented when pic_ibc_flag takes different values is shown in Table 2.
[0132] Table 2
[0133]
[0134] The syntax structure for Table 2 is as follows:
[0135]
[0136] Or
[0137]
[0138] Wherein is the image header block copy mode flag;
[0139] represents the mode type of the block copy intra prediction mode. A value of '0' indicates that IBC should not be used, and a value greater than '0' allows the use of IBC and indicates whether IBCPF is allowed. The value of PicIbcFlag is equal to the value of pic_ibc_flag. If pic_ibc_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0140] In S620, it is determined whether the value of pic_ibc_flag is 2. If the value is not 2, it means that the current frame is not allowed the IBC mode, or it means that the current frame allows the use of the IBC mode but does not allow the use of the IBCPF mode. That is, there is no target block in the current frame that meets the above conditions of the present application. Therefore, it is not necessary to further parse the frame regarding IB or IBCPF (such as slice-level flags, block-level flags, etc.), and S630 can be directly executed: determining that the current frame does not contain a target block, thereby saving decoding time and improving decoding efficiency.
[0141] In S620, it is determined whether the value of pic_ibc_flag is 2. If the value is 2, it means that the current frame is allowed the IBC mode and allows the use of the IBCPF mode. That is, there is a target block in the current frame that meets the above conditions of the present application. Therefore, it is necessary to further determine which slice contains the above target block, and thus an operation such as S660 is executed: parsing the slice-level flags to determine the above target block according to the flags of the next-level syntax structure. For the specific implementation manner of S660 in this embodiment, reference can be made to Embodiment 3 of Method P600. Of course, it is not limited to Embodiment 3 of Method P600 and can also be other embodiments that make judgments according to slice-level flags.
[0142] Embodiment 3 of Method P600: The above first-level syntax structure is at the slice level. Suppose the above first IBC flag can be expressed as: slice_ibc_flag. The semantic information represented when slice_ibc_flag takes different values is shown in Table 3.
[0143] Table 3
[0144]
[0145] The syntax structure regarding Table 3 is as follows:
[0146]
[0147] Or,
[0148]
[0149] Wherein, is the flag for the header block copy mode;
[0150] represents the mode type of the block copy intra prediction mode. A value of '0' indicates that IBC should not be used, and a value greater than '0' allows the use of IBC and indicates whether IBCPF is allowed. The value of SliceIbcFlag is equal to the value of slice_ibc_flag. If slice_ibc_flag does not exist in the bitstream, the value of SliceIbcFlag is 0.
[0151] In S620, it is judged whether the value of slice_ibc_flag is 2. If the value is not 2, it means that the current slice is not allowed the IBC mode, or it means that the current slice is allowed to use the IBC mode but not allowed to use the IBCPF mode. That is to say, there is no target block in the current slice that meets the above conditions of the present application. Therefore, it is not necessary to further parse the current slice regarding IB or IBCPF (such as block-level flags), and S630 can be directly executed: determining that the current slice does not contain a target block, thereby saving decoding time and improving decoding efficiency.
[0152] In S620, it is judged whether the value of slice_ibc_flag is 2. If the value is 2, it means that the current slice is allowed the IBC mode and allowed to use the IBCPF mode. That is to say, there is a target block in the current slice that meets the above conditions of the present application. Therefore, it is necessary to further determine which block belongs to the above target block. Therefore, an operation such as S660 is executed: parsing the block-level flags to determine the above target block according to the flags of the next-level syntax structure. For the specific implementation manner of S660 in this embodiment, reference can be made to Embodiment 4 of Method P600. Of course, it is not limited to Embodiment 4 of Method P600 and can also be other embodiments that judge according to block-level flags.
[0153] Embodiment 4 of Method P600: The above first-level syntax structure is at the block level. Suppose the above first IBC flag can be expressed as: cu_ibc_flag. The semantic information represented by different values of cu_ibc_flag is shown in Table 4.
[0154] Table 4
[0155]
[0156] The syntax structure for Table 4 is as follows:
[0157]
[0158] Among them, is the block-level block copy mode flag;
[0159] represents the mode type of the block copy intra prediction mode. A value of '0' indicates that IBC should not be used, and a value greater than '0' allows the use of IBC and indicates whether IBCPF is allowed. The value of CuIbcFlag is equal to the value of cu_ibc_flag. If cu_ibc_flag does not exist in the bitstream, the value of CuIbcFlag is 0.
[0160] In S620, it is judged whether the value of cu_ibc_flag is 2. If the value is not 2, it means that the current block is not allowed to use the IBC mode, or it means that the current block is allowed to use the IBC mode but not allowed to use the IBCPF mode. That is to say, there is no target block that meets the above conditions in the current block. Therefore, it is determined that the current block is not the target block.
[0161] In S620, it is judged whether the value of cu_ibc_flag is 2. If the value is 2, it means that the current block is allowed to use the IBC mode and allowed to use the IBCPF mode. That is to say, the current block belongs to the target block that meets the above conditions in this application. Therefore, execute S650: Determine that the current block is the above target block.
[0162] In the above embodiments of method P600, by identifying the above target block through a flag at each level of the encoded bitstream, it is beneficial to save the decoding time and improve the decoding efficiency and performance.
[0163] Figure 7 This is a flowchart of method P700 for determining a target block provided by another embodiment of this application. The embodiment shown in this figure can be used as another specific implementation of S510. Refer to Figure 7 , the embodiment shown in this figure includes S710 - S780.
[0164] In S710, the bitstream is parsed to obtain the first IBC flag of the first-level syntax structure, and the first IBC flag is used to indicate whether the encoding information of the first-level syntax structure in the bitstream adopts the IBC mode.
[0165] In S720, it is determined whether the first IBC flag indicates that the encoding information of the first-level syntax structure adopts the IBC mode.
[0166] When the first IBC flag indicates that the coding information of the first-level syntax structure does not adopt the IBC mode, execute S730: determine that the coding information of the first-level syntax structure does not contain the target block;
[0167] When the first IBC flag indicates that the coding information of the first-level syntax structure adopts the IBC mode, execute S740: parse the bitstream to obtain the second IBC flag of the first-level syntax structure, and the second IBC flag is used to indicate whether the coding information of the first-level syntax structure in the bitstream supports the Intra Block Copy Prediction Filtering (IBCPF) mode;
[0168] In S750, determine whether the second IBC flag indicates that the coding information of the first-level syntax structure supports the adoption of the IBCPF mode
[0169] When the second IBC flag indicates that the coding information of the first-level syntax structure does not support the adoption of the IBCPF mode, execute S730: determine that the coding information of the first-level syntax structure does not contain the target block;
[0170] When the second IBC flag indicates that the coding information of the first-level syntax structure supports the adoption of the IBCPF mode, execute S760: determine whether the first-level syntax structure is block-level;
[0171] When the first-level syntax structure is block-level, execute S770: determine the current block as the target block;
[0172] When the first-level syntax structure is not block-level, execute S780: parse the bitstream to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0173] Regarding Embodiment 1 of Method P700: The above first-level syntax structure is sequence-level. Suppose the above first IBC flag can be expressed as: seq_ibc_flag, and the above second IBC flag can be expressed as: seq_ibc_pf_flag. The semantic information represented when seq_ibc_flag and seq_ibc_pf_flag have different values is shown in Table 5.
[0174] Table 5
[0175]
[0176] Regarding the syntax structure of Table 5 as follows:
[0177]
[0178] Among them, Copy the intra prediction flag for the sequence header block;
[0179] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0180] Copy the intra prediction filtering mode flag for the sequence header block;
[0181] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of seq_ibc_pf_flag. If seq_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0182] When the value of seq_ibc_flag is 0, it means that the current sequence is not encoded and predicted using the IBC mode. Therefore, it is not necessary to perform the decoding of seq_ibc_pf_flag, which can save decoding time and improve decoding efficiency. That is to say, when the value of seq_ibc_flag is 0, regardless of the value of seq_ibc_pf_flag, the above-mentioned target blocks do not exist in the sequence. Referring to Table 5, when the value of seq_ibc_flag is 0, the value of seq_ibc_pf_flag is represented as "X". In this case, S730 can be directly executed: determine that the current sequence does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0183] When the value of seq_ibc_flag is 1, it means that the current sequence allows encoding and prediction using the IBC mode, and then the value of seq_ibc_pf_flag needs to be further decoded (i.e., execute S740). There are the following two cases:
[0184] Case 1: The value of seq_ibc_flag is 1 and the value of seq_ibc_pf_flag is 0, indicating that although the current sequence allows the use of the IBC mode, it does not support the IBCPF mode. That is to say, there are no target blocks in the current sequence that meet the above conditions of this application. Therefore, it is not necessary to further analyze the sequence regarding IB or IBCPF (such as frame-level flags, slice-level flags, etc.). S730 can be directly executed: determine that the current sequence does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0185] Case 2: When the value of seq_ibc_flag is 1 and the value of seq_ibc_pf_flag is 1, it indicates that the current sequence is allowed to use the IBC mode and the IBCPF mode, that is, there is a target block in the current sequence that meets the above conditions of this application. Therefore, it is necessary to further determine in which frame the above target block exists. Therefore, the operation as in S780 is performed: parsing the flags at the frame level to determine the above target block according to the flags of the next-level syntax structure. For the specific implementation of S780 in this embodiment, reference can be made to Embodiment 2 of Method P700. Of course, it is not limited to Embodiment 2 of Method P700, and it can also be other embodiments that make judgments based on frame-level flags.
[0186] Embodiment 2 of Method P700: The above first-level syntax structure is at the frame level. Suppose the above first IBC flag can be expressed as: pic_ibc_flag, and the above second IBC flag can be expressed as: pic_ibc_pf_flag. The semantic information represented when pic_ibc_flag and pic_ibc_pf_flag have different values is shown in Table 6.
[0187] Table 6
[0188]
[0189] The syntax structure regarding Table 6 is as follows:
[0190]
[0191] Among them, is the in-frame prediction flag for picture header block copy;
[0192] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of PicIbcFlag is equal to the value of pic_ibc_flag. If pic_ibc_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0193] is the in-frame prediction filtering mode flag for picture header block copy;
[0194] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of pic_ibc_pf_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0195] When pic_ibc_flag has a value of 0, it indicates that the current frame is not encoded and predicted using the IBC mode. Therefore, it is not necessary to perform the decoding of pic_ibc_pf_flag, which can save decoding time and improve decoding efficiency. That is to say, when pic_ibc_flag has a value of 0, regardless of the value of pic_ibc_pf_flag, the above-mentioned target block does not exist in this frame. Referring to Table 6, when pic_ibc_flag has a value of 0, the value of pic_ibc_pf_flag is represented as "X". In this case, S730 can be directly executed: determining that the current frame does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0196] When pic_ibc_flag has a value of 1, it indicates that the current frame allows encoding and prediction using the IBC mode, and then it is necessary to further decode the value of pic_ibc_pf_flag (i.e., execute S740). There are the following two cases:
[0197] Case 1: pic_ibc_flag has a value of 1 and pic_ibc_pf_flag has a value of 0, indicating that although the current frame allows the use of the IBC
[0198] mode, it does not support the IBCPF mode. That is to say, the target block meeting the above conditions of this application does not exist in the current frame. Therefore, it is not necessary to further parse the current frame regarding IB or IBCPF (such as slice-level flags, block-level flags, etc.). S730 can be directly executed: determining that the current frame does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0199] Case 2: pic_ibc_flag has a value of 1 and pic_ibc_pf_flag has a value of 1, indicating that the current frame is allowed to use the IBC mode and the IBCPF mode. That is to say, the target block meeting the above conditions of this application exists in the current frame. Therefore, it is necessary to further determine which slice contains the above target block, and thus an operation such as S780 is executed: parsing the slice-level flag to determine the above target block according to the flag of the next-level syntax structure. For the specific implementation manner of S780 in this embodiment, reference can be made to Embodiment 3 of Method P700. Of course, it is not limited to Embodiment 3 of Method P700, and it can also be other embodiments that judge according to slice-level flags.
[0200] Example 3 of Method P700: The above first-level syntax structure is at the slice level. Suppose the above first IBC flag can be represented as: slice_ibc_flag, and the above second IBC flag can be represented as: slice_ibc_pf_flag. The semantic information represented when slice_ibc_flag and slice_ibc_pf_flag have different values is shown in Table 7.
[0201] Table 7
[0202]
[0203] The syntax structure regarding Table 7 is as follows:
[0204]
[0205] Among them, is the intra prediction flag for slice header block copy;
[0206] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SliceIbcFlag is equal to the value of slice_ibc_flag. If slice_ibc_flag does not exist in the bitstream, the value of SliceIbcFlag is 0.
[0207] is the intra prediction filter mode flag for slice header block copy;
[0208] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SliceIbcPfFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of SliceIbcPfFlag is 0.
[0209] When the value of slice_ibc_flag is 0, it means that the current slice is not encoded and predicted using the IBC mode. Therefore, it is not necessary to perform the decoding regarding slice_ibc_pf_flag, which can save decoding time and improve decoding efficiency. That is to say, when the value of slice_ibc_flag is 0, regardless of the value of slice_ibc_pf_flag, the above target block does not exist in this slice. Referring to Table 7, when the value of slice_ibc_flag is 0, the value of slice_ibc_pf_flag is represented as "X". In this case, S730 can be directly executed: determining that the current slice does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0210] When the value of slice_ibc_flag is 1, it indicates that the current slice allows encoding prediction in IBC mode. Then, it is necessary to further decode the value of slice_ibc_pf_flag (i.e., execute S740). There are the following two cases:
[0211] Case 1: The value of slice_ibc_flag is 1 and the value of slice_ibc_pf_flag is 0, which means that although the current slice allows IBC mode, it does not support IBCPF mode. That is to say, there is no target block in the current slice that meets the above conditions of this application. Therefore, it is not necessary to further parse the current slice regarding IB or IBCPF (such as block-level flags), and S730 can be directly executed: determine that the current slice does not contain a target block, thereby saving decoding time and improving decoding efficiency.
[0212] Case 2: The value of slice_ibc_flag is 1 and the value of slice_ibc_pf_flag is 1, which means that the current slice is allowed in IBC mode and allows the use of IBCPF mode. That is to say, there is a target block in the current slice that meets the above conditions of this application. Therefore, it is necessary to further determine which block belongs to the above target block. Therefore, an operation such as S780 is executed: parse the block-level flags to determine the above target block according to the flags of the next-level syntax structure. For the specific implementation of S780 in this embodiment, reference can be made to Embodiment 4 of Method P700. Of course, it is not limited to Embodiment 4 of Method P700, and it can also be other embodiments that judge according to block-level flags.
[0213] Regarding Embodiment 4 of Method P700: The above first-level syntax structure is block-level. Suppose the above first IBC flag can be expressed as: cu_ibc_flag, and the above second IBC flag can be expressed as: cu_ibc_pf_flag. The semantic information represented when the values of cu_ibc_flag and cu_ibc_pf_flag are different is shown in Table 8.
[0214] Table 8
[0215]
[0216]
[0217] The syntax structure regarding Table 8 is as follows:
[0218]
[0219] Among them, is the block-level block copy intra prediction flag;
[0220] Binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of CuIbcFlag is equal to the value of cu_ibc_flag. If cu_ibc_flag does not exist in the bitstream, the value of CuIbcFlag is 0.
[0221] It is the in-frame prediction filtering mode flag for block-level block copy;
[0222] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of CuIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of CuIbcPfFlag is 0.
[0223] When the value of cu_ibc_flag is 0, it means that the current block is not encoded and predicted using the IBC mode. Therefore, it is not necessary to decode the value of cu_ibc_pf_flag, which can save decoding time and improve decoding efficiency. That is to say, when the value of cu_ibc_flag is 0, regardless of the value of cu_ibc_pf_flag, the above-mentioned target block does not exist in this block. Referring to Table 8, when the value of cu_ibc_flag is 0, the value of cu_ibc_pf_flag is represented as "X". In this case, S730 can be directly executed: Determine that the current block does not belong to the target block, thus saving decoding time and improving decoding efficiency.
[0224] When the value of cu_ibc_flag is 1, it means that the current block allows encoding and prediction using the IBC mode, and then the value of cu_ibc_pf_flag needs to be further decoded (i.e., execute S740). There are the following two cases:
[0225] Case 1: The value of cu_ibc_flag is 1 and the value of cu_ibc_pf_flag is 0, indicating that although the current block allows the IBC
[0226] mode, it does not support the IBCPF mode. That is to say, the current block does not meet the target block conditions of the present application, so execute S730:
[0227] Determine that the current block does not belong to the target block.
[0228] Case 2: The value of cu_ibc_flag is 1 and the value of cu_ibc_pf_flag is 1, indicating that the current block is allowed the IBC mode and the IBCPF mode is allowed. That is to say, the current block meets the target block conditions of the present application, so execute S770: Determine that the current block is the above-mentioned target block.
[0229] In the above embodiments of method P700, the above target block is identified by two flags at each level of the coded bitstream, and the second IBC flag depends on the value of the first IBC flag at the same level. Specifically, when the value of the first IBC flag at the same level determines that the IBC mode is not supported at the current level, there is no need to decode the second IBC flag at the current level, which helps to save the decoding time and improve the decoding efficiency and performance.
[0230] Figure 8 The flowchart of method P800 for determining the target block provided by another embodiment of the present application. The embodiment shown in this figure can be used as another specific implementation of S510. Specifically, Figure 8 The embodiment shown can be used as Figure 6 a specific implementation of S660 in Figure 7 or can be used as a specific implementation of S780 in Figure 8 . Referring to
[0231] In S810, when the first-level syntax structure is not block-level, the coded bitstream is parsed to obtain the third IBC flag of the second-level syntax structure. The third IBC flag is used to indicate whether the coding information of the second-level syntax structure in the coded bitstream adopts the IBC mode and whether the IBCPF mode is supported when the IBC mode is adopted;
[0232] As described above, the syntax levels of the coded bitstream include: sequence level, frame level, slice level, block level, etc.
[0233] In the embodiments of the present application, the above second-level syntax structure may be frame level, slice level, or block level. Specifically, when the above first-level syntax structure is sequence level, the second-level syntax structure is frame level; or, when the above first-level syntax structure is frame column level or sequence level, the second-level syntax structure is slice level; or, when the first level is slice level, frame level, or sequence level, the second-level syntax structure is block level.
[0234] In S820, it is determined that the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode and supports the IBCPF mode.
[0235] When the third IBC flag indicates that the coding information of the second-level syntax structure does not adopt the IBC mode, or when the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode and does not support the IBCPF mode, S830 is executed: it is determined that the coding information of the second-level syntax structure does not include the target block;
[0236] When the third IBC flag indicates that the encoded information of the second-level syntax structure adopts the IBC mode and supports the IBCPF mode, S840 is executed: determining whether the second-level syntax structure is block-level.
[0237] When the second-level syntax structure is block-level, S850 is executed: determining the current block as the target block;
[0238] When the second-level syntax structure is not block-level, S860 is executed: parsing the bitstream to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0239] It should be noted that in the embodiments shown in Figure 6 or Figure 7 where the first-level syntax structure is block-level, the current block can be directly determined whether it is the target block, and there is no need to execute the Figure 8 shown embodiments. In the embodiments shown in Figure 6 or Figure 7 where the first-level syntax structure is not block-level, the current block cannot be directly determined whether it is the target block, so the Figure 8 shown embodiments need to be executed.
[0240] Among them, Figure 8 the specific implementation of the shown embodiments is similar to that of the Figure 6 shown embodiments. The difference is that, Figure 6 the shown embodiments are applicable to the embodiments of determining the target block according to the sequence-level flag, Figure 8 the shown embodiments are applicable to the embodiments of determining the target block according to the flags such as frame-level, slice-level, block-level, etc. other than the sequence-level.
[0241] That is to say, in the embodiments provided by method P800, when it is impossible to determine whether there is a target block according to the flag of the first-level syntax structure, based on the embodiments provided by method P800, the target block is determined according to the flag of the next-level syntax structure. Specifically, the above target block is identified by a flag of each level of the encoded bitstream, which is beneficial to saving the decoding time and improving the decoding efficiency and performance.
[0242] Figure 9 It is a schematic flowchart of a method P900 for determining a target block provided by another embodiment of the present application. The embodiment shown in this figure can be used as another specific implementation of S510. Specifically, Figure 9 the shown embodiment can be used as the Figure 6 specific implementation of S660 in Figure 7 or can be used as the Figure 9 specific implementation of S780 in
[0243] In S910, when the first-level syntax structure is not block-level, the bitstream is parsed to obtain a third IBC flag of the second-level syntax structure, and the third IBC flag is used to indicate whether the coding information of the second-level syntax structure in the bitstream adopts the IBC mode;
[0244] As described above, the syntax levels of the coded bitstream include: sequence level, frame level, slice level, block level, etc.
[0245] In the embodiments of the present application, the above second-level syntax structure may be frame level, slice level, or block level. Specifically, when the above first-level syntax structure is sequence level, the second-level syntax structure is frame level; or, when the above first-level syntax structure is frame column level or sequence level, the second-level syntax structure is slice level; or, when the first level is slice level, frame level, or sequence level, the second-level syntax structure is block level.
[0246] In S920, it is determined whether the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode.
[0247] When the fourth IBC flag indicates that the coding information of the second-level syntax structure does not support adopting the IBCPF mode, S930 is executed: it is determined that the coding information of the second-level syntax structure does not include the target block;
[0248] When the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode, S940 is executed: the bitstream is parsed to obtain a fourth IBC flag of the second-level syntax structure, and the fourth IBC flag is used to indicate whether the coding information of the second-level syntax structure supports the IBCPF mode;
[0249] In S950, it is determined whether the fourth IBC flag indicates that the coding information of the second-level syntax structure supports the IBCPF mode.
[0250] When the fourth IBC flag indicates that the coding information of the second-level syntax structure supports the IBCPF mode, S960 is executed: it is determined whether the second-level syntax structure is block level;
[0251] When the second-level syntax structure is block level, S970 is executed: the current block is determined as the target block;
[0252] When the second-level syntax structure is not block level, S980 is executed: the bitstream is parsed to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0253] It should be noted that inFigure 6 or Figure 7 In the case where the first-level syntax structure in the illustrated embodiment is block-level, the current block can be directly determined whether it is the target block, without performing Figure 9 the illustrated embodiment. In Figure 6 or Figure 7 In the case where the first-level syntax structure in the illustrated embodiment is not block-level, the current block cannot be directly determined whether it is the target block, so it is necessary to perform Figure 9 the illustrated embodiment.
[0254] Wherein, Figure 9 the specific implementation manner of the illustrated embodiment is similar to Figure 7 the specific implementation manner of the illustrated embodiment. The difference is that Figure 7 the illustrated embodiment is applicable to the embodiment of determining the target block according to the sequence-level flag, Figure 9 the illustrated embodiment is applicable to the embodiment of determining the target block according to flags such as frame-level, slice-level, block-level, etc. other than the sequence-level.
[0255] That is to say, in the embodiment provided by method P900, in the case where it is impossible to determine whether there is a target block according to the flag of the first-level syntax structure, based on the embodiment provided by method P900, the flag of the next-level syntax structure is used to determine the target block. Specifically. The above target block is identified by two flags of the same level in the coded bitstream, and the second IBC flag depends on the value of the first IBC flag of the same level. At the same time, in the case where the value of the first IBC flag of the same level determines that the current level does not support the IBC mode, there is no need to decode the second IBC flag of the current level, which is beneficial to saving the decoding time and improving the decoding efficiency and performance.
[0256] Figure 10 It is a schematic flowchart of a method P1000 for determining a target block provided by an embodiment of the present application. The embodiment shown in this figure can be used as a specific implementation manner of S510. Specifically, Figure 10 the embodiment shown can be used as Figure 6 a specific implementation manner of S660 in Figure 7 or can be used as Figure 10 a specific implementation manner of S780 in
[0257] In S1010, in the case where the first-level syntax structure is not block-level, the coded bitstream is parsed to obtain a fourth IBC flag of the second-level syntax structure, and the fourth IBC flag is used to indicate whether the coding information of the second-level syntax structure supports the IBCPF mode;
[0258] When the fourth IBC flag indicates that the coding information of the second-level syntax structure does not support the IBC mode, perform 1030: Determine that the target block is not included in the coding information of the second-level syntax structure;
[0259] When the fourth IBC flag indicates that the coding information of the second-level syntax structure supports the IBCPF mode, perform 1040: Determine whether the second-level syntax structure is block-level;
[0260] When the second-level syntax structure is block-level, perform 1050: Determine the current block as the target block;
[0261] When the second-level syntax structure is not block-level, perform 1060: Parse the bitstream to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0262] In this embodiment, the above-mentioned target block cannot be directly determined only based on the fourth IBC flag, and it is necessary to rely on the flag of the upper-level syntax structure to jointly determine whether the current block meets the conditions of the target block.
[0263] Embodiment 1 of method P1000: In this embodiment, the above-mentioned second-level syntax structure is frame-level, and the above-mentioned first-level syntax structure is sequence-level. Specifically, if the above-mentioned fourth IBC flag is the fourth IBC flag pic_ibc_pf_flag at the frame level, the flag of the sequence level (upper-level syntax structure) can be relied on to determine the relevant information.
[0264] Embodiment 1.1: As shown in Table 9, the fourth IBC flag pic_ibc_pf_flag at the frame level can rely on the flag seq_ibc_flag of the sequence level (upper-level syntax structure) to determine the relevant.
[0265] Table 9
[0266]
[0267] Regarding the syntax structure in Table 9:
[0268] In the sequence header
[0269]
[0270] Copy the intra prediction flag for the sequence header block;
[0271] Binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0272] In the picture header
[0273]
[0274] Copy the intra prediction filtering flag for the picture header block;
[0275] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcFlag is equal to the value of pic_ibc_pf_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0276] When the value of seq_ibc_flag is 0, it means that the current sequence is not encoded and predicted using the IBC mode. Therefore, it is not necessary to decode the fourth IBC flag pic_ibc_pf_flag at the frame level, which can save decoding time and improve decoding efficiency. That is to say, when the value of seq_ibc_flag is 0, regardless of the value of pic_ibc_pf_flag, the above-mentioned target block does not exist in this frame. Referring to Table 9, when the value of seq_ibc_flag is 0, the value of the fourth IBC flag pic_ibc_pf_flag is represented as "X". In this case, S830 can be directly executed: determine that the current frame does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0277] When the value of seq_ibc_flag is 1, it means that the current sequence allows encoding and prediction using the IBC mode. Then, it is necessary to further decode the value of the fourth IBC flag pic_ibc_pf_flag at the frame level (i.e., execute S840). There are the following two cases:
[0278] Case 1: The value of seq_ibc_flag is 1 and the value of the fourth IBC flag pic_ibc_pf_flag at the frame level is 0, which means that although the current sequence allows the use of the IBC mode, the current frame does not support the IBCPF mode. That is to say, there is no target block in the current frame that meets the above conditions of this application. Therefore, it is not necessary to further analyze the sequence regarding IB or IBCPF (such as slice-level flags, etc.). S830 can be directly executed: determine that the current frame does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0279] Case 2: When the value of seq_ibc_flag is 1 and the value of the fourth IBC flag pic_ibc_pf_flag at the frame level is 1, it indicates that the current sequence is allowed to use the IBC mode and the current frame is allowed to use the IBCPF mode, that is, there is a target block in the current frame that meets the above conditions of this application. Therefore, it is necessary to further determine in which frame the above target block exists. Therefore, the operation as in S860 is performed: Parse the flag at the slice level to determine the above target block according to the flag of the next-level syntax structure.
[0280] Embodiment 1.2: As shown in Table 10, the fourth IBC flag pic_ibc_pf_flag at the frame level can be determined to be relevant depending on the flag seq_ibc_pf_flag at the sequence level (the upper-level syntax structure).
[0281] Table 10
[0282]
[0283]
[0284] Regarding the syntax structure in Table 10:
[0285] In the sequence header
[0286]
[0287] Copy the intra prediction filtering flag for the sequence header block;
[0288] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of seq_ibc_pf_flag. If seq_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0289] In the picture header
[0290]
[0291] Copy the intra prediction filtering flag for the picture header block;
[0292] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of pic_ibc_fp_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0293] When the value of seq_ibc_pf_flag is 0, it indicates that the current sequence does not support the IBCPF mode. Therefore, it is not necessary to perform the decoding of the fourth IBC flag pic_ibc_pf_flag at the frame level, which can save decoding time and improve decoding efficiency. That is to say, when the value of seq_ibc_pf_flag is 0, regardless of the value of pic_ibc_pf_flag, the above-mentioned target block does not exist in this frame. Referring to Table 9, when the value of seq_ibc_flag is 0, the value of the fourth IBC flag pic_ibc_pf_flag is represented as "X". In this case, S830 can be directly executed: determining that the current frame does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0294] When the value of seq_ibc_pf_flag is 1, it indicates that the current sequence supports the use of the IBCPF mode for predictive filtering. Then, it is necessary to further decode the value of the fourth IBC flag pic_ibc_pf_flag at the frame level (i.e., execute S840). There are the following two cases:
[0295] Case 1: The value of seq_ibc_pf_flag is 1 and the value of the fourth IBC flag pic_ibc_pf_flag at the frame level is 0, indicating that although the current sequence supports the IBCPF mode, the current frame does not support the IBCPF mode. That is to say, there is no target block in the current frame that meets the above conditions of this application. Therefore, it is not necessary to further analyze the sequence regarding IB or IBCPF (such as slice-level flags, etc.). S830 can be directly executed: determining that the current frame does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0296] Case 2: The value of seq_ibc_pf_flag is 1 and the value of the fourth IBC flag pic_ibc_pf_flag at the frame level is 1, indicating that both the current sequence and the current frame support the IBCPF mode. That is to say, there is a target block in the current frame that meets the above conditions of this application. Therefore, it is necessary to further determine in which frame the above target block exists. Therefore, an operation such as S860 is executed: parsing the slice-level flag to determine the above target block according to the flag of the next-level syntax structure.
[0297] Embodiment 2 of Method P1000: The above second-level syntax structure is at the slice level. As mentioned before, in this embodiment, the above first-level syntax structure can be at the sequence level or the frame level. In Embodiments 2.1 and 2.2, taking the first syntax structure being at the frame level as an example, specifically, when it is impossible to exclude that a frame does not adopt the IBC mode or the IBCPF mode based on the frame-level flag, this embodiment is executed. Suppose the above fourth IBC flag can be expressed as: slice_ibc_pf_flag. The fourth IBC flag slice_ibc_pf_flag at the slice level can rely on the flag at the frame level (the upper-level syntax structure) to determine relevant information.
[0298] Embodiment 2.1: As shown in Table 11, the fourth IBC flag slice_ibc_pf_flag at the slice level can rely on the flag pic_ibc_flag at the frame level (the upper-level syntax structure) to determine relevant information.
[0299] Table 11
[0300]
[0301] Regarding the syntax structure in Table 11:
[0302] In the picture header
[0303]
[0304] Copy the intra prediction flag for the picture header block;
[0305] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of PicIbcFlag is equal to the value of pic_ibc_flag. If pic_ibc_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0306] In the slice header
[0307]
[0308] Copy the intra prediction filter flag for the slice header block;
[0309] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0310] When pic_ibc_flag has a value of 0, it indicates that the current frame is not encoded and predicted using the IBC mode. Therefore, it is not necessary to perform the decoding of the fourth IBC flag slice_ibc_pf_flag at the slice level, which can save decoding time and improve decoding efficiency. That is to say, when pic_ibc_flag has a value of 0, regardless of the value of slice_ibc_pf_flag, the above-mentioned target block does not exist within this slice. Referring to Table 11, when pic_ibc_flag has a value of 0, the value of the fourth IBC flag slice_ibc_pf_flag is represented as "X". In this case, S830 can be directly executed: determining that the current slice does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0311] When pic_ibc_flag has a value of 1, it indicates that the current frame allows encoding and prediction using the IBC mode. Then, it is necessary to further decode the value of the fourth IBC flag slice_ibc_pf_flag at the slice level (i.e., execute S840). There are the following two cases:
[0312] Case 1: pic_ibc_flag has a value of 1 and the value of the fourth IBC flag slice_ibc_pf_flag at the slice level is 0, indicating that although the current frame allows the IBC mode, the current slice does not support the IBCPF mode. That is to say, there is no target block in the current slice that meets the above conditions of this application. Therefore, it is not necessary to further parse the frame regarding IB or IBCPF (such as slice-level flags, etc.). S830 can be directly executed: determining that the current slice does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0313] Case 2: pic_ibc_flag has a value of 1 and the value of the fourth IBC flag slice_ibc_pf_flag at the slice level is 1, indicating that the current frame is allowed the IBC mode and the current slice allows the use of the IBCPF mode. That is to say, there is a target block in the current slice that meets the above conditions of this application. Therefore, it is necessary to further determine in which slice the above target block exists. Therefore, an operation such as S860 is executed: parsing the slice-level flags to determine the above target block according to the flags of the next-level syntax structure.
[0314] Embodiment 2.2: As shown in Table 12, the fourth IBC flag slice_ibc_pf_flag at the slice level can be determined to be relevant depending on the flag pic_ibc_pf_flag at the frame level (the upper-level syntax structure).
[0315] Table 12
[0316]
[0317] Regarding the syntax structure in Table 12:
[0318] In the picture header
[0319]
[0320] Copy the intra prediction filtering flag for the picture header block;
[0321] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of pic_ibc_pf_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0322] In the slice header
[0323]
[0324] Copy the intra prediction filtering flag for the slice header block;
[0325] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0326] When the value of pic_ibc_pf_flag is 0, it indicates that the current frame does not support the IBCPF mode. Therefore, it is not necessary to decode the fourth IBC flag slice_ibc_pf_flag at the slice level, which can save decoding time and improve decoding efficiency. That is to say, when the value of pic_ibc_pf_flag is 0, regardless of the value of slice_ibc_pf_flag, the above target block does not exist in this slice. Referring to Table 9, when the value of pic_ibc_flag is 0, the value of the fourth IBC flag slice_ibc_pf_flag is represented as "X". In this case, S830 can be directly executed: Determine that the current slice does not contain the target block, thereby saving decoding time and improving decoding efficiency.
[0327] When the value of pic_ibc_pf_flag is 1, it indicates that the current frame supports the use of the IBCPF mode for prediction filtering. Then, it is necessary to further decode the value of the fourth IBC flag slice_ibc_pf_flag at the slice level (i.e., execute S840). There are the following two cases:
[0328] Case 1: When the value of pic_ibc_pf_flag is 1 and the value of the fourth IBC flag slice_ibc_pf_flag at the slice level is 0, it indicates that although the current frame supports the IBCPF mode, the current slice does not support the IBCPF mode. That is, there is no target block in the current slice that meets the above conditions of this application. Therefore, it is not necessary to further parse the frame regarding IB or IBCPF (such as slice-level flags), and S830 can be directly executed: Determine that the current slice does not contain a target block, thereby saving decoding time and improving decoding efficiency.
[0329] Case 2: When the value of pic_ibc_pf_flag is 1 and the value of the fourth IBC flag slice_ibc_pf_flag at the slice level is 1, it indicates that both the current frame and the current slice support the IBCPF mode. That is, there is a target block in the current slice that meets the above conditions of this application. Therefore, it is necessary to further determine in which slice the above target block exists, and thus an operation such as S860 is executed: Parse the slice-level flag to determine the above target block according to the flag of the next-level syntax structure.
[0330] In the case where the second-level syntax structure is at the slice level, in this embodiment, the above first-level syntax structure can also be at the sequence level. In Embodiment 2.3 and Embodiment 2.4, the first syntax structure is taken as an example at the sequence level. The fourth IBC flag slice_ibc_pf_flag at the slice level can rely on the flag at the sequence level (the upper-level syntax structure) to determine relevant information.
[0331] Embodiment 2.3: As shown in Table 13, the fourth IBC flag slice_ibc_pf_flag at the slice level can rely on the flag seq_ibc_flag at the sequence level (the upper-level syntax structure) to determine the relevant.
[0332] Table 13
[0333]
[0334] Regarding the syntax structure in Table 13:
[0335] In the sequence header
[0336]
[0337] Copy the intra prediction flag for the sequence header block;
[0338] Binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0339] In the opening credits
[0340]
[0341] Copy the intra prediction filter flag for the slice header block;
[0342] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0343] The embodiment provided by method P1000 can be implemented by combining various semantics shown in Table 13. For a detailed description, reference can be made to embodiment 2.1, in which the embodiment provided by method P1000 can be implemented by combining various semantics shown in Table 11.
[0344] Embodiment 2.4: As shown in Table 14, the fourth IBC flag slice_ibc_pf_flag at the slice level may depend on the flag seq_ibc_pf_flag at the sequence level (the upper syntax structure) to determine the correlation.
[0345] Table 14
[0346]
[0347] Regarding the grammatical structure in Table 14:
[0348] Sequence header
[0349]
[0350] Copy the intra prediction filter flag for the sequence header block;
[0351] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of seq_ibc_pf_flag. If seq_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0352] In the opening credits
[0353]
[0354] Copy the intra prediction filter flag for the slice header block;
[0355] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0356] Among them, the embodiments provided by method P1000 can be implemented in combination with various semantics shown in Table 14. For specific descriptions, reference can be made to the embodiments provided by method P1000 that can be implemented in combination with various semantics shown in Table 12 in Embodiment 2.2.
[0357] Regarding Embodiment 3 of method P1000: The above-mentioned second-level syntax structure is block-level. As mentioned before, in this embodiment, the above-mentioned first-level syntax structure can be sequence-level, frame-level, or slice-level. In Embodiments 3.1 and 3.2, taking the first syntax structure as slice-level as an example, specifically, when it is impossible to exclude that a frame does not adopt the IBC mode or the IBCPF mode according to the slice-level flag, this embodiment is executed. Suppose the above-mentioned fourth IBC flag can be expressed as: cu_ibc_pf_flag. The fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag at the slice level (the upper-level syntax structure) to determine relevant information.
[0358] Embodiment 3.1: As shown in Table 15, the fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag slice_ibc_flag at the slice level (the upper-level syntax structure) to determine the relevant.
[0359] Table 15
[0360]
[0361] Regarding the syntax structure in Table 15:
[0362] In the header
[0363]
[0364] It is the intra prediction flag for header block replication;
[0365] Binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SliceIbcFlag is equal to the value of slice_ibc_flag. If slice_ibc_flag does not exist in the bitstream, the value of SliceIbcFlag is 0.
[0366] In the coded block
[0367]
[0368] is the block-level block copy intra prediction filtering flag;
[0369] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SliceIbcFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of SliceIbcFlag is 0.
[0370] Among them, various semantics shown in Table 15 can be combined to implement the embodiments provided by method P1000. For specific descriptions, reference can be made to the embodiments provided by method P1000 that can be implemented by combining various semantics shown in Table 11 in Embodiment 2.1.
[0371] Embodiment 3.2: As shown in Table 16, the fourth IBC flag cu_ibc_pf_flag at the block level can be determined to be relevant depending on the flag slice_ibc_pf_flag at the slice level (superior syntax structure).
[0372] Table 16
[0373]
[0374] Regarding the syntax structure in Table 16:
[0375] In the picture header
[0376]
[0377] is the picture header block copy intra prediction filtering flag;
[0378] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SliceIbcPfFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of SliceIbcPfFlag is 0.
[0379] In the coded block
[0380]
[0381] is the block-level block copy intra prediction filtering flag;
[0382] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SliceIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of SliceIbcPfFlag is 0.
[0383] Among them, various semantics shown in Table 16 can be combined to implement the embodiments provided by method P1000. For specific descriptions, reference can be made to the embodiments provided by method P1000 that can be implemented by combining various semantics shown in Table 12 in Embodiment 2.2.
[0384] In the case where the second-level syntax structure is block-level, in this embodiment, the above first-level syntax structure can also be frame-level. Embodiments 3.3 and 3.4 take the first syntax structure as frame-level as an example. The fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag at the frame level (the upper-level syntax structure) to determine relevant information.
[0385] Embodiment 3.3: As shown in Table 17, the fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag pic_ibc_flag at the frame level (the upper-level syntax structure) to determine the relevant.
[0386] Table 17
[0387]
[0388] Regarding the syntax structure in Table 17:
[0389] In the picture header
[0390]
[0391] Copy the intra prediction flag for the picture header block;
[0392] Binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of PicIbcFlag is equal to the value of pic_ibc_flag. If pic_ibc_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0393] In the coded block
[0394]
[0395] Copy the intra prediction filtering flag for the block-level block;
[0396] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0397] Among them, various semantics shown in Table 17 can be combined to implement the embodiments provided by method P1000. For specific descriptions, reference can be made to the embodiments provided by method P1000 that can be implemented by combining various semantics shown in Table 13 in Embodiment 2.3.
[0398] Embodiment 3.4: As shown in Table 18, the fourth IBC flag cu_ibc_pf_flag at the block level can be determined to be relevant depending on the flag pic_ibc_pf_flag at the frame level (superior syntax structure).
[0399] Table 18
[0400]
[0401] Regarding the syntax structure in Table 16:
[0402] In the picture header
[0403]
[0404] Copy the in-frame prediction filtering flag for the picture header block;
[0405] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of pic_ibc_pf_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0406] In the coding block
[0407]
[0408] Copy the in-frame prediction filtering flag for the block-level block;
[0409] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0410] Among them, various semantics shown in Table 14 can be used to implement the embodiments provided by method P1000. For specific descriptions, reference can be made to the embodiments provided by method P1000 in conjunction with various semantics shown in Table 14 in Embodiment 2.4.
[0411] When the second-level syntax structure is block-level, the first-level syntax structure in this embodiment can also be sequence-level. In Embodiments 3.5 and 3.6, the first syntax structure is taken as an example of sequence-level. The fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag at the sequence level (the upper-level syntax structure) to determine relevant information.
[0412] Embodiment 3.5: As shown in Table 19, the fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag seq_ibc_flag at the sequence level (the upper-level syntax structure) to determine the relevant.
[0413] Table 19
[0414]
[0415] Regarding the syntax structure in Table 19:
[0416] In the sequence header
[0417]
[0418] Copy the intra prediction flag for the sequence header block;
[0419] Binary variable. The value of '1' indicates that the IBC mode can be used; the value of '0' indicates that the IBC mode should not be used. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0420] In the coded block
[0421]
[0422] Copy the intra prediction filtering flag for the block-level block;
[0423] Binary variable. The value of '1' indicates that the IBCPF mode can be used; the value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0424] Among them, the embodiments provided by method P1000 can be implemented in combination with the various semantics shown in Table 19. For specific descriptions, reference can be made to the embodiments provided by method P1000 in combination with the various semantics shown in Table 13 in Embodiment 2.3.
[0425] Embodiment 3.6: As shown in Table 20, the fourth IBC flag cu_ibc_pf_flag at the block level can be determined to be relevant depending on the flag seq_ibc_pf_flag at the sequence level (superior syntax structure).
[0426] Table 20
[0427]
[0428] Regarding the syntax structure in Table 20:
[0429] In the sequence header
[0430]
[0431] Copy the intra prediction filtering flag for the sequence header block;
[0432] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of seq_ibc_pf_flag. If seq_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0433] In the coded block
[0434]
[0435]
[0436] Copy the intra prediction filtering flag for the block-level block;
[0437] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0438] Among them, the embodiments provided by method P1000 can be implemented in combination with the various semantics shown in Table 20. For specific descriptions, reference can be made to the embodiments provided by method P1000 in combination with the various semantics shown in Table 14 in Embodiment 2.4.
[0439] In the above embodiments of method P1000, when a flag is included in the lower level of the coded bitstream, the target block can be determined by relying on the flag above that level (higher level). The determination of the target block is achieved by combining the relevant flags of the two levels, thus providing a flexible determination method, which is beneficial to saving the encoding and decoding time and improving the encoding and decoding performance.
[0440] As another implementation manner of S510:
[0441] S510-1: Parse the bitstream to obtain the fifth IBC flag at the block level, where the fifth IBC flag is used to indicate whether the current block supports the IBCPF mode and different types of the supported IBCPF mode.
[0442] Through the above fifth IBC flag, not only can the above target block be determined, but also the filtering method for the target block can be further determined. Exemplarily, the above fifth IBC flag can be expressed as: cu_ibc_pf_index. Table 21 shows the relevant semantics of cu_ibc_pf_index.
[0443] Table 21
[0444]
[0445] Regarding the syntax structure in Table 21:
[0446] In the coded block
[0447]
[0448] Is the block-level block copy intra prediction filtering flag;
[0449] Binary variable. A value greater than '0' indicates the IBCPF mode used; a value of '0' indicates that the IBCPF mode should not be used. The value of CuIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of CuIbcPfFlag is 0.
[0450] S510-2: In the case where the fifth IBC flag indicates that the current block does not support the IBCPF mode, determine that the current block is not the target block. Referring to Table 21, when the value of cu_ibc_pf_index is 0, it indicates that the current block does not support the IBCPF mode, and determine that the current block is not the target block.
[0451] S510-3: When the fifth IBC flag indicates that the current block supports any type of IBCPF mode, determine the current block as the target block. Referring to Table 21, when cu_ibc_pf_index has a value of 1 or 2, it indicates that the current block supports the IBCPF mode, and determine the current block as the target block.
[0452] In an exemplary embodiment, different IBCPF modes are decoded, and different filtering methods can also be indicated (different filtering methods will be introduced in detail in subsequent embodiments). For example, when it is decoded that cu_ibc_pf_index has a value of 1, it means that cu_ibc_pf_index has a value of 1, and in this case, filtering method A can be used; when it is decoded that cu_ibc_pf_index has a value of 2, it means that cu_ibc_pf_index has a value of 2, and in this case, filtering method B can be used.
[0453] As another implementation of S510:
[0454] S510-1’: Parse the bitstream to obtain the fourth IBC flag and the fifth IBC flag at the block level. The fourth IBC flag is used to indicate whether the current block supports the IBCPF mode, and the fifth IBC flag is used to indicate different types of supported IBCPF modes.
[0455] Combining the above fourth IBC flag and fifth IBC flag can not only determine the above target block but also further determine the filtering method for the target block. Exemplarily, the above fourth IBC flag can be represented as: cu_ibc_pf_flag, and the above fifth IBC flag can be represented as: cu_ibc_pf_index. Among them, Table 22 shows the related semantics of cu_ibc_pf_flag and cu_ibc_pf_index.
[0456] Table 22
[0457]
[0458] Regarding the syntax structure in Table 22:
[0459] In the coded block
[0460]
[0461] Is the block-level block copy intra prediction filtering flag;
[0462] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of CuIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of CuIbcPfFlag is 0.
[0463] Is the intra prediction filtering index for block-level block copy;
[0464] Indicates the IBCPF mode used. The value of CuIbcPfIndex is equal to the value of cu_ibc_pf_index. If cu_ibc_pf_index does not exist in the bitstream, the value of CuIbcPfIndex is 0.
[0465] S510-2': When the fourth IBC flag indicates that the current block does not support the IBCPF mode, determine that the current block is not the target block. Referring to Table 22, when the value of cu_ibc_pf_flag is 0, indicating that the current block does not support the IBCPF mode, in order to save decoding time, the fifth IBC flag may not be parsed, and it can be directly determined that the current block is not the target block.
[0466] S510-3': When the fourth IBC flag indicates that the current block supports the IBCPF mode, determine the current block as the target block. And the IBCPF mode can be determined according to the indication information of the fifth IBC flag. Referring to Table 22, when the value of cu_ibc_pf_index is 0, it indicates that the current block supports IBCPF mode 1; when the value of cu_ibc_pf_index is 1, it indicates that the current block supports IBCPF mode 2. The applicable filtering method can be determined according to the IBCPF mode supported by the target block.
[0467] In an exemplary embodiment, in addition to decoding to determine the above flags, it can also be obtained in the following ways:
[0468] Embodiment 1. The block-level indication information for indicating IBCPF (such as cu_ibc_pf_flag, cu_ibc_pf_index) can be derived according to the result of template matching. For example, by applying IBC prediction value template to IBCPF for the template, comparing the cost (such as SAD) of the template before and after application with the current block template, if the cost of applying IBCPF is smaller, it is determined to use IBCPF; otherwise, if the cost of applying IBCPF becomes larger, it is determined not to use IBCPF.
[0469] In Embodiment 2, the block-level indication information for indicating IBCPF (such as cu_ibc_pf_flag, cu_ibc_pf_index) can be derived according to an implicit coefficient (according to whether the transform coefficient meets a certain type of condition). It can be determined whether to use IBCPF based on the parity of the number of even transform coefficients. For example, use it when the number is odd and do not use it when the number is even.
[0470] In the embodiments of the present application, in addition to the embodiments Figures 6 to 10 provided on how to determine the target block according to the above flag display, it is also possible to implicitly determine whether the current block is the above target block. Specifically:
[0471] S1: Parse the bitstream to obtain target information, and determine whether the target current block supports the IBCPF mode according to the target information; and, S2: When it is determined that the current block supports the IBCPF mode, determine that the current block is the target block.
[0472] Embodiment 1: The above target information is the type of the image where the current block is located:
[0473] Specifically, if it is determined according to the image type that the ibc_pf_flag is not allowed to be used, there is no need to decode the syntax elements of the image header and the following levels to save decoding time. For example, the IBCPF mode is only allowed to be used in I-type images. For non-I-type images, it is not necessary to decode the syntax elements related to IBCPF in its block level, picture header, and image header.
[0474] Embodiment 2: The above target information is the color component of the current block:
[0475] For example, the IBCPF is only allowed to be used on the luminance component, or only allowed to be used on the chrominance component.
[0476] When the current block is a specific color component, the IBCPF is allowed to be used. For example, the IBCPF is only used for the luminance component Y, or only used for the chrominance components U or V, or the IBCPF is allowed to be used for the luminance components Y, U, and V.
[0477] Embodiment 3: The above target information is the size of the current block:
[0478] Specifically, the IBCPF is allowed to be used when the block size meets the conditions. If the current block size does not meet the conditions, it is not necessary to decode the syntax elements related to IBCPF at the block level. The block size includes one or more of width, height, or area. The above conditions can be greater than the first threshold, greater than or equal to the second threshold, less than the third threshold, less than or equal to the fourth threshold, etc. The above multiple thresholds are not limited and can be determined according to the actual situation.
[0479] For example, run using IBCPF only when the current block area (width × height) is greater than 64; or, allow the use of IBCPF when the current block width is less than or equal to 64; or, run using IBCPF when the current block height is less than or equal to 64; and so on.
[0480] Embodiment 4: The above target information is the type of the image where the current block is located;
[0481] Decode one or more of the above high-level syntax elements in a non-specific image type (such as a non-I image). For example, only in a non-I image, it is necessary to decode the ibc_pf_flag.
[0482] Embodiment 5: The above target information is the appropriate resolution (Adaptive Block Vector Resolution, ABVR) of the current block;
[0483] Specifically, when the ABVR of the current block meets specific conditions, the use of IBCPF is allowed. If the size of the ABVR of the current block does not meet the conditions, it is not necessary to decode the syntax elements related to block-level IBCPF to save decoding time.
[0484] Exemplarily, when the ABVR of the current block is a subset of the available ABVR list, the use of IBCPF is allowed. For example, if the available ABVR list is {1-pel, 4pel}, then only when the current block vector resolution is 1-pel, decode the block-level IBCPF; or, only when the current block vector resolution is 4-pel, allow the use of IBCPF. Another example, if the available ABVR list is {1 / 4pel, 1-pel, 4pel}, then only when the current block vector resolution is 1-pel, allow the use of IBCPF; or, only when the current block vector resolution is 1-pel and 4-pel, allow the use of IBCPF; and so on.
[0485] Embodiment 6: The above target information is the vector residual of the current block;
[0486] Exemplarily, when the vector residual of the current block (block vector differences, BVD) meets the conditions, the use of IBCPF is allowed; if the size of the block vector residual of the current block does not meet the conditions, it is not necessary to decode the syntax elements related to block-level IBCPF to improve decoding efficiency. For example. The above conditions are that the absolute value of the horizontal BVD and / or the vertical BVD of the current block meets a specific threshold. For example, greater than the first threshold, greater than or equal to the second threshold, less than the third threshold, less than or equal to the fourth threshold, etc. The above multiple thresholds are not limited and can be determined according to the actual situation. Another example, only when the horizontal BVD and the vertical BVD of the current block are both equal to 0, the use of IBCPF is allowed.
[0487] Embodiment 7: The above target information is the vector index of the current block;
[0488] Exemplarily, when the vector index of the current block meets the condition, IBCPF is allowed to be used; if the predicted block vector index of the current block does not meet the condition, it is not necessary to decode the syntax elements related to block-level IBCPF to save decoding time. For example, the above condition is that the absolute value of the block vector prediction index (bvp_idx) meets a specific threshold. For example, greater than the first threshold, greater than or equal to the second threshold, less than the third threshold, less than or equal to the fourth threshold, etc. The above multiple thresholds are not limited and can be determined according to the actual situation.
[0489] Embodiment 8: The above target information is the IBC tool corresponding to the IBC prediction mode of the current block;
[0490] In an exemplary embodiment, when the IBC tool level of the current block meets one or more of the following conditions, IBCPF is allowed to be used:
[0491] 1) The predicted block vector index is less than or equal to the first preset value. For example, the first preset value is 2;
[0492] 2) The block vector residual is less than or equal to the second preset value. For example, the second preset value is 0;
[0493] 3) The accuracy of ABVR meets the preset accuracy set. For example, the preset accuracy set is less than or equal to 1 pel accuracy;
[0494] In another exemplary embodiment, when one or more IBC tools in Table 23 are not used, IBCPF is allowed to be used.
[0495] Table 23
[0496] IBC tool IBCPF ABVR 0 SIBC, RRIBC, FIBC 0 IBC-PC, IBC-LIC 0 IBC-MBVD 0 IBC-TM, IBC-TM-AMVP, IBC-TM-MRG 0 IBC-BI-PRED 0 IBC-CIIP 0 IBC-GPM 0
[0497] In Table 23, when the value of IBCPF is 1, it means that IBCPF is allowed to be used for the current block under the corresponding IBC tool, that is, the current block can be used as the above target block; when the value of IBCPF is 0, it means that IBCPF is not allowed to be used for the current block under the corresponding IBC tool, that is, the current block is not the target block.
[0498] In an exemplary embodiment, through the above embodiments, a target block can be obtained, that is, the prediction mode is intra block copy IBC, and at the same time, IBCPF is also supported. Further, S520 and S530 are executed.
[0499] Reference Figure 5 , in S520, according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block, determine the target prediction information of the target block.
[0500] In this embodiment, a reference sample set in the adjacent region of the target block is obtained. For a target pixel in the target block, a reference sample related to the target pixel is determined from the reference sample set. Further, according to the reconstruction information of the related reference sample, the predicted value of the target pixel is filtered.
[0501] In an exemplary embodiment, the above adjacent region includes an upper reference sample set of TR rows and TC columns above the target block, and a left reference sample set of LR rows and LC columns to the left of the target block. For example, referring to Figure 11 , if the size information of the target block 110 is M×N, one row and 2M columns above the target block 110 are obtained as the upper reference sample set, and two N rows and one column to the left are used as the left reference sample set. Among them, the reference samples in the upper reference sample set of the target block 110 are denoted as r[i], and the reference samples in the left reference sample set are denoted as c[j], where r[0] is equal to c[0].
[0502] In an exemplary embodiment, the reconstructed value topPel[i] of the reference sample r[i] in the upper reference sample set of the target block 110 can be expressed in the following way:
[0503] for(i = 0; i < 2M; i++){
[0504] topPel[i] = r[i]
[0505] }。
[0506] The reconstructed value leftPel[j] of the reference sample c[j] in the left reference sample set of the target block 110 can be expressed in the following way:
[0507] for(j = 0; i < 2N; i++){
[0508] leftPel[j] = c[j]
[0509] }。
[0510] As described above, after determining the reference sample set of the target block, the original predicted value of the target block can be filtered according to the reconstruction information of the pixel samples in the reference sample set. Exemplarily, for any pixel (denoted as the target pixel) in the target block, according to the position information of the target pixel in the target block, a reference sample is determined in the adjacent region of the target block (i.e., the above reference sample set); then, according to the reconstruction information of the reference sample and the original prediction information of the target pixel, the target prediction information of the target pixel is determined. Thus, the filtering process of the original prediction information of the target block is realized. Exemplarily, Figure 12 and Figure 13 respectively provide two filtering methods.
[0511] Figure 12 This is a schematic flowchart of the method P1200 for determining target prediction information provided by an embodiment of the present application. It can be used as a specific implementation of S520 and can be denoted as filtering method A.
[0512] In S1210, according to the position information of the target pixel in the target block, a first reference sample is determined in the left adjacent region of the target block, and a second reference sample is determined in the upper adjacent region of the target block.
[0513] Reference Figure 11 , the size information of the target block 110 is M×N, the position information of the target pixel (any pixel in the target block) in the target block 110 is (x, y), x is a positive integer not greater than M, y is a positive integer not greater than N, and M and N are positive integers.
[0514] Examples of determining the reference sample of the target pixel:
[0515] Embodiment 1: Combine the position information (x, y) of the target pixel and the size information of the target block 110 to determine the reference sample (the first reference sample and the second reference sample) of the target pixel. For example, the above first reference sample includes: the first pixel c[N + 1] related to the horizontal size N of the target block 110, and the second pixel c[y + 1] related to the vertical position y of the target pixel; the above second reference sample includes: the third pixel r[M + 1] related to the vertical size M of the target block, and the fourth pixel r[x + 1] related to the horizontal position x of the target pixel.
[0516] Embodiment 2: Determine the reference sample of the target pixel according to the position information (x, y) of the target pixel. For example, a reference sample can be: the second pixel c[y + 1] (the first reference sample) related to the vertical position y of the target pixel and the fourth pixel r[x + 1] (the second reference sample) related to the horizontal position x of the target pixel.
[0517] In S1220, according to the first reconstruction information of the first reference sample and the second reconstruction information of the second reference sample, the in-frame prediction intermediate value of the target pixel is determined.
[0518] Among them, taking the above "Embodiment 1" as an example to introduce the specific implementation of S1220:
[0519] The first reconstruction information includes: the reconstruction value leftPel[N + 1] of the first pixel c[N + 1], and the reconstruction value leftPel[y + 1] of the second pixel c[y + 1]. The second reconstruction information includes: the reconstruction value topPel[M + 1] of the third pixel r[M + 1], and the reconstruction value topPel[x + 1] of the fourth pixel r[x + 1].
[0520] S1220 - 1: Determine the vertical intra - prediction component of the target pixel according to the reconstruction information of the first pixel, the reconstruction information of the fourth pixel, the horizontal size N of the target block, and the vertical position y of the target pixel in the vertical direction.
[0521] Exemplarily, determine the vertical intra - prediction component predV of the target pixel according to formula (1).
[0522] predV = ((N - 1 - y) × topPel[x + 1]+(y + 1) × leftPel[N + 1]+(N >> 1)) >> Log(N) (1)
[0523] S1220 - 2: Determine the horizontal intra - prediction component of the target pixel according to the reconstruction information of the second pixel, the reconstruction information of the third pixel, the vertical size M of the target block, and the horizontal position x of the target pixel in the horizontal direction;
[0524] Exemplarily, determine the horizontal intra - prediction component predH of the target pixel according to formula (2).
[0525] predH = ((M - 1 - x) × leftPel[y + 1]+(x + 1) × topPel[M + 1]+(M >> 1)) >> Log(M) (2)
[0526] S1220 - 3: Determine the intra - prediction intermediate value of the target pixel according to the vertical intra - prediction component and the horizontal intra - prediction component.
[0527] Exemplarily, determine the intra - prediction intermediate value predPlane[x][y] of the target pixel according to formula (3).
[0528] predPlane[x][y] = (predV + predH + 1) >> 1 (3)
[0529] In other embodiments, the intra - prediction intermediate value of the target pixel can also be determined in other ways, and the embodiments of the present application do not limit this.
[0530] In S1230, determine the target prediction information of the target pixel according to the intra - prediction intermediate value of the target pixel and the original prediction information of the target pixel.
[0531] Exemplarily, the target prediction information amount predMatrixTmp[x][y] of the target pixel is determined according to formula (4).
[0532] predMatrixTmp[x][y] = ((predIBC[x][y] × 5 + predPlane[x][y] × 3 + 4) >> 3) (4)
[0533] In S1230’, the target prediction information of the target pixel is determined according to the intra-prediction intermediate value of the target pixel, the original prediction information of the target pixel, and the filtering coefficient.
[0534] Exemplarily, the target prediction information amount predMatrixTmp[x][y] of the target pixel is determined according to formula (5).
[0535] predMatrixTmp[x][y] = ((predIBC[x][y] × 5 + predPlane[x][y] × 3 + f[x] × f[y]) >> 3) (5)
[0536] Wherein, predIBC[x][y] flags the original prediction information of the target pixel; the filtering parameters f[x], f[y] are related to the position information of the target pixel in the target block. Alternatively, the filtering parameters f[x], f[y] are related to the size information of the target block. Alternatively, the filtering parameters f[x], f[y] are related to the position information in the target block and the size information of the target block. For example, the filtering parameters can be determined according to Table 24.
[0537] Table 24
[0538]
[0539] Figure 13 It is a schematic flowchart of the method P1300 for determining target prediction information provided by another embodiment of the present application. It can be used as another specific implementation manner of S520, and can be denoted as filtering method B.
[0540] In S1310, according to the position information of the target pixel in the target block, a third reference sample is determined in the left adjacent region of the target block, and a fourth reference sample is determined in the upper adjacent region of the target block.
[0541] Reference Figure 11, the size information of the target block 110 is M×N, the position information of the target pixel (any pixel in the target block) in the target block 110 is (x, y), x is a positive integer not greater than M, y is a positive integer not greater than N, and M and N are positive integers.
[0542] Examples of determining the reference sample of the target pixel:
[0543] Example 1: Combine the position information (x, y) of the target pixel and the size information of the target block 110 to determine the reference samples (the third reference sample and the fourth reference sample) of the target pixel. For example, the above-mentioned third reference sample includes: the first pixel c[N + 1] related to the horizontal size N of the target block 110, and the second pixel c[y + 1] related to the vertical position y of the target pixel; the above-mentioned fourth reference sample includes: the third pixel r[M + 1] related to the vertical size M of the target block, and the fourth pixel r[x + 1] related to the horizontal position x of the target pixel.
[0544] Example 2: Determine the reference sample of the target pixel according to the position information (x, y) of the target pixel. For example, a reference sample can be: the second pixel c[y + 1] (the third reference sample) related to the vertical position y of the target pixel and the fourth pixel r[x + 1] (the fourth reference sample) related to the horizontal position x of the target pixel.
[0545] In S1320, determine the target prediction information of the target pixel according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, and the original prediction information of the target pixel;
[0546] Among them, taking the above "Example 2" as an example to introduce the specific implementation manner of S1320:
[0547] Exemplarily, determine the target prediction information predMatrixTmp[x][y] of the target pixel according to formula (6).
[0548] predMatrixTmp[x][y] = Clip1((leftPel[y + 1] + topPel[x + 1] + (64 - f[x] - f[y]) × predIBC[x][y] +
[0549] 32) >> 6)(6)
[0550] In S1320', determine the target prediction information of the target pixel according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, the original prediction information of the target pixel, and the filtering parameter
[0551] Among them, taking the above "Embodiment 2" as an example, the specific implementation manner of S1320' is introduced:
[0552] Exemplarily, the target prediction information amount predMatrixTmp[x][y] of the target pixel is determined according to formula (7).
[0553] predMatrixTmp[x][y]=Clip1((f[x]×leftPel[y + 1]+f[y]×topPel[x + 1]+(64 - f[x] - f[y])×
[0554] predIBC[x][y]+32)>>6) (7)
[0555] Among them, predIBC[x][y] flags the original prediction information of the target pixel; the filtering parameter f[x]×f[y] is related to the position information of the target pixel in the target block and the size information of the target block. Exemplarily, the filtering parameter can be determined according to Table 24.
[0556] In addition to the filtering method for the predicted value of the target block provided as Figure 12 and Figure 13 other methods can also be used to filter the prediction information of the target block. For example: filtering the target quantity prediction information by constructing a mathematical model.
[0557] Among them, the above mathematical model can be a linear model, a polynomial model, a convolution model, etc. For example, the mathematical model can be: f(x)=a×x + b; or,
[0558] f(x)=a0 + a1×x + a2×x^2+…+an×x^n; or,
[0559] f(C,N,S,E,W,B)=c 0 ×C + c 1 ×N + c 2 ×S + c 3 ×E + c 4 ×W + c 5 ×P + c 6 ×B;
[0560] Among them, C represents the sample at the current position, N, S, E, W are the samples in the north, south, east, and west directions respectively, the non - linear term P=(C×C + midVal)>>bitDepth; the bias term B represents the scalar offset between the input and the output and is set to the intermediate brightness value. a0 - a n and c 0 -c 6 are constants, and the specific values can be determined according to actual needs.
[0561] It can be understood that the template parameters can derive the model parameters of the template through the current block and the reference block.
[0562] It can be understood that the different filtering methods shown above can be combined and used. For example, the predicted values derived from different filtering methods are weighted and combined, and the embodiments of the present application do not limit this.
[0563] Continue to refer to Figure 5 , in S530, according to the target prediction information, determine the reconstruction information of the target block.
[0564] Exemplarily, after the prediction information of the target block is filtered in the manner shown in S520, the target prediction information of the target block is obtained. Further, the above target prediction information is added to the corresponding residual information to obtain the reconstruction information of the target block.
[0565] In the solution provided by the embodiments of the present application, for a target block with an intra block copy (IBC) prediction mode, if the reconstructed block is obtained based on the original prediction information of the target block, there may be discontinuous boundaries in the reconstructed block, and thus there may be poor spatial continuity between the block and its surrounding pixels. In the embodiments of the present application, the target prediction information of the target block is jointly determined according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block. Since the reconstruction information of the surrounding region of the block is added to the target prediction information, it is beneficial to the smooth transition between the target block and its surrounding region, thus being beneficial to reducing the spatial continuity between the target block and its surrounding region, and further improving the image quality and being beneficial to improving the coding and decoding performance.
[0566] As described above in conjunction with Figures 5 to 13 , the embodiments of the video decoding method of the present application have been described in detail. Below, in conjunction with Figure 14 , embodiments of the video encoding method of the present application will be introduced.
[0567] Figure 14 FIG. P1400 is a schematic flowchart of the video decoding method provided by the embodiments of the present application. Among them, the execution subject of method P1400 is an encoder, such as an electronic device with encoding functions. Refer to Figure 14 , method P1400 includes: S1410 to S1430.
[0568] In S1410, determine a target block, and the prediction mode of the target block is intra block copy (IBC) prediction.
[0569] The above target block is the current coding unit (CU). In the embodiments of the present application, the above target block is a CU obtained by prediction in the IBC prediction mode. Further, since the embodiments of the present application will perform filtering processing on the original prediction information of the target block, the above target block in the embodiments of the present application should also support the use of Intra Block Copy Prediction Filter (IBCPF).
[0570] In the embodiments of the present application, it is possible to explicitly determine whether the current block is the above target block according to the flag regarding the IBC mode and / or the IBCPF mode. Specifically, relevant flags are written into the bitstream at the encoder end.
[0571] Embodiment A:
[0572] In an exemplary embodiment, a first IBC flag of a first-level syntax structure is written into the bitstream, and the first IBC flag is used to indicate whether the coding information of the first-level syntax structure adopts the IBC mode and whether it supports the Intra Block Copy Prediction Filter IBCPF mode when the IBC mode is adopted.
[0573] As described above, the syntax levels of the coded bitstream include: sequence level, frame level, slice level, block level, etc. The above first-level syntax structure in the embodiments of the present application can be any one of the sequence level, frame level, slice level, and block level.
[0574] Regarding Embodiment 1 of Embodiment A: The above first-level syntax structure is the sequence level. Suppose the above first IBC flag can be expressed as: seq_ibc_flag. The semantic information represented when seq_ibc_flag takes different values is shown in Table 25.
[0575] Table 25
[0576]
[0577] Regarding the syntax structure of Table 25:
[0578]
[0579] Or,
[0580]
[0581] Wherein, is the sequence header block copy mode flag;
[0582] Indicates the mode type of the block copy intra prediction mode. A value of '0' indicates that IBC should not be used, and a value greater than '0' indicates that IBC can be used and also indicates whether IBCPF is allowed. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0583] Regarding Embodiment 2 of Embodiment A: The above first-level syntax structure is at the frame level. Suppose the above first IBC flag can be represented as: pic_ibc_flag. The semantic information represented when pic_ibc_flag takes different values is shown in Table 26.
[0584] Table 26
[0585]
[0586] The syntax structure regarding Table 26 is:
[0587]
[0588] Or,
[0589]
[0590] Where, Is the image header block copy mode flag;
[0591] Indicates the mode type of the block copy intra prediction mode. A value of '0' indicates that IBC should not be used, and a value greater than '0' indicates that IBC can be used and also indicates whether IBCPF is allowed. The value of PicIbcFlag is equal to the value of pic_ibc_flag. If pic_ibc_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0592] Regarding Embodiment 3 of Embodiment A: The above first-level syntax structure is at the slice level. Suppose the above first IBC flag can be represented as: slice_ibc_flag. The semantic information represented when slice_ibc_flag takes different values is shown in Table 27.
[0593] Table 27
[0594]
[0595] The syntax structure regarding Table 27 is:
[0596]
[0597] Or,
[0598]
[0599] in, The header block copy mode flag;
[0600] Indicates the mode type of the block copy intra prediction mode. A value of '0' indicates that IBC should not be used. A value greater than '0' allows IBC to be used and indicates whether IBCPF is allowed. The value of SliceIbcFlag is equal to the value of slice_ibc_flag. If slice_ibc_flag does not exist in the bitstream, the value of SliceIbcFlag is 0.
[0601] Regarding implementation mode 4 of method embodiment A: the first-level syntax structure is block-level. If the first IBC flag can be represented as: cu_ibc_flag. The semantic information represented by different values of cu_ibc_flag is shown in Table 28.
[0602] Table 28
[0603]
[0604] The grammatical structure of Table 28 is:
[0605]
[0606] in, It is the block-level block copy mode flag;
[0607] Indicates the mode type of the block copy intra prediction mode. A value of '0' indicates that IBC should not be used. A value greater than '0' allows IBC to be used and indicates whether IBCPF is allowed. The value of CuIbcFlag is equal to the value of cu_ibc_flag. If cu_ibc_flag does not exist in the bitstream, the value of CuIbcFlag is 0.
[0608] In embodiment A, a flag is encoded into a code stream of each layer, and the target block is marked by a flag, which is beneficial to saving decoding time and improving decoding efficiency and performance.
[0609] Embodiment B:
[0610] In an exemplary embodiment, a first IBC flag and a second IBC flag of a first-level syntax structure are written into a bitstream, wherein the first IBC flag is used to indicate whether the encoding information of the first-level syntax structure adopts an IBC mode, and the second IBC flag is used to indicate whether the encoding information of the first-level syntax structure supports an intra-block copy prediction filtering IBCPF mode.
[0611] As described above, the syntax levels of the coded bitstream include: sequence level, picture level, slice level, block level, etc. In the embodiments of the present application, the above first-level syntax structure can be any one of the sequence level, picture level, slice level, and block level.
[0612] Regarding Embodiment 1 of Embodiment B: The above first-level syntax structure is the sequence level. Suppose the above first IBC flag can be expressed as: seq_ibc_flag, and the above second IBC flag can be expressed as: seq_ibc_pf_flag. The semantic information represented when seq_ibc_flag and seq_ibc_pf_flag have different values is shown in Table 29.
[0613] Table 29
[0614]
[0615] The syntax structure regarding Table 29 is as follows:
[0616]
[0617] Among them, is the sequence header block copy intra prediction flag;
[0618] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0619] is the sequence header block copy intra prediction filtering mode flag;
[0620] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of seq_ibc_pf_flag. If seq_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0621] Regarding Embodiment 2 of Embodiment B: The above first-level syntax structure is the picture level. Suppose the above first IBC flag can be expressed as: pic_ibc_flag, and the above second IBC flag can be expressed as: pic_ibc_pf_flag. The semantic information represented when pic_ibc_flag and pic_ibc_pf_flag have different values is shown in Table 30.
[0622] Table 30
[0623]
[0624] The syntax structure for Table 30 is as follows:
[0625]
[0626] Among them, is the intra prediction flag for picture header block copy;
[0627] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of PicIbcFlag is equal to the value of pic_ibc_flag. If pic_ibc_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0628] is the intra prediction filtering mode flag for picture header block copy;
[0629] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of pic_ibc_pf_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0630] Regarding Embodiment 3 of Embodiment B: The above first-level syntax structure is at the slice level. Suppose the above first IBC flag can be expressed as: slice_ibc_flag, and the above second IBC flag can be expressed as: slice_ibc_pf_flag. The semantic information represented when slice_ibc_flag and slice_ibc_pf_flag have different values is shown in Table 31.
[0631] Table 31
[0632]
[0633] The syntax structure for Table 31 is as follows:
[0634]
[0635] Among them, is the intra prediction flag for slice header block copy;
[0636] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SliceIbcFlag is equal to the value of slice_ibc_flag. If slice_ibc_flag does not exist in the bitstream, the value of SliceIbcFlag is 0.
[0637] Copy the intra prediction filter mode flag for the slice header block;
[0638] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SliceIbcPfFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of SliceIbcPfFlag is 0.
[0639] Regarding implementation mode 4 of embodiment B: the first-level syntax structure is block-level, if the first IBC flag can be represented as cu_ibc_flag, the second IBC flag can be represented as cu_ibc_pf_flag. The semantic information represented by cu_ibc_flag and cu_ibc_pf_flag when they have different values is shown in Table 32.
[0640] Table 32
[0641]
[0642] The syntax structure of Table 32 is as follows:
[0643]
[0644] in, Copy the intra prediction flag for block level blocks;
[0645] Binary variable. A value of '1' indicates that IBC mode can be used; a value of '0' indicates that IBC mode should not be used. The value of CuIbcFlag is equal to the value of cu_ibc_flag. If cu_ibc_flag does not exist in the bitstream, the value of CuIbcFlag is 0.
[0646] Copy the intra prediction filter mode flag for block level blocks;
[0647] Binary variable. A value of '1' indicates that IBCPF mode can be used; a value of '0' indicates that IBCPF mode should not be used. The value of CuIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of CuIbcPfFlag is 0.
[0648] In the above Embodiment B, two flags of each level are written into the bitstream. Each level marks the above target block through two flags, and the second IBC flag depends on the value of the first IBC flag at the same level. Specifically, when the value of the first IBC flag at the same level determines that the current level does not support the IBC mode, it is not necessary to write the second IBC flag of the current level into the bitstream, which is beneficial to saving the decoding time and improving the decoding efficiency and performance.
[0649] Embodiment C:
[0650] Write the third IBC flag of the second-level syntax structure into the bitstream. The third IBC flag is used to indicate whether the coding information of the second-level syntax structure adopts the IBC mode and whether it supports the IBCPF mode when adopting the IBC mode.
[0651] As described above, the syntax levels of the coded bitstream include: sequence level, frame level, slice level, block level, etc.
[0652] In the embodiments of the present application, the above second-level syntax structure may be a frame level, a slice level, or a block level. Specifically, when the above first-level syntax structure is a sequence level, the second-level syntax structure is a frame level; or, when the above first-level syntax structure is a frame column level or a sequence level, the second-level syntax structure is a slice level; or, when the first level is a slice level, a frame level, or a sequence level, the second-level syntax structure is a block level.
[0653] The specific implementation manner of Embodiment C is similar to that of Embodiment A. The difference is that the second-level syntax structure in Embodiment C cannot be a sequence level.
[0654] Embodiment D:
[0655] Write the third IBC flag and the fourth IBC flag of the second-level syntax structure into the bitstream. The third IBC flag is used to indicate whether the coding information of the second-level syntax structure adopts the IBC mode, and the fourth IBC flag is used to indicate whether the coding information of the second-level syntax structure supports the IBCPF mode.
[0656] As described above, the syntax levels of the coded bitstream include: sequence level, frame level, slice level, block level, etc.
[0657] In the embodiments of the present application, the above second-level syntax structure may be a frame level, a slice level, or a block level. Specifically, when the above first-level syntax structure is a sequence level, the second-level syntax structure is a frame level; or, when the above first-level syntax structure is a frame column level or a sequence level, the second-level syntax structure is a slice level; or, when the first level is a slice level, a frame level, or a sequence level, the second-level syntax structure is a block level.
[0658] The specific implementation of Embodiment D is similar to that of Embodiment B, except that in Embodiment D, the second-level syntax structure cannot be the sequence level.
[0659] Embodiment E:
[0660] Write the fourth IBC flag of the second-level syntax structure into the bitstream, and the fourth IBC flag is used to indicate whether the coding information of the second-level syntax structure supports the IBCPF mode. In the embodiments of the present application, the above-mentioned second-level syntax structure may be frame level, slice level, or block level.
[0661] Regarding Embodiment 1 of Embodiment E: In this embodiment, the above-mentioned second-level syntax structure is the frame level, and the above-mentioned first-level syntax structure is the sequence level. Specifically, if the above-mentioned fourth IBC flag is the fourth IBC flag pic_ibc_pf_flag of the frame level, the relevant information can be determined depending on the flag of the sequence level (the upper-level syntax structure).
[0662] Embodiment 1.1: As shown in Table 33, the fourth IBC flag pic_ibc_pf_flag of the frame level can determine the relevant depending on the flag seq_ibc_flag of the sequence level (the upper-level syntax structure).
[0663] Table 33
[0664]
[0665] Regarding the syntax structure in Table 33:
[0666] In the sequence header
[0667]
[0668] Copy the intra prediction flag for the sequence header block;
[0669] Binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0670] In the picture header
[0671]
[0672] Copy the intra prediction filtering flag for the picture header block;
[0673] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcFlag is equal to the value of pic_ibc_pf_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0674] Embodiment 1.2: As shown in Table 34, the fourth IBC flag pic_ibc_pf_flag at the frame level can be determined to be relevant depending on the flag seq_ibc_pf_flag at the sequence level (the upper-level syntax structure).
[0675] Table 34
[0676]
[0677] Regarding the syntax structure in Table 34:
[0678] In the sequence header
[0679]
[0680] Copy the intra prediction filtering flag for the sequence header block;
[0681] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of seq_ibc_pf_flag. If seq_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0682] In the picture header
[0683]
[0684] Copy the intra prediction filtering flag for the picture header block;
[0685] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of pic_ibc_fp_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0686] Embodiment 2 of Embodiment E: The above second-level syntax structure is at the slice level. As described before, in this embodiment, the above first-level syntax structure can be at the sequence level or the frame level. In Embodiment 2.1 and Embodiment 2.2, taking the first syntax structure as the frame level as an example, specifically, when it is impossible to exclude that a frame does not adopt the IBC mode or the IBCPF mode according to the frame-level flag, this embodiment is executed. Suppose the above fourth IBC flag can be expressed as: slice_ibc_pf_flag. The fourth IBC flag slice_ibc_pf_flag at the slice level can depend on the flag at the frame level (the upper-level syntax structure) to determine relevant information.
[0687] Embodiment 2.1: As shown in Table 35, the fourth IBC flag slice_ibc_pf_flag at the slice level can depend on the flag pic_ibc_flag at the frame level (the upper-level syntax structure) to determine the relevant.
[0688] Table 35
[0689]
[0690] Regarding the syntax structure in Table 35:
[0691] In the picture header
[0692]
[0693] Copy the intra prediction flag for the picture header block;
[0694] Binary variable. The value of '1' indicates that the IBC mode can be used; the value of '0' indicates that the IBC mode should not be used. The value of PicIbcFlag is equal to the value of pic_ibc_flag. If pic_ibc_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0695] In the slice header
[0696]
[0697] Copy the intra prediction filtering flag for the slice header block;
[0698] Binary variable. The value of '1' indicates that the IBCPF mode can be used; the value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0699] Embodiment 2.2: As shown in Table 36, the fourth IBC flag at the slice level, slice_ibc_pf_flag, can be determined based on the flag at the frame level (the upper-level syntax structure), pic_ibc_pf_flag.
[0700] Table 36
[0701]
[0702] Regarding the syntax structure in Table 36:
[0703] In the picture header
[0704]
[0705] Copy the in-frame prediction filtering flag for the picture header block;
[0706] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of pic_ibc_pf_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0707] In the sequence header
[0708]
[0709] Copy the in-frame prediction filtering flag for the sequence header block;
[0710] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0711] In the case where the second-level syntax structure is at the slice level, in this embodiment, the above first-level syntax structure can also be at the sequence level. In Embodiments 2.3 and 2.4, the first syntax structure is taken as an example at the sequence level. The fourth IBC flag at the slice level, slice_ibc_pf_flag, can depend on the flag at the sequence level (the upper-level syntax structure) to determine relevant information.
[0712] Embodiment 2.3: As shown in Table 37, the fourth IBC flag at the slice level, slice_ibc_pf_flag, can be determined based on the flag at the sequence level (the upper-level syntax structure), seq_ibc_flag.
[0713] Table 37
[0714]
[0715] Regarding the syntax structure in Table 37:
[0716] In the sequence header
[0717]
[0718] Copy the intra prediction flag for the sequence header block;
[0719] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0720] In the picture header
[0721]
[0722] Copy the intra prediction filtering flag for the picture header block;
[0723] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0724] Embodiment 2.4: As shown in Table 38, the fourth IBC flag slice_ibc_pf_flag at the slice level can be determined based on the flag seq_ibc_pf_flag at the sequence level (the upper-level syntax structure).
[0725] Table 38
[0726]
[0727] Regarding the syntax structure in Table 38:
[0728] In the sequence header
[0729]
[0730] Copy the intra prediction filtering flag for the sequence header block;
[0731] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of seq_ibc_pf_flag. If seq_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0732] In the video header
[0733]
[0734]
[0735] Copy the intra prediction filtering flag for the video header block;
[0736] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0737] Regarding Embodiment 3 of Embodiment E: The above second-level syntax structure is at the block level. As mentioned before, in this embodiment, the above first-level syntax structure can be at the sequence level, frame level, or slice level. In Embodiment 3.1 and Embodiment 3.2, taking the first syntax structure as the slice level as an example, specifically, when it is impossible to exclude that a frame does not adopt the IBC mode or IBCPF mode based on the slice-level flag, this embodiment is executed. Suppose the above fourth IBC flag can be expressed as: cu_ibc_pf_flag. The fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag at the slice level (the upper-level syntax structure) to determine relevant information.
[0738] Embodiment 3.1: As shown in Table 39, the fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag slice_ibc_flag at the slice level (the upper-level syntax structure) to determine the relevant information.
[0739] Table 39
[0740]
[0741] Regarding the syntax structure in Table 39:
[0742] In the video header
[0743]
[0744] Copy the intra prediction flag for the video header block;
[0745] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SliceIbcFlag is equal to the value of slice_ibc_flag. If slice_ibc_flag does not exist in the bitstream, the value of SliceIbcFlag is 0.
[0746] In the coding block
[0747]
[0748] Is the block-level block copy intra prediction filtering flag;
[0749] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SliceIbcFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of SliceIbcFlag is 0.
[0750] Embodiment 3.2: As shown in Table 40, the fourth IBC flag cu_ibc_pf_flag at the block level can be determined to be relevant depending on the flag slice_ibc_pf_flag at the slice level (superior syntax structure).
[0751] Table 40
[0752]
[0753] Regarding the syntax structure in Table 40:
[0754] In the picture header
[0755]
[0756] Is the picture header block copy intra prediction filtering flag;
[0757] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SliceIbcPfFlag is equal to the value of slice_ibc_pf_flag. If slice_ibc_pf_flag does not exist in the bitstream, the value of SliceIbcPfFlag is 0.
[0758] In the coding block
[0759]
[0760] Is the block-level block copy intra prediction filtering flag;
[0761] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SliceIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of SliceIbcPfFlag is 0.
[0762] In the case where the second-level syntax structure is block-level, in this embodiment, the above first-level syntax structure can also be frame-level. In Embodiments 3.3 and 3.4, the first syntax structure is taken as an example of frame-level. The fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag at the frame level (the upper-level syntax structure) to determine relevant information.
[0763] Embodiment 3.3: As shown in Table 41, the fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag pic_ibc_flag at the frame level (the upper-level syntax structure) to determine the relevant.
[0764] Table 41
[0765]
[0766] Regarding the syntax structure in Table 41:
[0767] In the picture header
[0768]
[0769] Copy the intra prediction flag for the picture header block;
[0770] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of PicIbcFlag is equal to the value of pic_ibc_flag. If pic_ibc_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0771] In the coded block
[0772]
[0773] Copy the intra prediction filtering flag for the block-level block;
[0774] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of PicIbcFlag is 0.
[0775] Embodiment 3.4: In Table 42, the fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag pic_ibc_pf_flag at the frame level (superior syntax structure) to determine the correlation.
[0776] Table 42
[0777]
[0778] Regarding the syntax structure in Table 42:
[0779] In the picture header
[0780]
[0781] Copy the intra prediction filtering flag for the picture header block;
[0782] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of pic_ibc_pf_flag. If pic_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0783] In the coded block
[0784]
[0785] Copy the intra prediction filtering flag for the block-level block;
[0786] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of PicIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of PicIbcPfFlag is 0.
[0787] In the case where the second-level syntax structure is at the block level, in this embodiment, the above first-level syntax structure can also be at the sequence level. In Embodiments 3.5 and 3.6, the first syntax structure is taken as an example at the sequence level. The fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag at the sequence level (superior syntax structure) to determine the relevant information.
[0788] Embodiment 3.5: In Table 43, the fourth IBC flag cu_ibc_pf_flag at the block level can depend on the flag seq_ibc_flag at the sequence level (superior syntax structure) to determine the correlation.
[0789] Table 43
[0790]
[0791] Regarding the syntax structure in Table 43:
[0792] In the sequence header
[0793]
[0794] Copy the intra prediction flag for the sequence header block;
[0795] A binary variable. A value of '1' indicates that the IBC mode can be used; a value of '0' indicates that the IBC mode should not be used. The value of SeqIbcFlag is equal to the value of seq_ibc_flag. If seq_ibc_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0796] In the coded block
[0797]
[0798] Copy the intra prediction filtering flag for the block-level block;
[0799] A binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcFlag is 0.
[0800] Embodiment 3.6: As shown in Table 44, the fourth IBC flag cu_ibc_pf_flag at the block level can be determined to be relevant depending on the flag seq_ibc_pf_flag at the sequence level (the upper-level syntax structure).
[0801] Table 44
[0802]
[0803] Regarding the syntax structure in Table 44:
[0804] In the sequence header
[0805]
[0806] Copy the intra prediction filtering flag for the sequence header block;
[0807] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of seq_ibc_pf_flag. If seq_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0808] In the coded block
[0809]
[0810] Is the block-level block copy intra prediction filtering flag;
[0811] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of SeqIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of SeqIbcPfFlag is 0.
[0812] In the above embodiment E, when writing a flag included in the lower level into the bitstream, it can rely on the flag above this level (higher level) to jointly identify the above target block. Combining the relevant flags of the two levels to achieve the determination of the target block, thus providing a flexible determination method and being beneficial to saving the encoding and decoding time consumption and improving the encoding and decoding performance.
[0813] Embodiment F:
[0814] Write the fifth IBC flag at the block level into the bitstream, and the fifth IBC flag is used to indicate whether the current block supports the IBCPF mode and different types of the supported IBCPF mode.
[0815] Exemplarily, the above fifth IBC flag can be expressed as: cu_ibc_pf_index. Among them, Table 45 shows the relevant semantics of cu_ibc_pf_index.
[0816] Table 45
[0817]
[0818]
[0819] Regarding the syntax structure in Table 45:
[0820] In the coded block
[0821]
[0822] Is the block-level block copy intra prediction filtering flag;
[0823] Binary variable. A value greater than '0' indicates the IBCPF mode in use; a value of '0' indicates that the IBCPF mode should not be used. The value of CuIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of CuIbcPfFlag is 0.
[0824] Embodiment G:
[0825] Write the fourth IBC flag and the fifth IBC flag at the block level into the bitstream. The fourth IBC flag is used to indicate whether the current block supports the IBCPF mode, and the fifth IBC flag is used to indicate different types of supported IBCPF modes.
[0826] Exemplarily, the above-mentioned fourth IBC flag can be expressed as: cu_ibc_pf_flag, and the above-mentioned fifth IBC flag can be expressed as: cu_ibc_pf_index. Among them, Table 46 shows the relevant semantics of cu_ibc_pf_flag and cu_ibc_pf_index.
[0827] Table 46
[0828]
[0829] Regarding the syntax structure in Table 46:
[0830] In the coded block
[0831]
[0832] Is the block-level block copy intra prediction filtering flag;
[0833] Binary variable. A value of '1' indicates that the IBCPF mode can be used; a value of '0' indicates that the IBCPF mode should not be used. The value of CuIbcPfFlag is equal to the value of cu_ibc_pf_flag. If cu_ibc_pf_flag does not exist in the bitstream, the value of CuIbcPfFlag is 0.
[0834] Is the block-level block copy intra prediction filtering index;
[0835] Indicates the IBCPF mode in use. The value of CuIbcPfIndex is equal to the value of cu_ibc_pf_index. If cu_ibc_pf_index does not exist in the bitstream, the value of CuIbcPfIndex is 0.
[0836] In an exemplary embodiment, in addition to indicating the target block by writing the above flag into the bitstream, the target block can also be indicated in the following manner: writing target information into the bitstream, where the target information is used to determine whether the current block supports the IBCPF mode.
[0837] Embodiment 1: The above target information is the type of the image where the current block is located:
[0838] Specifically, the IBCPF mode is only allowed to be used in I-type images; for non-I-type images, the IBCPF mode is not used, and thus, the IBCPF-related syntax elements do not need to be written into the bitstream to improve the encoding efficiency.
[0839] Embodiment 2: The above target information is the color component of the current block:
[0840] For example, the IBCPF is only allowed to be used on the luminance component, or only allowed to be used on the chrominance component.
[0841] The IBCPF is allowed to be used only when the current block is a specific color component. For example, the IBCPF is only used for the luminance component Y, or only used for the chrominance components U or V, or the IBCPF is allowed to be used for all of the luminance component Y, U, and V.
[0842] Embodiment 3: The above target information is the size of the current block:
[0843] Specifically, the IBCPF is allowed to be used when the block size meets the conditions. If the current block size does not meet the conditions, the IBCPF is not allowed to be used. The block size includes one or more of the width, height, or area. The above conditions can be greater than a first threshold, greater than or equal to a second threshold, less than a third threshold, less than or equal to a fourth threshold, etc. The above multiple thresholds are not limited and can be determined according to the actual situation.
[0844] For example, the IBCPF is only used when the area (width × height) of the current block is greater than 64; or, the IBCPF is allowed to be used when the width of the current block is less than or equal to 64; or, the IBCPF is used when the height of the current block is less than or equal to 64; and so on.
[0845] Embodiment 4: The above target information is the type of the image where the current block is located;
[0846] If the IBCPF is allowed to be used in non-specific image types (such as non-I images), then when the image is of a non-specific type, the IBCPF flag is written into the bitstream.
[0847] Embodiment 5: The above target information is the Adaptive Block Vector Resolution (ABVR) of the current block;
[0848] Specifically, when the current block ABVR meets specific conditions, the IBCPF is allowed to be used. If the size of the ABVR of the current block does not meet the conditions, the IBCP is not allowed to be used.
[0849] Exemplarily, when the ABVR of the current block is a subset of the available ABVR list, the IBCPF is allowed to be used. For example, if the available ABVR list is {1-pel, 4pel}, then the block-level IBCPF is written into the bitstream only when the current block vector resolution is 1-pel; or, the IBCPF is allowed to be used only when the current block vector resolution is 4-pel. Another example, if the available ABVR list is {1 / 4pel, 1-pel, 4pel}, then the IBCPF is allowed to be used only when the current block vector resolution is 1-pel; or, the IBCPF is allowed to be used only when the current block vector resolution is 1-pel and 4-pel; and so on.
[0850] Embodiment 6: The above target information is the vector residual of the current block;
[0851] Exemplarily, the IBCPF is allowed to be used only when the block vector differences (BVD) of the current block meet the conditions; if the size of the block vector differences of the current block does not meet the conditions, the syntax elements related to the block-level IBCPF do not need to be written into the bitstream to improve the coding efficiency. For example. The above conditions are that the absolute value of the horizontal BVD and / or the vertical BVD of the current block meet a specific threshold. For example, greater than the first threshold, greater than or equal to the second threshold, less than the third threshold, less than or equal to the fourth threshold, etc. The above multiple thresholds are not limited and can be determined according to the actual situation. Another example, the IBCPF is allowed to be used only when the horizontal BVD and the vertical BVD of the current block are both equal to 0.
[0852] Embodiment 7: The above target information is the vector index of the current block;
[0853] Exemplarily, the IBCPF is allowed to be used when the vector index of the current block meets the conditions; if the predicted block vector index of the current block does not meet the conditions, the syntax elements related to the block-level IBCPF do not need to be written into the bitstream to improve the coding efficiency. For example, the above conditions are that the absolute value of the block vector prediction index (bvp_idx) meets a specific threshold. For example, greater than the first threshold, greater than or equal to the second threshold, less than the third threshold, less than or equal to the fourth threshold, etc. The above multiple thresholds are not limited and can be determined according to the actual situation.
[0854] Embodiment 8: The above target information is the IBC tool corresponding to the IBC prediction mode of the current block;
[0855] In an exemplary embodiment, IBCPF is allowed to be used when the IBC tool level of the current block meets one or more of the following conditions:
[0856] 1) The predicted block vector index is less than or equal to a first preset value. For example, the first preset value is 2;
[0857] 2) The block vector residual is less than or equal to a second preset value. For example, the second preset value is 0;
[0858] 3) The accuracy of ABVR meets a preset accuracy set. For example, the preset accuracy set is less than or equal to 1 pel accuracy;
[0859] In another exemplary embodiment, IBCPF is allowed to be used when one or more IBC tools in Table 47 are not used.
[0860] Table 47
[0861] IBC tool IBCPF ABVR 0 SIBC, RRIBC, FIBC 0 IBC-PC, IBC-LIC 0 IBC-MBVD 0 IBC-TM, IBC-TM-AMVP, IBC-TM-MRG 0 IBC-BI-PRED 0 IBC-CIIP 0 IBC-GPM 0
[0862] In Table 46, when the value of IBCPF is 1, it indicates that IBCPF is allowed to be used for the current block under the corresponding IBC tool, that is, the current block can be used as the above target block; when the value of IBCPF is 0, it indicates that IBCPF is not allowed to be used for the current block under the corresponding IBC tool, that is, the current block is not the target block.
[0863] In an exemplary embodiment, the target block can be determined through the above embodiment, that is, the prediction mode is intra block copy IBC, and IBCPF is also supported. Further, S1420 and S1430 are executed.
[0864] In S1420, according to the reconstruction information of the adjacent area of the target block and the original prediction information of the target block, the target prediction information of the target block is determined.
[0865] In this embodiment, a reference sample set in the adjacent area of the target block is obtained. For the target pixel in the target block, a reference sample related to the target pixel is determined in the reference sample set. Further, according to the reconstruction information of the related reference sample, the predicted value of the target pixel is filtered.
[0866] In an exemplary embodiment, the above adjacent area includes an upper reference sample set with TR rows and TC columns above the target block, and a left reference sample set with LR rows and LC columns to the left of the target block. For example, refer to Figure 11, the size information of the target block 110 is M×N. Obtain 2M columns in the row above the target block 110 as the upper reference sample set and 2N rows in the column to the left of the target block 110 as the left reference sample set. Among them, the reference samples in the upper reference sample set of the target block 110 are denoted as r[i], and the reference samples in the left reference sample set are denoted as c[j], where r[0] is equal to c[0].
[0867] In an exemplary embodiment, the reconstructed value topPel[i] of the reference sample r[i] in the upper reference sample set of the target block 110 can be expressed in the following manner:
[0868] for(i = 0; i < 2M; i++){
[0869] topPel[i] = r[i]
[0870] }.
[0871] The reconstructed value leftPel[j] of the reference sample c[j] in the left reference sample set of the target block 110 can be expressed in the following manner:
[0872] for(j = 0; i < 2N; i++){
[0873] leftPel[j] = c[j]
[0874] }.
[0875] As described above, after determining the reference sample set of the target block, the original prediction value of the target block can be filtered according to the reconstructed values of the pixel samples in the reference sample set. Among them, Figure 12 and Figure 13 provide two filtering methods.
[0876] Figure 12 is a schematic flowchart of the method P1200 for determining target prediction information provided by an embodiment of the present application. It can be used as a specific implementation manner of S520 and can be denoted as filtering method A.
[0877] In S1210, according to the position information of the target pixel in the target block, a first reference sample is determined in the left adjacent area of the target block, and a second reference sample is determined in the upper adjacent area of the target block.
[0878] Reference Figure 11 , the size information of the target block 110 is M×N, the position information of the target pixel (any pixel in the target block) in the target block 110 is (x, y), x is a positive integer not greater than M, y is a positive integer not greater than N, and M and N are positive integers.
[0879] Examples of determining reference samples for target pixels:
[0880] Example 1: Determine the reference samples (the first reference sample and the second reference sample) of the target pixel by combining the position information (x, y) of the target pixel and the size information of the target block 110. For example, the above first reference sample includes: the first pixel c[N + 1] related to the horizontal size N of the target block 110, and the second pixel c[y + 1] related to the vertical position y of the target pixel; the above second reference sample includes: the third pixel r[M + 1] related to the vertical size M of the target block, and the fourth pixel r[x + 1] related to the horizontal position x of the target pixel.
[0881] Example 2: Determine the reference samples of the target pixel according to the position information (x, y) of the target pixel. For example, a reference sample can be: the second pixel c[y + 1] (the first reference sample) related to the vertical position y of the target pixel and the fourth pixel r[x + 1] (the second reference sample) related to the horizontal position x of the target pixel.
[0882] In S1220, determine the in - frame prediction intermediate value of the target pixel according to the first reconstruction information of the first reference sample and the second reconstruction information of the second reference sample.
[0883] Among them, taking the above "Example 1" as an example to introduce the specific implementation of S1220:
[0884] The first reconstruction information includes: the reconstruction value leftPel[N + 1] of the first pixel c[N + 1], and the reconstruction value leftPel[y + 1] of the second pixel c[y + 1]. The second reconstruction information includes: the reconstruction value topPel[M + 1] of the third pixel r[M + 1], and the reconstruction value topPel[x + 1] of the fourth pixel r[x + 1].
[0885] S1220 - 1: Determine the in - frame prediction vertical component of the target pixel according to the reconstruction information of the first pixel, the reconstruction information of the fourth pixel, the horizontal size N of the target block, and the vertical position y of the target pixel.
[0886] Exemplarily, determine the in - frame prediction vertical component predV of the target pixel according to formula (1).
[0887] predV = ((N - 1 - y)×topPel[x + 1]+(y + 1)×leftPel[N + 1]+(N >> 1)) >> Log(N) (1)
[0888] S1220-2: Determine the intra prediction horizontal component of the target pixel according to the reconstruction information of the second pixel, the reconstruction information of the third pixel, the vertical size M of the target block, and the horizontal position x of the target pixel in the horizontal direction;
[0889] Exemplarily, determine the intra prediction horizontal component predH of the target pixel according to formula (2).
[0890] predH = ((M - 1 - x) × leftPel[y + 1] + (x + 1) × topPel[M + 1] + (M >> 1)) >> Log(M) (2)
[0891] S1220-3: Determine the intra prediction intermediate value of the target pixel according to the intra prediction vertical component and the intra prediction horizontal component.
[0892] Exemplarily, determine the intra prediction intermediate value predPlane[x][y] of the target pixel according to formula (3).
[0893] predPlane[x][y] = (predV + predH + 1) >> 1 (3)
[0894] In other embodiments, the intra prediction intermediate value of the target pixel may also be determined according to other methods, which are not limited in the embodiments of the present application.
[0895] In S1230, determine the target prediction information of the target block according to the intra prediction intermediate value of the target pixel and the original prediction information of the target block.
[0896] Exemplarily, determine the target prediction information amount predMatrixTmp[x][y] of the target pixel according to formula (4).
[0897] predMatrixTmp[x][y] = ((predIBC[x][y] × 5 + predPlane[x][y] × 3 + 4) >> 3) (4)
[0898] In S1230', determine the target prediction information of the target block according to the intra prediction intermediate value of the target pixel, the original prediction information of the target block, and the filtering coefficient.
[0899] Exemplarily, determine the target prediction information amount predMatrixTmp[x][y] of the target pixel according to formula (5).
[0900] predMatrixTmp[x][y] = ((predIBC[x][y] * 5 + predPlane[x][y] * 3 + f[x] * f[y]) >> 3) (5)
[0901] Wherein, predIBC[x][y] indicates the original prediction information of the target pixel; the filtering parameters f[x], f[y] are related to the position information of the target pixel in the target block. Alternatively, the filtering parameters f[x], f[y] are related to the size information of the target block. Alternatively, the filtering parameters f[x], f[y] are related to the position information in the target block and the size information of the target block. For example, the filtering parameters can be determined according to Table 48.
[0902] Table 48
[0903]
[0904] Figure 13 It is a schematic flowchart of the method P1300 for determining target prediction information provided by another embodiment of the present application. It can be used as another specific implementation manner of S520, and can be denoted as filtering method B.
[0905] In S1310, according to the position information of the target pixel in the target block, a third reference sample is determined in the left adjacent area of the target block, and a fourth reference sample is determined in the upper adjacent area of the target block.
[0906] Reference Figure 11 , the size information of the target block 110 is M×N, the position information of the target pixel (any pixel in the target block) in the target block 110 is (x, y), x takes a positive integer not greater than M, y takes a positive integer not greater than N, and M and N take positive integers.
[0907] Examples of determining the reference sample of the target pixel:
[0908] Embodiment 1: The reference samples (the third reference sample and the fourth reference sample) of the target pixel are determined by combining the position information (x, y) of the target pixel and the size information of the target block 110. For example, the above-mentioned third reference sample includes: a first pixel c[N + 1] related to the horizontal size N of the target block 110, and a second pixel c[y + 1] related to the vertical position y of the target pixel; the above-mentioned fourth reference sample includes: a third pixel r[M + 1] related to the vertical size M of the target block, and a fourth pixel r[x + 1] related to the horizontal position x of the target pixel.
[0909] Embodiment 2. Determine the reference sample of the target pixel according to the position information (x, y) of the target pixel. For example, a reference sample may be: the second pixel c[y + 1] (the third reference sample) related to the vertical position y of the target pixel and the fourth pixel r[x + 1] (the fourth reference sample) related to the horizontal position x of the target pixel.
[0910] In S1320, determine the target prediction information of the target block according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, and the original prediction information of the target block.
[0911] Among them, take the above "Embodiment 2" as an example to introduce the specific implementation manner of S1320:
[0912] Exemplarily, determine the target prediction information amount predMatrixTmp[x][y] of the target pixel according to formula (6).
[0913] predMatrixTmp[x][y]=Clip1((leftPel[y + 1]+topPel[x + 1]+(64 - f[x]-f[y])×predIBC[x][y]+
[0914] 32)>>6) (6)
[0915] In S1320', determine the target prediction information of the target block according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, the original prediction information of the target block, and the filtering parameter.
[0916] Among them, take the above "Embodiment 2" as an example to introduce the specific implementation manner of S1320':
[0917] Exemplarily, determine the target prediction information amount predMatrixTmp[x][y] of the target pixel according to formula (7).
[0918] predMatrixTmp[x][y]=Clip1((f[x]×leftPel[y + 1]+f[y]×topPel[x + 1]+(64 - f[x]-f[y])×
[0919] predIBC[x][y]+32)>>6) (7)
[0920] Among them, predIBC[x][y] flags the original prediction information of the target pixel; the filtering parameter f[x]×f[y] is related to the position information of the target pixel in the target block and the size information of the target block. Exemplarily, the filtering parameter can be determined according to Table 24.
[0921] In addition to the filtering method for the predicted value of the target block provided as in Figure 12 and Figure 13 other methods can also be used to filter the prediction information of the target block. For example: filtering the prediction information of the target quantity by constructing a mathematical model.
[0922] Among them, the above mathematical model can be a linear model, a polynomial model, a convolutional model, etc. For example, the mathematical model can be: f(x) = a × x + b; or,
[0923] f(x) = a 0 + a 1 × x + a 2 × x^2 + … + a n × x^n; or,
[0924] f(C, N, S, E, W, B) = c 0 × C + c 1 × N + c2 × S + c 3 × E + c 4 × W + c 5 × P + c 6 × B;
[0925] Among them, C represents the sample at the current position, N, S, E, W are the samples in the north, south, east, and west directions respectively, the non-linear term P = (C × C + midVal) >> bitDepth; the bias term B represents the scalar offset between the input and the output and is set to the intermediate brightness value. a0 - a n and c 0 - c 6 are constants, and the specific values can be determined according to actual needs.
[0926] It can be understood that the template parameters can derive the model parameters through the template of the current block and the reference block.
[0927] It can be understood that the different filtering methods shown above can be combined for use. For example, weighted combination is performed on the predicted values derived from different filtering methods, and the embodiments of the present application do not limit this.
[0928] In S1430, according to the target prediction information, the reconstruction information of the target block is determined.
[0929] Exemplarily, after the prediction information of the target block is filtered through the method shown in S1420, the target prediction information of the target block is obtained. Further, the above target prediction information is added to the corresponding residual information to obtain the reconstruction information of this target block.
[0930] In the solution provided by the embodiments of the present application, for a target block whose prediction mode is intra block copy (IBC) prediction, if the reconstructed block obtained based on the original prediction information of the target block has discontinuous boundaries, there may be poor spatial continuity between the block and its surrounding pixels. In the embodiments of the present application, the target prediction information of the target block is jointly determined according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block. Since the reconstruction information of the surrounding region of the block is added to the target prediction information, it is beneficial for a smooth transition between the target block and its surrounding region, thereby helping to reduce the spatial continuity between the target block and its surrounding region, and further improving the image quality and facilitating the improvement of the coding and decoding performance.
[0931] As described above in conjunction with Figure 14 , the embodiments of the encoding method of the present application have been described in detail. The embodiments of the apparatus of the present application will be introduced in detail below.
[0932] Figure 15 FIG. 1500 is a schematic structural diagram of a decoder 1500 provided by an embodiment of the present application. The decoder 1500 includes: a first determination module 1510, a second determination module 1520, and a third determination module 1530;
[0933] Among them, the first determination module 1510 is configured to parse a bitstream to determine a target block, and the prediction mode of the target block is intra block copy (IBC) prediction; the second determination module 1520 is configured to determine the target prediction information of the target block according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block; and the third determination module 1530 is configured to determine the reconstruction information of the target block according to the target prediction information.
[0934] In an exemplary embodiment, based on the above solution, the second determination module 1520 includes: a determination unit and a filtering unit;
[0935] Among them, the determination unit is configured to: determine a reference sample in the adjacent region of the target block according to the position information of a target pixel in the target block, where the target pixel is any pixel in the target block; and the filtering unit is configured to: determine the target prediction information of the target pixel according to the reconstruction information of the reference sample and the original prediction information of the target pixel.
[0936] In an exemplary embodiment, based on the above solution, the determining unit is specifically configured to: determine a first reference sample in the left adjacent region of the target block according to the position information of the target pixel in the target block, and determine a second reference sample in the upper adjacent region of the target block; the filtering unit is specifically configured to: determine an intra prediction intermediate value of the target pixel according to the first reconstruction information of the first reference sample and the second reconstruction information of the second reference sample; and determine the target prediction information of the target pixel according to the intra prediction intermediate value of the target pixel and the original prediction information of the target pixel; or determine the target prediction information of the target pixel according to the intra prediction intermediate value of the target pixel, the original prediction information of the target pixel, and the filtering coefficient.
[0937] In an exemplary embodiment, based on the above solution, the size information of the target block is M×N, the position information of the target pixel in the target block is (x, y), x is a positive integer not greater than M, y is a positive integer not greater than N, and M and N are positive integers;
[0938] The first reference sample includes: a first pixel related to the horizontal size N of the target block, and a second pixel related to the vertical position y of the target pixel; the second reference sample includes: a third pixel related to the vertical size M of the target block, and a fourth pixel related to the horizontal position x of the target pixel;
[0939] The filtering unit is further specifically configured to: determine an intra prediction vertical component of the target pixel according to the reconstruction information of the first pixel, the reconstruction information of the fourth pixel, the horizontal size N of the target block, and the vertical position y of the target pixel; determine an intra prediction horizontal component of the target pixel according to the reconstruction information of the second pixel, the reconstruction information of the third pixel, the vertical size M of the target block, and the horizontal position x of the target pixel; and determine the intra prediction intermediate value of the target pixel according to the intra prediction vertical component and the intra prediction horizontal component.
[0940] In an exemplary embodiment, based on the above solution, the determining unit is specifically configured to: determine a third reference sample in the left adjacent region of the target block according to the position information of the target pixel in the target block, and determine a fourth reference sample in the upper adjacent region of the target block; the filtering unit is specifically configured to: determine the target prediction information of the target pixel according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, and the original prediction information of the target pixel; or determine the target prediction information of the target pixel according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, the original prediction information of the target pixel, and the filtering parameter.
[0941] In an exemplary embodiment, based on the above solution, the filtering parameter is related to at least one of the position information of the target pixel in the target block and the size information of the target block.
[0942] In an exemplary embodiment, based on the above solution, the first determining module 1510 is specifically configured to: parse the bitstream to obtain a first IBC flag of the first-level syntax structure, where the first IBC flag is used to indicate whether the coding information of the first-level syntax structure of the bitstream adopts the IBC mode and whether it supports the intra-block copy prediction filtering IBCPF mode; in the case where the first IBC flag indicates that the coding information of the first-level syntax structure does not adopt the IBC mode, or in the case where the first IBC flag indicates that the coding information of the first-level syntax structure adopts the IBC mode and does not support the IBCPF mode, determine that the coding information of the first-level syntax structure does not include the target block; in the case where the first IBC flag indicates that the coding information of the first-level syntax structure adopts the IBC mode and supports the IBCPF mode, determine whether the first-level syntax structure is block-level; in the case where the first-level syntax structure is block-level, determine the current block as the target block; in the case where the first-level syntax structure is not block-level, parse the bitstream to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0943] In an exemplary embodiment, based on the above solution, the first determination module 1510 is specifically configured to: parse the bitstream to obtain a first IBC flag of a first-level syntax structure, where the first IBC flag is used to indicate whether the coding information of the first-level syntax structure in the bitstream adopts the IBC mode; in the case where the first IBC flag indicates that the coding information of the first-level syntax structure does not adopt the IBC mode, determine that the coding information of the first-level syntax structure does not include the target block; in the case where the first IBC flag indicates that the coding information of the first-level syntax structure adopts the IBC mode, parse the bitstream to obtain a second IBC flag of the first-level syntax structure, where the second IBC flag is used to indicate whether the coding information of the first-level syntax structure in the bitstream supports the intra-block copy prediction filtering IBCPF mode; in the case where the second IBC flag indicates that the coding information of the first-level syntax structure does not support the IBCPF mode, determine that the coding information of the first-level syntax structure does not include the target block; in the case where the second IBC flag indicates that the coding information of the first-level syntax structure supports the IBCPF mode, determine whether the first-level syntax structure is block-level; in the case where the first-level syntax structure is block-level, determine the current block as the target block; in the case where the first-level syntax structure is not block-level, parse the bitstream to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0944] In an exemplary embodiment, based on the above solution, the first determination module 1510 is further specifically configured to: in the case where the first-level syntax structure is not block-level, parse the bitstream to obtain a third IBC flag of a second-level syntax structure, where the third IBC flag is used to indicate whether the coding information of the second-level syntax structure in the bitstream adopts the IBC mode and whether it supports the IBCPF mode in the case of adopting the IBC mode; in the case where the third IBC flag indicates that the coding information of the second-level syntax structure does not adopt the IBC mode, or, in the case where the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode and does not support the IBCPF mode, determine that the coding information of the second-level syntax structure does not include the target block; in the case where the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode and supports the IBCPF mode, determine whether the second-level syntax structure is block-level; in the case where the second-level syntax structure is block-level, determine the current block as the target block; in the case where the second-level syntax structure is not block-level, parse the bitstream to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0945] In an exemplary embodiment, based on the above solution, the first determination module 1510 is further specifically configured to: when the first-level syntax structure is not block-level, parse the bitstream to obtain a third IBC flag of the second-level syntax structure, where the third IBC flag is used to indicate whether the coding information of the second-level syntax structure in the bitstream adopts the IBC mode; when the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode, parse the bitstream to obtain a fourth IBC flag of the second-level syntax structure, where the fourth IBC flag is used to indicate whether the coding information of the second-level syntax structure supports the IBCPF mode; when the fourth IBC flag indicates that the coding information of the second-level syntax structure does not support the IBCPF mode, determine that the coding information of the second-level syntax structure does not include the target block; when the fourth IBC flag indicates that the coding information of the second-level syntax structure supports the IBCPF mode, determine whether the second-level syntax structure is block-level; when the second-level syntax structure is block-level, determine the current block as the target block; when the second-level syntax structure is not block-level, parse the bitstream to obtain a flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0946] In an exemplary embodiment, based on the above solution, the first determination module 1510 is further specifically configured to: when the first-level syntax structure is not block-level, parse the bitstream to obtain a fourth IBC flag of the second-level syntax structure, where the fourth IBC flag is used to indicate whether the coding information of the second-level syntax structure supports the IBCPF mode; when the fourth IBC flag indicates that the coding information of the second-level syntax structure does not support the IBCPF mode, determine that the coding information of the second-level syntax structure does not include the target block; when the fourth IBC flag indicates that the coding information of the second-level syntax structure supports the IBCPF mode, determine whether the second-level syntax structure is block-level; when the second-level syntax structure is block-level, determine the current block as the target block; when the second-level syntax structure is not block-level, parse the bitstream to obtain a flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
[0947] In an exemplary embodiment, based on the above solution, the second-level syntax structure is frame-level and the first-level syntax structure is sequence-level; or, the second-level syntax structure is slice-level and the first level is frame-level or sequence-level; or, the second-level syntax structure is block-level and the first level is slice-level, frame-level, or sequence-level; or, the first-level syntax structure is block-level.
[0948] In an exemplary embodiment, based on the above solution, the first determination module 1510 is further specifically configured to: parse the bitstream to obtain a fifth IBC flag at the block level, where the fifth IBC flag is used to indicate whether the current block supports the IBCPF mode and different types of the supported IBCPF mode; in the case where the fifth IBC flag indicates that the current block does not support the IBCPF mode, determine that the current block is not the target block; in the case where the fifth IBC flag indicates that the current block supports any type of the IBCPF mode, determine the current block as the target block.
[0949] In an exemplary embodiment, based on the above solution, the first determination module 1510 is further specifically configured to: parse the bitstream to obtain target information, and determine whether the current block supports the IBCPF mode according to the target information; in the case where it is determined that the current block supports the IBCPF mode, determine the current block as the target block;
[0950] Wherein, the target information includes one or more of the following information:
[0951] The type of the image where the current block is located;
[0952] The color component of the current block;
[0953] The size of the current block;
[0954] The vector resolution of the current block;
[0955] The vector residual of the current block;
[0956] The vector index of the current block;
[0957] The IBC tool corresponding to the IBC prediction mode of the current block.
[0958] It should be understood that the decoder embodiment and the decoding method embodiment can correspond to each other, and similar descriptions can refer to the method embodiment. To avoid repetition, it will not be elaborated here. Specifically, Figure 15 The illustrated decoder can execute the embodiment of the above decoding method, and the foregoing and other operations and / or functions of each module in the decoder are respectively for implementing the embodiment of the decoding method. For the sake of brevity, it will not be elaborated here.
[0959] Figure 16 FIG. 36 is a schematic structural diagram of an encoder 1600 provided by an embodiment of the present application. The encoder 1600 includes: a first determination module 1610, a second determination module 1620, and a third determination module 1630;
[0960] Among them, the first determination module 1610 is configured to: determine a target block, where the prediction mode of the target block is intra-block copy (IBC) prediction; the second determination module 1620 is configured to: determine target prediction information of the target block according to the reconstruction information of an adjacent region of the target block and the original prediction information of the target block; the third determination module 1630 is configured to: determine the reconstruction information of the target block according to the target prediction information.
[0961] In an exemplary embodiment, based on the above solution, the second determination module 1620 includes: a determination unit and a filtering unit;
[0962] Among them, the determination unit is configured to: determine a reference sample in an adjacent region of the target block according to the position information of a target pixel in the target block, where the target pixel is any pixel in the target block; the filtering unit is configured to: determine target prediction information of the target pixel according to the reconstruction information of the reference sample and the original prediction information of the target pixel.
[0963] In an exemplary embodiment, based on the above solution, specifically, the determination unit is configured to: determine a first reference sample in a left adjacent region of the target block and a second reference sample in an upper adjacent region of the target block according to the position information of a target pixel in the target block; the filtering unit is specifically configured to: determine an intra-prediction intermediate value of the target pixel according to first reconstruction information of the first reference sample and second reconstruction information of the second reference sample; and determine target prediction information of the target pixel according to the intra-prediction intermediate value of the target pixel and the original prediction information of the target pixel; or determine target prediction information of the target pixel according to the intra-prediction intermediate value of the target pixel, the original prediction information of the target pixel, and a filtering coefficient.
[0964] In an exemplary embodiment, based on the above solution, the size information of the target block is M×N, the position information of the target pixel in the target block is (x, y), x is a positive integer not greater than M, and y is a positive integer not greater than N;
[0965] The first reference sample includes: a first pixel related to the horizontal size N of the target block and a second pixel related to the vertical position y of the target pixel; the second reference sample includes: a third pixel related to the vertical size M of the target block and a fourth pixel related to the horizontal position x of the target pixel;
[0966] The filtering unit is further specifically configured to: determine the intra prediction vertical component of the target pixel according to the reconstruction information of the first pixel, the reconstruction information of the fourth pixel, the horizontal size N of the target block, and the vertical position y of the target pixel in the vertical direction; determine the intra prediction horizontal component of the target pixel according to the reconstruction information of the second pixel, the reconstruction information of the third pixel, the vertical size M of the target block, and the horizontal position x of the target pixel in the horizontal direction; and determine the intra prediction intermediate value of the target pixel according to the intra prediction vertical component and the intra prediction horizontal component.
[0967] In an exemplary embodiment, based on the above solution, the determining unit is specifically configured to: determine a third reference sample in the left adjacent region of the target block and a fourth reference sample in the upper adjacent region of the target block according to the position information of the target pixel in the target block; the filtering unit is specifically configured to: determine the target prediction information of the target pixel according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, and the original prediction information of the target pixel; or determine the target prediction information of the target pixel according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, the original prediction information of the target pixel, and the filtering parameter.
[0968] In an exemplary embodiment, based on the above solution, the filtering parameter is related to at least one of the position information of the target pixel in the target block and the size information of the target block.
[0969] In an exemplary embodiment, based on the above solution, the encoder further includes: a writing module; the writing module is configured to: write a first IBC flag of a first-level syntax structure into the bitstream, where the first IBC flag is used to indicate whether the coding information of the first-level syntax structure adopts the IBC mode and whether it supports the intra block copy prediction filtering IBCPF mode when adopting the IBC mode.
[0970] In an exemplary embodiment, based on the above solution, the encoder further includes: a writing module; the writing module is configured to: write a first IBC flag and a second IBC flag of a first-level syntax structure into the bitstream, where the first IBC flag is used to indicate whether the coding information of the first-level syntax structure adopts the IBC mode, and the second IBC flag is used to indicate whether the coding information of the first-level syntax structure supports the intra block copy prediction filtering IBCPF mode.
[0971] In an exemplary embodiment, based on the above solution, the encoder further includes: a writing module; the writing module is configured to: write a third IBC flag of a second-level syntax structure into a bitstream, where the third IBC flag is used to indicate whether the encoding information of the second-level syntax structure adopts the IBC mode and whether the IBCPF mode is supported when the IBC mode is adopted.
[0972] In an exemplary embodiment, based on the above solution, the encoder further includes: a writing module; the writing module is configured to: write a third IBC flag and a fourth IBC flag of a second-level syntax structure into a bitstream, where the third IBC flag is used to indicate whether the encoding information of the second-level syntax structure adopts the IBC mode, and the fourth IBC flag is used to indicate whether the encoding information of the second-level syntax structure supports the IBCPF mode.
[0973] In an exemplary embodiment, based on the above solution, the encoder further includes: a writing module; the writing module is configured to: write a fourth IBC flag of a second-level syntax structure into a bitstream, where the fourth IBC flag is used to indicate whether the encoding information of the second-level syntax structure supports the IBCPF mode.
[0974] In an exemplary embodiment, based on the above solution, the second-level syntax structure is at the frame level, and the first-level syntax structure is at the sequence level; or, the second-level syntax structure is at the slice level, and the first level is at the frame level or the sequence level; or, the second-level syntax structure is at the block level, and the first level is at the slice level, the frame level, or the sequence level; or, the first-level syntax structure is at the block level.
[0975] In an exemplary embodiment, based on the above solution, the encoder further includes: a writing module; the writing module is configured to: write a fifth IBC flag of the block level into a bitstream, where the fifth IBC flag is used to indicate whether the current block supports the IBCPF mode and different types of the supported IBCPF mode.
[0976] In an exemplary embodiment, based on the above solution, the encoder further includes: a writing module; the writing module is configured to: write target information into a bitstream, where the target information is used to determine whether the current block supports the IBCPF mode; where the target information includes one or more of the following information:
[0977] The type of the image where the current block is located;
[0978] The color component of the current block;
[0979] The size of the current block;
[0980] The vector resolution of the current block;
[0981] the current block vector residual;
[0982] the current block vector index;
[0983] the IBC tool corresponding to the IBC prediction mode of the current block.
[0984] It should be understood that the encoder embodiments and the encoding method embodiments can correspond to each other, and similar descriptions can refer to the method embodiments. To avoid repetition, they will not be elaborated here. Specifically, Figure 16 the encoder shown can execute the embodiments of the above encoding method, and the foregoing and other operations and / or functions of each module in the encoder respectively implement the embodiments of the encoding method. For the sake of brevity, they will not be elaborated here.
[0985] Figure 17 This is a schematic structural diagram of the codec system 1700 provided by the embodiments of the present application. As Figure 17 shown, the codec system 1700 may include an encoder 1600 and a decoder 1500.
[0986] In the embodiments of the present application, the encoder 1600 may be the encoder described in any of the foregoing embodiments, and the decoder 1500 may be the decoder described in any of the foregoing embodiments.
[0987] The apparatus of the embodiments of the present application has been described above from the perspective of functional modules. It should be understood that the functional modules can be implemented in the form of hardware, or in the form of instructions in software, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in the present application can be completed by the integrated logic circuit in the hardware in the processor and / or instructions in software form. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. Optionally, the software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps in the above method embodiments.
[0988] Figure 18 This is a schematic structural diagram of the electronic device 1800 provided by the embodiments of the present application, Figure 18 and the electronic device can be used to execute the above decoding method or the above encoding method.
[0989] As Figure 18 shown, the electronic device 1800 may include:
[0990] A memory 1810 and a processor 1820, where the memory 1810 is used to store a computer program 1830 and transmit the program code 1830 to the processor 1820. In other words, the processor 1820 can call and run the computer program 1830 from the memory 1810 to implement the method in the embodiments of the present application.
[0991] For example, the processor 1820 can be used to execute the steps in the above method according to the instructions in the computer program 1830.
[0992] In some embodiments of the present application, the processor 1820 may include, but is not limited to:
[0993] A general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on.
[0994] In some embodiments of the present application, the memory 1810 includes, but is not limited to:
[0995] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or flash memory. The volatile memory can be Random Access Memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double DataRate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synch link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0996] In some embodiments of the present application, the computer program 1830 can be divided into one or more modules, and the one or more modules are stored in the memory 1810 and executed by the processor 1820 to complete the decoding method or encoding method of the present application. The one or more modules can be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 1830 in the electronic device.
[0997] As Figure 18 shown, the electronic device 30 may further include:
[0998] A transceiver 1840, which can be connected to the processor 1820 or the memory 1810.
[0999] Among them, the processor 1820 can control the transceiver 1840 to communicate with other devices. Specifically, it can send information or data to other devices, or receive information or data sent by other devices. The transceiver 1840 can include a transmitter and a receiver. The transceiver 1840 may further include an antenna, and the number of antennas can be one or more.
[1000] It should be understood that the various components in the electronic device 30 are connected through a bus system. Among them, the bus system includes, in addition to the data bus, a power bus, a control bus, and a status signal bus.
[1001] According to one aspect of the present application, there is provided a computer storage medium having a computer program stored thereon. When the computer program is executed by a computer, the computer is enabled to execute the method of the above method embodiment. Or rather, the embodiment of the present application further provides a computer program product containing instructions. When the instructions are executed by a computer, the computer is enabled to execute the method of the above method embodiment.
[1002] According to another aspect of the present application, there is provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, enabling the computer device to execute the method of the above method embodiment.
[1003] In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. that integrates one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[1004] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[1005] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or modules can be electrical, mechanical, or other forms.
[1006] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, in each embodiment of this application, the functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.
[1007] The above content is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A video decoding method, characterized in that, applied to a decoder, the method includes: Analyzing a bitstream to determine a target block, where the prediction mode of the target block is intra block copy (IBC) prediction; Determining target prediction information of the target block according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block; Determining the reconstruction information of the target block according to the target prediction information.
2. The method according to claim 1, characterized in that, the determining the target prediction information of the target block according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block includes: Determining a reference sample in the adjacent region of the target block according to the position information of a target pixel in the target block, where the target pixel is any pixel in the target block; Determining the target prediction information of the target pixel according to the reconstruction information of the reference sample and the original prediction information of the target pixel.
3. The method according to claim 2, characterized in that, the determining a reference sample in the adjacent region of the target block according to the position information of a target pixel in the target block includes: Determining a first reference sample in the left adjacent region of the target block and a second reference sample in the upper adjacent region of the target block according to the position information of the target pixel in the target block; the determining the target prediction information of the target pixel according to the reconstruction information of the reference sample and the original prediction information of the target pixel includes: Determining an intra prediction intermediate value of the target pixel according to the first reconstruction information of the first reference sample and the second reconstruction information of the second reference sample; Determining the target prediction information of the target pixel according to the intra prediction intermediate value of the target pixel and the original prediction information of the target pixel; or determining the target prediction information of the target pixel according to the intra prediction intermediate value of the target pixel, the original prediction information of the target pixel, and a filtering coefficient.
4. The method according to claim 3, characterized in that, the size information of the target block is M×N, the position information of the target pixel in the target block is (x, y), x is a positive integer not greater than M, y is a positive integer not greater than N, and M and N are positive integers; the first reference sample includes: a first pixel related to the horizontal size N of the target block and a second pixel related to the vertical position y of the target pixel; the second reference sample includes: a third pixel related to the vertical size M of the target block and a fourth pixel related to the horizontal position x of the target pixel; the determining the intra prediction intermediate value of the target pixel according to the first reconstruction information of the first reference sample and the second reconstruction information of the second reference sample includes: Determining an intra prediction vertical component of the target pixel according to the reconstruction information of the first pixel, the reconstruction information of the fourth pixel, the horizontal size N of the target block, and the vertical position y of the target pixel; Determine the in - frame prediction horizontal component of the target pixel according to the reconstruction information of the second pixel, the reconstruction information of the third pixel, the vertical size M of the target block, and the horizontal position x of the target pixel in the horizontal direction; Determine the in - frame prediction intermediate value of the target pixel according to the in - frame prediction vertical component and the in - frame prediction horizontal component.
5. The method according to claim 2, wherein, the determining of the reference sample in the adjacent region of the target block according to the position information of the target pixel in the target block includes: determining a third reference sample in the left - adjacent region of the target block and a fourth reference sample in the upper - adjacent region of the target block according to the position information of the target pixel in the target block; the determining of the target prediction information of the target pixel according to the reconstruction information of the reference sample and the original prediction information of the target pixel includes: determining the target prediction information of the target pixel according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, and the original prediction information of the target pixel; or, determining the target prediction information of the target pixel according to the third reconstruction information of the third reference sample, the fourth reconstruction information of the fourth reference sample, the original prediction information of the target pixel, and the filtering parameter.
6. The method according to claim 3 or 5, wherein, the filtering parameter is related to at least one of the position information of the target pixel in the target block and the size information of the target block.
7. The method according to claim 1, wherein, the parsing of the bitstream to determine the target block includes: parsing the bitstream to obtain the first IBC flag of the first - level syntax structure, where the first IBC flag is used to indicate whether the coding information of the first - level syntax structure of the bitstream adopts the IBC mode and whether it supports the in - frame block copy prediction filtering IBCPF mode when adopting the IBC mode; when the first IBC flag indicates that the coding information of the first - level syntax structure does not adopt the IBC mode, or when the first IBC flag indicates that the coding information of the first - level syntax structure adopts the IBC mode and does not support the IBCPF mode, determining that the coding information of the first - level syntax structure does not include the target block; when the first IBC flag indicates that the coding information of the first - level syntax structure adopts the IBC mode and supports the IBCPF mode, determining whether the first - level syntax structure is block - level; when the first - level syntax structure is block - level, determining the current block as the target block; when the first - level syntax structure is not block - level, parsing the bitstream to obtain the flag of the next - level syntax structure to determine the target block according to the flag of the next - level syntax structure.
8. The method according to claim 1, wherein, the parsing of the bitstream to determine the target block includes: parsing the bitstream to obtain the first IBC flag of the first - level syntax structure, where the first IBC flag is used to indicate whether the coding information of the first - level syntax structure in the bitstream adopts the IBC mode; When the first IBC flag indicates that the coding information of the first-level syntax structure does not adopt the IBC mode, it is determined that the coding information of the first-level syntax structure does not include the target block; When the first IBC flag indicates that the coding information of the first-level syntax structure adopts the IBC mode, the bitstream is parsed to obtain the second IBC flag of the first-level syntax structure, and the second IBC flag is used to indicate whether the coding information of the first-level syntax structure in the bitstream supports the Intra Block Copy Prediction Filtering (IBCPF) mode; When the second IBC flag indicates that the coding information of the first-level syntax structure does not support the IBCPF mode, it is determined that the coding information of the first-level syntax structure does not include the target block; When the second IBC flag indicates that the coding information of the first-level syntax structure supports the IBCPF mode, it is determined whether the first-level syntax structure is block-level; when the first-level syntax structure is block-level, the current block is determined as the target block; when the first-level syntax structure is not block-level, the bitstream is parsed to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
9. The method according to claim 7 or 8, wherein, the step of, when the first-level syntax structure is not block-level, parsing the bitstream to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure, includes: when the first-level syntax structure is not block-level, parsing the bitstream to obtain the third IBC flag of the second-level syntax structure, and the third IBC flag is used to indicate whether the coding information of the second-level syntax structure in the bitstream adopts the IBC mode and whether it supports the IBCPF mode under the IBC mode; when the third IBC flag indicates that the coding information of the second-level syntax structure does not adopt the IBC mode, or when the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode and does not support the IBCPF mode, it is determined that the coding information of the second-level syntax structure does not include the target block; when the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode and supports the IBCPF mode, it is determined whether the second-level syntax structure is block-level; when the second-level syntax structure is block-level, the current block is determined as the target block; when the second-level syntax structure is not block-level, the bitstream is parsed to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
10. The method according to claim 7 or 8, wherein, the step of, when the first-level syntax structure is not block-level, parsing the bitstream to obtain the flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure, includes: In the case where the first-level syntax structure is not block-level, parse the bitstream to obtain a third IBC flag of a second-level syntax structure, where the third IBC flag is used to indicate whether the coding information of the second-level syntax structure in the bitstream adopts the IBC mode; In the case where the third IBC flag indicates that the coding information of the second-level syntax structure adopts the IBC mode, parse the bitstream to obtain a fourth IBC flag of the second-level syntax structure, where the fourth IBC flag is used to indicate whether the coding information of the second-level syntax structure supports the IBCPF mode; In the case where the fourth IBC flag indicates that the coding information of the second-level syntax structure does not support the IBCPF mode, determine that the coding information of the second-level syntax structure does not include the target block; In the case where the fourth IBC flag indicates that the coding information of the second-level syntax structure supports the IBCPF mode, determine whether the second-level syntax structure is block-level; in the case where the second-level syntax structure is block-level, determine the current block as the target block; in the case where the second-level syntax structure is not block-level, parse the bitstream to obtain a flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
11. The method according to claim 7 or 8, wherein, the parsing the bitstream to obtain a flag of the next-level syntax structure so as to determine the target block according to the flag of the next-level syntax structure in the case where the first-level syntax structure is not block-level includes: In the case where the first-level syntax structure is not block-level, parse the bitstream to obtain a fourth IBC flag of a second-level syntax structure, where the fourth IBC flag is used to indicate whether the coding information of the second-level syntax structure supports the IBCPF mode; In the case where the fourth IBC flag indicates that the coding information of the second-level syntax structure does not support the IBCPF mode, determine that the coding information of the second-level syntax structure does not include the target block; In the case where the fourth IBC flag indicates that the coding information of the second-level syntax structure supports the IBCPF mode, determine whether the second-level syntax structure is block-level; in the case where the second-level syntax structure is block-level, determine the current block as the target block; in the case where the second-level syntax structure is not block-level, parse the bitstream to obtain a flag of the next-level syntax structure, so as to determine the target block according to the flag of the next-level syntax structure.
12. The method according to claim 9, wherein, the second-level syntax structure is frame-level and the first-level syntax structure is sequence-level; or, the second-level syntax structure is slice-level and the first level is frame-level or sequence-level; or, the second-level syntax structure is block-level and the first level is slice-level, frame-level, or sequence-level; or, the first-level syntax structure is block-level.
13. The method according to claim 1, wherein, the parsing the bitstream to obtain the target block includes: Parse the bitstream to obtain a fifth IBC flag at the block level, where the fifth IBC flag is used to indicate whether the current block supports the IBCPF mode and different types of the supported IBCPF mode; In the case where the fifth IBC flag indicates that the current block does not support the IBCPF mode, determine that the current block is not the target block; In the case where the fifth IBC flag indicates that the current block supports any type of IBCPF mode, determine the current block as the target block.
14. The method according to claim 1, wherein, In the parsing the bitstream to obtain the target block, it includes: Parse the bitstream to obtain target information, and determine whether the current block supports the IBCPF mode according to the target information; In the case where it is determined that the current block supports the IBCPF mode, determine the current block as the target block; wherein, the target information includes one or more of the following information: The type of the image where the current block is located; The color component of the current block; The size of the current block; The vector resolution of the current block; The vector residual of the current block; The vector index of the current block; The IBC tool corresponding to the IBC prediction mode of the current block.
15. A video encoding method, wherein, Applied to an encoder, the method includes: Determine a target block, where the prediction mode of the target block is intra block copy IBC prediction; Determine the target prediction information of the target block according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block; Determine the reconstruction information of the target block according to the target prediction information.
16. A decoder, wherein, includes: A first determination module, configured to parse the bitstream to determine a target block, where the prediction mode of the target block is intra block copy IBC prediction; A second determination module, configured to determine the target prediction information of the target block according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block; A third determination module, configured to determine the reconstruction information of the target block according to the target prediction information.
17. An encoder, wherein, includes: A first determination module, configured to determine a target block, where the prediction mode of the target block is intra block copy IBC prediction; A second determination module, configured to determine the target prediction information of the target block according to the reconstruction information of the adjacent region of the target block and the original prediction information of the target block; A third determination module, configured to determine the reconstruction information of the target block according to the target prediction information.
18. An electronic device, including a processor and a memory; The memory is used to store a computer program; The processor is configured to execute the computer program to implement the video decoding method according to any one of claims 1 to 14 above, or implement the video encoding method according to claim 15 above.
19. A computer-readable storage medium, wherein, used to store a computer program; The computer program enables a computer to execute the video decoding method according to any one of claims 1 to 14 above, and execute the video encoding method according to claim 15 above.