Prediction method and apparatus for decoding, and computer storage medium
The prediction method addresses high search complexity and poor performance in video decoding by selecting a subset of adjacent reference samples based on importance and variance, enhancing decoding efficiency and reducing bitrate.
Patent Information
- Application Number
- JP2025186726
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-02-03
AI Technical Summary
The existing video coding standards, such as H.265/HEVC and the Joint Video Exploration Team's Versatile Video Coding (VVC), face challenges in constructing a reasonable neighboring reference sample subset for chrominance prediction, leading to high search complexity and poor prediction performance in video image decoding, especially for ultra-high-definition video and virtual reality applications.
A prediction method and apparatus that selects a subset of adjacent reference samples based on a reference point and a preset sample number, considering both the importance and variance of these samples, to form an adjacent reference sample subset for improved predictive decoding.
This approach reduces search complexity and improves prediction performance by using a smaller number of samples in the subset, resulting in more accurate model parameters and lower bitrate.
Smart Images

Figure 2026016758000001_ABST
Abstract
Description
[Technical Field]
[0001] The present embodiment relates to the technical field of video encoding and decoding, and more particularly to a prediction method and apparatus for decoding, and a computer storage medium. [Background technology]
[0002] As people's demands for video display quality increase, new video applications such as high-definition and ultra-high-definition video have emerged. H.265 / High Efficiency Video Coding (HEVC) is the current latest international video compression standard. Compared with the previous generation video coding standard H.264 / Advanced Video Coding (AVC), H.265 / HEVC's compression performance has improved by about 50%, but it still cannot meet the needs of the rapid development of video applications, especially new video applications such as ultra-high-definition video and virtual reality (VR).
[0003] The International Telecommunication Union Telecommunication Standardization Sector (ITU-T) Video Coding Experts Group and the International Organization for Standardization (ISO) / International Electrotechnical Commission (IEC) Motion Picture Experts Group established the Joint Video Exploration Team (JVET) in 2015 to develop next-generation video coding standards. The Joint Exploration Test Model (JEM) is a common reference software platform for validating different coding tools. In April 2018, JVET officially named the next-generation video coding standard Versatile Video Coding (VVC), and the corresponding test model is VTM. The JEM and VTM reference software integrate encoding and decoding prediction methods based on a linear model, which predicts the chrominance component according to the luminance component of the currently decoded block. However, when constructing a linear model, the neighboring reference sample subset formed by neighboring reference samples is not very reasonable, resulting in relatively high search complexity and poor prediction performance for video image decoding. Summary of the Invention [Problem to be solved by the invention]
[0004] In view of the above problems, the present embodiment aims to provide a prediction method and apparatus for decoding, as well as a computer storage medium, which not only considers both the importance and variance of adjacent reference samples in an adjacent reference sample subset, but also has a small number of pixels in the adjacent reference sample subset, thereby reducing search complexity, improving prediction performance for decoding video images, and reducing bitrate. [Means for solving the problem]
[0005] The technical solution of the present embodiment can be realized as follows:
[0006] According to a first aspect, an embodiment of the present invention provides a prediction method for decoding, the method including: obtaining reference samples adjacent to at least one side of a block to be decoded to obtain a first set of adjacent reference samples; determining a reference point from the at least one side, and determining a reference sample position to be selected corresponding to the at least one side according to a preset sample number; selecting, based on the reference sample position to be selected, a reference sample corresponding to the reference sample position to be selected from the first adjacent reference sample set, and forming an adjacent reference sample subset with the selected reference samples; and performing predictive decoding on the block to be decoded based on the subset of neighboring reference samples.
[0007] According to a second aspect, an embodiment of the present invention provides a prediction device for decoding, the prediction device for decoding comprising: an obtaining unit, a determining unit, a selecting unit, and a decoding unit; The obtaining unit is configured to obtain reference samples adjacent to at least one side of a block to be decoded to obtain a first set of adjacent reference samples; the determining unit is configured to determine a reference point from the at least one side, and determine a reference sample position to be selected corresponding to the at least one side according to a preset sample number; the selection unit is configured to select, based on the reference sample position to be selected, a reference sample corresponding to the reference sample position to be selected from the first adjacent reference sample set, and form an adjacent reference sample subset with the selected reference sample; The decoding unit is configured to perform predictive decoding on the block to be decoded based on the subset of neighboring reference samples.
[0008] According to a third aspect, an embodiment of the present invention provides a prediction device for decoding, the prediction device for decoding comprising: a memory; and a processor; the memory is configured to store a computer program executable by the processor; The processor is configured to perform the steps of the method according to the first aspect when executing the computer program.
[0009] According to a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer storage medium storing a decoding prediction program, the decoding prediction program causing at least one processor to perform the steps of the method according to the first aspect when executed by the processor. [Effects of the Invention]
[0010] The present embodiment provides a prediction method and apparatus for decoding, and a computer storage medium. The prediction method for decoding includes first obtaining reference samples adjacent to at least one side of a block to be decoded to obtain a first adjacent reference sample set, then determining a reference point from the at least one side, and determining a reference sample position to be selected corresponding to the at least one side according to a preset number of samples, then selecting a reference sample corresponding to the reference sample position to be selected from the first adjacent reference sample set based on the reference sample position to be selected, forming an adjacent reference sample subset with the selected reference samples, and finally performing predictive decoding on the block to be decoded based on the adjacent reference sample subset. Because the selection of adjacent reference samples in the adjacent reference sample subset takes into account both importance and variance, model parameters constructed based on the adjacent reference sample subset are more accurate, thereby improving prediction performance for video image decoding. Because the adjacent reference sample subset contains few samples, search complexity is also reduced, improving prediction performance for video image decoding and thereby reducing bitrate. [Brief explanation of the drawings]
[0011] [Figure 1A] FIG. 1 is a schematic structural diagram of a video image sample format in a related technical solution; [Figure 1B] FIG. 1 is a schematic structural diagram of a video image sample format in a related technical solution; [Figure 1C] FIG. 1 is a schematic structural diagram of a video image sample format in a related technical solution; [Figure 2A] FIG. 10 is a schematic diagram showing sampling of adjacent reference values of the first color component of a decoding block in the related technical solution; [Figure 2B] FIG. 10 is a schematic diagram showing sampling of adjacent reference values of the second color component of a decoding block in a related technical solution; [Figure 3] FIG. 1 is a schematic structural diagram illustrating the construction of a prediction model based on the maximum and minimum values of a decoded block in a related technical solution; [Figure 4A] FIG. 1 is a schematic diagram illustrating selecting neighboring reference samples for a square decoded block according to a related technical solution; [Figure 4B] FIG. 1 is a schematic diagram illustrating selecting neighboring reference samples for a non-square decoded block according to a related technical solution; [Figure 5A] FIG. 1 is a schematic diagram illustrating selecting adjacent reference samples according to a conventional technical solution according to a related technical solution; [Figure 5B] FIG. 1 is a schematic diagram illustrating selecting adjacent reference samples according to the L0138 proposal according to the related technical solution; [Figure 6] 1 is a schematic block diagram of a video encoding system according to an embodiment of the present invention; [Figure 7] 1 is a schematic block diagram of a video decoding system according to an embodiment of the present invention; [Figure 8] 1 is a flowchart of a prediction method for decoding according to an embodiment of the present invention. [Figure 9] FIG. 10 is a schematic diagram illustrating selecting a subset of neighboring reference samples corresponding to the upper edge of a block to be decoded according to an embodiment of the present invention. [Figure 10] FIG. 10 is a schematic diagram illustrating selecting a subset of neighboring reference samples corresponding to the left edge of a block to be decoded according to an embodiment of the present invention. [Figure 11] FIG. 10 is a schematic diagram illustrating selecting a subset of neighboring reference samples corresponding to the upper edge of another block to be decoded according to an embodiment of the present invention. [Figure 12] FIG. 10 is a schematic diagram illustrating selecting yet another subset of neighboring reference samples corresponding to the upper edge of a block to be decoded according to an embodiment of the present invention. [Figure 13]FIG. 10 is a schematic diagram illustrating selecting yet another subset of neighboring reference samples corresponding to the upper edge of a block to be decoded according to an embodiment of the present invention. [Figure 14] FIG. 10 is a schematic diagram illustrating selecting yet another subset of neighboring reference samples corresponding to the upper edge of a block to be decoded according to an embodiment of the present invention. [Figure 15] 1 is a schematic structural diagram of a prediction device for decoding according to an embodiment of the present invention; [Figure 16] 1 is a schematic diagram of a specific hardware structure of a prediction device for decoding according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION
[0012] In order to understand the features and technical contents of the present embodiment in more detail, the following detailed description of the implementation of the present embodiment will be given with reference to the accompanying drawings, which are for reference purposes only and are not intended to limit the present embodiment.
[0013] In a video image, a first color component, a second color component, and a third color component are typically used to represent a decoded block, where the three color components are a luminance component, a blue chroma component, and a red chroma component, respectively, and specifically, the luminance component is typically represented by the symbol Y, the blue chroma component is typically represented by the symbol Cb, and the red chroma component is typically represented by the symbol Cr.
[0014] In this embodiment, the first color component may be a luminance component Y, the second color component may be a blue chroma component Cb, and the third color component may be a red chroma component Cr, but this is not a limitation of this embodiment. Currently, the commonly used sampling format is the YCbCr format, which includes formats such as those shown in Figures 1A to 1C. In the figures, crosses (X) represent sampling points of the first color component, and circles (○) represent sampling points of the second or third color component. The YCbCr format includes the following formats:
[0015] 4:4:4 format: As shown in Figure 1A, the second or third color component is not downsampled. This means that for every four consecutive samples in each scan line, four samples of the first color component, four samples of the second color component, and four samples of the third color component are extracted.
[0016] 4:2:2 format: As shown in Figure 1B, the first color component is horizontally sampled 2:1 relative to the second or third color component, and no vertical downsampling is performed. This means that for every four consecutive samples in each scan line, four first color component samples, two second color component samples, and two third color component samples are extracted.
[0017] 4:2:0 format: As shown in Fig. 1C, it means that the first color component is horizontally downsampled 2:1 and vertically downsampled 2:1 with respect to the second or third color component, which means that for every two consecutive samples of a horizontal scan line and a vertical scan line, two first color component samples, one second color component sample, and one third color component sample are extracted.
[0018] When a video image adopts a 4:2:0 YCbCr format, if a first color component of the video image is a decoding block of size 2N×2N, the corresponding second color component or third color component is a decoding block of size N×N, where N is the side length of the decoding block. In the embodiment of the present application, the 4:2:0 format is taken as an example for description below, but the technical solution of the embodiment of the present application can also be applied to other sampling formats.
[0019] In the next-generation video coding standard H.266, cross-component prediction (CCP) is extended and improved, and cross-component linear model prediction (CCLM) is proposed to further improve encoding and decoding performance. In H.266, CCLM realizes prediction from a first color component to a second color component, from the first color component to a third color component, and between the second color component and the third color component. Hereinafter, prediction from a first color component to a second color component will be described as an example, but the technical solutions of the embodiments of the present application can also be applied to prediction of other color components.
[0020] It can be understood that in order to reduce the redundancy between the first color component and the second color component, the VTM uses a CCLM prediction mode, in which the first color component and the second color component are in the same decoded block, and the second color component is predicted based on the first color component reconstruction value of the same decoded block. For example, the prediction model of the following formula (1) is adopted:
number
[0021] where i,j represent the position coordinates of the sample in the decoding block, i represents the horizontal direction, j represents the vertical direction, and Pred c [i,j] represents the second color component prediction value corresponding to the sample whose position coordinates are [i,j] in the decoded block, and Rec L [i,j] represents the first color component reconstruction value corresponding to the sample whose position coordinates (after downsampling) are [i,j] within the same decoded block, and α and β are model parameters of the above prediction model.
[0022] There are many methods for constructing the model parameters α and β, such as a least-squares-based regression construction method, a maximum and minimum value-based construction method, or other construction methods, but the present embodiment is not particularly limited thereto. In the following, the least-squares-based regression construction method and the maximum and minimum value-based construction method will be described as examples.
[0023] In VVC, the least squares-based regression model parameter derivation method is first accepted. Specifically, α and β can be derived by minimizing the regression error between the neighboring reference values of the first color component and the second color component around the decoded block, as shown in the following equation (2):
number
[0024] Here, L(n) represents the neighboring reference value of the first color component corresponding to the left side and top side after downsampling, and C(n) represents the neighboring reference value of the second color component corresponding to the left side and top side, where N is the side length of the second color component decoding block, and n=1, 2, ..., 2N. Figures 2A and 2B are schematic diagrams showing the sampling of neighboring reference values of the first color component and the second color component of a decoding block in a related technical solution, respectively. In Figure 2A, the larger bold block is used to highlight the first color component decoding block 21, and the solid gray circle is used to indicate the neighboring reference value L(n) of the first color component decoding block 21. In Figure 2B, the larger bold block is used to highlight the second color component decoding block 22, and the solid gray circle is used to indicate the neighboring reference value C(n) of the second color component decoding block 22. Figure 2A shows a first color component decoding block 21 with a size of 2N x 2N. For a video image in 4:2:0 format, the size of the second color component corresponding to one 2N×2N size first color component is N×N, as shown in Fig. 2B , which is a schematic diagram of a decoded block obtained by performing first color component sampling and second color component sampling, respectively, on the same decoded block.
[0025] Recently, a simplified method for deriving model parameters has been adopted for VVC. Specifically, the model parameters can be derived according to the principle that "two points determine a line" by searching for the maximum and minimum adjacent reference values of the first color component, such as α and β shown in the following equation (3):
number
[0026] where L max and L min represents the maximum and minimum values obtained by searching the adjacent reference values of the first color component corresponding to the left and top edges after downsampling, and Cmax and C min L max and L min 3 is a schematic diagram illustrating a related technical solution for constructing a prediction model based on the maximum and minimum values of a decoded block. Here, the horizontal axis represents the neighboring reference value of the first color component of the decoded block, and the vertical axis represents the neighboring reference value of the second color component of the decoded block. L max and L min , and C max and C min According to the above, the model parameters α and β can be calculated through Equation (3), and the constructed prediction model is C=α·L+β, where L represents the first color component reconstruction value corresponding to a sample in the decoded block, and C represents the second color component prediction value corresponding to the sample in the decoded block.
[0027] There are many cases in the prior art for the structure of adjacent reference sample sets in CCLM, and each of them will be described below.
[0028] (a) Distinguishing from the shape of the decoded block 4A is a schematic diagram illustrating a square decoding block selecting adjacent reference samples according to a related technical solution. As shown in FIG. 4A, the decoding block is a square decoding block, and all adjacent samples corresponding to the left and top edges of the decoding block can be determined as reference samples. For the first color component, downsampling needs to be performed first, so that the downsampled first color component has the same resolution as the second color component. In FIG. 4A, a gray solid circle is used to represent the adjacent reference samples selected by the square decoding block.
[0029] FIG. 4B is a schematic diagram illustrating a non-square decoding block selecting neighboring reference samples according to a related technical solution. As shown in FIG. 4B, the decoding block is a non-square decoding block, and its width and height are not equal. For the first color component, downsampling must be performed first, so that the downsampled first color component has the same resolution as the second color component. Meanwhile, the neighboring samples corresponding to the long side of the decoding block must be further downsampled so that the number of neighboring reference samples obtained on the long side is equal to the number of neighboring reference samples on the short side. In FIG. 4B, a gray solid circle is used to represent the neighboring reference samples selected by the non-square decoding block.
[0030] (b) Distinguishing from the existence of adjacent samples corresponding to the left or top edge of the decoded block. When all adjacent samples corresponding to the left and upper edges of a decoding block are available, the samples in the rows adjacent to the upper edge and the adjacent samples in the columns adjacent to the left edge can all be used as adjacent reference samples.
[0031] When the neighboring samples corresponding to only one of the left side and the top side of the decoded block are available, the neighboring samples corresponding to the available side are determined as the neighboring reference samples.
[0032] If all adjacent samples corresponding to the left and top edges of the decoded block are unavailable, there are no adjacent reference samples, the model parameter α is set to 0, and the model parameter β is set to the intermediate value 512 of the second color component, that is, the second color component predicted value corresponding to all samples in the decoded block is 512.
[0033] It should be noted that if N is defined as the length of the short side of the second color component decode block, and all neighboring samples corresponding to the left and top edges of the decode block are available, the total number of neighboring reference samples available in CCLM is 2N. Also, unless otherwise specified, in the following description, all neighboring samples corresponding to the left and top edges of the decode block are available.
[0034] (c) Scheme of adjacent reference sample subset (point deduction) In the process of calculating CCLM model parameters, the required computational complexity is directly proportional to the number of adjacent reference samples used in CCLM. Therefore, to reduce computational complexity, the L0138 proposal at the 12th JVET Conference proposed a technical solution that reduces the number of adjacent reference samples used in CCLM based on the size of the second color component block corresponding to the block to be decoded. Table 1 shows the relationship between the size of the second color component block corresponding to the block to be decoded and the number of adjacent reference samples in the related technical solution. In Table 1, N1 is the number of adjacent reference samples used in CCLM in the conventional technical solution, and N2 is the number of adjacent reference samples used in CCLM after sample reduction in the L0138 proposal. Specifically, the sample reduction method in the L0138 proposal involves obtaining adjacent reference samples in the conventional technical solution and then performing downsampling on the adjacent reference samples. [Table 1]
[0035] (d) Downsampling scheme for neighboring reference samples For non-square decoded blocks, VTM has already proposed a long-edge downsampling scheme (see Figure 4B), which, like the L0138 proposal above, proposes a downsampling set obtained by further sample reduction.
[0036] In the L0138 proposal, the selection of neighboring reference samples during the downsampling process may affect the decoding prediction performance, and the decoding prediction performance corresponding to the neighboring reference sample subset obtained by the default downsampling scheme of the VTM is not ideal. Therefore, the L0138 proposal proposes a different neighboring reference sample subset selection scheme during downsampling. Specifically, in the conventional technical solution adopted by the VTM, when downsampling is performed on the long side of a non-square decoding block, samples are selected from the left edge for samples in adjacent rows corresponding to the top edge of the decoding block, and samples are selected from the top edge for samples in adjacent columns corresponding to the left edge. The L0138 proposal proposes a scheme for selecting samples from the opposite edge to that of the conventional technical solution. Specifically, see the exemplary sample selection structures shown in Figures 5A and 5B.
[0037] FIG. 5A is a schematic diagram illustrating the selection of neighboring reference samples according to a conventional technical solution. As shown in FIG. 5A, samples in an adjacent row corresponding to the long edge of the corresponding decoding block are sampled starting from the leftmost sample. FIG. 5B is a schematic diagram illustrating the selection of neighboring reference samples according to the L0138 proposal according to the related technical solution. As shown in FIG. 5B, samples in an adjacent row corresponding to the long edge of the corresponding decoding block are sampled starting from the rightmost sample. Here, the sampling interval is the same as in the conventional technical solution, and a detailed description thereof will be omitted in the present embodiment. The sample selection scheme proposed by L0138 can fully cover the value range of all neighboring reference point pixels during CCLM model parameter calculation, but does not consider the importance of each neighboring reference sample. Therefore, when the number of samples is limited, it still cannot fully represent the overall characteristics of the long edge.
[0038] Related technical solutions take into account computational complexity. VTM accepts searching for the maximum and minimum first color component neighboring reference values from 2N points, deriving model parameters according to the principle of "two points determine a line" (see Equation (3)). Although this scheme uses only two neighboring reference samples, significantly reducing computational complexity compared to least-squares-based regression-based model parameter construction, the scheme still has considerable complexity. This is primarily due to the need to determine the maximum and minimum values in the neighboring reference sample set, which requires 4N comparison calculation operations to determine the maximum and minimum values. Furthermore, the longer the length of the decoding block, the more neighboring reference samples are used in CCLM, resulting in a greater number of searches to determine the maximum and minimum values. Therefore, the computational complexity of this scheme remains high. Meanwhile, considering prediction accuracy, if the correlation between the maximum and minimum values found during the process of searching for the search and the current decoding block is very low, the sample can be determined to be a bad sample. Thus, if the two samples obtained by the search contain bad samples, it will cause a large model deviation in the prediction model. Therefore, the model parameter construction method based on the maximum and minimum values has relatively low complexity but poor robustness, resulting in poor decoding prediction performance.
[0039] Based on this, the latest L0138 proposal proposed the concept of neighboring reference sample subsets, which somewhat improves the above drawbacks by reducing the number of neighboring reference samples, further reducing computational complexity, and selecting samples at appropriate positions (see Figure 5B), slightly improving the decoding prediction performance. However, this scheme still has room for improvement.
[0040] To improve the encoding and decoding prediction performance, a prediction method for decoding according to an embodiment of the present invention uses the midpoint of at least one side of the block to be decoded as a reference point, determines the reference sample position to be selected according to a preset number of samples, and places the selected neighboring reference samples into a neighboring reference sample subset taking into account both importance and variance. Predictive decoding is performed on the block to be decoded based on the neighboring reference sample subset. In this way, the model parameters constructed based on the neighboring reference sample subset are relatively accurate, thereby improving the decoding prediction performance. Furthermore, the number of pixels in the neighboring reference sample subset is relatively small, thereby reducing the search complexity and further reducing the bit rate. Hereinafter, the embodiment of the present invention will be described in detail with reference to the accompanying drawings.
[0041] 6 is a schematic block diagram of a video encoding system according to an embodiment of the present invention. As shown in FIG. 6, the video encoding system 600 includes components such as transform and quantization 601, intra estimation 602, intra prediction 603, motion compensation 604, motion estimation 605, inverse transform and inverse quantization 606, filter control analysis 607, deblocking filtering and sample adaptive offset (SAO) filtering 608, header information coding and context-based adaptive binary arithmetic coding (CABAC) 609, and decoded image buffer 610. For an input original video signal, a video coding block can be obtained by dividing a coding tree unit (CTU). Then, to further reduce the bit rate, the transform and quantization 601 converts residual pixel information obtained after intra or inter prediction from the pixel domain to the transform domain and quantizes the resulting transform coefficients. The intra estimation 602 and intra prediction 603 are used to perform intra prediction on the video coding block. Specifically, the intra estimation 602 and intra prediction 603 are used to determine an intra prediction mode for encoding the video coding block. The motion compensation 604 and motion estimation 605 are used to perform inter prediction coding on the received video coding block relative to one or more reference intra blocks to provide temporal prediction information. The motion estimation performed by the motion estimation 605 is a process of generating motion vectors, which are used to estimate the motion of the video coding block. The motion compensation 604 then performs motion compensation based on the motion vectors determined by the motion estimation 605. After determining the intra prediction mode, the intra frame prediction 603 is also used to provide the selected intra prediction data to the header information coding and CABAC 609, and the motion estimation 605 transmits the calculated motion vector data to the header information coding and CABAC 609.Further, an inverse transform and inverse quantization 606 is used to reconstruct the video coding block, i.e., to reconstruct a residual block in the pixel domain. The reconstructed residual block is filtered by a filter control analysis 607 and deblocking and SAO filtering 608 to remove blocking artifacts. The reconstructed residual block is then added to one intra prediction block in a decoded picture buffer 610 to generate a reconstructed video coding block. A header information coding and CABAC 609 is used to code various coding parameters and quantized transform coefficients. In a CABAC-based coding algorithm, context content can be based on neighboring coding blocks, and information indicating the determined intra prediction mode can be coded and used to output a codestream for the video signal. The decoded picture buffer 610 is used to store reconstructed video coding blocks for prediction reference. As video images are coded, new reconstructed video coding blocks are continuously generated, and these reconstructed video coding blocks are stored in the decoded picture buffer 610.
[0042] FIG. 7 is a schematic block diagram of a video decoding system according to an embodiment of the present invention. As shown in FIG. 7, the video decoding system 700 includes components such as header information decoding and CABAC decoding 701, inverse transform and inverse quantization 702, intra prediction 703, motion compensation 704, deblocking filtering and SAO filtering 705, and a decoded image buffer 706. After performing the encoding process shown in FIG. 6 on an input video signal, the system outputs a code stream of the video signal. The code stream is input to the video decoding system 700 and first processed by header information decoding and CABAC decoding 701 to obtain decoded transform coefficients. The transform coefficients are then processed by inverse transform and inverse quantization 702 to generate residual blocks in the pixel domain. Intra prediction 703 can be used to generate prediction data for a current video decoding block based on a determined intra prediction mode and data of a previously decoded block from the current frame or image. Motion compensation 704 analyzes motion vectors and other syntax elements to determine prediction information for the video decoded block and uses the prediction information to generate a prediction block for the currently decoded video decoded block. The residual block from inverse transform and inverse quantization 702 is summed with the corresponding prediction block generated by intra prediction 703 or motion compensation 704 to form a decoded video block. The decoded video signal is filtered by deblocking filtering and SAO filtering 705 to remove blocking artifacts, thereby improving video quality. The decoded video block is then stored in a decoded picture buffer 706, which is used to store reference images for subsequent intra prediction or motion compensation and to output a video signal, thus obtaining a reconstructed original video signal.
[0043] The present embodiment can be mainly applied to the intra prediction 603 shown in Fig. 6 and the intra prediction 703 shown in Fig. 7. That is, the present embodiment can be applied to both the encoding system and the decoding system, but the present embodiment is not particularly limited thereto.
[0044] Based on the application scenario example shown in Fig. 6 or Fig. 7, Fig. 8 shows a schematic flowchart of a prediction method for decoding according to an embodiment of the present application. The prediction method for decoding may include the following steps:
[0045] In step S801, obtain reference samples adjacent to at least one side of the block to be decoded to obtain a first set of adjacent reference samples.
[0046] In step S802, determine one reference point from the at least one side, and determine a reference sample position to be selected corresponding to the at least one side according to a preset sample number.
[0047] In step S803, based on the reference sample position to be selected, a reference sample corresponding to the reference sample position to be selected is selected from the first adjacent reference sample set, and an adjacent reference sample subset is formed with the selected reference sample.
[0048] In step S804, predictive decoding is performed on the block to be decoded based on the subset of neighboring reference samples.
[0049] It should be noted that the block to be decoded is a decoding block that currently needs to perform second color component prediction or third color component prediction. At least one edge of the block to be decoded may point to the top edge of the block to be decoded, or may point to the left edge of the block to be decoded, or may point to the top edge and the left edge of the block to be decoded, and the embodiment of the present application is not particularly limited thereto.
[0050] It should be noted that the reference point may be the midpoint of the at least one side, the first reference sample position to the left of the midpoint of the at least one side, the first reference sample position to the right of the midpoint of the at least one side, or even another reference sample position of the at least one side, but the present embodiment does not particularly limit this.
[0051] In this embodiment, the prediction method for decoding of this embodiment can also be applied to a coding system, and by constructing a neighboring reference sample subset in the coding system, it is possible to improve the coding prediction performance of the video image, improve the coding compression efficiency, and save the coding bit rate. Hereinafter, only the construction of a neighboring reference sample subset in the decoding system will be described as an example.
[0052] In this embodiment, reference samples adjacent to at least one side of the block to be decoded are first obtained to obtain a first adjacent reference sample set. Next, a reference point is determined from the at least one side, and a reference sample position to be selected corresponding to the at least one side is determined according to a preset number of samples. Then, a reference sample corresponding to the reference sample position to be selected is selected from the first adjacent reference sample set based on the reference sample position to be selected, and an adjacent reference sample subset is formed using the selected reference samples. Finally, predictive decoding is performed on the block to be decoded based on the adjacent reference sample subset. In this embodiment, in the search operation for decoding prediction, not all reference samples adjacent to the upper or left side of the block to be decoded are used, but the adjacent reference sample subset is formed by selecting adjacent reference samples at appropriate positions taking both importance and variance into consideration. Since the number of image pixels in the adjacent reference sample subset is relatively small, search complexity is reduced, prediction performance for decoding is improved, and the bit rate can be further reduced.
[0053] In some embodiments, determining a reference point from the at least one edge comprises: determining a midpoint of the at least one side based on a length of the at least one side, and using the midpoint of the at least one side as the reference point;
[0054] In some embodiments, when the reference point is a midpoint of the at least one side, determining a reference point from the at least one side comprises: Based on the length of the at least one side, if the midpoint of the at least one side is at an intermediate position between two reference samples, using a first reference sample position to the right of the intermediate position as a reference point for the at least one side, or using a first reference sample position to the left of the intermediate position as a reference point for the at least one side.
[0055] It should be noted that, considering that the importance of the reference samples adjacent to at least one side of the block to be decoded is correlated with its corresponding position, in order to ensure that the reference samples in the adjacent reference sample subset represent the characteristics of the entire adjacent side, it is necessary to select reference samples located at the center position of the side as much as possible, thereby eliminating samples with relatively low importance (for example, reference samples located at both ends of the side). In this embodiment, when the top side of the block to be decoded is taken as an example, the first reference sample position on the right or left side of the middle position can be used as the reference point of the side.
[0056] For example, FIG. 9 is a schematic diagram illustrating the selection of an adjacent reference sample subset corresponding to the upper edge of a block to be decoded according to an embodiment of the present invention. As shown in FIG. 9, for all reference samples distributed along the upper edge of the block to be decoded, the midpoint of the edge is selected as the center (the position of the dotted line shown in FIG. 9), and the reference sample selection is performed using the center as the reference point. If the edge length of the upper edge of the block to be decoded is 16 and the preset number of samples is 4, the sampling interval Δ is obtained as 16 / 4=4. In this case, since the length of the upper edge is 16, the midpoint can be determined to be between 7 and 8, that is, 7 or 8 can be selected as the midpoint. In FIG. 9, taking 8 as an example of selecting the reference point, since the preset number of samples is 4, the reference sample positions to be selected (gray points shown in FIG. 9) can be determined to be 2, 6, 10, and 14. Corresponding reference samples can be selected according to these reference sample positions, and the selected reference samples can form an adjacent reference sample subset.
[0057] In some embodiments, when the reference point is a midpoint of the at least one side, determining a reference point from the at least one side comprises: Based on the length of the at least one side, if the midpoint of the at least one side is at an intermediate position between two reference samples, using a first reference sample position below the intermediate position as a reference point for the at least one side, or using a first reference sample position above the intermediate position as a reference point for the at least one side.
[0058] It should be noted that, considering that the importance of the reference samples adjacent to at least one side of the block to be decoded is correlated with its corresponding position, in order to ensure that the reference samples in the adjacent reference sample subset can represent the characteristics of the entire adjacent side, it is necessary to select reference samples located at the middle position of the side as much as possible, thereby eliminating samples with relatively low importance (for example, reference samples located at both ends of the side). In this embodiment, when taking the left side of the block to be decoded as an example, the first reference sample position below or above the middle position can be used as the reference point of the side.
[0059] For example, FIG. 10 is a schematic diagram illustrating the selection of an adjacent reference sample subset corresponding to the left edge of a block to be decoded according to an embodiment of the present invention. As shown in FIG. 10, for all reference samples distributed along the left edge of the block to be decoded, the midpoint of the edge is selected as the center (the position of the dotted line in FIG. 10), and the reference sample selection is performed using the center as the reference point. If the length of the upper edge of the decoded block is 8 and the preset number of samples is 2, the sampling interval Δ is obtained as 8 / 2=4. In this case, since the length of the left edge is 8, the midpoint can be determined to be between 3 and 4, that is, 3 or 4 can be selected as the midpoint. In FIG. 10, taking 4 as an example of selecting the reference point, since the preset number of samples is 2, the reference sample positions to be selected (gray points in FIG. 10) can be determined to be 2 and 6. Corresponding reference samples can be selected according to these reference sample positions, and the selected reference samples can form an adjacent reference sample subset.
[0060] In practical applications, the length of the left or top edge of the block to be decoded is an integer multiple of two, so the midpoint of the left or top edge of the block to be decoded is between two points. In the example shown in FIG. 9, the first sample to the right of the midpoint is used as the midpoint of the edge. However, in the embodiment of the present application, the first sample to the left of the midpoint can also be used as the midpoint of the edge, as shown in the structural example of FIG. 11. In FIG. 11, the first sample to the left of the midpoint (e.g., 3 in FIG. 11) is used as the midpoint of the edge. Since the preset number of samples is 2, the reference sample positions to be selected (gray dots shown in FIG. 11) can be determined to be 1 and 5. Corresponding reference samples can be selected according to these reference sample positions, and the selected reference samples can form an adjacent reference sample subset. Therefore, in the embodiment of the present application, for the top edge of the block to be decoded, the first sample to the right of the midpoint can be determined as the midpoint of the edge, or the first sample to the left of the midpoint can be determined as the midpoint of the edge, but this is not particularly limited. Furthermore, for the left side of the block to be decoded, the first sample below the intermediate position may be determined as the midpoint of that side, or the first sample above the intermediate position may be determined as the midpoint of that side, but the present embodiment does not particularly limit this.
[0061] Unless otherwise specified, the following description will be given using the top edge of the block to be decoded as an example, but the prediction method of the present embodiment can also be applied to the left edge of the block to be decoded, or to other edges of the block to be decoded.
[0062] It can be understood that if the existence of neighboring reference samples on the left or top edge of the block to be decoded is not considered, the neighboring reference sample subset can be constructed according to equations (4) and (5).
number
number
[0063] where Δ represents the sampling interval, length represents the number of reference samples in the row adjacent to the top edge of the block to be decoded or the number of reference samples in the column adjacent to the left edge of the block to be decoded, N2 represents the expected number of adjacent reference samples forming the adjacent reference sample subset of the block to be decoded (typically 1 / 2 of the left edge and 1 / 2 of the top edge, respectively, but this is not particularly limited in the present embodiment), and shift represents the starting point position of the reference samples. Here, if the midpoint of the left edge or top edge of the block to be decoded is between two points, when the first sample to the right of the midpoint is used as the midpoint of the side, the starting point position is shift=Δ / 2, and when the first sample to the left of the midpoint is used as the midpoint of the side, the starting point position is shift=Δ / 2-1.
[0064] 9, for example, if length is equal to 16, N2 is equal to 8, and the left and top sides are each set to 1 / 2, i.e., the preset number of samples on the top side is 4, then Δ=length / (N2 / 2)=4 and shift=Δ / 2=2 are calculated according to equations (4) and (5), respectively. That is, the starting point position is 2, the sampling interval is 4, and the reference sample positions (such as 2, 6, 10, and 14) to be selected can be first determined, and then the corresponding reference samples can be selected to form an adjacent reference sample subset. Note that the preset number of samples corresponding to the left side and the preset number of samples corresponding to the top side can be the same or different, and this embodiment does not particularly limit this.
[0065] Furthermore, the present embodiment also provides a scheme for determining the preset number of samples, as shown in Table 2. In this case, in the present embodiment, N2' in Table 2 can be substituted into the above Equation (4) and Equation (5) instead of N2 for calculation, so that the formed neighbor reference sample subset is more accurate and the prediction performance of decoding is improved.
[0066] Table 2 shows the relationship between the size of the second color component block corresponding to the block to be decoded and the number of adjacent reference samples according to an embodiment of the present application. In Table 2, N represents the length of the short side of the block to be decoded, N1 represents the number of adjacent reference samples in the conventional technical solution, N2 represents the number of adjacent reference samples in the L0138 proposal, and N2' represents the number of adjacent reference samples in the embodiment of the present application. According to Table 2, if the length of the short side of the block to be decoded is less than or equal to 4, the adjacent reference sample subset may include 4 reference samples, and if the length of the short side of the block to be decoded is greater than 4, the adjacent reference sample subset may include 8 reference samples. [Table 2]
[0067] In some embodiments, determining a reference point from the at least one side and determining a reference sample position to be selected corresponding to the at least one side according to a preset sample number includes: calculating a first sampling interval based on the preset number of samples and the length of the at least one side; and determining, using a midpoint of the at least one side as a reference point, a reference sample position to be selected corresponding to the at least one side according to the first sampling interval.
[0068] Illustratively, determining a reference sample position to be selected corresponding to the at least one side according to the first sampling interval using a midpoint of the at least one side as a reference point includes: calculating a midpoint value of the at least one side based on a length of the at least one side; Calculating a reference sample position according to the midpoint value and a first sampling interval; If the midpoint value is a non-integer, rounding down the reference sample position to the left of the midpoint value and determining the rounded-down reference sample position as the reference sample position to be selected, and rounding up the reference sample position to the right of the midpoint value and determining the rounded-up reference sample position as the reference sample position to be selected.
[0069] Illustratively, determining a reference sample position to be selected corresponding to the at least one side according to the first sampling interval using a midpoint of the at least one side as a reference point includes: calculating a midpoint value of the at least one side based on a length of the at least one side; Calculating a reference sample position according to the midpoint value and a first sampling interval; If the midpoint value is a non-integer, rounding up the reference sample position to the left of the midpoint value and determining the rounded-up reference sample position as the reference sample position to be selected, and rounding down the reference sample position to the right of the midpoint value and determining the rounded-down reference sample position as the reference sample position to be selected.
[0070] It should be noted that the first sampling interval corresponding to one side of the block to be decoded can be calculated according to the preset number of samples and the length of the side. Furthermore, since the length of the left side or top side of the block to be decoded is an integer multiple of 2, the midpoint of the left side or top side of the block to be decoded is between two points. In this case, the calculated midpoint value is a non-integer, and the calculated reference sample position is also a non-integer. On the other hand, if the length of the left side or top side of the block to be decoded is not an integer multiple of 2, the midpoint of the left side or top side of the block to be decoded is not between two points. In this case, the calculated midpoint value is an integer, and the calculated reference sample position is also an integer. That is, the calculated midpoint value may be an integer or a non-integer, and correspondingly, the calculated reference sample position may also be an integer or a non-integer, but this is not particularly limited in the present embodiment.
[0071] Therefore, if the calculated midpoint value is an integer, the calculated reference sample position is also an integer, in which case the calculated reference sample position can be directly used as the reference sample position to be selected.If the calculated midpoint value is a non-integer, the calculated reference sample position is also a non-integer, in which case the reference sample position to be selected can be determined by rounding up or down.
[0072] For example, taking the upper edge shown in FIG. 11 as an example, if the preset number of samples is 2 and the length of the upper edge is 8, the first sampling interval can be determined to be 4. Since the length of the upper edge is 8, that is, the midpoint of the upper edge is between two points. Because the reference sample array starts from 0 and ends at 7, the actual position of the midpoint of the upper edge is calculated to be 3.5. Because the first sampling interval is 4, by shifting 4 / 2 points to the left and right of the midpoint, the reference point positions are calculated to be 1.5 and 5.5. In this case, by rounding down the reference sample position to the left of the midpoint value, one of the reference sample positions to be selected can be determined to be 1, and by rounding up the reference sample position to the right of the midpoint value, the other reference sample position to be selected can be determined to be 6. This method can also be called a rounding-out scheme, as shown in FIG. 12. In this way, adjacent reference sample subsets can be formed with reference samples corresponding to positions 1 and 6. Also, if the calculated reference sample positions are 1.5 and 5.5, one of the reference sample positions to be selected can be determined to be 2 by rounding up the reference sample position to the left of the midpoint value, and the other reference sample position to be selected can be determined to be 5 by rounding down the reference sample position to the right of the midpoint value. This method can be called a rounding-in scheme, as shown in Figure 13. In this way, the reference samples corresponding to positions 2 and 5 can form an adjacent reference sample subset.
[0073] In some embodiments, after calculating the first sampling interval, the prediction method for decoding comprises: adjusting the first sampling interval to obtain a second sampling interval; The method further includes determining, using a midpoint of the at least one side as a reference point, a reference sample position to be selected corresponding to the at least one side according to the second sampling interval.
[0074] In some embodiments, after obtaining the second sampling interval, the prediction method for decoding comprises: The method further includes determining, using the midpoint of the at least one side as a reference point, a reference sample position to be selected corresponding to a left side of the reference point according to the first sampling interval, and determining a reference sample position to be selected corresponding to a right side of the reference point according to the second sampling interval.
[0075] It should be noted that after the first sampling interval is calculated, it can be fine-tuned. For example, the second sampling interval can be obtained by adding or subtracting 1 from the first sampling interval. For example, if the first sampling interval is 4, the second sampling interval obtained by adjustment can be 3 or 5. In this embodiment, the first sampling interval can be adjusted within a narrow range (for example, by adding or subtracting 1), but the specific setting of the adjustment range is not particularly limited in this embodiment.
[0076] Furthermore, after determining the reference point of at least one side of the block to be decoded, uniform sampling can be performed according to the first sampling interval or the second sampling interval, or non-uniform sampling can be performed according to the first sampling interval and the second sampling interval. Furthermore, the reference sample positions to be selected determined after sampling can be distributed symmetrically on both sides of the reference point, or distributed asymmetrically on both sides of the reference point, and the present embodiment does not particularly limit this.
[0077] In some embodiments, determining a reference point from the at least one side and determining a reference sample position to be selected corresponding to the at least one side according to a preset sample number includes: and determining successive reference sample positions near the reference point as reference sample positions to be selected according to the preset number of samples, using the midpoint of the at least one side as a reference point, wherein the reference point is located at an intermediate position of the reference sample positions to be selected.
[0078] It should be noted that, among the neighboring reference samples, the one correlated with the first color component reconstruction value of the block to be decoded is the reference sample at the intermediate position, so the reference sample position of a preset number of consecutive samples near the intermediate position is used as the reference sample position to be selected. This method can also be called an intermediate position consecutive scoring scheme, as shown in Figure 14. The reference samples corresponding to positions 2, 3, and 4 can form an adjacent reference sample subset.
[0079] If the reference sample positions of the rows / columns adjacent to the top or left edge of the block to be decoded are numbered from 0, the number of adjacent reference samples in the adjacent reference sample subset formed in this embodiment and the corresponding reference sample positions to be selected are as shown in Table 3. [Table 3]
[0080] In this embodiment, a preset number of consecutive reference sample positions near the middle position are used as the reference sample positions to be selected to form an adjacent reference sample subset, and predictive decoding is performed according to the adjacent reference sample subset, which can still reduce the bit rate and improve the decoding gain according to the L0138 proposal, thereby improving the predictive performance of decoding.
[0081] In some embodiments, the block to be decoded comprises a square decode block or a non-square decode block.
[0082] Furthermore, in some embodiments, if the block to be decoded is a non-square decoding block, the prediction method for decoding comprises: determining a long side of the block to be decoded and a third sampling interval corresponding to the long side based on a length of at least one side of the block to be decoded; The method further includes determining a reference sample position to be selected corresponding to the long side by deleting a reference sample corresponding to an end position of the long side, performing an initial offset on the long side from which the reference sample has been deleted according to a preset offset, and using the offset reference sample position as a starting point to perform sampling on the long side from which the reference sample has been deleted according to the third sampling interval.
[0083] It should be noted that the present embodiment can be applied to square decode blocks, and can also be applied to non-square decode blocks, and the present embodiment is not particularly limited thereto.
[0084] Furthermore, if the block to be decoded is a non-square decoding block, one of the left and top edges of the block to be decoded is the long edge, and the other is the short edge. The third sampling interval corresponding to the long edge can be obtained based on the ratio of the long edge to the short edge. Before sampling the long edge, a reference sample corresponding to the end position of the long edge can be deleted first. Then, an initial offset is performed on the long edge from which the reference sample has been deleted according to a preset offset. The offset reference sample position is used as a starting point, and then sampling is performed on the long edge from which the reference sample has been deleted to determine the reference sample position to be selected corresponding to the long edge. In this embodiment, the preset offset may be 1 / 2 of the third sampling interval or another value, but this is not particularly limited in this embodiment.
[0085] For example, in the related technical solution, the reference sample sampling for the long side of a non-square decoding block is as shown in FIG. 4B. In FIG. 4B, the third sampling interval can be determined to be 4 according to the ratio of the long side to the short side. Starting from the first reference sample position on the left side of the long side, the same number of reference samples as the adjacent reference samples on the short side are selected according to the third sampling interval. In this case, the sampled reference samples are on the left side and cannot cover the characteristics of the entire long side. Therefore, in this embodiment, an initial offset is first performed for the long side of the non-square decoding block, so that the sampled reference samples can cover the characteristics of the entire long side. For example, the preset offset is 1 / 2 of the third sampling interval, i.e., the preset offset is 2. That is, in this embodiment, sampling starts from 2. The adjacent reference sample subset formed in this way can better cover the characteristics of the entire long side.
[0086] In some embodiments, determining a reference point from the at least one side and determining a reference sample position to be selected corresponding to the at least one side according to a preset sample number includes: Deleting reference samples corresponding to the start position and the end position of the at least one side, respectively, to obtain a second set of adjacent reference samples; and determining, based on the second adjacent reference sample set, a reference sample position to be selected according to a preset number of samples, using the midpoint of the at least one side as a reference point.
[0087] It should be noted that in this embodiment, the reference point is the midpoint of the left side or the top side of the block to be decoded, and the reference sample selection is directly selected to form the adjacent reference sample subset.In this embodiment, the reference sample corresponding to the start position and the end position (for example, for the top side, the start position is the leftmost position and the end position is the rightmost position, and for the left side, the start position is the topmost position and the end position is the bottommost position) corresponding to the left side / top side of the block to be decoded is first deleted, and the reference sample in the middle part is reserved, and then the selected reference sample forms the adjacent reference sample subset.
[0088] It should also be noted that the preset number of samples can be any value. Generally, the preset number of samples may be less than N1 in Table 2. However, the present embodiment is not limited to the preset number of samples being equal to N2 or N2'. Because the preset number of samples is less than N1 in Table 2, the complexity of reference sample search can be reduced, thereby improving decoding prediction performance. Specifically, by changing the Δ and shift values in the above equations (4) and (5), the reference sample position to be selected can be determined based on different starting points and sampling intervals, and the corresponding reference samples can be selected to form adjacent reference sample subsets.
[0089] In some embodiments, performing predictive decoding on the block to be decoded based on the subset of neighboring reference samples comprises: determining model parameters based on the subset of adjacent reference samples; establishing a prediction model according to the model parameters, the prediction model being used to represent a predictive relationship between a first color component and a second color component corresponding to each sample in the block to be decoded; and performing predictive decoding on the block to be decoded based on the prediction model.
[0090] It should be noted that after obtaining the adjacent reference sample subset, model parameters α and β can be constructed. In this way, a prediction model can be established according to the above formula (1). According to the prediction model, predictive decoding can be performed on the block to be decoded. Since both the importance and variance of the adjacent reference samples included in the adjacent reference sample subset are taken into account, the constructed model parameters are more accurate, which improves the prediction performance of decoding and further reduces the bit rate.
[0091] According to the prediction method for decoding of the above embodiment, reference samples adjacent to at least one side of a block to be decoded are obtained, a first adjacent reference sample set is obtained, a reference point is determined from the at least one side, a reference sample position to be selected corresponding to the at least one side according to a preset number of samples is determined, a reference sample corresponding to the reference sample position to be selected is selected from the first adjacent reference sample set based on the reference sample position to be selected, an adjacent reference sample subset is formed with the selected reference samples, and predictive decoding is performed on the block to be decoded based on the adjacent reference sample subset. Since the adjacent reference sample subset takes into account both importance and variance of the adjacent reference samples, and the adjacent reference sample subset contains few samples, the search complexity is reduced, the prediction performance of video image decoding is improved, and the bit rate can be reduced.
[0092] Based on the same inventive concept as the technical solution shown in Fig. 8, Fig. 15 is a schematic structural diagram of a prediction device 150 for decoding according to an embodiment of the present application. The prediction device 150 for decoding may include an obtaining unit 1501, a determining unit 1502, a selecting unit 1503, and a decoding unit 1504.
[0093] The obtaining unit 1501 is configured to obtain reference samples adjacent to at least one side of a block to be decoded, and obtain a first set of adjacent reference samples; the determining unit 1502 is configured to determine a reference point from the at least one side, and determine a reference sample position to be selected corresponding to the at least one side according to a preset number of samples; the selecting unit 1503 is configured to, based on the reference sample position to be selected, select a reference sample corresponding to the reference sample position to be selected from the first adjacent reference sample set, and form an adjacent reference sample subset with the selected reference sample; The decoding unit 1504 is configured to perform predictive decoding on the block to be decoded based on the subset of neighboring reference samples.
[0094] In the above solution, the determining unit 1502 is specifically configured, based on the length of the at least one side, to use the first reference sample position on the right side of the midpoint as the reference point of the at least one side, or to use the first reference sample position on the left side of the midpoint as the reference point of the at least one side, if the midpoint of the at least one side is at the midpoint between two reference samples.
[0095] In the above solution, the determining unit 1502 is specifically configured, based on the length of the at least one side, to use the first reference sample position below the intermediate position as the reference point of the at least one side when the midpoint of the at least one side is at the intermediate position between two reference samples, or to use the first reference sample position above the intermediate position as the reference point of the at least one side.
[0096] In the above solution, referring to FIG. 15, the prediction device 150 for decoding further includes a calculation unit 1505, and the calculation unit 1505 is configured to calculate a first sampling interval based on the preset number of samples and the length of the at least one side; The determining unit 1502 is specifically configured to: determine, with the midpoint of the at least one side as a reference point, a reference sample position to be selected corresponding to the at least one side according to the first sampling interval.
[0097] In the above solution, the calculation unit 1505 is further configured to calculate a midpoint value of the at least one side based on a length of the at least one side; and calculate a reference sample position according to the midpoint value and a first sampling interval; Specifically, the determining unit 1502 is configured to, when the midpoint value is a non-integer, round down the reference sample position on the left side of the midpoint value and determine the rounded-down reference sample position as the reference sample position to be selected, and round up the reference sample position on the right side of the midpoint value and determine the rounded-up reference sample position as the reference sample position to be selected.
[0098] In the above solution, the calculation unit 1505 is further configured to calculate a midpoint value of the at least one side based on a length of the at least one side; and calculate a reference sample position according to the midpoint value and a first sampling interval; Specifically, the determining unit 1502 is configured to, when the midpoint value is a non-integer, round up the reference sample position on the left side of the midpoint value and determine the rounded-up reference sample position as the reference sample position to be selected, and round down the reference sample position on the right side of the midpoint value and determine the rounded-down reference sample position as the reference sample position to be selected.
[0099] In the above solution, referring to FIG. 15 , the prediction device 150 for decoding further includes an adjusting unit 1506, and the adjusting unit 1506 is configured to adjust the first sampling interval to obtain a second sampling interval; The determining unit 1502 is further configured to determine, with a midpoint of the at least one side as a reference point, a reference sample position to be selected corresponding to the at least one side according to the second sampling interval.
[0100] In the above solution, the determining unit 1502 is further configured to: take the midpoint of the at least one side as a reference point, determine a reference sample position to be selected corresponding to the left side of the reference point according to the first sampling interval, and determine a reference sample position to be selected corresponding to the right side of the reference point according to the second sampling interval.
[0101] In the above solution, the determining unit 1502 is further configured to take the midpoint of the at least one side as a reference point and determine consecutive reference sample positions near the reference point as reference sample positions to be selected according to the preset sample number, and the reference point is at an intermediate position of the reference sample positions to be selected.
[0102] In the above solutions, the blocks to be decoded include square decode blocks or non-square decode blocks.
[0103] In the above solution, the obtaining unit 1501 is further configured to obtain a second adjacent reference sample set by removing reference samples respectively corresponding to a start position and an end position of the at least one side; The determining unit 1502 is further configured to: determine, with the midpoint of the at least one side as a reference point, a reference sample position to be selected according to a preset number of samples based on the second adjacent reference sample set.
[0104] In the above solution, referring to FIG. 15 , the prediction device 150 for decoding further includes an establishing unit 1507, which is configured to determine model parameters based on the neighboring reference sample subset, and establish a prediction model according to the model parameters, where the prediction model is used to represent a prediction relationship between a first color component and a second color component corresponding to each sample in the block to be decoded; The decoding unit 1504 is specifically configured to perform predictive decoding on the block to be decoded based on the prediction model.
[0105] It is understood that in this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program, or software, and may of course be modular or non-modular. Furthermore, each component in this embodiment may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be realized in the form of hardware or in the form of a software functional module.
[0106] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the essential part of the technical solution of this embodiment, i.e., the part contributing to the prior art, or all or part of the solution of the technology, can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0107] Therefore, this embodiment provides a computer storage medium, which stores a decoding prediction program, and when the decoding prediction program is executed by at least one processor, it realizes the method steps in the technical solution shown in Figure 8 above.
[0108] Based on the configuration of the prediction device for decoding 150 and the computer storage medium, FIG. 16 shows an example of a specific hardware structure of the prediction device for decoding 150 provided in the embodiment of the present application. The prediction device for decoding 150 may include a network interface 1601, a memory 1602, and a processor 1603, and each component is coupled via a bus system 1604. It can be understood that the bus system 1604 is used to realize connection communication between these components. In addition to a data bus, the bus system 1604 includes a power bus, a control bus, and a status signal bus. However, for clarity of explanation, various buses are represented as the bus system 1604 in FIG. 16. Here, the network interface 1601 is configured to receive and transmit signals in the process of transmitting and receiving information to and from other external elements, The memory 1602 is configured to store a computer program executable by the processor 1603 .
[0109] When the processor 1603 executes the computer program, Obtaining reference samples adjacent to at least one side of the block to be decoded to obtain a first set of adjacent reference samples; Determine a reference point from the at least one side, and determine a reference sample position to be selected corresponding to the at least one side according to a preset sample number; selecting a reference sample corresponding to the reference sample position to be selected from the first adjacent reference sample set based on the reference sample position to be selected, and forming an adjacent reference sample subset with the selected reference sample; The decoder is configured to perform predictive decoding on the block to be decoded based on the subset of neighboring reference samples.
[0110] It will be appreciated that memory 1602 in this embodiment may be volatile or nonvolatile memory, or may include both volatile and nonvolatile memory. Nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. Various forms of RAM may be used, including, by way of example and not limitation, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). Memory 1602 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0111] The processor 1603 may be an integrated circuit chip with signal processing functions. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 1603 or by instructions in the form of software. The processor 1603 may be 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, etc., and can implement or execute each method, step, and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be performed directly by a hardware decode processor or by a combination of hardware and software modules in the decode processor. The software modules may be located in conventional storage media such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 1602, and the processor 1603 reads the information in the memory 1602 and completes the steps of the above method in combination with its hardware.
[0112] It will be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing unit is implemented in one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processing (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field-Programmable Gate Arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
[0113] In the case of a software implementation, the technical solutions described herein can be realized by executing modules of functionality (e.g., processes, functions, etc.) described herein. The software codes can be stored in a memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0114] Illustratively, as another embodiment, the processor 1603 is further configured to perform the steps of the method in the technical solution shown in FIG. 8 above when executing the computer program.
[0115] It should be noted that the technical solutions described in the embodiments of the present invention can be arbitrarily combined if they are not conflicting with each other.
[0116] The above content is merely a specific embodiment of the present application, and the scope of protection of the present application is not limited thereto. Any modifications or replacements that a person skilled in the art can easily think of within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. [Industrial Applicability]
[0117] In this embodiment, the present invention first obtains reference samples adjacent to at least one side of the block to be decoded to obtain a first adjacent reference sample set, then determines a reference point from the at least one side, and determines a reference sample position to be selected corresponding to the at least one side according to a preset number of samples, then selects a reference sample corresponding to the reference sample position to be selected from the first adjacent reference sample set based on the reference sample position to be selected, forms an adjacent reference sample subset with the selected reference samples, and finally performs predictive decoding on the block to be decoded based on the adjacent reference sample subset. Because the selection of adjacent reference samples in the adjacent reference sample subset takes into account both importance and variance, model parameters constructed based on the adjacent reference sample subset are more accurate, which can improve the prediction performance of video image decoding. Because the adjacent reference sample subset contains few samples, the search complexity is also reduced, which improves the prediction performance of video image decoding and can thereby reduce the bit rate.
Claims
1. 1. A decoding system, comprising: Receive the bitstream, configured to perform the following steps to decode the bitstream, said steps comprising: obtaining adjacent reference samples of at least one side of the block to be decoded; determining a starting point position and a first sampling interval based on a preset number of samples and a number of adjacent reference samples of the at least one side; determining a reference sample corresponding to the preset number of samples from the adjacent reference samples according to a first sampling interval from the starting point position; and performing predictive decoding on the block to be decoded based on the determined reference sample.
2. determining the starting point position and the first sampling interval based on the preset number of samples and the number of adjacent reference samples of the at least one side; calculating the first sampling interval based on the preset number of samples and the number of adjacent reference samples of the at least one side using the following formula: Δ = number of adjacent reference samples / preset number of samples where Δ represents the first sampling interval.
2. The decoding system of claim 1.
3. determining the starting point position and the first sampling interval based on the preset number of samples and the number of adjacent reference samples of the at least one side; using the first sampling interval to calculate the starting point location using the following formula: shift=Δ / 2 where shift represents the starting point position and Δ represents the first sampling interval.
2. The decoding system of claim 1.
4. performing predictive decoding on the block to be decoded based on the determined reference sample, determining model parameters of a predictive model based on the determined reference sample; performing predictive decoding on the block to be decoded based on the prediction model, wherein the prediction model is used to represent a predictive relationship between a first color component and a second color component in the block to be decoded.
2. The decoding system of claim 1.
5. Determining model parameters of the predictive model based on the determined reference sample includes: determining, from the determined reference samples, a maximum value L_max and a minimum value L_min of the adjacent reference values of the first color component, and adjacent reference values C_max and C_min of the second color component corresponding to the reference samples at positions corresponding to L_max and L_min; calculating model parameters of the prediction model based on L_max, L_min, C_max, and C_min; 5. The decoding system of claim 4.
6. determining the reference sample corresponding to the preset number of samples from the adjacent reference samples according to the first sampling interval from the starting point position, When the number of adjacent reference samples on the at least one side is 16, the starting point position is 2, the first sampling interval is 4, and the preset number of samples is 4, the positions of the reference samples corresponding to the preset number of samples from the adjacent reference samples are 2, 6, 10, and 14.
2. The decoding system of claim 1.
7. determining the reference sample corresponding to the preset number of samples from the adjacent reference samples according to the first sampling interval from the starting point position, When the number of adjacent reference samples on the at least one side is 8, the starting point position is 2, the first sampling interval is 4, and the preset number of samples is 2, the positions of the reference samples corresponding to the preset number of samples from the adjacent reference samples are 2 and 6.
2. The decoding system of claim 1.
8. the at least one edge includes at least one of a left edge of the block to be decoded and a top edge of the block to be decoded; 2. The decoding system of claim 1.
9. 1. A coding prediction method, comprising: obtaining neighboring reference samples of at least one side of the block to be coded; determining a starting point position and a first sampling interval based on a preset number of samples and a number of adjacent reference samples of the at least one side; determining a reference sample corresponding to the preset number of samples from the adjacent reference samples according to a first sampling interval from the starting point position; and performing predictive coding on the block to be coded based on the determined reference sample.
10. 1. A computer storage medium having a computer program and a bitstream stored therein, the computer program, when executed by a processor, causing the processor to: obtaining neighboring reference samples of at least one side of the block to be coded; determining a starting point position and a first sampling interval based on a preset number of samples and a number of adjacent reference samples of the at least one side; determining a reference sample corresponding to the preset number of samples from the adjacent reference samples according to a first sampling interval from the starting point position; and performing predictive coding on the block to be coded based on the determined reference sample.