WO2026007672A1 - 视频帧预测方法、视频码流处理方法及相关装置 - Google Patents
视频帧预测方法、视频码流处理方法及相关装置Info
- Publication number
- WO2026007672A1 WO2026007672A1 PCT/CN2025/100871 CN2025100871W WO2026007672A1 WO 2026007672 A1 WO2026007672 A1 WO 2026007672A1 CN 2025100871 W CN2025100871 W CN 2025100871W WO 2026007672 A1 WO2026007672 A1 WO 2026007672A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- angle
- prediction
- mode
- current
- index
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/109—Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
Definitions
- This application relates to the field of video coding technology, and in particular to a video frame prediction method, a video bitstream processing method, and related apparatus.
- Video frame prediction includes intra-frame prediction and inter-frame prediction.
- Video frame prediction primarily uses pixels from reconstructed regions as reference pixels to predict pixels in the current block, aiming to remove spatial redundancy in the video signal. If a video frame contains video blocks with complex texture structures, the prediction difficulty will undoubtedly increase. How to accurately predict video blocks with complex texture structures is a technical problem that needs to be solved.
- This application provides a video frame prediction method, a video stream processing method, and related apparatus.
- embodiments of this application provide a video frame prediction method, the method comprising: determining a plurality of first angle patterns based on spatial angle pattern statistics; determining the prediction result corresponding to the first angle pattern used by the current CU based on the index of the first angle pattern; and determining the fusion prediction result of the current CU based on the prediction result corresponding to each of the first angle patterns and a first weight coefficient.
- embodiments of this application provide a video bitstream processing method, the method comprising: setting a preset switch flag in encoding parameter information to an on flag value, the preset switch flag being used to indicate whether to perform fusion prediction, wherein the fusion prediction is implemented based on the video frame prediction method as described in the first aspect; and writing the encoding parameter information into the video bitstream.
- embodiments of this application provide a video stream processing method, the method comprising: receiving a video stream and obtaining encoding parameter information from the video stream; performing fusion prediction based on a preset switch flag in the encoding parameter information, wherein the fusion prediction is implemented based on the video frame prediction method as described in the first aspect.
- embodiments of this application provide an electronic device, including: at least one processor; at least one memory for storing at least one program; and when at least one of the programs is executed by at least one of the processors, implementing the video frame prediction method as described in the first aspect, or the video stream processing method as described in the second aspect, or the video stream processing method as described in the third aspect.
- embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the video frame prediction method as described in the first aspect, or the video stream processing method as described in the second aspect, or the video stream processing method as described in the third aspect.
- embodiments of this application provide a machine program product, including a computer program, which, when executed by a processor, implements the video frame prediction method as described in the first aspect, or the video stream processing method as described in the second aspect, or the video stream processing method as described in the third aspect.
- FIG. 1 is a flowchart of the video frame prediction method provided in the embodiments of this application.
- FIG. 2 is a flowchart of step S100 in Figure 1, which determines multiple first angle modes
- Figure 3 is a schematic diagram of multiple spatial sampling points provided in an embodiment of this application.
- Figure 4 is a schematic diagram of a frequency histogram provided in an embodiment of this application.
- FIG. 5 is a flowchart of step S120 in Figure 2, which determines the frequency histogram.
- FIG. 6 is a flowchart of step S130 in Figure 2, which determines the first angle mode.
- FIG 7 is a flowchart of step S200 in Figure 1, which determines the prediction result when the index of the first angle pattern belongs to the first index.
- FIG 8 is a flowchart of step S210 in Figure 7, which determines the prediction result.
- Figure 9 is a schematic diagram of a reference pixel provided in an embodiment of this application.
- Figure 10 is a flowchart of step S200 in Figure 1, which determines the prediction result when the index of the first angle pattern does not belong to the first index.
- Figure 11 is a flowchart of obtaining the first weight coefficient corresponding to the first angle pattern according to an embodiment of this application;
- Figure 12 is a flowchart of obtaining the prediction loss value corresponding to the first angle pattern provided in an embodiment of this application;
- Figure 13 is a schematic diagram of an L-shaped template area provided in an embodiment of this application.
- Figure 14 is a schematic diagram of the upper template area provided in an embodiment of this application.
- Figure 15 is a schematic diagram of the left template area provided in an embodiment of this application.
- Figure 16 is a schematic diagram of the template area and the current CU provided in the embodiment of this application.
- Figure 17 is a flowchart of step S411 in Figure 12, which determines the predicted pixel value of the template region.
- Figure 18 is a flowchart of obtaining the first weight coefficient corresponding to the first angle pattern according to an embodiment of this application.
- FIG 19 is a flowchart of a video stream processing method provided in an embodiment of this application.
- Figure 20 is a schematic diagram of the video stream processing framework provided in the encoding process according to an embodiment of this application.
- FIG 21 is a flowchart of step S610 in Figure 19, which sets the preset switch flag in the encoded parameter information to the on flag value.
- FIG. 22 is another flowchart of the video stream processing method provided in an embodiment of this application.
- Figure 23 is a schematic diagram of the video stream processing framework provided in the decoding process according to an embodiment of this application.
- Figure 24 is a flowchart of step S720 in Figure 22, which performs fusion prediction based on the preset switch flag in the encoding parameter information.
- Figure 25 is a schematic diagram of an electronic device provided in an embodiment of this application.
- At least one of the following and similar expressions refer to any group of these items, including any group of singular or plural items.
- at least one of a, b, and c can mean: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
- Video frame prediction uses pixels from reconstructed regions as reference pixels to predict pixels in the current block, aiming to remove spatial redundancy in the video signal and improve video compression efficiency.
- a video frame contains video blocks with complex texture structures, the prediction difficulty undoubtedly increases. How to accurately predict video blocks with complex texture structures is a technical problem that needs to be solved.
- embodiments of this application provide a video frame prediction method, an electronic device, a computer-readable storage medium, and a computer program product.
- the video frame prediction method provided by these embodiments combines the advantages of prediction using multiple first angle modes to accurately predict video blocks with complex textures, thereby improving the accuracy of frame prediction.
- the first weighting coefficient corresponds to the first angle mode, enabling better allocation of each prediction result, resulting in a more accurate fused prediction result and enhancing the prediction accuracy for video blocks with complex texture structures.
- the video frame prediction method provided in this application embodiment includes, but is not limited to, the following steps:
- Step S100 Determine multiple first angle modes based on the spatial angle mode statistics information.
- Step S200 Determine the prediction result corresponding to the first angle mode used by the current CU based on the index of the first angle mode.
- Step S300 Determine the fusion prediction result of the current CU based on the prediction results and first weight coefficients corresponding to each first angle mode.
- the spatial domain also known as the pixel domain, is the space where pixels are located.
- the spatial domain refers to the representation of the signal in two-dimensional space.
- the video frame prediction in this application embodiment includes intra-frame prediction and inter-frame prediction.
- the spatial domain refers to the spatial domain of the current frame;
- the spatial domain refers to the spatial domain of the reference frame.
- angle pattern statistics refer to the statistics of the angle patterns used by the coding units that have been reconstructed in each spatial domain.
- Angle prediction modes also known as angle prediction modes, predict the current pixel using already encoded pixels.
- HEVC High Efficiency Video Coding
- H.265 there are 33 angle prediction modes.
- VCC Versatile Video Coding
- H.266 the number of angle prediction modes is expanded from 33 to 65.
- the first angle mode is the angle prediction mode used by multiple coding units in the spatial domain corresponding to the current CU.
- the index corresponds to the first angle mode
- the index is used to guide the determination of the prediction result corresponding to the first angle mode for the current CU. Based on the index of the first angle mode, the prediction result corresponding to the first angle mode for the current CU is determined in a manner corresponding to the index.
- each first-angle mode there is a corresponding prediction result and a first weighting coefficient.
- the prediction result refers to the prediction result of the current CU using the first-angle mode, while the first weighting coefficient is used to indicate the importance of its corresponding prediction result in the fusion prediction result of the current CU.
- fusion prediction is performed on the current CU to determine the prediction result of the current CU.
- the video frame prediction method can combine the advantages of multiple first angular pattern predictions to accurately predict video blocks with complex texture results, thereby improving the accuracy of intra-frame prediction.
- the first weight coefficient corresponds to the first angular pattern, enabling better allocation of each prediction result, making the obtained fusion prediction result more accurate and improving the prediction accuracy for video blocks with complex texture structures.
- step S100 includes:
- Step S110 Determine multiple spatial sampling points.
- Step S120 Construct a frequency histogram based on the angle mode information of the CU where each spatial sampling point is located.
- Step S130 Determine multiple first angle modes based on the frequency histogram.
- sampling is performed within the spatial domain corresponding to the video signal to determine multiple spatial sampling points.
- this embodiment requires determining even more spatial sampling points to enhance the search and utilization of spatial information. Referring to Figure 3, this embodiment determines as many as 92 spatial sampling points within the spatial domain.
- the spatial sampling points are located in the coding unit (CU).
- the angular mode information of the CU where each spatial sampling point is located is determined, and a frequency histogram is constructed.
- the horizontal axis of the frequency histogram represents the angular mode information
- the vertical axis represents the amplitude. This can be used to represent the number of CUs using each angular mode information.
- the first angle mode can be determined based on the frequency of occurrence of each angle mode information displayed in the frequency histogram.
- a frequency histogram is constructed based on the angle pattern information of the CUs where multiple spatial sampling points are located, and then multiple first angle patterns are determined.
- the first angle patterns are determined based on the frequency of occurrence of each angle pattern information in multiple CUs in the spatial domain. The selection of the first angle patterns is more accurate, thereby improving the accuracy of intra-frame prediction.
- the spatial sampling point includes at least one of the neighboring sampling points and the non-neighboring sampling points.
- the CU containing the neighboring sampling points is adjacent to the CU that needs to be predicted.
- the five neighboring sampling points in Figure 3 are all located in CUs adjacent to the current CU.
- the CUs containing the non-neighboring sampling points are not adjacent to the current CU.
- the spatial sampling points in Figure 3 include a total of 87 non-neighboring sampling points, and the CUs containing all 87 non-neighboring sampling points are not adjacent to the current CU.
- spatial sampling points include at least one of neighboring and non-neighboring sampling points. Neighboring and non-neighboring sampling points can be selected according to requirements. When the spatial sampling points are only neighboring or non-neighboring points, determining the first angle pattern based on multiple spatial sampling points significantly reduces the amount of spatial sampling point data that needs to be processed, thus reducing the time required to determine the first angle pattern. However, when the spatial sampling points include both neighboring and non-neighboring sampling points, the spatial information contained in the spatial sampling points is more diverse, thereby improving the matching degree between the first angle pattern and the current CU, and improving the accuracy of intra-frame prediction.
- neighboring sampling points include adjacent pixels located above, to the upper left, to the left, to the lower left, and to the upper right of the current CU.
- the 5 neighboring sampling points are the adjacent pixels located above, above left, to the left, below left, and above right of the current CU.
- non-neighboring sampling points include non-adjacent pixels located above, to the left, to the left, to the lower left, and to the upper right of the current CU.
- the non-neighboring sampling points are the non-adjacent pixels located above, to the upper left, to the left, to the lower left, and to the upper right of the current CU.
- Neighboring and non-neighboring sampling points are located above, to the upper left, to the left, to the lower left, and to the upper right of the current CU. These correspond to the pixels required for prediction using the angle prediction mode, which helps to determine the first angle mode to meet the prediction requirements of the current CU.
- step S120 includes:
- Step S121 Traverse the CUs where each spatial sampling point is located, and determine the second angle mode used for the current traversal of the CUs.
- Step S122 Add the surface accumulation of the currently traversed CU to the second angle mode of the frequency histogram.
- HoC is the frequency histogram (histogram of frequency occurrence)
- idx is the angle mode information (e.g., angle mode index).
- idx ranges from 1 to 66, where idx of 1 indicates a DC mode, and idx values between 2 and 66 represent 65 traditional angle prediction modes.
- steps S121 and S122 by traversing the CUs where each spatial sampling point is located, accumulate the surface of the currently traversed CU and add it to the second angle mode corresponding to the frequency histogram and the currently traversed CU. Based on the frequency histogram, the applicable frequency of each second angle mode at the spatial sampling point of the current CU can be accurately determined, thereby improving the accuracy of the first angle mode.
- step S130 includes:
- Step S131 Determine the n second-angle patterns with the highest amplitude based on the frequency histogram, where n is greater than or equal to 1 and less than or equal to 5.
- Step S132 Determine the first angle pattern based on n second angle patterns, wherein the first angle pattern includes at least a planar pattern.
- n is the number of second-angle modes with the highest amplitude in the frequency histogram selected.
- the maximum value of n is set to 5 in order to reduce the amount of computation, that is, n is an integer located in the interval [1,5].
- this embodiment sorts the multiple second-angle modes in descending order of amplitude and obtains the top 5, i.e., the 5 second-angle modes with the highest amplitude. If there are fewer than 5 second-angle modes with non-zero amplitude in the frequency histogram, then multiple second-angle modes with non-zero amplitude are obtained.
- n can also be set to other values as needed, depending on the intra-frame mode.
- the maximum value of n can be set to 5.
- the intra-frame mode is Decoder-side Intra Mode Derivation (DIMD)
- the maximum value of n is set to 5.
- the intra-frame mode is Template-based Intra Mode Derivation (TIMD)
- the maximum value of n is 3.
- the maximum value of n for Spatial Geometric Partitioning Mode (SGPM) is 2.
- n second-angle patterns these n second-angle patterns and the planar pattern are defined as first-angle patterns. Therefore, the number of first-angle patterns is greater than or equal to 2 and less than or equal to 6.
- the n second angle modes and plane modes with the highest amplitude in the frequency histogram are used as the first angle modes so that the first angle modes can correspond to the current CU and improve the accuracy of intra-frame prediction.
- step S200 includes:
- Step S210 If the index of the first angle mode belongs to the first index, use the matrix-based intra-frame prediction mode to determine the prediction result corresponding to the first angle mode.
- the first index includes 1 and (2+2*k), k ⁇ [0,32].
- the first index includes 1 and (2+2*k), where k is a positive integer in the interval [0,32]. If the first index is 1, the first angle mode is DC mode. If the first index is (2+2*k), the first angle mode is traditional angle prediction mode.
- the prediction result corresponding to the first angle mode is determined using a matrix-based intra-prediction mode.
- the matrix-based intra-prediction mode is a non-linear intra-prediction mode, and compared with the linear prediction in related technologies, the non-linear intra-prediction mode has higher prediction accuracy.
- step S210 when the index of the first angle mode belongs to the first index, the prediction result corresponding to the first angle mode is determined by the matrix-based intra-frame prediction mode, so as to make prediction by nonlinear intra-frame prediction mode, and the prediction result corresponding to the first index has higher accuracy.
- step S210 includes:
- Step S211 Obtain the second weight coefficient corresponding to the target position and the first angle pattern in the current CU from the weight matrix;
- Step S212 Obtain the reference pixel corresponding to the target position according to the first angle mode
- Step S213 Based on the second weighting coefficient and the reference pixel, obtain the predicted pixel of the target position;
- Step S214 Based on the predicted pixels of each target position in the current CU, obtain the prediction result corresponding to the first angle mode.
- the weight matrix corresponds to each position in the current CU.
- the weight matrix contains multiple weight coefficients corresponding to the first index. Since the first index includes 1 and (2+2*k), k ⁇ [0,32], it can be determined that the first index contains a total of 34 values. Therefore, each weight matrix contains 34 weight coefficients.
- the first index is determined based on the first angle mode used by the current CU, so that the second weight coefficient corresponding to the first index can be obtained in the weight matrix corresponding to the target position.
- the reference pixel is the neighboring spatial pixel of the current CU.
- P is the current CU
- its reference pixel area is the L-shaped shaded area in the figure.
- the L-shaped reference pixel area consists of two parts. If the length of the current CU is W and the width is H, then one part of the reference pixel area has a length of 2*W and a width of T1, and the other part has a length of T2 and a width of 2*H.
- the size and shape of the current CU are not fixed; it can be a square or a rectangle. To ensure that the reference pixel corresponds to each position in the current CU, this embodiment sets corresponding T1 and T2 for current CUs of different sizes.
- the method for determining the reference pixel differs depending on the first angle mode.
- the reference pixels for the DC mode are the pixels above and to the left of the target position.
- the reference pixels predicted by the traditional angle mode need to be determined based on the angle predicted by the angle mode. Therefore, it is necessary to obtain the reference pixels corresponding to the target position based on the first angle mode.
- the predicted pixels at the target positions are determined based on a second weighting coefficient and a reference pixel.
- the predicted pixel is the product of the second weighting coefficient and the reference pixel.
- (x,y) is the target position in the current CU
- P(x,y) represents the prediction result corresponding to the first angle mode in the current CU
- l is the first index to which the first angle mode belongs
- the value of l is 1 and (2+2*k)
- F(x,y) is the weight matrix of the target position (x,y)
- F(x,y,l) represents the second weight coefficient corresponding to the target position and the first angle mode in the current CU
- r(l) is the reference pixel corresponding to the target position.
- each reference pixel and the second weight coefficient are assigned an index l, the setting of which represents the calculation order, which facilitates the calculation of the prediction result.
- the second weight coefficient corresponding to the target position and the first angle mode in the current CU is obtained from the weight matrix, and the reference pixel corresponding to the target position is obtained according to the first angle mode, so as to obtain the predicted pixel of the target position according to the second weight coefficient and the reference pixel.
- the prediction result corresponding to the first angle mode is determined. The method of determining the prediction result provides detailed steps of the nonlinear intra-frame prediction mode to make the obtained prediction result more accurate.
- step S200 also includes:
- Step S220 If the index of the first angle pattern does not belong to the first index, use the angle prediction pattern to determine the prediction result corresponding to the first angle pattern.
- the index of the first angle mode is not a first index; that is, in this case, the index includes 0 and (1+2*k), where k is a positive integer in the interval [0,32]. If the value corresponding to the index is 0, the first angle mode is a planar mode. If the value corresponding to the index is (1+2*k), the first angle mode is a traditional angle prediction mode.
- the prediction result corresponding to the first angle mode is determined using the angle prediction mode corresponding to the first angle mode.
- the first angle mode is a planar mode
- the planar mode is used to determine the prediction result of the current CU using the first angle mode
- the planar mode is a special angle mode. If the index corresponding to the first angle mode is 5, the angle prediction mode is used to determine the prediction result of the current CU using the first angle mode.
- step S220 when the index of the first angle mode does not belong to the first index, the prediction result corresponding to the first angle mode is determined using the angle prediction mode. Since the angle prediction mode is a linear intra-frame prediction mode, the final determined fusion prediction result of the current CU includes the characteristics of the linear intra-frame prediction mode and also incorporates the advantages of linear intra-frame prediction.
- a matrix-based intra-frame prediction mode i.e., a nonlinear intra-frame prediction mode
- a nonlinear intra-frame prediction mode is used to determine the prediction result corresponding to the first angle mode for the current CU.
- an angle prediction mode i.e., a linear intra-frame prediction mode
- the video frame prediction method of this embodiment is a linear and nonlinear intra-frame joint prediction method.
- the fused prediction result integrates multiple linear and nonlinear prediction results, combining the advantages of linear intra-frame prediction and nonlinear intra-frame prediction, thereby improving the prediction accuracy for video blocks with complex textures and improving the accuracy of intra-frame prediction.
- the first weighting coefficient corresponding to the first angle mode is obtained through the following steps:
- Step S410 Obtain the prediction loss value corresponding to all first angle modes.
- Step S420 Obtain the total prediction loss value by summing the prediction loss values corresponding to all first angle modes.
- Step S430 For each first angle pattern, obtain the first weight coefficient corresponding to the first angle pattern based on the predicted loss value and the total predicted loss value corresponding to the first angle pattern.
- intra-frame prediction has the properties of raster scan prediction. Therefore, for a CU that requires intra-frame prediction, the pixels in its upper and left spatial domains have already been reconstructed. Thus, the prediction loss value corresponding to the first angle mode can be determined based on the prediction result and reconstruction result of this spatial domain using the first angle mode.
- the prediction loss value corresponding to all first-angle modes is summed to obtain the total prediction loss value.
- the first weight coefficient corresponding to the first angle mode is inversely proportional to its corresponding predicted loss value; that is, the larger the predicted loss value, the smaller the first weight coefficient. Therefore, in the process of calculating the first weight coefficient, it is first necessary to calculate the difference between the total predicted loss value and the predicted loss value corresponding to the first angle mode, and determine the first weight coefficient based on the ratio of this difference to the total predicted loss value.
- two usable angle mode indices i.e., the index of the first angle mode
- the first weight coefficient of mode 0 is...
- the first weighting coefficient of Mode 1 is
- cost 0 is the prediction loss value of mode
- cost 1 is the prediction loss value of mode 1
- cost 0 + cost 1 is the total prediction loss value.
- mode 0 is not a planar mode
- mode 1 is not a traditional angle prediction mode; rather, mode 0 and mode 1 are simply the numbering results of multiple first-angle modes.
- the prediction loss value can be expressed as cost x , x ⁇ [0,4], where x is the result of renumbering the second-angle modes determined by the frequency histogram.
- the weights of the planar pattern are not determined by the prediction loss values of other first-angle patterns. For example, when there is only one first-angle pattern identified by the frequency histogram, the first weight coefficient of that first-angle pattern is 43, while the first weight coefficient of the planar pattern is 21. When there are 2 to 5 first-angle patterns identified by the frequency histogram, the first weight coefficients of the other first-angle patterns are determined by the ratio of the prediction loss value corresponding to the first-angle pattern to the total prediction loss value, while the first weight coefficient of the planar pattern is 16 for all of them.
- the following provides an example of how to calculate the first weight coefficient for different numbers of available angle pattern indexes.
- Example 1 Obtain one usable angle pattern index based on the histogram.
- the weight of mode 0 is 43;
- the weight of the Planar pattern is 21.
- Example 2 Obtain two usable angle pattern indices from the histogram.
- the weight of mode 0 is:
- the weight of mode 1 is:
- the weight of the Planar pattern is 16.
- Example 3 Obtain 3 available angle pattern indices based on the histogram.
- the weight of mode 0 is:
- the weight of mode 1 is:
- the weights for Mode 2 are:
- the weight of the Planar pattern is 16.
- Example 4 Obtain 4 available angle pattern indices based on the histogram.
- the weight of mode 0 is:
- the weight of mode 1 is:
- the weights for Mode 2 are:
- the weights for Mode 3 are:
- the weight of the Planar pattern is 16.
- Example 5 Obtain 5 available angle pattern indices based on the histogram.
- the weight of mode 0 is:
- the weight of mode 1 is:
- the weights for Mode 2 are:
- the weights for Mode 4 are:
- the prediction loss value corresponding to the first angle mode in step S410 is obtained through the following steps:
- Step S411 Determine the predicted pixel values of the template region based on the first angle pattern.
- Step S413 Determine the prediction loss value corresponding to the first angle mode based on the predicted pixel value and the reconstructed pixel value of the template region.
- the template area is adjacent to the current CU. Regardless of the first angle mode corresponding to the current CU, the same template area can be used.
- the shape of the template area can be set as needed, such as the L-shaped template area shown in Figure 13, the upper template area shown in Figure 14, and the left template area shown in Figure 15.
- the L-shaped template area includes both the left and upper template areas.
- the template area can also have other shapes.
- the predicted pixel values of the template region are the prediction results obtained by using the first angle mode for the template region.
- the template region is based on the reference pixel and predicted using the corresponding first angle mode to obtain the predicted pixel values.
- intra-frame prediction has the properties of raster scan prediction. Therefore, for a CU that needs to undergo intra-frame prediction, the pixels in its upper and left spatial domains, i.e., the template region, have already been reconstructed, and the reconstruction result is the reconstructed pixel value. Referring to Figure 16, the template region is located in the reconstructed region, and all pixels within it have been reconstructed. The current CU is located in the unreconstructed region. Therefore, the current CU needs to undergo intra-frame prediction to obtain the fusion prediction result.
- the prediction loss value corresponding to the first angle mode can be determined based on the predicted and reconstructed pixel values of the template region using the first angle mode.
- the prediction loss value corresponding to the first angle mode can be expressed as:
- the first step is to determine the difference between the reconstructed pixel values and the prediction loss value in the template region corresponding to the first angle pattern, and then sum these differences; the summation result is the prediction loss value.
- steps S411 to S413 above determine the prediction loss value corresponding to the first angle mode by using the reconstruction loss value and prediction loss value of the template region.
- the accuracy of the obtained prediction loss value is higher. Therefore, the first weight coefficient determined based on the prediction loss value is more adaptable to video blocks with different textures and can more accurately allocate weights, thereby improving the prediction accuracy of video blocks with complex textures.
- step S411 includes:
- Step S414 If the index of the first angle mode belongs to the first index, the predicted pixel value of the template region is determined using the matrix-based intra-frame prediction mode; for example, the first index includes 1 and (2+2*k), k ⁇ [0,32].
- Step S415 If the index of the first angle mode does not belong to the first index, use the angle prediction mode to determine the predicted pixel value of the template region.
- the first index includes 1 and (2+2*k), where k is a positive integer in the interval [0,32]. If the first index is 1, the first angle mode is DC mode. If the first index is (2+2*k), the first angle mode is traditional angle prediction mode.
- the prediction result corresponding to the first angle mode is determined using a matrix-based intra-prediction mode.
- the matrix-based intra-prediction mode is a non-linear intra-prediction mode, and compared with linear prediction in related technologies, the non-linear intra-prediction mode has higher prediction accuracy.
- the index of the first angle mode is not a first index; that is, in this case, the index includes 0 and (1+2*k), where k is a positive integer in the interval [0,32]. If the value corresponding to the index is 0, the first angle mode is a planar mode. If the value corresponding to the index is (1+2*k), the first angle mode is a traditional angle prediction mode.
- the prediction result corresponding to the first angle mode is determined using the angle prediction mode corresponding to the first angle mode.
- the first angle mode is a planar mode
- the planar mode is used to determine the prediction result of the current CU using the first angle mode
- the planar mode is a special angle mode. If the index corresponding to the first angle mode is 5, the angle prediction mode is used to determine the prediction result of the current CU using the first angle mode.
- steps S414 and S415 above predict the template region based on the index of the first angle mode. Therefore, the prediction method of the template region is consistent with the prediction method of the current CU, so that the obtained prediction loss value can be applied to the current CU, improving the accuracy of the first weight coefficient, and thus improving the accuracy of intra-frame prediction.
- the first weighting coefficient corresponding to the first angle mode is obtained through the following steps:
- Step S510 Obtain the amplitude values corresponding to all first angle modes from the frequency histogram, wherein the frequency histogram is constructed based on the spatial angle mode statistics.
- Step S520 Obtain the total amplitude value by summing the amplitude values corresponding to all the first angle modes.
- Step S530 Traverse each first angle pattern and obtain the first weight coefficient corresponding to the current traversed first angle pattern based on the ratio of the amplitude value corresponding to the current traversed first angle pattern to the total amplitude value.
- the frequency histogram is constructed based on spatial angular pattern statistics.
- multiple spatial sampling points corresponding to the current CU are determined, and the CUs containing each spatial sampling point are traversed.
- the second angular pattern used for the currently traversed CU is determined, and the surface accumulation of the current CU is added to the second angular pattern of the frequency histogram. Since multiple first angular patterns are determined based on the frequency histogram, the amplitude values corresponding to all first angular patterns can be determined from the frequency histogram. Referring to Figure 4, if n first angular patterns among multiple first angular patterns are determined by the frequency histogram, then the n largest amplitude values in Figure 4 are obtained.
- the sum of the amplitude values corresponding to all first-angle modes is calculated, and this sum is used as the total amplitude value.
- the total amplitude value is determined only based on the first-angle modes and is independent of other amplitude values in the frequency histogram.
- the amplitude value corresponding to the first angle mode is directly proportional to the first weighting coefficient; that is, the larger the amplitude value corresponding to the first angle mode, the larger the first weighting coefficient. Therefore, the first weighting coefficient can be regarded as the ratio of the amplitude value corresponding to the first angle mode to the total amplitude value. For example, there are three first angle modes determined by the frequency histogram, and these three first angle modes are mode 0, mode 1, and mode 2. Modes 0 to 1 are not DC modes, planar modes, etc., but are the result of renumbering the three first angle modes determined by the frequency histogram.
- the first weighting coefficient of Mode 1 can be expressed as The first weighting coefficient of Mode 2 can be expressed as
- the multiple first-angle modes include planar modes, which are not determined by the frequency histogram. Therefore, the first weighting coefficient of the planar mode is not based on the amplitude values of other first-angle modes. For example, when there is only one first-angle mode determined by the frequency histogram, the first weighting coefficient of that first-angle mode is 43, while the first weighting coefficient of the planar mode is 21. When there are 2 to 5 first-angle modes determined by the frequency histogram, the first weighting coefficients of the other first-angle modes are determined by the ratio of the amplitude value corresponding to the first-angle mode to the total amplitude value, while the first weighting coefficient of the planar mode is 16 for all of them.
- the following provides an example of how to calculate the first weight coefficient for different numbers of available angle pattern indexes.
- Example 1 Obtain one usable angle pattern index based on the histogram.
- the weight of mode 0 is 43;
- the weight of the Planar pattern is 21.
- Example 2 Obtain two usable angle pattern indices from the histogram.
- the weight of mode 0 is:
- the weight of mode 1 is:
- the weight of the Planar pattern is 16.
- Example 3 Obtain 3 available angle pattern indices based on the histogram.
- the weight of mode 0 is:
- the weight of mode 1 is:
- the weights for Mode 2 are:
- the weight of the Planar pattern is 16.
- Example 4 Obtain 4 available angle pattern indices based on the histogram.
- the weight of mode 0 is:
- the weight of mode 1 is:
- the weights for Mode 2 are:
- the weights for Mode 3 are:
- the weight of the Planar pattern is 16.
- Example 5 Obtain 5 available angle pattern indices based on the histogram.
- the weight of mode 0 is:
- the weight of mode 1 is:
- the weights for Mode 2 are:
- the weights for Mode 3 are:
- the weights for Mode 4 are:
- the weight of the Planar pattern is 16.
- the first weight coefficient is determined by the amplitude value corresponding to the first angle mode in the frequency histogram.
- the first weight coefficient of the first angle mode is determined based on the ratio of the amplitude value corresponding to the first angle mode to the total amplitude value. This method calculates the first coefficient weight by previously determining the frequency histogram of the first angle mode, which can shorten the calculation time of the first weight coefficient and thus improve the intra-frame prediction efficiency.
- the fusion prediction result of the current CU is determined based on the prediction results and first weight coefficients corresponding to each first angle mode.
- the fusion prediction result of the current CU can be expressed as:
- x represents the first angle mode, which is determined by the number of angle modes selected from the frequency histogram, so the value range of x is [2,6].
- Multiple first angle modes always include the planar mode.
- i represents the first angle mode currently being calculated
- pPred i is the prediction result of the current CU using the first angle mode i
- weight i is the first weight coefficient corresponding to the current first angle mode i.
- the video frame prediction method provided in this application first determines multiple spatial sampling points corresponding to the current CU, i.e., the CU that needs to be intra-frame predicted. Then, based on the angle mode information of the CUs containing these multiple spatial sampling points, a frequency histogram is constructed. A first angle mode is determined based on the n second angle modes and the planar mode with the highest amplitude in the frequency histogram. Next, for each first angle mode, if the index of the first angle mode belongs to a first index, then a matrix-based intra-frame prediction mode is used to determine the prediction result corresponding to the first angle mode for the current CU.
- the first index includes 1 and (2+2*k), and k is an integer within the interval [0,32]. Otherwise, an angle prediction mode is used to determine the prediction result corresponding to the first angle mode for the current CU. Additionally, a first weight coefficient corresponding to the first angle mode needs to be determined. There are two methods for calculating the first weight coefficient: one is based on the ratio of the prediction loss value corresponding to the first angle mode to the total prediction loss value; the other is based on the ratio of the amplitude value of the first angle mode in the frequency histogram to the total amplitude value. Finally, based on the prediction results corresponding to each first angle mode and the first weight coefficient, the fusion prediction result of the current CU is determined.
- the video frame prediction method provided in this application combines the advantages of prediction using multiple first angle modes to accurately predict video blocks with complex textures, thereby improving the accuracy of intra-frame prediction. Furthermore, the first weighting coefficient corresponds to the first angle mode, enabling better allocation of each prediction result, resulting in a more accurate fused prediction and enhancing the prediction accuracy for video blocks with complex texture structures.
- this application embodiment also provides a video stream processing method, as shown in Figure 19, which includes:
- Step S610 Set the preset switch flag in the encoding parameter information to the on flag value.
- the preset switch flag is used to indicate whether to perform fusion prediction.
- the fusion prediction is implemented based on the video frame prediction method described above.
- Step S620 Write the encoding parameter information into the video stream.
- video stream processing includes video encoding processing.
- Video encoding refers to the process of converting a file in one video format into another using compression technology.
- Encoding parameter information refers to the relevant parameter information involved in video encoding processing.
- the preset switch flag is used to indicate whether to perform fusion prediction.
- a preset switch flag which is used to select whether the video bitstream processing method is intra-frame prediction or inter-frame prediction, that is, to indicate whether to perform intra-frame prediction.
- the encoding parameter information is written into the video bitstream to facilitate decoding.
- the fusion prediction in the video stream processing method provided in this application embodiment is based on the above-mentioned video frame prediction method.
- the video frame prediction method can improve the prediction accuracy of video blocks with complex texture results. Therefore, the video stream processing method improves the encoding accuracy of video blocks with complex texture results and improves the processing efficiency of video streams.
- step S610 includes at least one of the following:
- Step S611 Set the first preset switch flag in the General Limitation Information (GCI) to an on flag value to indicate that fusion prediction is performed on all video sequences.
- GCI General Limitation Information
- Step S612 Set the second preset switch flag in the sequence parameter set SPS to an on flag value to indicate that fusion prediction is performed on the current video sequence.
- Step S613 Set the third preset switch flag in the image parameter set PPS to the on flag value to indicate that fusion prediction is performed on the current image.
- Step S614 Set the fourth preset switch flag in the CU definition to an on flag value to indicate that fusion prediction is performed on the current CU.
- the General Constraint Information contains common coding parameters for all video sequences. Therefore, the first preset switch flag in the GCI indicates whether to perform fusion prediction on all video sequences. When the first preset switch flag is set to the on value, fusion prediction needs to be performed on all video sequences.
- Sequence Parameter Set contains the shared coding parameters for the current video sequence. Once the SPS is referenced, all images in the current video sequence use the coding parameters of that SPS. Therefore, when the second preset switch flag in the SPS is set to the on value, fusion prediction needs to be performed on the current video sequence.
- the Image Parameter Set contains common coding parameters for the current image. Therefore, the third preset switch flag in the PPS is used to indicate whether to perform fusion prediction on the current image. When the third preset switch flag is set to the on value, fusion prediction is performed on the current image.
- the CU definition corresponds to the current CU. If the fourth preset switch flag in the CU definition is set to the on flag value, then fusion prediction is performed on the current CU.
- the preset switch flag when the preset switch flag is set to the off flag value, it indicates that inter-frame prediction is performed on the data corresponding to the preset switch flag.
- steps S611 to S614 above improve the processing accuracy of video stream by fusing and predicting relevant data in the video stream through the general restriction information GCI, sequence parameter set SPS, image parameter set PPS and preset switch flags in the definition of coding unit CU.
- this application embodiment also provides a video stream processing method, as shown in Figure 22, which includes:
- Step S710 Receive the video stream and obtain the encoding parameter information from the video stream.
- Step S720 Perform fusion prediction based on the preset switch flag in the encoding parameter information, wherein the fusion prediction is implemented based on the video frame prediction method described above.
- the video bitstream is the encoded result obtained from step S610 and the video bitstream processing method described in step S610.
- Video bitstream processing includes video decoding, which converts the compressed digital video signal into playable video content.
- the encoding parameter information includes a preset switch flag.
- a preset switch flag is provided in the framework diagram of video stream processing during the decoding process shown in Figure 23, a preset switch flag is provided.
- the preset switch flag is used to select whether the video stream processing method is intra-frame prediction or inter-frame prediction, that is, to indicate whether intra-frame prediction is performed.
- the fusion prediction in the video stream processing method provided in this application embodiment is based on the above-mentioned video frame prediction method.
- the video frame prediction method can improve the prediction accuracy of video blocks with complex texture results. Therefore, the video stream processing method improves the decoding accuracy of video blocks with complex texture results and improves the processing efficiency of video streams.
- step S720 includes one of the following:
- Step S721 When the first preset switch flag in the General Limitation Information (GCI) is set to the on flag value, perform fusion prediction on all video sequences.
- GCI General Limitation Information
- Step S722 When the second preset switch flag in the sequence parameter set SPS is the on flag value, perform fusion prediction on the current video sequence.
- Step S723 When the third preset switch flag in the image parameter set PPS is the on flag value, perform fusion prediction on the current image.
- Step S724 When the fourth preset switch flag in the CU definition is the on flag value, perform fusion prediction on the current CU.
- the preset switch flags corresponding to the General Restriction Information (GCI), Sequence Parameter Set (SPS), Image Parameter Set (PPS), and Coding Unit (CU) definitions in the encoding parameter information are consistent with the preset switch flags in steps S611 to S614.
- the General Constraint Information contains common coding parameters for all video sequences. Therefore, the first preset switch flag in the GCI indicates whether to perform fusion prediction on all video sequences. When the first preset switch flag is set to the on value, fusion prediction needs to be performed on all video sequences.
- Sequence Parameter Set contains the shared coding parameters for the current video sequence. Once the SPS is referenced, all images in the current video sequence use the coding parameters of that SPS. Therefore, when the second preset switch flag in the SPS is set to the on value, fusion prediction needs to be performed on the current video sequence.
- the Image Parameter Set contains common coding parameters for the current image. Therefore, the third preset switch flag in the PPS is used to indicate whether to perform fusion prediction on the current image. When the third preset switch flag is set to the on value, fusion prediction is performed on the current image.
- the CU definition corresponds to the current CU. If the fourth preset switch flag in the CU definition is set to the on flag value, then fusion prediction is performed on the current CU.
- the preset switch flag when the preset switch flag is set to the off flag value, it indicates that inter-frame prediction is performed on the data corresponding to the preset switch flag.
- steps S721 to S724 above are based on the general restriction information GCI, sequence parameter set SPS, image parameter set PPS and preset switch flags defined by the coding unit CU in the coding parameter information to perform fusion prediction on the relevant data in the video bitstream, thereby improving the processing accuracy of the video bitstream.
- This application also provides an electronic device, as shown in FIG25, the electronic device 1400 including:
- One or more processors 1410 are One or more processors 1410;
- the memory 1420 stores one or more programs, which, when executed by one or more processors 1410, cause the one or more processors 1410 to implement the video frame prediction method provided in any embodiment of the present application, or to implement the video bitstream processing method provided in any embodiment of the present application.
- Memory 1420 can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 1420 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 1420 may include remotely located memories 1420 relative to processor 1410, which can be connected to processor 1410 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
- the memory 1420 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
- the memory 1420 can store the operating system and other applications.
- the relevant program code is stored in the memory 1420 and is called and executed by the processor 1410.
- the processor 1410 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
- a general-purpose CPU Central Processing Unit
- microprocessor microprocessor
- ASIC application-specific integrated circuit
- the electronic device further includes:
- Input/output interfaces are used to implement information input and output
- the communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
- wired means such as USB, Ethernet cable, etc.
- wireless means such as mobile network, WIFI, Bluetooth, etc.
- the bus transmits information between various components of the device (e.g., processor 1410, memory 1420, input/output interface, and communication interface);
- the processor 1410, memory 1420, input/output interface, and communication interface can communicate with each other within the device via a bus.
- An embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions for executing a video frame prediction method provided in any embodiment of this application, or a video stream processing method provided in any embodiment of this application.
- An embodiment of this application also provides a computer program product, including a computer program or computer instructions stored in a computer-readable storage medium.
- a processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform a video frame prediction method provided in any embodiment of this application, or a video stream processing method provided in any embodiment of this application.
- This application provides a video frame prediction method, a video stream processing method, and related apparatus, which aim to improve the prediction accuracy of video blocks with complex texture structures.
- This application embodiment first determines multiple first angle patterns based on spatial angle pattern statistics. Then, according to the index of the first angle pattern, the prediction result corresponding to the first angle pattern used by the current CU (Coding Unit) is determined. Furthermore, based on the prediction results corresponding to each first angle pattern and a first weight coefficient, the fusion prediction result of the current CU is determined. In this application embodiment, the fusion prediction result of the current CU is determined based on the prediction results corresponding to multiple first angle patterns. Therefore, the video frame prediction method can combine the advantages of multiple first angle pattern predictions to accurately predict video blocks with complex texture results, thereby improving the accuracy of frame prediction. In addition, the first weight coefficient corresponds to the first angle pattern, enabling better allocation of each prediction result, making the obtained fusion prediction result more accurate and improving the prediction accuracy for video blocks with complex texture structures.
- Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory can include random access memory (RAM) or external cache memory.
- RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM dual data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM synchronous link DRAM
- RDRAM RAMbus direct RAM
- DRAM direct memory bus dynamic RAM
- RDRAM RAMbus dynamic RAM
- Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer.
- communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本申请提供一种视频帧预测方法、视频码流处理方法及相关装置,该方法包括:根据空域的角度模式统计信息,确定多个第一角度模式(S100);根据所述第一角度模式的索引,确定当前CU使用所述第一角度模式对应的预测结果(S200);根据各个所述第一角度模式对应的预测结果和第一权重系数,确定所述当前CU的融合预测结果(S300)。
Description
相关申请的交叉引用
本申请基于申请号为202410890999.5、申请日为2024年7月3日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本申请实施例涉及视频编码技术领域,尤其涉及一种视频帧预测方法、视频码流处理方法及相关装置。
视频帧预测包括帧内预测和帧间预测。视频帧预测主要是利用已重建区域的像素作为参考像素来预测当前块的像素,目的是去除视频信号的空域冗余。若视频帧存在复杂纹理结构的视频块,无疑会提升预测难度。如何准确预测存在复杂纹理结构的视频块,是目前需要解决的技术问题。
本申请实施例提供了一种视频帧预测方法、视频码流处理方法及相关装置。
第一方面,本申请实施例提供一种视频帧预测方法,所述方法包括:根据空域的角度模式统计信息,确定多个第一角度模式;根据所述第一角度模式的索引,确定当前CU使用所述第一角度模式对应的预测结果;根据各个所述第一角度模式对应的预测结果和第一权重系数,确定所述当前CU的融合预测结果。
第二方面,本申请实施例提供一种视频码流处理方法,所述方法包括:将编码参数信息中的预设开关标志设置为开启标志值,所述预设开关标志用于指示是否执行融合预测,其中,所述融合预测基于如第一方面所述的视频帧预测方法实现;将所述编码参数信息写入视频码流中。
第三方面,本申请实施例提供一种视频码流处理方法,所述方法包括:接收视频码流,并从所述视频码流获取编码参数信息;根据所述编码参数信息中的预设开关标志执行融合预测,其中,所述融合预测基于如第一方面所述的视频帧预测方法实现。
第四方面,本申请实施例提供一种电子设备,包括:至少一个处理器;至少一个存储器,用于存储至少一个程序;当至少一个所述程序被至少一个所述处理器执行时实现如第一方面所述的视频帧预测方法,或者如第二方面所述的视频码流处理方法,或者如第三方面所述的视频码流处理方法。
第五方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如第一方面所述的视频帧预测方法,或者如第二方面所述的视频码流处理方法,或者如第三方面所述的视频码流处理方法。
第六方面,本申请实施例提供一种机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的视频帧预测方法,或者如第二方面所述的视频码流处理方法,或者如第三方面所述的视频码流处理方法。
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。
图1是本申请实施例提供的视频帧预测方法的总体流程图;
图2是图1中步骤S100确定多个第一角度模式的一个流程图;
图3是本申请实施例提供的多个空域采样点的一个示意图;
图4是本申请实施例提供的频率直方图的一个示意图;
图5是图2中步骤S120确定频率直方图的一个流程图;
图6是图2中步骤S130确定第一角度模式的一个流程图;
图7是图1中步骤S200在第一角度模式的索引属于第一索引的情况下确定预测结果的一个流程图;
图8是图7中步骤S210确定预测结果的一个流程图;
图9是本申请实施例提供的参考像素的一个示意图;
图10是图1中步骤S200在第一角度模式的索引不属于第一索引的情况下确定预测结果的一个流程图;
图11是本申请实施例提供的获得第一角度模式对应的第一权重系数的一个流程图;
图12是本申请实施例提供的获得第一角度模式对应的预测损失值的一个流程图;
图13是本申请实施例提供的L型模板区域的一个示意图;
图14是本申请实施例提供的上侧模板区域的一个示意图;
图15是本申请实施例提供的左侧模板区域的一个示意图;
图16是本申请实施例提供的模板区域与当前CU的一个示意图;
图17是图12中步骤S411确定模板区域的预测像素值的一个流程图;
图18是本申请实施例提供的获得第一角度模式对应的第一权重系数的一个流程图;
图19是本申请实施例提供的视频码流处理方法的一个流程图;
图20是本申请实施例提供的在编码过程视频码流处理的框架示意图;
图21是图19中步骤S610将编码参数信息中的预设开关标志设置为开启标志值的一个流程图;
图22是本申请实施例提供的视频码流处理方法的另一个流程图;
图23是本申请实施例提供的在解码过程视频码流处理的框架示意图;
图24是图22中步骤S720将编码参数信息中的根据编码参数信息中的预设开关标志执行融合预测的一个流程图;
图25是本申请实施例提供的一种电子设备的示意图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的实施例仅用以解释本申请,并不用于限定本申请。
应了解,在本申请实施例的描述中,如果有描述到“第一”、“第二”等只是用于分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组,包括单项或复数项的任意组。例如,a、b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c,或者,a和b和c,其中a,b,c可以是单个,也可以是多个。
此外,下面所描述的本申请各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。
视频帧预测利用已重建区域的像素作为参考像素来预测当前块的像素,目的是去除视频信号的空域冗余,提升视频压缩的效率。若视频帧存在复杂纹理结构的视频块,无疑会提升预测难度。如何准确预测存在复杂纹理结构的视频块,是目前需要解决的技术问题。
基于此,本申请实施例提供一种视频帧预测方法、电子设备、计算机可读存储介质和计算机程序产品。本申请实施例提供的视频帧预测方法能够结合多个第一角度模式预测的优势,对存在复杂纹理结果的视频块进行精准预测,从而提高帧预测的准确性,且第一权重系数与第一角度模式相对应,能够对各个预测结果进行更好的分配,使得到的融合预测结果更加准确,提升了对于存在复杂纹理结构的视频块的预测准确性。
下面结合附图对本申请作进一步阐述。
参照图1,图1是本申请实施例提供的视频帧预测方法的总体流程图。本申请实施例提供的视频帧预测方法包括但不限于以下步骤:
步骤S100、根据空域的角度模式统计信息,确定多个第一角度模式。
步骤S200、根据第一角度模式的索引,确定当前CU使用第一角度模式对应的预测结果。
步骤S300、根据各个第一角度模式对应的预测结果和第一权重系数,确定当前CU的融合预测结果。
需要说明的是,空域也称为空间域、像素域,其是像素位置所在的空间。对于视频信号而言,空域是指信号在二维空间中的表示形式。
需说明的是,本申请实施例的视频帧预测包括帧内预测和帧间预测。对于帧内预测,空域是指当前帧的空域;对于帧间预测,空域是指参考帧的空域。
需要说明的是,角度模式统计信息是指各个空域内已经重建完成的编码单元所使用的角度模式对应的统计信息。
角度模式,即角度预测模式是利用已经编码的像素预测当前像素。在高效率视频编码(High Efficiency Video Coding,HEVC),即H.265中,角度预测模式数共有33个。而在多功能/通用视频编码(Versatile Video Coding,VCC),即H.266中,其提供的角度预测模式数由33个扩展到65个。
需要说明的是,多个第一角度模式基于空域的角度模式统计信息确定,那么第一角度模式为与当前CU对应的空域内的多个编码单元所使用的角度预测模式。
需要说明的是,索引与第一角度模式相对应,索引用于指引确定当前CU使用第一角度模式对应的预测结果的方式。根据第一角度模式的索引,通过与索引对应的方式确定当前CU使用第一角度模式对应的预测结果。
需要说明的是,针对每个第一角度模式,其对应有预测结果和第一权重系数。预测结果是指当前CU使用该第一角度模式对应的预测结果,而第一权重系数用于表示与其对应的预测结果在当前CU的融合预测结果中的重要程度。基于各个第一角度模式对应的预测结果和第一权重系数,对当前CU进行融合预测,从而确定当前CU的预测结果。
需要说明的是,上述步骤S100至步骤S300的实施例首先确定基于空域的角度模式统计信息,确定多个第一角度模式。之后,根据第一角度模式的索引,确定当前CU(Coding Unit,编码单元)使用的第一角度模式对应的预测结果,进而根据各个第一角度模式对应的预测结果和第一权重系数,确定当前CU的融合预测结果。本申请实施例中当前CU的融合预测结果基于多个第一角度模式对应的预测结果所确定,那么视频帧预测方法能够结合多个第一角度模式预测的优势,对存在复杂纹理结果的视频块进行精准预测,从而提高帧内预测的准确性。另外,第一权重系数与第一角度模式相对应,能够对各个预测结果进行更好的分配,使得到的融合预测结果更加准确,提升了对于存在复杂纹理结构的视频块的预测准确性。
可以理解的是,参照图2,步骤S100包括:
步骤S110、确定多个空域采样点。
步骤S120、根据各个空域采样点所在CU的角度模式信息,构建频率直方图。
步骤S130、根据频率直方图确定多个第一角度模式。
需要说明的是,在视频信号对应的空域内进行采样,从而确定多个空域采样点。为了提高帧内预测的效率,本申请实施例需要确定更多的空域采样点,以增强对空域信息的搜索和利用力度。参照图3,本申请实施例在空域内确定的空域采样点多达92个。
需要说明的是,空域采样点位于编码单元(CU)中,确定各个空域采样点所在CU的角度模式信息,构建频率直方图。参照图4,频率直方图的横轴为角度模式信息,纵轴为幅值,可以用于表示使用各个角度模式信息的CU的数量。
需要说明的是,在确定频率直方图之后,可根据频率直方图中显示的各个角度模式信息的出现频率确定第一角度模式。
需要说明的是,上述步骤S110至步骤S130的实施例根据多个空域采样点所在CU的角度模式信息构建频率直方图,进而确定多个第一角度模式,第一角度模式基于各个角度模式信息在空域内多个CU中的出现频率确定,第一角度模式的选取更加准确,进而提高了帧内预测的准确率。
可以理解的是,空域采样点包括邻近采样点和非邻近采样点中的至少之一。
需要说明的是,邻近采样点所处的CU与当前需要预测的CU相邻。例如,图3中的5个邻近采样点均位于与当前CU相邻的CU中。非邻近采样点所处的CU与当前CU不相邻。例如,图3的空域采样点共包括87个非邻近采样点,且87个非邻近采样点所处的CU均与当前CU不相邻。
需要说明的是,空域采样点包括邻近采样点和非邻近采样点中的至少之一。邻近采样点和非邻近采样点可根据需求进行选取。在空域采样点仅为邻近采样点或非邻近采样点时,根据多个空域采样点确定第一角度模式,需要处理的空域采样点数据明显减少,能够减少确定第一角度模式所需的时间。而在空域采样点包括邻近采样点和非邻近采样点时,空域采样点所包含的空域信息更加多样,从而提高了第一角度模式与当前CU的匹配程度,提高了帧内预测的准确性。
可以理解的是,邻近采样点包括位于当前CU的上方、左上方、左侧、左下方、右上方的相邻像素。
需要说明的是,图3中与当前CU对应的邻近采样点共包括5个,5个邻近采样点对应的CU分别位于当前CU的上方、左上方、左侧、左下方、右上方,那么5个邻近采样点则为位于当前CU的上方、左上方、左侧、左下方、右上方的相邻像素。
可以理解的是,非邻近采样点包括位于当前CU的上方、左上方、左侧、左下方、右上方的非相邻像素。
需要说明的是,图3中与当前CU对应的邻近采样点共包括87个,87个非邻近采样点分布于当前CU上方、左上方、左侧、左下方、右上方的各个CU内,那么非邻近采样点为位于当前CU的上方、左上方、左侧、左下方、右上方的非相邻像素。
邻近采样点和非邻近采样点位于当前CU的上方、左上方、左侧、左下方、右上方,其与通过角度预测模式进行预测所需的像素相对应,便于确定第一角度模式,以满足当前CU预测所需。
可以理解的是,参照图5,步骤S120包括:
步骤S121、遍历各个空域采样点所在CU,并确定当前遍历CU使用的第二角度模式。
步骤S122、将当前遍历CU的面积累加到频率直方图的第二角度模式中。
需要说明的是,第二角度模式是空域采样点所在CU使用的第二角度模式。那么对于图4中的频率直方图,其横轴的角度模式信息,可以视为第二角度模式。另外,频率直方图可通过以下方式构建:
HoC[idx]=HoC[idx]+CU面积,
HoC[idx]=HoC[idx]+CU面积,
其中,HoC为频率直方图(Histogram of oCcurrence,直方图),idx为角度模式信息(比如角度模式索引),在VCC中,idx取值范围为1~66,其中,idx为1表示直流(DC)模式,位于2~66的idx表示65个传统角度预测模式。在确定空域采样点所在CU的角度模式信息后,获取该CU的面积,并在频率直方图的对应第二角度模式处进行累加。基于上述公式对多个空域采样点遍历完成后,可得到完整的频率直方图。
需说明的是,idx为0时,表示平面(Planar)模式。
需要说明的是,步骤S121和步骤S122的实施例通过遍历各个空域采样点所在的CU,将当前遍历CU的面积累加到频率直方图与当前遍历CU对应的第二角度模式中,那么基于频率直方图能够精准确定各个第二角度模式在当前CU的空域采样点的适用频率,提高了第一角度模式的准确性。
可以理解的是,参照图6,步骤S130包括:
步骤S131、根据频率直方图确定幅度最高的n个第二角度模式,其中,n大于或等于1,且小于或等于5。
步骤S132、根据n个第二角度模式确定第一角度模式,其中,第一角度模式至少包括平面模式。
需要说明的是,n为选取的在频率直方图中幅度最高的第二角度模式的个数。本申请实施例在提高第一角度模式的精度的同时,为了减少计算量,将n的最大值设置为5,即n为位于区间[1,5]的整数。
需要说明的是,在确定频率直方图后,本申请实施例按照幅度从大到小的顺序对多个第二角度模式进行排序,并获取排在前5个,即幅度最高的5个第二角度模式。若频率直方图中幅值不为0的第二角度模式不足5个,则获取幅值不为0的多个第二角度模式。
需要说明的是,n的最大值还可以根据需要设置为其他值,该值可根据帧内模式进行设置。例如,当帧内模式为基于出现的帧内编码(Occurrence-based Intra Coding,OBIC)时,n的最大值可设置为5。当帧内模式为解码端帧内模式推导(Decoder-side Intra Mode Derivation,DIMD)时,n的最大值设置为5。当帧内模式为基于模板的帧内预测模式推导(Template-based Intra Mode Derivation,TIMD)时,n的最大值为3。空域几何划分预测模式(Spatial Geometric Partitioning Mode,SGPM)对应的n的最大值为2。
需要说明的是,在确定n个第二角度模式后,将n个第二角度模式和平面(Planar)模式确定为第一角度模式。那么第一角度模式的数量大于或等于2,且小于或等于6。
需要说明的是,步骤S131和步骤S132的实施例将频率直方图中幅度最高的n个第二角度模式和平面模式作为第一角度模式,以使第一角度模式能够与当前CU相对应,提高帧内预测的准确率。
可以理解的是,参照图7,步骤S200包括:
步骤S210、在第一角度模式的索引属于第一索引的情况下,使用基于矩阵的帧内预测模式确定第一角度模式对应的预测结果。
示例性的,第一索引包括1和(2+2*k),k∈[0,32]。
需要说明的是,第一索引包括1和(2+2*k),其中,k为区间[0,32]内的正整数。若第一索引为1,第一角度模式为直流(DC)模式。若第一索引为(2+2*k),第一角度模式为传统角度预测模式。
需要说明的是,在第一角度模式的索引属于第一索引的情况下,使用基于矩阵的帧内预测模式(Matrix based intra prediction)确定第一角度模式对应的预测结果。基于矩阵的帧内预测模式为一种非线性帧内预测模式,与相关技术中的线性预测相比,非线性帧内预测模式的预测精度更高。
需要说明的是,上述步骤S210的实施例在第一角度模式的索引属于第一索引的情况下,使用基于矩阵的帧内预测模式确定第一角度模式对应的预测结果,以通过非线性帧内预测模式进行预测,第一索引对应的预测结果的精确度更高。
可以理解的是,参照图8,步骤S210包括:
步骤S211、从权重矩阵获取与当前CU中的目标位置及第一角度模式对应的第二权重系数;
步骤S212、根据第一角度模式获取目标位置对应的参考像素;
步骤S213、根据第二权重系数和参考像素,得到目标位置的预测像素;
步骤S214、根据当前CU中各个目标位置的预测像素,得到第一角度模式对应的预测结果。
需要说明的是,权重矩阵与当前CU中各个位置相对应。权重矩阵中设置有多个与第一索引相对应的权重系数。由于第一索引包括1和(2+2*k),k∈[0,32],可确定第一索引共包括34个值,那么每个权重矩阵中都设置有34个权重系数。针对当前CU中的目标位置,基于当前CU使用的第一角度模式确定第一索引,以在与目标位置对应的权重矩阵中获取与第一索引对应的第二权重系数。
需要说明的是,参考像素是当前CU的邻近空域像素。参照图9,P为当前CU,其参考像素区域为图中的L型阴影部分。L型参考像素区域由两部分组成,若当前CU的长为W,宽为H,那么其中一部分参考像素区域的长为2*W,宽为T1,另一部分参考像素区域的长为T2,宽为2*H。另外,当前CU的尺寸、形状均不固定,其可以为正方形、矩形。为确保参考像素能够与当前CU中的各个位置相对应,本申请实施例对于不同大小的当前CU设置有对应的T1和T2。
表1
参照表1,表1是当前CU形状与TI、T2值的对应关系的表格。在当前CU的尺寸为32x16、26x32或32x32时,T1和T2的值均为1,其余情况下T1和T2的值为2。
需要说明的是,第一角度模式不同,确定参考像素的方式不同。例如,直流模式对应的参考像素为目标位置上方像素、左侧像素。而传统角度模式预测对应的参考像素需要根据角度模式预测对应的角度确定。因此,需要根据第一角度模式获取目标位置对应的参考像素。
需要确定说明的是,目标位置的预测像素根据第二权重系数和参考像素确定。在一些实施例中,预测像素为第二权重系数与参考像素的乘积。在确定当前CU中各个目标位置的预测像素之后,基于各个预测像素,能够得到第一角度模式对应的预测结果。
需要说明的是,当前CU使用第一角度模式对应的预测结果可以表示为:
P(x,y)=∑kF(x,y,l)*r(l)
P(x,y)=∑kF(x,y,l)*r(l)
其中,(x,y)为当前CU中的目标位置,P(x,y)表示当前CU使用第一角度模式对应的预测结果,l为第一角度模式所属的第一索引,l的取值为1和(2+2*k),k∈[0,32],F(x,y)为目标位置(x,y)的权重矩阵,而F(x,y,l)则表示与当前CU中的目标位置及第一角度模式对应的第二权重系数,r(l)为目标位置对应的参考像素。另外,本申请实施例为每一个参考像素和第二权重系数赋予了索引l,其设置代表了计算顺序,便于对预测结果进行计算。
需要说明的是,上述步骤S211至步骤S214的实施例在第一角度模式的索引属于第一索引的情况下,从权重矩阵获取与当前CU中的目标位置、第一角度模式对应的第二权重系数,并根据第一角度模式获取与目标位置对应的参考像素,以根据第二权重系数和参考像素,得到目标位置的预测像素。在确定当前CU中各个目标位置的预测像素之后,确定第一角度模式对应的预测结果。该预测结果的确定方式给出了非线性帧内预测模式的详细步骤,以使得到的预测结果更加精准。
可以理解的是,参照图10,步骤S200还包括:
步骤S220、在第一角度模式的索引不属于第一索引的情况下,使用角度预测模式确定第一角度模式对应的预测结果。
需要说明的是,第一角度模式的索引不属于第一索引,即该情况下索引包括0和(1+2*k),其中,k为区间[0,32]内的正整数。若索引对应的值为0,第一角度模式为平面模式。若索引对应的值为(1+2*k),第一角度模式为传统角度预测模式。
需要说明的是,在第一角度模式的索引不属于第一索引的情况下,使用第一角度模式对应的角度预测模式确定第一角度模式对应的预测结果。例如,在第一角度模式为平面模式的情况下,使用平面模式确定当前CU使用第一角度模式对应的预测结果,而平面模式是一种特殊的角度模式。在第一角度模式对应的索引为5的情况下,使用角度预测模式确定当前CU使用第一角度模式对应的预测结果。
需要说明的是,上述步骤S220的实施例在第一角度模式的索引不属于第一索引的情况下,使用角度预测模式确定第一角度模式对应的预测结果。角度预测模式为线性帧内预测模式,那么最终确定的当前CU的融合预测结果包含线性帧内预测模式的特征,也包含线性帧内预测的优势。
另外,本申请实施例在第一角度模式的索引属于第一索引的情况下,使用基于矩阵的帧内预测模式,即非线性帧内预测模式确定当前CU使用第一角度模式对应的预测结果,在第一角度模式的索引不属于第一索引的情况下,使用角度预测模式,即线性帧内预测模式确定第一角度模式对应的预测结果。由于当前CU的融合预测结果基于各个第一角度模式对应的预测结果和第一权重系数所确定,那么本申请实施例的视频帧预测方法为一种线性、非线性帧内联合预测方法,融合预测结果融合了多个线性、非线性的预测结果,结合了线性帧内预测和非线性帧内预测的优势,提升了对存在复杂纹理的视频块的预测准确性,提升了帧内预测的准确性。
可以理解的是,参照图11,第一角度模式对应的第一权重系数通过以下步骤获得:
步骤S410、获取所有的第一角度模式对应的预测损失值。
步骤S420、根据所有的第一角度模式对应的预测损失值的和,得到总预测损失值。
步骤S430、对于每个第一角度模式,根据第一角度模式对应的预测损失值和总预测损失值,得到所述第一角度模式对应的第一权重系数。
需要说明的是,帧内预测具有光栅扫描预测性质,那么对于需要进行帧内预测的CU,其上侧和左侧空域中的像素均已完成重建。因此,可以根据该部分空域使用第一角度模式对应的预测结果、和重建结果,确定第一角度模式对应的预测损失值。
需要说明的是,在确定所有第一角度模式对应的预测损失值后,对所有的第一角度模式对应的预测损失值求和,得到总预测损失值。
需要说明的是,第一角度模式对应的第一权重系数和其对应的预测损失值呈反比关系,即预测损失值越大,第一权重系数越小。因此,在第一权重系数计算的过程中,首先需要计算总预测损失值与第一角度模式对应的预测损失值的差值,并根据该差值与总预测损失值的比例确定第一权重系数。
例如,本申请实施例通过频率直方图获取到2个可用的角度模式索引(即第一角度模式的索引),那么模式0的第一权重系数为模式1的第一权重系数为其中,cost0为模式0的预测损失值,cost1为模式1的预测损失值,cost0+cost1为总预测损失值。值得注意的是,这里的模式0不是平面模式,模式1也不是传统角度预测模式,而模式0和模式1只是多个第一角度模式的编号结果。由于通过频率直方图确定的第二角度模式的数目的最大值为5,那么预测损失值可以表示为costx,x∈[0,4],x即为对频率直方图确定的第二角度模式重编号的结果。
需要说明的是,平面模式的权重不通过其他第一角度模式的预测损失值决定。例如,当通过频率直方图确定的第一角度模式为1个时,该第一角度模式的第一权重系数为43,而平面模式的第一权重系数为21。当通过频率直方图确定的第一角度模式为2至5个时,其他第一角度模式的第一权重系数通过与第一角度模式对应的预测损失值与总预测损失值的比例确定,而平面模式的第一权重系数均为16。
下面针对不同的可用的角度模式索引数目,相应的第一权重系数计算方式进行示例性说明。
示例1:根据直方图获取到1个可用的角度模式索引
模式0权重为:43;
Planar模式权重为:21。
示例2:根据直方图获取到2个可用的角度模式索引
模式0权重为:
模式1权重为:
Planar模式权重为:16。
示例3:根据直方图获取到3个可用的角度模式索引
模式0权重为:
模式1权重为:
模式2权重为:
Planar模式权重为:16。
示例4:根据直方图获取到4个可用的角度模式索引
模式0权重为:
模式1权重为:
模式2权重为:
模式3权重为:
Planar模式权重为:16。
示例5:根据直方图获取到5个可用的角度模式索引
模式0权重为:
模式1权重为:
模式2权重为:
模式3权重为:
模式4权重为:
Planar模式权重为:16。
需要说明的是,上述步骤S410至步骤S430的实施例通过各个第一角度模式对应的预测损失值和总预测损失值确定第一权重系数,预测损失值越大,第一权重系数越小,即该第一角度模式对应的预测结果在融合预测结果中所占的权重越小,从而减小了当前CU对应的融合预测结果的损失值,提高了帧内预测的准确度。
可以理解的是,参照图12,步骤S410中第一角度模式对应的预测损失值通过以下步骤获得:
步骤S411、基于第一角度模式确定模板区域的预测像素值。
步骤S412、获取模板区域的重建像素值。
步骤S413、根据模板区域的预测像素值和重建像素值,确定第一角度模式对应的预测损失值。
需要说明的是,模板区域与当前CU相邻。无论当前CU对应的第一角度模式为哪种,都可以使用同一模板区域。模板区域的形状可根据需要进行设置,如图13所示的L型模板区域、图14所示的上侧模板区域,图15所示的左侧模板区域。其中,L型模板区域包括左侧模板区域和上侧模板区域两部分。另外,模板区域还可以为其他形状。
需要说明的是,第一角度模式不同,还可以设置有不同的模板区域。例如,在第一角度模式的索引不属于第一索引的情况下,可设置图13中的L型模板区域,而在第一角度模板索引属于第一索引的情况下,可以设置图14所示的上侧模板区域或图15所示的左侧模板区域。
需要说明的是,模板区域的预测像素值为模板区域使用第一角度模式得到的预测结果。参照图13至图15,模板区域基于参考像素,并使用对应的第一角度模式进行预测,从而得到预测像素值。
需要说明的是,帧内预测具有光栅扫描预测性质,那么对于需要进行帧内预测的CU,其上侧和左侧空域,即模板区域中的像素均已完成重建,重建结果即为重建像素值。参照图16,模板区域位于已重建区域,其内的像素均已完成重建,当前CU位于未重建区域,因此,当前CU需要进行帧内预测,以得到融合预测结果。
需要说明的是,在确定模板区域的预测像素值和重建像素值之后,可基于模板区域使用第一角度模式对应的预测像素值、和重建像素值,确定第一角度模式对应的预测损失值。第一角度模式对应的预测损失值可以表示为:
其中,Sum of Absolute Difference为预测损失值,xy为模板区域中各个像素位置,pRecoxy为重建像素值,pRredxy为预测像素值。那么,首先需要确定第一角度模式对应的模板区域的各个重建像素值和预测损失值的差值,并对得到的多个差值求和,求和结果即为预测损失值。
需要说明的是,上述步骤S411至步骤S413的实施例通过模板区域的重建损失值和预测损失值确定第一角度模式对应的预测损失值,得到的预测损失值的精度更高,那么基于该预测损失值确定的第一权重系数对不同纹理的视频块的适应性更强,能够更精确地进行权重分配,从而提升了对存在复杂纹理的视频块的预测准确性。
可以理解的是,参照图17,步骤S411包括:
步骤S414、在第一角度模式的索引属于第一索引的情况下,使用基于矩阵的帧内预测模式确定模板区域的预测像素值;示例性的,第一索引包括1和(2+2*k),k∈[0,32]。
或者,
步骤S415、在第一角度模式的索引不属于第一索引的情况下,使用角度预测模式确定模板区域的预测像素值。
需要说明的是,第一索引包括1和(2+2*k),其中,k为区间[0,32]内的正整数。若第一索引为1,第一角度模式为直流(DC)模式。若第一索引为(2+2*k),第一角度模式为传统角度预测模式。
需要说明的是,在第一角度模式的索引属于第一索引的情况下,使用基于矩阵的帧内预测模式确定第一角度模式对应的预测结果。基于矩阵的帧内预测模式为一种非线性帧内预测模式,与相关技术中的线性预测相比,非线性帧内预测模式的预测精度更高。
需要说明的是,第一角度模式的索引不属于第一索引,即该情况下索引包括0和(1+2*k),其中,k为区间[0,32]内的正整数。若索引对应的值为0,第一角度模式为平面模式。若索引对应的值为(1+2*k),第一角度模式为传统角度预测模式。
需要说明的是,在第一角度模式的索引不属于第一索引的情况下,使用第一角度模式对应的角度预测模式确定第一角度模式对应的预测结果。例如,在第一角度模式为平面模式的情况下,使用平面模式确定当前CU使用第一角度模式对应的预测结果,而平面模式是一种特殊的角度模式。在第一角度模式对应的索引为5的情况下,使用角度预测模式确定当前CU使用第一角度模式对应的预测结果。
需要说明的是,上述步骤S414和步骤S415的实施例基于第一角度模式的索引对模板区域进行预测,那么模板区域的预测方式与当前CU的预测方式保持一致,从而使得到的预测损失值能够适用于当前CU,提高了第一权重系数的准确性,进而提高了帧内预测的准确性。
可以理解的是,参照图18,第一角度模式对应的第一权重系数通过以下步骤获得:
步骤S510、从频率直方图获取所有的第一角度模式对应的幅度值,其中,频率直方图根据空域的角度模式统计信息构建。
步骤S520、根据所有的第一角度模式对应的幅度值的和,得到总幅度值。
步骤S530、遍历各个第一角度模式,并根据当前遍历第一角度模式对应的幅度值与总幅度值的比例,得到当前遍历第一角度模式对应的第一权重系数。
需要说明的是,频率直方图基于空域的角度模式统计信息构建。在一些实施例中,确定当前CU对应的多个空域采样点,并遍历各个空域采样点所在CU,确定当前遍历CU使用的第二角度模式,将当前CU的面积累加到频率直方图的第二角度模式中。由于多个第一角度模式基于频率直方图确定,那么能够从频率直方图中确定所有第一角度模式对应的幅度值。参照图4,若多个第一角度模式中的n个第一角度模式通过频率直方图确定,那么获取图4中n个最大的幅度值。
需要说明的是,在确定当前CU对应的多个第一角度模式对应的幅度值之后,计算所有第一角度模式对应的幅度值的和,并将该和作为总幅度值。总幅度值仅基于第一角度模式确定,与频率直方图中的其他幅度值无关。
需要说明的是,第一角度模式对应的幅度值与第一权重系数呈正比,即第一角度模式对应的幅度值越大,第一权重系数越大。因此,第一权重系数可以看做是第一角度模式对应的幅度值与总幅度值的比例。例如,通过频率直方图确定的第一角度模式共有三个,且三个第一角度模式分别为模式0、模式1和模式2,模式0至模式1并不是直流模式、平面模式等,而是对通过频率直方图确定的三个第一角度模式进行重新编号后的结果。若模式0的幅度值为amp0,模式1的幅度值为amp1,模式2的幅度值为amp2,那么总幅度值为amp0+amp1+amp2,模式0的第一权重系数可以表示为模式1的第一权重系数可以表示为模式2的第一权重系数可以表示为
需要说明的是,多个第一角度模式包括平面模式,而平面模式并不是通过频率直方图确定的,因此,平面模式的第一权重系数不基于其他第一角度模式的幅度值确定。例如,当通过频率直方图确定的第一角度模式为1个时,该第一角度模式的第一权重系数为43,而平面模式的第一权重系数为21。当通过频率直方图确定的第一角度模式为2至5个时,其他第一角度模式的第一权重系数通过与第一角度模式对应的幅度值和总幅度值的比例确定,而平面模式的第一权重系数均为16。
下面针对不同的可用的角度模式索引数目,相应的第一权重系数的计算方式进行示例性说明。
示例1:根据直方图获取到1个可用的角度模式索引
模式0权重为:43;
Planar模式权重为:21。
示例2:根据直方图获取到2个可用的角度模式索引
模式0权重为:
模式1权重为:
Planar模式权重为:16。
示例3:根据直方图获取到3个可用的角度模式索引
模式0权重为:
模式1权重为:
模式2权重为:
Planar模式权重为:16。
示例4:根据直方图获取到4个可用的角度模式索引
模式0权重为:
模式1权重为:
模式2权重为:
模式3权重为:
Planar模式权重为:16。
示例5:根据直方图获取到5个可用的角度模式索引
模式0权重为:
模式1权重为:
模式2权重为:
模式3权重为:
模式4权重为:
Planar模式权重为:16。
需要说明的是,上述步骤S510至步骤S530的实施例通过频率直方图中与第一角度模式对应的幅度值确定第一权重系数,在一些实施例中,第一角度模式的第一权重系数基于与该第一角度模式对应的幅度值与总幅度值的比例确定,该方法通过之前确定第一角度模式的频率直方图来计算第一系数权重,能够缩短第一权重系数的计算时间,进而提升了帧内预测效率。
需要说明的是,在通过上述步骤获取到各个第一角度模式对应的预测结果和第一权重系数之后,基于各个第一角度模式对应的预测结果和第一权重系数确定当前CU的融合预测结果。当前CU的融合预测结果可以表示为:
其中,pDst为当前CU的融合预测结果,x表示第一角度模式,其根据从频率直方图中选取的角度模式数量确定,那么x的取值范围为[2,6],多个第一角度模式始终包括平面模式。i表示当前正在计算的第一角度模式,pPredi为当前CU使用第一角度模式i对应的预测结果,weighti为与当前第一角度模式i对应的第一权重系数。
需要说明的是,本申请实施例提供的视频帧预测方法首先确定与当前CU,即需要进行帧内预测的CU对应的多个空域采样点,并根据多个空域采样点所在CU的角度模式信息,构建频率直方图,以基于频率直方图中幅度最高的n个第二角度模式和平面模式确定第一角度模式。之后,针对每个第一角度模式,若第一角度模式的索引属于第一索引,那么使用基于矩阵的帧内预测模式确定当前CU使用第一角度模式对应的预测结果,其中,第一索引包括1和(2+2*k),且k位于区间[0,32]内的整数,反之则使用角度预测模式确定当前CU使用第一角度模式对应的预测结果。另外,还需要确定与第一角度模式对应的第一权重系数。第一权重系数的计算方法有两种,其中一种是基于第一角度模式对应的预测损失值与总预测损失值的比例确定,另外一种是基于第一角度模式在频率直方图中的幅度值与总幅度值的比例确定。最后,根据各个第一角度模式对应的预测结果和第一权重系数,确定当前CU的融合预测结果。本申请实施例提供的视频帧预测方法能够结合多个第一角度模式预测的优势,对存在复杂纹理结果的视频块进行精准预测,从而提高帧内预测的准确性。另外,第一权重系数与第一角度模式相对应,能够对各个预测结果进行更好的分配,使得到的融合预测结果更加准确,提升了对于存在复杂纹理结构的视频块的预测准确性。
另外,本申请实施例还提供了一种视频码流处理方法,如图19所示,该视频码流处理方法包括:
步骤S610、将编码参数信息中的预设开关标志设置为开启标志值,预设开关标志用于指示是否执行融合预测,其中,融合预测基于上述的视频帧预测方法实现。
步骤S620、将编码参数信息写入视频码流中。
需要说明的是,视频码流处理包括视频编码处理,视频编码是指通过压缩技术,即将原始视频格式的文件转换成另一种视频格式的文件。而编码参数信息即是视频编码处理的相关参数信息。
需要说明的是,预设开关标志用于指示是否执行融合预测。例如,在图20所示的在编码过程视频码流处理的框架示意图中,设有预设开关标志,且预设开关标志用于选择视频码流的处理方式是帧内预测还是帧间预测,即用于指示是否执行帧内预测。
需要说明的是,在确定编码方式之后,将编码参数信息写入视频码流中,以便于解码。
需要说明的是,本申请实施例提供的视频码流处理方法中的融合预测基于上述的视频帧预测方法实现,而视频帧预测方法能够提高对存在复杂纹理结果的视频块的预测准确性,那么该视频码流处理方法提高了对存在复杂纹理结果的视频块的编码准确性,提高了视频码流的处理效率。
可以理解的是,编码参数信息包括:通用限制信息(General constraints information,GCI)、序列参数集(Sequence parameter set,SPS)、图像参数集(Picture parameter set,PPS)和编码单元(Coding Unit,CU)定义,参照图21,步骤S610包括以下至少之一:
步骤S611、将通用限制信息GCI中的第一预设开关标志设置为开启标志值,以指示对所有视频序列执行融合预测。
步骤S612、将序列参数集SPS中的第二预设开关标志设置为开启标志值,以指示对当前视频序列执行融合预测。
步骤S613、将图像参数集PPS中的第三预设开关标志设置为开启标志值,以指示对当前图像执行融合预测。
步骤S614、将CU定义中的第四预设开关标志设置为开启标志值,以指示对当前CU执行融合预测。
需要说明的是,通用限制信息GCI包含所有视频序列的共用编码参数。因此,通用限制信息GCI中的第一预设开关标志用于指示是否对所有视频序列执行融合预测。当第一预设开关标志设置为开启标志值,需要对所有视频序列执行融合预测。
需要说明的是,序列参数集SPS包含当前视频序列的共用编码参数。一旦序列参数集SPS被引用,当前视频序列中所有图像都是使用该序列参数集SPS的编码参数。因此,当序列参数集SPS中的第二预设开关标志设置为开启标志值,需要对当前视频序列执行融合预测。
需要说明的是,图像参数集PPS包含当前图像的共用编码参数,因此,图像参数集PPS中的第三预设开关标志用于指示是否对当前执行融合预测。在第三预设开关标志设置为开启标志值的情况下,对当前图像执行融合预测。
需要说明的是,CU定义与当前CU相对应。若CU定义中的第四预设开关标志设置为开启标志值,则对当前CU执行融合预测。
需要说明的是,当预设开关标志设置为关闭标志值时,指示对于预设开关标志对应的数据执行帧间预测。
需要说明的是,上述步骤S611至步骤S614的实施例通过通用限制信息GCI、序列参数集SPS、图像参数集PPS和编码单元CU定义中的预设开关标志,对视频码流中的相关数据进行融合预测,从而提高视频码流的处理准确度。
另外,本申请实施例还提供一种视频码流处理方法,如图22所示,该视频码流处理方法包括:
步骤S710、接收视频码流,并从视频码流获取编码参数信息。
步骤S720、根据编码参数信息中的预设开关标志执行融合预测,其中,融合预测基于上述的视频帧预测方法实现。
需要说明的是,视频码流为上述步骤S610和步骤S610中视频码流处理方法所得到的的编码结果。接收视频码率,并对视频码流进行解码,即可得到编码参数信息。视频码流处理包括视频解码,即将压缩的数字视频信号转换为可播放的视频内容。
需要说明的是,编码参数信息中设置有预设开关标志,例如,在图23所示的在解码过程视频码流处理的框架示意图中,设有预设开关标志,且预设开关标志用于选择视频码流的处理方式是帧内预测还是帧间预测,即用于指示是否执行帧内预测。
需要说明的是,本申请实施例提供的视频码流处理方法中的融合预测基于上述的视频帧预测方法实现,而视频帧预测方法能够提高对存在复杂纹理结果的视频块的预测准确性,那么该视频码流处理方法提高了对存在复杂纹理结果的视频块的解码准确性,提高了视频码流的处理效率。
可以理解的是,编码参数信息包括:通用限制信息GCI、序列参数集SPS、图像参数集PPS和编码单元CU定义,参照图24,步骤S720包括以下之一:
步骤S721、当通用限制信息GCI中的第一预设开关标志为开启标志值,对所有视频序列执行融合预测。
步骤S722、当序列参数集SPS中的第二预设开关标志为开启标志值,对当前视频序列执行融合预测。
步骤S723、当图像参数集PPS中的第三预设开关标志为开启标志值,对当前图像执行融合预测。
步骤S724、当CU定义中的第四预设开关标志为开启标志值,对当前CU执行融合预测。
需要说明的是,编码参数信息中通用限制信息GCI、序列参数集SPS、图像参数集PPS和编码单元CU定义对应的各个预设开关标志与步骤S611至步骤S614中的预设开关标志保持一致。
需要说明的是,通用限制信息GCI包含所有视频序列的共用编码参数。因此,通用限制信息GCI中的第一预设开关标志用于指示是否对所有视频序列执行融合预测。当第一预设开关标志设置为开启标志值,需要对所有视频序列执行融合预测。
需要说明的是,序列参数集SPS包含当前视频序列的共用编码参数。一旦序列参数集SPS被引用,当前视频序列中所有图像都是使用该序列参数集SPS的编码参数。因此,当序列参数集SPS中的第二预设开关标志设置为开启标志值,需要对当前视频序列执行融合预测。
需要说明的是,图像参数集PPS包含当前图像的共用编码参数,因此,图像参数集PPS中的第三预设开关标志用于指示是否对当前执行融合预测。在第三预设开关标志设置为开启标志值的情况下,对当前图像执行融合预测。
需要说明的是,CU定义与当前CU相对应。若CU定义中的第四预设开关标志设置为开启标志值,则对当前CU执行融合预测。
需要说明的是,当预设开关标志设置为关闭标志值时,指示对于预设开关标志对应的数据执行帧间预测。
需要说明的是,上述步骤S721至步骤S724的实施例基于编码参数信息中通用限制信息GCI、序列参数集SPS、图像参数集PPS和编码单元CU定义的预设开关标志,对视频码流中的相关数据进行融合预测,从而提高视频码流的处理准确度。
本申请实施例还提供了一种电子设备,如图25所示,该电子设备1400包括:
一个或多个处理器1410;
存储器1420,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器1410执行,使得一个或多个处理器1410实现本申请任意一个实施例提供的视频帧预测方法,或者实现本申请任意一个实施例提供视频码流的处理方法。
存储器1420作为一种非暂态网络系统,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器1420可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器1420可包括相对于处理器1410远程设置的存储器1420,这些远程存储器1420可以通过网络连接至该处理器1410。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
存储器1420,可以采用只读存储器(ReadOnlyMemory,ROM)、静态存储设备、动态存储设备或者随机存取存储器(RandomAccessMemory,RAM)等形式实现。存储器1420可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1420中,并由处理器1410来调用执行本申请实施例的方法。
处理器1410,可以采用通用的CPU(CentralProcessingUnit,中央处理器)、微处理器、应用专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本申请实施例所提供的技术方案。
在一些实施例中,电子设备还包括:
输入/输出接口,用于实现信息输入及输出;
通信接口,用于实现本设备与其他设备的通信交互,可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信;
总线,在设备的各个组件(例如处理器1410、存储器1420、输入/输出接口和通信接口)之间传输信息;
其中处理器1410、存储器1420、输入/输出接口和通信接口可以通过总线实现彼此之间在设备内部的通信连接。
本申请一实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,该计算机可执行指令用于执行实现本申请任意一个实施例提供的视频帧预测方法,或者实现本申请任意一个实施例提供视频码流的处理方法。
本申请一实施例还提供了一种计算机程序产品,包括计算机程序或计算机指令,该计算机程序或计算机指令存储在计算机可读存储介质中,计算机设备的处理器从计算机可读存储介质读取计算机程序或计算机指令,处理器执行计算机程序或计算机指令,使得计算机设备执行实现本申请任意一个实施例提供的视频帧预测方法,或者实现本申请任意一个实施例提供视频码流的处理方法。
本申请实施例提供了一种视频帧预测方法、视频码流处理方法及相关装置,旨在提升对于存在复杂纹理结构的视频块的预测准确性。
本申请实施例首先基于空域的角度模式统计信息,确定多个第一角度模式。之后,根据第一角度模式的索引,确定当前CU(Coding Unit,编码单元)使用的第一角度模式对应的预测结果,进而根据各个第一角度模式对应的预测结果和第一权重系数,确定当前CU的融合预测结果。本申请实施例中当前CU的融合预测结果基于多个第一角度模式对应的预测结果所确定,那么视频帧预测方法能够结合多个第一角度模式预测的优势,对存在复杂纹理结果的视频块进行精准预测,从而提高帧预测的准确性。另外,第一权重系数与第一角度模式相对应,能够对各个预测结果进行更好的分配,使得到的融合预测结果更加准确,提升了对于存在复杂纹理结构的视频块的预测准确性。
本申请实施例描述的系统架构以及应用场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着系统架构的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
以上参照附图说明了本申请的一些实施例,并非因此局限本申请的权利范围。本领域技术人员不脱离本申请的范围和实质内所作的任何修改、等同替换和改进,均应在本申请的权利范围之内。
Claims (21)
- 一种视频帧预测方法,所述方法包括:根据空域的角度模式统计信息,确定多个第一角度模式;根据所述第一角度模式的索引,确定当前CU使用所述第一角度模式对应的预测结果;根据各个所述第一角度模式对应的预测结果和第一权重系数,确定所述当前CU的融合预测结果。
- 根据权利要求1所述的方法,其中,所述根据空域的角度模式统计信息,确定多个第一角度模式,包括:确定多个空域采样点;根据各个空域采样点所在CU的角度模式信息,构建频率直方图;根据所述频率直方图确定多个所述第一角度模式。
- 根据权利要求2所述的方法,其中,所述空域采样点包括邻近采样点和非邻近采样点中的至少之一。
- 根据权利要求3所述的方法,其中,所述邻近采样点包括位于所述当前CU的上方、左上方、左侧、左下方、右上方的相邻像素。
- 根据权利要求3所述的方法,其中,所述非邻近采样点包括位于所述当前CU的上方、左上方、左侧、左下方、右上方的非相邻像素。
- 根据权利要求2所述的方法,其中,所述根据各个空域采样点所在CU的角度模式信息,构建频率直方图,包括:遍历各个所述空域采样点所在CU,并确定当前遍历CU使用的第二角度模式;将所述当前遍历CU的面积累加到所述频率直方图的所述第二角度模式中。
- 根据权利要求2所述的方法,其中,所述根据所述频率直方图确定第一角度模式,包括:根据所述频率直方图确定幅度最高的n个第二角度模式,其中,n大于或等于1,且小于或等于5;根据n个所述第二角度模式确定所述第一角度模式,其中,所述第一角度模式至少包括平面模式。
- 根据权利要求1所述的方法,其中,所述根据所述第一角度模式的索引,确定当前CU使用所述第一角度模式对应的预测结果,包括:在所述第一角度模式的索引属于第一索引的情况下,使用基于矩阵的帧内预测模式确定所述第一角度模式对应的预测结果。
- 根据权利要求8所述的方法,其中,所述使用基于矩阵的帧内预测模式确定所述第一角度模式对应的预测结果,包括:从权重矩阵获取与所述当前CU中的目标位置及所述第一角度模式对应的第二权重系数;根据所述第一角度模式获取所述目标位置对应的参考像素;根据所述第二权重系数和所述参考像素,得到所述目标位置的预测像素;根据所述当前CU中各个所述目标位置的预测像素,得到所述第一角度模式对应的预测结果。
- 根据权利要求1所述的方法,其中,所述根据所述第一角度模式的索引,确定当前CU使用所述第一角度模式对应的预测结果,还包括:在所述第一角度模式的索引不属于所述第一索引的情况下,使用角度预测模式确定所述第一角度模式对应的预测结果。
- 根据权利要求1所述的方法,其中,所述第一角度模式对应的第一权重系数通过以下步骤获得:获取所有的所述第一角度模式对应的预测损失值;根据所有的所述第一角度模式对应的预测损失值的和,得到总预测损失值;对于每个所述第一角度模式,根据所述第一角度模式对应的预测损失值和所述总预测损失值,得到所述第一角度模式对应的第一权重系数。
- 根据权利要求11所述的方法,其中,所述第一角度模式对应的预测损失值通过以下步骤获得:基于所述第一角度模式确定模板区域的预测像素值;获取所述模板区域的重建像素值;根据所述模板区域的预测像素值和重建像素值,确定所述第一角度模式对应的预测损失值。
- 根据权利要求12所述的方法,其中,所述基于所述第一角度模式确定模板区域的预测像素值,包括:在所述第一角度模式的索引属于第一索引的情况下,使用基于矩阵的帧内预测模式确定模板区域的预测像素值;或者,在所述第一角度模式的索引不属于第一索引的情况下,使用角度预测模式确定模板区域的预测像素值。
- 根据权利要求1所述的方法,其中,所述第一角度模式对应的第一权重系数通过以下步骤获得:从频率直方图获取所有的所述第一角度模式对应的幅度值,其中,所述频率直方图根据所述空域的角度模式统计信息构建;根据所有的所述第一角度模式对应的幅度值的和,得到总幅度值;遍历各个所述第一角度模式,并根据当前遍历第一角度模式对应的幅度值与所述总幅度值的比例,得到所述当前遍历第一角度模式对应的第一权重系数。
- 一种视频码流处理方法,所述方法包括:将编码参数信息中的预设开关标志设置为开启标志值,所述预设开关标志用于指示是否执行融合预测,其中,所述融合预测基于权利要求1-14任一所述的视频帧预测方法实现;将所述编码参数信息写入视频码流中。
- 根据权利要求15所述的方法,其中,所述编码参数信息包括:通用限制信息GCI、序列参数集SPS、图像参数集PPS和编码单元CU定义;所述将编码参数信息中的预设开关标志设置为开启标志值,包括以下至少之一:将所述通用限制信息GCI中的第一预设开关标志设置为开启标志值,以指示对所有视频序列执行所述融合预测;或将所述序列参数集SPS中的第二预设开关标志设置为开启标志值,以指示对当前视频序列执行所述融合预测;或将所述图像参数集PPS中的第三预设开关标志设置为开启标志值,以指示对当前图像执行所述融合预测;或将所述CU定义中的第四预设开关标志设置为开启标志值,以指示对当前CU执行所述融合预测。
- 一种视频码流处理方法,所述方法包括:接收视频码流,并从所述视频码流获取编码参数信息;根据所述编码参数信息中的预设开关标志执行融合预测,其中,所述融合预测基于权利要求1-14任一所述的视频帧预测方法实现。
- 根据权利要求17所述的方法,其中,所述编码参数信息包括:通用限制信息GCI、序列参数集SPS、图像参数集PPS和编码单元CU定义;所述根据所述编码参数信息中的预设开关标志执行融合预测,包括以下之一:当所述通用限制信息GCI中的第一预设开关标志为开启标志值,对所有视频序列执行所述融合预测;或当所述序列参数集SPS中的第二预设开关标志为开启标志值,对当前视频序列执行所述融合预测;或当所述图像参数集PPS中的第三预设开关标志为开启标志值,对当前图像执行所述融合预测;或当所述CU定义中的第四预设开关标志为开启标志值,对当前CU执行所述融合预测。
- 一种电子设备,包括:一个或多个处理器;存储器,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-14任一所述的视频帧预测方法,或者如权利要求15-16任一所述的视频码流处理方法,或者如权利要求17-18任一所述的视频码流处理方法。
- 一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如权利要求1-14任一所述的视频帧预测方法,或者如权利要求15-16任一所述的视频码流处理方法,或者如权利要求17-18任一所述的视频码流处理方法。
- 一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如权利要求1-14任一所述的视频帧预测方法,或者如权利要求15-16任一所述的视频码流处理方法,或者如权利要求17-18任一所述的视频码流处理方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410890999.5 | 2024-07-03 | ||
| CN202410890999.5A CN121284265A (zh) | 2024-07-03 | 2024-07-03 | 视频帧预测方法、视频码流处理方法及相关装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2026007672A1 true WO2026007672A1 (zh) | 2026-01-08 |
Family
ID=98237425
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2025/100871 Pending WO2026007672A1 (zh) | 2024-07-03 | 2025-06-13 | 视频帧预测方法、视频码流处理方法及相关装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN121284265A (zh) |
| WO (1) | WO2026007672A1 (zh) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114938449A (zh) * | 2022-07-20 | 2022-08-23 | 浙江大华技术股份有限公司 | 帧内预测方法、图像编码方法、图像解码方法及装置 |
| US20220394269A1 (en) * | 2021-06-03 | 2022-12-08 | Qualcomm Incorporated | Derived intra prediction modes and most probable modes in video coding |
| WO2023122969A1 (zh) * | 2021-12-28 | 2023-07-06 | Oppo广东移动通信有限公司 | 帧内预测方法、设备、系统、及存储介质 |
| WO2024080852A1 (ko) * | 2022-10-14 | 2024-04-18 | 한국전자통신연구원 | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장하는 기록 매체 |
-
2024
- 2024-07-03 CN CN202410890999.5A patent/CN121284265A/zh active Pending
-
2025
- 2025-06-13 WO PCT/CN2025/100871 patent/WO2026007672A1/zh active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220394269A1 (en) * | 2021-06-03 | 2022-12-08 | Qualcomm Incorporated | Derived intra prediction modes and most probable modes in video coding |
| WO2023122969A1 (zh) * | 2021-12-28 | 2023-07-06 | Oppo广东移动通信有限公司 | 帧内预测方法、设备、系统、及存储介质 |
| CN114938449A (zh) * | 2022-07-20 | 2022-08-23 | 浙江大华技术股份有限公司 | 帧内预测方法、图像编码方法、图像解码方法及装置 |
| WO2024080852A1 (ko) * | 2022-10-14 | 2024-04-18 | 한국전자통신연구원 | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장하는 기록 매체 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN121284265A (zh) | 2026-01-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12519933B2 (en) | Image encoding/decoding method and device | |
| WO2022104498A1 (zh) | 帧内预测方法、编码器、解码器以及计算机存储介质 | |
| US11930210B2 (en) | Intra-frame prediction method and device | |
| CN116248866B (zh) | 利用包含追加区域的分割单位的影像解码方法以及装置 | |
| US12425575B2 (en) | Encoding/decoding method and apparatus for intra predicting a coding unit partition | |
| CN110839155B (zh) | 运动估计的方法、装置、电子设备及计算机可读存储介质 | |
| CN115022622B (zh) | 图像数据编码/解码方法和计算机可读记录介质 | |
| US11039137B2 (en) | Encoder, decoder, computer program and computer program product for processing a frame of a video sequence | |
| CN116668684B (zh) | 视频解码方法、视频编码方法及比特流的传输方法 | |
| CN117354515A (zh) | 图像编码/解码方法、记录介质和传输比特流的方法 | |
| US20250150583A1 (en) | Image encoding/decoding method and apparatus, and recording medium having bitstream stored therein | |
| WO2021253373A1 (en) | Probabilistic geometric partitioning in video coding | |
| CN112055208A (zh) | 视频编码方法、设备及存储装置 | |
| JP2026501769A (ja) | ビデオ符号化方法、ビデオ復号方法及び記憶媒体 | |
| WO2024169989A1 (en) | Methods and apparatus of merge list with constrained for cross-component model candidates in video coding | |
| CN120500841A (zh) | 基于帧内预测的图像编码/解码方法、用于发送比特流的方法以及存储比特流的记录介质 | |
| CN114845105B (zh) | 编码方法、装置、设备和存储介质 | |
| CN121284265A (zh) | 视频帧预测方法、视频码流处理方法及相关装置 | |
| RU2867858C2 (ru) | Способ кодирования и декодирования, кодер, декодер и носитель данных | |
| CN114071138A (zh) | 帧内预测编码方法、帧内预测编码装置和计算机可读介质 | |
| US20250227276A1 (en) | Image decoding device, image decoding method, and program | |
| TW202425631A (zh) | 編解碼方法、碼流、編碼器、解碼器以及儲存媒介 | |
| CN121603678A (zh) | 预测视频块的方法、视频码流处理方法及相关设备 | |
| CA3314002A1 (en) | Method and device for effective motion vector prediction of intra block copy, and recording medium | |
| JP2026515713A (ja) | ブロックベクトル誘導交差成分予測における参照サンプルの選択 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25832026 Country of ref document: EP Kind code of ref document: A1 |