WO2024103987A1 - 帧间预测方法及解码方法、电子装置和存储介质 - Google Patents

帧间预测方法及解码方法、电子装置和存储介质 Download PDF

Info

Publication number
WO2024103987A1
WO2024103987A1 PCT/CN2023/123129 CN2023123129W WO2024103987A1 WO 2024103987 A1 WO2024103987 A1 WO 2024103987A1 CN 2023123129 W CN2023123129 W CN 2023123129W WO 2024103987 A1 WO2024103987 A1 WO 2024103987A1
Authority
WO
WIPO (PCT)
Prior art keywords
coding block
current coding
mode
current
partitioning
Prior art date
Application number
PCT/CN2023/123129
Other languages
English (en)
French (fr)
Inventor
白雅贤
黄成�
张晓渠
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2024103987A1 publication Critical patent/WO2024103987A1/zh

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/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • 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/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field

Definitions

  • the present application relates to the field of communication technology, for example, to an inter-frame prediction method and decoding method, an electronic device and a storage medium.
  • the current block can be processed by intra-frame prediction or inter-frame prediction.
  • the inter-frame prediction method can include motion estimation and motion compensation.
  • the geometric partitioning mode GPM
  • the GPM partition mode is determined by traversing a preset list of 64 modes. The decoding end determines the partition mode used by the coding block by parsing the partition mode index in the video coding bitstream, so the computational complexity and transmission overhead are high.
  • the embodiments of the present application provide an inter-frame prediction method and decoding method, an electronic device and a storage medium, which effectively reduce the transmission overhead and improve the division accuracy.
  • the present application provides an inter-frame prediction method, including:
  • the first prediction value and the second prediction value are weightedly fused according to the geometric partitioning mode parameters of the current coding block to obtain the prediction value of the current coding block.
  • the present application provides a decoding method, including:
  • the geometric partitioning mode parameters are used to perform inter-frame prediction on the current coding block.
  • An embodiment of the present application provides an electronic device, comprising: a memory, and one or more processors;
  • the memory is configured to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
  • An embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
  • FIG1 is a schematic diagram of an implementation of a coding framework provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of an implementation of a decoding framework provided in an embodiment of the present application.
  • FIG3 is a flow chart of an inter-frame prediction method provided by an embodiment of the present application.
  • FIG4 is a flowchart of a decoding method provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of configuration of geometric partitioning mode parameters corresponding to a partitioning mode provided in an embodiment of the present application
  • FIG6 is a flowchart of an implementation of inter-frame prediction provided by an embodiment of the present application.
  • FIG7 is a schematic diagram of a configuration of a candidate partitioning mode provided in an embodiment of the present application.
  • FIG8 is a flowchart of another implementation of inter-frame prediction provided by an embodiment of the present application.
  • FIG9 is a schematic diagram of another candidate partitioning mode configuration provided in an embodiment of the present application.
  • FIG10 is a flowchart of another implementation of inter-frame prediction provided by an embodiment of the present application.
  • FIG11 is a schematic diagram of a configuration of another candidate partitioning mode provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of a configuration of another candidate partitioning mode provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of a configuration of another candidate partitioning mode provided in an embodiment of the present application.
  • FIG14 is a structural block diagram of an inter-frame prediction device provided in an embodiment of the present application.
  • FIG15 is a structural block diagram of a decoding device provided in an embodiment of the present application.
  • FIG. 16 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • GPM is supported for inter-frame prediction of coding units.
  • GPM contains 64 division modes, and the division mode of each GPM coding unit (Coding Unit, CU) is represented by a fixed-length binary code.
  • MV Motion Vector
  • the present application provides an inter-frame prediction method and a video decoding method and device, which can improve the accuracy of inter-frame prediction using a geometric partitioning mode.
  • the inter-frame prediction method provided by the present application, in the process of determining the partitioning mode of the current coding block, the partitioning mode calculated in other coding blocks is used for reference, which effectively utilizes the edge continuation information of objects in the video frame, improves the accuracy of the partitioning, and further reduces the transmission overhead.
  • FIG. 1 is a schematic diagram of an implementation of a coding framework provided by an embodiment of the present application.
  • modules such as intra-frame prediction, inter-frame prediction, transformation, quantization, loop filtering, and entropy coding may be included.
  • the input video is first divided into frames and then block-divided
  • the intra-frame prediction module is mainly used to remove the spatial correlation of the image
  • the inter-frame prediction module is mainly used to remove the temporal correlation of the image
  • the reconstructed image is filtered through a loop filter and stored in an image cache as a reference image for the future.
  • FIG2 is a schematic diagram of an implementation of a decoding framework provided by an embodiment of the present application. As shown in FIG2, the overall framework process of the decoding end is as follows:
  • the reconstructed image is filtered through a loop filter and stored in an image cache as a reference image for the future.
  • FIG3 is a flow chart of an inter-frame prediction method provided by an embodiment of the present application. This embodiment is applied to the case of inter-frame prediction in a video encoding process. This embodiment can be executed by an encoding end. As shown in FIG3, this embodiment includes: S310-S340.
  • S310 Obtain a current video frame, and determine a current coding block in the current video frame.
  • the current video frame can be understood as an image frame.
  • the current video frame can be divided into blocks of multiple coding tree units (CTUs), and a quadtree with a nested multi-type tree structure is used to divide a CTU into multiple CUs, where a CU has a region defined for prediction using a geometric partitioning mode, which can also be called a sub-coding unit.
  • CTUs coding tree units
  • a quadtree with a nested multi-type tree structure is used to divide a CTU into multiple CUs, where a CU has a region defined for prediction using a geometric partitioning mode, which can also be called a sub-coding unit.
  • S320 Determine a first prediction value and a second prediction value of a current coding block.
  • the current coding block may be divided into two non-rectangular sub-partitions, and then the MV candidate list in the GPM mode is generated based on the motion vector candidate list in the merge mode.
  • Each sub-partition selects an MV from the MV candidate list for unidirectional motion compensation to obtain two unidirectional prediction values of the current coding block as the corresponding first prediction value and the second prediction value, that is, one non-rectangular sub-partition corresponds to the first prediction value, and the other non-rectangular sub-partition corresponds to the second prediction value.
  • the geometric division mode parameters refer to the slope, division angle and displacement length corresponding to each geometric division mode.
  • the traditional GPM there are 64 division modes. Each division mode corresponds to a slope and a displacement length, that is, there are 20 division angles and 4 displacement lengths.
  • the geometric division mode parameters of the target coding block corresponding to the current coding block can be used to determine the geometric division mode parameters of the current coding block.
  • the target coding block is a coding block related to the current coding block in the current video frame.
  • the predicted value of the current coding block refers to the pixel value predicted for each pixel in the current coding block.
  • a fusion matrix is obtained according to the distance from the pixel in each sub-partition to the dividing line, and the first predicted value and the second predicted value corresponding to the two sub-partitions are weightedly fused using the fusion matrix to obtain the predicted value of the current coding block, thereby realizing the prediction or inference of the geometric partitioning mode parameters of the current coding block according to the geometric partitioning mode parameters of other coding blocks, effectively utilizing the edge continuation information of the target coding block in the current video frame, improving the accuracy of the division, and further reducing the transmission overhead.
  • the geometric partitioning mode parameters of the target coding block corresponding to the current coding block are determined. Determine the geometric partitioning mode parameters of the current coding block, including:
  • the geometric partitioning mode parameters of the current coding block are determined based on the partitioning mode candidate list.
  • the partition mode candidate list is a list of candidate partition modes corresponding to the current coding block.
  • a partition mode candidate list can be constructed for the current coding block.
  • the partition mode with the smallest rate-distortion cost is finally selected as the optimal partition mode of the current coding block, and the geometric partition mode parameters corresponding to the optimal partition mode are used as the geometric partition mode parameters of the current coding block.
  • N is a positive integer greater than or equal to 1.
  • the target coding block includes: a neighborhood coding block; and constructing a partitioning mode candidate list corresponding to the current coding block according to the geometric partitioning mode parameters of the target coding block corresponding to the current coding block, including:
  • a candidate list of partitioning modes corresponding to the current coding block is constructed based on the geometric partitioning mode parameters of the neighboring coding blocks.
  • the neighboring coding block refers to a coding block adjacent to the current coding block in the spatial domain.
  • the neighboring coding block refers to a coding block adjacent to the current coding block in the current video in position.
  • the neighboring coding block can be a coding block located on either side of the current coding block.
  • the dividing lines of the neighboring coding blocks have strong similarity, especially for continuous straight lines or curves, and usually maintain similar division angles and displacement lengths in multiple neighboring coding blocks.
  • a candidate list of partitioning modes corresponding to the current coding block can be constructed in the neighborhood coding blocks of the current coding block in a preset order.
  • the preset order can be understood as sorting according to the geometric partitioning mode parameters of each neighborhood coding block, or sorting according to the positional relationship between each neighborhood coding block and the current coding block.
  • the target coding block includes: a neighborhood coding block;
  • the geometric partitioning mode parameters of the coding block are used to construct a partitioning mode candidate list corresponding to the current coding block, including:
  • a corresponding candidate list of division patterns is constructed based on the division patterns that match the extension lines; wherein the number of division patterns contained in the candidate list of division patterns is less than or equal to the number of neighborhood coding blocks.
  • the division lines of the neighborhood coding blocks also have strong continuity, and usually extend in multiple neighborhood coding blocks. If the division pattern candidate list of the current coding block is constructed using the extension line of the division pattern of the neighborhood coding block in the spatial domain in the current coding block, and the division pattern in the candidate list of division patterns is used for GPM prediction, the number of coding bits required for the transmission division pattern can be greatly saved.
  • the known division pattern of the neighborhood coding block is extended.
  • the current coding block may correspond to one or more neighborhood coding blocks.
  • the known division mode of each neighboring coding block can be extended to obtain the corresponding extension line.
  • the division mode closest to the extension line is not searched from the total list of division modes, that is, the number of division modes included in the division mode candidate list of the current coding block is less than or equal to the total number of neighboring coding blocks corresponding to the current coding block.
  • determining the geometric partitioning mode parameters of the current coding block based on the partitioning mode candidate list includes:
  • each partition mode in the partition mode candidate list is used to perform inter-frame prediction on the current coding block, and a rate-distortion cost of the corresponding partition mode is obtained as a first rate-distortion cost;
  • the geometric partitioning mode parameters used by the current coding block are determined based on the first rate-distortion cost.
  • the partitioning mode candidate list is traversed, and each partitioning mode in the partitioning mode candidate list is respectively used in a preset order to perform GPM inter-frame prediction on the current coding block, and the rate-distortion cost of the corresponding partitioning mode is obtained.
  • price as the first rate-distortion cost
  • determining the geometric partitioning mode parameters of the current coding block based on the partitioning mode candidate list includes:
  • each partition mode in the partition mode candidate list to perform inter-frame prediction on the current coding block, and obtaining a rate-distortion cost of the corresponding partition mode as a first rate-distortion cost;
  • partition mode difference list is a difference set between the partition mode total list and the partition mode candidate list;
  • the geometric partitioning mode parameters adopted by the current coding block are determined based on the first rate-distortion cost and the second rate-distortion cost.
  • the first rate-distortion cost is obtained, each partitioning mode in the partitioning mode difference list is traversed, and each partitioning mode in the partitioning mode difference list is used to perform GPM inter-frame prediction on the current coding block to obtain the rate-distortion cost of the corresponding partitioning mode, that is, the second rate-distortion cost.
  • the partitioning mode corresponding to the minimum rate-distortion cost between the first rate-distortion cost and the second rate-distortion cost is selected. If the partitioning mode corresponding to the minimum rate-distortion cost comes from the partitioning mode candidate list, GPM is instructed to adopt the partitioning mode inter-frame prediction method; if the partitioning mode corresponding to the minimum rate-distortion cost comes from the partitioning mode difference list, GPM is instructed not to adopt the partitioning mode inter-frame prediction method.
  • determining the geometric partitioning mode parameters of the current coding block according to the geometric partitioning mode parameters of the target coding block corresponding to the current coding block includes:
  • the geometric partitioning mode parameters used by the current coding block are determined by template matching.
  • the target coding block in the current video frame refers to the coding block associated with the current coding block in the current video frame.
  • the upper The pixels of the square coding block and the left coding block are all known, and the upper coding block of the current coding block and the L-shaped neighborhood coding block of the left coding block can be used as template areas for intra-frame prediction or inter-frame prediction.
  • the division line of the current coding block also has a certain continuity in the L-shaped template area of the neighborhood.
  • the division mode is predicted based on the known pixels in the neighborhood coding block at the encoding end and the decoding end, the number of coding bits required for transmitting the division mode can be greatly saved.
  • multiple division modes in the candidate list of division modes are respectively used to extend the template area corresponding to the current coding block, and GPM inter-frame prediction is performed to calculate the corresponding rate-distortion cost, and the division mode corresponding to the minimum rate-distortion cost is used as the division mode of the current coding block, that is, the geometric division mode parameters of the current coding block are obtained.
  • a partitioning mode candidate list of a current coding block is constructed based on the geometric partitioning mode parameters of a target coding block, including:
  • a corresponding partitioning pattern candidate list is constructed based on the partitioning pattern that matches the extension line.
  • the partitioning pattern corresponding to the target coding block is determined based on the geometric partitioning pattern parameters adopted by the target coding block, and the partitioning pattern corresponding to the target coding block is extended to obtain the corresponding extension line.
  • the partitioning pattern closest to the extension line in the total list of the partitioning module is calculated, and the closest partitioning pattern is added to the partitioning pattern candidate list.
  • the target coding block in the current video frame includes:
  • the coding block obtained by searching along the preset direction of the current coding block in the current video frame refers to the coding block that is adjacent to the current coding block in position in the current video frame; the coding block within the preset neighborhood range of the current coding block refers to the coding block within the preset range corresponding to the current coding block; the coding block obtained by searching along the preset direction of the current coding block refers to the coding block obtained by searching within the preset neighborhood range of the current coding block according to the specified preset direction and step size.
  • the geometric partitioning mode parameters used by the current coding block are determined by using a template matching method, including:
  • each partition mode in the partition mode candidate list to perform inter-frame prediction on the template region, respectively, to obtain a rate-distortion cost of the corresponding partition mode as a third rate-distortion cost;
  • the geometric partitioning mode parameters adopted by the current coding block are determined based on the third rate-distortion cost.
  • the template area may be the upper area and the left area of the current coding block.
  • the neighboring area of the current coding block for the upper side is selected according to the size of the current coding block in the first direction, and then the neighboring area of the current coding block for the left side is selected according to the size of the current coding block in the second direction, and the neighboring area above and the neighboring area on the left are merged as the template area of the current coding block.
  • the partitioning mode candidate list is traversed, and each partitioning mode in the partitioning mode candidate list is respectively used to perform inter-frame prediction on the template area, and the rate-distortion cost of the corresponding partitioning mode is obtained as the third rate-distortion cost, and the partitioning mode corresponding to the minimum rate-distortion cost is selected from all the third rate-distortion costs as the partitioning mode adopted by the current coding block, that is, the geometric partitioning mode parameters adopted by the current coding block are obtained.
  • the geometric partitioning mode parameters used by the current coding block are determined by using a template matching method, including:
  • each partition mode in the partition mode candidate list to perform inter-frame prediction on the template region, respectively, to obtain a rate-distortion cost of the corresponding partition mode as a third rate-distortion cost;
  • each partition mode in the total partition mode list to perform inter-frame prediction on the current coding block, and obtaining a rate-distortion cost of the corresponding partition mode as a fourth rate-distortion cost;
  • the geometric partitioning mode parameters used by the current coding block are determined based on the third rate-distortion cost and the fourth rate-distortion cost.
  • each partitioning mode in the total partitioning mode list is used to perform inter-frame prediction on the current coding block to obtain the rate-distortion cost of the corresponding partitioning mode.
  • the fourth rate distortion cost select the partition mode with the smallest rate distortion cost from all third rate distortion costs and all fourth rate distortion costs; if the partition mode with the smallest rate distortion cost is the third rate distortion cost, then indicate in the bitstream that GPM adopts the partition mode prediction method; if the partition mode with the smallest rate distortion cost is the fourth rate distortion cost, then indicate in the bitstream that GPM does not adopt the partition mode prediction method, and indicate the index of the partition mode adopted by the current coding block in the total list of partition modes.
  • FIG. 4 is a flowchart of a decoding method provided by an embodiment of the present application, and this embodiment is applied to the case of inter-frame prediction in the video decoding process.
  • This embodiment can be executed by the decoding end.
  • the decoding end when the current coding block adopts an inter-frame prediction method based on a partitioning mode, the decoding end can use the same method as the encoding end to predict the partitioning mode of the current coding block and obtain the predicted value of the current coding block.
  • this embodiment includes: S410 - S430 .
  • S410 Parse the video encoding code stream to obtain prediction decoding parameters of the current encoding block in the current video frame.
  • the encoding end sends the current video frame and the prediction decoding parameters of the current coding block in the current video frame to the decoding end through the video coding code stream.
  • the prediction decoding parameter may carry a partition mode prediction indicator corresponding to the current coding block.
  • the decoding end may determine whether the current coding block adopts a partition mode prediction method based on the partition mode prediction indicator.
  • the inter-frame prediction method described in the above embodiment may be used to determine the geometric partition mode parameters adopted by the current coding block.
  • S430 Use geometric partitioning mode parameters to perform inter-frame prediction on the current coding block.
  • inter-frame prediction is performed on the current coding block according to the geometric partitioning mode parameters of the current coding block.
  • determining the geometric partitioning mode parameters used by the current coding block according to the prediction decoding parameters includes:
  • partition mode prediction indicator is a first value, it is determined that the current coding block adopts the partition mode Forecasting method
  • the geometric partitioning mode parameters adopted by the current coding block are determined based on the partitioning mode prediction index and the partitioning mode candidate list.
  • the partitioning mode prediction indicator is used to indicate whether the current coding block adopts the partitioning mode prediction method.
  • the partitioning mode prediction indicator is a first value
  • the current coding block adopts the partitioning mode prediction method
  • the inter-frame prediction method described in the above embodiment is used to construct a partitioning mode candidate list corresponding to the current coding block, and the partitioning mode adopted by the current coding block is selected from the partitioning mode candidate list based on the partitioning mode prediction index, that is, the geometric partitioning mode parameters adopted by the current coding block are obtained.
  • the partition mode prediction index is used to identify the index value of the partition mode used by the current video frame in the partition mode candidate list.
  • determining the geometric partitioning mode parameters used by the current coding block according to the prediction decoding parameters includes:
  • partition mode prediction indicator is a first value, determining that the current coding block adopts a partition mode prediction method
  • the geometric partition mode parameters adopted by the current coding block are determined by template matching.
  • the explanation of the partition mode prediction indicator can be found in the description of the above embodiment and will not be repeated here.
  • the current coding block adopts a partition mode prediction method, and adopts the inter-frame prediction method described in the above embodiment to construct a partition mode candidate list corresponding to the current coding block, and selects the partition mode adopted by the current coding block from the partition mode candidate list based on the template matching method, so as to obtain the geometric partition mode parameters adopted by the current coding block.
  • the geometric partition mode parameters adopted by the current coding block are determined by template matching.
  • the process of geometric partitioning mode parameters adopted by the code block please refer to the specific implementation method described in the above embodiment, which will not be repeated here.
  • determining the geometric partitioning mode parameters used by the current coding block according to the prediction decoding parameters includes:
  • partition mode prediction indicator is a second value, determining that the current coding block does not adopt the partition mode prediction method
  • the geometric partitioning mode parameters adopted by the current coding block are determined based on the partitioning mode prediction index and the pre-created total list of partitioning modes.
  • the partitioning mode prediction indicator is a second value
  • the current coding block does not adopt the partitioning mode prediction method, and the partitioning mode adopted by the current coding block is selected from the total list of partitioning modes based on the partitioning mode prediction index, that is, the geometric partitioning mode parameters adopted by the current coding block are obtained.
  • this embodiment provides an inter-frame prediction method for video encoding, in which, when the current coding block adopts an inter-frame prediction mode based on a geometric partitioning mode, the partitioning mode of the current coding block is predicted using the partitioning mode determined in the neighboring coding block, thereby reducing the transmission overhead.
  • the steps of the inter-frame prediction method are as follows:
  • Step 1 Get the current video frame and determine the current coding block in the current video frame.
  • the image partitioning structure divides the input current video frame into blocks called CTUs, and uses a quadtree with a nested multi-type tree structure to divide a CTU into CUs, which have leaf coding units that define areas for inter-frame prediction modes.
  • Step 2 Determine whether to use partition mode inter-frame prediction for the current coding block.
  • the geometric partitioning mode parameters of the current encoding block are usually determined in a rate-distortion optimization manner.
  • the geometric partitioning mode parameters of the current encoding block can be determined based on the geometric partitioning mode parameters of the current encoding block.
  • Mode parameters using multiple partitioning modes to perform predictive coding on the predicted image components respectively, calculating the rate-distortion cost results corresponding to each of the multiple partitioning modes, selecting the minimum rate-distortion cost result from the multiple rate-distortion cost results calculated, and determining the partitioning mode corresponding to the minimum rate-distortion cost result as the geometric partitioning mode parameters of the current coding block.
  • Step 3 Use the partitioning patterns determined in the neighboring coding blocks to predict the partitioning pattern of the current coding block.
  • FIG. 5 is a configuration diagram of geometric division mode parameters corresponding to a division mode provided in an embodiment of the present application. As shown in Figure 5, each division mode corresponds to a slope and a displacement length, with a total of 20 angles and 4 displacement lengths.
  • the division lines of the neighborhood coding blocks in the spatial domain have strong similarities, especially for continuous straight lines or curves, which usually maintain similar division angles and displacement lengths in multiple neighborhood coding blocks. If the division mode of the current coding block is predicted using the division mode of the neighborhood coding blocks in the spatial domain, and the position index of the corresponding coding block is marked, the number of coding bits required to transmit the division mode can be greatly saved.
  • the specific implementation method operates according to the implementation methods of the following division mode prediction method 1 and division mode prediction method 2.
  • Step 4 Use the partition mode inter-frame prediction method for the current coding block to obtain the prediction value of the current coding block.
  • the current coding block When the current coding block adopts the GPM inter-frame prediction mode, the current coding block is divided into two non-rectangular sub-partitions, and then the MV candidate list in the GPM mode is generated based on the MV candidate list in the merge mode. Each sub-partition selects MV from the MV candidate list for unidirectional motion compensation to obtain two unidirectional prediction values of the current coding block, namely the first prediction value and the second prediction value. Finally, a fusion matrix is obtained according to the distance from the pixel point in each partition to the dividing line, and the unidirectional prediction values of the two sub-partitions are weightedly fused using the matrix to obtain the final prediction value of the current coding block.
  • Step 5 Indicate the partition mode prediction method to the decoding end through a switch indicator.
  • the encoder calculates the rate-distortion cost based on the prediction value of the current coding block, thereby determining the partition mode and geometric partition mode parameters used by the current coding block.
  • the determined partition mode prediction method is indicated to the decoder through a switch indicator and an index value (optional), and the GPM inter-frame prediction mode parameters are indicated to the decoder through a merge mode index.
  • the partition mode prediction method 1 There are three ways to generate the partition mode candidate list:
  • a candidate list is generated based on the neighborhood coding block
  • the division lines of the neighboring coding blocks in the spatial domain have strong similarity, especially for continuous straight lines or curves, which usually maintain similar division angles and displacements in multiple neighboring coding blocks. If the division mode of the neighboring coding blocks in the spatial domain is used to predict the division mode of the current coding block and the position index of the corresponding coding block is marked, the number of coding bits required to transmit the division mode can be greatly saved.
  • a partitioning mode candidate list is established for the current coding block, and there are at most N partitioning modes in the list. By traversing these N candidate partitioning modes and calculating the rate-distortion cost, the one with the smallest rate-distortion cost is finally selected as the optimal partitioning mode for the current coding block.
  • the partitioning mode candidate list can be established in the same way, so the encoder only needs to transmit the index of the optimal partitioning mode in the candidate list, which greatly saves the number of coding bits for transmitting 64 partitioning modes.
  • Figure 6 is an implementation flow chart of an inter-frame prediction provided in an embodiment of the present application. As shown in Figure 6, the inter-frame prediction in this embodiment includes the steps of:
  • S610 Obtain a partitioning mode of a neighboring coding block corresponding to a current coding block, and construct a partitioning mode candidate list in a preset order.
  • a split mode candidate list (SMList) is constructed according to a preset order.
  • FIG7 is a schematic diagram of the configuration of a candidate partitioning mode provided in an embodiment of the present application.
  • Current CU in the figure represents the current coding block
  • A1 represents the CU at the bottom left of the current coding block
  • B1 represents the CU at the top right of the current coding block
  • B0 and A0 represent the blocks closest to the upper right and lower left of the current coding block respectively
  • B2 represents the CU closest to the upper left of the current coding block.
  • a candidate list of partitioning modes is established in a preset order, for example, A1->B1->B0->A0->B2, and each index position selects a known partitioning mode of the corresponding CU. If one or more of A1, B1, B0, and A0 do not exist, the corresponding position is empty. If no known partitioning mode exists in all neighboring blocks, the traditional GPM partitioning mode selection method continues to be used.
  • the candidate list of partitioning modes is traversed, and N partitioning modes are respectively used to perform GPM inter-frame prediction on the current coding block, the steps are the same as steps 1 to 5 in the above embodiment, and the RDO cost is calculated.
  • the remaining partition modes among the 64 partition modes are traversed, and the remaining partition modes are used to perform GPM prediction on the current coding block to calculate the RDO cost.
  • S640 Sort the rate-distortion costs obtained by performing GPM prediction on each partition mode, select the partition mode corresponding to the minimum rate-distortion cost, and indicate it in the bitstream accordingly.
  • the partition mode with the smallest RDO cost is selected. If the mode comes from SMList, the GPM is indicated in the bitstream to adopt the SM prediction method, and the index of the partition mode selected for the current coding block in SMList is indicated. If the mode comes from the remaining partition modes except SMList, the GPM is indicated in the bitstream not to adopt the SM prediction method, and the index of the partition mode selected for the current coding block in the 64 partition modes is indicated.
  • a partitioning pattern candidate list is generated based on the extension line
  • the division line of the spatial neighbor coding block also has strong continuity, and usually extends in multiple neighbor coding blocks. If the extension line of the division pattern of the spatial neighbor coding block in the current coding block is used as the division pattern for GPM prediction, and the position index of the corresponding coding block is marked, the number of coding bits required for transmitting the division pattern can be greatly saved.
  • a partitioning mode candidate list based on the extended partitioning of neighboring coding blocks is established for the current coding block, and there are at most N partitioning modes in the partitioning mode candidate list.
  • the one with the smallest rate-distortion cost is finally selected as the optimal partitioning mode for the current coding block, thereby saving the number of transmission coding bits.
  • Another implementation flow chart of inter-frame prediction is provided in the example. As shown in FIG8 , the inter-frame prediction in this embodiment includes the steps of:
  • FIG. 9 is a schematic diagram of the configuration of another candidate partitioning mode provided in an embodiment of the present application.
  • Current CU in the figure represents the current coding block
  • A1 represents the CU at the bottom left of the current coding block
  • B1 represents the CU at the rightmost top of the current coding block
  • B0 and A0 represent the blocks closest to the upper right and lower left of the current coding block respectively
  • B2 represents the CU closest to the upper left of the current coding block.
  • each neighborhood coding block its known partitioning mode is extended. When the extension line intersects the current coding block, the partitioning mode that is closest to the extension line in the current coding block among the 64 partitioning modes is calculated as the candidate partitioning mode.
  • the list is built in a preset order, such as A1->B1->B0->A0->B2, and each index position selects the candidate partition mode calculated in step 1. If one or more of A1, B1, B0, A0 does not exist, or the extension line of the partition mode does not intersect the current block, the corresponding position is empty. If there is no known partition mode in all adjacent blocks, the traditional GPM partition mode selection method continues to be used.
  • the candidate list of partitioning modes is traversed, and N partitioning modes are respectively used to perform GPM inter-frame prediction on the current coding block, the steps are the same as steps 1 to 5 of the above embodiment, and the RDO cost is calculated.
  • the total partitioning mode list includes 64 partitioning modes, and the remaining partitioning modes among the 64 partitioning modes are traversed to calculate the RDO cost.
  • S850 Sort the rate-distortion costs obtained by performing GPM prediction on each partition mode, select the partition mode corresponding to the minimum rate-distortion cost, and indicate it accordingly in the bitstream.
  • the partition mode with the smallest RDO cost is selected. If the mode comes from SMList, the GPM is indicated in the bitstream to adopt the SM prediction method, and the index of the partition mode selected for the current coding block in SMList is indicated. If the partition mode comes from the remaining partition modes except SMList, the GPM is indicated in the bitstream not to adopt the SM prediction method, and the index of the partition mode selected for the current coding block in the 64 partition modes is indicated.
  • Partitioning Pattern Prediction Method 2 Template Matching
  • the partitioning mode is selected based on the neighborhood coding block.
  • the neighboring pixels above and to the left of the current coding block are known, so the L-shaped neighborhood coding blocks above and to the left of the current coding block are often used as template areas for intra-frame prediction or inter-frame prediction.
  • the dividing line of the current coding block also has a certain degree of continuity in the L-shaped template of the neighborhood. If the division mode is predicted based on the known pixels in the neighborhood coding blocks at the encoder and decoder, the number of coding bits required to transmit the split mode can be greatly saved.
  • FIG. 10 is a flowchart of another implementation of inter-frame prediction provided in an embodiment of the present application. As shown in Figure 10, the inter-frame prediction in this embodiment includes the steps of:
  • S1010 Select the upper and left neighboring areas of the current coding block as the template area of the current coding block.
  • the size of the current coding block is m*n
  • select the adjacent area of m*j size above the current coding block and then select the adjacent area of k*n size to the left of the current coding block, and merge them as the template area of the current coding block. If the adjacent area above or to the left of the current coding block does not exist, only one side is selected as the template area. If the adjacent area above or to the left of the current coding block does not exist, the traditional GPM partition mode selection method continues to be used.
  • FIG 11 is a configuration diagram of another candidate partitioning mode provided in an embodiment of the present application.
  • Current CU represents the current coding block
  • the template is the template area in the above embodiment.
  • its known partitioning mode is extended.
  • the partitioning mode that is closest to the extension line in the current coding block among the 64 partitioning modes is calculated as the candidate partitioning mode.
  • the candidate list of partitioning modes is traversed, and N partitioning modes are respectively used to extend the template area of the current coding block, and GPM inter-frame prediction is performed.
  • the steps are the same as steps 1 to 5 of the above embodiment to calculate the RDO cost.
  • the total list of partition modes includes 64 partition modes, the 64 partition modes are traversed in the current coding block, GPM inter-frame prediction is performed, and RDO cost is calculated.
  • S1050 Sort the rate-distortion costs obtained by performing GPM prediction on each partition mode, select the partition mode corresponding to the minimum rate-distortion cost, and indicate it accordingly in the bitstream.
  • the prediction mode with the smallest RDO cost is selected. If the RDO cost obtained in step 1030 is the smallest, the GPM is indicated in the bitstream to use the SM prediction method. If the RDO cost obtained in step 1040 is the smallest, the GPM is indicated in the bitstream not to use the SM prediction method, and the index of the partition mode selected for the current coding block among the 64 partition modes is indicated.
  • the neighborhood range screening and partitioning mode is preset
  • GPM prediction is implemented in the L-shaped template of the current coding block, and the rate-distortion cost is calculated, and finally the one with the smallest rate-distortion cost is selected as the optimal partitioning mode of the coding block.
  • the partitioning mode is selected in the same way, and the encoder only needs to transmit the switch indicator.
  • Figure 12 is a configuration diagram of another candidate partition mode provided in an embodiment of the present application.
  • Current CU represents the current coding block
  • the template is the template area in the above embodiment.
  • the extension line intersects with the current coding block calculate the partition mode that is closest to the extension line in the current coding block among the 64 partition modes as the candidate partition mode.
  • a total of N candidate partition modes are obtained in the w*h neighborhood.
  • step 3 selects the prediction mode with the smallest RDO cost. If the RDO cost obtained in step 3 is the smallest, then indicate in the bitstream that GPM uses the SM prediction method. If the RDO cost obtained in step 4 is the smallest, then indicate in the bitstream that GPM does not use the SM prediction method, and indicate the index of the partition mode selected for the current coding block among the 64 partition modes.
  • the preset direction screening division mode is configured to:
  • a known partitioning mode is searched in the preset neighborhood of the current coding block, and GPM prediction is implemented in the L-shaped template area of the current coding block, and the rate-distortion cost is calculated, and finally the one with the smallest rate-distortion cost is selected as the optimal partitioning mode of the current coding block.
  • the decoding end can select the partitioning mode in the same neighborhood in the same way, and the encoder only needs to transmit the switch indicator.
  • FIG13 is a schematic diagram of the configuration of another candidate partition mode provided in an embodiment of the present application. Taking the search specified direction shown in FIG13 as an example, all known partition modes are searched in the neighborhood, and the known partition modes are extended. Among them, the template in FIG13 is the template area in the above embodiment, and Current CU is the current coding block. When the extension line intersects with the current coding block, the partition mode closest to the extension line in the current coding block among the 64 partition modes is calculated as the candidate partition mode. A total of N candidate partition modes are obtained in the w*h neighborhood.
  • step 3 Traverse the candidate partition modes obtained in step 2, use N partition modes to extend the template area of the current coding block respectively, and perform GPM inter-frame prediction.
  • the steps are the same as steps 1 to 5 of the above embodiment, and calculate the RDO cost.
  • step 3 selects the prediction mode with the smallest RDO cost. If the RDO cost obtained in step 3 is the smallest, then indicate in the bitstream that GPM uses the SM prediction method. If the RDO cost obtained in step 4 is the smallest, then indicate in the bitstream that GPM does not use the SM prediction method, and indicate the index of the partition mode selected for the current coding block among the 64 partition modes.
  • this embodiment provides an inter-frame prediction method for a video decoding process.
  • the partitioning mode of the current block is predicted in the same manner as the encoding end to obtain a prediction value of the current block.
  • the partitioning mode candidate list is a partitioning mode candidate list
  • the decoding end determines that the current decoding process uses the SM prediction method based on the syntax elements in the video encoding bitstream, establishes a candidate list at the decoding end in the same way as the encoding end, and reads the candidate list index to complete the GPM inter-frame prediction.
  • the specific steps are as follows:
  • the image partitioning structure divides the input current video frame into blocks called CTUs, using A quadtree with a nested multi-type tree structure divides a CTU into CUs having leaf coding units that define areas for inter prediction modes.
  • a split mode candidate list (SMList) is constructed in a preset order.
  • the construction method refers to the implementation method in the above embodiment.
  • a partition mode is selected from the candidate list obtained in step 3.
  • step 4 According to the partitioning mode obtained in step 4, perform GPM inter-frame prediction on the current coding block.
  • the current coding block is divided into two non-rectangular sub-partitions, and then the MV candidate list in the GPM mode is generated based on the MV candidate list in the merge mode.
  • each sub-partition selects MV from the list for unidirectional motion compensation to obtain two unidirectional prediction values of the current coding block.
  • a fusion matrix is obtained based on the distance from the pixel point in each partition to the dividing line, and the unidirectional prediction values of the two partitions are weightedly fused using the matrix to obtain the final prediction value of the current coding block.
  • the decoding end determines that the current decoding process uses the SM prediction method based on the syntax elements in the video encoding bitstream, and searches for the best partitioning mode in the same way as the encoding end to complete the GPM inter-frame prediction.
  • the specific steps are as follows:
  • the image partitioning structure divides the input current video frame into blocks called CTUs, and uses a quadtree with a nested multi-type tree structure to divide one CTU into CUs having leaf coding units that define areas for inter-frame prediction modes.
  • a candidate partitioning mode is searched in the neighborhood of the current coding block.
  • the generation of the candidate partitioning mode refers to the implementation method in the above embodiment.
  • N partition modes are respectively used to extend the template area of the current coding block, and GPM inter-frame prediction is performed to calculate the RDO cost, and the partition mode corresponding to the minimum RDO cost is determined as the partition mode of the current coding block.
  • step 4 According to the partitioning mode obtained in step 4, perform GPM inter-frame prediction on the current coding block.
  • the current coding block is divided into two non-rectangular sub-partitions, and then the MV candidate list in the GPM mode is generated based on the MV candidate list in the merge mode.
  • each sub-partition selects MV from the list for unidirectional motion compensation to obtain two unidirectional prediction values of the current coding block.
  • the fusion matrix is obtained according to the distance from the pixel point in each partition to the dividing line, and the unidirectional prediction values of the two partitions are weightedly fused using the matrix to obtain the final prediction value of the current coding block.
  • the decoding end determines that the current decoding process does not use the SM prediction method based on the syntax elements in the video encoding bitstream, and reads the index value representing one of the traditional 64 partition modes to complete the GPM inter-frame prediction.
  • the specific steps are as follows:
  • the image partitioning structure divides the input current video frame into blocks called CTUs, and uses a quadtree with a nested multi-type tree structure to divide a CTU into CUs, where the CU has leaf coding units that define an inter-frame prediction mode area.
  • step 3 GPM inter-frame prediction is performed on the current coding block to obtain a prediction value of the current coding block.
  • FIG. 14 is a block diagram of an inter-frame prediction device provided in an embodiment of the present application. This embodiment is applied to an encoding end. As shown in FIG. 14 , the inter-frame prediction device in this embodiment includes: an acquisition module 1410, a first determination module 1420, a second determination module 1430, and a fusion module 1440.
  • the acquisition module 1410 is configured to acquire the current video frame and determine the current coding block in the current video frame.
  • the first determination module 1420 is configured to determine a first prediction value and a second prediction value of a current coding block.
  • the second determination module 1430 is configured to determine the geometric partitioning mode parameters of the current coding block according to the geometric partitioning mode parameters of the target coding block corresponding to the current coding block.
  • the fusion module 1440 is configured to perform weighted fusion on the first prediction value and the second prediction value according to the geometric partitioning mode parameters of the current coding block to obtain the prediction value of the current coding block.
  • the second determining module includes:
  • a first construction unit is configured to construct a partitioning mode candidate list of the current coding block based on a geometric partitioning mode parameter of a target coding block corresponding to the current coding block;
  • the first determination unit is configured to determine the geometric partitioning mode parameters of the current coding block based on the partitioning mode candidate list.
  • the target coding block includes: a neighborhood coding block; and a first construction unit including:
  • a first acquisition subunit is configured to acquire a geometric partitioning mode parameter of a neighborhood coding block corresponding to a current coding block
  • the first construction subunit is configured to construct a partitioning mode candidate list corresponding to the current coding block based on the geometric partitioning mode parameters of the neighborhood coding blocks.
  • the target coding block includes: a neighborhood coding block; and a first construction unit including:
  • a second acquisition subunit is configured to acquire a geometric partitioning mode parameter of a neighboring coding block corresponding to the current coding block;
  • a first search subunit is configured to determine an extension line of a geometric partitioning pattern corresponding to a geometric partitioning pattern parameter of a neighboring coding block in a current coding block, and search a partitioning pattern matching the extension line in a total list of partitioning patterns;
  • the second construction subunit is configured to construct a corresponding partition pattern candidate list based on the partition pattern that matches the extension line; wherein the number of partition patterns included in the partition pattern candidate list is less than or equal to the number of neighborhood coding blocks.
  • the first determining unit includes:
  • a first determining subunit is configured to respectively use each partition mode in the partition mode candidate list to perform inter-frame prediction on the current coding block according to a preset order, and obtain a rate-distortion cost of the corresponding partition mode as a first rate-distortion cost;
  • the second determining subunit is configured to determine the geometric partitioning mode parameters adopted by the current coding block based on the first rate-distortion cost.
  • the first determining unit includes:
  • a third determination subunit is configured to respectively use each partition mode in the partition mode candidate list to perform inter-frame prediction on the current coding block, and obtain a rate-distortion cost of the corresponding partition mode as a first rate-distortion cost;
  • the fourth determination subunit is configured to use each partition mode in the partition mode difference list to perform inter-frame prediction on the current coding block, and obtain a rate-distortion cost of the corresponding partition mode as a second rate-distortion cost; wherein the partition mode difference list is a difference set between the partition mode total list and the partition mode candidate list;
  • the fifth determination subunit is configured to determine the geometric partitioning mode parameters adopted by the current coding block based on the first rate-distortion cost and the second rate-distortion cost.
  • the second determining module includes:
  • An acquisition unit configured to acquire geometric partitioning mode parameters of a target coding block in a current video frame
  • a second construction unit is configured to construct a partitioning mode candidate list of the current coding block based on the geometric partitioning mode parameters of the target coding block;
  • the second determination unit is configured to determine the geometric partitioning mode parameters adopted by the current coding block based on the partitioning mode candidate list and using a template matching method.
  • the second building block comprises:
  • a second search subunit is configured to search for a division mode matching the extension line of the geometric division mode parameter adopted by the target coding block in the current video frame in the current coding block in the total list of division modes;
  • the third construction subunit is configured to construct a corresponding partitioning pattern based on the partitioning pattern matched by the extension line. Candidate list.
  • the target coding block in the current video frame includes:
  • the coded block is obtained by searching along the preset direction of the current coded block in the current video frame.
  • the second determining unit includes:
  • a fourth construction subunit is configured to construct a template area corresponding to a current coding block in a current video frame
  • a sixth determination subunit configured to respectively use each division mode in the division mode candidate list to perform inter-frame prediction on the template region, and obtain a rate-distortion cost of the corresponding division mode as a third rate-distortion cost;
  • the seventh determination subunit is configured to determine the geometric partitioning mode parameters adopted by the current coding block based on the third rate-distortion cost.
  • the second determining unit includes:
  • an eighth determination subunit configured to respectively adopt each division mode in the division mode candidate list to perform inter-frame prediction on the template region, and obtain a rate-distortion cost of the corresponding division mode as a third rate-distortion cost;
  • a ninth determination subunit configured to perform inter-frame prediction on the current coding block by using each partition mode in the total partition mode list, and obtain a rate-distortion cost of the corresponding partition mode as a fourth rate-distortion cost;
  • the tenth determination subunit is configured to determine the geometric partitioning mode parameters adopted by the current coding block based on the third rate-distortion cost and the fourth rate-distortion cost.
  • the inter-frame prediction device provided in this embodiment is configured to implement the inter-frame prediction method applied to the encoding end in the embodiment shown in FIG. 3 .
  • the implementation principle and technical effect of the inter-frame prediction device provided in this embodiment are similar and will not be described in detail here.
  • FIG15 is a structural block diagram of a decoding device provided in an embodiment of the present application. This embodiment is applied to a decoding end. As shown in FIG15 , the decoding device in this embodiment includes: a parsing acquisition module 1510, a first determination module 1520 and a prediction module 1530.
  • the parsing and obtaining module 1510 is configured to parse the video encoding stream and obtain the prediction decoding parameters of the current encoding block in the current video frame.
  • the first determination module 1520 is configured to determine the geometric partitioning mode parameters adopted by the current coding block according to the predicted decoding parameters.
  • the prediction module 1530 is configured to perform inter-frame prediction on the current coding block using the geometric partitioning mode parameters.
  • the first determining module includes:
  • a first acquisition unit configured to acquire a partition mode prediction indicator
  • a first determining unit configured to determine that a current coding block adopts a partition mode prediction method when the partition mode prediction indicator is a first value
  • a first construction unit is configured to construct a partition mode candidate list corresponding to a current coding block according to the inter-frame prediction method described in any of the above embodiments;
  • the second determination unit is configured to determine the geometric partitioning mode parameters adopted by the current coding block based on the partitioning mode prediction index and the partitioning mode candidate list.
  • the partition mode prediction index is used to identify the index value of the partition mode used by the current video frame in the partition mode candidate list.
  • the first determining module includes:
  • a first acquisition unit configured to acquire a partition mode prediction indicator
  • a first determining unit configured to determine that the current coding block adopts a partition mode prediction method when the partition mode prediction indicator is a first value
  • a second construction unit is configured to construct a partition mode candidate list corresponding to the current coding block according to the inter-frame prediction method described in any of the above embodiments;
  • the third determination unit is configured to determine the geometric division mode parameters adopted by the current coding block based on the division mode candidate list and using a template matching method.
  • the first determining module includes:
  • a second acquisition unit configured to acquire a partition mode prediction indicator
  • the fourth determining unit is configured to determine, when the partition mode prediction indicator is a second value, The current coding block does not use the partition mode prediction method;
  • the fifth determination unit is configured to determine the geometric partitioning mode parameters adopted by the current coding block based on the partitioning mode prediction index and the pre-created total list of partitioning modes.
  • the decoding device provided in this embodiment is configured to implement the decoding method applied to the decoding end of the embodiment shown in FIG. 4 .
  • the implementation principle and technical effect of the decoding device provided in this embodiment are similar and will not be described in detail here.
  • Figure 16 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application.
  • the electronic device provided by the present application includes: a processor 1610 and a memory 1620.
  • the number of processors 1610 in the electronic device may be one or more, and Figure 16 takes one processor 1610 as an example.
  • the number of memories 1620 in the electronic device may be one or more, and Figure 16 takes one memory 1620 as an example.
  • the processor 1610 and the memory 1620 of the electronic device may be connected via a bus or other means, and Figure 16 takes the connection via a bus as an example.
  • the electronic device may be a decoding end or an encoding end.
  • the memory 1620 may be configured to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the electronic device of any embodiment of the present application (e.g., the acquisition module 1410, the first determination module 1420, the second determination module 1430, and the fusion module 1440 in the inter-frame prediction device).
  • the memory 1620 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc.
  • the memory 1620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device.
  • the memory 1620 may further include a memory remotely arranged relative to the processor 1610, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the electronic device is an encoding end
  • the electronic device provided above can be configured to execute the inter-frame prediction method applied to the encoding end provided in any of the above embodiments, and have corresponding functions and effects.
  • the electronic device is a decoding end
  • the electronic device provided above can be configured to perform the above tasks.
  • the decoding method applied to the decoding end provided in the embodiment has corresponding functions and effects.
  • An embodiment of the present application also provides a storage medium containing computer executable instructions.
  • the computer executable instructions When the computer executable instructions are executed by a computer processor, they are used to execute an inter-frame prediction method applied to an encoding end.
  • the method includes: obtaining a current video frame, determining a current coding block in the current video frame; determining a first prediction value and a second prediction value of the current coding block; determining a geometric partitioning mode parameter of the current coding block; and performing weighted fusion on the first prediction value and the second prediction value according to the geometric partitioning mode parameter of the current coding block to obtain a prediction value of the current coding block.
  • An embodiment of the present application also provides a storage medium containing computer executable instructions.
  • the computer executable instructions When the computer executable instructions are executed by a computer processor, they are used to execute a decoding method applied to a decoding end, the method comprising: parsing a video encoding code stream to obtain prediction decoding parameters of a current encoding block in a current video frame; determining a geometric partitioning mode parameter used by the current encoding block based on the prediction decoding parameters; and using the geometric partitioning mode parameters to perform inter-frame prediction on the current encoding block.
  • user equipment encompasses any suitable type of wireless user equipment, such as a mobile phone, a portable data processing device, a portable web browser or a car-mounted mobile station.
  • various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic or any combination thereof.
  • some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, microprocessor or other computing device, although the present application is not limited thereto.
  • Embodiments of the present application may be implemented by executing computer program instructions by a data processor of a mobile device, for example in a processor entity, or by hardware, or by a combination of software and hardware.
  • the computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.
  • ISA instruction set architecture
  • the block diagrams of any logic flow in the drawings of this application may represent program steps, or may represent interconnected logic circuits, modules and functions, or may represent a combination of program steps and logic circuits, modules and functions.
  • the computer program may be stored in a memory.
  • the memory may have any suitable The type of the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to Read-Only Memory (ROM), Random Access Memory (RAM), optical storage devices and systems (Digital Video Disc (DVD) or Compact Disk (CD)), etc.
  • Computer readable media may include non-transitory storage media.
  • the data processor can be of any type suitable for the local technical environment, such as but not limited to general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSP), application-specific integrated circuits (ASIC), programmable logic devices (Field-Programmable Gate Array, FPGA) and processors based on multi-core processor architectures.
  • DSP digital signal processors
  • ASIC application-specific integrated circuits
  • FPGA programmable logic devices
  • FPGA Field-Programmable Gate Array

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请提出一种帧间预测方法及解码方法、电子装置和存储介质。该帧间预测方法包括:获取当前视频帧,确定当前视频帧中的当前编码块;确定当前编码块的第一预测值和第二预测值;根据当前编码块所对应目标编码块的几何划分模式参数确定当前编码块的几何划分模式参数;根据当前编码块的几何划分模式参数对第一预测值和第二预测值进行加权融合,得到当前编码块的预测值。

Description

帧间预测方法及解码方法、电子装置和存储介质 技术领域
本申请涉及通信技术领域,例如涉及一种帧间预测方法及解码方法、电子装置和存储介质。
背景技术
在视频编解码过程中,可以采用帧内预测方式或帧间预测方式对当前块进行处理。其中,帧间预测方式可以包括运动估计和运动补偿。针对运动补偿,可以采用几何划分模式(Geometric Partitioning Mode,GPM),将当前块划分为两个非矩形的分区,先分别对两个分区进行预测,然后再进行加权融合,得到当前块的预测值。目前的帧间预测方法中,GPM划分模式的确定是通过遍历预设的64种模式列表确定,解码端通过解析视频编码码流中的划分模式索引确定编码块采用的划分模式,因此计算复杂度和传输开销都较高。
发明内容
有鉴于此,本申请实施例提供一种帧间预测方法及解码方法、电子装置和存储介质,有效降低了传输开销,以及提升了划分准确度。
本申请实施例提供一种帧间预测方法,包括:
获取当前视频帧,确定所述当前视频帧中的当前编码块;
确定所述当前编码块的第一预测值和第二预测值;
根据所述当前编码块所对应目标编码块的几何划分模式参数确定所述当前编码块的几何划分模式参数;
根据所述当前编码块的几何划分模式参数对所述第一预测值和所述第二预测值进行加权融合,得到所述当前编码块的预测值。
本申请实施例提供一种解码方法,包括:
解析视频编码码流,获取当前视频帧中当前编码块的预测解码参数;
根据所述预测解码参数确定当前编码块所采用的几何划分模式参数;
采用所述几何划分模式参数对所述当前编码块进行帧间预测。
本申请实施例提供一种电子装置,包括:存储器,以及一个或多个处理器;
所述存储器,配置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述任一实施例所述的方法。
本申请实施例提供一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述任一实施例所述的方法。
附图说明
图1是本申请实施例提供的一种编码框架的实现示意图;
图2是本申请实施例提供的一种解码框架的实现示意图;
图3是本申请实施例提供的一种帧间预测方法的流程图;
图4是本申请实施例提供的一种解码方法的流程图;
图5是本申请实施例提供的一种划分模式对应的几何划分模式参数的配置示意图;
图6是本申请实施例提供的一种帧间预测的实现流程图;
图7是本申请实施例提供的一种候选的划分模式的配置示意图;
图8是本申请实施例提供的另一种帧间预测的实现流程图;
图9是本申请实施例提供的另一种候选的划分模式的配置示意图;
图10是本申请实施例提供的又一种帧间预测的实现流程图;
图11是本申请实施例提供的又一种候选的划分模式的配置示意图;
图12是本申请实施例提供的再一种候选的划分模式的配置示意图;
图13是本申请实施例提供的再一种候选的划分模式的配置示意图;
图14是本申请实施例提供的一种帧间预测装置的结构框图;
图15是本申请实施例提供的一种解码装置的结构框图;
图16是本申请实施例提供的一种电子装置的结构示意图。
具体实施方式
下文中将结合附图对本申请的实施例进行说明。以下结合实施例附图对本申请进行描述,所举实例仅用于解释本申请,并非用于限定本申请的范围。
在H.266/VVC规范中,支持GPM对编码单元进行帧间预测。其中,GPM包含64种划分模式,每个GPM编码单元(Coding Unit,CU)的划分模式使用固定长度的二进制编码表示。在编码过程中,通过遍历预设的64种划分模式列表确定最佳的划分模式,复杂度较高。示例性地,假设候选运动矢量(Motion Vector,MV)列表长度为N,共N*(N-1)个可能的GPM组合(因为两个MV不能相同),编码器需要遍历64*N*(N-1)=1920种可能的情况,复杂度较高。
本申请提供一种帧间预测方法和视频解码方法及装置,可以提高采用几何划分模式进行帧间预测的准确度。本申请提供的帧间预测方法中,在确定当前编码块的划分模式过程中,利用其他编码块中已计算出的划分模式进行参考,有效利用了视频帧画面中物体边缘延续信息,提高了划分的准确度,并且进一步降低了传输开销。
本申请实施例是基于混合编码框架实现的。图1是本申请实施例提供的一种编码框架的实现示意图。如图1所示,在新一代视频编码标准H.266/VVC编码框架中,可以包括帧内预测、帧间预测、变换、量化、环路滤波以及熵编码等模块。
编码端的整体框架流程如下:
(1)输入的视频首先分为帧进行块划分;
(2)将划分好的块送至帧内/帧间预测模块进行预测编码。其中帧内预测模块主要用于去除图像的空间相关性;帧间预测模块主要用于去除图像的时间相关性;
(3)再将得到的预测值与原始块进行相减得到残差值,然后对残差进行变 换和量化,以去除频域相关性,对数据进行有损压缩。
(4)最后再把所有的编码参数和残差进行熵编码形成二进制流进行存储或传输,熵编码模块的输出数据即原始视频压缩后的码流。
(5)将预测值和反量化、反变换后的残差进行相加得到块重建值,最终形成重建图像。
(6)重建图像经过环路滤波器进行滤波操作,存入图像缓存作为以后的参考图像。
图2是本申请实施例提供的一种解码框架的实现示意图。如图2所示,解码端的整体框架流程如下:
(1)解析码流获取预测模式得到预测值;
(2)对码流解析得到的残差进行反变换反量化;
(3)将预测值和反量化、反变换后的残差进行相加得到块重建值,最终形成重建图像。
(4)重建图像经过环路滤波器进行滤波操作,存入图像缓存作为以后的参考图像。
需要说明的一点是,本申请实施例提供的技术方案可以应用于H.266/VVC标准、AVS(如AVS3)或者下一代视频编解码标准中,本申请实施例对此不作限定。
在一实施例中,图3是本申请实施例提供的一种帧间预测方法的流程图。本实施例应用于视频编码过程中的帧间预测的情况。本实施例可以由编码端执行。如图3所示,本实施例包括:S310-S340。
S310、获取当前视频帧,确定当前视频帧中的当前编码块。
其中,当前视频帧可以理解为一个图像帧。在实施例中,可以将当前视频帧划分为多个编码树单元(Coding Tree Unit,CTU)的块,并使用具有嵌套多类型树结构的四叉树,将一个CTU划分成多个CU,该CU具有定义可以采用几何划分模式进行预测的一个区域,也可以称为一个子编码单元。可以理解为, 先将当前视频帧划分为多个CTU的块,然后再将每个CTU划分成多个CU,得到多个编码块,最后从当前视频帧对应的所有编码块中选取其中一个编码块作为当前编码块。
S320、确定当前编码块的第一预测值和第二预测值。
在实施例中,可以将当前编码块划分为两个非矩形的子分区,然后基于合并模式的运动矢量候选列表生成GPM模式下的MV候选列表。每个子分区从该MV候选列表中选取MV进行单向的运动补偿,得到当前编码块的两个单向预测值,作为对应的第一预测值和第二预测值,即一个非矩形的子分区对应的是第一预测值,另一个非矩形的子分区对应的是第二预测值。
S330、根据当前编码块所对应目标编码块的几何划分模式参数确定当前编码块的几何划分模式参数。
其中,几何划分模式参数指的是每个几何划分模式所对应的斜率、划分角度和位移长度。在传统GPM中,包括64种划分模式。每种划分模式对应一种斜率和一种位移长度,即共有20种划分角度和4种位移长度。在一实施例中,可以采用当前编码块所对应的目标编码块的几何划分模式参数确定当前编码块的几何划分模式参数。其中,目标编码块为当前视频帧中与当前编码块相关的编码块
S340、根据当前编码块的几何划分模式参数对第一预测值和第二预测值进行加权融合,得到当前编码块的预测值。
其中,当前编码块的预测值,指的是当前编码块中每个像素点预测的像素值。在实施例中,根据每个子分区中的像素点到划分线的距离得到融合矩阵,并利用该融合矩阵对两个子分区对应的第一预测值和第二预测值进行加权融合,得到当前编码块的预测值,从而实现了根据其它编码块的几何划分模式参数预测或推断出当前编码块的几何划分模式参数,有效利用了当前视频帧中目标编码块的边缘延续信息,提高了划分的准确度,并进一步降低了传输开销。
在一实施例中,根据当前编码块所对应目标编码块的几何划分模式参数确 定当前编码块的几何划分模式参数,包括:
基于当前编码块所对应目标编码块的几何划分模式参数构建当前编码块的划分模式候选列表;
基于划分模式候选列表确定当前编码块的几何划分模式参数。
其中,划分模式候选列表为当前编码块所对应的候选划分模式组成的列表。在实施例中,可以为当前编码块构建一个划分模式候选列表,在该划分模式候选列表中存在最多N个划分模式,通过遍历N个划分模式,并进行率失真代价的计算,最终选取率失真代价最小的划分模式作为该当前编码块的最优划分模式,并将该最优划分模式对应的几何划分模式参数作为当前编码块的几何划分模式参数。其中,N为大于等于1的正整数。
在一实施例中,目标编码块包括:邻域编码块;根据当前编码块所对应目标编码块的几何划分模式参数构建当前编码块对应的划分模式候选列表,包括:
获取当前编码块所对应邻域编码块的几何划分模式参数;
基于邻域编码块的几何划分模式参数构建当前编码块对应的划分模式候选列表。在实施例中,邻域编码块指的是与当前编码块在空域上相邻的编码块。其中,邻域编码块指的是当前视频中与当前编码块在位置上相邻的编码块。示例性地,邻域编码块可以位于当前编码块任意一侧的编码块。在实施例中,邻域编码块的划分线具有较强的相似性,特别是对于连续直线或曲线,通常在多个邻域编码块中保持相近的划分角度和位移长度。如果利用空域上相邻的编码块的划分模式对当前编码块的划分模式进行预测,并标记相应编码块的位置索引,则能够大幅节省传输划分模式所需的编码比特数。在实施例中,可以在当前编码块的邻域编码块中,按照预设顺序构建当前编码块对应的划分模式候选列表。在一实施例中,预设顺序可以理解为按照每个邻域编码块的几何划分模式参数进行排序,或者,按照每个邻域编码块与当前编码块之间的位置关系进行排序。
在一实施例中,目标编码块包括:邻域编码块;根据当前编码块所对应目 标编码块的几何划分模式参数构建当前编码块对应的划分模式候选列表,包括:
获取当前编码块所对应邻域编码块的几何划分模式参数;
确定邻域编码块的几何划分模式参数对应的几何划分模式在当前编码块中的延长线,并查找划分模式总列表中与延长线相匹配的划分模式;
基于延长线相匹配的划分模式构建对应的划分模式候选列表;其中,划分模式候选列表中所包含划分模式的数量小于等于邻域编码块的数量。在实施例中,邻域编码块的划分线也具有较强的延续性,通常在多个邻域编码块中延续伸展。如果利用空域上邻域编码块的划分模式在当前编码块中的延长线构建当前编码块的划分模式候选列表,并采用划分模式候选列表中的划分模式进行GPM预测,能够大幅度地节省传输划分模式所需的编码比特数。在实施例中,在当前编码块所对应的每个邻域编码块中,将邻域编码块已知的划分模式进行延长,在延长线与当前编码块存在交叉的情况下,计算划分模式总列表中与当前编码块内的延长线最接近的划分模式,并添加至划分模式候选列表中。在实施例中,当前编码块可以对应一个或多个邻域编码块。在当前编码块对应至少两个邻域编码块的情况下,可以将每个邻域编码块已知的划分模式进行延长,得到对应的延长线,在延长线未与当前编码块存在交叉的情况下,则不从划分模式总列表中查找与该延长线最接近的划分模式,即当前编码块的划分模式候选列表中所包含划分模式的数量小于或等于当前编码块所对应邻域编码块的总数量。
在一实施例中,基于划分模式候选列表确定当前编码块的几何划分模式参数,包括:
根据预设顺序,分别采用划分模式候选列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第一率失真代价;
基于第一率失真代价确定当前编码块所采用的几何划分模式参数。在实施例中,遍历划分模式候选列表,按照预设顺序分别采用划分模式候选列表中的每个划分模式对当前编码块进行GPM帧间预测,得到对应划分模式的率失真代 价,作为第一率失真代价,并选取划分模式候选列表中第一率失真代价最小的划分模式,作为当前编码块的划分模式,并将该划分模式的参数作为当前编码块采用的几何划分模式参数。
在一实施例中,基于划分模式候选列表确定当前编码块的几何划分模式参数,包括:
分别采用划分模式候选列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第一率失真代价;
采用划分模式差列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第二率失真代价;其中,划分模式差列表为划分模式总列表与划分模式候选列表之间的差集;
基于第一率失真代价和第二率失真代价确定当前编码块所采用的几何划分模式参数。在实施例中,在得到划分模式候选列表中每个划分模式对应的率失真代价之后,即得到第一率失真代价,遍历划分模式差列表中每个划分模式,并采用划分模式差列表中的每个划分模式对当前编码块进行GPM帧间预测,得到对应划分模式的率失真代价,即第二率失真代价。然后选取第一率失真代价和第二率失真代价中最小率失真代价对应的划分模式,若该最小率失真代价对应的划分模式来自划分模式候选列表,则指示GPM采用划分模式帧间预测方法;若最小率失真代价对应的划分模式来自划分模式差列表,则指示GPM不采用划分模式帧间预测方法。
在一实施例中,根据当前编码块所对应目标编码块的几何划分模式参数确定当前编码块的几何划分模式参数,包括:
获取当前视频帧内目标编码块的几何划分模式参数;
基于目标编码块的几何划分模式参数构建当前编码块的划分模式候选列表;
基于划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数。其中,当前视频帧内的目标编码块指的是与当前视频帧内当前编码块相关联的编码块。在实施例中,在编码端和解码端,当前编码块的上 方编码块以及左方编码块的像素都是已知的,可以将当前编码块的上方编码块以及左方编码块的L型邻域编码块常作为模板区域,用于帧内预测或帧间预测。同样,当前编码块的划分线在邻域的L型模板区域中也具有一定的连续性,如果在编码端和解码端基于邻域编码块中已知的像素对划分模式进行预测,则能够大幅节省传输划分模式所需的编码比特数。在实施例中,在构建得到当前编码块的划分模式候选列表之后,分别采用划分模式候选列表中的多个划分模式在当前编码块所对应的模板区域进行延长,并进行GPM帧间预测,计算得到对应的率失真代价,并将最小的率失真代价对应的划分模式作为当前编码块的划分模式,即得到当前编码块的几何划分模式参数。
在一实施例中,基于目标编码块的几何划分模式参数构建当前编码块的划分模式候选列表,包括:
基于当前视频帧内目标编码块所采用的几何划分模式参数在当前编码块中的延长线,查找划分模式总列表中与延长线相匹配的划分模式;
基于延长线相匹配的划分模式构建对应的划分模式候选列表。在实施例中,基于目标编码块所采用的几何划分模式参数确定对应目标编码块对应的划分模式,并将目标编码块对应的划分模式进行延长,得到对应的延长线。在延长线与当前编码块存在交叉的情况下,计算划分模块总列表中与该延长线最接近的划分模式,并将该最接近的划分模式添加至划分模式候选列表。
在一实施例中,当前视频帧内的目标编码块包括:
当前视频帧中当前编码块的邻域编码块,或
当前视频帧中当前编码块的预设邻域范围内的编码块,或
当前视频帧中沿当前编码块的预设方向搜索得到的编码块。在实施例中,当前编码块的邻域编码块指的是当前视频帧中与当前编码块在位置上相邻的编码块;当前编码块的预设邻域范围内的编码块,指的是在当前编码块所对应预设范围内的编码块;沿当前编码块的预设方向搜索得到的编码块,指的是根据指定的预设方向和步长,在当前编码块的预设邻域范围内搜索得到的编码块。
在一实施例中,基于划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数,包括:
构建当前视频帧中当前编码块对应的模板区域;
分别采用划分模式候选列表中的每个划分模式对模板区域进行帧间预测,得到对应划分模式的率失真代价,作为第三率失真代价;
基于第三率失真代价确定当前编码块所采用的几何划分模式参数。在实施例中,模板区域可以为当前编码块的上方区域和左方区域。在实施例中,根据当前编码块的尺寸大小,并根据当前编码块在第一方向的大小选取当前编码块针对上方的邻近区域,再根据当前编码块在第二方向的大小选取当前编码块针对左方的邻近区域,并将上方的邻近区域和左方的邻近区域合并作为当前编码块的模板区域。在一实施例中,若当前编码块不存在上方的邻近区域或左方的邻近区域,则可以选取其中一侧作为对应的模板区域。在实施例中,遍历划分模式候选列表,并分别采用划分模式候选列表中的每个划分模式对模板区域进行帧间预测,得到对应划分模式的率失真代价,作为第三率失真代价,并从所有第三率失真代价中选取最小率失真代价对应的划分模式,作为当前编码块采用的划分模式,即得到当前编码块所采用的几何划分模式参数。
在一实施例中,基于划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数,包括:
构建当前视频帧中当前编码块对应的模板区域;
分别采用划分模式候选列表中的每个划分模式对模板区域进行帧间预测,得到对应划分模式的率失真代价,作为第三率失真代价;
采用划分模式总列表中每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第四率失真代价;
基于第三率失真代价和第四率失真代价确定当前编码块所采用的几何划分模式参数。在实施例中,在得到第三率失真代价之后,采用划分模式总列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价, 作为第四率失真代价,并从所有第三率失真代价和所有第四率失真代价中选取率失真代价最小的划分模式,若率失真代价最小的划分模式为第三率失真代价,则在码流中指示GPM采用划分模式预测方法;若率失真代价最小的划分模式为第四率失真代价,则在码流中指示GPM不采用划分模式预测方法,并指示当前编码块所采用的划分模式在划分模式总列表中的索引。
在一实施例中,图4是本申请实施例提供的一种解码方法的流程图,本实施例应用于视频解码过程中的帧间预测的情况。本实施例可以由解码端执行。在实施例中,在当前编码块采用基于划分模式的帧间预测方式的情况下,解码端可以采用与编码端相同的方式,对当前编码块的划分模式进行预测,得到当前编码块的预测值。
如图4所示,本实施例包括:S410-S430。
S410、解析视频编码码流,获取当前视频帧中当前编码块的预测解码参数。
在实施例中,编码端通过视频编码码流向解码端发送当前视频帧,以及当前视频帧中当前编码块的预测解码参数。
S420、根据预测解码参数确定当前编码块所采用的几何划分模式参数。
在实施例中,预测解码参数可以携带当前编码块所对应的划分模式预测指示符。在实施例中,解码端可以根据划分模式预测指示符确定当前编码块是否采用划分模式预测方法,在采用划分模式预测方法的情况下,可以采用上述实施例所述的帧间预测方法确定当前编码块所采用的几何划分模式参数。
S430、采用几何划分模式参数对当前编码块进行帧间预测。
在实施例中,按照当前编码块的几何划分模式参数对当前编码块进行帧间预测。
在一实施例中,根据预测解码参数确定当前编码块所采用的几何划分模式参数,包括:
获取划分模式预测指示符;
在划分模式预测指示符为第一数值的情况下,确定当前编码块采用划分模 式预测方法;
根据上述任一实施例所述的帧间预测方法,构建当前编码块对应的划分模式候选列表;
基于划分模式预测索引和划分模式候选列表确定当前编码块所采用的几何划分模式参数。在实施例中,划分模式预测指示符用于指示当前编码块是否采用划分模式预测方法。在一实施例中,在划分模式预测指示符为第一数值的情况下,当前编码块采用划分模式预测方法,并采用上述实施例所述的帧间预测方法,构建当前编码块对应的划分模式候选列表,并基于划分模式预测索引从划分模式候选列表中选取当前编码块所采用的划分模式,即得到当前编码块所采用的几何划分模式参数。
在一实施例中,划分模式预测索引用于标识当前视频帧使用的划分模式在划分模式候选列表中的索引值。
在一实施例中,根据所述预测解码参数确定当前编码块所采用的几何划分模式参数,包括:
获取划分模式预测指示符;
在所述划分模式预测指示符为第一数值的情况下,确定所述当前编码块采用划分模式预测方法;
根据上述任一实施例所述的帧间预测方法,构建所述当前编码块对应的划分模式候选列表;
基于所述划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数。其中,对划分模式预测指示符的解释见上述实施例的描述,在此不再赘述。在实施例中,在划分模式预测指示符为第一数值的情况下,当前编码块采用划分模式预测方法,并采用上述实施例所述的帧间预测方法,构建当前编码块对应的划分模式候选列表,并基于采用模板匹配方式从划分模式候选列表中选取当前编码块所采用的划分模式,即得到当前编码块所采用的几何划分模式参数。基于划分模式候选列表,并采用模板匹配方式确定当前编 码块所采用的几何划分模式参数的过程,参见上述实施例中所述的具体实现方式,在此不再赘述。
在一实施例中,根据预测解码参数确定当前编码块所采用的几何划分模式参数,包括:
获取划分模式预测指示符;
在划分模式预测指示符为第二数值的情况下,确定当前编码块不采用划分模式预测方法;
基于划分模式预测索引和预先创建的划分模式总列表确定当前编码块所采用的几何划分模式参数。在实施例中,在划分模式预测指示符为第二数值的情况下,当前编码块不采用划分模式预测方法,并基于划分模式预测索引从划分模式总列表中选取当前编码块所采用的划分模式,即得到当前编码块所采用的几何划分模式参数。
需要说明的是,解码方法中的划分模式候选列表、划分模式总列表、几何划分模式参数和划分模式等参数的解释,见上述的帧间预测方法的实施例中对应参数的描述,在此不再赘述。
在一实施例中,本实施例提供一种用于视频编码过程中的帧间预测方法,在当前编码块采用基于几何划分模式的帧间预测模式的情况下,利用邻域编码块中已确定的划分模式对当前编码块的划分模式进行预测,从而降低传输开销。帧间预测方法的步骤如下:
步骤1:获取当前视频帧,确定当前视频帧中的当前编码块。
获取当前视频帧,确定当前视频帧中的当前编码块。图像划分结构将输入的当前视频帧分为称为CTU的块,使用具有嵌套多类型树结构的四叉树将一个CTU划分成CU,该CU具有定义帧间预测模式的区域的叶子编码单元。
步骤2:确定对当前编码块使用划分模式帧间预测。
在实施例中,在编码过程中,通常采用率失真优化的方式确定当前编码块的几何划分模式参数。在视频编码的情况下,可以基于当前编码块的几何划分 模式参数,利用多种划分模式分别对待预测图像分量进行预测编码,计算多种划分模式下每一种划分模式对应的率失真代价结果,从计算得到的多个率失真代价结果中选取最小率失真代价结果,并将最小率失真代价结果对应的划分模式确定为当前编码块的几何划分模式参数。
步骤3:利用邻域编码块中已确定的划分模式对当前编码块的划分模式进行预测。
在传统GPM中,共有64种划分模式。图5是本申请实施例提供的一种划分模式对应的几何划分模式参数的配置示意图。如图5所示,每种划分模式对应一种斜率和一种位移长度,共有20种角度和4种位移长度。然而空域上邻域编码块的划分线具有较强的相似性,特别是对于连续直线或曲线,通常在多个邻域编码块中保持相近的划分角度和位移长度。如果利用空域上邻域编码块的划分模式对当前编码块的划分模式进行预测,并标记相应编码块的位置索引,则能够大幅节省传输划分模式所需的编码比特数。具体实施方式按照下述的划分模式预测方法1及划分模式预测方法2中的实施方式进行操作。
步骤4:对当前编码块使用划分模式帧间预测方法获取当前编码块的预测值。
在当前编码块采用GPM帧间预测模式的情况下,当前编码块被划分为两个非矩形的子分区,然后基于合并模式(merge mode)的MV候选列表生成GPM模式下的MV候选列表,每个子分区将从该MV候选列表中选取MV进行单向的运动补偿,得到当前编码块的两个单向预测值,即第一预测值和第二预测值,最后根据每个分区中的像素点到划分线的距离得到融合矩阵,利用该矩阵对两个子分区的单向预测值进行加权融合,得到当前编码块最终的预测值。
步骤5:将划分模式预测方法通过开关指示符指示给解码端。
编码端根据当前编码块的预测值计算率失真代价,从而确定当前编码块采用的划分模式及几何划分模式参数。将确定的划分模式预测方法通过开关指示符指示及索引值(可选)给解码端,并将GPM帧间预测模式参数通过合并模式索引指示给解码端。
在一实施例中,划分模式预测方法1:划分模式候选列表的生成方式包括三种:
在一实现方式中,基于邻域编码块生成候选列表
空域上邻域编码块的划分线具有较强的相似性,特别是对于连续直线或曲线,通常在多个邻域编码块中保持相近的划分角度和位移。如果利用空域上邻域编码块的划分模式对当前编码块的划分模式进行预测,并标记相应编码块的位置索引,则能够大幅节省传输划分模式所需的编码比特数。
本实施方式中,为当前编码块建立一个划分模式候选列表,列表中存在最多N个划分模式。通过遍历这N个候选划分模式,并进行率失真代价的计算,最终选取率失真代价最小的一个作为该当前编码块的最优划分模式。在解码端可以依照同样的方式建立划分模式候选列表,那么编码器只需要传输最优划分模式在候选列表中的索引即可,这样就大幅节省了传输64种划分模式的编码比特数。图6是本申请实施例提供的一种帧间预测的实现流程图。如图6所示,本实施例中的帧间预测包括步骤:
S610、获取当前编码块所对应邻域编码块的划分模式,按照预设顺序构建划分模式候选列表。
在实施例中,在当前编码块的邻域编码块中,按照预设顺序构建划分模式候选列表(SMList,Split mode candidate list)。
以N=5为例,对划分模式候选列表的建立进行说明。图7是本申请实施例提供的一种候选的划分模式的配置示意图。如图7所示,图中Current CU表示当前编码块,A1表示当前编码块左侧最下方的CU,B1表示当前编码块上方最右侧的CU,B0和A0分别表示当前编码块右上方和左下方距离最近的块,B2表示当前编码块左上方距离最近的CU,按照预设顺序建立划分模式候选列表,例如A1->B1->B0->A0->B2,每个索引位置分别选用对应CU的已知划分模式。如果A1、B1、B0、A0中有一个或多个不存在的情况下,对应位置为空。如果全部邻近块中都不存在已知划分模式,则继续采用传统GPM划分模式选择方式。
需要注意的是,此处的5个划分模式候选列表的构建只是示例,具体实施中可以采用其他任意顺序。
S620、依次根据划分模式候选列表中的划分模式,对当前编码块执行GPM预测,计算率失真代价。
在实施例中,遍历划分模式候选列表,分别采用N个划分模式对当前编码块进行GPM帧间预测,步骤同上述实施例中的步骤1-步骤5,并计算RDO cost。
S630、遍历划分模式差列表中的划分模式,并对当前编码块执行GPM预测,计算率失真代价。
在实施例中,遍历64种划分模式中其余划分模式,并采用其余划分模式对当前编码块进行GPM预测,计算RDO cost。
S640、对每个划分模式执行GPM预测得到的率失真代价进行排序,并选择最小率失真代价对应的划分模式,并在码流中进行对应指示。
在实施例中,选取RDO cost最小的划分模式,如果该模式来自SMList,则在码流中指示GPM采用SM预测方法,并指示当前编码块选用的划分模式在SMList中的索引。如果该模式来自除SMList之外的其余划分模式,则在码流中指示GPM不采用SM预测方法,并指示当前编码块选用的划分模式在64种划分模式中的索引。
在一实现方式中,基于延长线生成划分模式候选列表
空域上邻域编码块的划分线也具有较强的延续性,通常在多个邻域编码块中延续伸展。如果利用空域上邻域编码块的划分模式在当前编码块中的延长线作为划分模式进行GPM预测,并标记相应编码块的位置索引,能够大幅节省传输划分模式所需的编码比特数。
本实施方式中,为当前编码块建立一个基于邻域编码块划分延长的划分模式候选列表,划分模式候选列表中存在最多N个划分模式。通过遍历这N个候选划分模式,并进行率失真代价的计算,最终选取率失真代价最小的一个作为该当前编码块的最优划分模式,从而节省传输编码比特数。图8是本申请实施 例提供的另一种帧间预测的实现流程图。如图8所示,本实施例中的帧间预测包括步骤:
S810、在当前编码块的邻域编码块中,根据已知划分模式延长划分线,计算与当前编码块中的延长线最接近的划分模式,作为候选划分模式。
以N=5为例,选取当前编码块相邻的5个邻域编码块。图9是本申请实施例提供的另一种候选的划分模式的配置示意图。如图9所示,图中Current CU表示当前编码块,A1表示当前编码块左侧最下方的CU,B1表示当前编码块上方最右侧的CU,B0和A0分别表示当前编码块右上方和左下方距离最近的块,B2表示当前编码块左上方距离最近的CU。在每个邻域编码块中,将其已知的划分模式进行延长。在延长线与当前编码块存在交叉的情况下,计算64种划分模式中与当前编码块内延长线最接近的划分模式,作为候选划分模式。
S820、按照预设顺序构建划分模式候选列表。
列表按照预设顺序建立,例如A1->B1->B0->A0->B2,每个索引位置分别选用步骤1计算得到的候选划分模式。如果A1、B1、B0、A0中有一个或多个不存在时,或划分模式延长线与当前块不相交时,对应位置为空。如果全部邻近块中都不存在已知划分模式,则继续采用传统GPM划分模式选择方式。
需要注意的是,此处的5个划分模式候选列表的构建只是示例,具体实施中可以采用其他任意顺序。
S830、基于划分模式候选列表中的划分模式对当前编码块进行GPM预测,得到对应的率失真代价。
在实施例中,遍历划分模式候选列表,分别采用N个划分模式对当前编码块进行GPM帧间预测,步骤同上述实施例的步骤1-步骤5,并计算RDO cost。
S840、遍历划分模式总列表中的其余划分模式,并对当前编码块进行GPM预测,得到敌营的率失真代价。
在实施例中,划分模式总列表中包括64种划分模式,并遍历64种划分模式中其余划分模式,并计算RDO cost。
S850、对每个划分模式执行GPM预测得到的率失真代价进行排序,并选择最小率失真代价对应的划分模式,并在码流中进行对应指示。
在实施例中,选取RDO cost最小的划分模式,如果该模式来自SMList,则在码流中指示GPM采用SM预测方法,并指示当前编码块选用的划分模式在SMList中的索引。如果该划分模式来自除SMList之外的其余划分模式,则在码流中指示GPM不采用SM预测方法,并指示当前编码块选用的划分模式在64种划分模式中的索引。
划分模式预测方法2:模板匹配
在一实现方式中,基于邻域编码块筛选划分模式
在编码端和解码端,当前编码块上方及左方的邻域像素都是已知的,因此当前编码块上方及左方的L型邻域编码块常作为模板区域,用于帧内预测或帧间预测。同样,当前编码块的划分线在邻域的L型模板中也具有一定的连续性,如果在编码端和解码端基于邻域编码块中已知的像素对划分模式进行预测,则能够大幅节省传输split mode所需的编码比特数。
本实施方式中,根据当前编码块的邻域编码块中已知划分模式,在当前编码块的L型模板中实施GPM预测,并进行率失真代价的计算,最终选取率失真代价最小的一个作为该当前编码块的最优划分模式。在解码端可以依照同样的方式选取划分模式,那么编码器只需要传输开关指示符即可,大幅节省了传输64种划分模式的编码比特数。图10是本申请实施例提供的又一种帧间预测的实现流程图。如图10所示,本实施例中的帧间预测包括步骤:
S1010、选取当前编码块的上方和左方邻域作为当前编码块的模板区域。
在实施例中,假设当前编码块的大小为m*n,选取当前编码块的上方m*j大小的邻近区域,再选取当前编码块的左方k*n大小的邻近区域,合并作为当前编码块的模板区域。如果当前编码块不存在上方或左方的邻近区域,则只选取一侧作为模板区域。如果当前编码块的上方或左方的邻近区域均不存在,则继续采用传统GPM划分模式选择方式。
S1020、在当前编码块的邻域编码块中,根据已知划分模式延长划分线,计算与当前编码块中的延长线最接近的划分模式,作为候选划分模式。
以N=5为例,选取当前编码块相邻的5个邻域编码块。图11是本申请实施例提供的又一种候选的划分模式的配置示意图。如图11所示,Current CU表示当前编码块,模板为上述实施例中的模板区域。在每个邻域编码块中,将其已知的划分模式进行延长。在延长线与当前编码块存在交叉的情况下,计算64种划分模式中与当前编码块内延长线最接近的划分模式,作为候选划分模式。
S1030、遍历划分模式候选列表,在当前编码块的模板区域执行GPM预测,计算率失真代价。
在实施例中,遍历划分模式候选列表,分别采用N个划分模式在当前编码块的模板区域进行延长,并进行GPM帧间预测,步骤同上述实施例的步骤1-步骤5,计算RDO cost。
S1040、遍历划分模式总列表,对当前编码块进行GPM预测,计算率失真代价。
在实施例中,划分模式总列表包括64种划分模式,在当前编码块中遍历64种划分模式,进行GPM帧间预测,并计算RDO cost。
S1050、对每个划分模式执行GPM预测得到的率失真代价进行排序,并选择最小率失真代价对应的划分模式,并在码流中进行对应指示。
在实施例中,选取RDO cost最小的预测模式,如果步骤1030所得的RDO cost最小,则在码流中指示GPM采用SM预测方法。如果步骤1040所得RDO cost最小,则在码流中指示GPM不采用SM预测方法,并指示当前编码块选用的划分模式在64种划分模式中的索引。
在一实现方式中,预设邻域范围筛选划分模式
本实施方式中,根据当前编码块的预设邻域中已知划分模式,在当前编码块的L型模板中实施GPM预测,并进行率失真代价的计算,最终选取率失真代价最小的一个作为该编码块的最优划分模式。在解码端可以在同样的邻域中, 依照同样的方式选取划分模式,编码器只需要传输开关指示符。具体步骤如下:
(1)确定当前编码块的模板区域,同上述的实施方式中的S1010。
(2)在当前编码块的预设邻域中,搜索已知划分模式,延长划分线得到候选划分模式。
以w*h大小的邻域为例,对目标编码块的确定过程进行说明。图12是本申请实施例提供的再一种候选的划分模式的配置示意图。如图12所示,Current CU表示当前编码块,模板为上述实施例中的模板区域。在邻域中搜索全部已知划分模式,并将已知的划分模式进行延长。当延长线与当前编码块存在交叉的情况下,计算64种划分模式中与当前编码块内延长线最接近的划分模式,作为候选划分模式。在w*h邻域中共计得到N个候选划分模式。
(3)遍历步骤2得到的候选划分模式,分别采用N个划分模式在当前编码块的模板区域进行延长,并进行GPM帧间预测,计算RDO cost。
(4)在当前编码块中遍历64种划分模式,进行GPM帧间预测,并计算RDO cost。
(5)选取RDO cost最小的预测模式,如果步骤3所得RDO cost最小,则在码流中指示GPM采用SM预测方法。如果步骤4所得RDO cost最小,则在码流中指示GPM不采用SM预测方法,并指示当前编码块选用的划分模式在64种划分模式中的索引。
在一实现方式中,预设方向筛选划分模式
本实施方式中,根据指定的预设方向和步长,在当前编码块的预设邻域中搜索已知划分模式,据此在当前编码块的L型模板区域中实施GPM预测,并进行率失真代价的计算,最终选取率失真代价最小的一个作为该当前编码块的最优划分模式。在解码端可以在同样的邻域中,依照同样的方式选取划分模式,编码器只需要传输开关指示符。具体步骤如下:
(1)确定当前编码块的模板区域,同上述的实施方式中的S1010。
(2)根据指定搜索方向在当前块的预设邻域中,搜索已知划分模式,延长 划分线得到候选划分模式。
图13是本申请实施例提供的再一种候选的划分模式的配置示意图。以图13所示的搜索指定方向为例,在邻域中搜索全部已知划分模式,并将已知的划分模式进行延长。其中,图13中的模板为上述实施例中的模板区域,Current CU为当前编码块。当延长线与当前编码块存在交叉的情况下,计算64种划分模式中与当前编码块内延长线最接近的划分模式,作为候选划分模式。在w*h邻域中共计得到N个候选划分模式。
(3)遍历步骤2得到的候选划分模式,分别采用N个划分模式在当前编码块的模板区域进行延长,并进行GPM帧间预测,步骤同上述的实施例步骤1-步骤5,计算RDO cost。
(4)在当前编码块中遍历64种划分模式,进行GPM帧间预测,并计算RDO cost。
(5)选取RDO cost最小的预测模式,如果步骤3所得RDO cost最小,则在码流中指示GPM采用SM预测方法。如果步骤4所得RDO cost最小,则在码流中指示GPM不采用SM预测方法,并指示当前编码块选用的划分模式在64种划分模式中的索引。
在一实施例中,本实施例提供一种用于视频解码过程中的帧间预测方法,在当前编码块采用基于几何划分模式的帧间预测模式时,采用与编码端同样的方式,对当前块的划分模式进行预测,得到当前块的预测值,下面以两种语法结构为例,介绍具体实施方式。
在一实现方式中,划分模式候选列表
本实施方式中,解码端根据视频编码码流中的语法元素,确定当前解码过程采用SM预测方法,在解码端依照与编码端同样的方式建立候选列表,并读取候选列表索引,完成GPM帧间预测。具体步骤如下:
(1)获取当前视频帧,解析视频编码码流,确定当前视频帧中的编码块CU。
在实施例中,图像划分结构将输入的当前视频帧分为称为CTU的块,使用 具有嵌套多类型树结构的四叉树将一个CTU划分成CU,该CU具有定义帧间预测模式的区域的叶子编码单元。
(2)解析视频编码码流,根据CU层的划分模式预测指示符识别当前CU采用SM预测方法。
(3)在当前编码块的邻近块中,根据邻域编码块的划分模式或邻域编码块划分模式的延长线,按照预设顺序构建划分模式候选列表(SMList,Split mode candidate list)。构建方式参考上述实施例中的实施方式。
(4)根据CU层的划分模式预测指示符,在步骤3得到的候选列表中选择划分模式。
(5)根据步骤4得到的划分模式,对当前编码块进行GPM帧间预测。
在实施例中,当前编码块会被划分为两个非矩形的子分区,然后基于合并模式(merge mode)的MV候选列表生成GPM模式下的MV候选列表,根据CU层合并列表索引值,每个子分区从该列表中选取MV进行单向的运动补偿,得到当前编码块的两个单向预测值,最后根据每个分区中的像素点到划分线的距离得到融合矩阵,利用该矩阵对两个分区的单向预测值进行加权融合,得到当前编码块的最终预测值。
在一实现方式中,模板匹配
本实施方式中,解码端根据视频编码码流中的语法元素,确定当前解码过程采用SM预测方法,在解码端依照与编码端同样的方式搜索最佳划分模式,完成GPM帧间预测。具体步骤如下:
(1)获取当前视频帧,解析视频编码码流,确定当前视频帧中的编码块CU。
在实施例中,图像划分结构将输入的当前视频帧分为称为CTU的块,使用具有嵌套多类型树结构的四叉树将一个CTU划分成CU,该CU具有定义帧间预测模式的区域的叶子编码单元。
(2)解析视频编码码流,根据CU层的划分模式预测指示符识别当前CU采用SM预测方法。
(3)根据预设邻近块顺序、预设邻域范围或预设方向,在当前编码块的邻域中搜索候选划分模式,候选划分模式的生成参考上述实施例中的实施方式。
(4)根据步骤3得到的候选划分模式,分别采用N个划分模式在当前编码块的模板区域进行延长,并进行GPM帧间预测,计算RDO cost,确定最小的RDO cost对应的划分模式作为当前编码块的划分模式。
(5)根据步骤4得到的划分模式,对当前编码块进行GPM帧间预测。
在实施例中,当前编码块会被划分为两个非矩形的子分区,然后基于合并模式的MV候选列表生成GPM模式下的MV候选列表,根据CU层合并列表索引值,每个子分区从该列表中选取MV进行单向的运动补偿,得到当前编码块的两个单向预测值,最后根据每个分区中的像素点到划分线的距离得到融合矩阵,利用该矩阵对两个分区的单向预测值进行加权融合,得到当前编码块的最终预测值。
在一实施方式中,解码端根据视频编码码流中的语法元素,确定当前解码过程不采用SM预测方法,并读取代表传统64种划分模式之一的索引值,完成GPM帧间预测。具体步骤如下:
(1)获取当前视频帧,解析视频编码码流,确定当前视频帧中的编码块CU。
在实施例中,图像划分结构将输入的当前视频帧分为称为CTU的块,使用具有嵌套多类型树结构的四叉树将一个CTU划分成CU,该CU具有定义帧间预测模式的区域的叶子编码单元。(2)解析视频编码码流,根据CU层的划分模式预测指示符识别当前CU不采用SM预测方法。
(3)根据CU层划分模式索引值确定当前编码块的划分模式。
(4)根据步骤3得到的划分模式,对当前编码块进行GPM帧间预测,得到当前编码块的预测值。
在一实施例中,图14是本申请实施例提供的一种帧间预测装置的结构框图。本实施例应用于编码端。如图14所示,本实施例中的帧间预测装置包括:获取模块1410、第一确定模块1420、第二确定模块1430和融合模块1440。
其中,获取模块1410,配置为获取当前视频帧,确定当前视频帧中的当前编码块。
第一确定模块1420,配置为确定当前编码块的第一预测值和第二预测值。
第二确定模块1430,配置为根据当前编码块所对应目标编码块的几何划分模式参数确定当前编码块的几何划分模式参数。
融合模块1440,配置为根据当前编码块的几何划分模式参数对第一预测值和第二预测值进行加权融合,得到当前编码块的预测值。
在一实施例中,第二确定模块,包括:
第一构建单元,配置为基于当前编码块所对应目标编码块的几何划分模式参数构建当前编码块的划分模式候选列表;
第一确定单元,配置为基于划分模式候选列表确定当前编码块的几何划分模式参数。
在一实施例中,目标编码块包括:邻域编码块;第一构建单元,包括:
第一获取子单元,配置为获取当前编码块所对应邻域编码块的几何划分模式参数;
第一构建子单元,配置为基于邻域编码块的几何划分模式参数构建当前编码块对应的划分模式候选列表。
在一实施例中,目标编码块包括:邻域编码块;第一构建单元,包括:
第二获取子单元,配置为获取当前编码块所对应邻域编码块的几何划分模式参数;
第一查找子单元,配置为确定邻域编码块的几何划分模式参数对应的几何划分模式在当前编码块中的延长线,并查找划分模式总列表中与延长线相匹配的划分模式;
第二构建子单元,配置为基于延长线相匹配的划分模式构建对应的划分模式候选列表;其中,划分模式候选列表中所包含划分模式的数量小于等于邻域编码块的数量。
在一实施例中,第一确定单元,包括:
第一确定子单元,配置为根据预设顺序,分别采用划分模式候选列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第一率失真代价;
第二确定子单元,配置为基于第一率失真代价确定当前编码块所采用的几何划分模式参数。
在一实施例中,第一确定单元,包括:
第三确定子单元,配置为分别采用划分模式候选列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第一率失真代价;
第四确定子单元,配置为采用划分模式差列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第二率失真代价;其中,划分模式差列表为划分模式总列表与划分模式候选列表之间的差集;
第五确定子单元,配置为基于第一率失真代价和第二率失真代价确定当前编码块所采用的几何划分模式参数。
在一实施例中,第二确定模块,包括:
获取单元,配置为获取当前视频帧内目标编码块的几何划分模式参数;
第二构建单元,配置为基于目标编码块的几何划分模式参数构建当前编码块的划分模式候选列表;
第二确定单元,配置为基于划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数。
在一实施例中,第二构建单元,包括:
第二查找子单元,配置为基于当前视频帧内目标编码块所采用的几何划分模式参数在当前编码块中的延长线,查找划分模式总列表中与延长线相匹配的划分模式;
第三构建子单元,配置为基于延长线相匹配的划分模式构建对应的划分模 式候选列表。
在一实施例中,当前视频帧内的目标编码块包括:
当前视频帧中当前编码块的邻域编码块,或
当前视频帧中当前编码块的预设邻域范围内的编码块,或
当前视频帧中沿当前编码块的预设方向搜索得到的编码块。
在一实施例中,第二确定单元,包括:
第四构建子单元,配置为构建当前视频帧中当前编码块对应的模板区域;
第六确定子单元,配置为分别采用划分模式候选列表中的每个划分模式对模板区域进行帧间预测,得到对应划分模式的率失真代价,作为第三率失真代价;
第七确定子单元,配置为基于第三率失真代价确定当前编码块所采用的几何划分模式参数。
在一实施例中,第二确定单元,包括:
第八确定子单元,配置为分别采用划分模式候选列表中的每个划分模式对模板区域进行帧间预测,得到对应划分模式的率失真代价,作为第三率失真代价;
第九确定子单元,配置为采用划分模式总列表中每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第四率失真代价;
第十确定子单元,配置为基于第三率失真代价和第四率失真代价确定当前编码块所采用的几何划分模式参数。
本实施例提供的帧间预测装置设置为实现图3所示实施例的应用于编码端的帧间预测方法,本实施例提供的帧间预测装置实现原理和技术效果类似,此处不再赘述。
在一实施例中,图15是本申请实施例提供的一种解码装置的结构框图。本实施例应用于解码端。如图15所示,本实施例中的解码装置包括:解析获取模块1510、第一确定模块1520和预测模块1530。
解析获取模块1510,配置为解析视频编码码流,获取当前视频帧中当前编码块的预测解码参数。
第一确定模块1520,配置为根据预测解码参数确定当前编码块所采用的几何划分模式参数。
预测模块1530,配置为采用几何划分模式参数对当前编码块进行帧间预测。
在一实施例中,第一确定模块,包括:
第一获取单元,配置为获取划分模式预测指示符;
第一确定单元,配置为在划分模式预测指示符为第一数值的情况下,确定当前编码块采用划分模式预测方法;
第一构建单元,配置为根据上述任一实施例所述的帧间预测方法,构建当前编码块对应的划分模式候选列表;
第二确定单元,配置为基于划分模式预测索引和划分模式候选列表确定当前编码块所采用的几何划分模式参数。
在一实施例中,划分模式预测索引用于标识当前视频帧使用的划分模式在划分模式候选列表中的索引值。
在一实施例中,第一确定模块,包括:
第一获取单元,配置为获取划分模式预测指示符;
第一确定单元,配置为在所述划分模式预测指示符为第一数值的情况下,确定所述当前编码块采用划分模式预测方法;
第二构建单元,配置为根据上述任一实施例所述的帧间预测方法,构建所述当前编码块对应的划分模式候选列表;
第三确定单元,配置为基于所述划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数。
在一实施例中,第一确定模块,包括:
第二获取单元,配置为获取划分模式预测指示符;
第四确定单元,配置为在划分模式预测指示符为第二数值的情况下,确定 当前编码块不采用划分模式预测方法;
第五确定单元,配置为基于划分模式预测索引和预先创建的划分模式总列表确定当前编码块所采用的几何划分模式参数。
本实施例提供的解码装置设置为实现图4所示实施例的应用于解码端的解码方法,本实施例提供的解码装置实现原理和技术效果类似,此处不再赘述。
在一实施例中,图16是本申请实施例提供的一种电子装置的结构示意图。如图16所示,本申请提供的电子装置,包括:处理器1610和存储器1620。该电子装置中处理器1610的数量可以是一个或者多个,图16中以一个处理器1610为例。该电子装置中存储器1620的数量可以是一个或者多个,图16中以一个存储器1620为例。该电子装置的处理器1610和存储器1620可以通过总线或者其他方式连接,图16中以通过总线连接为例。在该实施例中,该电子装置为可以为解码端或编码端。
存储器1620作为一种计算机可读存储介质,可设置为存储软件程序、计算机可执行程序以及模块,如本申请任意实施例的电子装置对应的程序指令/模块(例如,帧间预测装置中的获取模块1410、第一确定模块1420、第二确定模块1430和融合模块1440)。存储器1620可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据电子装置的使用所创建的数据等。此外,存储器1620可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器1620可进一步包括相对于处理器1610远程设置的存储器,这些远程存储器可以通过网络连接至电子装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
在电子装置为编码端的情况下,上述提供的电子装置可设置为执行上述任意实施例提供的应用于编码端的帧间预测方法,具备相应的功能和效果。
在电子装置为解码端的情况下,上述提供的电子装置可设置为执行上述任 意实施例提供的应用于解码端的解码方法,具备相应的功能和效果。
本申请实施例还提供一种包含计算机可执行指令的存储介质,计算机可执行指令在由计算机处理器执行时用于执行一种应用于编码端的帧间预测方法,该方法包括:获取当前视频帧,确定当前视频帧中的当前编码块;确定当前编码块的第一预测值和第二预测值;确定当前编码块的几何划分模式参数;根据当前编码块的几何划分模式参数对第一预测值和第二预测值进行加权融合,得到当前编码块的预测值。
本申请实施例还提供一种包含计算机可执行指令的存储介质,计算机可执行指令在由计算机处理器执行时用于执行一种应用于解码端的解码方法,该方法包括:解析视频编码码流,获取当前视频帧中当前编码块的预测解码参数;根据预测解码参数确定当前编码块所采用的几何划分模式参数;采用几何划分模式参数对当前编码块进行帧间预测。
本领域内的技术人员应明白,术语用户设备涵盖任何适合类型的无线用户设备,例如移动电话、便携数据处理装置、便携网络浏览器或车载移动台。
一般来说,本申请的多种实施例可以在硬件或专用电路、软件、逻辑或其任何组合中实现。例如,一些方面可以被实现在硬件中,而其它方面可以被实现在可以被控制器、微处理器或其它计算装置执行的固件或软件中,尽管本申请不限于此。
本申请的实施例可以通过移动装置的数据处理器执行计算机程序指令来实现,例如在处理器实体中,或者通过硬件,或者通过软件和硬件的组合。计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码。
本申请附图中的任何逻辑流程的框图可以表示程序步骤,或者可以表示相互连接的逻辑电路、模块和功能,或者可以表示程序步骤与逻辑电路、模块和功能的组合。计算机程序可以存储在存储器上。存储器可以具有任何适合于本 地技术环境的类型并且可以使用任何适合的数据存储技术实现,例如但不限于只读存储器(Read-Only Memory,ROM)、随机访问存储器(Random Access Memory,RAM)、光存储器装置和系统(数码多功能光碟(Digital Video Disc,DVD)或光盘(Compact Disk,CD))等。计算机可读介质可以包括非瞬时性存储介质。数据处理器可以是任何适合于本地技术环境的类型,例如但不限于通用计算机、专用计算机、微处理器、数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑器件(Field-Programmable Gate Array,FPGA)以及基于多核处理器架构的处理器。
以上仅为本申请的可选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (17)

  1. 一种帧间预测方法,包括:
    获取当前视频帧,确定所述当前视频帧中的当前编码块;
    确定所述当前编码块的第一预测值和第二预测值;
    根据所述当前编码块所对应目标编码块的几何划分模式参数确定所述当前编码块的几何划分模式参数;
    根据所述当前编码块的几何划分模式参数对所述第一预测值和所述第二预测值进行加权融合,得到所述当前编码块的预测值。
  2. 根据权利要求1所述的方法,其中,所述根据所述当前编码块所对应目标编码块的几何划分模式参数确定所述当前编码块的几何划分模式参数,包括:
    基于所述当前编码块所对应目标编码块的几何划分模式参数构建所述当前编码块的划分模式候选列表;
    基于所述划分模式候选列表确定当前编码块的几何划分模式参数。
  3. 根据权利要求2所述的方法,其中,所述目标编码块包括:邻域编码块;所述根据所述当前编码块所对应目标编码块的几何划分模式参数构建所述当前编码块对应的划分模式候选列表,包括:
    获取所述当前编码块所对应邻域编码块的几何划分模式参数;
    基于邻域编码块的几何划分模式参数构建所述当前编码块对应的划分模式候选列表。
  4. 根据权利要求2所述的方法,其中,所述目标编码块包括:邻域编码块;所述根据所述当前编码块所对应目标编码块的几何划分模式参数构建所述当前编码块对应的划分模式候选列表,包括:
    获取所述当前编码块所对应邻域编码块的几何划分模式参数;
    确定所述邻域编码块的几何划分模式参数对应的几何划分模式在当前编码块中的延长线,并查找划分模式总列表中与所述延长线相匹配的划分模式;
    基于所述延长线相匹配的划分模式构建对应的划分模式候选列表;其中,所述划分模式候选列表中所包含划分模式的数量小于或等于所述邻域编码块的 数量。
  5. 根据权利要求2-4任一所述的方法,其中,所述基于所述划分模式候选列表确定所述当前编码块的几何划分模式参数,包括:
    根据预设顺序,分别采用所述划分模式候选列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第一率失真代价;
    基于所述第一率失真代价确定所述当前编码块所采用的几何划分模式参数。
  6. 根据权利要求2-4任一所述的方法,其中,所述基于所述划分模式候选列表确定所述当前编码块的几何划分模式参数,包括:
    分别采用所述划分模式候选列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第一率失真代价;
    采用划分模式差列表中的每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第二率失真代价;其中,所述划分模式差列表为划分模式总列表与所述划分模式候选列表之间的差集;
    基于所述第一率失真代价和所述第二率失真代价确定所述当前编码块所采用的几何划分模式参数。
  7. 根据权利要求1所述的方法,其中,所述根据所述当前编码块所对应目标编码块的几何划分模式参数确定所述当前编码块的几何划分模式参数,包括:
    获取当前视频帧内目标编码块的几何划分模式参数;
    基于所述目标编码块的几何划分模式参数构建所述当前编码块的划分模式候选列表;
    基于所述划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数。
  8. 根据权利要求7所述的方法,其中,所述基于所述目标编码块的几何划分模式参数构建所述当前编码块的划分模式候选列表,包括:
    基于当前视频帧内目标编码块所采用的几何划分模式参数在当前编码块中的延长线,查找划分模式总列表中与所述延长线相匹配的划分模式;
    基于所述延长线相匹配的划分模式构建对应的划分模式候选列表。
  9. 根据权利要求7或8所述的方法,其中,所述当前视频帧内的目标编码块,包括:
    当前视频帧中当前编码块的邻域编码块,或
    当前视频帧中当前编码块的预设邻域范围内的编码块,或
    当前视频帧中沿当前编码块的预设方向搜索得到的编码块。
  10. 根据权利要求7或8所述的方法,其中,所述基于所述划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数,包括:
    构建当前视频帧中当前编码块对应的模板区域;
    分别采用所述划分模式候选列表中的每个划分模式对模板区域进行帧间预测,得到对应划分模式的率失真代价,作为第三率失真代价;
    基于所述第三率失真代价确定当前编码块所采用的几何划分模式参数。
  11. 根据权利要求7或8所述的方法,其中,所述基于所述划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数,包括:
    构建当前视频帧中当前编码块对应的模板区域;
    分别采用所述划分模式候选列表中的每个划分模式对模板区域进行帧间预测,得到对应划分模式的率失真代价,作为第三率失真代价;
    采用划分模式总列表中每个划分模式对当前编码块进行帧间预测,得到对应划分模式的率失真代价,作为第四率失真代价;
    基于所述第三率失真代价和所述第四率失真代价确定当前编码块所采用的几何划分模式参数。
  12. 一种解码方法,包括:
    解析视频编码码流,获取当前视频帧中当前编码块的预测解码参数;
    根据所述预测解码参数确定当前编码块所采用的几何划分模式参数;
    采用所述几何划分模式参数对所述当前编码块进行帧间预测。
  13. 根据权利要求12所述的方法,其中,所述根据所述预测解码参数确定当 前编码块所采用的几何划分模式参数,包括:
    获取划分模式预测指示符;
    响应于所述划分模式预测指示符为第一数值,确定所述当前编码块采用划分模式预测方法;
    根据权利要求1-6任一项所述的帧间预测方法,构建所述当前编码块对应的划分模式候选列表;
    基于划分模式预测索引和所述划分模式候选列表确定当前编码块所采用的几何划分模式参数;其中,所述划分模式预测索引用于标识当前视频帧使用的划分模式在所述划分模式候选列表中的索引值。
  14. 根据权利要求12所述的方法,其中,所述根据所述预测解码参数确定当前编码块所采用的几何划分模式参数,包括:
    获取划分模式预测指示符;
    响应于所述划分模式预测指示符为第一数值,确定所述当前编码块采用划分模式预测方法;
    根据权利要求1和7-11任一项所述的帧间预测方法,构建所述当前编码块对应的划分模式候选列表;
    基于所述划分模式候选列表,并采用模板匹配方式确定当前编码块所采用的几何划分模式参数。
  15. 根据权利要求12所述的方法,其中,所述根据所述预测解码参数确定当前编码块所采用的几何划分模式参数,包括:
    获取划分模式预测指示符;
    响应于所述划分模式预测指示符为第二数值,确定当前编码块不采用划分模式预测方法;
    基于划分模式预测索引和预先创建的划分模式总列表确定当前编码块所采用的几何划分模式参数。
  16. 一种电子装置,包括:存储器,以及至少一个处理器;
    所述存储器,配置为存储至少一个程序;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如上述权利要求1-11或12-15中任一项所述的方法。
  17. 一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述权利要求1-11或12-15中任一项所述的方法。
PCT/CN2023/123129 2022-11-18 2023-10-07 帧间预测方法及解码方法、电子装置和存储介质 WO2024103987A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211449177.0 2022-11-18
CN202211449177.0A CN118057814A (zh) 2022-11-18 2022-11-18 帧间预测方法及解码方法、电子装置和存储介质

Publications (1)

Publication Number Publication Date
WO2024103987A1 true WO2024103987A1 (zh) 2024-05-23

Family

ID=91069006

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/123129 WO2024103987A1 (zh) 2022-11-18 2023-10-07 帧间预测方法及解码方法、电子装置和存储介质

Country Status (2)

Country Link
CN (1) CN118057814A (zh)
WO (1) WO2024103987A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200137386A1 (en) * 2017-06-30 2020-04-30 Huawei Technologies Co., Ltd. Encoder, decoder, computer program and computer program product for processing a frame of a video sequence
CN111246212A (zh) * 2020-02-21 2020-06-05 北京大学 一种基于编解码端的几何划分模式预测方法、装置、存储介质及终端
KR20220011107A (ko) * 2020-07-20 2022-01-27 한국전자통신연구원 기하학적 분할을 사용하는 영상 부호화/복호화를 위한 방법, 장치 및 기록 매체
CN114173120A (zh) * 2021-12-03 2022-03-11 北京达佳互联信息技术有限公司 视频编码块划分方法和视频编码块划分预测模型训练方法
CN114586366A (zh) * 2020-04-03 2022-06-03 Oppo广东移动通信有限公司 帧间预测方法、编码器、解码器及存储介质
CN114697660A (zh) * 2020-12-31 2022-07-01 中科寒武纪科技股份有限公司 一种数据处理方法、装置、计算机设备和存储介质
US20220329824A1 (en) * 2021-04-12 2022-10-13 Alibaba (China) Co., Ltd. Method, apparatus, and non-transitory computer-readable storage medium for motion vector refinement for geometric partition mode

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200137386A1 (en) * 2017-06-30 2020-04-30 Huawei Technologies Co., Ltd. Encoder, decoder, computer program and computer program product for processing a frame of a video sequence
CN111246212A (zh) * 2020-02-21 2020-06-05 北京大学 一种基于编解码端的几何划分模式预测方法、装置、存储介质及终端
CN114586366A (zh) * 2020-04-03 2022-06-03 Oppo广东移动通信有限公司 帧间预测方法、编码器、解码器及存储介质
KR20220011107A (ko) * 2020-07-20 2022-01-27 한국전자통신연구원 기하학적 분할을 사용하는 영상 부호화/복호화를 위한 방법, 장치 및 기록 매체
CN114697660A (zh) * 2020-12-31 2022-07-01 中科寒武纪科技股份有限公司 一种数据处理方法、装置、计算机设备和存储介质
US20220329824A1 (en) * 2021-04-12 2022-10-13 Alibaba (China) Co., Ltd. Method, apparatus, and non-transitory computer-readable storage medium for motion vector refinement for geometric partition mode
CN114173120A (zh) * 2021-12-03 2022-03-11 北京达佳互联信息技术有限公司 视频编码块划分方法和视频编码块划分预测模型训练方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
C.-C. CHEN (QUALCOMM), H. HUANG (QUALCOMM), Y. ZHANG, Z. ZHANG, Y.-J. CHANG, V. SEREGIN (QUALCOMM), M. KARCZEWICZ (QUALCOMM): "EE2-2.4: Template matching based reordering for GPM split modes", 26. JVET MEETING; 20220420 - 20220429; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 20 April 2022 (2022-04-20), XP030300808 *

Also Published As

Publication number Publication date
CN118057814A (zh) 2024-05-21

Similar Documents

Publication Publication Date Title
RU2720648C1 (ru) Способ и устройство для кодирования или декодирования изображения с предсказанием информации движения между уровнями в соответствии со схемой сжатия информации движения
WO2020182166A1 (zh) 运动信息候选者列表构建方法及装置
JP6073404B2 (ja) 映像復号化方法及び装置
JP2022008349A (ja) 低減されたメモリアクセスを用いてfrucモードでビデオデータを符号化又は復号する方法及び装置
JP2021506180A (ja) ビデオデータインター予測方法及び装置
CN113709458B (zh) 视频编解码中的位移矢量预测方法、装置及设备
JP5858194B2 (ja) 画像復号装置、画像復号方法、及び画像復号プログラム、並びに、受信装置、受信方法、及び受信プログラム
JP7361838B2 (ja) 映像符号化装置、映像復号装置、及びこれらのプログラム
WO2021213418A1 (zh) 视频编码方法、装置、设备和存储介质
CN113767626B (zh) 视频增强的方法及装置
WO2024103987A1 (zh) 帧间预测方法及解码方法、电子装置和存储介质
JP5720751B2 (ja) 画像復号装置、画像復号方法、及び画像復号プログラム、並びに、受信装置、受信方法、及び受信プログラム
WO2019150411A1 (ja) 映像符号化装置、映像符号化方法、映像復号装置、映像復号方法、及び映像符号化システム
CN109618152B (zh) 深度划分编码方法、装置和电子设备
JP2006324888A (ja) 動画像符号化装置
Jankar et al. Adaptive block searching and fractional rate-distortion trade-off based motion estimation for HEVC encoder
CN105306953A (zh) 图像编码方法和装置
WO2020042724A1 (zh) 帧间预测方法、装置以及视频编码器和视频解码器
CN116366839A (zh) 预测模式的决策方法、装置、设备及存储介质