WO2024259568A1 - 编解码方法、码流、编码器、解码器以及存储介质 - Google Patents

编解码方法、码流、编码器、解码器以及存储介质 Download PDF

Info

Publication number
WO2024259568A1
WO2024259568A1 PCT/CN2023/101156 CN2023101156W WO2024259568A1 WO 2024259568 A1 WO2024259568 A1 WO 2024259568A1 CN 2023101156 W CN2023101156 W CN 2023101156W WO 2024259568 A1 WO2024259568 A1 WO 2024259568A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
value
filter
target
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/101156
Other languages
English (en)
French (fr)
Inventor
徐陆航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202380099393.3A priority Critical patent/CN121511593A/zh
Priority to AU2023459194A priority patent/AU2023459194A1/en
Priority to PCT/CN2023/101156 priority patent/WO2024259568A1/zh
Priority to KR1020257042002A priority patent/KR20260025916A/ko
Publication of WO2024259568A1 publication Critical patent/WO2024259568A1/zh
Priority to US19/420,029 priority patent/US20260106981A1/en
Priority to MX2025015301A priority patent/MX2025015301A/es
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/17Methods 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/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Definitions

  • the embodiments of the present application relate to the field of video coding and decoding technology, and in particular, to a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium.
  • high-resolution videos such as HD and UHD have emerged.
  • high-resolution videos usually have more information and therefore require more bandwidth.
  • video coding standards involving video compression have been introduced.
  • the interpolation-based intra-frame prediction technology has been proposed in the video coding standard. Specifically, the interpolation filter coefficients are obtained through the reconstructed pixel values around the current block, and then used to perform intra-frame prediction on the current block.
  • the existing technical solutions still have some defects, resulting in low cost-effectiveness in encoding and decoding performance and time complexity.
  • the embodiments of the present application provide a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium, which can reduce the time complexity while ensuring the coding and decoding performance.
  • an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
  • An intra-frame prediction is performed on the current block according to the filter coefficient to determine a prediction value of the current block.
  • an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
  • An intra-frame prediction is performed on the current block according to the filter coefficient to determine a prediction value of the current block.
  • an embodiment of the present application provides a code stream, which is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following:
  • a target filtering mode of a current block a residual value of the current block, and a transform kernel index value of the current block.
  • an encoder comprising a first determination unit and a first prediction unit, wherein:
  • a first determining unit is configured to determine a target filtering mode of the current block; and determine a reference area of the current block according to a size parameter of the current block and the target filtering mode;
  • the first prediction unit is configured to determine a filter coefficient of the current block according to a reference area of the current block; and perform intra-frame prediction on the current block according to the filter coefficient to determine a prediction value of the current block.
  • an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein,
  • a first memory for storing a computer program that can be run on the first processor
  • the first processor is used to execute the method described in the second aspect when running a computer program.
  • an embodiment of the present application provides a decoder, the decoder comprising a decoding unit, a second determining unit, and a second predicting unit, wherein:
  • a decoding unit configured to decode the bitstream and determine a target filtering mode for a current block
  • a second determining unit is configured to determine a reference area of the current block according to a size parameter of the current block and a target filtering mode
  • the second prediction unit is configured to determine a filter coefficient of the current block according to a reference area of the current block; and perform intra-frame prediction on the current block according to the filter coefficient to determine a prediction value of the current block.
  • an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein:
  • a second memory for storing a computer program that can be run on a second processor
  • the second processor is used to execute the method described in the first aspect when running a computer program.
  • an embodiment of the present application provides a computer-readable storage medium, which stores a computer program.
  • the computer program When executed, it implements the method as described in the first aspect, or implements the method as described in the second aspect.
  • the embodiment of the present application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium.
  • the reference area of the current block is determined according to the size parameter of the current block and the target filtering mode; then the filtering coefficient of the current block is determined according to the reference area of the current block; and then the current block is intra-predicted according to the filtering coefficient to determine the prediction value of the current block.
  • the intra-frame prediction technology based on interpolation filtering is not only related to the target filtering mode when determining the reference area for calculating the filtering coefficient, but also to the size parameter of the current block.
  • a large reference area can be used when the size of the current block is large, and a small reference area can be used when the size of the current block is small; in this way, the computational complexity can be reduced and the encoding time can be reduced; at the same time, the accuracy of intra-frame prediction can be improved, thereby improving the coding and decoding performance.
  • FIG. 1A is a schematic diagram of a calculation method for obtaining a value m
  • FIG1B is a second schematic diagram of a calculation method for obtaining the value m
  • FIG1C is a third schematic diagram of a calculation method for obtaining the value m
  • FIG2A is a schematic diagram of a positional relationship between a current block and a reconstruction area
  • FIG2B is a second schematic diagram of the positional relationship between the current block and the reconstruction area
  • FIG2C is a third schematic diagram of the positional relationship between the current block and the reconstruction area
  • FIG3A is a schematic diagram of a shape of an interpolation filter
  • FIG3B is a second schematic diagram of the shape of an interpolation filter
  • FIG3C is a third schematic diagram of the shape of an interpolation filter
  • FIG4 is a schematic diagram of a structure for obtaining input and output at possible positions of an interpolation filter
  • FIG5 is a schematic diagram of a prediction direction based on interpolation filtering
  • FIG6 is a schematic diagram of an angle mode of intra-frame prediction
  • FIG7 is a schematic diagram of a 3 ⁇ 3 window sliding in a prediction block
  • FIG8 is a schematic diagram of the accumulated gradient amplitude values at different angles
  • FIG9A is a schematic block diagram of a composition of an encoder provided in an embodiment of the present application.
  • FIG9B is a schematic block diagram of a decoder provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application.
  • FIG11 is a flowchart diagram 1 of a decoding method provided in an embodiment of the present application.
  • FIG12A is a schematic diagram 1 of a reference area of a current block provided in an embodiment of the present application.
  • FIG12B is a second schematic diagram of a reference area of a current block provided in an embodiment of the present application.
  • FIG12C is a third schematic diagram of a reference area of a current block provided in an embodiment of the present application.
  • FIG13 is a second flow chart of a decoding method provided in an embodiment of the present application.
  • FIG14A is a first schematic diagram of the distribution of linear terms and nonlinear terms of a target filter provided in an embodiment of the present application
  • FIG14B is a second schematic diagram of the distribution of linear terms and nonlinear terms of an interpolation filter provided in an embodiment of the present application.
  • FIG14C is a third schematic diagram of the distribution of linear terms and nonlinear terms of an interpolation filter provided in an embodiment of the present application.
  • FIG15A is a first schematic diagram of distribution of linear terms and nonlinear terms of another target filter provided in an embodiment of the present application.
  • FIG15B is a second schematic diagram of distribution of linear terms and nonlinear terms of another interpolation filter provided in an embodiment of the present application.
  • FIG15C is a third schematic diagram of distribution of linear terms and nonlinear terms of another interpolation filter provided in an embodiment of the present application.
  • FIG16A is a first schematic diagram of distribution of linear terms and nonlinear terms of another target filter provided in an embodiment of the present application.
  • FIG16B is a second schematic diagram of distribution of linear terms and nonlinear terms of another interpolation filter provided in an embodiment of the present application.
  • FIG16C is a third schematic diagram of distribution of linear terms and nonlinear terms of another interpolation filter provided in an embodiment of the present application.
  • FIG17 is a flowchart diagram 1 of an encoding method provided in an embodiment of the present application.
  • FIG18A is a first schematic diagram of dividing a reference area provided in an embodiment of the present application.
  • FIG18B is a second schematic diagram of division of a reference area provided in an embodiment of the present application.
  • FIG18C is a third schematic diagram of division of a reference area provided in an embodiment of the present application.
  • FIG19 is a second flow chart of an encoding method provided in an embodiment of the present application.
  • FIG20 is a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application.
  • FIG21 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application.
  • FIG22 is a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application.
  • FIG23 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application.
  • FIG. 24 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.
  • first ⁇ second ⁇ third involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that “first ⁇ second ⁇ third” can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
  • JVET Joint Video Exploration Team
  • VVC Versatile Video Coding
  • VVC reference software test platform
  • VTM VVC Test Model
  • ECM Enhanced Compression Mode
  • MTS Multiple Transform Selection
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • NPT Non-Separable Primary Transform
  • PLANAR Planar mode
  • IBC Intra Block Copy
  • WAIP Wide Angle Intra Prediction
  • MSE Mean Squared Error
  • the intra prediction technology based on interpolation refers to a technology that obtains interpolation filter coefficients through reconstructed pixel values around the current block to perform intra prediction on the current block.
  • the intra prediction technology based on interpolation filtering may include one or more of the following features:
  • the number of taps of the interpolation filter should be greater than or equal to 2.
  • the interpolation filter can have a variety of shapes. The shape of the selected interpolation filter is controlled using syntax elements.
  • the reconstructed pixels used to obtain the interpolation filter coefficients should be in one or several regions around the current block, and the region used to obtain the interpolation filter coefficients is selected using syntax elements.
  • Interpolation filter prediction can be used for intra block prediction of luma or chroma.
  • the input of the interpolation filter is the reconstructed pixel value and/or the predicted pixel value, or it can be the reconstructed value and the predicted value minus a certain value.
  • the maximum value and the minimum value of the reconstructed pixels are found in a reconstruction area of 13 rows and 13 columns around the current block.
  • the maximum value and the minimum value here can be used to limit the range of the prediction result.
  • the value m to be subtracted from the input and added to the output of the interpolation filter is obtained according to the following method: m is the value used in DC mode prediction, and m is a positive integer.
  • the calculation method for obtaining the value m can be divided into three cases:
  • three 15-tap interpolation filters and three reconstruction areas are defined.
  • FIG2A shows a schematic diagram of the positional relationship between a current block and a reconstruction area.
  • the reconstruction area may include an upper adjacent area adjacent to the upper side of the current block and a left adjacent area adjacent to the left side of the current block; wherein the length of the upper adjacent area is 2 ⁇ Width+13 and the width is 13; the length of the left adjacent area is 2 ⁇ Height+13 and the width is 13.
  • FIG2B shows another schematic diagram of the positional relationship between a current block and a reconstruction area.
  • the reconstruction area may include an upper adjacent area adjacent to the upper side of the current block; wherein the length of the upper adjacent area is 2 ⁇ Width+13 and the width is 13.
  • FIG2C shows another schematic diagram of the positional relationship between a current block and a reconstruction area.
  • the reconstruction area may include a left adjacent area adjacent to the left side of the current block; wherein the length of the left adjacent area is 2 ⁇ Height+13 and the width is 13.
  • Height and Width represent the current height and width, respectively. It should be noted that, for the reconstructed area in FIG. 2A , FIG. 2B and FIG. 2C , that is, the reconstructed pixels in 13 rows and/or 13 columns around the current block may be used for obtaining interpolation filter coefficients.
  • FIG3A shows a schematic diagram of the shape of an interpolation filter.
  • the shape of the interpolation filter is a 4 ⁇ 4 square.
  • FIG3B shows a schematic diagram of the shape of another interpolation filter.
  • the shape of the interpolation filter is a 2 ⁇ 8 rectangle.
  • FIG3C shows a schematic diagram of the shape of yet another interpolation filter.
  • the shape of the interpolation filter is an 8 ⁇ 2 rectangle.
  • the grid-filled portion represents the input position of the interpolation filter
  • the black-filled portion represents the output position of the interpolation filter.
  • 3 ⁇ 3 different filtering modes can be derived by combining the three reconstruction areas with the three interpolation filter shapes in different ways (each filter shape combined with each reconstruction area can derive a filtering mode), and the encoder decides a combination of filter shape and reconstruction area through rate-distortion cost.
  • the encoder and decoder first determine the coefficients of the interpolation filter according to the determined filter shape and reconstruction area.
  • the input of the interpolation filter is the pixel value without the mean value (i.e., the reconstructed pixel value minus the mean value). Then, when obtaining the parameters, the selected interpolation filter is slid on the selected area with a horizontal and vertical sliding step of 1 pixel distance. Specifically, see FIG4 , which shows a schematic diagram of the structure of a 4 ⁇ 4 interpolation filter obtaining inputs and outputs at possible positions of the interpolation filter on the selected reconstruction area. The autocorrelation coefficient matrix and the cross-correlation coefficient vector are constructed by the obtained inputs and outputs. When the selected reconstruction area includes pixel values that have not been reconstructed, the pixel values will not be counted in the samples used to obtain the interpolation filter parameters.
  • c 0 ...c N-1 are the coefficients of the interpolation filter to be solved (also called "filter coefficients"), and m is a value subtracted from the input of the interpolation filter (a value to be added to the output at this time).
  • the prediction process starts from the upper left corner of the current block and predicts toward the lower left corner in a certain order.
  • the prediction formula is as follows:
  • a and b in Clip(a,b,c) represent the output range of the limited prediction results.
  • pred r is the prediction result of position r in the current block
  • min, max are the minimum and maximum values obtained above
  • m is a certain value obtained above.
  • the interpolation filter is predicted in the diagonal direction, wherein the grid-filled part represents the input position of the interpolation filter, and the black-filled part represents the output position of the interpolation filter.
  • the points to be predicted on the same diagonal line can be predicted in parallel.
  • a prediction block of the current block can be obtained, and the prediction block includes a prediction value of at least one pixel in the current block.
  • different angle modes are suitable for using different transforms, including a primary transform MTS, NSPT and a secondary transform LFNST.
  • MTS includes some traditional transforms, such as DCT transform and DST transform.
  • NSPT and LFNST are a series of transform coefficients obtained through a universal training set based on the optimal transform. The difference between NSPT and LFNST is that NSPT is directly used to transform the residual coefficients, while LFNST further transforms the transform coefficients after DCT2 transform.
  • NST non-separable primary transform
  • LNNST non-separable secondary transform
  • the conventional intra prediction modes may include:
  • PLANAR mode the intra prediction mode index is 0;
  • Angular mode The intra prediction mode index is 2 to 66.
  • the intra prediction mode may include angle modes of 2 to 66, and wide angle modes of -1 to 14 and 67 to 80.
  • the arrows in FIG6 point to the directions predicted for the angle modes existing in VVC, and the intra prediction mode indexes used in encoding and decoding are 2 to 66.
  • the current block is a non-square block, some angle directions will be replaced with wide angle modes (such as -1 to -14 and 67 to 80 in FIG6 ).
  • NSPT and LFNST divide the transformation kernels of the traditional prediction mode into 35 groups, each of which has 3 selectable transformation kernels.
  • Table 2 shows the correspondence between the traditional prediction mode and the transformation kernel groups.
  • a method for matching a prediction block based on interpolation filtering to a traditional prediction mode is proposed here, and then the prediction block based on interpolation filtering is matched to a different transformation kernel of a preset primary transformation (separable or inseparable) or secondary transformation (separable or inseparable) through the matched traditional prediction mode.
  • the prediction block based on interpolation filtering is matched to the PLANAR mode or the mode of angle direction 2 to 66 through the prediction value in the prediction block.
  • the following steps may be included:
  • a sliding 3 ⁇ 3 window is used to calculate the horizontal and vertical gradient values G x and G y of each 3 ⁇ 3 window in the prediction block based on interpolation filtering.
  • G x and G y are obtained by multiplying the 3 ⁇ 3 horizontal gradient operator M x and the vertical gradient operator My with the prediction value within the window position.
  • Figure 7 is a schematic diagram of a 3 ⁇ 3 window sliding in a prediction block, which can slide in the horizontal and vertical directions. Assuming that the prediction block based on interpolation filtering is a block with a width and height of (w, h), the sliding 3 ⁇ 3 window can calculate G x and G y at (w-2) ⁇ (h-2) positions at the center of the prediction block.
  • the calculation process of atan() can be simplified and completed by table lookup or some transformation.
  • the gradient magnitude value G at each position is accumulated on the traditional angle mode derived from it, and a histogram of the gradient magnitude value is obtained as shown in Figure 8.
  • the traditional angle mode with the largest accumulated gradient magnitude value is selected from the histogram as the prediction mode corresponding to the current block; in particular, when the gradient magnitude values derived from all traditional angle modes are zero, the current block will be matched to the traditional PLANAR mode as the corresponding prediction mode.
  • the traditional prediction mode derived from the interpolation filter prediction will be used for the selection of the transformation kernel group of NSPT and LFNST.
  • an embodiment of the present application proposes a coding method to determine a target filtering mode of a current block; determine a reference area of the current block according to a size parameter of the current block and the target filtering mode; determine a filtering coefficient of the current block according to the reference area of the current block; perform intra-frame prediction on the current block according to the filtering coefficient to determine a prediction value of the current block.
  • the embodiment of the present application proposes a decoding method, which decodes a bit stream and determines a target filtering mode of a current block; determines a reference area of the current block according to a size parameter of the current block and the target filtering mode; determines a filtering coefficient of the current block according to the reference area of the current block; and performs intra-frame prediction on the current block according to the filtering coefficient to determine a prediction value of the current block.
  • the intra-frame prediction technology based on interpolation filtering when determining the reference area for calculating the filter coefficient, is not only related to the target filtering mode, but also related to the size parameters of the current block. For example, when the size of the current block is large, a large reference area can be used, and when the size of the current block is small, a small reference area can be used. In this way, while ensuring the encoding and decoding performance, the calculation complexity can be reduced, the encoding time can be reduced, and the cost-effectiveness of the encoding and decoding performance and the encoding complexity can be improved. At the same time, the intra-frame prediction accuracy can be improved, thereby improving the encoding and decoding efficiency.
  • the encoder 100 may include a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoded image cache unit 110, etc.
  • the filtering unit 108 may implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering
  • the encoding unit 109 may implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmetic Coding, CABAC).
  • a video coding block can be obtained by dividing the coding tree unit (CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 101 to transform the video coding block, including transforming the residual information from the pixel domain to the transform domain, and quantizing the obtained transform coefficients to further reduce the bit rate;
  • the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block; specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block;
  • the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information;
  • the motion estimation performed by the motion estimation unit 105 is a process of generating a motion vector, and the motion vector can estimate the motion of the video coding block, and then
  • the motion vector determined by the motion estimation unit 105 performs motion compensation; after determining the intra-frame prediction mode, the intra-frame prediction unit 103 is also used to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated and determined motion vector data to the encoding unit 109; in addition, the inverse transform and inverse quantization unit 106 is used to reconstruct the video coding block, reconstruct the residual block in the pixel domain, and the reconstructed residual block is removed by the filter control analysis unit 107 and the filtering unit 108.
  • the encoding unit 109 is used to encode various coding parameters and quantized transform coefficients.
  • the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode and output the code stream of the video signal; and the decoded image buffer unit 110 is used to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 110 .
  • the decoder 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image cache unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering.
  • the decoding unit 201 can implement header information decoding and CABAC decoding
  • the filtering unit 205 can implement deblocking filtering and SAO filtering.
  • a code stream of the video signal is output; the code stream is input to the decoder 200, and first passes through the decoding unit 201 to obtain the decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate residual blocks in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and the data from the previously decoded block of the current frame or picture; the motion compensation unit 204 is to determine the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and use The prediction information is used to generate a predictive block of the video decoding block being decoded; a decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 and the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal passes through the filtering unit 205 to remove the block effect artifacts
  • the embodiment of the present application also provides a network architecture of a codec system including an encoder and a decoder, wherein FIG. 10 shows a schematic diagram of the network architecture of a coding and decoding system provided by an embodiment of the present application.
  • the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01.
  • the electronic device can be various types of devices with video coding and decoding functions during implementation.
  • the electronic device can include a smart phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., which is not specifically limited in the embodiment of the present application.
  • the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.
  • the method of the embodiment of the present application is mainly applied to the intra-frame prediction unit 103 part shown in Figure 9A and the intra-frame prediction unit 203 part shown in Figure 9B. That is to say, the embodiment of the present application can be applied to both the encoder and the decoder, and can even be applied to both the encoder and the decoder at the same time, but the embodiment of the present application is not specifically limited.
  • the "current block” specifically refers to the coding block currently to be intra-frame predicted; when applied to the intra-frame prediction unit 203, the "current block” specifically refers to the decoding block currently to be intra-frame predicted.
  • FIG11 a schematic flow chart of a decoding method provided by an embodiment of the present application is shown. As shown in FIG11, the method may include:
  • S1101 Decode the bitstream and determine the target filtering mode of the current block.
  • the decoding method of the embodiment of the present application may be an intra-frame prediction method, specifically referring to an improvement of an intra-frame prediction mode based on interpolation filtering to enhance the cost-effectiveness of performance and complexity.
  • the current block includes at least a first color component and a second color component.
  • the block at this time can be simply referred to as a first color component block; and when the first color component is a brightness component, the first color component block can also be referred to as a brightness block.
  • the block at this time can be simply referred to as a second color component block; and when the second color component is a chrominance component, the second color component block can also be referred to as a chrominance block.
  • the target filter mode may refer to a mode of using a target filter to perform intra-frame prediction on the current block, wherein the target filter may refer to an interpolation filter.
  • the target filtering mode can be implemented using the first syntax element identification information. That is, in some embodiments, the code stream is decoded to determine the value of the first syntax element identification information; when the value of the first syntax element identification information is a first value, the prediction mode of the current block is determined to be the target filtering mode; when the value of the first syntax element identification information is a second value, the prediction mode of the current block is determined to be a non-target filtering mode.
  • the first value is different from the second value, and the first value and the second value can be in parameter form or in digital form.
  • the first syntax element identification information can be a parameter written in the profile or a value of a flag, which is not specifically limited here.
  • the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can be set to true and the second value can be set to false; or, the first value can be set to false and the second value can be set to true.
  • the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
  • the target filtering mode may include the reference area category of the current block and the shape of the target filter.
  • the reference area category of the current block may include a first category, a second category, and a third category.
  • the method may further include:
  • the reference area category of the current block is the first category, determining that the reference area of the current block includes an upper adjacent area and a left adjacent area;
  • the reference area category of the current block is the second category, determining that the reference area of the current block includes the upper adjacent area
  • the reference area category of the current block is the third category, it is determined that the reference area of the current block includes the left adjacent area.
  • the reference area of the current block refers to the reconstructed area around the current block.
  • the upper adjacent area may refer to the reconstructed area adjacent to the upper side of the current block, and the left adjacent area may refer to the reconstructed area adjacent to the left side of the current block.
  • the reference area category shown in FIG. 2A is the first category
  • the reference area category shown in FIG. 2B is the second category
  • the reference area category shown in FIG. 2C is the third category.
  • the shape of the target filter may include a first shape, a second shape, and a third shape, wherein the first shape may be a 4 ⁇ 4 square, the second shape may be a 2 ⁇ 8 rectangle, and the third shape may be an 8 ⁇ 2 rectangle; however, this is not specifically limited here.
  • the target filter shown in FIG. 3A is of a first shape
  • the target filter shown in FIG. 3B is of a second shape
  • the target filter shown in FIG. 3C is of a third shape.
  • the candidate filter mode for the current block can be obtained by combining three reference area categories and three target filter shapes.
  • nine candidate filter modes can be combined here in total, and the target filter mode is one of the nine candidate filter modes.
  • S1102 Determine a reference area of the current block according to a size parameter of the current block and a target filtering mode.
  • the reference area of the current block may be determined in combination with the size parameter of the current block, wherein the size parameter of the current block may include the height and width of the current block.
  • the size of the reference area of the current block is associated with the shape and minimum parameter of the target filter. In short, if the size of the current block is large, a large reference area can be used; if the size of the current block is small, a small reference area can be used. The number of rows and columns of the reference area can be derived according to the size of the current block.
  • FIG. 12A is a schematic diagram of a reference area of a current block
  • FIG. 12B is a schematic diagram of another reference area of a current block
  • FIG. 12C is a schematic diagram of a reference area of yet another current block.
  • the area within the dotted box is the reference area of the current block, which depends on the shape of the target filter used by the current block and the size of the variable tplSize.
  • the size of the variable tplSize is equal to the smaller value of the width and height of the current block. For example, for a 4 ⁇ 8 current block, the value of the variable tplSize is 4; for a 16 ⁇ 16 current block, the value of the variable tplSize is 16.
  • the enabling of the filtering mode can also be limited according to the size parameters of the current block.
  • the method may further include:
  • determining the reference region category in the target prediction mode to be any one item except the second category
  • the reference region category in the target prediction mode is determined to be any one item except the third category.
  • the value of the first factor may be a first preset constant.
  • the value of the first factor may be set to 2, but this is not specifically limited.
  • the reference area category of the current block can be disabled as the second category, that is, it is prohibited to use the upper adjacent area of the current block to calculate the filter coefficient.
  • the reference area category in the target prediction mode may only be the first category or the third category; if the ratio of the width to the height of the current block is greater than the first factor, that is, the height of the current block and the multiple of the first factor are less than the width of the current block, then the reference area category of the current block can be disabled as the third category, that is, it is prohibited to use the left adjacent area of the current block to calculate the filter coefficient.
  • the reference area category in the target prediction mode may only be the first category or the second category.
  • the number of candidate filter modes will be reduced accordingly. For example, if the reference area category of the current block is disabled as the second category (that is, the use of the upper adjacent area of the current block for calculating the filter coefficient is prohibited), the number of candidate filter modes will be reduced to six. In other words, since some interpolation filter modes are restricted according to the ratio of the width to the height of the current block (referred to as "aspect ratio"), the number of candidate filter modes allowed to be used under different aspect ratios is different; therefore, decoding can be performed based on the context model when parsing the target filter mode.
  • decoding the bitstream and determining the target filtering mode of the current block may include: determining a context model of the current block; and decoding the bitstream based on the context model to determine the target filtering mode of the current block.
  • the determination of the context model is associated with at least one of the following parameters:
  • the ratio of the width to the height of the current block is the ratio of the width to the height of the current block.
  • the selection of a context model may be related to factors such as the shape and aspect ratio of the current block.
  • factors such as the shape and aspect ratio of the current block.
  • the selection of a context model may be related to factors such as the shape and aspect ratio of the current block.
  • there are multiple context models in the decoding end and which context model to use for decoding may be determined based on factors such as the shape and aspect ratio of the current block.
  • the reason is that for a current block of narrow shape, since there may be fewer interpolation filter modes to select, the length of the codeword required to indicate a selected interpolation filter mode is short; while current blocks of other shapes allow different numbers of interpolation filter modes to be selected, and the length of the codeword required to indicate a certain interpolation filter mode is also long, which makes the probability of selecting an interpolation filter mode under different shapes different.
  • different probabilities require the selection of different context models, and here different context model indexes can be used to determine which specific context model is used.
  • the value of the first syntax element identification information can be decoded according to the context model, and then the target filtering mode of the current block can be determined. It can also reduce the computational complexity.
  • S1103 Determine a filter coefficient of the current block according to a reference area of the current block.
  • the filter coefficient of the current block is mainly determined according to the reference area of the current block and the shape of the target filter.
  • determining the filter coefficient of the current block according to the reference area of the current block may include:
  • the target filter determines the input value of the target filter corresponding to at least one reference pixel in the reference area and the output value of the target filter; according to the input value of the target filter corresponding to at least one reference pixel, determine the autocorrelation coefficient matrix; according to the input value of the target filter corresponding to at least one reference pixel and the output value of the target filter, determine the cross-correlation coefficient vector; determine the coefficients of the target filter according to the autocorrelation coefficient matrix and the cross-correlation coefficient vector; determine the coefficients of the target filter as the filter coefficients of the current block.
  • the intra-frame prediction technology based on interpolation filtering determines the filter shape and reference area category corresponding to the current block by parsing relevant syntax elements at the decoding end, then traverses each position in the reference area to construct an autocorrelation coefficient matrix and a cross-correlation coefficient vector, and then obtains the filter coefficient by solving the set of equations.
  • the autocorrelation coefficient matrix can be represented by A
  • the mutual correlation coefficient vector can be represented by Y, as follows:
  • t represents the reconstructed pixel value
  • r represents the coordinate position of the reference area
  • p 0 ...p N-1 represents the coordinate relationship relative to position r
  • the relative coordinates they refer to are the relative coordinate relationship between the input position and the output position of the target filter.
  • c 0 ...c N-1 are the filter coefficients to be solved
  • m is a value subtracted from the input of the target filter (a value added to the output at this time).
  • S1104 Perform intra-frame prediction on the current block according to the filter coefficient to determine a prediction value of the current block.
  • intra-frame prediction is performed on pixels in the current block according to the filter coefficient to determine the predicted value of the pixels in the current block, which may include: determining a reference sample value corresponding to the pixel to be predicted in the current block; determining the predicted value of the pixel to be predicted in the current block according to the reference sample value and the filter coefficient corresponding to the pixel to be predicted in the current block.
  • determining the reference sample value corresponding to the pixel to be predicted in the current block may include: based on the shape of the target filter, if the reference sample value is located in a reference area of the current block, determining the reconstructed value at the corresponding position in the reference area as the reference sample value; if the reference sample value is located inside the current block, determining the predicted value at the corresponding position in the current block as the reference sample value.
  • the target filter that is, the reference sample value corresponding to the pixel to be predicted in the current block
  • the reconstructed value is used as the input of the target filter; or, if the corresponding position is in the current block, then the predicted value that has been predicted is used as the input of the target filter.
  • the interpolation filtering is predicted in the diagonal direction; and the pixels to be predicted on the same diagonal line can be predicted in parallel, as shown in FIG. 5 for details.
  • the method may include:
  • S1301 Determine a first input value of a target filter based on reference sample values corresponding to pixels to be predicted in a current block.
  • determining the first input value of the target filter based on the reference sample value corresponding to the pixel to be predicted in the current block may include: determining a second factor; performing a subtraction operation on the reference sample value and the second factor to obtain the first input value of the target filter.
  • S1302 Determine a first output value of a target filter based on a first input value and a filter coefficient.
  • determining the first output value of the target filter based on the first input value and the filter coefficient may include: determining the second output value of the target filter based on the first input value and the filter coefficient; performing a first processing on the second output value to determine the first output value of the target filter.
  • determining the second output value of the target filter based on the first input value and the filter coefficient may include: calculating the product of the first input value and the corresponding filter coefficient; setting the second output value of the target filter to be equal to the sum of n products; wherein n represents the number of input items corresponding to the target filter, and n is a positive integer.
  • the reference sample value corresponding to the pixel r to be predicted in the current block can be
  • the second output value of the target filter is represented by P out1 , as shown in the following formula:
  • performing the first processing on the second output value to determine the first output value of the target filter may include: performing an addition operation on the second output value and the second factor to obtain the first output value of the target filter.
  • the first output value of the target filter can be represented by P out2 , where:
  • the value of the second factor may be a second preset constant.
  • the method may further include: determining a reconstruction value of at least one reference pixel in the reference area; performing mean calculation on the reconstruction value of at least one reference pixel to obtain a first mean; and setting the value of the second factor to be equal to the first mean.
  • the second factor may be obtained by calculating the mean value of the reconstructed values in the reference area, or may be a preset constant, or may even be a specific value, such as the reconstructed value of the upper left corner of the current block, which is not specifically limited here.
  • the second factor is the mean value of the reference area
  • the input of the target filter needs to subtract the mean value
  • the output of the target filter needs to add the mean value to serve as the final prediction result.
  • performing a first processing on the second output value to determine the first output value of the target filter may include: determining the third output value of the target filter; determining the fourth output value of the target filter based on the second output value and the third output value; and adding the fourth output value and the second factor to obtain the first output value of the target filter.
  • the number of input items includes not only the number of linear items, but also the number of nonlinear items and/or the number of bias items.
  • the third output value can be calculated based on the number of nonlinear items and/or the number of bias items
  • the second output value can be calculated based on the number of linear items.
  • the second output value of the target filter it can be specifically: calculate the product of the first input value and the corresponding filter coefficient; set the second output value of the target filter to be equal to the sum of n products; wherein n represents the number of first type input items corresponding to the target filter, and n is a positive integer.
  • the third output value is calculated based on the number of nonlinear terms.
  • determining the third output value of the target filter may include: determining the number of first-type input terms corresponding to the target filter based on the shape of the target filter; if the number of first-type input terms corresponding to the target filter is p, then determining p+q filter coefficients of the target filter, where p and q are both positive integers; and determining the third output value of the target filter based on q filter coefficients and q second-type input terms among the p+q filter coefficients.
  • the third output value is calculated based on the number of bias items.
  • determining the third output value of the target filter may include: determining the number of first-type input items corresponding to the target filter based on the shape of the target filter; if the number of first-type input items corresponding to the target filter is p, then determining p+m filter coefficients of the target filter, where p and m are both positive integers; and determining the third output value of the target filter based on m filter coefficients and m third-type input items among the p+m filter coefficients.
  • the third output value is calculated based on the number of nonlinear terms and the number of bias terms.
  • the number of first-type input items is the number of linear items
  • the number of second-type input items is the number of nonlinear items
  • the number of third-type input items is the number of bias items.
  • the calculation formula of the first output value of the current position is:
  • the corresponding nonlinear term values should also be added when constructing the autocorrelation coefficient matrix and the mutual correlation coefficient vector; in addition, when there is a bias term, the bias term value should also be further increased; this is set according to actual conditions and is not specifically limited here.
  • nonlinear terms in addition to using three nonlinear terms, the embodiments of the present application may also use more nonlinear terms.
  • five nonlinear terms are used in FIG. 16A , FIG. 16B , and FIG. 16C , and the positions of the five nonlinear terms are specifically five positions filled with dots.
  • the number of nonlinear terms should be a positive integer, the specific number is not limited, and different designs can be performed according to performance complexity requirements.
  • S1303 Determine a prediction value of a pixel to be predicted in the current block according to the first output value.
  • determining the predicted value of the pixel to be predicted in the current block according to the first output value may include: performing a second processing on the first output value to obtain the predicted value of the pixel to be predicted in the current block.
  • the second processing may be to set the prediction value of the to-be-predicted pixel in the current block to be equal to the first output value.
  • the second processing may be to limit the first output value within a preset value range, or it may also be referred to as a "clip operation" herein, wherein the lower limit value of the preset value range is the minimum reconstruction value (min) in the reference area, and the upper limit value of the preset value range is the maximum reconstruction value (max) in the reference area.
  • the method may also include:
  • the luminance component of the current block uses intra prediction based on the filter coefficient, determining a derived intra prediction mode of the luminance component of the current block;
  • the direct mode is set as the derived intra prediction mode to determine the prediction value of the chrominance component of the current block.
  • the derived intra-frame prediction mode may be a traditional PLANAR mode, a DC mode or an angle mode, etc., which may be specifically determined according to the aforementioned method of constructing a gradient histogram.
  • an efficient intra-frame chrominance prediction mode is used in many standards when performing intra-frame prediction.
  • the chrominance block selects to use the DM mode, the chrominance block will obtain the mode selected by the luminance block at the corresponding position for intra-frame prediction.
  • the interpolation filtering technology described in the above embodiments only works on intra-frame block prediction of luminance.
  • a direct approach is to extend the mode to chrominance, but this will result in the need to derive filter coefficients for chrominance, which will bring high computational complexity.
  • the chrominance block selects the DM mode, the DM mode will be set to the PLANAR mode for prediction.
  • a traditional prediction mode can be derived by constructing a gradient histogram. This traditional mode can be used when the chrominance mode selects the DM mode and the luminance block at the corresponding position selects the interpolation filtering mode.
  • the method may also include:
  • the reference block uses intra prediction based on filter coefficients, determining a derived intra prediction mode for the reference block;
  • the derived intra prediction mode is added to the intra prediction mode candidate list for the current block.
  • the current block satisfies a preset condition, including at least one of the following:
  • the current block is an inter-frame prediction block
  • the current block is an IBC block.
  • the IBC block and the inter-frame block are not intra-coded blocks, so they do not have an intra-frame prediction mode
  • the initial reference blocks of the IBC block and the inter-frame block are intra-frame prediction blocks.
  • the intra-frame prediction mode of the reference block is also transferred to the current block at the same time.
  • These intra-frame prediction modes are traditional intra-frame prediction modes (PLANAR, DC, angle mode). These transferred traditional intra-frame prediction modes will be used when the surrounding blocks are IBC blocks or inter-frame blocks when constructing the intra-frame prediction mode candidate list for the current block.
  • the traditional intra-frame prediction mode corresponding to the interpolation filter mode is used for transmission.
  • the method may also include:
  • a reconstructed value of the current block is determined according to the predicted value of the current block and the residual value of the current block.
  • decoding the code stream and determining the residual value of the current block may include: decoding the code stream and determining the quantization coefficient of the current block; performing inverse quantization processing on the quantization coefficient to obtain the transformation coefficient of the current block; performing inverse transformation processing on the transformation coefficient to obtain the residual value of the current block.
  • the encoder will calculate the residual value based on the original value and the predicted value, and the residual value will be further transformed and quantized to obtain the quantization coefficient, and then transmitted to the decoder through the code stream.
  • the decoder can obtain the quantization coefficient of the current block through decoding, and then obtain the residual value of the current block through inverse quantization and inverse transformation; then, the residual value of the current block and the predicted value of the current block are further added to obtain the reconstructed value of the current block.
  • performing inverse transform processing on the transform coefficients to obtain the residual value of the current block may include: when the current block uses a multi-transform selection mode and the target filtering mode is an interpolation filtering mode, determining a target transform kernel of the current block; performing inverse transform processing on the transform coefficients according to the target transform kernel to obtain the residual value of the current block.
  • the determination of the target transformation kernel may be associated with at least one of the following parameters:
  • the prediction result of the interpolation filter prediction is derived into a gradient histogram and matched to the traditional prediction mode, and the method of further selecting an inseparable transformation kernel is used.
  • the selection of the transformation kernel is the same as that of the PLANAR mode.
  • the interpolation filter mode has different characteristics from the PLANAR mode, and the selection of the basic transformation kernel should be more optimized.
  • the basic transformation can be divided into horizontal and vertical directions.
  • the transformation modes allowed in each direction include the following 7 types: ⁇ 'DCT2', 'DCT8', 'DST7', 'DCT5', 'DST4', 'DST1', 'IDTR' ⁇ .
  • DCT2, DCT8, and DCT5 are subclasses of discrete cosine transform
  • DST7, DST4, and DST1 are subclasses of discrete sine transform
  • IDTR is Identity transform, which means no transformation.
  • the most commonly used basic transform mode is DCT2 in both horizontal and vertical directions, here written as DCT2-DCT2, which is used as a transform before the inseparable secondary transform LFNST, and is also used as a transform when the multi-transform selection MTS technology is turned off.
  • DCT2-DCT2 is used as a transform before the inseparable secondary transform LFNST, and is also used as a transform when the multi-transform selection MTS technology is turned off.
  • the transform process will be a combination of the basic transforms in the horizontal and vertical directions, rather than an inseparable transform.
  • the method may further include: decoding a code stream to determine non-zero coefficient information of a current block; and determining at least one candidate transform kernel according to the non-zero coefficient information of the current block.
  • the number of at least one candidate transform kernel is less than or equal to 6. That is, in the reference software ECM, according to the characteristics of the non-zero coefficients in the current block analyzed, the current block can have at most 6 non-DCT2-DCT2 transform kernels to choose from.
  • the residual MTS basic transform kernel should be related to whether the current block selects the interpolation filtering mode. More specifically, it can be related to which interpolation filtering mode is selected and/or the size and shape of the current block.
  • determining a target transform core of a current block may include: decoding a bitstream to determine a transform core index value of the current block; and determining a target transform core of the current block from at least one candidate transform core according to the transform core index value.
  • the optional basic transform kernel of MTS is related to whether the interpolation filter prediction mode is selected for the current block. If the current block uses the interpolation filter prediction mode, the 6 optional MTS transform kernels are as follows (the transform kernel is: horizontal transform-vertical transform), as shown in Table 3.
  • a corresponding target transform core is selected from six transform cores according to the parsed MTS transform core index value for inverse transformation.
  • determining the target transform core of the current block may include: decoding a bitstream to determine a transform core index value of the current block; and determining the target transform core of the current block from at least one candidate transform core according to the transform core index value and a size parameter of the current block.
  • the optional basic transformation of MTS is related to whether the interpolation filter mode is selected for the current block and the size and shape of the current block.
  • the shape size of the current block is: height ⁇ width. In one embodiment, it can be as shown in Table 4.
  • the prediction mode of the current block is the interpolation prediction mode
  • the corresponding target transform kernel is selected for inverse transformation according to the parsed MTS transform kernel index value and the shape and size of the current block.
  • the interpolation filter prediction mode can be applied to 4 ⁇ 4 to 32 ⁇ 32 luminance blocks.
  • the method for obtaining the candidate MTS transformation core may include:
  • Step 1 encoding an image set or a video set using an encoder including an interpolation filtering prediction mode
  • Step 2 The residual value of the block with the selected interpolation filter mode is classified into possible horizontal-vertical transform kernels one by one according to the classification (e.g., the shape and size of the block, the interpolation filter mode, etc.).
  • the transform kernel selection criteria can be the size of SAD, the size of SSE, or other criteria, such as transform coding gain, which are not specifically limited here.
  • the transform coding gain is defined as the arithmetic mean transform coefficient variance divided by the geometric mean transform coefficient variance.
  • This embodiment provides a decoding method, which decodes a bit stream, determines a target filtering mode of a current block; determines a reference area of the current block according to the size parameter of the current block and the target filtering mode; then determines a filtering coefficient of the current block according to the reference area of the current block; and then performs intra-frame prediction on the current block according to the filtering coefficient to determine a prediction value of the current block.
  • the intra-frame prediction technology based on interpolation filtering is not only related to the target filtering mode when determining the reference area for calculating the filtering coefficient, but also to the size parameter of the current block.
  • a large reference area can be used when the size of the current block is large, and a small reference area can be used when the size of the current block is small.
  • the computational complexity can be reduced, the encoding time can be reduced, and the accuracy of intra-frame prediction can be improved, thereby improving the encoding and decoding performance.
  • FIG17 a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application is shown. As shown in FIG17, the method may include:
  • S1801 Determine the target filtering mode of the current block.
  • the encoding method of the embodiment of the present application may be an intra-frame prediction method, specifically referring to an improvement of an intra-frame prediction mode based on interpolation filtering to enhance the cost-effectiveness of performance and complexity.
  • the current block includes at least a first color component and a second color component.
  • the block at this time can be simply referred to as a first color component block; and when the first color component is a brightness component, the first color component block can also be referred to as a brightness block.
  • the block at this time can be simply referred to as a second color component block; and when the second color component is a chrominance component, the second color component block can also be referred to as a chrominance block.
  • the target filter mode may refer to a mode of using a target filter to perform intra-frame prediction on the current block, wherein the target filter may refer to an interpolation filter.
  • determining a target filtering mode for a current block may include:
  • the wave mode is determined as the target filtering mode for the current block.
  • the number of at least one candidate filtering mode may be determined based on the number of reference region categories of the current block and the number of shapes of the target filter.
  • the distortion value method can be used to determine the cost result, specifically, the rate-distortion cost method can be used to determine the cost result; however, it can also be the size of SAD, the size of MSE, the size of SSE or other standards for judging the cost, which are not specifically limited here.
  • the reference area category of the current block may include a first category, a second category, and a third category.
  • the method may further include:
  • the reference area category of the current block is the first category, determining that the reference area of the current block includes an upper adjacent area and a left adjacent area;
  • the reference area category of the current block is the second category, determining that the reference area of the current block includes the upper adjacent area
  • the reference area category of the current block is the third category, it is determined that the reference area of the current block includes the left adjacent area.
  • the reference area of the current block refers to the reconstructed area around the current block.
  • the upper adjacent area may refer to the reconstructed area adjacent to the upper side of the current block
  • the left adjacent area may refer to the reconstructed area adjacent to the left side of the current block.
  • the reference area category shown in FIG. 2A is the first category
  • the reference area category shown in FIG. 2B is the second category
  • the reference area category shown in FIG. 2C is the third category.
  • the shape of the target filter may include a first shape, a second shape, and a third shape, wherein the first shape may be a 4 ⁇ 4 square, the second shape may be a 2 ⁇ 8 rectangle, and the third shape may be an 8 ⁇ 2 rectangle; however, this is not specifically limited here.
  • the target filter shown in FIG. 3A is of a first shape
  • the target filter shown in FIG. 3B is of a second shape
  • the target filter shown in FIG. 3C is of a third shape.
  • the candidate filter mode for the current block can be obtained by combining three reference area categories and three target filter shapes.
  • nine candidate filter modes can be combined here in total, and the target filter mode is one of the nine candidate filter modes.
  • S1802 Determine a reference area of the current block according to a size parameter of the current block and a target filtering mode.
  • the reference area of the current block can be determined in combination with the size parameter of the current block, where the size parameter of the current block can include the height and width of the current block.
  • the size of the reference area of the current block is associated with the shape and minimum parameters of the target filter. Simply put, if the size of the current block is large, a large reference area can be used; if the size of the current block is small, a small reference area can be used. Among them, the number of rows and columns of the reference area can be derived according to the size of the current block. Exemplarily, as shown in Figures 12A, 12B, and 12C, the area in the dotted box is the reference area of the current block, which depends on the shape of the target filter used by the current block and the size of the variable tplSize.
  • the size of the variable tplSize is equal to the smaller value of the width and height of the current block. For example, for a 4 ⁇ 8 current block, the value of the variable tplSize is 4; for a 16 ⁇ 16 current block, the value of the variable tplSize is 16.
  • the enabling of the filtering mode can also be limited according to the size parameters of the current block.
  • the method may also include:
  • the reference area category of the current block is prohibited from being the third category, and the number of reference area categories of the current block is determined based on other reference area categories except the third category.
  • the value of the first factor may be a first preset constant.
  • the value of the first factor may be set to 2, but this is not specifically limited.
  • the reference area category of the current block can be disabled as the second category, that is, it is prohibited to use the upper adjacent area of the current block to calculate the filter coefficient.
  • the reference area category in the target prediction mode can only be the first category or the third category; if the ratio of the width to the height of the current block is greater than the first factor, that is, the height of the current block and the multiple of the first factor are less than the width of the current block, then the current block can be disabled.
  • the reference area category of the block is the third category, that is, it is forbidden to use the left adjacent area of the current block to calculate the filter coefficient.
  • the reference area category in the target prediction mode can only be the first category or the second category.
  • the number of candidate filter modes will be reduced accordingly. For example, if the reference area category of the current block is disabled as the second category (i.e., the use of the upper adjacent area of the current block for calculating the filter coefficient is prohibited), the number of candidate filter modes will be reduced to six. In other words, since some interpolation filter modes are restricted according to the ratio of the width to the height of the current block (referred to as "aspect ratio"), the number of candidate filter modes allowed to be used under different aspect ratios is different; therefore, encoding of the target filter mode can be performed based on the context model.
  • the method may further include: encoding the target filtering mode of the current block, and writing the obtained encoding bits into a bitstream.
  • encoding the target filtering mode of the current block and writing the obtained coded bits into the bitstream may include: determining a context model of the current block; encoding the target filtering mode of the current block based on the context model, and writing the obtained coded bits into the bitstream.
  • the determination of the context model is associated with at least one of the following parameters:
  • the ratio of the width to the height of the current block is the ratio of the width to the height of the current block.
  • the selection of a context model may be related to factors such as the shape and aspect ratio of the current block.
  • factors such as the shape and aspect ratio of the current block.
  • the selection of a context model may be related to factors such as the shape and aspect ratio of the current block.
  • there are multiple context models in the decoding end and which context model to use for decoding may be determined based on factors such as the shape and aspect ratio of the current block.
  • the reason is that for a current block of narrow shape, since there may be fewer interpolation filter modes to select, the length of the codeword required to indicate a selected interpolation filter mode is short; while current blocks of other shapes allow different numbers of interpolation filter modes to be selected, and the length of the codeword required to indicate a certain interpolation filter mode is also long, which makes the probability of selecting an interpolation filter mode under different shapes different.
  • different probabilities require the selection of different context models, and here different context model indexes can be used to determine which specific context model is used.
  • the target prediction mode can be encoded according to the context model, so that the target prediction mode of the current block can be obtained by decoding the bit stream at the decoding end according to the context model selected according to the shape of the current block.
  • the target filtering mode may include the reference area category of the current block and the shape of the target filter.
  • the target filtering mode may be written into the bitstream via the first syntax element identification information. That is, in some embodiments, the value of the first syntax element identification information is determined; the value of the first syntax element identification information is encoded based on the context model, and the obtained encoded bits are written into the bitstream.
  • determining the value of the first syntax element identification information may include: if the current block uses a target filtering mode for prediction encoding, determining the value of the first syntax element identification information to be a first value; if the current block uses a non-target filtering mode for prediction encoding, determining the value of the first syntax element identification information to be a second value.
  • the first value is different from the second value, and the first value and the second value can be in parameter form or in digital form.
  • the first syntax element identification information can be a parameter written in the profile or a value of a flag, which is not specifically limited here.
  • the first value can be set to 1 and the second value can be set to 0; or, the first value can be set to 0 and the second value can be set to 1; or, the first value can be set to true and the second value can be set to false; or, the first value can be set to false and the second value can be set to true.
  • the first value is set to 1 and the second value is set to 0, but this is not specifically limited.
  • the decoding end can subsequently determine whether the prediction mode of the current block is the target prediction mode by parsing the value of the first syntax element identification information. Exemplarily, if the value of the first syntax element identification information obtained by parsing is 1, then it can be determined that the prediction mode of the current block is the target prediction mode. In this way, not only the prediction accuracy can be improved, but also the computational complexity can be reduced.
  • S1803 Determine a filter coefficient of the current block according to a reference area of the current block.
  • the reference area of the current block can be classified and divided to construct an autocorrelation coefficient matrix and a cross-correlation coefficient vector that do not contain repeated areas, so that the encoding end can derive the filter coefficients under each combination mode.
  • the method may also include:
  • the first candidate sub-reference region is any one of the multiple candidate sub-reference regions.
  • determining the autocorrelation coefficient matrix and the cross-correlation coefficient vector of the first candidate sub-reference region may specifically include: According to the shapes of the first candidate sub-reference region and the target filter, the input value of the target filter and the output value of the target filter corresponding to at least one reference pixel in the first candidate sub-reference region are determined; according to the input value of the target filter corresponding to at least one reference pixel, the autocorrelation coefficient matrix of the first candidate sub-reference region is determined; according to the input value of the target filter and the output value of the target filter corresponding to at least one reference pixel, the cross-correlation coefficient vector of the first candidate sub-reference region is determined. In this way, the autocorrelation coefficient matrix and the cross-correlation coefficient vector of each of the multiple candidate sub-reference regions can be determined.
  • the encoder needs to select from 9 combinations of 3 reference areas and 3 filter shapes. When a certain combination is selected, the corresponding syntax element identification information will be written into the bitstream; then, if the decoder parses and finds that a certain combination is selected, only one filter coefficient needs to be derived. This makes the complexity of the technology at the encoder much higher than that at the decoder.
  • the reference region of the current block can be divided into R0, R1 and R2.
  • the reference region of the current block can be divided into R0 and R1.
  • the reference region of the current block can be divided into R0 and R2.
  • f 0 , f 1 , and f 2 are used to represent three filter shapes, and R all , R top , and R left are used to represent three reference regions.
  • the autocorrelation coefficient matrix and the cross-correlation coefficient vector under the nine combinations can be written as follows:
  • A represents the autocorrelation coefficient matrix
  • Y represents the cross-correlation coefficient vector
  • R all , R top , and R left can all be composed of R 0 , R 1 , and R 2 , the above 9 combinations can be further decomposed into:
  • determining the filter coefficient of the current block according to the reference area of the current block may include: dividing the reference area of the current block to determine at least one sub-reference area; obtaining the autocorrelation coefficient matrix and cross-correlation coefficient vector of each of the at least one sub-reference area from a preset buffer; determining the coefficient of the target filter according to the autocorrelation coefficient matrix and cross-correlation coefficient vector of each of the at least one sub-reference area; and determining the coefficient of the target filter as the filter coefficient of the current block.
  • the encoding end when the encoding end derives the filter coefficients based on the current combination and performs rate-distortion optimization, each time an autocorrelation coefficient matrix and a cross-correlation coefficient vector that have not been constructed are encountered, they need to be cached for use in subsequent other combinations; thereby reducing the computational complexity of the encoding end.
  • S1804 Perform intra-frame prediction on the current block according to the filter coefficients to determine a prediction value of the current block.
  • intra-frame prediction is performed on pixels in the current block according to the filter coefficient to determine the predicted value of the pixels in the current block, which may include: determining a reference sample value corresponding to the pixel to be predicted in the current block; determining the predicted value of the pixel to be predicted in the current block according to the reference sample value and the filter coefficient corresponding to the pixel to be predicted in the current block.
  • determining the reference sample value corresponding to the pixel to be predicted in the current block may include: based on the shape of the target filter, if the reference sample value is located in a reference area of the current block, determining the reconstructed value at the corresponding position in the reference area as the reference sample value; if the reference sample value is located inside the current block, determining the predicted value at the corresponding position in the current block as the reference sample value.
  • the target filter that is, the reference sample value corresponding to the pixel to be predicted in the current block
  • the reconstructed value is used as the input of the target filter; or, if the corresponding position is in the current block, then the predicted value that has been predicted is used as the input of the target filter.
  • the interpolation filtering is predicted in the diagonal direction; and the pixels to be predicted on the same diagonal line can be predicted in parallel, as shown in FIG. 5 for details.
  • determining the predicted value of the pixel to be predicted in the current block according to the reference sample value and the filter coefficient corresponding to the pixel to be predicted in the current block may include:
  • a prediction value of a pixel to be predicted in the current block is determined.
  • determining the first input value of the target filter based on the reference sample value corresponding to the pixel to be predicted in the current block may include: determining a second factor; performing a subtraction operation on the reference sample value and the second factor to obtain the first input value of the target filter.
  • determining the first output value of the target filter based on the first input value and the filter coefficient may include: determining the second output value of the target filter based on the first input value and the filter coefficient; performing a first processing on the second output value to determine the first output value of the target filter.
  • determining the second output value of the target filter based on the first input value and the filter coefficient may include: calculating the product of the first input value and the corresponding filter coefficient; setting the second output value of the target filter to be equal to the sum of n products; wherein n represents the number of input items corresponding to the target filter, and n is a positive integer.
  • the reference sample value corresponding to the pixel r to be predicted in the current block can be
  • the second output value of the target filter is represented by P out1 , as shown in the following formula:
  • performing the first processing on the second output value to determine the first output value of the target filter may include: performing an addition operation on the second output value and the second factor to obtain the first output value of the target filter.
  • the first output value of the target filter can be represented by P out2 , where:
  • the value of the second factor may be a second preset constant.
  • the method may further include: determining a reconstruction value of at least one reference pixel in the reference area; performing mean calculation on the reconstruction value of at least one reference pixel to obtain a first mean; and setting the value of the second factor to be equal to the first mean.
  • the second factor may be obtained by calculating the mean value of the reconstructed values in the reference area, or may be a preset constant, or may even be a specific value, such as the reconstructed value of the upper left corner of the current block, which is not specifically limited here.
  • the second factor is the mean value of the reference area
  • the input of the target filter needs to subtract the mean value
  • the output of the target filter needs to add the mean value to serve as the final prediction result.
  • performing a first processing on the second output value to determine the first output value of the target filter may include: determining the third output value of the target filter; determining the fourth output value of the target filter based on the second output value and the third output value; and adding the fourth output value and the second factor to obtain the first output value of the target filter.
  • the number of input items includes not only the number of linear items, but also the number of nonlinear items and/or the number of bias items.
  • the third output value can be calculated based on the number of nonlinear items and/or the number of bias items
  • the second output value can be calculated based on the number of linear items.
  • the second output value of the target filter it can be specifically: calculate the product of the first input value and the corresponding filter coefficient; set the second output value of the target filter to be equal to the sum of n products; wherein n represents the number of first type input items corresponding to the target filter, and n is a positive integer.
  • the third output value is calculated based on the number of nonlinear terms.
  • determining the third output value of the target filter may include: determining the number of first-type input terms corresponding to the target filter based on the shape of the target filter; if the number of first-type input terms corresponding to the target filter is p, determining p+q filter coefficients of the target filter, where p and q are both positive integers; A third output value of the target filter is determined according to q filter coefficients among the p+q filter coefficients and q second type input items.
  • the third output value is calculated based on the number of bias items.
  • determining the third output value of the target filter may include: determining the number of first-type input items corresponding to the target filter based on the shape of the target filter; if the number of first-type input items corresponding to the target filter is p, then determining p+m filter coefficients of the target filter, where p and m are both positive integers; and determining the third output value of the target filter based on m filter coefficients and m third-type input items among the p+m filter coefficients.
  • the third output value is calculated based on the number of nonlinear terms and the number of bias terms.
  • the number of first-type input items is a linear number of items
  • the number of second-type input items is a nonlinear number of items
  • the number of third-type input items is a biased number of items.
  • the linear items of 15 taps are grid filling positions
  • the nonlinear items of 3 taps are dot filling positions
  • the black filling positions represent the current positions to be predicted.
  • the calculation formula of the first output value of the current position is:
  • the corresponding nonlinear term values should also be added when constructing the autocorrelation coefficient matrix and the mutual correlation coefficient vector; in addition, when there is a bias term, the bias term value should also be further increased; this is set according to actual conditions and is not specifically limited here.
  • Figures 15A, 15B, and 15C can also be shown in Figures 15A, 15B, and 15C. Compared with Figures 14A, 14B, and 14C, Figures 15A, 15B, and 15C all add three nonlinear terms, but since different filter shapes use the same nonlinear terms, the calculation is simpler, further reducing the complexity.
  • the embodiment of the present application can also use more nonlinear terms, for example, 5 nonlinear terms are used in FIG. 16A, FIG. 16B, and FIG. 16C, and the positions of the 5 nonlinear terms are specifically five positions filled with dots.
  • the number of nonlinear terms should be a positive integer, the specific number is not limited, and different designs can be performed according to the performance complexity requirements.
  • the predicted value of the pixel to be predicted in the current block can be determined based on the first output value, which can specifically include: performing a second processing on the first output value to obtain the predicted value of the pixel to be predicted in the current block.
  • the second processing may be to set the prediction value of the to-be-predicted pixel in the current block to be equal to the first output value.
  • the second processing may be to limit the first output value within a preset value range, or it may also be referred to as a "clip operation" herein, wherein the lower limit value of the preset value range is the minimum reconstruction value (min) in the reference area, and the upper limit value of the preset value range is the maximum reconstruction value (max) in the reference area.
  • the method may also include:
  • the luminance component of the current block uses intra prediction based on the filter coefficient, determining a derived intra prediction mode of the luminance component of the current block;
  • the direct mode is set as the derived intra prediction mode to determine the prediction value of the chrominance component of the current block.
  • the derived intra-frame prediction mode may be the traditional PLANAR mode, DC mode or The angle mode, etc. can be specifically determined according to the aforementioned method of constructing the gradient histogram.
  • an efficient intra-frame chrominance prediction mode is used in many standards when performing intra-frame prediction.
  • the chrominance block selects to use the DM mode, the chrominance block will obtain the mode selected by the luminance block at the corresponding position for intra-frame prediction.
  • the interpolation filtering technology described in the above embodiments only works on intra-frame block prediction of luminance.
  • a direct approach is to extend the mode to chrominance, but this will result in the need to derive filter coefficients for chrominance, which will bring high computational complexity.
  • the chrominance block selects the DM mode, the DM mode will be set to the PLANAR mode for prediction.
  • a traditional prediction mode can be derived by constructing a gradient histogram. This traditional mode can be used when the chrominance mode selects the DM mode and the luminance block at the corresponding position selects the interpolation filtering mode.
  • the method may also include:
  • the reference block uses intra prediction based on filter coefficients, determining a derived intra prediction mode for the reference block;
  • the derived intra prediction mode is added to the intra prediction mode candidate list for the current block.
  • the current block satisfies a preset condition, including at least one of the following:
  • the current block is an inter-frame prediction block
  • the current block is an IBC block.
  • IBC blocks and inter-frame blocks they are not intra-coded blocks, so they do not have intra-frame prediction modes, and the initial reference blocks of IBC blocks and inter-frame blocks are intra-frame prediction blocks.
  • the intra-frame prediction mode of the reference block is also transferred to the current block at the same time.
  • These intra-frame prediction modes are traditional intra-frame prediction modes (PLANAR, DC, angle mode).
  • PLANAR, DC, angle mode traditional intra-frame prediction modes
  • These transferred traditional intra-frame prediction modes will be used when the surrounding blocks are IBC blocks or inter-frame blocks when constructing the intra-frame prediction mode candidate list for the current block. In this way, when the position of the IBC block or inter-frame block reference is the interpolation filter mode, the traditional intra-frame prediction mode corresponding to the interpolation filter mode is used for transmission.
  • the method may further include:
  • S2004 Encode the quantization coefficients of the current block, and write the obtained coded bits into the bitstream.
  • determining the residual value of the current block may include: determining the original value of the current block; determining the residual value of the current block according to the original value of the current block and the predicted value of the current block. Then, encoding the residual value of the current block, and writing the obtained coded bits into the bitstream.
  • the residual value of the current block can be determined by performing a subtraction operation based on the original value of the current block and the predicted value of the current block.
  • the residual value needs to be transformed and quantized first, and the obtained quantization coefficient is written into the bit stream, and then transmitted to the decoding end through the bit stream.
  • transforming the residual value to obtain the transform coefficient of the current block may include: when the current block uses a multi-transform selection mode and the target filtering mode is an interpolation filtering mode, determining the target transform kernel of the current block; transforming the residual value according to the target transform kernel to obtain the transform coefficient of the current block.
  • the determination of the target transformation kernel may be associated with at least one of the following parameters:
  • the prediction result of the interpolation filter prediction is derived into a gradient histogram and matched to the traditional prediction mode, and the method of further selecting an inseparable transformation kernel is used.
  • the selection of the transformation kernel is the same as that of the PLANAR mode.
  • the interpolation filter mode has different characteristics from the PLANAR mode, and the selection of the basic transformation kernel should be more optimized.
  • the basic transformation can be divided into horizontal and vertical directions.
  • the transformation modes allowed in each direction include the following 7 types: ⁇ 'DCT2', 'DCT8', 'DST7', 'DCT5', 'DST4', 'DST1', 'IDTR' ⁇ .
  • DCT2, DCT8, and DCT5 are subclasses of discrete cosine transform
  • DST7, DST4, and DST1 are subclasses of discrete sine transform
  • IDTR is Identity transform, which means no transformation.
  • DCT2 in both horizontal and vertical directions, written here as DCT2-DCT2, which is used as a transform before the inseparable secondary transform LFNST and is also used in the multi-transform selection MTS technology.
  • DCT2-DCT2 is used as a transform before the inseparable secondary transform LFNST and is also used in the multi-transform selection MTS technology.
  • MTS mode the transformation process will be a combination of the basic transformations in the horizontal and vertical directions, rather than an inseparable transformation.
  • the method may further include: determining non-zero coefficient information of the current block; and determining at least one candidate transform kernel according to the non-zero coefficient information of the current block.
  • the number of at least one candidate transform kernel is less than or equal to 6. That is, in the reference software ECM, according to the characteristics of the non-zero coefficients in the current block determined after transformation and quantization, the current block can have at most 6 non-DCT2-DCT2 transform kernels to choose from.
  • the residual MTS basic transform kernel should be related to whether the current block selects the interpolation filtering mode. More specifically, it can be related to which interpolation filtering mode is selected and/or the size and shape of the current block.
  • determining the target transformation core of the current block may include: determining at least one candidate transformation core; performing cost calculation on the at least one candidate transformation core to determine the cost result of the at least one candidate transformation core; determining the minimum cost result from the cost results of the at least one candidate transformation core, and determining the candidate transformation core corresponding to the minimum cost result as the target transformation core of the current block.
  • the cost result can be determined by using a distortion value, specifically, the cost result can be determined by using a rate-distortion cost; however, it can also be the size of the SAD, the size of the MSE, the size of the SSE or other judgment criteria, such as the transform coding gain, which is not specifically limited here.
  • the method may further include: determining a transform core index value of a current block, wherein the transform core index value is used to indicate an index number of a target transform core in at least one candidate transform core; encoding the transform core index value of the current block, and writing the resulting encoded bits into a bitstream.
  • the optional basic transform kernel of MTS is related to whether the interpolation filter prediction mode is selected for the current block. If the current block uses the interpolation filter prediction mode, the 6 optional MTS transform kernels are as follows (the transform kernel is: horizontal transform-vertical transform), as shown in Table 3.
  • the MTS transform core index value can be determined and written into the bitstream; so that the subsequent decoding end can select the corresponding target transform core from the six transform cores for inverse transformation according to the parsed MTS transform core index value.
  • the method may further include: determining a transform core index value of the current block, wherein the transform core index value is used to indicate an index number of a target transform core in at least one candidate transform core, and at least one candidate transform core has an associated relationship with a size parameter of the current block; encoding the transform core index value of the current block, and writing the resulting encoded bits into a bitstream.
  • the optional basic transform kernel of the MTS is related to whether the interpolation filter mode is selected for the current block and the size and shape of the current block; as shown in Table 4.
  • the shape size of the current block is: height ⁇ width.
  • the MTS transform kernel index value can be determined in combination with the size parameter of the current block and written into the bitstream; so that the subsequent decoding end can select the corresponding target transform kernel for inverse transformation according to the parsed MTS transform kernel index value and the shape and size of the current block.
  • the interpolation filter prediction mode can be applied to luminance blocks of 4 ⁇ 4 to 32 ⁇ 32.
  • the method for obtaining the candidate MTS transformation core may include:
  • Step 1 encoding an image set or a video set using an encoder including an interpolation filtering prediction mode
  • Step 2 The residual value of the block with the selected interpolation filter mode is classified into possible horizontal-vertical transform kernels one by one according to the classification (e.g., the shape and size of the block, the interpolation filter mode, etc.).
  • the transform kernel selection criteria can be the size of SAD, the size of SSE, or other criteria, such as transform coding gain, which are not specifically limited here.
  • the transform coding gain is defined as the arithmetic mean transform coefficient variance divided by the geometric mean transform coefficient variance.
  • an embodiment of the present application further provides a code stream, which is generated by bit encoding according to the information to be encoded; wherein the information to be encoded includes at least one of the following:
  • the target filtering mode of the current block the residual value of the current block, and the transform kernel index value of the current block.
  • the target filter mode of the current block when writing the bitstream, can also be written into the bitstream by taking the value of the first syntax element identification information.
  • the residual value of the current block can also be the quantization coefficient obtained after the residual value is transformed and quantized, and written into the bitstream.
  • the encoding end In order to facilitate the decoding end to quickly determine the target transform kernel used, the encoding end also needs to write the transform kernel index value of the current block into the bitstream; thereby improving the encoding and decoding efficiency.
  • This embodiment provides a coding method, which determines the target filtering mode of the current block; determines the reference area of the current block according to the size parameter of the current block and the target filtering mode; then determines the filter coefficient of the current block according to the reference area of the current block; and then performs intra-frame prediction on the current block according to the filter coefficient to determine the prediction value of the current block.
  • the intra-frame prediction technology based on interpolation filtering is not only related to the target filtering mode, but also to the size parameters of the current block, such as the size of the current block.
  • a large reference area can be used, and when the size of the current block is small, a small reference area can be used; in this way, the computational complexity can be reduced and the encoding time can be reduced; at the same time, the intra-frame prediction accuracy can be improved, thereby improving the encoding and decoding performance.
  • the intra-frame prediction mode based on interpolation filtering is improved, and the improvements are described in detail from several aspects below.
  • the reference area always uses a reconstructed area composed of 13 rows and/or 13 columns of reconstructed pixel values, which results in much higher computational complexity on small blocks than on large blocks.
  • the encoder needs to decide the division of the blocks, and increasing the amount of calculation for small blocks is more likely to lead to an increase in encoding time.
  • an embodiment of the present application proposes that large blocks use a large reference area and small blocks use a small reference area, and the number of rows and columns of the reference area can be derived according to the size of the block. See Figures 12A, 12B, and 12C above for details.
  • interpolation filter mode when encoding and decoding the interpolation filter mode, some interpolation filter sub-modes are restricted according to the aspect ratio, so that the number of interpolation filter sub-modes allowed to be used under different aspect ratios is different. Therefore, when parsing the syntax element identifier of the interpolation filter, the selection of its context model should be related to the shape of the block and the aspect ratio factor. It should be noted that, assuming that three reference area categories and three filter shapes can form nine interpolation filter modes, each of which can be regarded as an interpolation filter sub-mode; in other words, the interpolation filter mode can include nine interpolation filter sub-modes.
  • the reference areas can be classified and divided to construct an autocorrelation coefficient matrix and a cross-correlation coefficient vector that do not contain repeated areas, so as to be used by the encoding end to derive the filter coefficients of each combination.
  • the interpolation filter prediction technology determines the shape of the interpolation filter selected by the current block and the reference area category by parsing relevant syntax elements at the decoding end, traverses each position in the reference area to construct an autocorrelation coefficient matrix and a cross-correlation coefficient vector, and solves the equation group to obtain the filter coefficient.
  • t represents the reconstructed pixel value
  • r represents the coordinate position of the reference area
  • p 0 ...p N-1 represents the coordinate relationship relative to position r
  • the relative coordinates they refer to are the relative coordinate relationship between the input position and the output position of the interpolation filter.
  • c 0 ...c N-1 are the filter coefficients to be solved
  • m is a value subtracted from the input of the interpolation filter (a value added to the output at this time).
  • the encoding end needs to screen from a total of 9 combinations of 3 reference areas and 3 filter shapes.
  • the corresponding syntax element is encoded into the bit stream. If the decoding end parses out that a certain combination is selected, the filter coefficient only needs to be derived once; this makes the complexity of the technology at the encoding end much higher than that at the decoding end.
  • FIG. 2A, FIG. 2B and FIG. 2C they are all composed of three parts, R0, R1 and R2, as shown in FIG. 18A, FIG. 18B and FIG. 18C.
  • f 0 , f 1 , f 2 are used to represent three filter shapes
  • R all , R top , R left are used to represent three reference regions.
  • the autocorrelation coefficient matrix and the cross-correlation coefficient vector under the 9 combinations can be written as follows:
  • A represents the autocorrelation coefficient matrix and Y represents the cross-correlation coefficient vector.
  • R all , R top , and R left can all be composed of R 0 , R 1 , and R 2 , the above 9 combinations can be further decomposed into:
  • the encoder when the encoder derives filter coefficients based on the current combination and performs rate-distortion optimization, each time it encounters an unconstructed autocorrelation coefficient matrix and cross-correlation coefficient vector, it needs to cache them for use in subsequent other combinations; thereby reducing the computational complexity of the encoding end.
  • the DM mode is an efficient intra-frame chrominance prediction mode used in many standards for prediction.
  • the chrominance block selects the DM mode, the chrominance block will obtain the mode selected by the luminance block at the corresponding position for intra-frame prediction.
  • the interpolation filtering technology described in the aforementioned embodiment only acts on the prediction of intra-frame blocks of luminance. A direct approach is to expand the mode to chrominance, but this will cause the chrominance to also need to derive filtering parameters, which will bring high computational complexity. In the related art, there is no interpolation filtering prediction mode for chrominance.
  • the DM mode When the DM mode is selected for the chrominance intra-frame block, the DM mode will be set to the PLANAR mode.
  • a traditional prediction mode can be derived by constructing a gradient histogram. This traditional mode can be used when the chrominance mode selects the DM mode and the luminance block at the corresponding position selects the interpolation filter mode.
  • IBC blocks and inter-frame blocks they are not intra-coded blocks, so they do not have intra-frame prediction modes, and the initial reference blocks of IBC blocks and inter-frame blocks are intra-frame prediction blocks.
  • the intra-frame prediction mode of the reference block is also transferred to the current block at the same time.
  • These intra-frame prediction modes are traditional intra-frame prediction modes (PLANAR, DC, angle mode). These transferred traditional intra-frame prediction modes are used when the surrounding blocks are IBC blocks or inter-frame blocks when constructing the intra-frame prediction mode candidate list for the current block.
  • the technology for constructing an intra prediction candidate list may include the following:
  • Intra-coded blocks These blocks can use a range of intra prediction techniques, such as spatial geometric partitioning mode (SGPM), template-based multiple reference line intra prediction (TMRL), most probable mode (MPM), and template-based intra mode derivation (TIMD);
  • SGPM spatial geometric partitioning mode
  • TMRL template-based multiple reference line intra prediction
  • MPM most probable mode
  • TMD template-based intra mode derivation
  • IBC Intra block copy
  • the traditional mode corresponding to the interpolation filter mode is used for transmission.
  • the encoder After the current block is predicted, the encoder will calculate the residual value by dividing the predicted value with the original value. The residual value will be further transformed and quantized. At the decoder, the quantization coefficient parsed from the bitstream will be inverse quantized and inverse transformed to obtain the reconstructed residual value. The reconstructed residual value is added to the predicted value to obtain the reconstructed value.
  • the above-mentioned embodiment introduces a method of deriving a gradient histogram from the interpolation filter prediction result and matching it to the traditional prediction mode, and further selecting an inseparable transformation kernel.
  • the selection of the transformation kernel is the same as that of the PLANAR mode.
  • the interpolation filter mode has different characteristics from the PLANAR mode, and the selection of the basic transformation kernel should be more optimized.
  • the basic transform is divided into horizontal and vertical directions, and the allowed transform modes in each direction include the following 7 types: ⁇ 'DCT2', 'DCT8', 'DST7', 'DCT5', 'DST4', 'DST1', 'IDTR' ⁇ .
  • DCT2, DCT8, DCT5 are several subclasses of discrete cosine transform
  • DST7, DST4, DST1 are several subclasses of discrete sine transform
  • IDTR is Identity transform, which means no transform.
  • the most commonly used basic transform mode is DCT2 in both horizontal and vertical directions, written as DCT2-DCT2. It is used as a transform before the inseparable secondary transform LFNST, and is also used as a transform when the multi-transform selection (MTS) technology is turned off.
  • MTS multi-transform selection
  • the transform process will be a combination of basic transforms in the horizontal and vertical directions, rather than an inseparable transform.
  • the current block can have up to 6 non-DCT2-DCT2 transform cores to select.
  • the residual MTS basic transform kernel should be related to whether the interpolation filtering mode is selected for the current block. More specifically, it may be related to which sub-mode of the interpolation filtering mode is selected and/or the size and shape of the current block.
  • the embodiments of the present application provide two implementations of basic change core candidates that can be used under the current MTS design of ECM.
  • the MTS optional basic transform kernel is related to whether the interpolation filter prediction mode is selected for the current block. If the current block uses the interpolation filter prediction mode, the six MTS transform kernels are as follows (the transform kernel is: horizontal transform-vertical transform). See Table 3 for details. When MTS is selected and the prediction mode of the current block is the interpolation prediction mode, the corresponding target transform kernel is selected from the six transform kernels according to the parsed MTS transform kernel index value for inverse transformation.
  • the optional basic transform kernel of MTS is related to whether the interpolation filter mode is selected for the current block and the size and shape of the current block.
  • the shape and size of the block are: height ⁇ width.
  • the corresponding target transform kernel is selected for inverse transformation according to the parsed MTS transform kernel index value and the shape and size of the block.
  • the interpolation filter prediction mode can be applied to luminance blocks of 4 ⁇ 4 to 32 ⁇ 32.
  • the method for obtaining the candidate MTS transformation core may include:
  • Step 1 Encode a set of images or a set of videos using an encoder that includes an interpolation filter prediction mode
  • Step 2 The residuals of the blocks with the selected interpolation filter mode are classified into possible horizontal-vertical transform kernels one by one according to the categories (e.g., block shape and size, interpolation filter mode).
  • the transform kernel selection criteria can be the size of SAD, the size of SSE, or other metrics, such as transform coding gain.
  • Transform coding gain is defined as the arithmetic mean of the transform coefficient variance divided by the geometric mean of the transform coefficient variance.
  • the prediction of the interpolation filtering does not contain nonlinear terms or bias terms.
  • nonlinear terms or bias terms can also be added to the interpolation filtering.
  • the 15 linear terms used in this implementation process are three cases as shown in Figures 3A, 3B and 3C.
  • the linear terms of the 15 taps of the interpolation filter are grid filling positions, and the black filling position is the current position to be predicted.
  • 3 tap nonlinear terms can be added, and the reconstructed pixel positions used by the nonlinear terms are shown in Figures 14A, 14B and 14C, specifically three dot filling positions.
  • the calculation formula of the prediction value is as follows:
  • the corresponding nonlinear term value should also be increased when constructing the autocorrelation coefficient matrix and the mutual correlation coefficient vector; and/or, when there is a bias term, the bias term value should also be further increased when constructing the autocorrelation coefficient matrix and the mutual correlation coefficient vector.
  • 3 tap nonlinear terms are added to the 15 tap linear terms of the target filter, as shown in FIG.
  • the nonlinear term is specifically three positions filled with dots, and the black filled position indicates the current position to be predicted.
  • FIG15A, FIG15B, and FIG15C all add three nonlinear terms compared to FIG14A, FIG14B, and FIG14C, but because different filter shapes use the same nonlinear term, the calculation is simpler, further reducing the complexity.
  • the embodiment of the present application can also use more nonlinear terms, for example, 5 nonlinear terms are used in FIG. 16A, FIG. 16B, and FIG. 16C.
  • 5 nonlinear terms are used in FIG. 16A, FIG. 16B, and FIG. 16C.
  • the number of nonlinear terms should be a positive integer, the specific number is not limited, and different designs can be performed according to the performance complexity requirements.
  • the encoder 220 may include a first determination unit 2201 and a first prediction unit 2202, wherein:
  • the first determining unit 2201 is configured to determine a target filtering mode of the current block; and determine a reference area of the current block according to a size parameter of the current block and the target filtering mode;
  • the first prediction unit 2202 is configured to determine a filter coefficient of the current block according to a reference area of the current block; and perform intra-frame prediction on the current block according to the filter coefficient to determine a prediction value of the current block.
  • the first determination unit 2201 is further configured to determine at least one candidate filtering mode; perform cost calculation on at least one candidate filtering mode to determine the cost result of at least one candidate filtering mode; and determine the minimum cost result from the cost results of at least one candidate filtering mode, and determine the candidate filtering mode corresponding to the minimum cost result as the target filtering mode of the current block.
  • the number of at least one candidate filtering mode is determined based on the number of reference region categories of the current block and the number of shapes of the target filter.
  • the target filtering mode includes a reference region category of the current block and a shape of a target filter.
  • the first determination unit 2201 is further configured to, if the reference area category of the current block is the first category, determine that the reference area of the current block includes an upper adjacent area and a left adjacent area; if the reference area category of the current block is the second category, determine that the reference area of the current block includes an upper adjacent area; if the reference area category of the current block is the third category, determine that the reference area of the current block includes a left adjacent area; wherein the upper adjacent area refers to a reconstructed area adjacent to the upper side of the current block, and the left adjacent area refers to a reconstructed area adjacent to the left side of the current block.
  • the size parameters of the current block include the height and width of the current block; the first determination unit 2201 is further configured to determine the minimum parameter from the height and width of the current block; and determine the reference area of the current block based on the minimum parameter and the target filtering mode.
  • the size of the reference area of the current block has an associated relationship with the shape and minimum parameter of the target filter.
  • the first determination unit 2201 is further configured to, if the width of the current block and the multiple of the first factor are smaller than the height of the current block, prohibit the reference area category of the current block from being the second category, and determine that the number of reference area categories of the current block is determined based on reference area categories other than the second category; if the height of the current block and the multiple of the first factor are smaller than the width of the current block, prohibit the reference area category of the current block from being the third category, and determine that the number of reference area categories of the current block is determined based on reference area categories other than the third category.
  • the value of the first factor is a first preset constant.
  • the encoder 220 may further include an encoding unit 2203 configured to encode a target filtering mode of a current block and write the obtained encoded bits into a bitstream.
  • the first determining unit 2201 is further configured to determine a context model of the current block
  • the encoding unit 2203 is further configured to encode the target filtering mode of the current block based on the context model, and write the obtained encoding bits into the bitstream.
  • the determination of the context model is associated with at least one of the following parameters:
  • the ratio of the width to the height of the current block is the ratio of the width to the height of the current block.
  • the first determination unit 2201 is further configured to determine multiple candidate sub-reference areas of the current block, and the multiple candidate sub-reference areas do not overlap with each other; determine the autocorrelation coefficient matrices and mutual correlation coefficient vectors of the multiple candidate sub-reference areas according to the shapes of the multiple candidate sub-reference areas and the target filter; and store the autocorrelation coefficient matrices and mutual correlation coefficient vectors of the multiple candidate sub-reference areas in a preset cache area.
  • the first determining unit 2201 is further configured to, based on the shape of the first candidate sub-reference region and the target filter, Determine an input value of a target filter and an output value of the target filter corresponding to at least one reference pixel in a first candidate sub-reference area; determine an autocorrelation coefficient matrix of the first candidate sub-reference area based on the input value of the target filter corresponding to at least one reference pixel; and determine a mutual correlation coefficient vector of the first candidate sub-reference area based on the input value of the target filter and the output value of the target filter corresponding to at least one reference pixel; wherein the first candidate sub-reference area is any one of a plurality of candidate sub-reference areas.
  • the first determination unit 2201 is further configured to divide the reference area of the current block to determine at least one sub-reference area; obtain the autocorrelation coefficient matrix and mutual correlation coefficient vector of at least one sub-reference area from a preset cache area; determine the coefficients of the target filter based on the autocorrelation coefficient matrix and mutual correlation coefficient vector of at least one sub-reference area; and determine the coefficients of the target filter as the filter coefficients of the current block.
  • the first determining unit 2201 is further configured to determine a reference sample value corresponding to a pixel to be predicted in the current block;
  • the first prediction unit 2202 is further configured to determine a prediction value of a pixel to be predicted in the current block according to a reference sample value and a filter coefficient corresponding to the pixel to be predicted in the current block.
  • the first determination unit 2201 is further configured to, based on the shape of the target filter, determine the reconstructed value at the corresponding position in the reference area as the reference sample value if the reference sample value is located in the reference area of the current block; and determine the predicted value at the corresponding position in the current block as the reference sample value if the reference sample value is located inside the current block.
  • the first prediction unit 2202 is further configured to determine a first input value of the target filter based on a reference sample value corresponding to the pixel to be predicted in the current block; determine a first output value of the target filter based on the first input value and the filter coefficient; and determine a predicted value of the pixel to be predicted in the current block based on the first output value.
  • the first determination unit 2201 is further configured to determine a second factor; and perform a subtraction operation on the reference sample value and the second factor to obtain a first input value of the target filter.
  • the first determination unit 2201 is further configured to determine a second output value of the target filter based on the first input value and the filter coefficient; and perform a first process on the second output value to determine a first output value of the target filter.
  • the first determination unit 2201 is also configured to calculate the product of the first input value and the corresponding filter coefficient; and set the second output value of the target filter to be equal to the sum of n products; wherein n represents the number of input items corresponding to the target filter, and n is a positive integer.
  • the first determination unit 2201 is further configured to perform an addition operation on the second output value and the second factor to obtain a first output value of the target filter.
  • the first determination unit 2201 is further configured to determine the third output value of the target filter; determine the fourth output value of the target filter based on the second output value and the third output value; and add the fourth output value and the second factor to obtain the first output value of the target filter.
  • the first determination unit 2201 is also configured to determine the number of first type input items corresponding to the target filter based on the shape of the target filter; if the number of first type input items corresponding to the target filter is p, then determine p+q filter coefficients of the target filter, where p and q are both positive integers; and determine the third output value of the target filter based on q filter coefficients and q second type input items among the p+q filter coefficients.
  • the first determination unit 2201 is also configured to determine the number of first type input items corresponding to the target filter based on the shape of the target filter; if the number of first type input items corresponding to the target filter is p, then determine p+m filter coefficients of the target filter, where p and m are both positive integers; and determine the third output value of the target filter based on m filter coefficients among the p+m filter coefficients and m third type input items.
  • the number of third type input items is preset bias information.
  • the value of the second factor is a second preset constant.
  • the first determination unit 2201 is further configured to determine a reconstruction value of at least one reference pixel in the reference area; perform mean calculation on the reconstruction value of at least one reference pixel to obtain a first mean; and set the value of the second factor to be equal to the first mean.
  • the first prediction unit 2202 is further configured to perform a second process on the first output value to obtain a predicted value of a pixel to be predicted in the current block.
  • the first prediction unit 2202 is further configured such that the second processing is to set the prediction value of the pixel to be predicted in the current block to be equal to the first output value.
  • the first prediction unit 2202 is further configured to limit the first output value to a preset value range. wherein the lower limit of the preset numerical range is the minimum reconstruction value in the reference area, and the upper limit of the preset numerical range is the maximum reconstruction value in the reference area.
  • the first determination unit 2201 is further configured to determine a derived intra-frame prediction mode for the luminance component of the current block if the luminance component of the current block uses intra-frame prediction based on a filter coefficient; if the chrominance component of the current block uses intra-frame prediction in a direct mode, the direct mode is set to the derived intra-frame prediction mode to determine the predicted value of the chrominance component of the current block.
  • the first determination unit 2201 is further configured to determine a reference block of the current block when the current block meets a preset condition; if the reference block uses intra-frame prediction based on a filter coefficient, determine a derived intra-frame prediction mode of the reference block; and add the derived intra-frame prediction mode to the intra-frame prediction mode candidate list of the current block.
  • the current block satisfies a preset condition, including at least one of the following:
  • the current block is an inter-frame prediction block
  • the first determining unit 2201 is further configured to determine an original value of the current block; and determine a residual value of the current block according to the original value of the current block and the predicted value of the current block;
  • the encoding unit 2203 is further configured to encode the residual value of the current block and write the obtained encoding bits into the bit stream.
  • the encoding unit 2203 is further configured to transform the residual value to obtain the transform coefficient of the current block; quantize the transform coefficient to obtain the quantization coefficient of the current block; and encode the quantization coefficient of the current block and write the obtained coded bits into the bit stream.
  • the encoding unit 2203 is also configured to determine the target transform kernel of the current block when the current block uses a multi-transform selection mode and the target filtering mode is an interpolation filtering mode; and perform transform processing on the residual value according to the target transform kernel to obtain the transform coefficient of the current block.
  • the determination of the target transformation kernel is associated with at least one of the following parameters:
  • the first determination unit 2201 is further configured to determine at least one candidate transformation core; perform cost calculation on at least one candidate transformation core to determine a cost result of at least one candidate transformation core; and determine a minimum cost result from the cost results of at least one candidate transformation core, and determine the candidate transformation core corresponding to the minimum cost result as the target transformation core of the current block.
  • the first determining unit 2201 is further configured to determine non-zero coefficient information of the current block; and determine at least one candidate transform kernel according to the non-zero coefficient information of the current block.
  • the number of the at least one candidate transform kernel is less than or equal to six.
  • the first determining unit 2201 is further configured to determine a transform core index value of the current block, wherein the transform core index value is used to indicate an index number of a target transform core in at least one candidate transform core;
  • the encoding unit 2203 is further configured to encode the transform core index value of the current block and write the obtained encoding bits into the bitstream.
  • the first determining unit 2201 is further configured to determine a transform core index value of the current block, wherein the transform core index value is used to indicate an index number of a target transform core in at least one candidate transform core, and at least one candidate transform core is associated with a size parameter of the current block;
  • the encoding unit 2203 is further configured to encode the transform core index value of the current block and write the obtained encoding bits into the bitstream.
  • a "unit” may be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course, it may be a module, or it may be non-modular.
  • the components in the present embodiment may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
  • an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 220.
  • the computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the aforementioned embodiments is implemented.
  • the encoder 220 may include: a first communication interface 2301, a first memory 2302 and the first processor 2303; each component is coupled together through a first bus system 2304. It can be understood that the first bus system 2304 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 2304 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as the first bus system 2304 in FIG. 21.
  • the first communication interface 2301 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • a first memory 2302 used to store a computer program that can be run on the first processor 2303;
  • the first processor 2303 is configured to, when running the computer program, execute:
  • An intra-frame prediction is performed on the current block according to the filter coefficient to determine a prediction value of the current block.
  • the first memory 2302 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • RAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate synchronous DRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous link DRAM
  • DRRAM direct RAM bus RAM
  • the first processor 2303 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 2303.
  • the above-mentioned first processor 2303 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the first memory 2302, and the first processor 2303 reads the information in the first memory 2302 and completes the steps of the above method in combination with its hardware.
  • the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing devices
  • PLD programmable logic devices
  • FPGA field programmable gate array
  • general processors controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application.
  • the software code can be stored in a memory and executed by a processor.
  • the memory can be implemented in the processor or outside the processor.
  • the first processor 2303 is further configured to execute the method described in any one of the aforementioned embodiments when running the computer program.
  • the present embodiment provides an encoder, for which the intra-frame prediction technology based on interpolation filtering, when determining the reference area for calculating the filter coefficient, is not only related to the target filtering mode, but also related to the size parameters of the current block. For example, when the size of the current block is large, a large reference area can be used, and when the size of the current block is small, a small reference area can be used; in this way, the calculation complexity can be reduced and the encoding time can be reduced; at the same time, the accuracy of intra-frame prediction can be improved, thereby improving the encoding and decoding performance.
  • the decoder 240 may include a decoding unit 2401, a second determination unit 2402, and a second prediction unit 2403, wherein:
  • the decoding unit 2401 is configured to decode the bitstream and determine a target filtering mode for a current block
  • the second determining unit 2402 is configured to determine a reference area of the current block according to a size parameter of the current block and a target filtering mode
  • the second prediction unit 2403 is configured to determine a filter coefficient of the current block according to a reference area of the current block; and perform intra-frame prediction on the current block according to the filter coefficient to determine a prediction value of the current block.
  • the target filtering mode includes a reference region category of the current block and a shape of a target filter.
  • the second determination unit 2402 is further configured to, if the reference area category of the current block is the first category, determine that the reference area of the current block includes an upper adjacent area and a left adjacent area; if the reference area category of the current block is the second category, determine that the reference area of the current block includes an upper adjacent area; if the reference area category of the current block is the third category, determine that the reference area of the current block includes a left adjacent area; wherein the upper adjacent area refers to a reconstructed area adjacent to the upper side of the current block, and the left adjacent area refers to a reconstructed area adjacent to the left side of the current block.
  • the size parameters of the current block include the height and width of the current block; the second determination unit 2402 is further configured to determine the minimum parameter from the height and width of the current block; and determine the reference area of the current block according to the minimum parameter and the target filtering mode.
  • the size of the reference area of the current block has an associated relationship with the shape and minimum parameter of the target filter.
  • the second determination unit 2402 is further configured to determine that the reference area category in the target prediction mode is any one item except the second category if the width of the current block and the multiple of the first factor are smaller than the height of the current block; and to determine that the reference area category in the target prediction mode is any one item except the third category if the height of the current block and the multiple of the first factor are smaller than the width of the current block.
  • the value of the first factor is a first preset constant.
  • the second determining unit 2402 is further configured to determine a context model of the current block
  • the decoding unit 2401 is further configured to decode the code stream based on the context model and determine a target filtering mode for the current block.
  • the determination of the context model is associated with at least one of the following parameters:
  • the ratio of the width to the height of the current block is the ratio of the width to the height of the current block.
  • the second determination unit 2402 is further configured to determine, based on the reference area of the current block and the shape of the target filter, an input value of the target filter corresponding to at least one reference pixel in the reference area and an output value of the target filter; determine an autocorrelation coefficient matrix based on the input value of the target filter corresponding to at least one reference pixel; determine a mutual correlation coefficient vector based on the input value of the target filter corresponding to at least one reference pixel and the output value of the target filter; determine the coefficients of the target filter based on the autocorrelation coefficient matrix and the mutual correlation coefficient vector; and determine the coefficients of the target filter as the filter coefficients of the current block.
  • the second prediction unit 2403 is further configured to determine a reference sample value corresponding to the pixel to be predicted in the current block; and determine a predicted value of the pixel to be predicted in the current block based on the reference sample value and filter coefficient corresponding to the pixel to be predicted in the current block.
  • the second determination unit 2402 is further configured to, based on the shape of the target filter, determine the reconstructed value at the corresponding position in the reference area as the reference sample value if the reference sample value is located in the reference area of the current block; and determine the predicted value at the corresponding position in the current block as the reference sample value if the reference sample value is located inside the current block.
  • the second prediction unit 2403 is further configured to determine a first input value of the target filter based on a reference sample value corresponding to the pixel to be predicted in the current block; determine a first output value of the target filter based on the first input value and the filter coefficient; and determine a predicted value of the pixel to be predicted in the current block based on the first output value.
  • the second determination unit 2402 is further configured to determine a second factor; and perform a subtraction operation on the reference sample value and the second factor to obtain a first input value of the target filter.
  • the second determination unit 2402 is further configured to determine a second output value of the target filter based on the first input value and the filter coefficient; and perform a first process on the second output value to determine a first output value of the target filter.
  • the second determination unit 2402 is further configured to calculate the product of the first input value and the corresponding filter coefficient; and set the second output value of the target filter to be equal to the sum of n products; wherein n represents the number of input items corresponding to the target filter, and n is a positive integer.
  • the second determining unit 2402 is further configured to perform an addition operation on the second output value and the second factor to obtain a first output value of the target filter.
  • the second determination unit 2402 is further configured to determine the third output value of the target filter; determine the fourth output value of the target filter based on the second output value and the third output value; and add the fourth output value and the second factor to obtain the first output value of the target filter.
  • the second determination unit 2402 is further configured to determine the number of first type input items corresponding to the target filter based on the shape of the target filter; if the number of first type input items corresponding to the target filter is p, then determine p+q filter coefficients of the target filter, where p and q are both positive integers; and determine the third output value of the target filter based on q filter coefficients and q second type input items among the p+q filter coefficients.
  • the second determination unit 2402 is further configured to determine the number of first type input items corresponding to the target filter based on the shape of the target filter; if the number of first type input items corresponding to the target filter is p, then determine p+m filter coefficients of the target filter, where p and m are both positive integers; and determine the third output value of the target filter based on m filter coefficients among the p+m filter coefficients and m third type input items.
  • the number of third type input items is preset bias information.
  • the value of the second factor is a second preset constant.
  • the second determination unit 2402 is further configured to determine a reconstruction value of at least one reference pixel in the reference area; perform mean calculation on the reconstruction value of at least one reference pixel to obtain a first mean; and set the value of the second factor to be equal to the first mean.
  • the second prediction unit 2403 is further configured to perform a second process on the first output value to obtain a predicted value of a pixel to be predicted in the current block.
  • the second prediction unit 2403 is further configured such that the second processing is to set the prediction value of the pixel to be predicted in the current block to be equal to the first output value.
  • the second prediction unit 2403 is further configured so that the second processing is to limit the first output value within a preset numerical range; wherein the lower limit value of the preset numerical range is the minimum reconstructed value in the reference area, and the upper limit value of the preset numerical range is the maximum reconstructed value in the reference area.
  • the second determination unit 2402 is further configured to determine a derived intra-frame prediction mode for the luminance component of the current block if the luminance component of the current block uses intra-frame prediction based on a filter coefficient; if the chrominance component of the current block uses intra-frame prediction in a direct mode, the direct mode is set to the derived intra-frame prediction mode to determine the predicted value of the chrominance component of the current block.
  • the second determination unit 2402 is further configured to determine a reference block of the current block when the current block meets a preset condition; if the reference block uses intra-frame prediction based on a filter coefficient, determine a derived intra-frame prediction mode of the reference block; and add the derived intra-frame prediction mode to the intra-frame prediction mode candidate list of the current block.
  • the current block satisfies a preset condition, including at least one of the following:
  • the current block is an inter-frame prediction block
  • the current block is an intra block copy (IBC) block.
  • IBC intra block copy
  • the decoding unit 2401 is further configured to decode the bitstream and determine a residual value of the current block
  • the second determining unit 2402 is further configured to determine a reconstructed value of the current block according to the predicted value of the current block and the residual value of the current block.
  • the decoding unit 2401 is further configured to decode the code stream to determine the quantization coefficient of the current block; perform inverse quantization processing on the quantization coefficient to obtain the transformation coefficient of the current block; and perform inverse transformation processing on the transformation coefficient to obtain the residual value of the current block.
  • the decoding unit 2401 is also configured to determine the target transform kernel of the current block when the current block uses a multi-transform selection mode and the target filtering mode is an interpolation filtering mode; and perform inverse transform processing on the transform coefficients according to the target transform kernel to obtain a residual value of the current block.
  • the determination of the target transformation kernel is associated with at least one of the following parameters:
  • the decoding unit 2401 is further configured to decode the bitstream and determine a transform kernel index value of the current block;
  • the second determining unit 2402 is further configured to determine a target transform core of the current block from at least one candidate transform core according to the transform core index value.
  • the decoding unit 2401 is further configured to decode the bitstream and determine a transform kernel index value of the current block;
  • the second determining unit 2402 is further configured to determine a target transform core of the current block from at least one candidate transform core according to the transform core index value and a size parameter of the current block.
  • the second determining unit 2402 is further configured to decode the bitstream and determine the non-zero coefficient information of the current block;
  • the second determining unit 2402 is further configured to determine at least one candidate transform kernel according to the non-zero coefficient information of the current block.
  • the number of the at least one candidate transform kernel is less than or equal to six.
  • a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
  • the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • this embodiment provides a computer-readable storage medium, which is applied to the decoder 240, and the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented.
  • the decoder 240 may include: a second communication interface 2501, a second memory 2502 and a second processor 2503; each component is coupled together through a second bus system 2504. It can be understood that the second bus system 2504 is used to achieve connection and communication between these components.
  • the second bus system 2504 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as the second bus system 2504 in Figure 23. Among them,
  • the second communication interface 2501 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the second memory 2502 is used to store a computer program that can be run on the second processor 2503;
  • the second processor 2503 is configured to, when running the computer program, execute:
  • An intra-frame prediction is performed on the current block according to the filter coefficient to determine a prediction value of the current block.
  • the second processor 2503 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
  • the present embodiment provides a decoder.
  • the intra-frame prediction technology based on interpolation filtering when determining the reference area for calculating the filter coefficient, is not only related to the target filtering mode, but also related to the size parameters of the current block. For example, when the size of the current block is large, a large reference area can be used, and when the size of the current block is small, a small reference area can be used. In this way, the calculation complexity can be reduced, and the accuracy of intra-frame prediction can be improved, thereby improving the encoding and decoding performance.
  • a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application is shown.
  • a coding and decoding system 260 may include an encoder 2601 and a decoder 2602 .
  • the encoder 2601 may be the encoder described in any one of the aforementioned embodiments
  • the decoder 2602 may be the decoder described in any one of the aforementioned embodiments.
  • the reference area of the current block is determined according to the size parameters of the current block and the target filtering mode; then the filter coefficient of the current block is determined according to the reference area of the current block; and then the current block is intra-predicted according to the filter coefficient to determine the prediction value of the current block.
  • the intra-frame prediction technology based on interpolation filtering is not only related to the target filtering mode when determining the reference area for calculating the filter coefficient, but also to the size parameters of the current block.
  • a large reference area can be used when the size of the current block is large, and a small reference area can be used when the size of the current block is small; in this way, while ensuring the encoding and decoding performance, the computational complexity can be reduced, the encoding time can be reduced, so that the cost performance of the encoding and decoding performance and the encoding complexity can be improved, and at the same time, the accuracy of the intra-frame prediction can be improved, thereby improving the encoding and decoding efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本申请实施例公开了一种编解码方法、码流、编码器、解码器以及存储介质,应用于解码器,该方法包括:解码码流,确定当前块的目标滤波模式;根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;根据当前块的参考区域,确定当前块的滤波系数;根据滤波系数对当前块进行帧内预测,确定当前块的预测值。这样,在保证编解码性能的情况下,还可以降低时间复杂度。

Description

编解码方法、码流、编码器、解码器以及存储介质 技术领域
本申请实施例涉及视频编解码技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。
背景技术
随着人们对视频显示质量要求的提高,高清和超高清等高分辨率视频应运而生。然而,高分辨率视频通常具有更多信息,因此需要更多带宽。为降低带宽要求,已经引入了涉及视频压缩的视频编码标准。
目前,在视频编码标准中已经提出了基于插值的帧内预测技术,具体是通过当前块周围的已重建像素值获取到插值滤波器系数,然后用于对当前块进行帧内预测的技术。但是已有的技术方案仍然存在一些缺陷,使得编解码性能和时间复杂度的性价比较低。
发明内容
本申请实施例提供一种编解码方法、码流、编码器、解码器以及存储介质,在保证编解码性能的情况下,还可以降低时间复杂度。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,该方法包括:
解码码流,确定当前块的目标滤波模式;
根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;
根据当前块的参考区域,确定当前块的滤波系数;
根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
第二方面,本申请实施例提供了一种编码方法,应用于编码器,该方法包括:
确定当前块的目标滤波模式;
根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;
根据当前块的参考区域,确定当前块的滤波系数;
根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
第三方面,本申请实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:
当前块的目标滤波模式、所述当前块的残差值和所述当前块的变换核索引值。
第四方面,本申请实施例提供了一种编码器,该编码器包括第一确定单元和第一预测单元,其中:
第一确定单元,配置为确定当前块的目标滤波模式;以及根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;
第一预测单元,配置为根据当前块的参考区域,确定当前块的滤波系数;以及根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
第五方面,本申请实施例提供了一种编码器,该编码器包括第一存储器和第一处理器;其中,
第一存储器,用于存储能够在第一处理器上运行的计算机程序;
第一处理器,用于在运行计算机程序时,执行如第二方面所述的方法。
第六方面,本申请实施例提供了一种解码器,该解码器包括解码单元、第二确定单元和第二预测单元,其中:
解码单元,配置为解码码流,确定当前块的目标滤波模式;
第二确定单元,配置为根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;
第二预测单元,配置为根据当前块的参考区域,确定当前块的滤波系数;以及根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
第七方面,本申请实施例提供了一种解码器,该解码器包括第二存储器和第二处理器;其中,
第二存储器,用于存储能够在第二处理器上运行的计算机程序;
第二处理器,用于在运行计算机程序时,执行如第一方面所述的方法。
第八方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如第一方面所述的方法、或者实现如第二方面所述的方法。
本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,无论是在编码端还是解码端,在确定出当前块的目标滤波模式之后,根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;然后根据当前块的参考区域,确定当前块的滤波系数;再根据滤波系数对当前块进行帧内预测,确定当前块的预测值。这样,基于插值滤波的帧内预测技术,在确定用于计算滤波系数的参考区域时,不仅与目标滤波模式相关,而且还与当前块的尺寸参数有关,例如当前块的尺寸较大时可以使用大的参考区域,当前块的尺寸较小时可以使用小的参考区域;如此,可以降低计算复杂度,减小编码时间;同时还可以提升帧内预测准确度,进而提升编解码性能。
附图说明
图1A为一种获取数值m的计算方式示意图一;
图1B为一种获取数值m的计算方式示意图二;
图1C为一种获取数值m的计算方式示意图三;
图2A为一种当前块与重建区域之间的位置关系示意图一;
图2B为一种当前块与重建区域之间的位置关系示意图二;
图2C为一种当前块与重建区域之间的位置关系示意图三;
图3A为一种插值滤波器的形状示意图一;
图3B为一种插值滤波器的形状示意图二;
图3C为一种插值滤波器的形状示意图三;
图4为一种获取插值滤波器可能位置上的输入和输出的结构示意图;
图5为一种基于插值滤波的预测方向示意图;
图6为一种帧内预测的角度模式示意图;
图7为一种在预测块中滑动的3×3窗口示意图;
图8为一种不同角度方向上累计的梯度幅度值示意图;
图9A为本申请实施例提供的一种编码器的组成框图示意图;
图9B为本申请实施例提供的一种解码器的组成框图示意图;
图10为本申请实施例提供的一种编解码系统的网络架构示意图;
图11为本申请实施例提供的一种解码方法的流程示意图一;
图12A为本申请实施例提供的一种当前块的参考区域示意图一;
图12B为本申请实施例提供的一种当前块的参考区域示意图二;
图12C为本申请实施例提供的一种当前块的参考区域示意图三;
图13为本申请实施例提供的一种解码方法的流程示意图二;
图14A为本申请实施例提供的一种目标滤波器的线性项与非线性项分布示意图一;
图14B为本申请实施例提供的一种插值滤波器的线性项与非线性项分布示意图二;
图14C为本申请实施例提供的一种插值滤波器的线性项与非线性项分布示意图三;
图15A为本申请实施例提供的另一种目标滤波器的线性项与非线性项分布示意图一;
图15B为本申请实施例提供的另一种插值滤波器的线性项与非线性项分布示意图二;
图15C为本申请实施例提供的另一种插值滤波器的线性项与非线性项分布示意图三;
图16A为本申请实施例提供的又一种目标滤波器的线性项与非线性项分布示意图一;
图16B为本申请实施例提供的又一种插值滤波器的线性项与非线性项分布示意图二;
图16C为本申请实施例提供的又一种插值滤波器的线性项与非线性项分布示意图三;
图17为本申请实施例提供的一种编码方法的流程示意图一;
图18A为本申请实施例提供的一种参考区域的划分示意图一;
图18B为本申请实施例提供的一种参考区域的划分示意图二;
图18C为本申请实施例提供的一种参考区域的划分示意图三;
图19为本申请实施例提供的一种编码方法的流程示意图二;
图20为本申请实施例提供的一种编码器的组成结构示意图;
图21为本申请实施例提供的一种编码器的具体硬件结构示意图;
图22为本申请实施例提供的一种解码器的组成结构示意图;
图23为本申请实施例提供的一种解码器的具体硬件结构示意图;
图24为本申请实施例提供的一种编解码系统的组成结构示意图。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
对本申请实施例进行进一步详细说明之前,先对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释:
联合视频专家组(Joint Video Exploration Team,JVET);
H.266/多功能视频编码(Versatile Video Coding,VVC);
VVC的参考软件测试平台(VVC Test Model,VTM);
增强压缩模型(Enhanced Compression Mode,ECM);
插值滤波帧内预测(Extrapolation Intra Prediction,EIP);
多变换模式选择(Multiple Transform Selection,MTS);
离散余弦变换(Discrete Cosine Transform,DCT);
离散正弦变换(Discrete Sine Transform,DST);
不可分基础变换(Non-Separable Primary Transform,NSPT);
低频不可分二次变换(Low Frequency Non-separable Secondary Transform,LFNST);
直流模式(Direct Current,DC);
平面模式(PLANAR);
直接模式(Direct Mode,DM);
帧内块拷贝(Intra Block Copy,IBC);
宽角度帧内预测(Wide Angle Intra Prediction,WAIP);
误差平方和(Sum of Squares for Error,SSE);
均方误差(Mean Squared Error,MSE);
绝对误差和(Sum of Absolute Difference,SAD)。
可以理解地,基于插值的帧内预测技术指的是通过当前块周围的已重建像素值获取到插值滤波器系数,用于对当前块进行帧内预测的技术。具体地,基于插值滤波的帧内预测技术可以包括以下一个或多个特点:
(a)插值滤波器的抽头数应大于或等于2,插值滤波器可以有多种形状,使用语法元素控制选中的插值滤波器的形状。
(b)用于获取插值滤波器系数的重建像素应在当前块周围的某一个或某几个区域内,使用语法元素选中用于获取插值滤波器系数的区域。
(c)插值滤波预测可以使用在亮度或色度的帧内块预测。
(d)对当前块使用插值滤波预测时,应从块的左上角开始到右下角位置按照一定顺序进行预测。
(e)插值滤波器的输入是重建像素值和/或预测像素值,也可以是减去某一个数值的重建值和预测值。
(f)对应(e)中如果插值滤波器的输入减去了某一个数值,那么插值结果应将这一个数值加回来。
(g)可以通过当前块周围的已重建像素值获取到最大值和最小值,用于限定插值滤波器的输出范围。
进一步地,针对具体的基于插值滤波的帧内预测技术,可以通过以下几个方面进行详细描述。
(一)获取均值、最小值和最大值。
在一种可能的实施例中,在当前块周围的13行13列大小的重建区域中找到重建像素的最大值和最小值,这里的最大值和最小值可以用于对预测结果的范围进行限制。
在一种可能的实施例中,根据如下方法获取插值滤波器的输入需要减去和输出需要加上的数值m, m为DC模式预测时使用的值,m为正整数。
示例性地,以图1A、图1B和图1C为例,这里获取数值m的计算方式可以分为3种情况:
(i)在当前块的宽度等于高度时,m等于当前块上方一行和左侧一列重建像素的平均值,具体参见图1A;
(ii)在当前块的宽度大于高度时,m等于当前块上方一行重建像素的平均值,具体参见图1B;
(iii)在当前块的高度大于宽度时,m等于当前块左侧一列重建像素的平均值,具体参见图1C。
在实现中,这里的计算方式也可以总结如表1所示。
表1
(二)获取插值滤波器系数。
在一种可能的实施例中,这里定义了3种15抽头插值滤波器与3种重建区域。
图2A示出了一种当前块与重建区域之间的位置关系示意图。如图2A所示,重建区域可以包括与当前块上侧相邻的上相邻区域和与当前块左侧相邻的左相邻区域;其中,上相邻区域的长度为2×Width+13,宽度为13;左相邻区域的长度为2×Height+13,宽度为13。图2B示出了另一种当前块与重建区域之间的位置关系示意图。如图2B所示,重建区域可以包括与当前块上侧相邻的上相邻区域;其中,上相邻区域的长度为2×Width+13,宽度为13。图2C示出了又一种当前块与重建区域之间的位置关系示意图。如图2C所示,重建区域可以包括与当前块左侧相邻的左相邻区域;其中,左相邻区域的长度为2×Height+13,宽度为13。在图2A、图2B和图2C中,Height和Width分别表示当前的高度和宽度。需要注意的是,针对图2A、图2B和图2C中的重建区域,即当前块周围的13行和/或13列的重建像素可以供获取插值滤波器系数使用。
图3A示出了一种插值滤波器的形状示意图。如图3A所示,插值滤波器的形状为4×4的正方形。图3B示出了另一种插值滤波器的形状示意图。如图3B所示,插值滤波器的形状为2×8的矩形。图3C示出了又一种插值滤波器的形状示意图。如图3C所示,插值滤波器的形状为8×2的矩形。在图3A、图3B和图3C中,网格填充的部分表示插值滤波器的输入位置,黑色填充的部分表示插值滤波器的输出位置。
这样,3种重建区域与3种插值滤波器的形状通过组合方式的不同,可以推导出3×3种不同的滤波模式(每种滤波器的形状与每种重建区域组合均可导出一种滤波模式),编码器通过率失真代价决策出一种滤波器的形状与重建区域的组合,如此编码器和解码器在预测当前块时,首先根据确定的滤波器的形状和重建区域来确定插值滤波器的系数。
在一种可能的实施例中,获取的插值滤波器的输入为去均值的像素值(即重建像素值减去均值),那么在获取参数时,将所选中的插值滤波器在所选择区域上滑动,水平和垂直的滑动步长为1的像素距 离,具体参见图4,这里示出了4×4的插值滤波器在所选择重建区域上获取插值滤波器可能位置上的输入和输出的结构示意图。其中,通过获取的输入和输出构建自相关系数矩阵和互相关系数向量,当所选择重建区域中有包括未完成重建的像素值时,该像素值将不被计入用于获取插值滤波器参数的样本中。
在这个情况下,针对构建的维纳霍夫方程,具体是构建自相关系数矩阵和互相关系数向量,线性方程组如下式:
其中,代表所选择的重建区域,t代表重建像素值,r代表重建区域中的坐标位置,p0…pN-1代表与位置r相对的坐标关系,它们指的相对坐标为插值滤波器的输入位置和输出位置之间的相对坐标关系。c0…cN-1为待求解的插值滤波器的系数(也可称为“滤波系数”),m为插值滤波器的输入减去的某个值(此时输出需加上的某个值)。
(三)预测当前块。
在一种可能的实施例中,预测过程从当前块的左上角开始,按照一定顺序向左下角进行预测。预测公式如下:
其中,Clip(a,b,c)中的a和b表示限制预测结果的输出范围。predr为当前块中r位置的预测结果,min,max为前述获取的最小值和最大值,m为前述获取的某个值。表示插值滤波器的输入,它需要减去m进一步和对应滤波系数相乘并求和,位于重建区域时则使用重建值作为插值滤波器的输入,位于当前块内时则使用已经得到的预测值作为插值滤波器的输入。
示例性地,如图5所示,这里示出了插值滤波器按照对角线方向进行预测,其中,网格填充的部分表示插值滤波器的输入位置,黑色填充的部分表示插值滤波器的输出位置。另外,从实现上来说,位于同一条对角线上的待预测点可以并行预测。
(四)预测块的分类与变换核的选择。
在对当前块进行预测之后,可以得到当前块的预测块,预测块包括当前块中至少一个像素的预测值。对于预测块而言,不同的角度模式适合使用不同的变换,包括一次变换MTS、NSPT和二次变换LFNST。
其中,MTS中包括了一些传统的变换,例如DCT变换和DST变换。NSPT与LFNST则为基于最优变换通过一个普适训练集获取出的一系列变换系数,NSPT与LFNST的不同在于,NSPT直接用于变换残差系数,而LFNST则进一步变换经过DCT2变换后的变换系数。
对于传统的预测模式(PLANAR模式、DC模式和角度模式)),不可分的一次变换(NSPT)或不可分的二次变换(LFNST),根据一个映射比如查表的方式,可以将不同的传统预测模式对应上不同组的变换核进行变换。
在参考软件ECM中,如图6所示,传统的帧内预测模式可以包括:
(i)PLANAR模式:帧内预测模式索引为0;
(ii)DC模式:帧内预测模式索引为1;
(iii)角度模式:帧内预测模式索引为2~66。
还需要注意的是,如图6所示,帧内预测模式可以包括2~66的角度模式,以及-1~14和67~80的宽角度模式。其中,图6中的箭头指向为VVC中存在的角度模式预测的方向,它们在编解码时使用的帧内预测模式索引为2~66,在当前块为非正方形块时,一些角度方向会被替换成宽角度模式(如图6中的-1~-14和67~80)。
在参考软件ECM中,NSPT和LFNST分别将传统预测模式的变换核分为35组,每一组分别有3个可以选择的变换核。表2示出了传统预测模式与变换核组别之间的对应关系。
表2
在一种可能的实施例中,这里提出一种将基于插值滤波的预测块匹配到传统预测模式的方法,然后通过匹配的传统预测模式将基于插值滤波的预测块对应上预设的一次变换(可分或不可分)或二次变换(可分或不可分)的不同的变换核。具体地,通过预测块中的预测值,将基于插值滤波的预测块匹配到PLANAR模式或角度方向2~66的模式。具体可以包括如下步骤:
第一步,使用滑动的3×3窗口,计算基于插值滤波的预测块中每一个3×3窗口的水平方向和竖直方向的梯度值Gx和Gy。其中,Gx和Gy分别是由3×3的水平梯度算子Mx和竖直梯度算子My与窗口位置内的预测值点乘得到的。

图7为在预测块中滑动的3×3窗口示意图,可以沿着水平方向和垂直方向进行滑动。假定基于插值滤波的预测块是一个宽高大小为(w,h)的块,那么滑动的3×3窗口可以计算预测块中心的(w-2)×(h-2)个位置的Gx和Gy
第二步,根据每个位置上的Gx和Gy按如下公式计算出每一个位置上对应的传统角度方向O,并且计算出每个位置对应角度的梯度幅度值G,具体如下所示:
G=|Gx|+|Gy|      (5)
在一些实施例中,atan()的计算过程可以简化,通过查表或是一些变形来完成。
第三步,将每一个位置上的梯度幅度值G在其导出的传统角度模式上分别进行累加,得到如图8所示的梯度幅度值的直方图。最后从直方图中选取出累计的梯度幅度值最大的传统角度模式作为当前块对应的预测模式;特别的,当所有传统角度模式导出的梯度幅度值都为零时,当前块将会匹配为传统PLANAR模式作为对应的预测模式。
还需要说明的是,在本申请实施例中,插值滤波预测推导出的传统预测模式将用于NSPT与LFNST的变换核组别的选择。
然而,插值滤波的帧内预测技术在JVET会议上提出后,目前得到反馈为编解码性能和编码器复杂 度的性价比需要提升。在最新的ECM-8.0参考软件上,这里所述的相关技术方案的编码时间复杂度为108%到109%。
基于此,本申请实施例提出了一种编码方法,确定当前块的目标滤波模式;根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;根据当前块的参考区域,确定当前块的滤波系数;根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
本申请实施例提出了一种解码方法,解码码流,确定当前块的目标滤波模式;根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;根据当前块的参考区域,确定当前块的滤波系数;根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
这样,基于插值滤波的帧内预测技术,在确定用于计算滤波系数的参考区域时,不仅与目标滤波模式相关,而且还与当前块的尺寸参数有关,例如当前块的尺寸较大时可以使用大的参考区域,当前块的尺寸较小时可以使用小的参考区域;如此,在保证编解码性能的情况下,还可以降低计算复杂度,减小编码时间,使得编解码性能与编码复杂度的性价比得以提升,同时还能够提升帧内预测准确度,进而提高编解码效率。
下面将结合附图对本申请各实施例进行详细说明。
参见图9A,其示出了本申请实施例提供的一种编码器的组成框图示意图。如图9A所示,编码器(具体为“视频编码器”)100可以包括变换与量化单元101、帧内估计单元102、帧内预测单元103、运动补偿单元104、运动估计单元105、反变换与反量化单元106、滤波器控制分析单元107、滤波单元108、编码单元109和解码图像缓存单元110等,其中,滤波单元108可以实现去方块滤波及样本自适应缩进(Sample Adaptive Offset,SAO)滤波,编码单元109可以实现头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmetic Coding,CABAC)。针对输入的原始视频信号,通过编码树单元(Coding Tree Unit,CTU)的划分可以得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元101对该视频编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元102和帧内预测单元103是用于对该视频编码块进行帧内预测;明确地说,帧内估计单元102和帧内预测单元103用于确定待用以编码该视频编码块的帧内预测模式;运动补偿单元104和运动估计单元105用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元105执行的运动估计为产生运动向量的过程,所述运动向量可以估计该视频编码块的运动,然后由运动补偿单元104基于由运动估计单元105所确定的运动向量执行运动补偿;在确定帧内预测模式之后,帧内预测单元103还用于将所选择的帧内预测数据提供到编码单元109,而且运动估计单元105将所计算确定的运动向量数据也发送到编码单元109;此外,反变换与反量化单元106是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元107和滤波单元108去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元110的帧中的一个预测性块,用以产生经重构建的视频编码块;编码单元109是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该视频信号的码流;而解码图像缓存单元110是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元110中。
参见图9B,其示出了本申请实施例提供的一种解码器的组成框图示意图。如图9B所示,解码器(具体为“视频解码器”)200包括解码单元201、反变换与反量化单元202、帧内预测单元203、运动补偿单元204、滤波单元205和解码图像缓存单元206等,其中,解码单元201可以实现头信息解码以及CABAC解码,滤波单元205可以实现去方块滤波以及SAO滤波。输入的视频信号经过图9A的编码处理之后,输出该视频信号的码流;该码流输入解码器200中,首先经过解码单元201,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元202进行处理,以便在像素域中产生残差块;帧内预测单元203可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元204是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换与反量化单元202的残差块与由帧内预测单元203或运动补偿单元204产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过滤波单元205以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元206中,解码图像缓存单元206存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。
进一步地,本申请实施例还提供了一种包含编码器和解码器的编解码系统的网络架构,其中,图 10示出了本申请实施例提供的一种编解码系统的网络架构示意图。如图10所示,该网络架构包括一个或多个电子设备13至1N和通信网络01,其中,电子设备13至1N可以通过通信网络01进行视频交互。电子设备在实施的过程中可以为各种类型的具有视频编解码功能的设备,例如,所述电子设备可以包括智能手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,本申请实施例不作具体限定。在这里,本申请实施例所述的解码器或编码器就可以为上述电子设备。
需要说明的是,本申请实施例的方法主要应用在如图9A所示的帧内预测单元103部分和如图9B所示的帧内预测单元203部分。也就是说,本申请实施例既可以应用于编码器,也可以应用于解码器,甚至还可以同时应用于编码器和解码器,但是本申请实施例不作具体限定。
还需要说明的是,当应用于帧内预测单元103部分时,“当前块”具体是指当前待进行帧内预测的编码块;当应用于帧内预测单元203部分时,“当前块”具体是指当前待进行帧内预测的解码块。
在本申请的一实施例中,参见图11,其示出了本申请实施例提供的一种解码方法的流程示意图。如图11所示,该方法可以包括:
S1101:解码码流,确定当前块的目标滤波模式。
需要说明的是,本申请实施例的解码方法可以是一种帧内预测方法,具体是指一种基于插值滤波的帧内预测模式的改进,以提升性能与复杂度的性价比。
还需要说明的是,在本申请实施例中,当前块至少包括第一颜色分量和第二颜色分量。对于当前块的第一颜色分量,这时候的块可简称为第一颜色分量块;而且在第一颜色分量为亮度分量时,那么第一颜色分量块又可称为亮度块。同理,对于当前块的第二颜色分量,这时候的块可简称为第二颜色分量块;而且在第二颜色分量为色度分量时,那么第二颜色分量块又可称为色度块。
还需要说明的是,在本申请实施例中,目标滤波模式可以是指使用目标滤波器对当前块进行帧内预测的模式。其中,目标滤波器可以是指插值滤波器。
还需要说明的是,在本申请实施例中,目标滤波模式可以使用第一语法元素标识信息来实现。也就是说,在一些实施例中,解码码流,确定第一语法元素标识信息的取值;在第一语法元素标识信息的取值为第一值时,确定当前块的预测模式为目标滤波模式;在第一语法元素标识信息的取值为第二值时,确定当前块的预测模式为非目标滤波模式。
在本申请实施例中,第一值与第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第一语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。
示例性地,对于第一值和第二值而言,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true。其中,在本申请实施例中,第一值设置为1,第二值设置为0,但是并不作具体限定。
还需要说明的是,在本申请实施例中,目标滤波模式可以包括当前块的参考区域类别和目标滤波器的形状。
在一些实施例中,当前块的参考区域类别可以包括第一类别、第二类别和第三类别。其中,该方法还可以包括:
若当前块的参考区域类别为第一类别时,则确定当前块的参考区域包括上相邻区域和左相邻区域;
若当前块的参考区域类别为第二类别时,则确定当前块的参考区域包括上相邻区域;
若当前块的参考区域类别为第三类别时,则确定当前块的参考区域包括左相邻区域。
在本申请实施例中,当前块的参考区域是指当前块周围的已重建区域。其中,上相邻区域可以是指与当前块的上侧相邻的已重建区域,左相邻区域可以是指与当前块的左侧相邻的已重建区域。
示例性地,图2A所示的参考区域类别为第一类别,图2B所示的参考区域类别为第二类别,图2C所示的参考区域类别为第三类别。
在一些实施例中,目标滤波器的形状可以包括第一形状、第二形状和第三形状。其中,第一形状可以为4×4的正方形,第二形状可以为2×8的矩形,第三形状可以为8×2的矩形;但是这里不作具体限定。
示例性地,图3A所示的目标滤波器为第一形状,图3B所示的目标滤波器为第二形状,图3C所示的目标滤波器为第三形状。
这样,针对当前块的候选滤波模式,可以是根据三种参考区域类别和三种目标滤波器的形状进行组合得到的。示例性地,这里可以总共组合出九种候选滤波模式,目标滤波模式则为九种候选滤波模式中的其中一种。
S1102:根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域。
需要说明的是,在本申请实施例中,在解码出当前块的目标滤波模式之后,可以结合当前块的尺寸参数来确定当前块的参考区域。其中,当前块的尺寸参数可以包括当前块的高度和宽度。
在一些实施例中,当前块的尺寸参数包括当前块的高度和宽度;基于当前块的尺寸参数和目标滤波模式,确定当前块的参考区域,可以包括:从当前块的高度与宽度中确定最小参数;根据最小参数和目标滤波模式,确定当前块的参考区域。
在本申请实施例中,当前块的参考区域的大小与目标滤波器的形状和最小参数具有关联关系。简单来说,如果当前块的尺寸较大,那么可以使用大的参考区域;如果当前块的尺寸较小,那么可以使用小的参考区域。其中,参考区域的行数与列数可以根据当前块的大小导出。
示例性地,图12A为一种当前块的参考区域示意图,图12B为另一种当前块的参考区域示意图,图12C为又一种当前块的参考区域示意图。如图12A、图12B、图12C所示,虚线框内的区域为当前块的参考区域,它取决于当前块使用的目标滤波器的形状与变量tplSize的大小。其中,变量tplSize的大小等于当前块的宽度与高度中较小的一个值,例如对于4×8的当前块,变量tplSize的取值为4;对于16×16的当前块,变量tplSize的取值为16。
可以理解地,在本申请实施例中,还可以根据当前块的尺寸参数限制滤波模式的使能。具体地,以图12C为例,对于一个宽度为16、高度为4的当前块,这时候变量tplSize的取值为4,意味着当前块内共有4×16=64个待预测像素;而用于获取滤波系数的样本共有tplSize×(tplSize+4×2)=48个。也就是说,若使用左相邻区域获取滤波系数,则待预测像素多,而用于获取滤波系数的参考区域中的样本少,过少样本获取得到的滤波系数往往造成预测效果不好。
在一些实施例中,该方法还可以包括:
若当前块的宽度与第一因子的倍数小于当前块的高度,则确定目标预测模式中的参考区域类别为除第二类别之外的任意一项;
若当前块的高度与第一因子的倍数小于当前块的宽度,则确定目标预测模式中的参考区域类别为除第三类别之外的任意一项。
在本申请实施例中,第一因子的取值可以为第一预设常数。示例性地,第一因子的取值可以设置为2,但是不作具体限定。
在本申请实施例中,这里可以根据当前块的宽度与高度的比例来确定某些滤波模式是否禁用。具体地,如果当前块的宽度与高度的比值小于第一因子的倒数,即当前块的宽度与第一因子的倍数小于当前块的高度,那么可以禁用当前块的参考区域类别为第二类别,即禁止使用当前块的上相邻区域进行滤波系数的计算,此时目标预测模式中的参考区域类别仅可能为第一类别或者第三类别;如果当前块的宽度与高度的比值大于第一因子,即当前块的高度与第一因子的倍数小于当前块的宽度,那么可以禁用当前块的参考区域类别为第三类别,即禁止使用当前块的左相邻区域进行滤波系数的计算,此时目标预测模式中的参考区域类别仅可能为第一类别或者第二类别。
这样,假定目标滤波器的形状仍然为三种,那么由于某些参考区域类别被禁用,此时候选滤波模式的个数会相应减少。例如,如果禁用当前块的参考区域类别为第二类别(即禁止使用当前块的上相邻区域进行滤波系数的计算),那么候选滤波模式的个数会降低到六种。也就是说,由于根据当前块的宽度与高度的比值(简称为“宽高比”)会限制一些插值滤波模式,使得不同的宽高比下允许使用的候选滤波模式的个数不同;所以解析目标滤波模式时可以基于上下文模型进行解码。
在一些实施例中,解码码流,确定当前块的目标滤波模式,可以包括:确定当前块的上下文模型;基于上下文模型解码码流,确定当前块的目标滤波模式。
在本申请实施例中,上下文模型的确定与下述参数中的至少一项具有关联关系:
当前块的形状;
当前块的宽度与高度的比值。
也就是说,在本申请实施例中,上下文模型的选择可以与当前块的形状、宽高比等因素有关。具体来说,解码端中的上下文模型有多个,具体使用哪一个上下文模型进行解码,可以是根据当前块的形状、宽高比等因素来确定。原因是针对狭长形的当前块,由于可以是选择的插值滤波模式较少,所以表示选中的某一个插值滤波模式所需码字的长度短;而其他形状的当前块块允许选择的插值滤波模式个数不同,表示某一个插值滤波模式所需码字的长度也长,这使得不同形状下的插值滤波模式选中的概率不同。如此,概率不同则需要选择不同的上下文模型,这里可以通过不同的上下文模型索引去确定使用的是具体哪一个上下文模型。
还需要说明的是,在本申请实施例中,在选择出对应的上下文模型之后,可以根据上下文模型进行解码第一语法元素标识信息的取值,进而确定出当前块的目标滤波模式。如此,不仅可以提高预测准确 度,而且还可以降低计算复杂度。
S1103:根据当前块的参考区域,确定当前块的滤波系数。
需要说明的是,在本申请实施例中,当前块的滤波系数主要是根据当前块的参考区域和目标滤波器的形状来确定的。在一些实施例中,根据当前块的参考区域,确定当前块的滤波系数,可以包括:
根据当前块的参考区域和目标滤波器的形状,确定参考区域中至少一个参考像素对应的目标滤波器的输入值和目标滤波器的输出值;根据至少一个参考像素对应的目标滤波器的输入值,确定自相关系数矩阵;根据至少一个参考像素对应的目标滤波器的输入值和目标滤波器的输出值,确定互相关系数向量;根据自相关系数矩阵和互相关系数向量,确定目标滤波器的系数;将目标滤波器的系数确定为当前块的滤波系数。
示例性地,基于插值滤波的帧内预测技术在解码端通过解析相关语法元素确定当前块对应的滤波器形状和参考区域类别,然后在参考区域上遍历每一个位置构建自相关系数矩阵和互相关系数向量,然后通过解方程组获得滤波系数。
其中,自相关系数矩阵可以用A表示,互相关系数向量可以用Y表示,具体如下:

进一步地,构建线性方程组如下,
在这里,表示所选中的参考区域,t表示重建像素值,r表示参考区域种的坐标位置,p0…pN-1表示与位置r相对的坐标关系,它们指的相对坐标为目标滤波器的输入位置和输出位置之间的相对坐标关系。c0…cN-1为为待求解的滤波系数,m为目标滤波器的输入减去的某个值(此时输出加上的某个值)。
S1104:根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
需要说明的是,在本申请实施例中,根据滤波系数对当前块中的像素点进行帧内预测,确定当前块中的像素点的预测值,可以包括:确定当前块中待预测像素对应的参考样值;根据当前块中待预测像素对应的参考样值和滤波系数,确定当前块中待预测像素的预测值。
在一些实施例中,确定当前块中待预测像素对应的参考样值,可以包括:基于目标滤波器的形状,若参考样值位于当前块的参考区域,则将参考区域中对应位置处的重建值确定为参考样值;若参考样值位于当前块的内部,则将当前块中对应位置处的预测值确定为参考样值。
还需要说明的是,在本申请实施例中,对于目标滤波器的输入,即当前块中待预测像素对应的参考样值,如果对应位置处于参考区域内,那么使用重建值作为目标滤波器的输入;或者,如果对应位置处于当前块内,那么使用已经预测过的预测值作为目标滤波器的输入。
还需要说明的是,在本申请实施例中,对于目标滤波器而言,插值滤波是按照对角线方向进行预测的;而且位于同一条对角线上的待预测像素可以并行预测,具体可以参见图5。
在一些实施例中,对于确定当前块中待预测像素的预测值,参见图13,该方法可以包括:
S1301:基于当前块中待预测像素对应的参考样值,确定目标滤波器的第一输入值。
需要说明的是,在本申请实施例中,对于目标滤波器的输入而言,需要由参考样值减去某一个数值之后作为目标滤波器的输入,然后再与滤波系数进行相乘并求和操作。因此,在一些实施例中,基于当前块中待预测像素对应的参考样值,确定目标滤波器的第一输入值,可以包括:确定第二因子;对参考样值与第二因子进行减法运算,得到目标滤波器的第一输入值。
S1302:基于第一输入值和滤波系数,确定目标滤波器的第一输出值。
需要说明的是,在本申请实施例中,基于第一输入值和滤波系数,确定目标滤波器的第一输出值,可以包括:基于第一输入值和滤波系数,确定目标滤波器的第二输出值;对第二输出值进行第一处理,确定目标滤波器的第一输出值。
在一些实施例中,基于第一输入值和滤波系数,确定目标滤波器的第二输出值,可以包括:计算第一输入值与对应的滤波系数的乘积;将目标滤波器的第二输出值设置为等于n个乘积之和;其中,n表示目标滤波器对应的输入项数,且n为正整数。
示例性地,假定当前块内待预测像素r对应的参考样值可以用表示,第二因子可以用m表示,ci表示第i个滤波系数;i=0,1,2,…n-1。那么目标滤波器的第二输出值用Pout1表示,具体如下式所示:
在一种具体的实现方式中,对第二输出值进行第一处理,确定目标滤波器的第一输出值,可以包括:对第二输出值与第二因子进行加法运算,得到目标滤波器的第一输出值。
需要说明的是,在本申请实施例中,如果目标滤波器的输入减去某一个数值,那么目标滤波器的输出还需要增加该数值。因此,目标滤波器的第一输出值可以用Pout2表示,其中,
在一些实施例中,第二因子的取值可以为第二预设常数。或者,在一些实施例中,该方法还可以包括:确定参考区域中至少一个参考像素的重建值;对至少一个参考像素的重建值进行均值计算,得到第一均值;将第二因子的取值设置为等于第一均值。
也就是说,第二因子可以是根据参考区域中的重建值进行均值计算得到的,也可以是一个预设常数,甚至还可以是某一特定的数值,例如当前块左上角的重建值,这里不作具体限定。示例性地,如果第二因子为参考区域的均值,那么目标滤波器的输入需要减去该均值,相应地,目标滤波器的输出还需要加上该均值,以作为最终的预测结果。
在另一种具体的实现方式中,对第二输出值进行第一处理,确定目标滤波器的第一输出值,可以包括:确定目标滤波器的第三输出值;根据第二输出值和第三输出值,确定目标滤波器的第四输出值;对第四输出值与第二因子进行加法运算,得到目标滤波器的第一输出值。
需要说明的是,在本申请实施例中,在计算目标滤波器的输出时,输入项数不仅包括线性项数,还可以包括非线性项数和/或偏置项数。在这里,第三输出值可以是根据非线性项数和/或偏置项数进行计算得到的,第二输出值可以是根据线性项数进行计算得到。在这种情况下,对于目标滤波器的第二输出值,具体可以为:计算第一输入值与对应的滤波系数的乘积;将目标滤波器的第二输出值设置为等于n个乘积之和;其中,n表示目标滤波器对应的第一类型输入项数,且n为正整数。
在一种具体的实现方式中,第三输出值是基于非线性项数来计算得到的。在一些实施例中,确定目标滤波器的第三输出值,可以包括:基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+q个滤波系数,p、q均为正整数;根据p+q个滤波系数中的q个滤波系数和q个第二类型输入项数,确定目标滤波器的第三输出值。
在另一种具体的实现方式中,第三输出值是基于偏置项数来计算得到的。在一些实施例中,确定目标滤波器的第三输出值,可以包括:基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+m个滤波系数,p、m均为正整数;根据p+m个滤波系数中的m个滤波系数和m个第三类型输入项数,确定目标滤波器的第三输出值。
在又一种具体的实现方式中,第三输出值是基于非线性项数和偏置项数共同计算得到的。在一些实施例中,确定目标滤波器的第三输出值,可以包括:基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+k个滤波系数,p、k均为正整数;根据p+k个滤波系数中的i个滤波系数和i个第二类型输入项数以及p+k个滤波系数中的j个滤波系数和j个第三类型输入项数,确定目标滤波器的第三输出值;其中,i、j均为正整数,且k=i+j。
在本申请实施例中,第一类型输入项数与参考样值之间具有线性关系,第二类型输入项数与参考样值之间具有非线性关系,第三类型输入项数为预设的偏置信息。简单来说,第一类型输入项数为线性项数,第二类型输入项数为非线性项数,第三类型输入项数为偏置项数。
示例性地,假定目标滤波器的15个抽头的线性项如图3A、图3B、图3C表示。其中黑色填充位置表示当前待预测位置。在此基础上,还可以增加3个抽头非线性项,非线性项使用的重建像素位置如图14A、图14B、图14C所示,具体是三个用点填充位置。
在这里,15个线性项的插值输入pi=ti-m,i的取值为0~14,对应着当前待预测位置周围的14个网格填充位置,ti为网格填充位置上的重建值或预测值(取决与当前待预测位置需要的输入位于当前块内还是参考区域中),m为减去的某一数值,它可以是当前块左上角的重建值,或者也可以是参考区域的平均值,这里不作具体限定。
在这里,3个非线性项的插值输入pi=((ti-m)×(ti-m)+midVal)>>bitDepth,i为用点填充的三个位置,pi为非线性项的值,midVal和bitDepth在10bit的情况下等于512和10。如此,在添加了非线性项的情况下,对于当前预测位置,当前位置的第一输出值的计算公式为:
还需要注意的是,在滤波系数的获取中,构建自相关系数矩阵和互相关系数向量时也应增加对应的非线性项值;另外,当存在偏置项时,也应进一步增加偏置项值;这里根据实际情况进行设定,在此不作具体限定。
还可以理解地,仍以图3A、图3B、图3C所示目标滤波器的15个抽头的线性项为例,在此基础上,这里增加的3个抽头非线性项也可以如图15A、图15B、图15C所示,非线性项具体是三个用点填充位置,黑色填充位置表示当前待预测位置。其中,图15A、图15B、图15C与图14A、图14B、图14C相比,虽然都是增加了三个非线性项,但是由于不同的滤波器形状都使用相同的非线性项,计算更为简单,进一步降低了复杂度。
还可以理解地,对于非线性项的数目,除了使用3个非线性项外,本申请实施例也可以使用更多的非线性项,例如图16A、图16B、图16C中使用了5个非线性项,5个非线性项的位置具体是五个用点填充位置。
如此,在本申请实施例中,对于非线性项的个数应是正整数个,具体数目不作限定,而且可以根据性能复杂度要求进行不同的设计。
S1303:根据第一输出值,确定当前块中待预测像素的预测值。
需要说明的是,在本申请实施例中,根据第一输出值,确定当前块中待预测像素的预测值,可以包括:对第一输出值进行第二处理,得到当前块中待预测像素的预测值。
在一种具体的实现方式中,第二处理可以是将当前块中待预测像素的预测值设置为等于第一输出值。
在另一种具体的实现方式中,第二处理可以是将第一输出值限制在预设数值范围之内,或者这里也可称为“钳位(clip)操作”。其中,预设数值范围的下限值为参考区域中的最小重建值(min),预设数值范围的上限值为参考区域中的最大重建值(max)。
也就是说,在本申请实施例中,预设数值范围为min~max之间。如果第一输出值处于该预设数值范围之内,那么可以将第一输出值作为当前块中待预测像素的预测值;如果第一输出值大于max,那么可以将max作为当前块中待预测像素的预测值;如果第一输出值小于min,那么可以将min作为当前块中待预测像素的预测值。具体地,可以使用如下公式表示:
pred=Clip(min,max,Pout2)        (12)
这样,在对第一输出值进行修正操作之后,可以保证当前块中全部像素的预测值都在min到max之间。
进一步地,在一些实施例中,该方法还可以包括:
若当前块的亮度分量使用基于滤波系数的帧内预测,则确定当前块的亮度分量的推导帧内预测模式;
若当前块的色度分量使用直接模式的帧内预测,则将直接模式设置为推导帧内预测模式,以确定当前块的色度分量的预测值。
需要说明的是,在本申请实施例中,推导帧内预测模式可以为传统的PLANAR模式、DC模式或者角度模式等,具体可以根据前述构建梯度直方图的方式来确定。
在这里,对于DM模式(即“直接模式”或称为“导出模式”)而言,在进行帧内预测时在很多标准中被应用的一个高效的帧内色度预测模式,当色度块选中使用DM模式时,色度块会获取对应位置上亮度块选中的模式来进行帧内预测。
具体来说,根据前述实施例所描述的插值滤波技术仅作用与亮度的帧内块预测,一个直接的做法是将该模式拓展到色度上,但这会导致色度也需要导出滤波系数,这会带来很高的计算复杂度。在相关技术中,色度没有基于插值滤波的帧内预测模式,当色度块选中了DM模式时,DM模式会设定为PLANAR模式进行预测。
但是,在本申请实施例中,对于使用插值滤波模式的亮度块,可以通过构建梯度直方图的方式推导出一个传统的预测模式,这个传统模式可以用来作为色度模式选中DM模式且对应位置亮度块选中了插值滤波模式时使用。
进一步地,在一些实施例中,该方法还可以包括:
在当前块满足预设条件时,确定当前块的参考块;
若参考块使用基于滤波系数的帧内预测,确定参考块的推导帧内预测模式;
将推导帧内预测模式添加至当前块的帧内预测模式候选列表中。
在本申请实施例中,当前块满足预设条件,至少包括下述其中一项:
当前块为帧间预测块;
当前块为IBC块。
需要说明的是,在本申请实施例中,在IBC块和帧间块中,它们不是帧内编码的块,所以不具备帧内预测模式,而IBC块和帧间块最初的参考块都为帧内预测块。在相关技术中,通过帧间块和IBC块在完成获取参考块时,也同时将参考块的帧内预测模式传递到当前块上,这些帧内预测模式为传统的帧内预测模式(PLANAR、DC、角度模式)。这些传递的传统帧内预测模式将用于在当前块构建帧内预测模式候选列表时,周围块为IBC块或帧间块时使用。
如此,对于IBC块或帧间块参考的位置为插值滤波模式时,使用插值滤波模式对应的传统帧内预测模式进行传递。
进一步地,在一些实施例中,该方法还可以包括:
解码码流,确定当前块的残差值;
根据当前块的预测值和当前块的残差值,确定当前块的重建值。
在本申请实施例中,解码码流,确定当前块的残差值,可以包括:解码码流,确定当前块的量化系数;对量化系数进行反量化处理,得到当前块的变换系数;对变换系数进行反变换处理,得到当前块的残差值。
需要说明的是,在本申请实施例中,当前块在完成预测之后,编码端会根据原始值与预测值计算残差值,残差值将进一步经过变换与量化得到量化系数,然后通过码流传输到解码端。这样,解码端通过解码可以获得当前块的量化系数,然后经过反量化与反变换处理,可以得到当前块的残差值;然后进一步根据当前块的残差值与当前块的预测值进行加法运算,可以得到当前块的重建值。
进一步地,在一些实施例中,对变换系数进行反变换处理,得到当前块的残差值,可以包括:在当前块使用多变换选择模式且目标滤波模式为插值滤波模式时,确定当前块的目标变换核;根据目标变换核对变换系数进行反变换处理,得到当前块的残差值。
在本申请实施例中,目标变换核的确定可以与下述参数中的至少一项具有关联关系:
当前块的目标滤波模式;
当前块的尺寸参数;
当前块的形状。
还需要说明的是,在本申请实施例中,将插值滤波预测的预测结果导出梯度直方图并匹配到传统预测模式上,进一步选择不可分变换核的方法。而在除了不可分变换核外其他的基础变换核中,变换核的选择与PLANAR模式的选择方式相同。但是插值滤波模式与PLANAR模式的特性不同,对与基础变换核的选择应更加优化。
在参考软件ECM中,基础变换可以分为水平方向和垂直方向,每个方向允许的变换方式包括以下7种:{'DCT2','DCT8','DST7','DCT5','DST4','DST1','IDTR'}。
其中,DCT2、DCT8、DCT5为离散余弦变换的几个子类,DST7、DST4、DST1为离散正弦变换的几个子类,IDTR为Identity transform,表示不变换。
进一步地,在参考软件ECM中,最常用的基础变换模式为水平方向和垂直方向都为DCT2,这里写作DCT2-DCT2,它被用作不可分二次变换LFNST前的一次变换,也被用作于多变换选择MTS技术关闭时的变换。而在MTS模式选中时,变换过程将是基础变换在水平方向和垂直方向上的组合,而非不可分变换。
在一些实施例中,该方法还可以包括:解码码流,确定当前块的非零系数信息;根据当前块的非零系数信息,确定至少一个候选变换核。
在本申请实施例中,至少一个候选变换核的个数小于或等于6个。也就是说,在参考软件ECM中,根据解析出的当前块中非零系数的特性,当前块可以有至多6个非DCT2-DCT2的变换核可选择。
这样,在本申请实施例中,针对插值滤波模式的预测块,其残差的MTS基础变换核应和当前块是否选中插值滤波模式相关。更具体地,可以和选中的是哪一种插值滤波模式和/或当前块的大小、形状相关。
在一种具体的实现方式中,确定当前块的目标变换核,可以包括:解码码流,确定当前块的变换核索引值;根据变换核索引值,从至少一个候选变换核中确定当前块的目标变换核。
需要说明的是,针对ECM的当前MTS模式下使用的基础变换核的候选,MTS可选的基础变换核与当前块是否选中插值滤波预测模式相关。若当前块使用了插值滤波预测模式,则6种可选的MTS变换核如下(变换核为:水平变换-垂直变换),具体如表3所示。
表3
在这里,当MTS被选中且当前块的预测模式为插值预测模式时,根据解析出的MTS变换核索引值从6种变换核中选择对应的目标变换核进行反变换。
在另一种具体的实现方式中,确定当前块的目标变换核,可以包括:解码码流,确定当前块的变换核索引值;根据变换核索引值和当前块的尺寸参数,从至少一个候选变换核中确定当前块的目标变换核。
还需要说明的是,针对ECM的当前MTS模式下使用的基础变换核的候选,MTS可选的基础变换 核与当前块是否选中插值滤波模式以及当前块的大小,形状相关。其中,当前块的形状大小为:高度×宽度。在一种实施例中,可以如表4所示。
表4
在这里,当MTS被选中且当前块的预测模式为插值预测模式时,根据解析出的MTS变换核索引值以及当前块的形状大小选择出对应的目标变换核进行反变换。在此实施例中,插值滤波预测模式可应用与4×4到32×32的亮度块。
还需要说明的是,上述候选MTS变换核的获取方法可以包括:
步骤1、使用包含插值滤波预测模式的编码器编码图像集或视频集;
步骤2、将选中插值滤波模式的块的残差值按照分类(例如块的形状大小、插值滤波模式等)逐个类别的筛选可能的水平-垂直方向上的变换核。变换的核选择标准可以是SAD的大小、SSE大小或别的衡量标准,例如变换编码增益(transform coding gain),这里均不作具体限定。其中,变换编码增益的定义为算数平均的变换系数方差除以几何平均的变换系数方差。
本实施例提供了一种解码方法,解码码流,确定当前块的目标滤波模式;根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;然后根据当前块的参考区域,确定当前块的滤波系数;再根据滤波系数对当前块进行帧内预测,确定当前块的预测值。这样,基于插值滤波的帧内预测技术,在确定用于计算滤波系数的参考区域时,不仅与目标滤波模式相关,而且还与当前块的尺寸参数有关,例如当前块的尺寸较大时可以使用大的参考区域,当前块的尺寸较小时可以使用小的参考区域;如此,可以降低计算复杂度,减小编码时间;同时还可以提升帧内预测准确度,进而提升编解码性能。
在本申请的另一实施例中,参见图17,其示出了本申请实施例提供的一种编码方法的流程示意图。如图17所示,该方法可以包括:
S1801:确定当前块的目标滤波模式。
需要说明的是,本申请实施例的编码方法可以是一种帧内预测方法,具体是指一种基于插值滤波的帧内预测模式的改进,以提升性能与复杂度的性价比。
还需要说明的是,在本申请实施例中,当前块至少包括第一颜色分量和第二颜色分量。对于当前块的第一颜色分量,这时候的块可简称为第一颜色分量块;而且在第一颜色分量为亮度分量时,那么第一颜色分量块又可称为亮度块。同理,对于当前块的第二颜色分量,这时候的块可简称为第二颜色分量块;而且在第二颜色分量为色度分量时,那么第二颜色分量块又可称为色度块。
还需要说明的是,在本申请实施例中,目标滤波模式可以是指使用目标滤波器对当前块进行帧内预测的模式。其中,目标滤波器可以是指插值滤波器。
在一些实施例中,确定当前块的目标滤波模式,可以包括:
确定至少一种候选滤波模式;对至少一种候选滤波模式进行代价计算,确定至少一种候选滤波模式的代价结果;从至少一种候选滤波模式的代价结果中确定最小代价结果,将最小代价结果对应的候选滤 波模式确定为当前块的目标滤波模式。
在本申请实施例中,至少一种候选滤波模式的个数可以是基于当前块的参考区域类别数量和目标滤波器的形状数量确定的。
在本申请实施例中,这里可以使用失真值的方式来确定代价结果,具体可以为率失真代价的方式来确定代价结果;但是也可以是SAD的大小,MSE的大小,SSE大小或其他的判断代价的标准,在此不作具体限定。
在一些实施例中,当前块的参考区域类别可以包括第一类别、第二类别和第三类别。其中,该方法还可以包括:
若当前块的参考区域类别为第一类别时,则确定当前块的参考区域包括上相邻区域和左相邻区域;
若当前块的参考区域类别为第二类别时,则确定当前块的参考区域包括上相邻区域;
若当前块的参考区域类别为第三类别时,则确定当前块的参考区域包括左相邻区域。
需要说明的是,在本申请实施例中,当前块的参考区域是指当前块周围的已重建区域。其中,上相邻区域可以是指与当前块的上侧相邻的已重建区域,左相邻区域可以是指与当前块的左侧相邻的已重建区域。
示例性地,图2A所示的参考区域类别为第一类别,图2B所示的参考区域类别为第二类别,图2C所示的参考区域类别为第三类别。
在一些实施例中,目标滤波器的形状可以包括第一形状、第二形状和第三形状。其中,第一形状可以为4×4的正方形,第二形状可以为2×8的矩形,第三形状可以为8×2的矩形;但是这里不作具体限定。
示例性地,图3A所示的目标滤波器为第一形状,图3B所示的目标滤波器为第二形状,图3C所示的目标滤波器为第三形状。
这样,针对当前块的候选滤波模式,可以是根据三种参考区域类别和三种目标滤波器的形状进行组合得到的。示例性地,这里可以总共组合出九种候选滤波模式,目标滤波模式则为九种候选滤波模式中的其中一种。
S1802:根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域。
需要说明的是,在本申请实施例中,在确定出当前块的目标滤波模式之后,可以结合当前块的尺寸参数来确定当前块的参考区域。其中,当前块的尺寸参数可以包括当前块的高度和宽度。
在一些实施例中,当前块的尺寸参数包括当前块的高度和宽度;基于当前块的尺寸参数和目标滤波模式,确定当前块的参考区域,可以包括:从当前块的高度与宽度中确定最小参数;根据最小参数和目标滤波模式,确定当前块的参考区域。
在本申请实施例中,当前块的参考区域的大小与目标滤波器的形状和最小参数具有关联关系。简单来说,如果当前块的尺寸较大,那么可以使用大的参考区域;如果当前块的尺寸较小,那么可以使用小的参考区域。其中,参考区域的行数与列数可以根据当前块的大小导出。示例性地,如图12A、图12B、图12C所示,虚线框内的区域为当前块的参考区域,它取决于当前块使用的目标滤波器的形状与变量tplSize的大小。其中,变量tplSize的大小等于当前块的宽度与高度中较小的一个值,例如对于4×8的当前块,变量tplSize的取值为4;对于16×16的当前块,变量tplSize的取值为16。
可以理解地,在本申请实施例中,还可以根据当前块的尺寸参数限制滤波模式的使能。具体地,以图12C为例,对于一个宽度为16、高度为4的当前块,这时候变量tplSize的取值为4,意味着当前块内共有4×16=64个待预测像素;而用于获取滤波系数的样本共有tplSize×(tplSize+4×2)=48个。也就是说,若使用左相邻区域获取滤波系数,则待预测像素多,而用于获取滤波系数的参考区域中的样本少,过少样本获取得到的滤波系数往往造成预测效果不好。因此,在一些实施例中,该方法还可以包括:
若当前块的宽度与第一因子的倍数小于当前块的高度,则禁止当前块的参考区域类别为第二类别,以及确定当前块的参考区域类别数量是基于除第二类别之外的其他参考区域类别确定的;
若当前块的高度与第一因子的倍数小于当前块的宽度,则禁止当前块的参考区域类别为第三类别,以及确定当前块的参考区域类别数量是基于除第三类别之外的其他参考区域类别确定的。
在本申请实施例中,第一因子的取值可以为第一预设常数。示例性地,第一因子的取值可以设置为2,但是不作具体限定。
在本申请实施例中,这里可以根据当前块的宽度与高度的比例来确定某些滤波模式是否禁用。具体地,如果当前块的宽度与高度的比值小于第一因子的倒数,即当前块的宽度与第一因子的倍数小于当前块的高度,那么可以禁用当前块的参考区域类别为第二类别,即禁止使用当前块的上相邻区域进行滤波系数的计算,此时目标预测模式中的参考区域类别仅可能为第一类别或者第三类别;如果当前块的宽度与高度的比值大于第一因子,即当前块的高度与第一因子的倍数小于当前块的宽度,那么可以禁用当前 块的参考区域类别为第三类别,即禁止使用当前块的左相邻区域进行滤波系数的计算,此时目标预测模式中的参考区域类别仅可能为第一类别或者第二类别。
这样,假定目标滤波器的形状仍然为三种,那么由于某些参考区域类别被禁用,此时候选滤波模式的个数会相应减少。例如,如果禁用当前块的参考区域类别为第二类别(即禁止使用当前块的上相邻区域进行滤波系数的计算),那么候选滤波模式的个数会降低到六种。也就是说,由于根据当前块的宽度与高度的比值(简称为“宽高比”)会限制一些插值滤波模式,使得不同的宽高比下允许使用的候选滤波模式的个数不同;所以编码目标滤波模式时可以基于上下文模型进行编码。
在一些实施例中,在确定出当前块的目标滤波模式之后,该方法还可以包括:对当前块的目标滤波模式进行编码,将所得到的编码比特写入码流。
在一种具体的实现方式中,对当前块的目标滤波模式进行编码,将所得到的编码比特写入码流,可以包括:确定当前块的上下文模型;基于上下文模型对当前块的目标滤波模式进行编码,将所得到的编码比特写入码流。
在本申请实施例中,上下文模型的确定与下述参数中的至少一项具有关联关系:
当前块的形状;
当前块的宽度与高度的比值。
也就是说,在本申请实施例中,上下文模型的选择可以与当前块的形状、宽高比等因素有关。具体来说,解码端中的上下文模型有多个,具体使用哪一个上下文模型进行解码,可以是根据当前块的形状、宽高比等因素来确定。原因是针对狭长形的当前块,由于可以是选择的插值滤波模式较少,所以表示选中的某一个插值滤波模式所需码字的长度短;而其他形状的当前块块允许选择的插值滤波模式个数不同,表示某一个插值滤波模式所需码字的长度也长,这使得不同形状下的插值滤波模式选中的概率不同。如此,概率不同则需要选择不同的上下文模型,这里可以通过不同的上下文模型索引去确定使用的是具体哪一个上下文模型。
还需要说明的是,在本申请实施例中,在选择出对应的上下文模型之后,可以根据上下文模型对目标预测模式进行编码。以使得后续在解码端,根据当前块的形状所选择出的上下文模型进行解码码流,就能够获得当前块的目标预测模式。
还需要说明的是,在本申请实施例中,目标滤波模式可以包括当前块的参考区域类别和目标滤波器的形状。在这里,目标滤波模式可以通过第一语法元素标识信息将其写入码流中。也就是说,在一些实施例中,确定第一语法元素标识信息的取值;基于上下文模型对第一语法元素标识信息的取值进行编码,将所得到的编码比特写入码流。
在一些实施例中,确定第一语法元素标识信息的取值,可以包括:若当前块使用目标滤波模式进行预测编码,则确定第一语法元素标识信息的取值为第一值;若当前块使用非目标滤波模式进行预测编码,则确定第一语法元素标识信息的取值为第二值。
在本申请实施例中,第一值与第二值不同,而且第一值和第二值可以是参数形式,也可以是数字形式。具体地,第一语法元素标识信息可以是写入在概述(profile)中的参数,也可以是一个标志(flag)的取值,这里对此不作具体限定。
示例性地,对于第一值和第二值而言,第一值可以设置为1,第二值可以设置为0;或者,第一值可以设置为0,第二值可以设置为1;或者,第一值可以设置为true,第二值可以设置为false;或者,第一值可以设置为false,第二值可以设置为true。其中,在本申请实施例中,第一值设置为1,第二值设置为0,但是并不作具体限定。
这样,在将第一语法元素标识信息的取值写入码流之后,后续在解码端通过解析第一语法元素标识信息的取值,就可以确定出当前块的预测模式是否为目标预测模式。示例性地,如果解析得到第一语法元素标识信息的取值为1,那么可以确定当前块的预测模式为目标预测模式。如此,不仅可以提高预测准确度,而且还可以降低计算复杂度。
S1803:根据当前块的参考区域,确定当前块的滤波系数。
需要说明的是,在本申请实施例中,可以通过将当前块的参考区域进行归类和划分,构建出不含有重复区域的自相关系数矩阵和互相关系数向量,以便编码端推导出每种组合方式下的滤波系数。在一些实施例中,该方法还可以包括:
确定当前块的多个候选子参考区域,且多个候选子参考区域互不重叠;根据多个候选子参考区域和目标滤波器的形状,确定多个候选子参考区域各自的自相关系数矩阵和互相关系数向量;将多个候选子参考区域各自的自相关系数矩阵和互相关系数向量存储至预设缓存区中。
在一种具体的实施例中,第一候选子参考区域为多个候选子参考区域中的任意一个。这里以第一候选子参考区域为例,对于确定第一候选子参考区域的自相关系数矩阵和互相关系数向量,具体可以包括: 根据第一候选子参考区域和目标滤波器的形状,确定第一候选子参考区域中至少一个参考像素对应的目标滤波器的输入值和目标滤波器的输出值;根据至少一个参考像素对应的目标滤波器的输入值,确定第一候选子参考区域的自相关系数矩阵;根据至少一个参考像素对应的目标滤波器的输入值和目标滤波器的输出值,确定第一候选子参考区域的互相关系数向量。如此,按照这种方式,可以确定出这多个候选子参考区域各自的自相关系数矩阵和互相关系数向量。
还需要说明的是,在本申请实施例中,编码端需要从3种参考区域和3种滤波器的形状一共9种组合中进行筛选,当选中了某一种组合时,对应语法元素标识信息将会写入码流;然后解码端如果解析出选中了某一个组合时,则只需要一次滤波系数的导出。这使得该技术在编码端的复杂度远高于解码端。
然而对于图2A、图2B和图2C这三种参考区域来说,它们都是由如图18A、图18B和图18C中的R0、R1和R2三部分构成的。在这里,如图18A所示,当前块的参考区域可以划分为由R0、R1和R2组成。如图18B所示,当前块的参考区域可以划分为由R0和R1组成。如图18C所示,当前块的参考区域可以划分为由R0和R2组成。
进一步地,使用f0,f1,f2表示3种滤波器的形状,Rall,Rtop,Rleft表示3种参考区域。9种组合下的自相关系数矩阵与互相关系数向量可以写作如下:
其中,A代表自相关系数矩阵,Y代表互相关系数向量。需要注意的是,自相关系数矩阵与互相关系数向量的构建与解码端的式(7)和式(8)类似,这里不再详述。
进一步地,通过观察可以发现由于Rall,Rtop,Rleft都可以由R0,R1,R2组成,所以上述9种组合可进一步分解为:
进一步地,由矩阵和向量的加法的分解可以进一步表示为:


所以式(15)、式(16)和式(17)经过简化,在构建自相关系数矩阵和互相关系数向量时,只需要下列9组即可构建出所有滤波系数获取所需的矩阵和向量,具体如下:
这样,编码端可以从这9组的矩阵和向量中选择当前块的滤波系数确定所需要的自相关系数矩阵和互相关系数向量。因此,在一些实施例中,根据当前块的参考区域,确定当前块的滤波系数,可以包括:对当前块的参考区域进行划分,确定至少一个子参考区域;从预设缓存区中获取至少一个子参考区域各自的自相关系数矩阵和互相关系数向量;根据至少一个子参考区域各自的自相关系数矩阵和互相关系数向量,确定目标滤波器的系数;将目标滤波器的系数确定为当前块的滤波系数。
也就是说,在本申请实施例中,编码端可以根据当前进行的组合导出滤波系数时和进行率失真优化时,每次遇到没有构建的自相关系数矩阵和互相关系数向量时都需要进行缓存,以供后续别的组合使用;从而可以减少编码端的计算复杂度。
S1804:根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
需要说明的是,在本申请实施例中,根据滤波系数对当前块中的像素点进行帧内预测,确定当前块中的像素点的预测值,可以包括:确定当前块中待预测像素对应的参考样值;根据当前块中待预测像素对应的参考样值和滤波系数,确定当前块中待预测像素的预测值。
在一些实施例中,确定当前块中待预测像素对应的参考样值,可以包括:基于目标滤波器的形状,若参考样值位于当前块的参考区域,则将参考区域中对应位置处的重建值确定为参考样值;若参考样值位于当前块的内部,则将当前块中对应位置处的预测值确定为参考样值。
还需要说明的是,在本申请实施例中,对于目标滤波器的输入,即当前块中待预测像素对应的参考样值,如果对应位置处于参考区域内,那么使用重建值作为目标滤波器的输入;或者,如果对应位置处于当前块内,那么使用已经预测过的预测值作为目标滤波器的输入。
还需要说明的是,在本申请实施例中,对于目标滤波器而言,插值滤波是按照对角线方向进行预测的;而且位于同一条对角线上的待预测像素可以并行预测,具体可以参见图5。
在一些实施例中,根据当前块中待预测像素对应的参考样值和滤波系数,确定当前块中待预测像素的预测值,可以包括:
基于当前块中待预测像素对应的参考样值,确定目标滤波器的第一输入值;
基于第一输入值和滤波系数,确定目标滤波器的第一输出值;
根据第一输出值,确定当前块中待预测像素的预测值。
需要说明的是,在本申请实施例中,对于目标滤波器的输入而言,需要由参考样值减去某一个数值之后作为目标滤波器的输入,然后再与滤波系数进行相乘并求和操作。因此,在一些实施例中,基于当前块中待预测像素对应的参考样值,确定目标滤波器的第一输入值,可以包括:确定第二因子;对参考样值与第二因子进行减法运算,得到目标滤波器的第一输入值。
还需要说明的是,在本申请实施例中,基于第一输入值和滤波系数,确定目标滤波器的第一输出值,可以包括:基于第一输入值和滤波系数,确定目标滤波器的第二输出值;对第二输出值进行第一处理,确定目标滤波器的第一输出值。
在一些实施例中,基于第一输入值和滤波系数,确定目标滤波器的第二输出值,可以包括:计算第一输入值与对应的滤波系数的乘积;将目标滤波器的第二输出值设置为等于n个乘积之和;其中,n表示目标滤波器对应的输入项数,且n为正整数。
示例性地,假定当前块内待预测像素r对应的参考样值可以用表示,第二因子可以用m表示,ci表示第i个滤波系数;i=0,1,2,…n-1。那么目标滤波器的第二输出值用Pout1表示,具体如下式所示:
在一种具体的实现方式中,对第二输出值进行第一处理,确定目标滤波器的第一输出值,可以包括:对第二输出值与第二因子进行加法运算,得到目标滤波器的第一输出值。
需要说明的是,在本申请实施例中,如果目标滤波器的输入减去某一个数值,那么目标滤波器的输出还需要增加该数值。因此,目标滤波器的第一输出值可以用Pout2表示,其中,
在一些实施例中,第二因子的取值可以为第二预设常数。或者,在一些实施例中,该方法还可以包括:确定参考区域中至少一个参考像素的重建值;对至少一个参考像素的重建值进行均值计算,得到第一均值;将第二因子的取值设置为等于第一均值。
也就是说,第二因子可以是根据参考区域中的重建值进行均值计算得到的,也可以是一个预设常数,甚至还可以是某一特定的数值,例如当前块左上角的重建值,这里不作具体限定。示例性地,如果第二因子为参考区域的均值,那么目标滤波器的输入需要减去该均值,相应地,目标滤波器的输出还需要加上该均值,以作为最终的预测结果。
在另一种具体的实现方式中,对第二输出值进行第一处理,确定目标滤波器的第一输出值,可以包括:确定目标滤波器的第三输出值;根据第二输出值和第三输出值,确定目标滤波器的第四输出值;对第四输出值与第二因子进行加法运算,得到目标滤波器的第一输出值。
需要说明的是,在本申请实施例中,在计算目标滤波器的输出时,输入项数不仅包括线性项数,还可以包括非线性项数和/或偏置项数。在这里,第三输出值可以是根据非线性项数和/或偏置项数进行计算得到的,第二输出值可以是根据线性项数进行计算得到。在这种情况下,对于目标滤波器的第二输出值,具体可以为:计算第一输入值与对应的滤波系数的乘积;将目标滤波器的第二输出值设置为等于n个乘积之和;其中,n表示目标滤波器对应的第一类型输入项数,且n为正整数。
在一种具体的实现方式中,第三输出值是基于非线性项数来计算得到的。在一些实施例中,确定目标滤波器的第三输出值,可以包括:基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+q个滤波系数,p、q均为正整数; 根据p+q个滤波系数中的q个滤波系数和q个第二类型输入项数,确定目标滤波器的第三输出值。
在另一种具体的实现方式中,第三输出值是基于偏置项数来计算得到的。在一些实施例中,确定目标滤波器的第三输出值,可以包括:基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+m个滤波系数,p、m均为正整数;根据p+m个滤波系数中的m个滤波系数和m个第三类型输入项数,确定目标滤波器的第三输出值。
在又一种具体的实现方式中,第三输出值是基于非线性项数和偏置项数共同计算得到的。在一些实施例中,确定目标滤波器的第三输出值,可以包括:基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+k个滤波系数,p、k均为正整数;根据p+k个滤波系数中的i个滤波系数和i个第二类型输入项数以及p+k个滤波系数中的j个滤波系数和j个第三类型输入项数,确定目标滤波器的第三输出值;其中,i、j均为正整数,且k=i+j。
在本申请实施例中,第一类型输入项数与参考样值之间具有线性关系,第二类型输入项数与参考样值之间具有非线性关系,第三类型输入项数为预设的偏置信息。换句话说,第一类型输入项数为线性项数,第二类型输入项数为非线性项数,第三类型输入项数为偏置项数。
示例性地,以图14A、图14B、图14C为例,假定15个抽头的线性项为网格填充位置,3个抽头非线性项为用点填充位置,黑色填充位置表示当前待预测位置。
在这里,15个线性项的插值输入pi=ti-m,i的取值为0~14,对应着当前待预测位置周围的14个网格填充位置,ti为网格填充位置上的重建值或预测值(取决与当前待预测位置需要的输入位于当前块内还是参考区域中),m为减去的某一数值,它可以是当前块左上角的重建值,或者也可以是参考区域的平均值,这里不作具体限定。
在这里,3个非线性项的插值输入pi=((ti-m)×(ti-m)+midVal)>>bitDepth,i为用点填充的三个位置,pi为非线性项的值,midVal和bitDepth在10bit的情况下等于512和10。如此,在添加了非线性项的情况下,对于当前预测位置,当前位置的第一输出值的计算公式为:
需要注意的是,在滤波系数的获取中,构建自相关系数矩阵和互相关系数向量时也应增加对应的非线性项值;另外,当存在偏置项时,也应进一步增加偏置项值;这里根据实际情况进行设定,在此不作具体限定。
还可以理解地,针对这里所增加的3个抽头非线性项,也可以如图15A、图15B、图15C所示。其中,图15A、图15B、图15C与图14A、图14B、图14C相比,虽然都是增加了三个非线性项,但是由于不同的滤波器形状都使用相同的非线性项,计算更为简单,进一步降低了复杂度。
还可以理解地,对于非线性项的数目,除了使用3个非线性项外,本申请实施例也可以使用更多的非线性项,例如图16A、图16B、图16C中使用了5个非线性项,5个非线性项的位置具体是五个用点填充位置。如此,在本申请实施例中,对于非线性项的个数应是正整数个,具体数目不作限定,而且可以根据性能复杂度要求进行不同的设计。
还需要说明的是,在本申请实施例中,根据第一输出值,可以确定当前块中待预测像素的预测值,具体可以包括:对第一输出值进行第二处理,得到当前块中待预测像素的预测值。
在一种具体的实现方式中,第二处理可以是将当前块中待预测像素的预测值设置为等于第一输出值。
在另一种具体的实现方式中,第二处理可以是将第一输出值限制在预设数值范围之内,或者这里也可称为“钳位(clip)操作”。其中,预设数值范围的下限值为参考区域中的最小重建值(min),预设数值范围的上限值为参考区域中的最大重建值(max)。
也就是说,在本申请实施例中,预设数值范围为min~max之间。如果第一输出值处于该预设数值范围之内,那么可以将第一输出值作为当前块中待预测像素的预测值;如果第一输出值大于max,那么可以将max作为当前块中待预测像素的预测值;如果第一输出值小于min,那么可以将min作为当前块中待预测像素的预测值。具体地,可以使用如下公式表示:
pred=Clip(min,max,Pout2)      (21)
这样,在对第一输出值进行修正操作之后,可以保证当前块中全部像素的预测值都在min到max之间。
进一步地,在一些实施例中,该方法还可以包括:
若当前块的亮度分量使用基于滤波系数的帧内预测,则确定当前块的亮度分量的推导帧内预测模式;
若当前块的色度分量使用直接模式的帧内预测,则将直接模式设置为推导帧内预测模式,以确定当前块的色度分量的预测值。
需要说明的是,在本申请实施例中,推导帧内预测模式可以为传统的PLANAR模式、DC模式或 者角度模式等,具体可以根据前述构建梯度直方图的方式来确定。
在这里,对于DM模式(即“直接模式”或称为“导出模式”)而言,在进行帧内预测时在很多标准中被应用的一个高效的帧内色度预测模式,当色度块选中使用DM模式时,色度块会获取对应位置上亮度块选中的模式来进行帧内预测。
具体来说,根据前述实施例所描述的插值滤波技术仅作用与亮度的帧内块预测,一个直接的做法是将该模式拓展到色度上,但这会导致色度也需要导出滤波系数,这会带来很高的计算复杂度。在相关技术中,色度没有基于插值滤波的帧内预测模式,当色度块选中了DM模式时,DM模式会设定为PLANAR模式进行预测。
但是,在本申请实施例中,对于使用插值滤波模式的亮度块,可以通过构建梯度直方图的方式推导出一个传统的预测模式,这个传统模式可以用来作为色度模式选中DM模式且对应位置亮度块选中了插值滤波模式时使用。
进一步地,在一些实施例中,该方法还可以包括:
在当前块满足预设条件时,确定当前块的参考块;
若参考块使用基于滤波系数的帧内预测,确定参考块的推导帧内预测模式;
将推导帧内预测模式添加至当前块的帧内预测模式候选列表中。
在本申请实施例中,当前块满足预设条件,至少包括下述其中一项:
当前块为帧间预测块;
当前块为IBC块。
在本申请实施例中,对于IBC块和帧间块,它们不是帧内编码的块,所以不具备帧内预测模式,而IBC块和帧间块最初的参考块都为帧内预测块。在相关技术中,通过帧间块和IBC块在完成获取参考块时,也同时将参考块的帧内预测模式传递到当前块上,这些帧内预测模式为传统的帧内预测模式(PLANAR、DC、角度模式)。这些传递的传统帧内预测模式将用于在当前块构建帧内预测模式候选列表时,周围块为IBC块或帧间块时使用。如此,对于IBC块或帧间块参考的位置为插值滤波模式时,使用插值滤波模式对应的传统帧内预测模式进行传递。
进一步地,在一些实施例中,参见图19,该方法还可以包括:
S2001:确定当前块的残差值。
S2002:对残差值进行变换处理,得到当前块的变换系数。
S2003:对变换系数进行量化处理,得到当前块的量化系数。
S2004:对当前块的量化系数进行编码,将所得到的编码比特写入码流。
需要说明的是,在本申请实施例中,确定当前块的残差值,可以包括:确定当前块的原始值;根据当前块的原始值和当前块的预测值,确定当前块的残差值。然后对当前块的残差值进行编码,将所得到的编码比特写入码流。
还需要说明的是,在本申请实施例中,根据当前块的原始值和当前块的预测值进行减法运算,可以确定当前块的残差值。在对当前块的残差值进行编码时,首先需要对残差值进行变换与量化处理,将所得到的量化系数写入码流,然后通过码流传输到解码端。
进一步地,对于步骤S2002,在一些实施例中,对残差值进行变换处理,得到当前块的变换系数,可以包括:在当前块使用多变换选择模式且目标滤波模式为插值滤波模式时,确定当前块的目标变换核;根据目标变换核对残差值进行变换处理,得到当前块的变换系数。
在本申请实施例中,目标变换核的确定可以与下述参数中的至少一项具有关联关系:
当前块的目标滤波模式;
当前块的尺寸参数;
当前块的形状。
还需要说明的是,在本申请实施例中,将插值滤波预测的预测结果导出梯度直方图并匹配到传统预测模式上,进一步选择不可分变换核的方法。而在除了不可分变换核外其他的基础变换核中,变换核的选择与PLANAR模式的选择方式相同。但是插值滤波模式与PLANAR模式的特性不同,对与基础变换核的选择应更加优化。
在参考软件ECM中,基础变换可以分为水平方向和垂直方向,每个方向允许的变换方式包括以下7种:{'DCT2','DCT8','DST7','DCT5','DST4','DST1','IDTR'}。
其中,DCT2、DCT8、DCT5为离散余弦变换的几个子类,DST7、DST4、DST1为离散正弦变换的几个子类,IDTR为Identity transform,表示不变换。
进一步地,在参考软件ECM中,最常用的基础变换模式为水平方向和垂直方向都为DCT2,这里写作DCT2-DCT2,它被用作不可分二次变换LFNST前的一次变换,也被用作于多变换选择MTS技术 关闭时的变换。而在MTS模式选中时,变换过程将是基础变换在水平方向和垂直方向上的组合,而非不可分变换。
在一些实施例中,该方法还可以包括:确定当前块的非零系数信息;根据当前块的非零系数信息,确定至少一个候选变换核。
在本申请实施例中,至少一个候选变换核的个数小于或等于6个。也就是说,在参考软件ECM中,根据变换与量化后所确定的当前块中非零系数的特性,当前块可以有至多6个非DCT2-DCT2的变换核可选择。
这样,在本申请实施例中,针对插值滤波模式的预测块,其残差的MTS基础变换核应和当前块是否选中插值滤波模式相关。更具体地,可以和选中的是哪一种插值滤波模式和/或当前块的大小、形状相关。
在一种具体的实现方式中,确定当前块的目标变换核,可以包括:确定至少一个候选变换核;对至少一个候选变换核进行代价计算,确定至少一个候选变换核的代价结果;从至少一个候选变换核的代价结果中确定最小代价结果,将最小代价结果对应的候选变换核确定为当前块的目标变换核。
需要说明的是,在本申请实施例中,可以使用失真值的方式来确定代价结果,具体可以为率失真代价的方式来确定代价结果;但是也可以是SAD的大小,MSE的大小,SSE大小或其他的判断标准,例如变换编码增益,这里不作具体限定。
在一些实施例中,该方法还可以包括:确定当前块的变换核索引值,其中,变换核索引值用于指示目标变换核在至少一个候选变换核中的索引序号;对当前块的变换核索引值进行编码,将所得到的编码比特写入码流。
需要说明的是,在本申请实施例中,针对ECM的当前MTS模式下使用的基础变换核的候选,MTS可选的基础变换核与当前块是否选中插值滤波预测模式相关。若当前块使用了插值滤波预测模式,则6种可选的MTS变换核如下(变换核为:水平变换-垂直变换),具体如表3所示。
在这里,当MTS被选中且当前块的预测模式为插值预测模式时,可以确定出MTS变换核索引值并将其写入码流;以使得后续解码端能够根据解析出的MTS变换核索引值从6种变换核中选择对应的目标变换核进行反变换。
在另一些实施例中,该方法还可以包括:确定当前块的变换核索引值,其中,变换核索引值用于指示目标变换核在至少一个候选变换核中的索引序号,且至少一个候选变换核与当前块的尺寸参数具有关联关系;对当前块的变换核索引值进行编码,将所得到的编码比特写入码流。
还需要说明的是,在本申请实施例中,针对ECM的当前MTS模式下使用的基础变换核的候选,MTS可选的基础变换核与当前块是否选中插值滤波模式以及当前块的大小,形状相关;具体如表4所示。其中,当前块的形状大小为:高度×宽度。
在这里,当MTS被选中且当前块的预测模式为插值预测模式时,可以结合当前块的尺寸参数确定出MTS变换核索引值并将其写入码流;以使得后续解码端能够根据解析出的MTS变换核索引值以及当前块的形状大小选择出对应的目标变换核进行反变换。在此实施例中,插值滤波预测模式可应用与4×4到32×32的亮度块。
还需要说明的是,上述候选MTS变换核的获取方法可以包括:
步骤1、使用包含插值滤波预测模式的编码器编码图像集或视频集;
步骤2、将选中插值滤波模式的块的残差值按照分类(例如块的形状大小、插值滤波模式等)逐个类别的筛选可能的水平-垂直方向上的变换核。变换的核选择标准可以是SAD的大小、SSE大小或别的衡量标准,例如变换编码增益(transform coding gain),这里均不作具体限定。其中,变换编码增益的定义为算数平均的变换系数方差除以几何平均的变换系数方差。
进一步地,本申请实施例还提供了一种码流,码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:
当前块的目标滤波模式、当前块的残差值和当前块的变换核索引值。
需要说明的是,在本申请实施例中,在写入码流时,当前块的目标滤波模式也可以是通过第一语法元素标识信息的取值来写入码流的。另外,当前块的残差值也可以是在对残差值进行变换与量化之后,将所得到的量化系数写入码流。为了方便解码端快速确定出所使用的目标变换核,编码端也需要将当前块的变换核索引值写入码流;从而可以提高编解码效率。
本实施例提供了一种编码方法,确定当前块的目标滤波模式;根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;然后根据当前块的参考区域,确定当前块的滤波系数;再根据滤波系数对当前块进行帧内预测,确定当前块的预测值。这样,基于插值滤波的帧内预测技术,在确定用于计算滤波系数的参考区域时,不仅与目标滤波模式相关,而且还与当前块的尺寸参数有关,例如当前块的尺寸 较大时可以使用大的参考区域,当前块的尺寸较小时可以使用小的参考区域;如此,可以降低计算复杂度,减小编码时间;同时还可以提升帧内预测准确度,进而提升编解码性能。
在本申请的又一实施例中,基于前述实施例所述的编解码方法,基于插值滤波的帧内预测模式的改进,下面从几个方面针对改进点进行详细介绍。
(一)当前块的参考区域。
在本申请实施例中,参考区域总是使用13行和/或13列的重建像素值所组成的重建区域,这导致了在小块上计算复杂度远高于在大块上。而在编码端,编码器需要决策块的划分,增加小块的计算量更容易导致编码时间的增加。基于此,本申请实施例提出大块使用大的参考区域,小块使用小的参考区域,参考区域的行数和列数可以根据块的大小导出。具体参见前述的图12A、图12B和图12C。
(二)根据块的形状限制插值滤波模式的使能。
对于一个宽度为16、高度为4的当前块,若使用左侧重建区域获取插值滤波的系数,则待预测像素多,而用于获取插值滤波参数的区域中的像素少,具体如图12C所示。在这里,对于一个宽度为16、高度为4的当前块,tplSize为4,这意味着一共有4×16=64个待预测像素,而用于获取滤波系数的样本共有tplSize×(tplSize+4×2)=48个,过少样本获取得到的插值滤波系数往往造成预测效果不好。
在本申请实施例中,这里还提出针对当前块的宽度和高度的比值:width×N<height时,禁止使用上测重建区域进行插值滤波系数的导出,height×N<width时,禁止使用左侧重建区域进行插值滤波系数的导出。例如,N=2。
这样,在编码和解码插值滤波模式时,由于根据宽高比会限制一些插值滤波子模式,使得不同宽高比下允许使用插值滤波子模式的个数不同,所以解析插值滤波的语法元素标识符时,其上下文模型的选择应与块的形状,宽高比因素有关。需要注意的是,假定三种参考区域类别和三种滤波器的形状可以组成九种插值滤波模式,其中的每一种插值滤波模式可以看作为插值滤波子模式;换句话说,插值滤波模式可以包括九种插值滤波子模式。
(三)优化编码端自相关系数矩阵获取过程。
在本申请实施例中,可以通过将参考区域归类和划分,构建出不含有重复区域的自相关系数矩阵和互相关系数向量,用于供编码端导出每种组合的滤波器系数。
如前述实施例,插值滤波预测技术在解码端通过解析相关语法元素确定当前块选中的插值滤波器的形状和参考区域类别,在参考区域上遍历每一个位置构建自相关系数矩阵和互相关系数向量并解方程组获得滤波系数。
其中,所构建的自相关系数矩阵和互相关系数向量,线性方程组如下式,
其中,代表所选中的参考区域,t代表重建像素值,r代表参考区域种的坐标位置,p0…pN-1代表与位置r相对的坐标关系,它们指的相对坐标为插值滤波器的输入位置和输出位置之间的相对坐标关系。c0…cN-1为待求解的滤波系数,m为插值滤波器的输入减去的某个值(此时输出加上的某个值)。
本申请实施例中,编码端需要从3种参考区域和3种滤波器的形状一共9种组合种进行筛选,当选中了某一种组合时,对应的语法元素则编入码流,解码端如果解析出选中了某一个组合时,则只需要一次滤波系数的导出;这使得所述技术在编码端复杂度远高于解码端。
然而对于图2A、图2B和图2C这三种参考区域来说,它们都是由如图18A、图18B和图18C中的R0、R1和R2三部分构成的。在这里,使用f0,f1,f2表示3种滤波器形状,Rall,Rtop,Rleft表示3种参考区域。9种组合下的自相关系数矩阵与互相关系数向量可以写作如下:
其中,A代表自相关系数矩阵,Y代表互相关系数向量。
进一步地,通过观察可以发现由于Rall,Rtop,Rleft都可以由R0,R1,R2组成,所以上述9种组合可进一步分解为:
由矩阵和向量的加法的分解可以进一步表示为:


所以经过简化,在构建自相关系数矩阵和互相关系数向量时,只需要下列9组即可构建出所有滤波器系数获取所需的矩阵和向量,具体如下:
进一步地,编码器根据当前进行的组合导出滤波系数时和进行率失真优化时,每遇到没有构建的自相关系数矩阵和互相关系数向量时,都需要进行缓存,以供后续别的组合使用;从而减少编码端的计算复杂度。
(四)色度帧内预测模式的拓展。
DM模式进行预测时在很多标准中被应用的一个高效的帧内色度预测模式,当色度块选中使用了DM模式时,色度块会获取对应位置上亮度块选中的模式来进行帧内预测。前述实施例中所述的插值滤波技术仅作用于亮度的帧内块的预测,一个直接的做法是将该模式的拓展到色度上,但这会导致色度也需要导出滤波参数,这会带来很高的计算复杂度。在相关技术中,色度没有插值滤波预测模式,当色度帧内块选中了DM模式时,DM模式会设定为PLANAR模式。
然而,对于使用插值滤波模式的亮度块,可以通过构建梯度直方图的方法导出一个传统的预测模式,这个传统模式可以用来作为色度模式选中DM模式且对应位置亮度块选中了插值滤波模式时使用。
(五)传递插值滤波对应的传统预测模式。
在IBC块和帧间块中,它们不是帧内编码的块,所以不具备帧内预测模式,而IBC块和帧间块它们最初的参考块都为帧内预测块。在相关技术中,通过帧间块和IBC块在完成获取参考块时,也同时将参考块的帧内预测模式传递到当前块上,这些帧内预测模式为传统的帧内预测模式(PLANAR、DC、角度模式)。这些传递的传统帧内预测模式,用于在当前块构建帧内预测模式候选列表时,周围块为IBC块或帧间块时使用。
在一种可能的实现方式中,需要构建帧内预测候选列表的技术,可以包括如下:
(i)帧内编码的块:这些块可以使用一系列的帧内预测技术,例如空间几何划分技术(Spatial geometric partitioning mode,SGPM)、基于模板的多参考行帧内预测技术(Template-based multiple reference line intra prediction,TMRL)、最有可能帧内预测模式技术(Most probable mode,MPM)、基于模板的帧内模式推导(Template based intra mode derivation,TIMD)技术;
(ii)帧间块,这些块可以使用GPM(geometric partitioning mode,几何划分模式);
(iii)帧内块拷贝的块(Intra block copy,IBC),这些块可以使用帧内预测模式和拷贝获取的块共同得到预测结果。
也就是说,在本申请实施例中,对于IBC块或帧间块参考的位置为插值滤波模式时,使用插值滤波模式对应的传统模式进行传递。
(六)插值滤波模式预测块的基础变换核选择。
当前块在完成预测后,编码端将预测值与原始值求得残差值,残差值将进一步经过变换和量化,在解码端,从码流中解析出的量化系数将会经过反量化和反变换后得到重建的残差值,重建的残差值累加到预测值上即可得到重建值。
前述实施例中介绍了一种将插值滤波预测预测结果导出梯度直方图并匹配到传统预测模式上,进一步选择不可分变换核的方法。而在除了不可分变换核外其他的基础变换核中,变换核的选择与PLANAR模式的选择方式相同。然后,插值滤波模式与PLANAR模式的特性不同,对与基础变换核的选择应更加优化。
在参考软件ECM中,基础变换分为水平方向和垂直方向,每个方向允许的变换方式包括以下7种:{'DCT2','DCT8','DST7','DCT5','DST4','DST1','IDTR'}。其中,DCT2、DCT8、DCT5为离散余弦变换的几个子类,DST7、DST4、DST1为离散正弦变换的几个子类,IDTR为Identity transform表示不变换。
在参考软件ECM中,最常用的基础变换模式为水平方向和垂直方向都为DCT2,写作DCT2-DCT2,它被用作不可分二次变换LFNST前的一次变换,也被用作于多变换选择(MTS)技术关闭时的变换。而在MTS模式选中时,变换过程将是基础变换在水平方向和垂直方向上的组合,而非不可分变换。在ECM中,根据解析出的当前块中非零系数的特性,当前块可以有至多6个非DCT2-DCT2的变换核可选择。
在本申请实施例中,针对插值滤波模式的预测块,其残差的MTS基础变换核应和当前块是否选中插值滤波模式相关,更具体的,可以和选中的是哪一种插值滤波模式的子模式和/或是当前块的大小、形状相关。
示例性地,本申请实施例给出两种可以在ECM当前MTS设计下使用的基础变化核心候选的实现方式。
在一种可能的实现方式中,MTS可选基础变换核与当前块是否选中了插值滤波预测模式相关,若当前块使用插值滤波预测模式,则6种MTS变换核如下(变换核为:水平变换-垂直变换)。具体参见表3,当MTS被选中且当前块的预测模式为插值预测模式时,根据解析出的MTS变换核索引值从6种变换核中选择对应的目标变换核进行反变换。
在另一种可能的实现方式中,MTS可选的基础变换核与当前块是否选中了插值滤波模式以及当前块的大小、形状相关,块的形状大小为:高度×宽度。具体参见表4,当MTS被选中且当前块的预测模式为插值预测模式时,根据解析出的MTS变换核索引值以及块的形状大小选出对应的目标变换核进行反变换。在此实施例中,插值滤波预测模式可应用与4×4到32×32的亮度块。
还需要说明的是,上述候选MTS变换核的获取方法可以包括:
步骤1、使用包含插值滤波预测模式的编码器编码图像集或视频集
步骤2、将选中插值滤波模式的块的残差按照分类(例如块的形状大小,插值滤波模式)逐个类别的筛选可能的水平-垂直方向上的变换核。变换的核选择标准可以是SAD的大小、SSE大小或别的衡量标准,例如变换编码增益(transform coding gain)。变换编码增益的定义为算数平均的变换系数方差除以几何平均的变换系数方差。
(七)插值滤波中的非线性项。
在前述实施例描述的插值滤波中,插值滤波的预测不含有非线性项或偏置项,为了提升非线性项或偏置项带来的编码性能增益,这里也可以在插值滤波中增加非线性项或偏置项。其中,此实施过程使用的15个线性项为如图3A、图3B和图3C所示的三种情况,插值滤波器15个抽头的线性项为网格填充位置,黑色填充位置为当前待预测位置。在此基础上,还可以增加3个抽头非线性项,非线性项使用的重建像素位置如图14A、图14B、图14C所示,具体是三个用点填充位置。
在这里,15个线性项的插值输入pi=ti-m,i的取值为0~14,对应着当前待预测位置周围的14个网格填充位置,ti为网格填充位置上的重建值或预测值(取决与当前待预测位置需要的输入位于当前块内还是参考区域中),m为减去的某一数值,它可以是当前块左上角的重建值,或者也可以是参考区域的平均值,这里不作具体限定。
在这里,3个非线性项的插值输入pi=((ti-m)×(ti-m)+midVal)>>bitDepth,i为用点填充的三个位置,pi为非线性项的值,midVal和bitDepth在10bit的情况下等于512和10。如此,在添加了非线性项的情况下,对于当前预测位置,预测值的计算公式如下所示:
还需要注意的是,在插值滤波系数的获取中,构建自相关系数矩阵和互相关系数向量时也应增加对应的非线性项值;和/或,当存在偏置项时,构建自相关系数矩阵和互相关系数向量时也应进一步增加偏置项值。
除了上述实施例之外,在目标滤波器的15个抽头的线性项中增加3个抽头非线性项,也可以如图 15A、图15B、图15C所示,非线性项具体是三个用点填充位置,黑色填充位置表示当前待预测位置。其中,图15A、图15B、图15C相比图14A、图14B、图14C来说,虽然都是增加了三个非线性项,但是由于不同的滤波器形状都使用相同的非线性项,计算更为简单,进一步降低了复杂度。
进一步地,对于非线性项的数目,除了使用3个非线性项外,本申请实施例也可以使用更多的非线性项,例如图16A、图16B、图16C中使用了5个非线性项。如图16A、图16B、图16C所示,在插值滤波器的15个抽头的线性项基础上,增加5个抽头的非线性项(具体为用点填充位置)。也就是说,在本申请实施例中,对于非线性项的个数应是正整数个,具体数目不作限定,而且可以根据性能复杂度要求进行不同的设计。
在本申请实施例中,通过上述实施例对前述实施例的具体实现进行详细阐述,从中可以看出,根据前述实施例的技术方案,在保证编解码性能的情况下,还可以降低计算复杂度,减小编码时间,使得编解码性能与编码复杂度的性价比得以提升,同时还能够提升帧内预测准确度,进而提高编解码效率。
在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图20,其示出了本申请实施例提供的一种编码器的组成结构示意图。如图20所示,该编码器220可以包括第一确定单元2201和第一预测单元2202,其中:
第一确定单元2201,配置为确定当前块的目标滤波模式;以及根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;
第一预测单元2202,配置为根据当前块的参考区域,确定当前块的滤波系数;以及根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
在一些实施例中,第一确定单元2201,还配置为确定至少一种候选滤波模式;对至少一种候选滤波模式进行代价计算,确定至少一种候选滤波模式的代价结果;以及从至少一种候选滤波模式的代价结果中确定最小代价结果,将最小代价结果对应的候选滤波模式确定为当前块的目标滤波模式。
在一些实施例中,至少一种候选滤波模式的个数是基于当前块的参考区域类别数量和目标滤波器的形状数量确定的。
在一些实施例中,目标滤波模式包括当前块的参考区域类别和目标滤波器的形状。
在一些实施例中,第一确定单元2201,还配置为若当前块的参考区域类别为第一类别时,则确定当前块的参考区域包括上相邻区域和左相邻区域;若当前块的参考区域类别为第二类别时,则确定当前块的参考区域包括上相邻区域;若当前块的参考区域类别为第三类别时,则确定当前块的参考区域包括左相邻区域;其中,上相邻区域是指与当前块的上侧相邻的已重建区域,左相邻区域是指与当前块的左侧相邻的已重建区域。
在一些实施例中,当前块的尺寸参数包括当前块的高度和宽度;第一确定单元2201,还配置为从当前块的高度与宽度中确定最小参数;以及根据最小参数和目标滤波模式,确定当前块的参考区域。
在一些实施例中,当前块的参考区域的大小与目标滤波器的形状和最小参数具有关联关系。
在一些实施例中,第一确定单元2201,还配置为若当前块的宽度与第一因子的倍数小于当前块的高度,则禁止当前块的参考区域类别为第二类别,以及确定当前块的参考区域类别数量是基于除第二类别之外的其他参考区域类别确定的;若当前块的高度与第一因子的倍数小于当前块的宽度,则禁止当前块的参考区域类别为第三类别,以及确定当前块的参考区域类别数量是基于除第三类别之外的其他参考区域类别确定的。
在一些实施例中,第一因子的取值为第一预设常数。
在一些实施例中,参见图20,编码器220还可以包括编码单元2203,配置为对当前块的目标滤波模式进行编码,将所得到的编码比特写入码流。
在一些实施例中,第一确定单元2201,还配置为确定当前块的上下文模型;
编码单元2203,还配置为基于上下文模型对当前块的目标滤波模式进行编码,将所得到的编码比特写入码流。
在一些实施例中,上下文模型的确定与下述参数中的至少一项具有关联关系:
当前块的形状;
当前块的宽度与高度的比值。
在一些实施例中,第一确定单元2201,还配置为确定当前块的多个候选子参考区域,且多个候选子参考区域互不重叠;根据多个候选子参考区域和目标滤波器的形状,确定多个候选子参考区域各自的自相关系数矩阵和互相关系数向量;以及将多个候选子参考区域各自的自相关系数矩阵和互相关系数向量存储至预设缓存区中。
在一些实施例中,第一确定单元2201,还配置为根据第一候选子参考区域和目标滤波器的形状, 确定第一候选子参考区域中至少一个参考像素对应的目标滤波器的输入值和目标滤波器的输出值;根据至少一个参考像素对应的目标滤波器的输入值,确定第一候选子参考区域的自相关系数矩阵;以及根据至少一个参考像素对应的目标滤波器的输入值和目标滤波器的输出值,确定第一候选子参考区域的互相关系数向量;其中,第一候选子参考区域为多个候选子参考区域中的任意一个。
在一些实施例中,第一确定单元2201,还配置为对当前块的参考区域进行划分,确定至少一个子参考区域;从预设缓存区中获取至少一个子参考区域各自的自相关系数矩阵和互相关系数向量;根据至少一个子参考区域各自的自相关系数矩阵和互相关系数向量,确定目标滤波器的系数;以及将目标滤波器的系数确定为当前块的滤波系数。
在一些实施例中,第一确定单元2201,还配置为确定当前块中待预测像素对应的参考样值;
第一预测单元2202,还配置为根据当前块中待预测像素对应的参考样值和滤波系数,确定当前块中待预测像素的预测值。
在一些实施例中,第一确定单元2201,还配置为基于目标滤波器的形状,若参考样值位于当前块的参考区域,则将参考区域中对应位置处的重建值确定为参考样值;若参考样值位于当前块的内部,则将当前块中对应位置处的预测值确定为参考样值。
在一些实施例中,第一预测单元2202,还配置为基于当前块中待预测像素对应的参考样值,确定目标滤波器的第一输入值;基于第一输入值和滤波系数,确定目标滤波器的第一输出值;以及根据第一输出值,确定当前块中待预测像素的预测值。
在一些实施例中,第一确定单元2201,还配置为确定第二因子;以及对参考样值与第二因子进行减法运算,得到目标滤波器的第一输入值。
在一些实施例中,第一确定单元2201,还配置为基于第一输入值和滤波系数,确定目标滤波器的第二输出值;以及对第二输出值进行第一处理,确定目标滤波器的第一输出值。
在一些实施例中,第一确定单元2201,还配置为计算第一输入值与对应的滤波系数的乘积;以及将目标滤波器的第二输出值设置为等于n个乘积之和;其中,n表示目标滤波器对应的输入项数,且n为正整数。
在一些实施例中,第一确定单元2201,还配置为对第二输出值与第二因子进行加法运算,得到目标滤波器的第一输出值。
在一些实施例中,第一确定单元2201,还配置为确定目标滤波器的第三输出值;根据第二输出值和第三输出值,确定目标滤波器的第四输出值;以及对第四输出值与第二因子进行加法运算,得到目标滤波器的第一输出值。
在一些实施例中,第一确定单元2201,还配置为基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+q个滤波系数,p、q均为正整数;以及根据p+q个滤波系数中的q个滤波系数和q个第二类型输入项数,确定目标滤波器的第三输出值。
在一些实施例中,第一确定单元2201,还配置为基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+m个滤波系数,p、m均为正整数;以及根据p+m个滤波系数中的m个滤波系数和m个第三类型输入项数,确定目标滤波器的第三输出值。
在一些实施例中,第一确定单元2201,还配置为基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+k个滤波系数,p、k均为正整数;以及根据p+k个滤波系数中的i个滤波系数和i个第二类型输入项数以及p+k个滤波系数中的j个滤波系数和j个第三类型输入项数,确定目标滤波器的第三输出值;其中,i、j均为正整数,且k=i+j。
在一些实施例中,第一类型输入项数与参考样值之间具有线性关系,第二类型输入项数与参考样值之间具有非线性关系,第三类型输入项数为预设的偏置信息。
在一些实施例中,第二因子的取值为第二预设常数。
在一些实施例中,第一确定单元2201,还配置为确定参考区域中至少一个参考像素的重建值;对至少一个参考像素的重建值进行均值计算,得到第一均值;以及将第二因子的取值设置为等于第一均值。
在一些实施例中,第一预测单元2202,还配置为对第一输出值进行第二处理,得到当前块中待预测像素的预测值。
在一些实施例中,第一预测单元2202,还配置为第二处理是将当前块中待预测像素的预测值设置为等于第一输出值。
在一些实施例中,第一预测单元2202,还配置为第二处理是将第一输出值限制在预设数值范围之 内;其中,预设数值范围的下限值为参考区域中的最小重建值,预设数值范围的上限值为参考区域中的最大重建值。
在一些实施例中,第一确定单元2201,还配置为若当前块的亮度分量使用基于滤波系数的帧内预测,则确定当前块的亮度分量的推导帧内预测模式;若当前块的色度分量使用直接模式的帧内预测,则将直接模式设置为推导帧内预测模式,以确定当前块的色度分量的预测值。
在一些实施例中,第一确定单元2201,还配置为在当前块满足预设条件时,确定当前块的参考块;若参考块使用基于滤波系数的帧内预测,确定参考块的推导帧内预测模式;以及将推导帧内预测模式添加至当前块的帧内预测模式候选列表中。
在一些实施例中,当前块满足预设条件,至少包括下述其中一项:
当前块为帧间预测块;
当前块IBC块。
在一些实施例中,第一确定单元2201,还配置为确定当前块的原始值;以及根据当前块的原始值和当前块的预测值,确定当前块的残差值;
编码单元2203,还配置为对当前块的残差值进行编码,将所得到的编码比特写入码流。
在一些实施例中,编码单元2203,还配置为对残差值进行变换处理,得到当前块的变换系数;对变换系数进行量化处理,得到当前块的量化系数;以及对当前块的量化系数进行编码,将所得到的编码比特写入码流。
在一些实施例中,编码单元2203,还配置为在当前块使用多变换选择模式且目标滤波模式为插值滤波模式时,确定当前块的目标变换核;以及根据目标变换核对残差值进行变换处理,得到当前块的变换系数。
在一些实施例中,目标变换核的确定与下述参数中的至少一项具有关联关系:
当前块的目标滤波模式;
当前块的尺寸参数;
当前块的形状。
在一些实施例中,第一确定单元2201,还配置为确定至少一个候选变换核;对至少一个候选变换核进行代价计算,确定至少一个候选变换核的代价结果;以及从至少一个候选变换核的代价结果中确定最小代价结果,将最小代价结果对应的候选变换核确定为当前块的目标变换核。
在一些实施例中,第一确定单元2201,还配置为确定当前块的非零系数信息;以及根据当前块的非零系数信息,确定至少一个候选变换核。
在一些实施例中,至少一个候选变换核的个数小于或等于6个。
在一些实施例中,第一确定单元2201,还配置为确定当前块的变换核索引值,其中,变换核索引值用于指示目标变换核在至少一个候选变换核中的索引序号;
编码单元2203,还配置为对当前块的变换核索引值进行编码,将所得到的编码比特写入码流。
在一些实施例中,第一确定单元2201,还配置为确定当前块的变换核索引值,其中,变换核索引值用于指示目标变换核在至少一个候选变换核中的索引序号,且至少一个候选变换核与当前块的尺寸参数具有关联关系;
编码单元2203,还配置为对当前块的变换核索引值进行编码,将所得到的编码比特写入码流。
可以理解地,在本申请实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器220,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。
基于编码器220的组成以及计算机可读存储介质,参见图21,其示出了本申请实施例提供的编码器220的具体硬件结构示意图。如图21所示,编码器220可以包括:第一通信接口2301、第一存储器 2302和第一处理器2303;各个组件通过第一总线系统2304耦合在一起。可理解,第一总线系统2304用于实现这些组件之间的连接通信。第一总线系统2304除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图21中将各种总线都标为第一总线系统2304。其中,
第一通信接口2301,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第一存储器2302,用于存储能够在第一处理器2303上运行的计算机程序;
第一处理器2303,用于在运行所述计算机程序时,执行:
确定当前块的目标滤波模式;
根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;
根据当前块的参考区域,确定当前块的滤波系数;
根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
可以理解,本申请实施例中的第一存储器2302可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器2302旨在包括但不限于这些和任意其它适合类型的存储器。
而第一处理器2303可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器2303中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器2303可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器2302,第一处理器2303读取第一存储器2302中的信息,结合其硬件完成上述方法的步骤。
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。
可选地,作为另一个实施例,第一处理器2303还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
本实施例提供了一种编码器,对于该编码器而言,基于插值滤波的帧内预测技术,在确定用于计算滤波系数的参考区域时,不仅与目标滤波模式相关,而且还与当前块的尺寸参数有关,例如当前块的尺寸较大时可以使用大的参考区域,当前块的尺寸较小时可以使用小的参考区域;如此,可以降低计算复杂度,减小编码时间;同时还可以提升帧内预测准确度,进而提升编解码性能。
在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图22,其示出了本申请实施例提供的一种解码器的组成结构示意图。如图22所示,该解码器240可以包括解码单元2401、第二确定单元2402和第二预测单元2403,其中:
解码单元2401,配置为解码码流,确定当前块的目标滤波模式;
第二确定单元2402,配置为根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;
第二预测单元2403,配置为根据当前块的参考区域,确定当前块的滤波系数;以及根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
在一些实施例中,目标滤波模式包括当前块的参考区域类别和目标滤波器的形状。
在一些实施例中,第二确定单元2402,还配置为若当前块的参考区域类别为第一类别时,则确定当前块的参考区域包括上相邻区域和左相邻区域;若当前块的参考区域类别为第二类别时,则确定当前块的参考区域包括上相邻区域;若当前块的参考区域类别为第三类别时,则确定当前块的参考区域包括左相邻区域;其中,上相邻区域是指与当前块的上侧相邻的已重建区域,左相邻区域是指与当前块的左侧相邻的已重建区域。
在一些实施例中,当前块的尺寸参数包括当前块的高度和宽度;第二确定单元2402,还配置为从当前块的高度与宽度中确定最小参数;以及根据最小参数和目标滤波模式,确定当前块的参考区域。
在一些实施例中,当前块的参考区域的大小与目标滤波器的形状和最小参数具有关联关系。
在一些实施例中,第二确定单元2402,还配置为若当前块的宽度与第一因子的倍数小于当前块的高度,则确定目标预测模式中的参考区域类别为除第二类别之外的任意一项;若当前块的高度与第一因子的倍数小于当前块的宽度,则确定目标预测模式中的参考区域类别为除第三类别之外的任意一项。
在一些实施例中,第一因子的取值为第一预设常数。
在一些实施例中,第二确定单元2402,还配置为确定当前块的上下文模型;
解码单元2401,还配置为基于上下文模型解码码流,确定当前块的目标滤波模式。
在一些实施例中,上下文模型的确定与下述参数中的至少一项具有关联关系:
当前块的形状;
当前块的宽度与高度的比值。
在一些实施例中,第二确定单元2402,还配置为根据当前块的参考区域和目标滤波器的形状,确定参考区域中至少一个参考像素对应的目标滤波器的输入值和目标滤波器的输出值;根据至少一个参考像素对应的目标滤波器的输入值,确定自相关系数矩阵;根据至少一个参考像素对应的目标滤波器的输入值和目标滤波器的输出值,确定互相关系数向量;根据自相关系数矩阵和互相关系数向量,确定目标滤波器的系数;以及将目标滤波器的系数确定为当前块的滤波系数。
在一些实施例中,第二预测单元2403,还配置为确定当前块中待预测像素对应的参考样值;以及根据当前块中待预测像素对应的参考样值和滤波系数,确定当前块中待预测像素的预测值。
在一些实施例中,第二确定单元2402,还配置为基于目标滤波器的形状,若参考样值位于当前块的参考区域,则将参考区域中对应位置处的重建值确定为参考样值;若参考样值位于当前块的内部,则将当前块中对应位置处的预测值确定为参考样值。
在一些实施例中,第二预测单元2403,还配置为基于当前块中待预测像素对应的参考样值,确定目标滤波器的第一输入值;基于第一输入值和滤波系数,确定目标滤波器的第一输出值;以及根据第一输出值,确定当前块中待预测像素的预测值。
在一些实施例中,第二确定单元2402,还配置为确定第二因子;以及对参考样值与第二因子进行减法运算,得到目标滤波器的第一输入值。
在一些实施例中,第二确定单元2402,还配置为基于第一输入值和滤波系数,确定目标滤波器的第二输出值;以及对第二输出值进行第一处理,确定目标滤波器的第一输出值。
在一些实施例中,第二确定单元2402,还配置为计算第一输入值与对应的滤波系数的乘积;以及将目标滤波器的第二输出值设置为等于n个乘积之和;其中,n表示目标滤波器对应的输入项数,且n为正整数。
在一些实施例中,第二确定单元2402,还配置为对第二输出值与第二因子进行加法运算,得到目标滤波器的第一输出值。
在一些实施例中,第二确定单元2402,还配置为确定目标滤波器的第三输出值;根据第二输出值和第三输出值,确定目标滤波器的第四输出值;以及对第四输出值与第二因子进行加法运算,得到目标滤波器的第一输出值。
在一些实施例中,第二确定单元2402,还配置为基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+q个滤波系数,p、q均为正整数;以及根据p+q个滤波系数中的q个滤波系数和q个第二类型输入项数,确定目标滤波器的第三输出值。
在一些实施例中,第二确定单元2402,还配置为基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+m个滤波系数,p、m均为正整数;以及根据p+m个滤波系数中的m个滤波系数和m个第三类型输入项数,确定目标滤波器的第三输出值。
在一些实施例中,第二确定单元2402,还配置为基于目标滤波器的形状,确定目标滤波器对应的第一类型输入项数;若目标滤波器对应的第一类型输入项数为p,则确定目标滤波器的p+k个滤波系数, p、k均为正整数;以及根据p+k个滤波系数中的i个滤波系数和i个第二类型输入项数以及p+k个滤波系数中的j个滤波系数和j个第三类型输入项数,确定目标滤波器的第三输出值;其中,i、j均为正整数,且k=i+j。
在一些实施例中,第一类型输入项数与参考样值之间具有线性关系,第二类型输入项数与参考样值之间具有非线性关系,第三类型输入项数为预设的偏置信息。
在一些实施例中,第二因子的取值为第二预设常数。
在一些实施例中,第二确定单元2402,还配置为确定参考区域中至少一个参考像素的重建值;对至少一个参考像素的重建值进行均值计算,得到第一均值;以及将第二因子的取值设置为等于第一均值。
在一些实施例中,第二预测单元2403,还配置为对第一输出值进行第二处理,得到当前块中待预测像素的预测值。
在一些实施例中,第二预测单元2403,还配置为第二处理是将当前块中待预测像素的预测值设置为等于第一输出值。
在一些实施例中,第二预测单元2403,还配置为第二处理是将第一输出值限制在预设数值范围之内;其中,预设数值范围的下限值为参考区域中的最小重建值,预设数值范围的上限值为参考区域中的最大重建值。
在一些实施例中,第二确定单元2402,还配置为若当前块的亮度分量使用基于滤波系数的帧内预测,则确定当前块的亮度分量的推导帧内预测模式;若当前块的色度分量使用直接模式的帧内预测,则将直接模式设置为推导帧内预测模式,以确定当前块的色度分量的预测值。
在一些实施例中,第二确定单元2402,还配置为在当前块满足预设条件时,确定当前块的参考块;若参考块使用基于滤波系数的帧内预测,确定参考块的推导帧内预测模式;以及将推导帧内预测模式添加至当前块的帧内预测模式候选列表中。
在一些实施例中,当前块满足预设条件,至少包括下述其中一项:
当前块为帧间预测块;
当前块为帧内块拷贝IBC块。
在一些实施例中,解码单元2401,还配置为解码码流,确定当前块的残差值;
第二确定单元2402,还配置为根据当前块的预测值和当前块的残差值,确定当前块的重建值。
在一些实施例中,解码单元2401,还配置为解码码流,确定当前块的量化系数;对量化系数进行反量化处理,得到当前块的变换系数;以及对变换系数进行反变换处理,得到当前块的残差值。
在一些实施例中,解码单元2401,还配置为在当前块使用多变换选择模式且目标滤波模式为插值滤波模式时,确定当前块的目标变换核;以及根据目标变换核对变换系数进行反变换处理,得到当前块的残差值。
在一些实施例中,目标变换核的确定与下述参数中的至少一项具有关联关系:
当前块的目标滤波模式;
当前块的尺寸参数;
当前块的形状。
在一些实施例中,解码单元2401,还配置为解码码流,确定当前块的变换核索引值;
第二确定单元2402,还配置为根据变换核索引值,从至少一个候选变换核中确定当前块的目标变换核。
在一些实施例中,解码单元2401,还配置为解码码流,确定当前块的变换核索引值;
第二确定单元2402,还配置为根据变换核索引值和当前块的尺寸参数,从至少一个候选变换核中确定当前块的目标变换核。
在一些实施例中,第二确定单元2402,还配置为解码码流,确定当前块的非零系数信息;
第二确定单元2402,还配置为根据当前块的非零系数信息,确定至少一个候选变换核。
在一些实施例中,至少一个候选变换核的个数小于或等于6个。
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器240,该计算机可读存储介质存储有计算机程序,所述计算机程序被第二处理器执行时实现前述实施例中任一项所述的方法。
基于解码器240的组成以及计算机可读存储介质,参见图23,其示出了本申请实施例提供的解码器240的具体硬件结构示意图。如图23所示,解码器240可以包括:第二通信接口2501、第二存储器2502和第二处理器2503;各个组件通过第二总线系统2504耦合在一起。可理解,第二总线系统2504用于实现这些组件之间的连接通信。第二总线系统2504除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图23中将各种总线都标为第二总线系统2504。其中,
第二通信接口2501,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;
第二存储器2502,用于存储能够在第二处理器2503上运行的计算机程序;
第二处理器2503,用于在运行所述计算机程序时,执行:
解码码流,确定当前块的目标滤波模式;
根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;
根据当前块的参考区域,确定当前块的滤波系数;
根据滤波系数对当前块进行帧内预测,确定当前块的预测值。
可选地,作为另一个实施例,第二处理器2503还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。
可以理解,第二存储器2502与第一存储器2302的硬件功能类似,第二处理器2503与第一处理器2303的硬件功能类似;这里不再详述。
本实施例提供了一种解码器,对于该解码器而言,基于插值滤波的帧内预测技术,在确定用于计算滤波系数的参考区域时,不仅与目标滤波模式相关,而且还与当前块的尺寸参数有关,例如当前块的尺寸较大时可以使用大的参考区域,当前块的尺寸较小时可以使用小的参考区域;如此,可以降低计算复杂度,同时还可以提升帧内预测准确度,进而提升编解码性能。
在本申请的再一实施例中,参见图24,其示出了本申请实施例提供的一种编解码系统的组成结构示意图。如图24所示,编解码系统260可以包括编码器2601和解码器2602。
在本申请实施例中,编码器2601可以为前述实施例中任一项所述的编码器,解码器2602可以为前述实施例中任一项所述的解码器。
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例中,无论是在编码端还是解码端,在确定出当前块的目标滤波模式之后,根据当前块的尺寸参数和目标滤波模式,确定当前块的参考区域;然后根据当前块的参考区域,确定当前块的滤波系数;再根据滤波系数对当前块进行帧内预测,确定当前块的预测值。这样,基于插值滤波的帧内预测技术,在确定用于计算滤波系数的参考区域时,不仅与目标滤波模式相关,而且还与当前块的尺寸参数有关,例如当前块的尺寸较大时可以使用大的参考区域,当前块的尺寸较小时可以使用小的参考区域;如此,在保证编解码性能的情况下,还可以降低计算复杂度,减小编码时间,使得编解码性能与编码复杂度的性价比得以提升,同时还能够提升帧内预测准确度,进而提高编解码效率。

Claims (88)

  1. 一种解码方法,应用于解码器,所述方法包括:
    解码码流,确定当前块的目标滤波模式;
    根据所述当前块的尺寸参数和所述目标滤波模式,确定所述当前块的参考区域;
    根据所述当前块的参考区域,确定所述当前块的滤波系数;
    根据所述滤波系数对所述当前块进行帧内预测,确定所述当前块的预测值。
  2. 根据权利要求1所述的方法,其中,所述目标滤波模式包括所述当前块的参考区域类别和目标滤波器的形状。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    若所述当前块的参考区域类别为第一类别时,则确定所述当前块的参考区域包括上相邻区域和左相邻区域;
    若所述当前块的参考区域类别为第二类别时,则确定所述当前块的参考区域包括上相邻区域;
    若所述当前块的参考区域类别为第三类别时,则确定所述当前块的参考区域包括左相邻区域;
    其中,所述上相邻区域是指与所述当前块的上侧相邻的已重建区域,所述左相邻区域是指与所述当前块的左侧相邻的已重建区域。
  4. 根据权利要求3所述的方法,其中,所述当前块的尺寸参数包括所述当前块的高度和宽度;所述基于所述当前块的尺寸参数和所述目标滤波模式,确定所述当前块的参考区域,包括:
    从所述当前块的高度与宽度中确定最小参数;
    根据所述最小参数和所述目标滤波模式,确定所述当前块的参考区域。
  5. 根据权利要求4所述的方法,其中,所述当前块的参考区域的大小与所述目标滤波器的形状和所述最小参数具有关联关系。
  6. 根据权利要求3所述的方法,其中,所述方法还包括:
    若所述当前块的宽度与第一因子的倍数小于所述当前块的高度,则确定所述目标预测模式中的参考区域类别为除所述第二类别之外的任意一项;
    若所述当前块的高度与第一因子的倍数小于所述当前块的宽度,则确定所述目标预测模式中的参考区域类别为除所述第三类别之外的任意一项。
  7. 根据权利要求6所述的方法,其中,所述第一因子的取值为第一预设常数。
  8. 根据权利要求1所述的方法,其中,所述解码码流,确定当前块的目标滤波模式,包括:
    确定所述当前块的上下文模型;
    基于所述上下文模型解码码流,确定所述当前块的目标滤波模式。
  9. 根据权利要求8所述的方法,其中,所述上下文模型的确定与下述参数中的至少一项具有关联关系:
    所述当前块的形状;
    所述当前块的宽度与高度的比值。
  10. 根据权利要求2所述的方法,其中,所述根据所述当前块的参考区域,确定所述当前块的滤波系数,包括:
    根据所述当前块的参考区域和所述目标滤波器的形状,确定所述参考区域中至少一个参考像素对应的所述目标滤波器的输入值和所述目标滤波器的输出值;
    根据所述至少一个参考像素对应的所述目标滤波器的输入值,确定自相关系数矩阵;
    根据所述至少一个参考像素对应的所述目标滤波器的输入值和所述目标滤波器的输出值,确定互相关系数向量;
    根据所述自相关系数矩阵和所述互相关系数向量,确定所述目标滤波器的系数;
    将所述目标滤波器的系数确定为所述当前块的滤波系数。
  11. 根据权利要求2至10中任一项所述的方法,其中,所述根据所述滤波系数对所述当前块中的像素点进行帧内预测,确定所述当前块中的像素点的预测值,包括:
    确定所述当前块中待预测像素对应的参考样值;
    根据所述当前块中待预测像素对应的参考样值和所述滤波系数,确定所述当前块中待预测像素的预测值。
  12. 根据权利要求11所述的方法,其中,所述确定所述当前块中待预测像素对应的参考样值,包括:
    基于所述目标滤波器的形状,若所述参考样值位于所述当前块的参考区域,则将所述参考区域中对应位置处的重建值确定为所述参考样值;
    若所述参考样值位于所述当前块的内部,则将所述当前块中对应位置处的预测值确定为所述参考样值。
  13. 根据权利要求11所述的方法,其中,所述根据所述当前块中待预测像素对应的参考样值和所述滤波系数,确定所述当前块中待预测像素的预测值,包括:
    基于所述当前块中待预测像素对应的参考样值,确定所述目标滤波器的第一输入值;
    基于所述第一输入值和所述滤波系数,确定所述目标滤波器的第一输出值;
    根据所述第一输出值,确定所述当前块中待预测像素的预测值。
  14. 根据权利要求13所述的方法,其中,所述基于所述当前块中待预测像素对应的参考样值,确定所述目标滤波器的第一输入值,包括:
    确定第二因子;
    对所述参考样值与所述第二因子进行减法运算,得到所述目标滤波器的第一输入值。
  15. 根据权利要求14所述的方法,其中,所述基于所述第一输入值和所述滤波系数,确定所述目标滤波器的第一输出值,包括:
    基于所述第一输入值和所述滤波系数,确定所述目标滤波器的第二输出值;
    对所述第二输出值进行第一处理,确定所述目标滤波器的第一输出值。
  16. 根据权利要求15所述的方法,其中,所述基于所述第一输入值和所述滤波系数,确定所述目标滤波器的第二输出值,包括:
    计算所述第一输入值与对应的所述滤波系数的乘积;
    将所述目标滤波器的第二输出值设置为等于n个所述乘积之和;其中,n表示所述目标滤波器对应的输入项数,且n为正整数。
  17. 根据权利要求15所述的方法,其中,所述对所述第二输出值进行第一处理,确定所述目标滤波器的第一输出值,包括:
    对所述第二输出值与所述第二因子进行加法运算,得到所述目标滤波器的第一输出值。
  18. 根据权利要求15所述的方法,其中,所述对所述第二输出值进行第一处理,确定所述目标滤波器的第一输出值,包括:
    确定所述目标滤波器的第三输出值;
    根据所述第二输出值和所述第三输出值,确定所述目标滤波器的第四输出值;
    对所述第四输出值与所述第二因子进行加法运算,得到所述目标滤波器的第一输出值。
  19. 根据权利要求18所述的方法,其中,所述确定所述目标滤波器的第三输出值,包括:
    基于所述目标滤波器的形状,确定所述目标滤波器对应的第一类型输入项数;
    若所述目标滤波器对应的第一类型输入项数为p,则确定所述目标滤波器的p+q个滤波系数,p、q均为正整数;
    根据所述p+q个滤波系数中的q个滤波系数和q个第二类型输入项数,确定所述目标滤波器的第三输出值。
  20. 根据权利要求18所述的方法,其中,所述确定所述目标滤波器的第三输出值,包括:
    基于所述目标滤波器的形状,确定所述目标滤波器对应的第一类型输入项数;
    若所述目标滤波器对应的第一类型输入项数为p,则确定所述目标滤波器的p+m个滤波系数,p、m均为正整数;
    根据所述p+m个滤波系数中的m个滤波系数和m个第三类型输入项数,确定所述目标滤波器的第三输出值。
  21. 根据权利要求18所述的方法,其中,所述确定所述目标滤波器的第三输出值,包括:
    基于所述目标滤波器的形状,确定所述目标滤波器对应的第一类型输入项数;
    若所述目标滤波器对应的第一类型输入项数为p,则确定所述目标滤波器的p+k个滤波系数,p、k均为正整数;
    根据所述p+k个滤波系数中的i个滤波系数和i个第二类型输入项数以及所述p+k个滤波系数中的j个滤波系数和j个第三类型输入项数,确定所述目标滤波器的第三输出值;其中,i、j均为正整数,且k=i+j。
  22. 根据权利要求21所述的方法,其中,所述第一类型输入项数与所述参考样值之间具有线性关系,所述第二类型输入项数与所述参考样值之间具有非线性关系,所述第三类型输入项数为预设的偏置信息。
  23. 根据权利要求14、17或18所述的方法,其中,所述第二因子的取值为第二预设常数。
  24. 根据权利要求14、17或18所述的方法,其中,所述确定第二因子,包括:
    确定所述参考区域中至少一个参考像素的重建值;
    对所述至少一个参考像素的重建值进行均值计算,得到第一均值;
    将所述第二因子的取值设置为等于所述第一均值。
  25. 根据权利要求13所述的方法,其中,所述根据所述第一输出值,确定所述当前块中待预测像素的预测值,包括:
    对所述第一输出值进行第二处理,得到所述当前块中待预测像素的预测值。
  26. 根据权利要求25所述的方法,其中,所述方法还包括:
    所述第二处理是将所述当前块中待预测像素的预测值设置为等于所述第一输出值。
  27. 根据权利要求25所述的方法,其中,所述方法还包括:
    所述第二处理是将所述第一输出值限制在预设数值范围之内;
    其中,所述预设数值范围的下限值为所述参考区域中的最小重建值,所述预设数值范围的上限值为所述参考区域中的最大重建值。
  28. 根据权利要求1至27中任一项所述的方法,其中,所述方法还包括:
    若所述当前块的亮度分量使用基于所述滤波系数的帧内预测,则确定所述当前块的亮度分量的推导帧内预测模式;
    若所述当前块的色度分量使用直接模式的帧内预测,则将所述直接模式设置为所述推导帧内预测模式,以确定所述当前块的色度分量的预测值。
  29. 根据权利要求1至27中任一项所述的方法,其中,所述方法还包括:
    在所述当前块满足预设条件时,确定所述当前块的参考块;
    若所述参考块使用基于所述滤波系数的帧内预测,确定所述参考块的推导帧内预测模式;
    将所述推导帧内预测模式添加至所述当前块的帧内预测模式候选列表中。
  30. 根据权利要求29所述的方法,其中,所述当前块满足预设条件,至少包括下述其中一项:
    所述当前块为帧间预测块;
    所述当前块为帧内块拷贝IBC块。
  31. 根据权利要求1至30中任一项所述的方法,其中,所述方法还包括:
    解码码流,确定所述当前块的残差值;
    根据所述当前块的预测值和所述当前块的残差值,确定所述当前块的重建值。
  32. 根据权利要求31所述的方法,其中,所述解码码流,确定所述当前块的残差值,包括:
    解码码流,确定所述当前块的量化系数;
    对所述量化系数进行反量化处理,得到所述当前块的变换系数;
    对所述变换系数进行反变换处理,得到所述当前块的残差值。
  33. 根据权利要求32所述的方法,其中,所述对所述变换系数进行反变换处理,得到所述当前块的残差值,包括:
    在所述当前块使用多变换选择模式且所述目标滤波模式为插值滤波模式时,确定所述当前块的目标变换核;
    根据所述目标变换核对所述变换系数进行反变换处理,得到所述当前块的残差值。
  34. 根据权利要求33所述的方法,其中,所述目标变换核的确定与下述参数中的至少一项具有关联关系:
    所述当前块的目标滤波模式;
    所述当前块的尺寸参数;
    所述当前块的形状。
  35. 根据权利要求33所述的方法,其中,所述确定所述当前块的目标变换核,包括:
    解码码流,确定所述当前块的变换核索引值;
    根据所述变换核索引值,从至少一个候选变换核中确定所述当前块的目标变换核。
  36. 根据权利要求33所述的方法,其中,所述确定所述当前块的目标变换核,包括:
    解码码流,确定所述当前块的变换核索引值;
    根据所述变换核索引值和所述当前块的尺寸参数,从至少一个候选变换核中确定所述当前块的目标变换核。
  37. 根据权利要求35或36所述的方法,其中,所述方法还包括:
    解码码流,确定所述当前块的非零系数信息;
    根据所述当前块的非零系数信息,确定所述至少一个候选变换核。
  38. 根据权利要求37所述的方法,其中,所述至少一个候选变换核的个数小于或等于6个。
  39. 一种编码方法,应用于编码器,所述方法包括:
    确定当前块的目标滤波模式;
    根据所述当前块的尺寸参数和所述目标滤波模式,确定所述当前块的参考区域;
    根据所述当前块的参考区域,确定所述当前块的滤波系数;
    根据所述滤波系数对所述当前块进行帧内预测,确定所述当前块的预测值。
  40. 根据权利要求39所述的方法,其中,所述确定当前块的目标滤波模式,包括:
    确定至少一种候选滤波模式;
    对所述至少一种候选滤波模式进行代价计算,确定所述至少一种候选滤波模式的代价结果;
    从所述至少一种候选滤波模式的代价结果中确定最小代价结果,将所述最小代价结果对应的候选滤波模式确定为所述当前块的目标滤波模式。
  41. 根据权利要求40所述的方法,其中,所述至少一种候选滤波模式的个数是基于所述当前块的参考区域类别数量和目标滤波器的形状数量确定的。
  42. 根据权利要求40所述的方法,其中,所述目标滤波模式包括所述当前块的参考区域类别和目标滤波器的形状。
  43. 根据权利要求42所述的方法,其中,所述方法还包括:
    若所述当前块的参考区域类别为第一类别时,则确定所述当前块的参考区域包括上相邻区域和左相邻区域;
    若所述当前块的参考区域类别为第二类别时,则确定所述当前块的参考区域包括上相邻区域;
    若所述当前块的参考区域类别为第三类别时,则确定所述当前块的参考区域包括左相邻区域;
    其中,所述上相邻区域是指与所述当前块的上侧相邻的已重建区域,所述左相邻区域是指与所述当前块的左侧相邻的已重建区域。
  44. 根据权利要求43所述的方法,其中,所述当前块的尺寸参数包括所述当前块的高度和宽度;所述基于所述当前块的尺寸参数和所述目标滤波模式,确定所述当前块的参考区域,包括:
    从所述当前块的高度与宽度中确定最小参数;
    根据所述最小参数和所述目标滤波模式,确定所述当前块的参考区域。
  45. 根据权利要求44所述的方法,其中,所述当前块的参考区域的大小与所述目标滤波器的形状和所述最小参数具有关联关系。
  46. 根据权利要求43所述的方法,其中,所述方法还包括:
    若所述当前块的宽度与第一因子的倍数小于所述当前块的高度,则禁止所述当前块的参考区域类别为所述第二类别,以及确定所述当前块的参考区域类别数量是基于除所述第二类别之外的其他参考区域类别确定的;
    若所述当前块的高度与第一因子的倍数小于所述当前块的宽度,则禁止所述当前块的参考区域类别为所述第三类别,以及确定所述当前块的参考区域类别数量是基于除所述第三类别之外的其他参考区域类别确定的。
  47. 根据权利要求46所述的方法,其中,所述第一因子的取值为第一预设常数。
  48. 根据权利要求39所述的方法,其中,所述方法还包括:
    对所述当前块的目标滤波模式进行编码,将所得到的编码比特写入码流。
  49. 根据权利要求48所述的方法,其中,所述对所述当前块的目标滤波模式进行编码,将所得到的编码比特写入码流,包括:
    确定所述当前块的上下文模型;
    基于所述上下文模型对所述当前块的目标滤波模式进行编码,将所得到的编码比特写入码流。
  50. 根据权利要求49所述的方法,其中,所述上下文模型的确定与下述参数中的至少一项具有关联关系:
    所述当前块的形状;
    所述当前块的宽度与高度的比值。
  51. 根据权利要求42所述的方法,其中,所述方法还包括:
    确定所述当前块的多个候选子参考区域,且所述多个候选子参考区域互不重叠;
    根据所述多个候选子参考区域和所述目标滤波器的形状,确定所述多个候选子参考区域各自的自相关系数矩阵和互相关系数向量;
    将所述多个候选子参考区域各自的自相关系数矩阵和互相关系数向量存储至预设缓存区中。
  52. 根据权利要求51所述的方法,其中,所述根据所述多个候选子参考区域和所述目标滤波器的形状,确定所述多个候选子参考区域各自的自相关系数矩阵和互相关系数向量,包括:
    根据第一候选子参考区域和所述目标滤波器的形状,确定所述第一候选子参考区域中至少一个参考像素对应的所述目标滤波器的输入值和所述目标滤波器的输出值;
    根据所述至少一个参考像素对应的所述目标滤波器的输入值,确定所述第一候选子参考区域的自相关系数矩阵;
    根据所述至少一个参考像素对应的所述目标滤波器的输入值和所述目标滤波器的输出值,确定所述第一候选子参考区域的互相关系数向量;
    其中,所述第一候选子参考区域为所述多个候选子参考区域中的任意一个。
  53. 根据权利要求51所述的方法,其中,所述根据所述当前块的参考区域,确定所述当前块的滤波系数,包括:
    对所述当前块的参考区域进行划分,确定至少一个子参考区域;
    从所述预设缓存区中获取所述至少一个子参考区域各自的自相关系数矩阵和互相关系数向量;
    根据所述至少一个子参考区域各自的自相关系数矩阵和互相关系数向量,确定所述目标滤波器的系数;
    将所述目标滤波器的系数确定为所述当前块的滤波系数。
  54. 根据权利要求42至53中任一项所述的方法,其中,所述根据所述滤波系数对所述当前块中的像素点进行帧内预测,确定所述当前块中的像素点的预测值,包括:
    确定所述当前块中待预测像素对应的参考样值;
    根据所述当前块中待预测像素对应的参考样值和所述滤波系数,确定所述当前块中待预测像素的预测值。
  55. 根据权利要求54所述的方法,其中,所述确定所述当前块中待预测像素对应的参考样值,包括:
    基于所述目标滤波器的形状,若所述参考样值位于所述当前块的参考区域,则将所述参考区域中对应位置处的重建值确定为所述参考样值;
    若所述参考样值位于所述当前块的内部,则将所述当前块中对应位置处的预测值确定为所述参考样值。
  56. 根据权利要求54所述的方法,其中,所述根据所述当前块中待预测像素对应的参考样值和所述滤波系数,确定所述当前块中待预测像素的预测值,包括:
    基于所述当前块中待预测像素对应的参考样值,确定所述目标滤波器的第一输入值;
    基于所述第一输入值和所述滤波系数,确定所述目标滤波器的第一输出值;
    根据所述第一输出值,确定所述当前块中待预测像素的预测值。
  57. 根据权利要求56所述的方法,其中,所述基于所述当前块中待预测像素对应的参考样值,确定所述目标滤波器的第一输入值,包括:
    确定第二因子;
    对所述参考样值与所述第二因子进行减法运算,得到所述目标滤波器的第一输入值。
  58. 根据权利要求57所述的方法,其中,所述基于所述第一输入值和所述滤波系数,确定所述目标滤波器的第一输出值,包括:
    基于所述第一输入值和所述滤波系数,确定所述目标滤波器的第二输出值;
    对所述第二输出值进行第一处理,确定所述目标滤波器的第一输出值。
  59. 根据权利要求58所述的方法,其中,所述基于所述第一输入值和所述滤波系数,确定所述目标滤波器的第二输出值,包括:
    计算所述第一输入值与对应的所述滤波系数的乘积;
    将所述目标滤波器的第二输出值设置为等于n个所述乘积之和;其中,n表示所述目标滤波器对应的输入项数,且n为正整数。
  60. 根据权利要求58所述的方法,其中,所述对所述第二输出值进行第一处理,确定所述目标滤波器的第一输出值,包括:
    对所述第二输出值与所述第二因子进行加法运算,得到所述目标滤波器的第一输出值。
  61. 根据权利要求58所述的方法,其中,所述对所述第二输出值进行第一处理,确定所述目标滤波器的第一输出值,包括:
    确定所述目标滤波器的第三输出值;
    根据所述第二输出值和所述第三输出值,确定所述目标滤波器的第四输出值;
    对所述第四输出值与所述第二因子进行加法运算,得到所述目标滤波器的第一输出值。
  62. 根据权利要求61所述的方法,其中,所述确定所述目标滤波器的第三输出值,包括:
    基于所述目标滤波器的形状,确定所述目标滤波器对应的第一类型输入项数;
    若所述目标滤波器对应的第一类型输入项数为p,则确定所述目标滤波器的p+q个滤波系数,p、q均为正整数;
    根据所述p+q个滤波系数中的q个滤波系数和q个第二类型输入项数,确定所述目标滤波器的第三输出值。
  63. 根据权利要求61所述的方法,其中,所述确定所述目标滤波器的第三输出值,包括:
    基于所述目标滤波器的形状,确定所述目标滤波器对应的第一类型输入项数;
    若所述目标滤波器对应的第一类型输入项数为p,则确定所述目标滤波器的p+m个滤波系数,p、m均为正整数;
    根据所述p+m个滤波系数中的m个滤波系数和m个第三类型输入项数,确定所述目标滤波器的第三输出值。
  64. 根据权利要求61所述的方法,其中,所述确定所述目标滤波器的第三输出值,包括:
    基于所述目标滤波器的形状,确定所述目标滤波器对应的第一类型输入项数;
    若所述目标滤波器对应的第一类型输入项数为p,则确定所述目标滤波器的p+k个滤波系数,p、k均为正整数;
    根据所述p+k个滤波系数中的i个滤波系数和i个第二类型输入项数以及所述p+k个滤波系数中的j个滤波系数和j个第三类型输入项数,确定所述目标滤波器的第三输出值;其中,i、j均为正整数,且k=i+j。
  65. 根据权利要求64所述的方法,其中,所述第一类型输入项数与所述参考样值之间具有线性关系,所述第二类型输入项数与所述参考样值之间具有非线性关系,所述第三类型输入项数为预设的偏置信息。
  66. 根据权利要求57、60或61所述的方法,其中,所述第二因子的取值为第二预设常数。
  67. 根据权利要求57、60或61所述的方法,其中,所述确定第二因子,包括:
    确定所述参考区域中至少一个参考像素的重建值;
    对所述至少一个参考像素的重建值进行均值计算,得到第一均值;
    将所述第二因子的取值设置为等于所述第一均值。
  68. 根据权利要求56所述的方法,其中,所述根据所述第一输出值,确定所述当前块中待预测像素的预测值,包括:
    对所述第一输出值进行第二处理,得到所述当前块中待预测像素的预测值。
  69. 根据权利要求68所述的方法,其中,所述方法还包括:
    所述第二处理是将所述当前块中待预测像素的预测值设置为等于所述第一输出值。
  70. 根据权利要求68所述的方法,其中,所述方法还包括:
    所述第二处理是将所述第一输出值限制在预设数值范围之内;
    其中,所述预设数值范围的下限值为所述参考区域中的最小重建值,所述预设数值范围的上限值为所述参考区域中的最大重建值。
  71. 根据权利要求39至70中任一项所述的方法,其中,所述方法还包括:
    若所述当前块的亮度分量使用基于所述滤波系数的帧内预测,则确定所述当前块的亮度分量的推导帧内预测模式;
    若所述当前块的色度分量使用直接模式的帧内预测,则将所述直接模式设置为所述推导帧内预测模式,以确定所述当前块的色度分量的预测值。
  72. 根据权利要求39至70中任一项所述的方法,其中,所述方法还包括:
    在所述当前块满足预设条件时,确定所述当前块的参考块;
    若所述参考块使用基于所述滤波系数的帧内预测,确定所述参考块的推导帧内预测模式;
    将所述推导帧内预测模式添加至所述当前块的帧内预测模式候选列表中。
  73. 根据权利要求72所述的方法,其中,所述当前块满足预设条件,至少包括下述其中一项:
    所述当前块为帧间预测块;
    所述当前块为帧内块拷贝IBC块。
  74. 根据权利要求39至73中任一项所述的方法,其中,所述方法还包括:
    确定所述当前块的原始值;
    根据所述当前块的原始值和所述当前块的预测值,确定所述当前块的残差值;
    对所述当前块的残差值进行编码,将所得到的编码比特写入码流。
  75. 根据权利要求74所述的方法,其中,所述对所述当前块的残差值进行编码,将所得到的编码比特写入码流,包括:
    对所述残差值进行变换处理,得到所述当前块的变换系数;
    对所述变换系数进行量化处理,得到所述当前块的量化系数;
    对所述当前块的量化系数进行编码,将所得到的编码比特写入码流。
  76. 根据权利要求75所述的方法,其中,所述对所述残差值进行变换处理,得到所述当前块的变换系数,包括:
    在所述当前块使用多变换选择模式且所述目标滤波模式为插值滤波模式时,确定所述当前块的目标变换核;
    根据所述目标变换核对所述残差值进行变换处理,得到所述当前块的变换系数。
  77. 根据权利要求76所述的方法,其中,所述目标变换核的确定与下述参数中的至少一项具有关联关系:
    所述当前块的目标滤波模式;
    所述当前块的尺寸参数;
    所述当前块的形状。
  78. 根据权利要求76所述的方法,其中,所述确定所述当前块的目标变换核,包括:
    确定至少一个候选变换核;
    对所述至少一个候选变换核进行代价计算,确定所述至少一个候选变换核的代价结果;
    从所述至少一个候选变换核的代价结果中确定最小代价结果,将所述最小代价结果对应的候选变换核确定为所述当前块的目标变换核。
  79. 根据权利要求78所述的方法,其中,所述方法还包括:
    确定所述当前块的非零系数信息;
    根据所述当前块的非零系数信息,确定所述至少一个候选变换核。
  80. 根据权利要求79所述的方法,其中,所述至少一个候选变换核的个数小于或等于6个。
  81. 根据权利要求78所述的方法,其中,所述方法还包括:
    确定所述当前块的变换核索引值,其中,所述变换核索引值用于指示所述目标变换核在所述至少一个候选变换核中的索引序号;
    对所述当前块的变换核索引值进行编码,将所得到的编码比特写入码流。
  82. 根据权利要求78所述的方法,其中,所述方法还包括:
    确定所述当前块的变换核索引值,其中,所述变换核索引值用于指示所述目标变换核在所述至少一个候选变换核中的索引序号,且所述至少一个候选变换核与所述当前块的尺寸参数具有关联关系;
    对所述当前块的变换核索引值进行编码,将所得到的编码比特写入码流。
  83. 一种码流,所述码流是根据待编码信息进行比特编码生成的;其中,所述待编码信息包括下述至少一项:
    当前块的目标滤波模式、所述当前块的残差值和所述当前块的变换核索引值。
  84. 一种编码器,所述编码器包括第一确定单元和第一预测单元,其中:
    所述第一确定单元,配置为确定当前块的目标滤波模式;以及根据所述当前块的尺寸参数和所述目标滤波模式,确定所述当前块的参考区域;
    所述第一预测单元,配置为根据所述当前块的参考区域,确定所述当前块的滤波系数;以及根据所述滤波系数对所述当前块进行帧内预测,确定所述当前块的预测值。
  85. 一种编码器,所述编码器包括第一存储器和第一处理器,其中:
    所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;
    所述第一处理器,用于在运行所述计算机程序时,执行如权利要求39至82中任一项所述的方法。
  86. 一种解码器,所述解码器包括解码单元、第二确定单元和第二预测单元,其中:
    所述解码单元,配置为解码码流,确定当前块的目标滤波模式;
    所述第二确定单元,配置为根据所述当前块的尺寸参数和所述目标滤波模式,确定所述当前块的参考区域;
    所述第二预测单元,配置为根据所述当前块的参考区域,确定所述当前块的滤波系数;以及根据所述滤波系数对所述当前块进行帧内预测,确定所述当前块的预测值。
  87. 一种解码器,所述解码器包括第二存储器和第二处理器,其中:
    所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;
    所述第二处理器,用于在运行所述计算机程序时,执行如权利要求1至38中任一项所述的方法。
  88. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至38中任一项所述的方法、或者实现如权利要求39至82中任一项所述的方法。
PCT/CN2023/101156 2023-06-19 2023-06-19 编解码方法、码流、编码器、解码器以及存储介质 Ceased WO2024259568A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN202380099393.3A CN121511593A (zh) 2023-06-19 2023-06-19 编解码方法、码流、编码器、解码器以及存储介质
AU2023459194A AU2023459194A1 (en) 2023-06-19 2023-06-19 Encoding method, decoding method, code stream, encoder, decoder, and storage medium
PCT/CN2023/101156 WO2024259568A1 (zh) 2023-06-19 2023-06-19 编解码方法、码流、编码器、解码器以及存储介质
KR1020257042002A KR20260025916A (ko) 2023-06-19 2023-06-19 부호화 방법, 복호화 방법, 비트스트림, 인코더, 디코더 및 저장 매체
US19/420,029 US20260106981A1 (en) 2023-06-19 2025-12-15 Encoding method, decoding method, bitstream, encoder, decoder, and storage medium
MX2025015301A MX2025015301A (es) 2023-06-19 2025-12-16 Metodo de codificacion, metodo de decodificacion, flujo de codigo, codificador, decodificador y medio de almacenamiento

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2023/101156 WO2024259568A1 (zh) 2023-06-19 2023-06-19 编解码方法、码流、编码器、解码器以及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US19/420,029 Continuation US20260106981A1 (en) 2023-06-19 2025-12-15 Encoding method, decoding method, bitstream, encoder, decoder, and storage medium

Publications (1)

Publication Number Publication Date
WO2024259568A1 true WO2024259568A1 (zh) 2024-12-26

Family

ID=93934627

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/101156 Ceased WO2024259568A1 (zh) 2023-06-19 2023-06-19 编解码方法、码流、编码器、解码器以及存储介质

Country Status (6)

Country Link
US (1) US20260106981A1 (zh)
KR (1) KR20260025916A (zh)
CN (1) CN121511593A (zh)
AU (1) AU2023459194A1 (zh)
MX (1) MX2025015301A (zh)
WO (1) WO2024259568A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130105114A (ko) * 2012-03-16 2013-09-25 주식회사 아이벡스피티홀딩스 인트라 예측 모드에서의 영상 복호화 방법
CN108293111A (zh) * 2015-10-16 2018-07-17 Lg电子株式会社 用于改善在图像编码系统中进行预测的滤波方法和装置
CN111247796A (zh) * 2017-10-20 2020-06-05 韩国电子通信研究院 图像编码/解码方法和装置以及存储比特流的记录介质
CN111837388A (zh) * 2018-03-09 2020-10-27 韩国电子通信研究院 使用样点滤波的图像编码/解码方法和设备
CN112425161A (zh) * 2018-07-11 2021-02-26 英迪股份有限公司 基于帧内预测的视频编码方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130105114A (ko) * 2012-03-16 2013-09-25 주식회사 아이벡스피티홀딩스 인트라 예측 모드에서의 영상 복호화 방법
CN108293111A (zh) * 2015-10-16 2018-07-17 Lg电子株式会社 用于改善在图像编码系统中进行预测的滤波方法和装置
CN111247796A (zh) * 2017-10-20 2020-06-05 韩国电子通信研究院 图像编码/解码方法和装置以及存储比特流的记录介质
CN111837388A (zh) * 2018-03-09 2020-10-27 韩国电子通信研究院 使用样点滤波的图像编码/解码方法和设备
CN112425161A (zh) * 2018-07-11 2021-02-26 英迪股份有限公司 基于帧内预测的视频编码方法和装置

Also Published As

Publication number Publication date
KR20260025916A (ko) 2026-02-24
AU2023459194A1 (en) 2026-01-15
US20260106981A1 (en) 2026-04-16
CN121511593A (zh) 2026-02-10
MX2025015301A (es) 2026-02-03

Similar Documents

Publication Publication Date Title
JP7540841B2 (ja) ループ内フィルタリングの方法、コンピュータ可読記憶媒体及びプログラム
AU2024287236A1 (en) Video image component prediction method and apparatus, and computer storage medium
WO2024152385A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
CN114866783B (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
JP2025513048A (ja) 符号化・復号化方法およびその装置、符号化機器、復号化機器、並びに記憶媒体
CN113840142B (zh) 图像分量预测方法、装置及计算机存储介质
WO2024259568A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
CN120548703A (zh) 编解码方法、码流、编码器、解码器以及存储介质
CN120476592A (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024216632A1 (zh) 视频编解码方法、装置、设备、系统、及存储介质
CN119032561A (zh) 编解码方法、装置、编码设备、解码设备以及存储介质
CN113411588B (zh) 预测方向的确定方法、解码器以及计算机存储介质
WO2025043408A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
CN113196770A (zh) 图像分量预测方法、装置及计算机存储介质
WO2025065696A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
CN120500846A (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024153241A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024207136A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
CA3280451A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2024212251A9 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2025147830A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024192733A9 (zh) 视频编解码方法、装置、设备、系统、及存储介质
WO2026085742A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024098263A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
JP2026513796A (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: 23941875

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202517126747

Country of ref document: IN

WWE Wipo information: entry into national phase

Ref document number: AU2023459194

Country of ref document: AU

Ref document number: MX/A/2025/015301

Country of ref document: MX

WWP Wipo information: published in national office

Ref document number: 202517126747

Country of ref document: IN

ENP Entry into the national phase

Ref document number: 2023459194

Country of ref document: AU

Date of ref document: 20230619

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2026100704

Country of ref document: RU

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: MX/A/2025/015301

Country of ref document: MX

WWP Wipo information: published in national office

Ref document number: 2026100704

Country of ref document: RU