Weighted prediction method and device for multi-hypothesis coding

By using a weighted prediction method based on multiple hypothesis coding, the weight coefficients are adaptively determined using the indication information in the bitstream, which solves the accuracy and efficiency problems of video coding in diverse scenarios and achieves more efficient video data compression.

CN118612420APending Publication Date: 2024-09-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410547576.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-03-30
Filing Date
2019-12-06
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing video coding technologies struggle to further compress video data without sacrificing image quality, especially in diverse scenarios, where the accuracy and efficiency of multi-hypothesis coding need improvement.

Method used

A weighted prediction method based on multiple hypothesis coding is adopted. By parsing the indication information in the bitstream, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined respectively, and weighted prediction is performed adaptively to improve the accuracy of pixel value prediction for image blocks.

Benefits of technology

In different encoding and decoding scenarios, it ensures the normal operation of multi-hypothesis coding, improves the accuracy of image prediction and coding performance, and enhances video compression efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612420A
    Figure CN118612420A
Patent Text Reader

Abstract

The invention provides a weighted prediction method and device for multi-hypothesis coding. The method comprises the following steps: determining a first target prediction block of a to-be-processed image block according to an inter-frame prediction mode; determining a second target prediction block of the to-be-processed image block according to an intra-frame prediction mode; determining weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode according to indication information in the code stream; and weighting the pixel value of the first target prediction block and the pixel value of the second target prediction block according to the weight coefficient to obtain a prediction value of the to-be-processed image block. According to the invention, the prediction accuracy of the pixel value of the image block is improved to a certain extent, and the coding and decoding performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 201980080324.1, and the original application date is December 6, 2019. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The present invention relates to the field of video coding and decoding, and in particular to a weighted prediction method and device for multi-hypothesis coding. Background Art

[0003] Video coding (video encoding and decoding) is widely used in digital video applications such as broadcast digital television, video distribution over the Internet and mobile networks, real-time conversation applications such as video chat and video conferencing, DVD and Blu-ray Discs, video content acquisition and editing systems, and security applications in camcorders.

[0004] With the development of block-based hybrid video coding in the H.261 standard in 1990, new video coding techniques and tools have been developed and formed the basis for new video coding standards. Other video coding standards include MPEG-1 video, MPEG-2 video, ITU-T H.262 / MPEG-2, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC) ... and extensions of such standards, such as scalability and / or 3D (three-dimensional) extensions. As video creation and use become more and more widespread, video traffic has become the largest burden on communication networks and data storage. Therefore, one of the goals of most video coding standards is to reduce the bit rate compared to previous standards without sacrificing picture quality. Even though the latest High Efficiency video coding (HEVC) can compress video about twice as much as AVC without sacrificing picture quality, there is still a great need for new technologies to further compress video relative to HEVC. Summary of the invention

[0005] The embodiments of the present invention provide a weighted prediction method and device for multi-hypothesis coding and a corresponding encoder and decoder, which can improve the prediction accuracy of the pixel values ​​of an image block to a certain extent and improve the coding and decoding performance.

[0006] In the first aspect, an embodiment of the present invention provides a weighted prediction method for multi-hypothesis coding, which can be applied to the decoding end, and the method includes: determining a first target prediction block of the image block to be processed according to the inter-frame prediction mode; determining a second target prediction block of the image block to be processed according to the intra-frame prediction mode; determining the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the indication information in the code stream; weighting the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block according to the weight coefficient to obtain the prediction value of the image block to be processed. Therefore, in the embodiment of the present invention, the decoding end can quickly determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively by parsing the indication information in the code stream, thereby ensuring the normal progress of multi-hypothesis coding in diversified scenarios, improving the accuracy of image prediction, and improving coding performance.

[0007] The indication information corresponds to different weight coefficient combinations in different situations; the weight coefficient combination includes weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively.

[0008] Among them, multi-hypothesis coding is to use multiple prediction modes in the prediction of the current block. In some implementation scenarios, the multi-hypothesis coding prediction mode can be used to realize joint intra-frame prediction coding and inter-frame prediction coding, that is, both the inter-frame prediction mode and the intra-frame prediction mode are used in the prediction of the current block. The inter-frame prediction mode is a fusion (Merge) mode, and the intra-frame prediction mode is a planar (Planar) mode.

[0009] In an embodiment of the present invention, the encoding end may indicate to the decoding end the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively, in an implicit or explicit manner, through indication information. The weight coefficient corresponding to the inter-frame prediction mode is used to indicate the weight of the pixel value of the first target prediction block obtained by predicting the current block using the inter-frame prediction mode in the weighted prediction of multiple hypothesis coding, and the weight coefficient corresponding to the intra-frame prediction mode is used to indicate the weight of the pixel value of the second target prediction block obtained by predicting the current block using the intra-frame prediction mode in the weighted prediction of multiple hypothesis coding. In an embodiment of the present invention, the indication information corresponds to different weight coefficient combinations in different situations; wherein the weight coefficient combination includes the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively.

[0010] It can be seen that by implementing the embodiments of the present invention, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be adaptively determined based on different encoding and decoding scenarios, thereby ensuring the normal multi-hypothesis encoding in diversified scenarios, improving the accuracy of image prediction, and enhancing the encoding performance.

[0011] Based on the first aspect, in a first possible implementation manner, the indication information includes reference image queue information; the reference image queue information is used to indicate a reference image queue corresponding to the image block to be processed;

[0012] The determining, according to the indication information in the bitstream, the inter-frame prediction mode and the weight coefficients respectively corresponding to the intra-frame prediction mode comprises: determining, according to the reference image queue information, the encoding configuration information corresponding to the image block to be processed; and determining, according to the encoding configuration information corresponding to the image block to be processed, the weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode.

[0013] It can be seen that the indication information can implicitly indicate the coding configuration information corresponding to the current codec. According to the mapping relationship between the coding configuration information and the weight coefficient combination {Mi, Ni}, the corresponding weight coefficient combination can be adaptively and quickly determined, thereby improving the accuracy of image prediction and improving the coding performance.

[0014] Based on the first possible implementation, in a possible embodiment, a mapping relationship between the coding configuration information and the weight coefficient combination {Mi, Ni} can be pre-established. In the case where the coding configuration information corresponding to the image block to be processed indicates one of a low delay configuration, a P slice only configuration, or a B slice only configuration, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M1 and N1, respectively, where M1 is not equal to N1. In a possible embodiment, M1 is greater than N1.

[0015] For example, the indication information is the construction information of a slice-level or frame-level reference image queue transmitted from the encoding end to the decoding end through a code stream. The decoding end establishes a reference image queue based on the information. The reference image queue includes one or more reference image lists, such as list0, list1, list2, etc. If the decoding end finds that the reference images of all reference image lists in the reference image queue are located before the current image to be decoded in the time domain according to the picture order count (POC), it is determined that the current encoding configuration is a low delay configuration.

[0016] When the coding configuration information corresponding to the image block to be processed is a random access configuration, the intra-frame prediction block and the inter-frame prediction block may be set to adopt equal-proportional weighting.

[0017] Based on the first aspect, in a second possible implementation manner, the indication information includes reference image queue information; the reference image queue information is used to indicate a reference image queue corresponding to the image block to be processed; the reference image queue includes at least one reference image set, and each reference image set in the at least one reference image set includes one or more reference images;

[0018] In any reference image set, the time domain distance between each reference image and the image block to be processed can be determined, and the minimum time domain distance is determined as the nearest time domain distance of any reference image set; according to the nearest time domain distance, the weighting coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set respectively.

[0019] The process of determining the nearest time domain distance corresponding to any reference image set for the reference image set may be: for all reference image sets in the reference image queue, traverse each reference image set therein, so as to obtain the nearest time domain distance corresponding to each reference image set. Alternatively, the process of determining the nearest time domain distance corresponding to any reference image set for any reference image set may be: for all reference image sets in the reference image queue, traverse each reference image set therein, so as to obtain the nearest time domain distance corresponding to each reference image set therein.

[0020] Specifically, the reference image queue may include one or more reference image lists, for example, list0, list1, ... listN, where N is an integer greater than or equal to 0. Each reference image list contains one or more reference images, and the time domain distance between the reference image in the reference image list and the current image can be recorded as pocDiff, which can be calculated by the absolute value of the difference between the POC number of the reference image and the POC number of the current image. The time domain distance between the reference image closest to the current image in the reference image list and the current image is called the closest time domain distance, recorded as pocDiffmin, that is, pocDiffmin is the minimum value of each pocDiff corresponding to each reference image in the reference image list. For the reference image queue, the pocDiffmin corresponding to different reference image lists can be recorded as pocDiffmin0, pocDiffmin1, ... pocDiffminN, respectively. Then, the weight coefficient combination can be determined according to the pocDiffmin corresponding to different reference image lists.

[0021] Based on the second possible implementation, in a possible embodiment, the minimum value among pocDiffmin0, pocDiffmin1...pocDiffminN is recorded as Lmin, then, a mapping relationship between Lmin and the weight coefficient combination {Mi, Ni} can be established in advance, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be determined according to Lmin.

[0022] In a possible embodiment, when Lmin is less than or equal to a first preset value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M1 and N1 respectively; when Lmin is greater than the first preset value and less than or equal to a second preset value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M2 and N2 respectively;

[0023] Among them, the first preset value is smaller than the second preset value, the ratio of M1 to N1 is smaller than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0024] Based on the second possible implementation, in a possible embodiment, the maximum value among pocDiffmin0, pocDiffmin1...pocDiffminN is recorded as Lmax, then a mapping relationship between Lmax and the weight coefficient combination {Mi, Ni} can be established in advance, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined according to the Lmax.

[0025] In a possible embodiment, when the Lmax is less than or equal to a first preset value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M1 and N1 respectively; when the Lmax is greater than the first preset value and less than or equal to a second preset value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M2 and N2 respectively;

[0026] Among them, the first preset value is smaller than the second preset value, the ratio of M1 to N1 is smaller than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0027] Based on the second possible implementation, in a possible embodiment, the average value of pocDiffmin0, pocDiffmin1 ... pocDiffminN is recorded as Lavg. Then, a mapping relationship between Lavg and the weight coefficient combination {Mi, Ni} can be established, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined according to the Lavg.

[0028] It can be seen that in the above scheme, for the decoding end, the code stream can be parsed to obtain the indication information about the nearest time domain distance of the reference image queue. The indication information is the construction information of the reference image queue at the slice level or frame level transmitted from the encoding end to the decoding end through the code stream. The decoding end establishes the reference image queue according to the information, and obtains pocDiffmin0, pocDiffmin1...pocDiffminN according to the POC number of each reference image in each reference image list and the POC number of the current image. Then, according to the mapping relationship between the minimum value Lmin or the maximum value Lmax or the average value Lavg and the weight coefficient combination {Mi, Ni}, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be adaptively and quickly obtained to improve the accuracy of image prediction and the encoding performance.

[0029] Based on the second possible implementation, in a possible embodiment, the indication information includes preset reference image set information, and the preset reference image set information is used to indicate a preset reference image set (eg, a preset reference image list) in a reference image queue.

[0030] The average value of pocDiff of all reference images in the preset reference image list (for example, list0) in the reference image queue can be recorded as Ravg. Then, a mapping relationship between Ravg and the weight coefficient combination {Mi, Ni} can be established in advance, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be determined according to Ravg.

[0031] In a possible embodiment, when Ravg is less than or equal to a first preset value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M1 and N1 respectively; when Ravg is greater than the first preset value and less than or equal to a second preset value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M2 and N2 respectively;

[0032] Among them, the first preset value is smaller than the second preset value, the ratio of M1 to N1 is smaller than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0033] It can be seen that in the above scheme, for the decoding end, the code stream can be parsed to obtain the indication information about the nearest time domain distance of the reference image queue. For example, the indication information is the construction information of the reference image queue at the slice level or frame level transmitted from the encoding end to the decoding end through the code stream. The decoding end establishes a reference image queue based on the information and determines the preset reference image list (for example, list0) from the reference image queue. Then, Ravg can be obtained according to the POC number of each reference image in the preset reference image list (for example, list0) and the POC number of the current image. Then, according to the mapping relationship between Ravg and the weight coefficient combination {Mi, Ni}, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be adaptively and quickly obtained, which improves the accuracy of image prediction and improves the encoding performance.

[0034] Based on the first aspect, in a third possible implementation manner, the indication information in the code stream includes reference image queue information; the reference image queue information is used to indicate a reference image queue corresponding to the image block to be processed; the reference image queue includes at least one reference image set, and each reference image set in the at least one reference image set includes at least one reference image;

[0035] In any reference image set, the image sequence number POC of each reference image can be determined; and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be determined according to the POCs of the reference images corresponding to each reference image set. That is, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be set according to the characteristics such as the number of reference images in different reference image lists in the reference image queue.

[0036] The process of determining the reference image POC corresponding to any reference image set for the reference image set may be: for all reference image sets in the reference image queue, traverse each reference image set therein, thereby obtaining the POC of each reference image in each reference image set. Alternatively, the process of determining the reference image POC corresponding to any reference image set for the reference image set may be: for all reference image sets in the reference image queue, traverse each reference image set therein, thereby obtaining the POC of each reference image in each reference image set therein.

[0037] In a possible embodiment, when the multiple reference image sets each include only one reference image with the same POC, and the reference image with the same POC is located before the image block to be processed in the time domain (which may be referred to as preset condition 1), the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M1 and N1 respectively; when other than the above situation (which may be referred to as preset condition 2), the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M2 and N2 respectively; wherein the ratio of M1 to N1 is less than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0038] In a possible embodiment, when there are reference images with different POCs in the multiple reference image sets, and all reference images of all reference image sets are located before the image block to be processed in the time domain (which may be referred to as preset condition 3), the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M2 and N2 respectively; in other cases except the said case (which may be referred to as preset condition 4), the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M1 and N1 respectively; wherein the ratio of M1 to N1 is less than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0039] In the above scheme, for the decoding end, the code stream can be parsed to obtain indication information about the nearest time domain distance of the reference image queue. For example, the indication information is the construction information of the reference image queue at the slice level or frame level transmitted from the encoding end to the decoding end through the code stream, and the decoding end establishes the reference image queue based on the information. The decoding end can determine the preset conditions satisfied by the current encoding / decoding status according to the number of reference images in different reference image lists, and according to the mapping relationship between the preset conditions and the weight coefficient combination {Mi, Ni}, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be adaptively and quickly obtained, which improves the accuracy of image prediction and improves the encoding performance.

[0040] In each of the above-described embodiments, the encoder indicates to the decoder the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively in an implicit manner. In some feasible implementation schemes, the encoder may also directly indicate to the decoder the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively in an explicit manner.

[0041] Based on the first aspect, in a fourth possible implementation, the indication information in the code stream includes a weight indication bit of slice header information in the code stream; the weight indication bit in the slice header information can be directly used to indicate a weight coefficient combination, that is, there is a mapping relationship between different values ​​of the weight indication bit and the weight coefficient combination {Mi, Ni}. The weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be determined according to the weight indication bit of the slice header information.

[0042] In a possible embodiment, when the weight indicator bit of the slice header information is a first indicator value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M1 and N1 respectively; when the weight indicator bit of the slice header information is a second indicator value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined to be M2 and N2 respectively; wherein, the ratio of M1 to N1 is less than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0043] In a possible embodiment, determining the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indicator bit of the header information includes: when the weight indicator bit of the header information is a first indicator value, determining the weight coefficient corresponding to the inter-frame prediction mode from a first set and determining the weight coefficient corresponding to the intra-frame prediction mode from a second set according to the first indicator value; when the weight indicator bit of the header information is a second indicator value, determining the weight coefficient corresponding to the inter-frame prediction mode from the first set and determining the weight coefficient corresponding to the intra-frame prediction mode from the second set according to the second indicator value; wherein the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the first indicator value is less than the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the second indicator value.

[0044] In a possible embodiment, when there are reference images with different POCs in the multiple reference image sets, and all reference images of all reference image sets are located before the image block to be processed in the time domain, the first set includes M1 and M2, and the second set includes N1 and N2; in other cases except the described case, the first set includes M3 and M4, and the second set includes N3 and N4; wherein the ratio of M1 to N1 is smaller than the ratio of M3 to N3, the ratio of M2 to N2 is smaller than the ratio of M4 to N4, and M1, M2, M3, M4, N1, N2, N3, and N4 are positive integers.

[0045] In the above scheme, for the decoding end, the bit stream can be parsed to obtain the weight indicator bit in the header information. According to the mapping relationship between the different values ​​of the weight indicator bit in the header information and the weight coefficient combination {Mi, Ni}, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be adaptively and quickly obtained, thereby improving the accuracy of image prediction and the encoding performance.

[0046] Based on the first aspect, in a fifth possible implementation manner, the indication information transmitted by the encoding end to the decoding end through the bitstream includes a weight indication bit in the largest coding unit (LCU) information in the syntax element, and the weight indication bit in the LCU information can also be used to determine the weight coefficient combination. The decoding end can determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indication bit of the LCU information.

[0047] In a possible embodiment, when the weight indicator bit of the LCU information is a third indicator value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to M1 and N1 respectively; when the weight indicator bit of the LCU information is a fourth indicator value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to M2 and N2 respectively; wherein the ratio of M1 to N1 is less than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0048] In a possible embodiment, when the weight indicator bit of the LCU information is a third indicator value, the weight coefficient corresponding to the inter-frame prediction mode is determined from the third set according to the third indicator value, and the weight coefficient corresponding to the intra-frame prediction mode is determined from the fourth set; when the weight indicator bit of the LCU information is a fourth indicator value, the weight coefficient corresponding to the inter-frame prediction mode is determined from the third set according to the fourth indicator value, and the weight coefficient corresponding to the intra-frame prediction mode is determined from the fourth set; wherein the ratio of the weight coefficients of the inter-frame prediction mode determined according to the third indicator value to the intra-frame prediction mode is less than the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the fourth indicator value.

[0049] In a possible embodiment, when there are reference images with different POCs in the multiple reference image sets, and all reference images of all reference image sets are located before the image block to be processed in the time domain, the third set includes M1 and M2, and the fourth set includes N1 and N2; in other cases except the said case, the third set includes M3 and M4, and the fourth set includes N3 and N4; wherein the ratio of M1 to N1 is smaller than the ratio of M3 to N3, the ratio of M2 to N2 is smaller than the ratio of M4 to N4, and M1, M2, M3, M4, N1, N2, N3, and N4 are positive integers.

[0050] In the above scheme, for the decoding end, the bit stream can be parsed to obtain the weight indicator bits in the LCU information. According to the relationship between the different values ​​of the weight indicator bits in the LCU information and the weight coefficient combination {Mi, Ni}, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be adaptively and quickly obtained, thereby improving the accuracy of image prediction and the encoding performance.

[0051] Based on the first aspect, in a sixth possible implementation manner, the indication information in the bitstream includes both a weight indication bit of slice header information in the bitstream and a weight indication bit in LCU information.

[0052] When the weight indicator bit of the header information is a first indicator value, the third set includes M1 and M2, and the fourth set includes N1 and N2; when the weight indicator bit of the header information is a second indicator value, the third set includes M3 and M4, and the fourth set includes N3 and N4; wherein, the ratio of M1 to N1 is smaller than the ratio of M3 to N3, the ratio of M2 to N2 is smaller than the ratio of M4 to N4, and M1, M2, M3, M4, N1, N2, N3, and N4 are positive integers.

[0053] In the above scheme, for the decoding end, the bit stream can be parsed to obtain the weight indicator bits in the LCU information and the weight indicator bits in the header information. According to the weight indicator bits in the LCU information and the weight indicator bits in the header information, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can also be adaptively and quickly obtained, thereby improving the accuracy of image prediction and the encoding performance.

[0054] Based on the first aspect, in a seventh possible implementation manner, the indication information transmitted by the encoder to the decoder through the bitstream includes a weight indication bit in the coding unit (CodingUnit, CU) information in the syntax element, and the weight indication bit in the CU information can also be used to determine the weight coefficient combination. The decoder can determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indication bit of the CU information.

[0055] In a possible embodiment, according to the weight value indicator bit of the slice header information, it is determined that the weight coefficient set corresponding to the inter-frame prediction mode is the fifth set, and the weight coefficient set corresponding to the intra-frame prediction mode is the sixth set;

[0056] When the weight indicator bit of the CU information is the fifth indicator value, the weight coefficient corresponding to the inter-frame prediction mode is determined from the fifth set according to the fifth indicator value, and the weight coefficient corresponding to the intra-frame prediction mode is determined from the sixth set; when the weight indicator bit of the CU information is the sixth indicator value, the weight coefficient corresponding to the inter-frame prediction mode is determined from the fifth set according to the sixth indicator value, and the weight coefficient corresponding to the intra-frame prediction mode is determined from the sixth set; wherein the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the fifth indicator value is less than the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the sixth indicator value.

[0057] In the above scheme, for the decoding end, the bit stream can be parsed to obtain the weight indicator bits in the CU information. According to the relationship between the different values ​​of the weight indicator bits in the CU information and the weight coefficient combination {Mi, Ni}, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be adaptively and quickly obtained, thereby improving the accuracy of image prediction and the encoding performance.

[0058] Based on the first aspect, in an eighth possible implementation, the indication information in the code stream includes both the weight indication bit of the slice header information in the code stream and the weight indication bit in the CU information; when the weight indication bit of the slice header information is a first indication value, the fifth set includes M1 and M2, and the sixth set includes N1 and N2; when the weight indication bit of the slice header information is a second indication value, the fifth set includes M3 and M4, and the sixth set includes N3 and N4; wherein, the ratio of M1 to N1 is less than the ratio of M3 to N3, the ratio of M2 to N2 is less than the ratio of M4 to N4, and M1, M2, M3, M4, N1, N2, N3, and N4 are positive integers.

[0059] In the above scheme, for the decoding end, the bit stream can be parsed to obtain the weight indicator bits in the CU information and the weight indicator bits in the slice header information. According to the weight indicator bits in the CU information and the weight indicator bits in the slice header information, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can also be adaptively and quickly obtained, thereby improving the accuracy of image prediction and the encoding performance.

[0060] Based on the first aspect, in a ninth possible implementation, the indication information includes coding configuration information corresponding to the image block to be processed; the coding configuration information corresponding to the image block to be processed can be, for example, one of a low delay (Lowdelay) configuration, a P slice only (P slice only) configuration, a B slice only (B slice only) configuration or a random access configuration.

[0061] When the encoding configuration information is one of a low delay configuration, a P slice only configuration, or a B slice only configuration, the weight coefficients corresponding to the inter prediction mode and the intra prediction mode are determined to be M1 and N1, respectively, where M1 is not equal to N1. In a possible embodiment, M1 is greater than N1.

[0062] When the coding configuration information corresponding to the image block to be processed is a random access configuration, the intra-frame prediction block and the inter-frame prediction block may be set to adopt equal-proportional weighting.

[0063] Correspondingly, determining the inter-frame prediction mode and the weight coefficients respectively corresponding to the intra-frame prediction mode according to the indication information in the code stream includes: determining the weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode according to the encoding configuration information corresponding to the image block to be processed.

[0064] It can be seen that when the bitstream can carry the coding configuration information corresponding to the current codec, the corresponding weight coefficient combination can be adaptively and quickly determined based on the mapping relationship between the coding configuration information and the weight coefficient combination {Mi, Ni}, thereby improving the accuracy of image prediction and improving coding performance.

[0065] Based on the first aspect, in a possible implementation scenario, after the decoding end determines the weight coefficient combination {Mi, Ni} corresponding to the weighted prediction of the current block, the weight coefficient combination {Mi, Ni} can be used to weight the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block to obtain the prediction value of the current block.

[0066] For example, the pixel prediction value of the specific position point in the current block is recorded as Samples[x][y], where x and y are the horizontal coordinate and vertical coordinate of the pixel value respectively. Samples[x][y] can be calculated by the following formula:

[0067] Samples[x][y]=Clip3(0,(1<<bitDepth)-1),(predSamplesIntra[x][y]*Ni+predSamplesInter[x][y]*Mi+offset)> >shift))

[0068] Wherein, Clip3(·) is the Clip function, bitDepth is the bit depth of Samples data, predSamplesIntra[x][y] represents the intra-frame predicted pixel value at position [x][y], predSamplesInter[x][y] represents the inter-frame predicted pixel value at position [x][y], and offset represents the value accuracy.

[0069] In a specific implementation, the value of shift may be determined in such a way that the sum of Mi and Ni is equal to 2 raised to the power of shift, so as to reduce unnecessary division operations.

[0070] Based on the first aspect, in a possible implementation scenario, the identifier of the multi-hypothesis coding of the joint intra-frame prediction coding and the inter-frame prediction coding and the syntax elements related to the prediction mode can be obtained by parsing the bitstream;

[0071] In a specific embodiment, the identifier of the multi-hypothesis coding may be mh_intra_flag. When mh_intra_flag indicates that the current decoding adopts a multi-hypothesis coding mode of joint intra-frame prediction coding and inter-frame prediction coding, the syntax elements related to the intra-frame coding mode are parsed from the bitstream.

[0072] In one example, the syntax element of the intra coding mode may include a most probable mode flag mh_intra_luma_mpm_flag and a most probable mode index mh_intra_luma_mpm_idx, wherein mh_intra_luma_mpm_flag is used to indicate that the intra coding mode is to be performed, and mh_intra_luma_mpm_idx represents the index number of the intra candidate mode list (intracandidate list), and the intra prediction mode may be selected from the intra candidate mode list based on the index number.

[0073] In another example, for intra-frame prediction coding, no index may be transmitted in the bitstream. In this case, a preset mode (eg, Planar mode) may be directly used as the intra-frame coding mode of the current block.

[0074] In the case where the current decoding adopts a multi-hypothesis coding mode of combining intra-frame prediction coding and inter-frame prediction coding, the inter-frame prediction mode is determined for the inter-frame prediction coding flag. For example, the inter-frame prediction coding flag may be "merge_flag" to indicate the execution of the merge mode. For another example, in a possible embodiment, the inter-frame prediction coding flag may also be used to indicate the execution of the Inter MVP mode (specifically, such as the AMVP mode).

[0075] In a second aspect, an embodiment of the present invention provides a device, which includes: a first prediction module, used to determine a first target prediction block of an image block to be processed according to an inter-frame prediction mode; a second prediction module, used to determine a second target prediction block of the image block to be processed according to an intra-frame prediction mode; a weight coefficient determination module, used to determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to indication information in a code stream; and a third prediction module, used to weight the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block according to the weight coefficient to obtain a prediction value of the image block to be processed.

[0076] The functional modules of the device can be specifically used to implement the method described in the first aspect.

[0077] In a third aspect, an embodiment of the present invention provides a video coding and decoding device, the device comprising: a non-volatile memory and a processor coupled to each other, the processor calling a program code stored in the memory to execute determining a first target prediction block of a to-be-processed image block according to an inter-frame prediction mode; determining a second target prediction block of the to-be-processed image block according to an intra-frame prediction mode; determining weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to indication information in a bitstream; the indication information has different corresponding weight coefficient combinations in different situations; wherein the weight coefficient combination includes weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively. The pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block are weighted according to the weight coefficients to obtain a prediction value of the to-be-processed image block.

[0078] Specifically, the processor calls the program code stored in the memory to execute the method as described in any embodiment of the first aspect.

[0079] In a fourth aspect, an embodiment of the present invention provides a device for decoding a video, the device comprising:

[0080] A memory, used for storing video data in the form of code stream;

[0081] A decoder is used to determine a first target prediction block of a to-be-processed image block according to an inter-frame prediction mode; determine a second target prediction block of the to-be-processed image block according to an intra-frame prediction mode; determine weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to indication information in a bitstream; the indication information corresponds to different weight coefficient combinations in different situations; wherein the weight coefficient combination includes weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively.

[0082] The pixel value of the first target prediction block and the pixel value of the second target prediction block are weighted according to the weight coefficient to obtain the prediction value of the image block to be processed.

[0083] Specifically, the decoder can be used to execute the method described in any embodiment of the first aspect.

[0084] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having instructions stored thereon, wherein when the instructions are executed, one or more processors are caused to encode video data. The instructions cause the one or more processors to execute the method according to any possible embodiment of the first aspect.

[0085] In a sixth aspect, an embodiment of the present invention provides a computer program comprising program code, which, when running on a computer, executes the method according to any possible embodiment of the first aspect.

[0086] It can be seen that in the multi-hypothesis coding prediction process of joint intra-frame prediction coding and inter-frame prediction coding in the embodiment of the present invention, by parsing the information in the bitstream, the decoding end can adaptively determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively based on different encoding and decoding scenarios. On the one hand, it ensures the normal progress of multi-hypothesis coding in diversified scenarios, and on the other hand, it improves the accuracy of image prediction, thereby improving coding efficiency and performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0088] Figure 1A is a block diagram of an example of a video encoding and decoding system 10 for implementing an embodiment of the present invention;

[0089] Figure 1B is a block diagram of an example of a video decoding system 40 for implementing an embodiment of the present invention;

[0090] Figure 2 is a block diagram of an example structure of an encoder 20 for implementing an embodiment of the present invention;

[0091] Figure 3 is a block diagram of an example structure of a decoder 30 for implementing an embodiment of the present invention;

[0092] Figure 4 is a block diagram of an example of a video decoding device 400 for implementing an embodiment of the present invention;

[0093] Figure 5 is a block diagram of another example of an encoding device or a decoding device for implementing an embodiment of the present invention;

[0094] Figure 6 is an exemplary schematic diagram of Planar (inter-frame plane mode) technology;

[0095] Figure 7 is a schematic diagram of the mapping relationship between coding configuration information and weight coefficient combinations;

[0096] Figure 8 It is a schematic diagram of the mapping relationship between Lmin and the weight coefficient combination;

[0097] Fig. 9 It is a schematic diagram of the mapping relationship between Lmax and the weight coefficient combination;

[0098] Fig.10 It is a schematic diagram of the mapping relationship between Lavg and the combination of weight coefficients;

[0099] Fig.11 It is a schematic diagram of the mapping relationship between Ravg and the weight coefficient combination;

[0100] Fig.12 It is a schematic diagram of the mapping relationship between some preset conditions and weight coefficient combinations;

[0101] Fig.13 It is a schematic diagram of the mapping relationship between the preset conditions and the weight coefficient combination;

[0102] Fig.14 It is a schematic diagram of the mapping relationship between some weight indication bits of the slice header information and the weight coefficient combination;

[0103] Fig.15 is a schematic diagram of the mapping relationship between some weight indicator bits of the slice header information and the weight coefficient combination;

[0104] Fig.16 is an exemplary flow chart of a weighted prediction method for multi-hypothesis coding;

[0105] Fig.17 is an exemplary flow chart of yet another weighted prediction method for multi-hypothesis coding;

[0106] Fig.18 is a block diagram of an example of an apparatus 1000 for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0107] The embodiments of the present invention are described below in conjunction with the drawings in the embodiments of the present invention. In the following description, reference is made to the drawings that form part of the present disclosure and show specific aspects of the embodiments of the present invention or specific aspects of the embodiments of the present invention in an illustrative manner. It should be understood that the embodiments of the present invention can be used in other aspects and may include structural or logical changes not depicted in the drawings. Therefore, the following detailed description should not be understood in a restrictive sense, and the scope of the present invention is defined by the appended claims. For example, it should be understood that the disclosure in conjunction with the described method can also be applied to the corresponding device or system that performs the method, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units such as functional units to perform the one or more method steps described (for example, one unit performs one or more steps, or multiple units, each of which performs one or more of the multiple steps), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, if a specific device is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of one or more units (for example, one step performs the functionality of one or more units, or multiple steps, each of which performs the functionality of one or more units in multiple units), even if such one or more steps are not explicitly described or illustrated in the drawings. Further, it should be understood that, unless explicitly stated otherwise, features of the various exemplary embodiments and / or aspects described herein may be combined with each other.

[0108] In the embodiments of the present invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B may be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c may represent: a, b, c, ab, ac, bc, or abc, where a, b, c may be single or plural.

[0109] The technical solutions involved in the embodiments of the present invention may not only be applied to existing video coding standards (such as H.264, HEVC and other standards), but may also be applied to future video coding standards (such as H.266 standards). The terms used in the implementation methods of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention. The following is a brief introduction to some concepts that may be involved in the embodiments of the present invention.

[0110] Video coding generally refers to processing a sequence of pictures to form a video or video sequence. In the field of video coding, the terms "picture", "frame" or "image" can be used as synonyms, and the terms "pixel value", "sample value" or "sample signal" can be used as synonyms. Video coding used in this article means video encoding or video decoding. Video encoding is performed on the source side and generally includes processing (for example, by compression) the original video picture to reduce the amount of data required to represent the video picture, so as to store and / or transmit it more efficiently. Video decoding is performed on the destination side and generally includes inverse processing relative to the encoder to reconstruct the video picture. The "encoding" of the video picture involved in the embodiment should be understood as involving the "encoding" or "decoding" of the video sequence. The combination of the encoding part and the decoding part is also called codec (encoding and decoding).

[0111] A video sequence includes a series of pictures, which are further divided into slices, and slices are further divided into blocks. Video coding can be coded based on blocks. In some new video coding standards, the concept of blocks is further expanded. For example, in the H.264 standard, there are macroblocks (MB), which can be further divided into multiple prediction blocks (partitions) that can be used for predictive coding. In the high-performance video coding (HEVC) standard, basic concepts such as coding units (CU), prediction units (PU) and transform units (TU) are used to functionally divide various block units and describe them using a new tree-based structure. For example, CU can be divided into smaller CUs according to a quadtree, and smaller CUs can be further divided to form a quadtree structure. CU is the basic unit for dividing and coding coded images. There are similar tree structures for PU and TU. PU can correspond to prediction blocks and is the basic unit of predictive coding. CU is further divided into multiple PUs according to the division mode. TU may correspond to a transform block, which is a basic unit for transforming a prediction residual. However, no matter CU, PU or TU, they all belong to the concept of a block (or image block) in essence.

[0112] For example, in HEVC, a CTU is split into multiple CUs using a quadtree structure represented as a coding tree. A decision is made at the CU level whether to use inter-picture (temporal) or intra-picture (spatial) prediction to encode a picture area. Each CU can be further split into one, two or four PUs according to the PU split type. The same prediction process is applied within a PU, and relevant information is transmitted to the decoder on a PU basis. After obtaining the residual block by applying the prediction process based on the PU split type, the CU can be divided into transform units (TUs) according to other quadtree structures similar to the coding tree for the CU. In the latest developments in video compression technology, quadtree and binarytree (QTBT) are used to split frames to split coding blocks. In the QTBT block structure, the CU can be square or rectangular in shape.

[0113] In this article, for the convenience of description and understanding, the image block to be processed in the current encoded image may be referred to as the image block to be processed, or the current block for short. For example, at the encoding end, the image block to be processed refers to the block currently being encoded; at the decoding end, the image block to be processed refers to the block currently being decoded. The decoded image block in the reference image used to predict the current block is called a prediction block (or reference block, or motion compensation block), that is, the prediction block (or reference block, or motion compensation block) is a block that provides a reference signal for the current block, wherein the reference signal represents the pixel value or sampling value or sampling signal in the prediction block.

[0114] In the case of lossless video coding, the original video picture can be reconstructed, that is, the reconstructed video picture has the same quality as the original video picture (assuming no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression is performed by, for example, quantization to reduce the amount of data required to represent the video picture, but the decoder side cannot fully reconstruct the video picture, that is, the quality of the reconstructed video picture is lower or worse than the quality of the original video picture.

[0115] Several video coding standards of H.261 belong to the category of "lossy hybrid video codecs" (i.e., combining spatial and temporal prediction in the sample domain with 2D transform coding in the transform domain for applying quantization). Each picture of a video sequence is usually divided into a set of non-overlapping blocks, which are usually encoded at the block level. In other words, the encoder side usually processes, i.e., encodes, the video at the block (video block) level, for example, by generating a prediction block through spatial (intra-picture) prediction and temporal (inter-picture) prediction, subtracting a motion compensation block from the current block to obtain a residual block, transforming the residual block in the transform domain and quantizing the residual block to reduce the amount of data to be transmitted (compressed), while the decoder side applies the inverse processing part relative to the encoder to the coded or compressed block to reconstruct the current block for representation. In addition, the encoder replicates the decoder processing loop, so that the encoder and decoder generate the same prediction (e.g., intra-frame prediction and inter-frame prediction) and / or reconstruction for processing, i.e., encoding subsequent blocks.

[0116] The following describes the system architecture used in the embodiments of the present invention. Figure 1A , Figure 1A A schematic block diagram of a video encoding and decoding system 10 used in an embodiment of the present invention is exemplarily given. Figure 1A As shown, the video encoding and decoding system 10 may include a source device 12 and a destination device 14, the source device 12 generating encoded video data, and therefore, the source device 12 may be referred to as a video encoding device. The destination device 14 may decode the encoded video data generated by the source device 12, and therefore, the destination device 14 may be referred to as a video decoding device. Various implementations of the source device 12, the destination device 14, or both may include one or more processors and a memory coupled to the one or more processors. The memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other media that can be used to store the desired program code in the form of instructions or data structures that can be accessed by a computer, as described herein. The source device 12 and the destination device 14 may include various devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, wireless communication devices, or the like.

[0117] Although Figure 1AThe source device 12 and the destination device 14 are depicted as separate devices, but device embodiments may also include both the source device 12 and the destination device 14 or the functionality of both, i.e., the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality. In such embodiments, the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.

[0118] The source device 12 and the destination device 14 may be communicatively connected via a link 13, and the destination device 14 may receive the encoded video data from the source device 12 via the link 13. The link 13 may include one or more media or devices capable of moving the encoded video data from the source device 12 to the destination device 14. In one example, the link 13 may include one or more communication media that enable the source device 12 to transmit the encoded video data directly to the destination device 14 in real time. In this example, the source device 12 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol), and may transmit the modulated video data to the destination device 14. The one or more communication media may include wireless and / or wired communication media, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from the source device 12 to the destination device 14.

[0119] The source device 12 includes an encoder 20. Optionally, the source device 12 may also include a picture source 16, a picture preprocessor 18, and a communication interface 22. In a specific implementation, the encoder 20, the picture source 16, the picture preprocessor 18, and the communication interface 22 may be hardware components in the source device 12, or may be software programs in the source device 12. They are described as follows:

[0120] The picture source 16 may include or may be any type of picture capture device, for example, for capturing real-world pictures, and / or any type of pictures or comments (for screen content encoding, some text on the screen is also considered to be part of the picture or image to be encoded) generating device, for example, a computer graphics processor for generating computer animation pictures, or any type of device for acquiring and / or providing real-world pictures, computer animation pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). The picture source 16 may be a camera for capturing pictures or a memory for storing pictures, and the picture source 16 may also include any type of (internal or external) interface for storing previously captured or generated pictures and / or acquiring or receiving pictures. When the picture source 16 is a camera, the picture source 16 may be, for example, a local or integrated camera integrated in the source device; when the picture source 16 is a memory, the picture source 16 may be, for example, a local or integrated memory integrated in the source device. When the picture source 16 includes an interface, the interface may be, for example, an external interface for receiving pictures from an external video source, such as an external picture capture device, such as a camera, an external memory, or an external picture generating device, such as an external computer graphics processor, a computer, or a server. The interface may be any type of interface according to any proprietary or standardized interface protocol, such as a wired or wireless interface, an optical interface.

[0121] Among them, the picture can be regarded as a two-dimensional array or matrix of pixels (picture element). The pixels in the array can also be called sampling points. The number of sampling points in the array or picture in the horizontal and vertical directions (or axes) defines the size and / or resolution of the picture. In order to represent the color, three color components are usually used, that is, the picture can be represented as or include three sampling arrays. For example, in the RBG format or color space, the picture includes corresponding red, green and blue sampling arrays. However, in video coding, each pixel is usually represented in a brightness / chroma format or color space, such as for a picture in the YUV format, including a brightness component indicated by Y (sometimes also indicated by L) and two chroma components indicated by U and V. The brightness (luma) component Y represents the brightness or grayscale level intensity (for example, the two are the same in a grayscale picture), and the two chroma (chroma) components U and V represent the chroma or color information components. Accordingly, the picture in the YUV format includes a brightness sampling array of brightness sampling values ​​(Y), and two chroma sampling arrays of chroma values ​​(U and V). An image in RGB format can be converted or transformed into YUV format, and vice versa, which is also called color conversion or transformation. If the image is black and white, the image may only include a brightness sampling array. In an embodiment of the present invention, the image transmitted from the image source 16 to the image processor may also be referred to as raw image data 17.

[0122] The image preprocessor 18 is used to receive the original image data 17 and perform preprocessing on the original image data 17 to obtain a preprocessed image 19 or preprocessed image data 19. For example, the preprocessing performed by the image preprocessor 18 may include refurbishment, color format conversion (e.g., from RGB format to YUV format), color adjustment, or denoising.

[0123] The encoder 20 (or encoder 20) is used to receive the pre-processed picture data 19, and process the pre-processed picture data 19 using a relevant prediction mode (such as the prediction mode described in various embodiments of this document, such as the prediction mode of multi-hypothesis coding), thereby providing encoded picture data 21 (hereinafter further based on Figure 2 or Figure 4 or Figure 5 ). In some embodiments, the encoder 20 may be used to execute the related embodiments described below to implement the application of the weighted prediction method for multi-hypothesis coding described in the present invention on the encoding side.

[0124] The communication interface 22 can be used to receive the encoded picture data 21 and transmit the encoded picture data 21 to the destination device 14 or any other device (such as a memory) through the link 13 for storage or direct reconstruction. The other device can be any device for decoding or storage. The communication interface 22 can, for example, be used to encapsulate the encoded picture data 21 into a suitable format, such as a data packet, for transmission on the link 13.

[0125] The destination device 14 includes a decoder 30. Optionally, the destination device 14 may also include a communication interface 28, a picture post-processor 32, and a display device 34. They are described as follows:

[0126] The communication interface 28 can be used to receive the encoded picture data 21 from the source device 12 or any other source, such as a storage device, such as an encoded picture data storage device. The communication interface 28 can be used to transmit or receive the encoded picture data 21 via the link 13 between the source device 12 and the destination device 14 or via any type of network, such as a direct wired or wireless connection, any type of network, such as a wired or wireless network or any combination thereof, or any type of private network and public network, or any combination thereof. The communication interface 28 can be used, for example, to decapsulate the data packet transmitted by the communication interface 22 to obtain the encoded picture data 21.

[0127] Both communication interface 28 and communication interface 22 may be configured as unidirectional communication interfaces or bidirectional communication interfaces and may be used, for example, to send and receive messages to establish connections, confirm and exchange any other information related to communication links and / or data transmissions such as encoded picture data transmissions.

[0128] The decoder 30 (or decoder 30) is configured to receive the encoded picture data 21 and provide decoded picture data 31 or decoded picture 31 (hereinafter further described based on Figure 3 or Figure 4 or Figure 5 Detailed description of the structure of the decoder 30 is given in FIG. 1 . In some embodiments, the decoder 30 may be used to execute the related embodiments described below to implement the application of the weighted prediction method for multi-hypothesis coding described in the present invention at the decoding side.

[0129] The picture post-processor 32 is used to perform post-processing on the decoded picture data 31 (also called reconstructed picture data) to obtain post-processed picture data 33. The post-processing performed by the picture post-processor 32 may include: color format conversion (for example, from YUV format to RGB format), color adjustment, repair or resampling, or any other processing, and can also be used to transmit the post-processed picture data 33 to the display device 34.

[0130] A display device 34 is provided for receiving the post-processed picture data 33 to display the picture to, for example, a user or viewer. The display device 34 may be or may include any type of display for presenting the reconstructed picture, such as an integrated or external display or monitor. For example, the display may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro-LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.

[0131] Although, Figure 1A The source device 12 and the destination device 14 are depicted as separate devices, but device embodiments may also include both the source device 12 and the destination device 14 or the functionality of both, i.e., the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality. In such embodiments, the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.

[0132] It is obvious to a person skilled in the art based on the description that the functionality or Figure 1A The presence and (exact) division of the functionality of the source device 12 and / or destination device 14 shown may vary depending on the actual device and application. The source device 12 and the destination device 14 may include any of a variety of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, a mobile phone, a smart phone, a tablet or tablet computer, a video camera, a desktop computer, a set-top box, a television, a camera, a car device, a display device, a digital media player, a video game console, a video streaming device (such as a content server or a content distribution server), a broadcast receiver device, a broadcast transmitter device, etc., and may not use or use any type of operating system.

[0133] Both the encoder 20 and the decoder 30 may be implemented as any of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the technology is partially implemented in software, the device may store the instructions of the software in a suitable non-transitory computer-readable storage medium, and may use one or more processors to execute the instructions in hardware to perform the technology of the present disclosure. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors.

[0134] In some cases, Figure 1A The video encoding and decoding system 10 shown in the figure is only an example, and the technology of the present invention can be applied to video encoding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between encoding and decoding devices. In other examples, data can be retrieved from local storage, streamed over a network, etc. A video encoding device can encode data and store the data in a memory, and / or a video decoding device can retrieve data from a memory and decode the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other but only encode data to a memory and / or retrieve data from a memory and decode data.

[0135] See also Figure 1B , Figure 1B According to an exemplary embodiment, Figure 2 The encoder 20 and / or Figure 3 30. The video decoding system 40 may implement a combination of various techniques of the embodiments of the present invention. In the illustrated embodiment, the video decoding system 40 may include an imaging device 41, an encoder 20, a decoder 30 (and / or a video codec implemented by logic circuits 47 of a processing unit 46), an antenna 42, one or more processors 43, one or more memories 44, and / or a display device 45.

[0136] like Figure 1B As shown, imaging device 41, antenna 42, processing unit 46, logic circuit 47, encoder 20, decoder 30, processor 43, memory 44 and / or display device 45 can communicate with each other. As discussed, although video decoding system 40 is illustrated with encoder 20 and decoder 30, in different examples, video decoding system 40 may include only encoder 20 or only decoder 30.

[0137] In some examples, antenna 42 can be used to transmit or receive a coded bit stream of video data. In addition, in some examples, display device 45 can be used to present video data. In some examples, logic circuit 47 can be implemented by processing unit 46. Processing unit 46 can include application-specific integrated circuit (ASIC) logic, graphics processor, general processor, etc. Video decoding system 40 can also include optional processor 43, which can similarly include application-specific integrated circuit (ASIC) logic, graphics processor, general processor, etc. In some examples, logic circuit 47 can be implemented by hardware, such as video encoding dedicated hardware, etc., and processor 43 can be implemented by general software, operating system, etc. In addition, memory 44 can be any type of memory, such as volatile memory (e.g., static random access memory (SRAM), dynamic random access memory (DRAM), etc.) or non-volatile memory (e.g., flash memory, etc.). In a non-limiting example, memory 44 can be implemented by cache memory. In some examples, logic circuitry 47 may access memory 44 (eg, for implementing an image buffer). In other examples, logic circuitry 47 and / or processing unit 46 may include memory (eg, cache, etc.) for implementing an image buffer, etc.

[0138] In some examples, encoder 20 implemented by logic circuits may include an image buffer (e.g., implemented by processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include encoder 20 implemented by logic circuits 47 to implement reference Figure 2 The various modules discussed in connection with the encoder and / or any other encoder system or subsystem described herein. Logic circuits may be used to perform the various operations discussed herein.

[0139] In some examples, decoder 30 may be implemented in a similar manner by logic circuit 47 to implement reference Figure 3The decoder 30 and / or any other decoder system or subsystem described herein may include various modules discussed above. In some examples, the decoder 30 implemented by logic circuits may include an image buffer (implemented by processing unit 2820 or memory 44) and a graphics processing unit (implemented, for example, by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the decoder 30 implemented by logic circuits 47 to implement the reference Figure 3 and / or the various modules discussed above for any other decoder system or subsystem described herein.

[0140] In some examples, antenna 42 may be used to receive an encoded bitstream of video data. As discussed, the encoded bitstream may include data related to the encoded video frames, indicators, index values, mode selection data, etc. discussed herein, such as data related to the encoded partitions (e.g., transform coefficients or quantized transform coefficients, (as discussed) optional indicators, and / or data defining the encoded partitions). Video decoding system 40 may also include decoder 30 coupled to antenna 42 and used to decode the encoded bitstream. Display device 45 is used to present the video frames.

[0141] It should be understood that for the examples described with reference to encoder 20 in the embodiments of the present invention, decoder 30 can be used to perform the reverse process. With respect to signaling syntax elements, decoder 30 can be used to receive and parse such syntax elements and decode the associated video data accordingly. In some examples, encoder 20 can entropy encode the syntax elements into an encoded video bitstream. In such examples, decoder 30 can parse such syntax elements and decode the associated video data accordingly.

[0142] It should be noted that the method described in the embodiment of the present invention is mainly used for the inter-frame prediction process, which exists in both the encoder 20 and the decoder 30. The encoder 20 and the decoder 30 in the embodiment of the present invention can be encoders / decoders corresponding to video standard protocols such as H.263, H.264, HEVV, MPEG-2, MPEG-4, VP8, VP9, ​​or next-generation video standard protocols (such as H.266, etc.).

[0143] See also Figure 2 , Figure 2 A schematic / conceptual block diagram of an example of an encoder 20 for implementing an embodiment of the present invention is shown. Figure 2In the example of , the encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy encoding unit 270. The prediction processing unit 260 may include an inter-prediction unit 244, an intra-prediction unit 254, and a mode selection unit 262. The inter-prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). Figure 2 The illustrated encoder 20 may also be referred to as a hybrid video encoder or a video encoder according to a hybrid video codec.

[0144] For example, the residual calculation unit 204, the transform processing unit 206, the quantization unit 208, the prediction processing unit 260, and the entropy coding unit 270 form a forward signal path of the encoder 20, while for example, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, and the prediction processing unit 260 form a backward signal path of the encoder, wherein the backward signal path of the encoder corresponds to the signal path of the decoder (see Figure 3 Decoder 30 in ).

[0145] The encoder 20 receives a picture 201 or an image block 203 of the picture 201, for example, a picture in a sequence of pictures forming a video or a video sequence, via, for example, an input 202. The image block 203 may also be referred to as a current coding block or an image block to be processed, and the picture 201 may be referred to as a current picture or a picture to be coded (especially when the current picture is distinguished from other pictures in video coding, such as previously coded and / or decoded pictures in the same video sequence, i.e., a video sequence that also includes the current picture).

[0146] An embodiment of the encoder 20 may include a segmentation unit ( Figure 2 201 into a plurality of blocks, such as image blocks 203, usually into a plurality of non-overlapping blocks. The segmentation unit may be used to use the same block size for all pictures in the video sequence and define a corresponding grid of block sizes, or to change the block size between pictures or subsets or groups of pictures, and to segment each picture into corresponding blocks.

[0147] In one example, prediction processing unit 260 of encoder 20 may be used to perform any combination of the above-described partitioning techniques.

[0148] Like the picture 201, the image block 203 is also or can be regarded as a two-dimensional array or matrix of sampling points with sample values, although its size is smaller than that of the picture 201. In other words, the image block 203 may include, for example, one sampling array (e.g., a luminance array in the case of the black and white picture 201) or three sampling arrays (e.g., one luminance array and two chrominance arrays in the case of a color picture) or any other number and / or type of arrays depending on the color format applied. The number of sampling points in the horizontal and vertical directions (or axes) of the image block 203 defines the size of the image block 203.

[0149] like Figure 2 The encoder 20 shown is used to encode the picture 201 block by block, for example, encoding and prediction are performed on each image block 203.

[0150] The residual calculation unit 204 is used to calculate the residual block 205 based on the picture image block 203 and the prediction block 265 (other details of the prediction block 265 are provided below), for example, by subtracting the sample value of the prediction block 265 from the sample value of the picture image block 203 sample by sample (pixel by pixel) to obtain the residual block 205 in the sample domain.

[0151] The transform processing unit 206 is used to apply a transform such as discrete cosine transform (DCT) or discrete sine transform (DST) on the sample values ​​of the residual block 205 to obtain a transform coefficient 207 in the transform domain. The transform coefficient 207 can also be called a transform residual coefficient and represents the residual block 205 in the transform domain.

[0152] The transform processing unit 206 can be used to apply an integer approximation of the DCT / DST, such as the transform specified for HEVC / H.265. Compared to the orthogonal DCT transform, this integer approximation is usually scaled by a certain factor. In order to maintain the norm of the residual block processed by the forward transform and the inverse transform, an additional scaling factor is applied as part of the transform process. The scaling factor is usually selected based on certain constraints, such as the scaling factor is a power of 2 for the shift operation, the bit depth of the transform coefficients, the trade-off between accuracy and implementation cost, etc. For example, a specific scaling factor is specified for the inverse transform on the decoder 30 side by, for example, the inverse transform processing unit 212 (and for the corresponding inverse transform on the encoder 20 side by, for example, the inverse transform processing unit 212), and accordingly, a corresponding scaling factor can be specified for the forward transform on the encoder 20 side by the transform processing unit 206.

[0153] The quantization unit 208 is used to quantize the transform coefficients 207, for example, by applying scalar quantization or vector quantization to obtain quantized transform coefficients 209. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be rounded down to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, for scalar quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. A suitable quantization step size may be indicated by a quantization parameter (QP). For example, the quantization parameter may be an index to a predefined set of suitable quantization step sizes. For example, a smaller quantization parameter may correspond to fine quantization (a smaller quantization step size), a larger quantization parameter may correspond to coarse quantization (a larger quantization step size), and vice versa. Quantization may include division by a quantization step size and corresponding quantization or inverse quantization, for example, performed by inverse quantization 210, or may include multiplication by a quantization step size. Embodiments according to some standards such as HEVC may use a quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of an equation containing division. Additional scaling factors may be introduced for quantization and inverse quantization to recover the norm of the residual block that may be modified due to the scale used in the fixed-point approximation of the equation for the quantization step size and the quantization parameter. In an example embodiment, the scales of the inverse transform and inverse quantization may be merged. Alternatively, a custom quantization table may be used and sent from an encoder to a decoder through a signal, for example in a bitstream. Quantization is a lossy operation, where the larger the quantization step size, the greater the loss.

[0154] The inverse quantization unit 210 is used to apply the inverse quantization of the quantization unit 208 on the quantized coefficients to obtain inverse quantized coefficients 211, for example, applying an inverse quantization scheme of the quantization scheme applied by the quantization unit 208 based on or using the same quantization step size as the quantization unit 208. The inverse quantized coefficients 211 may also be referred to as inverse quantized residual coefficients 211, corresponding to the transform coefficients 207, although the loss due to quantization is generally different from that of the transform coefficients.

[0155] The inverse transform processing unit 212 is used to apply the inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transform dequantized block 213 or an inverse transform residual block 213.

[0156] The reconstruction unit 214 (e.g., the summer 214) is used to add the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain the reconstructed block 215 in the sample domain, for example, by adding the sample values ​​of the reconstructed residual block 213 to the sample values ​​of the prediction block 265.

[0157] Optionally, a buffer unit 216 (or simply "buffer" 216), such as a line buffer 216, is used to buffer or store the reconstructed blocks 215 and corresponding sample values ​​for, for example, intra-frame prediction. In other embodiments, the encoder can be used to use the unfiltered reconstructed blocks and / or corresponding sample values ​​stored in the buffer unit 216 for any type of estimation and / or prediction, such as intra-frame prediction.

[0158] For example, embodiments of the encoder 20 may be configured such that the buffer unit 216 is used not only to store the reconstructed blocks 215 used for the intra prediction 254, but also for the loop filter unit 220 (in Figure 2 ), and / or, for example, such that the buffer unit 216 and the decoded picture buffer unit 230 form a buffer. Other embodiments may be used to store the filtered block 221 and / or the blocks or samples ( Figure 2 (not shown) is used as input or basis for intra-frame prediction 254.

[0159] The loop filter unit 220 (or simply "loop filter" 220) is used to filter the reconstructed block 215 to obtain a filtered block 221, so as to smoothly perform pixel conversion or improve video quality. The loop filter unit 220 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (ALF), or a sharpening or smoothing filter, or a collaborative filter. Although the loop filter unit 220 is in Figure 2 2 is shown as an in-loop filter, but in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221. The decoded picture buffer 230 may store the reconstructed coding block after the loop filter unit 220 performs a filtering operation on the reconstructed coding block.

[0160] Embodiments of the encoder 20 (correspondingly, the loop filter unit 220) can be used to output loop filter parameters (e.g., sample adaptive offset information), for example, directly or after entropy encoding by the entropy encoding unit 270 or any other entropy encoding unit, such that the decoder 30 can receive and apply the same loop filter parameters for decoding.

[0161] The decoded picture buffer (DPB) 230 may be a reference picture memory for storing reference picture data for use by the encoder 20 in encoding video data. The DPB 230 may be formed by any of a variety of memory devices, such as a dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM)) or other types of memory devices. The DPB 230 and the buffer 216 may be provided by the same memory device or separate memory devices. In one example, the decoded picture buffer (DPB) 230 is used to store the filtered block 221. The decoded picture buffer 230 may further be used to store other previously filtered blocks of the same current picture or a different picture, such as a previously reconstructed picture, such as the previously reconstructed and filtered block 221, and may provide a complete previously reconstructed, i.e., decoded picture (and corresponding reference blocks and samples) and / or a portion of the reconstructed current picture (and corresponding reference blocks and samples), such as for inter-frame prediction. In one example, if the reconstructed block 215 is reconstructed without in-loop filtering, the decoded picture buffer (DPB) 230 is used to store the reconstructed block 215.

[0162] The prediction processing unit 260, also referred to as the block prediction processing unit 260, is used to receive or obtain an image block 203 (a current image block 203 of a current picture 201) and reconstructed picture data, such as reference samples of the same (current) picture from a buffer 216 and / or reference picture data 231 of one or more previously decoded pictures from a decoded picture buffer 230, and to process such data for prediction, i.e. to provide a prediction block 265 which may be an inter-prediction block 245 or an intra-prediction block 255.

[0163] The mode selection unit 262 may be used to select a prediction mode (eg, intra or inter prediction mode) and / or a corresponding prediction block 245 or 255 for use as a prediction block 265 to calculate the residual block 205 and reconstruct the reconstructed block 215 .

[0164] An embodiment of the mode selection unit 262 can be used to select a prediction mode (e.g., selected from those prediction modes supported by the prediction processing unit 260), the prediction mode providing the best match or minimum residual (minimum residual means better compression in transmission or storage), or providing minimum signaling overhead (minimum signaling overhead means better compression in transmission or storage), or considering or balancing both of the above. The mode selection unit 262 can be used to determine the prediction mode based on rate distortion optimization (RDO), that is, to select a prediction mode that provides minimum rate distortion optimization, or to select a prediction mode whose relevant rate distortion at least meets the prediction mode selection criteria. In a scenario of multi-hypothesis coding prediction described in an embodiment of the present invention, the prediction of the current block includes both inter-frame prediction and intra-frame prediction. Accordingly, the mode selection unit 262 can select the inter-frame prediction unit 244 and the intra-frame prediction unit 254 for coding prediction respectively.

[0165] The prediction processing performed by an example of encoder 20 (eg, by prediction processing unit 260) and the mode selection performed (eg, by mode selection unit 262) will be explained in detail below.

[0166] As described above, the encoder 20 is used to determine or select the best or optimal prediction mode from a (predetermined) prediction mode set. The prediction mode set may include, for example, an intra-frame prediction mode and / or an inter-frame prediction mode. Accordingly, the intra-frame prediction mode may be performed by the intra-frame prediction unit 254, and the inter-frame prediction mode may be performed by the inter-frame prediction unit 244.

[0167] The intra prediction unit 254 is used to obtain the picture image block 203 (current block) and one or more previously reconstructed blocks, such as reconstructed adjacent blocks, of the same picture to perform intra estimation. In one example, the encoder 20 can be used to select an intra prediction mode from multiple intra prediction modes for intra estimation. In another example, the encoder 20 can also directly use certain preset intra prediction modes for intra estimation (for example, the preset intra prediction mode is a planar mode).

[0168] In one possible implementation, for a luma block (or luma component), an intra prediction mode set (e.g., an intra candidate mode list) may include four intra prediction modes: planar mode, vertical mode, horizontal mode, and DC mode. The size of the intra candidate mode list may be selected according to the shape of the current block, which may be 3 or 4. When the width of the current block is greater than twice the height, the horizontal mode may not be included in the intra candidate mode list. When the height of the current block is greater than twice the width, the vertical mode may not be included in the intra candidate mode list. For chroma blocks (or chroma components), the DM mode is used, that is, the same prediction mode as the luma component is used.

[0169] In a possible implementation, in the next generation video coding standard (e.g. H.266), the intra prediction mode of the chrominance component of the image also includes a cross component prediction mode (Cross component prediction, CCP), which is also called a cross component intra prediction mode (Cross component intra prediction, CCIP), or a cross component linear mode (CCLM) prediction mode. The CCLM prediction mode can also be referred to as a linear model mode (linear model mode, referred to as LM mode).

[0170] In a possible implementation, for the brightness component of an image, the intra-frame prediction mode set may also include 35 different intra-frame prediction modes, including 33 directional prediction modes, a DC prediction mode, and a Planar prediction mode. The directional prediction mode refers to mapping the reference pixel to the pixel position in the current block in a certain direction (marked by intra mode index) to obtain the predicted value of the current pixel, or, for each pixel in the current block, reversely mapping its position to the reference pixel in a certain direction (marked by intra mode index), and the pixel value of the corresponding reference pixel is the predicted value of the current pixel; different from the directional prediction mode, the DC prediction uses the mean value of the reference pixel as the predicted value of the pixel in the current block; the Planar mode uses the pixel values ​​of the reference pixels just above and just to the left of the current pixel and the pixel values ​​of the upper right and lower left reference pixels of the current block to jointly derive the predicted value of the current pixel.

[0171] The intra prediction unit 254 is further configured to determine an intra prediction block 255 (or motion compensation block 255) based on the intra prediction parameters of the selected intra prediction mode. In any case, after selecting the intra prediction mode for the block, the intra prediction unit 254 is further configured to provide the intra prediction parameters to the entropy coding unit 270, i.e., provide information indicating the selected intra prediction mode for the block.

[0172] In a possible embodiment, the intra-frame prediction unit 254 may also include a filter set, wherein the filter set includes a plurality of filter types, wherein different filter types represent different luminance block downsampling algorithms, and each filter type corresponds to a chrominance point sampling position. The intra-frame prediction unit 254 may also be used to determine the sampling position of the chrominance point of the current video sequence, determine the filter type used for the current encoding based on the sampling position of the chrominance point, and generate an indication information based on the filter type, wherein the indication information is used to indicate the filter type used for the luminance image downsampling process in the inter-frame prediction mode when encoding or decoding the current video sequence (such as encoding or reconstructing the picture 201 or the image block 203). The intra-frame prediction unit 254 is also used to provide the indication information of the filter type to the entropy coding unit 270.

[0173] Specifically, the intra prediction unit 254 may transmit a syntax element to the entropy coding unit 270, wherein the syntax element includes an intra prediction parameter (such as an indication of selecting an intra prediction mode for current block prediction after traversing multiple intra prediction modes), and optionally, an indication of a filter type. In a possible application scenario, if there is only one intra prediction mode, the intra prediction parameter may not be carried in the syntax element, and the decoding end 30 may directly use the default prediction mode for decoding.

[0174] The inter-frame prediction unit 244 is used to obtain the image block 203 (current block) and one or more reference images to perform inter-frame estimation. In one example, the encoder 20 can be used to select an inter-frame prediction mode from multiple inter-frame prediction modes for inter-frame estimation. In another example, the encoder 20 can also directly use certain preset inter-frame prediction modes for inter-frame estimation.

[0175] In one embodiment, the inter prediction mode set depends on the available reference picture (i.e., at least part of the decoded picture stored in the DBP 230 as described above) and other inter prediction parameters, such as whether to use the entire reference picture or only a part of the reference picture, such as a search window area around the current block, to search for the best matching reference block, and / or whether to apply pixel interpolation such as half-pixel and / or quarter-pixel interpolation. The inter prediction mode set may include, for example, an Advanced Motion Vector Prediction (AMVP) mode and a merge mode. In an embodiment of the present invention, inter prediction of the image block to be processed may be applied to unidirectional prediction (forward or backward), bidirectional prediction (forward and backward), or multi-directional prediction.

[0176] In addition to the above prediction modes, embodiments of the present invention may also apply skip mode and / or direct mode.

[0177] Specifically, the inter-frame prediction unit 24 may transmit syntax elements to the entropy coding unit 270, wherein the syntax elements include inter-frame prediction parameters (such as indication information of selecting an inter-frame prediction mode for current block prediction after traversing multiple inter-frame prediction modes), an index number of a candidate motion vector list, and optionally, a reference image index, etc. In a possible application scenario, if there is only one inter-frame prediction mode, the inter-frame prediction parameters may not be carried in the syntax elements, and the decoding end 30 may directly use the default prediction mode for decoding.

[0178] The prediction processing unit 260 can be further used to partition the image block 203 into smaller block partitions or sub-blocks, for example, by iteratively using quad-tree (QT) partitioning, binary-tree (BT) partitioning or triple-tree (TT) partitioning, or any combination thereof, and for performing prediction for each of the block partitions or sub-blocks, for example, wherein the mode selection includes selecting a tree structure of the partitioned image block 203 and selecting a prediction mode to be applied to each of the block partitions or sub-blocks.

[0179] The inter-frame prediction unit 244 may include a motion estimation (ME) unit ( Figure 2 ) and a motion compensation (MC) unit ( Figure 2). The motion estimation unit is used to receive or obtain a picture image block 203 (a current picture image block 203 of a current picture 201) and a decoded picture 231, or at least one or more previously reconstructed blocks, for example, reconstructed blocks of one or more other / different previously decoded pictures 231, and perform motion estimation based on the determined inter-frame prediction mode. For example, a video sequence may include a current picture and a previously decoded picture 31, or in other words, the current picture and the previously decoded picture 31 may be part of a picture sequence forming a video sequence, or form the picture sequence.

[0180] For example, the encoder 20 may be configured to select a reference block from a plurality of reference blocks of the same or different pictures in a plurality of other pictures (reference images) and to provide the reference block to the motion estimation unit ( Figure 2 (not shown) provides a reference picture and / or provides an offset (spatial offset) between the position (X, Y coordinates) of a reference block and the position of a current block as an inter-frame prediction parameter. The offset is also called a motion vector (MV).

[0181] The motion compensation unit is used to obtain inter-frame prediction parameters, and perform inter-frame prediction based on or using the inter-frame prediction parameters to obtain the inter-frame prediction block 245. Figure 2 Motion compensation performed by the motion compensation unit 246 (not shown) may include fetching or generating a prediction block (prediction value) based on a motion / block vector determined by motion estimation (possibly performing interpolation to sub-pixel accuracy). Interpolation filtering may produce additional pixel samples from known pixel samples, thereby potentially increasing the number of candidate prediction blocks that may be used to encode the picture block. Upon receiving the motion vector for the PU of the current picture block, the motion compensation unit 246 may locate the prediction block to which the motion vector points in a reference picture list. The motion compensation unit 246 may also generate syntax elements associated with blocks and video slices for use by the decoder 30 when decoding picture blocks of the video slice.

[0182] The entropy coding unit 270 is used to apply an entropy coding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context adaptive VLC (CAVLC) scheme, an arithmetic coding scheme, a context adaptive binary arithmetic coding (CABAC), a syntax-based context-adaptive binary arithmetic coding (SBAC), a probability interval partitioning entropy (PIPE) coding, or other entropy coding methods or techniques) to a single or all (or none) of the quantized residual coefficients 209, inter-frame prediction parameters, intra-frame prediction parameters, and / or loop filter parameters to obtain the encoded picture data 21 that can be output through the output 272 in the form of, for example, an encoded bitstream 21. The encoded bitstream can be transmitted to the decoder 30 or archived for later transmission or retrieval by the decoder 30. The entropy coding unit 270 can also be used to entropy encode other syntax elements of the current video slice being encoded.

[0183] Other structural variations of the encoder 20 may be used to encode the video stream. For example, a non-transform based encoder 20 may directly quantize the residual signal without a transform processing unit 206 for certain blocks or frames. In another embodiment, the encoder 20 may have a quantization unit 208 and an inverse quantization unit 210 combined into a single unit.

[0184] In a specific embodiment, the encoder 20 may be used to implement the weighted prediction method for multi-hypothesis coding described in the following embodiments.

[0185] It should be understood that other structural changes of the encoder 20 can be used to encode the video stream. For example, for some image blocks or image frames, the encoder 20 can directly quantize the residual signal without processing by the transform processing unit 206, and accordingly, it does not need to be processed by the inverse transform processing unit 212; or, for some image blocks or image frames, the encoder 20 does not generate residual data, and accordingly, it does not need to be processed by the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210 and the inverse transform processing unit 212; or, the encoder 20 can directly store the reconstructed image block as a reference block without processing by the filter 220; or, the quantization unit 208 and the inverse quantization unit 210 in the encoder 20 can be combined together. The loop filter 220 is optional, and in the case of lossless compression encoding, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210 and the inverse transform processing unit 212 are optional. It should be understood that according to different application scenarios, the inter-frame prediction unit 244 and the intra-frame prediction unit 254 can be selectively enabled.

[0186] See also Figure 3 , Figure 3 A schematic / conceptual block diagram of an example of a decoder 30 for implementing an embodiment of the present invention is shown. The decoder 30 is configured to receive coded picture data (e.g., a coded bitstream) 21, for example, encoded by the encoder 20, to obtain a decoded picture 231. During the decoding process, the decoder 30 receives video data from the encoder 20, for example, a coded video bitstream representing picture blocks of a coded video slice and associated syntax elements.

[0187] exist Figure 3 In the example of , decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., a summer 314), a buffer 316, a loop filter 320, a decoded picture buffer 330, and a prediction processing unit 360. Prediction processing unit 360 may include an inter-frame prediction unit 344, an intra-frame prediction unit 354, and a mode selection unit 362. In some examples, decoder 30 may perform substantially the same as reference Figure 2 The encoding pass described by encoder 20 is a decoding pass that is the inverse of the encoding pass.

[0188] The entropy decoding unit 304 is used to perform entropy decoding on the encoded picture data 21 to obtain, for example, quantized coefficients 309 and / or decoded encoding parameters ( Figure 3The entropy decoding unit 304 is further configured to forward the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to the prediction processing unit 360. The decoder 30 may receive syntax elements at the video slice level and / or the video block level.

[0189] The inverse quantization unit 310 may be functionally the same as the inverse quantization unit 110, the inverse transform processing unit 312 may be functionally the same as the inverse transform processing unit 212, the reconstruction unit 314 may be functionally the same as the reconstruction unit 214, the buffer 316 may be functionally the same as the buffer 216, the loop filter 320 may be functionally the same as the loop filter 220, and the decoded picture buffer 330 may be functionally the same as the decoded picture buffer 230.

[0190] The prediction processing unit 360 may include an inter-prediction unit 344 and an intra-prediction unit 354, wherein the inter-prediction unit 344 may be functionally similar to the inter-prediction unit 244, and the intra-prediction unit 354 may be functionally similar to the intra-prediction unit 254. The prediction processing unit 360 is generally used to perform block prediction and / or obtain a prediction block 365 from the encoded data 21, and receive or obtain prediction related parameters and / or information about the selected prediction mode from, for example, the entropy decoding unit 304 (explicitly or implicitly).

[0191] When the video slice is encoded as an intra-coded (I) slice, the intra-prediction unit 354 of the prediction processing unit 360 is used to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra-prediction mode and data from a previously decoded block of the current frame or picture. When the video frame is encoded as an inter-coded (i.e., B or P) slice, the inter-prediction unit 344 (e.g., motion compensation unit) of the prediction processing unit 360 is used to generate a prediction block 365 for the video block of the current video slice based on the motion vector and other syntax elements received from the entropy decoding unit 304. For inter-prediction, the prediction block may be generated from one of the reference pictures within one of the reference picture lists. Decoder 30 may construct reference picture lists: List 0 and List 1 using a default construction technique based on the reference pictures stored in DPB 330.

[0192] The prediction processing unit 360 is configured to determine prediction information for a video block of a current video slice by parsing motion vectors and other syntax elements, and to generate a prediction block for the current video block being decoded using the prediction information. In one example of the present invention, the prediction processing unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., a multiple hypothesis coding prediction mode combining an intra prediction mode and an inter prediction mode) for encoding a video block of a video slice, an inter prediction slice type (e.g., a B slice, a P slice, or a GPB slice), construction information of one or more of a reference picture list for a slice, a motion vector for each inter-coded video block of the slice, an inter prediction state of each inter-coded video block of the slice, and other information to decode the video block of the current video slice. In another example of the present disclosure, the syntax elements received by the decoder 30 from the bitstream include syntax elements received in one or more of an adaptive parameter set (APS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header.

[0193] Inverse quantization unit 310 may be used to inverse quantize (i.e., dequantize) quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 304. The inverse quantization process may include using quantization parameters calculated by encoder 20 for each video block in a video slice to determine a degree of quantization that should be applied and likewise a degree of inverse quantization that should be applied.

[0194] The inverse transform processing unit 312 is used to apply an inverse transform (eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to generate a residual block in the pixel domain.

[0195] The reconstruction unit 314 (e.g., the summer 314) is used to add the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365 to obtain the reconstructed block 315 in the sample domain, for example, by adding the sample values ​​of the reconstructed residual block 313 to the sample values ​​of the prediction block 365.

[0196] The loop filter unit 320 is used to filter the reconstructed block 315 (during or after the encoding cycle) to obtain a filtered block 321, thereby smoothing pixel conversion or improving video quality. In one example, the loop filter unit 320 can be used to perform any combination of the filtering techniques described below. The loop filter unit 320 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (ALF), or a sharpening or smoothing filter, or a collaborative filter. Although the loop filter unit 320 is in Figure 3 3. Although shown as an in-loop filter in FIG. 3, in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.

[0197] The decoded video blocks 321 in a given frame or picture are then stored in a decoded picture buffer 330 which stores reference pictures for subsequent motion compensation.

[0198] Decoder 30 is operable to output decoded picture 31 , eg, via output 332 , for presentation to or viewing by a user.

[0199] Other variations of the decoder 30 may be used to decode the compressed bitstream. For example, the decoder 30 may generate an output video stream without the loop filter unit 320. For example, a non-transform based decoder 30 may directly inverse quantize the residual signal without the inverse transform processing unit 312 for certain blocks or frames. In another embodiment, the decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.

[0200] It should be understood that other structural changes of the decoder 30 can be used to decode the encoded video bitstream. For example, the decoder 30 can generate an output video stream without being processed by the filter 320; or, for some image blocks or image frames, the entropy decoding unit 304 of the decoder 30 does not decode the quantized coefficients, and accordingly does not need to be processed by the inverse quantization unit 310 and the inverse transform processing unit 312. The loop filter 320 is optional; and for lossless compression, the inverse quantization unit 310 and the inverse transform processing unit 312 are optional. It should be understood that, according to different application scenarios, the inter-frame prediction unit and the intra-frame prediction unit can be selectively enabled.

[0201] In a specific embodiment, the decoder 30 may be used to implement the weighted prediction method for multi-hypothesis coding described in the following embodiments.

[0202] Specifically, the decoder 30 can be used to: use the inter-frame prediction mode to determine the first target prediction block of the image block to be processed; use the intra-frame prediction mode to determine the second target prediction block of the image block to be processed; determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the indication information in the code stream; weight the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block according to the weight coefficients to obtain the prediction value of the image block to be processed.

[0203] Wherein, when the residual image for the image block to be processed in the inter-frame prediction mode is not transmitted in the code stream, or when the inter-frame prediction mode does not need to perform motion compensation, the first target prediction block represents a prediction block obtained by using the inter-frame prediction mode to predict the image block to be processed;

[0204] In the case where a residual image of an image block to be processed in the inter-frame prediction mode is transmitted in a code stream, or in the case where motion compensation needs to be performed in the inter-frame prediction mode, the first target prediction block represents an image block obtained by performing motion compensation on the prediction block after the prediction block is obtained by using the inter-frame prediction mode to predict the image block to be processed.

[0205] Wherein, when the residual image for the image block to be processed in the intra-frame prediction mode is not transmitted in the code stream, or when the intra-frame prediction mode does not need to perform motion compensation, the second target prediction block represents a prediction block obtained by using the intra-frame prediction mode to predict the image block to be processed;

[0206] In the case where a residual image of an image block to be processed in the intra-frame prediction mode is transmitted in a code stream, or in the case where motion compensation needs to be performed in the intra-frame prediction mode, the second target prediction block represents an image block obtained by performing motion compensation on the prediction block after the prediction block is obtained by using the intra-frame prediction mode to predict the image block to be processed.

[0207] See also Figure 4 , Figure 4 FIG. 4 is a schematic diagram of the structure of a video decoding device 400 (eg, a video encoding device 400 or a video decoding device 400) provided in an embodiment of the present invention. The video decoding device 400 is suitable for implementing the embodiments described herein. In one embodiment, the video decoding device 400 may be a video decoder (eg, Figure 1A decoder 30) or a video encoder (e.g. Figure 1A In another embodiment, the video decoding device 400 may be the above-mentioned Figure 1A Decoder 30 or Figure 1A One or more components in encoder 20.

[0208] The video decoding device 400 includes: an inlet port 410 and a receiving unit (Rx) 420 for receiving data, a processor, a logic unit or a central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an outlet port 450 for transmitting data, and a memory 460 for storing data. The video decoding device 400 may also include an optical-to-electrical conversion component and an electro-optical (EO) component coupled to the inlet port 410, the receiver unit 420, the transmitter unit 440 and the outlet port 450 for the outlet or inlet of an optical signal or an electrical signal.

[0209] The processor 430 is implemented by hardware and software. The processor 430 can be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. The processor 430 communicates with the inlet port 410, the receiver unit 420, the transmitter unit 440, the outlet port 450, and the memory 460. The processor 430 includes a decoding module 470 (e.g., an encoding module 470 or a decoding module 470). The encoding / decoding module 470 implements the embodiments disclosed herein to implement the chrominance block prediction method provided by the embodiments of the present invention. For example, the encoding / decoding module 470 implements, processes, or provides various encoding operations. Therefore, the encoding / decoding module 470 provides substantial improvements to the functions of the video decoding device 400 and affects the conversion of the video decoding device 400 to different states. Alternatively, the encoding / decoding module 470 is implemented by instructions stored in the memory 460 and executed by the processor 430.

[0210] The memory 460 includes one or more disks, tape drives, and solid-state drives, and can be used as an overflow data storage device for storing programs when these programs are selectively executed, and for storing instructions and data read during program execution. The memory 460 can be volatile and / or non-volatile, and can be a read-only memory (ROM), a random access memory (RAM), a ternary content-addressable memory (TCAM), and / or a static random access memory (SRAM).

[0211] See also Figure 5 , Figure 5 According to an exemplary embodiment, it can be used as Figure 1A 1 and 14. The device 500 may implement the techniques of the present invention. In other words, Figure 5Schematic block diagram of an implementation of an encoding device or decoding device (referred to as decoding device 500) of an embodiment of the present invention. The decoding device 500 may include a processor 510, a memory 530 and a bus system 550. The processor and the memory are connected via a bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. The memory of the decoding device stores program code, and the processor can call the program code stored in the memory to execute various video encoding or decoding methods described in the present invention. To avoid repetition, it will not be described in detail here.

[0212] In the embodiment of the present invention, the processor 510 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0213] The memory 530 may include a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may also be used as the memory 530. The memory 530 may include code and data 531 accessed by the processor 510 using the bus 550. The memory 530 may further include an operating system 533 and an application 535, which includes at least one program that allows the processor 510 to perform the video encoding or decoding method described in the present invention. For example, the application 535 may include applications 1 to N, which further include a video encoding or decoding application (referred to as a video decoding application) that executes the video encoding or decoding method described in the present invention.

[0214] The bus system 550 may include, in addition to the data bus, a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus system 550 in the figure.

[0215] Optionally, the decoding device 500 may further include one or more output devices, such as a display 570. In one example, the display 570 may be a touch-sensitive display that combines a display with a touch-sensitive unit operable to sense touch input. The display 570 may be connected to the processor 510 via the bus 550.

[0216] Although Figure 5The processor 510 and memory 530 of the device 500 are illustrated as being integrated in a single unit, but other configurations may also be used. The operation of the processor 510 may be distributed among a plurality of directly coupled machines (each machine having one or more processors), or distributed in a local area or other network. The memory 530 may be distributed among a plurality of machines, such as a network-based memory or a memory in a plurality of machines running the device 500. Although only a single bus is illustrated here, the bus 550 of the device 500 may be formed by a plurality of buses. Further, the memory 530 may be directly coupled to other components of the device 500 or may be accessed through a network, and may include a single integrated unit, such as a memory card, or a plurality of units, such as a plurality of memory cards. Therefore, the device 500 may be implemented in a variety of configurations.

[0217] In order to better understand the technical solution of the embodiment of the present invention, the inter-frame prediction mode, intra-frame prediction mode and multi-hypothesis coding prediction mode involved in the embodiment of the present invention are further described below.

[0218] 1) Inter-prediction mode. In inter-prediction coding, since the same objects in adjacent frames of an image have a certain temporal correlation, each frame of the image sequence can be divided into many non-overlapping blocks, and the motion of all pixels in the block is considered to be the same. The main processing is to determine the motion information of the current block, obtain the reference image block from the reference image according to the motion information, and generate the predicted image of the current block. The motion information includes the inter-prediction direction, the reference image index (reference index, ref_idx), the motion vector (motion vector, MV), etc. The inter-prediction indicates which prediction direction the current block uses, unidirectional prediction, bidirectional prediction, or multi-directional prediction, through the inter-prediction direction, the reference image (reference frame) is specified through the reference image index, and the motion vector indicates the position offset of the reference block (reference block) of the current block (current block) in the reference image relative to the current block in the current frame. The motion vector indicates the displacement vector of the reference image block used to predict the current block in the reference image relative to the current block, so one motion vector corresponds to one reference image block.

[0219] Among them, unidirectional prediction refers to determining the prediction block of the current block in a single direction based on a reference image in a single direction. Generally, according to the relative relationship between the image sequence number of the reference image frame and the image sequence number of the current image frame, the unidirectional prediction can be correspondingly called forward prediction or backward prediction.

[0220] Bidirectional prediction includes first direction prediction and second direction prediction, wherein the first direction prediction is to determine the prediction block of the current block in the first direction based on the reference image of the first direction, wherein the reference image of the first direction is one of the first reference image frame set, and the first reference image frame set includes a certain number of reference images; the second direction prediction is to determine the prediction block of the current block in the second direction based on the reference image of the second direction, wherein the reference image of the second direction is one of the second reference image frame set, and the second reference image frame set includes a certain number of reference images. The prediction block of the first direction and the prediction block of the second direction are processed according to a preset algorithm (for example, weighted average), and the reconstructed block of the current block can be finally obtained. Generally, the bidirectional prediction can also be called forward and backward prediction, that is, the bidirectional prediction includes forward prediction and backward prediction. In this case, when the first direction prediction is forward prediction, the second direction prediction is correspondingly backward prediction; when the first direction prediction is backward prediction, the second direction prediction is correspondingly forward prediction. For example, the first reference image frame set is reference picture list 0 (reference picture list 0, list0), and the second reference image frame set is reference picture list 1 (reference picture list 1, list1). For another example, the first reference image frame set is list1, and the second reference image frame set is list0.

[0221] It can be understood that in multi-directional prediction, more reference image frame sets are used than in bidirectional prediction. For example, the reference image frame sets of multi-directional prediction include list0, list1, list2, etc. Then, multiple prediction blocks are determined based on reference images in different lists, and then the multiple prediction blocks are processed according to a preset algorithm to obtain a reconstructed block of the current block.

[0222] In inter-frame prediction coding, the inter-frame prediction modes commonly used include an inter-frame motion vector prediction (Intermotionvector prediction, referred to as Inter MVP) mode and a merge mode. The Inter MVP mode may also be specifically: an advanced motion vector prediction (AMVP) mode.

[0223] For the AMVP mode, the AMVP mode first predicts an MV for the current block. This predicted motion vector is also called the motion vector prediction value (Motion Vector Prediction, MVP). The MVP can be directly obtained according to the motion vectors of the neighboring blocks around the current block in the spatial domain, or the time domain reference block corresponding to the current block, or the time domain reference block corresponding to the neighboring blocks around the current block. Because there are multiple adjacent blocks, there will be multiple MVPs. An MVP is essentially a candidate motion vector (candidate mv). The AMVP mode groups these MVPs into an AMVP candidate list (AMVP candidate list). After establishing the AMVP candidate list, the encoder selects an optimal MVP from the AMVP candidate list, determines the starting point of the search in the reference image based on the optimal MVP (MVP is also a candidate MV), and then searches in a specific range near the search starting point in a specific way and calculates the rate-distortion cost. Finally, an optimal MV is calculated. The optimal MV determines the position of the actual reference block (prediction block) in the reference image, and the motion vector difference (MVD) is obtained by the difference between the optimal MV and the optimal MVP. The index value corresponding to the optimal MVP in the AMVP candidate list is encoded, and the index of the reference image is encoded. The encoder sends the MVD, the index of the Merge candidate list, the reference image index, the inter-frame prediction direction (forward, backward, bidirectional, multi-directional, etc.) and so on to the decoder in the bitstream, achieving the purpose of video data compression. On the one hand, the decoding end decodes the bitstream to obtain the MVD, the index value in the candidate list, the reference image index, and the inter-frame prediction direction. On the other hand, it establishes its own AMVP candidate list, obtains the optimal MVP through the index value, obtains the optimal MV based on the MVD and the optimal MVP, obtains the reference image based on the inter-frame prediction direction and the reference image index, uses the optimal MV to find the prediction block from the reference image, and then obtains the reconstructed block of the current block by performing motion compensation on the prediction block.

[0224] For the Merge mode, the Merge mode will also use the motion vectors of the neighboring blocks in the spatial domain of the current block, or the time domain reference block corresponding to the current block, or the time domain reference block corresponding to the neighboring blocks in the current block as candidate motion vectors (candidate mv). Because there are multiple neighboring blocks, there are also multiple candidate mvs. The Merge mode builds a fusion motion information candidate list (merge candidate list) based on these candidate mvs. In the Merge mode, the MV of the neighboring block is directly used as the predicted motion vector of the current block, that is, the current block and the neighboring block share an MV (so there is no MVD at this time), and the reference image of the neighboring block is used as its own reference image. The Merge mode traverses all candidate MVs in the fusion motion information candidate list, and calculates the rate-distortion cost value. Finally, a candidate MV with the smallest rate-distortion cost value is selected as the optimal MV of the Merge mode, and the index value of the optimal MV in the fusion motion information candidate list is encoded. The encoder sends the index (merge index) of the fusion motion information candidate list to the decoder in the bitstream, achieving the purpose of video data compression. On the one hand, the decoding end decodes the bitstream to obtain the index of the fusion motion information candidate list, and on the other hand, establishes its own fusion motion information candidate list, and determines that a candidate MV in the fusion motion information candidate list is the optimal MV through the index value, and uses the reference image of the adjacent block as its own reference image, uses the optimal MV and finds the prediction block from the reference image, and then obtains the reconstructed block of the current block by performing motion compensation on the prediction block.

[0225] 2) Intra-prediction mode. Intra-prediction coding is a prediction technology that uses the coded pixels of the current image to predict the pixels of the current block based on the spatial correlation of the pixels within the frame. In one example, the intra-prediction process is to select an intra-prediction mode from an intra-prediction mode set (e.g., an intra-candidate mode list) to implement intra-prediction. In another example, some preset intra-prediction modes (e.g., Planar mode) can also be directly used to implement intra-prediction.

[0226] In one possible implementation, for the luminance block (or luminance component) of the image block, the intra-frame candidate mode list may include 4 intra-frame prediction modes: Planar mode, vertical mode, horizontal mode, and DC mode. The size of the intra-frame candidate mode list can be selected according to the shape of the current block, which may be 3 or 4. When the width of the current block is greater than twice the height, the horizontal mode may not be included in the intra-frame candidate mode list. When the height of the current block is greater than twice the width, the vertical mode may not be included in the intra-frame candidate mode list. For the chrominance block (or chrominance component), the DM mode is used, that is, the same prediction mode as the luminance component is used.

[0227] In a possible implementation, in the next generation video coding standard (eg H.266), the intra-frame prediction mode of the chrominance component of the image further includes a linear model mode (LM mode for short).

[0228] In a possible implementation, for the brightness component of the image, the intra-frame candidate mode list may also include 35 different intra-frame prediction modes, including 33 directional prediction modes, a DC prediction mode, and a Planar prediction mode. The directional prediction mode refers to mapping the reference pixel to the pixel position in the current block in a certain direction (marked by intra mode index) to obtain the predicted value of the current pixel, or, for each pixel in the current block, reversely mapping its position to the reference pixel in a certain direction (marked by intra mode index), and the pixel value of the corresponding reference pixel is the predicted value of the current pixel; different from the directional prediction mode, the DC prediction uses the mean value of the reference pixel as the predicted value of the pixel in the current block; the Planar mode uses the pixel values ​​of the reference pixels just above and just to the left of the current pixel and the pixel values ​​of the upper right and lower left reference pixels of the current block to jointly derive the predicted value of the current pixel.

[0229] Figure 6 An example application scenario of the Planar mode is shown. Figure 6 As shown, using the Planar method, the motion information of the upper spatial adjacent position, the left spatial adjacent position, the right and the bottom position of each sub-block (sub-coding unit) of the current block is obtained, the average value is calculated, and converted into the motion information of each current sub-block.

[0230] Specifically, for a sub-block with coordinates (x, y), the sub-block motion vector P(x, y) can be obtained by using the horizontal interpolation motion vector P h (x, y) and the vertical interpolation motion vector P v (x, y) is calculated as shown in formula (1):

[0231] P(x,y)=(H×P h (x,y)+W×P v (x,y)+H×W) / (2×H×w) (1)

[0232] Horizontal interpolation motion vector P h (x, y) and the vertical interpolation motion vector P v (x, y) can be calculated by using the motion vectors on the left, right, top and bottom of the current sub-block, as shown in formula (2) (3):

[0233] P h (x,y)=(W-1-x)×L(-1,y)+(x+1)×R(W,y) (2)

[0234] P v (x,y)=(H-1-y)×A(x,-1)+(y+1)×B(x,H) (3)

[0235] Among them, L(-1,y) and R(W,y) represent the motion vectors of the left and right positions of the current sub-block, and A(x,-1) and B(x,H) represent the motion vectors of the upper and lower positions of the current sub-block.

[0236] The left motion vector L and the upper motion vector A can be obtained from the spatial neighboring blocks of the current coding block. The motion vectors L(-1, y) and A(x, -1) of the coding blocks at the preset positions (-1, y) and (x, -1) are obtained according to the sub-block coordinates (x, y).

[0237] The right motion vector R(W, y) and the lower motion vector B(x, H) are extracted by the following method: extract the temporal motion information BR of the lower right position of the current coding block; use the extracted motion vector AR of the upper right spatial adjacent position and the temporal motion information BR of the lower right position to weightedly calculate the right motion vector R(W, y), as shown in the following formula (4):

[0238] R(W,y)=((Hy-1)AR+(y+1)BR) / H (4)

[0239] The motion vector B(x,H) below is obtained by weighting the extracted motion vector BL of the lower left spatial adjacent position and the temporal motion information BR of the lower right position, as shown in the following equation (5):

[0240] B(x,H)=((Wx-1)BL+(x+1)BR) / W (5)

[0241] All motion vectors used in the above calculations are scaled to point to the first reference picture in a particular reference picture queue.

[0242] 3) Multi-hypothesis coding prediction mode. The multi-hypothesis coding prediction mode is to use multiple prediction modes in the prediction of the current block. In some implementation scenarios, the multi-hypothesis coding prediction mode can be used to achieve joint intra-frame prediction coding and inter-frame prediction coding, that is, both the inter-frame prediction mode and the intra-frame prediction mode are used in the prediction of the current block.

[0243] In an existing implementation of a multi-hypothesis coding scheme that combines intra-frame prediction coding and inter-frame prediction coding, an identifier (e.g., mh_intra_flag) is transmitted in the coding block / CU encoded using the merge mode, and the identifier is used to indicate whether intra-frame prediction coding is used. When it is determined that intra-frame prediction coding can be used, on the one hand, the intra-frame prediction block is obtained using the intra-frame prediction mode, and on the other hand, the inter-frame prediction block is obtained according to the merge index of the merge mode, and then the final prediction block is generated by weighting the intra-frame prediction block and the inter-frame prediction block in equal proportion (i.e., average weighting). However, such a weighting method is too simple, the prediction accuracy of the pixel value of the image is low, the encoding and decoding performance is low, and it is difficult to apply to complex encoding and decoding scenarios.

[0244] In order to solve the above technical defects, the embodiments of the present invention provide some adaptive weighting schemes to improve the prediction accuracy of the pixel values ​​of the image in the multi-hypothesis coding scenario and improve the encoding and decoding performance. This article mainly describes the weighting scheme by taking the multi-hypothesis coding scenario as joint intra-frame prediction coding and inter-frame prediction coding as an example.

[0245] In an embodiment of the present invention, the encoding end may indicate to the decoding end the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively, in an implicit or explicit manner, through indication information. The weight coefficient corresponding to the inter-frame prediction mode is used to indicate the weight of the pixel value of the first target prediction block obtained by predicting the current block using the inter-frame prediction mode in the weighted prediction of multiple hypothesis coding, and the weight coefficient corresponding to the intra-frame prediction mode is used to indicate the weight of the pixel value of the second target prediction block obtained by predicting the current block using the intra-frame prediction mode in the weighted prediction of multiple hypothesis coding. In an embodiment of the present invention, the indication information corresponds to different weight coefficient combinations in different situations; wherein the weight coefficient combination includes the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively.

[0246] For ease of description, the weight coefficient corresponding to the inter-frame prediction mode can be recorded as M, and the weight coefficient corresponding to the intra-frame prediction mode can be recorded as N, where M and N are integers. The values ​​of M and N can be different. According to different values ​​of M and N, multiple weight coefficient combinations {Mi, Ni} are preset at the encoding end and the decoding end, where Mi, Ni are integers. According to different actual encoding and decoding scenarios, the encoding end and the decoding end can adaptively select the most appropriate weight coefficient combination to achieve weighted prediction of multi-hypothesis encoding.

[0247] Subsequently, after the decoding end / encoding end determines the weight coefficient combination {Mi, Ni} corresponding to the weighted prediction of the current block, the weight coefficient combination {Mi, Ni} can be used to weight the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block to obtain the prediction value of the current block.

[0248] For example, the pixel prediction value of the specific position point in the current block is recorded as Samples[x][y], where x and y are the horizontal coordinate and vertical coordinate of the pixel value respectively. Samples[x][y] can be calculated by the following formula (6):

[0249] Samples[x][y]=Clip3(0,(1<<bitDepth)-1,(predSamplesIntra[x][y]*Ni+predSamplesInter[x][y]*Mi+offset)> >shift) (6)

[0250] Wherein, Clip3(·) is the Clip function, bitDepth is the bit depth of Samples data, predSamplesIntra[x][y] represents the intra-frame predicted pixel value at position [x][y], predSamplesInter[x][y] represents the inter-frame predicted pixel value at position [x][y], and offset represents the value accuracy. In the specific implementation, the value of shift can be determined in such a way that the sum of Mi and Ni is equal to 2 raised to the power of shift to reduce unnecessary division operations.

[0251] The following describes in detail some implementation schemes of the present invention for adaptively determining a weight coefficient combination {Mi, Ni} corresponding to a weighted prediction of a current block according to different encoding and decoding scenarios. These implementation schemes can be applied to an encoding end and / or a decoding end.

[0252] In one possible implementation, see Figure 7 , a mapping relationship between coding configuration information and weight coefficient combination {Mi, Ni} can be established, and the coding configuration information is, for example, low delay configuration, P slice only configuration, B slice only configuration, random access configuration, etc. Figure 7 As shown, for low-delay configuration, P-slice-only configuration, and B-slice-only configuration, intra-frame prediction blocks and inter-frame prediction blocks can be set to adopt unequal weighting, and the weight coefficient M corresponding to the inter-frame prediction mode is greater than the weight coefficient N corresponding to the intra-frame prediction mode. Specifically, the weight coefficient combination of the low-delay configuration mapping is set to {Mi0, Ni0}, Mi0>Ni0; the weight coefficient combination of the P-slice-only configuration mapping is set to {Mi1, Ni1}, Mi1>Ni1; the weight coefficient combination of the B-slice-only configuration mapping is set to {Mi2, Ni2}, Mi2>Ni2; for random access configuration, the intra-frame prediction block and the inter-frame prediction block can be set to adopt equal weighting, such as setting the weight coefficient combination of the random access configuration mapping to {A, A} in the figure.

[0253] In the above scheme, for the decoding end, the code stream can be parsed to obtain the indication information about the coding configuration of the current image to be decoded. For example, the indication information is the construction information of the reference image queue at the slice level or frame level transmitted from the encoding end to the decoding end through the code stream. The decoding end establishes a reference image queue based on the information. The reference image queue includes one or more reference image lists, such as list0, list1, list2... etc. If the decoding end finds that the reference images of all reference image lists in the reference image queue are located before the current image to be decoded in the time domain according to the picture order count (POC), it is determined that the current coding configuration is a low delay configuration. Then, in the multi-hypothesis coding of the joint intra-frame prediction coding and inter-frame prediction coding, the weight coefficient corresponding to the inter-frame prediction mode is Mi0, and the weight coefficient corresponding to the intra-frame prediction mode is Ni0.

[0254] In some feasible implementation schemes, the weighting coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be set according to the time domain distance between the reference image closest to the current image and the current image in different reference image lists in the reference image queue (the time domain distance can be referred to as the closest time domain distance). The reference image queue contains one or more reference image lists, for example, list0, list1...listN, where N is an integer greater than or equal to 0. Each reference image list contains one or more frames of reference images, and the time domain distance between the reference image in the reference image list and the current image can be recorded as pocDiff, which can be calculated by the absolute value of the difference between the POC number of the reference image and the POC number of the current image. The time domain distance between the reference image closest to the current image in the reference image list and the current image is the closest time domain distance. That is, in any reference image list, the time domain distance between each reference image and the image block to be processed can be determined, and the minimum time domain distance is determined as the closest time domain distance of any reference image set. The closest time domain distance of the reference image list can be recorded as pocDiffmin, that is, pocDiffmin is the minimum value of each pocDiff corresponding to each reference image in the reference image list. For the reference image queue, the pocDiffmin corresponding to different reference image lists can be recorded as pocDiffmin0, pocDiffmin1...pocDiffminN respectively.

[0255] In a specific embodiment, the minimum value among pocDiffmin0, pocDiffmin1, ..., pocDiffminN is denoted as Lmin. Then, a mapping relationship between Lmin and the weight coefficient combination {Mi, Ni} can be established, such as Figure 8As shown, when Lmin≤T1, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M1, N1}. When T1<Lmin≤T2, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M2, N2}. When T2<Lmin≤T3, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M3, N3}... and so on, when Tk-1<Lmin≤Tk, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {Mk, Nk}. Among them, M1, M2, M3...Mk, N1, N2, N3...Nk, T1, T2, T3...Tk are positive integers, and T1<T2<T3.

[0256] In possible application scenarios, it can be set that: M1 / N1≤M2 / N2, M2 / N2≤M3 / N3…Mk-1 / Nk-1≤Mk / Nk, and M1 / N1≠Mk / Nk.

[0257] In another possible application scenario, it can also be set as follows: floating point number (M1 / N1) ≤ floating point number (M2 / N2), floating point number (M2 / N2) ≤ floating point number (M3 / N3)… floating point number (Mk-1 / Nk-1 ≤ floating point number (Mk / Nk), floating point number (M1 / N1) ≠ floating point number (Mk / Nk).

[0258] In another specific embodiment, the maximum value among pocDiffmin0, pocDiffmin1, ..., pocDiffminN is recorded as Lmax. Then, a mapping relationship between Lmax and the weight coefficient combination {Mi, Ni} can be established, such as Fig. 9 As shown, when Lmax≤T1, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M1, N1}. When T1<Lmax≤T2, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M2, N2}. When T2<Lmax≤T3, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M3, N3}... and so on, when Tk-1<Lmax≤Tk, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {Mk, Nk}. Among them, M1, M2, M3...Mk, N1, N2, N3...Nk, T1, T2, T3...Tk are positive integers, and T1<T2<T3.

[0259] In possible application scenarios, it can be set that: M1 / N1≤M2 / N2, M2 / N2≤M3 / N3…Mk-1 / Nk-1≤Mk / Nk, and M1 / N1≠Mk / Nk.

[0260] In another possible application scenario, it can also be set as follows: floating point number (M1 / N1) ≤ floating point number (M2 / N2), floating point number (M2 / N2) ≤ floating point number (M3 / N3)… floating point number (Mk-1 / Nk-1 ≤ floating point number (Mk / Nk), floating point number (M1 / N1) ≠ floating point number (Mk / Nk).

[0261] In another specific embodiment, the average value of pocDiffmin0, pocDiffmin1, ..., pocDiffminN is Lavg, then a mapping relationship between Lavg and the weight coefficient combination {Mi, Ni} can be established, such as Fig.10 As shown, when Lavg≤T1, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M1, N1}. When T1<Lavg≤T2, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M2, N2}. When T2<Lavg≤T3, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M3, N3}... and so on, when Tk-1<Lavg≤Tk, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {Mk, Nk}. Among them, M1, M2, M3...Mk, N1, N2, N3...Nk, T1, T2, T3...Tk are positive integers, and T1<T2<T3.

[0262] In possible application scenarios, it can be set that: M1 / N1≤M2 / N2, M2 / N2≤M3 / N3…Mk-1 / Nk-1≤Mk / Nk, and M1 / N1≠Mk / Nk.

[0263] In another possible application scenario, it can also be set as follows: floating point number (M1 / N1) ≤ floating point number (M2 / N2), floating point number (M2 / N2) ≤ floating point number (M3 / N3)… floating point number (Mk-1 / Nk-1 ≤ floating point number (Mk / Nk), floating point number (M1 / N1) ≠ floating point number (Mk / Nk).

[0264] In the above scheme, for the decoding end, the code stream can be parsed to obtain the indication information about the nearest time domain distance of the reference image queue. For example, the indication information is the construction information of the reference image queue at the slice level or frame level transmitted from the encoding end to the decoding end through the code stream. The decoding end establishes a reference image queue based on the information. The reference image queue includes one or more reference image lists, such as list0, list1...listN. Then, according to the POC number of each reference image in each reference image list and the POC number of the current image, pocDiffmin0, pocDiffmin1...pocDiffminN can be obtained, and then the minimum value Lmin or maximum value Lmax or average value Lavg of the nearest time domain distance can be obtained, and then the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be obtained according to the mapping relationship between the minimum value Lmin or the maximum value Lmax or the average value Lavg and the weight coefficient combination {Mi, Ni}.

[0265] In another specific embodiment, the average value of pocDiff of all reference images in a preset reference image list (e.g., list0) in the reference image queue may be recorded as Ravg, and then a mapping relationship between Ravg and the weight coefficient combination {Mi, Ni} may be established, such as Fig.11 As shown, when Ravg≤T1, the weight coefficient combination corresponding to the inter prediction mode and the intra prediction mode is {M1, N1}. When T1<Ravg≤T2, the weight coefficient combination corresponding to the inter prediction mode and the intra prediction mode is {M2, N2}. When T2<Lavg≤T3, the weight coefficient combination corresponding to the inter prediction mode and the intra prediction mode is {M3, N3}... and so on, when Tk-1<Ravg≤Tk, the weight coefficient combination corresponding to the inter prediction mode and the intra prediction mode is {Mk, Nk}. Among them, M1, M2, M3...Mk, N1, N2, N3...Nk, T1, T2, T3...Tk are positive integers, and T1<T2<T3.

[0266] In possible application scenarios, it can be set that: M1 / N1≤M2 / N2, M2 / N2≤M3 / N3…Mk-1 / Nk-1≤Mk / Nk, and M1 / N1≠Mk / Nk.

[0267] In another possible application scenario, it can also be set as follows: floating point number (M1 / N1) ≤ floating point number (M2 / N2), floating point number (M2 / N2) ≤ floating point number (M3 / N3)… floating point number (Mk-1 / Nk-1 ≤ floating point number (Mk / Nk), floating point number (M1 / N1) ≠ floating point number (Mk / Nk).

[0268] In the above scheme, for the decoding end, the code stream can be parsed to obtain the indication information about the nearest time domain distance of the reference image queue. For example, the indication information is the construction information of the reference image queue at the slice level or frame level transmitted from the encoding end to the decoding end through the code stream. The decoding end establishes a reference image queue based on the information. The reference image queue includes one or more reference image lists, such as list0, list1...listN, and determines a preset reference image list (for example, list0) from the reference image queue. Then, according to the POC number of each reference image in the preset reference image list (for example, list0) and the POC number of the current image, the pocDiff of each reference image can be obtained, and the average value of the pocDiff of each reference image is calculated as Ravg, and then according to the mapping relationship between Ravg and the weight coefficient combination {Mi, Ni}, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are obtained.

[0269] In some feasible implementation schemes, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be set according to the number of reference images in different reference image lists in the reference image queue. The reference image queue includes one or more reference image lists, such as list0, list1...listN, where N is an integer greater than or equal to 0. Each reference image list contains one or more reference images.

[0270] In a specific embodiment, preset condition 1 can be set as: when the reference images in all reference image lists in all reference image queues are located before the current image in the time domain, and the number of reference images in list0, list1...listN is 1, and the reference images in list1...listN are the same frame reference images (that is, the POC number is the same). Set preset condition 2 as: when preset condition 1 is not met. Then, a mapping relationship between the preset condition and the weight coefficient combination {Mi, Ni} can be established. Fig.12 As shown, if the current encoding / decoding status satisfies preset condition 1, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M2, N2}; if the current encoding / decoding status does not satisfy preset condition 1 (that is, preset condition 2 is satisfied at this time), the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M1, N1}. Among them, M1, M2, N1, and N2 are positive integers. In possible application scenarios, M1>N1 and M2>N2 can be further set.

[0271] In possible application scenarios, it can also be set as follows: M1 / N1≤M2 / N2.

[0272] In another possible application scenario, it may also be set as follows: floating point number (M1 / N1)≤floating point number (M2 / N2).

[0273] In another specific embodiment, preset condition 3 may be set as: when the reference images in all reference image lists in all reference image queues are located before the current image in the time domain, and the number of reference images with different POCs in list0, list1, ... listN is greater than or equal to 2 frames. Preset condition 4 is set as: when preset condition 1 is not met. Then, a mapping relationship between the preset condition and the weight coefficient combination {Mi, Ni} may be established. Fig.13 As shown, if the current encoding / decoding status satisfies preset condition 3, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M2, N2}; if the current encoding / decoding status does not satisfy preset condition 3 (that is, preset condition 4 is satisfied at this time), the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M1, N1}. Among them, M1, M2, N1, and N2 are positive integers; in possible application scenarios, M1>N1 and M2>N2 can be further set.

[0274] In possible application scenarios, M1 / N1≤M2 / N2 can be set.

[0275] In another possible application scenario, it may also be set as follows: floating point number (M1 / N1)≤floating point number (M2 / N2).

[0276] In the above scheme, for the decoding end, the code stream can be parsed to obtain indication information about the nearest time domain distance of the reference image queue. For example, the indication information is the construction information of the reference image queue at the slice level or frame level transmitted from the encoding end to the decoding end through the code stream. The decoding end establishes a reference image queue based on the information. The reference image queue includes one or more reference image lists, such as list0, list1...listN, and each reference image list includes one or more frames of reference images. The decoding end can determine the preset conditions satisfied by the current encoding / decoding status according to the number of reference images in different reference image lists, and obtain the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode according to the mapping relationship between the preset conditions and the weight coefficient combination {Mi, Ni}.

[0277] It can be understood that in each of the above-described implementations, the encoder indicates to the decoder the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively mainly in an implicit manner. In some feasible implementations, the encoder may also directly indicate to the decoder the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively in an explicit manner.

[0278] In some feasible implementation schemes, the indication information transmitted from the encoding end to the decoding end through the code stream includes a weight indication bit in the slice header information in the syntax element, and the weight indication bit in the slice header information can be directly used to indicate the weight coefficient combination, that is, there is a mapping relationship between different values ​​of the weight indication bit and the weight coefficient combination {Mi, Ni}.

[0279] In a specific embodiment, Fig.14 As shown, when the weight indicator bit in the header information in the code stream is true / false (True / false) (i.e., when the weight indicator bit is the first indicator value), the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M2, N2}; when the weight indicator bit in the header information is other values ​​(i.e., when the weight indicator bit is the second indicator value), the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M1, N1}. Wherein M1, M2, N1, N2 are positive integers, M1 / N1≤M2 / N2; in possible application scenarios, it can also be set as follows: floating point number (M1 / N1)≤floating point number (M2 / N2). In possible application scenarios, it can also be further set to M1>N1, M2>N2.

[0280] In another specific embodiment, Fig.15 As shown, when the weight indicator bit in the header information of the code stream is 0 (that is, the weight indicator bit is the first indicator value), the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M1, N1}; when the weight indicator bit in the header information of the code stream is 1 (that is, the weight indicator bit is the second indicator value), the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {M2, N2}; and so on, when the weight indicator bit in the header information of the code stream is k, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode is {Mk+1, Nk+1}. Among them, M1, M2...Mk+1, N1, N2...Nk+1 are positive integers; in possible application scenarios, M1>N1, M2>N2 can be further set.

[0281] In possible application scenarios, it can be set that: M1 / N1≤M2 / N2…Mk / Nk≤Mk+1 / Nk+1, and M1 / N1≠Mk / Nk.

[0282] In possible application scenarios, it can also be set as follows: floating point number (M1 / N1) ≤ floating point number (M2 / N2…floating point number (Mk / Nk) ≤ floating point number (Mk+1 / Nk+1), floating point number (M1 / N1) ≠ floating point number (Mk+1 / Nk+1).

[0283] In possible application scenarios, it can also be set as follows: floating point number (M1 / N1) ≥ floating point number (M2 / N2…floating point number (Mk / Nk) ≥ floating point number (Mk+1 / Nk+1), floating point number (M1 / N1) ≠ floating point number (Mk+1 / Nk+1).

[0284] In another specific embodiment, when the weight indicator bit of the slice header information is a first indicator value, the weight coefficient corresponding to the inter-frame prediction mode is determined from a first set according to the first indicator value, and the weight coefficient corresponding to the intra-frame prediction mode is determined from a second set. Correspondingly, when the weight indicator bit of the slice header information is a second indicator value, the weight coefficient corresponding to the inter-frame prediction mode is determined from a first set according to the second indicator value, and the weight coefficient corresponding to the intra-frame prediction mode is determined from a second set.

[0285] The first set may include two or more optional values, for example,<M1、M2、M3…> Therefore, a value can be selected from the first set according to the first indicator value, for example, M1 can be selected from the first set as the weight coefficient corresponding to the inter-frame prediction mode according to the first indicator value; the second set may include two or more optional values, for example,<N1、N2、N3…> , so a value can be selected from the second set according to the first indicator value, for example, N1 is selected from the second set as the weight coefficient corresponding to the intra-frame prediction mode according to the first indicator value.

[0286] Similarly, a value can be selected from the first set according to the second indication value, for example, M2 can be selected from the first set as the weight coefficient corresponding to the inter-frame prediction mode according to the first indication value; a value can be selected from the second set according to the second indication value, for example, N2 can be selected from the second set as the weight coefficient corresponding to the intra-frame prediction mode according to the second indication value.

[0287] The ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the first indicator value is less than or equal to the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the second indicator value. For example, M1, M2, N1, and N2 are positive integers, and M1 / N1≤M2 / N2.

[0288] A method for setting the first set and the second set is described below. In one possible method, when there are reference images with different POCs in the multiple reference image sets, and all reference images in all reference image sets are located before the image block to be processed in the time domain, the first set can be set to include at least M1 and M2, and the second set can be set to include at least N1 and N2; in other cases except the case described above, the first set can be set to include at least M3 and M4, and the second set can be set to include at least N3 and N4.

[0289] Among them, M1 / N1≤M3 / N3, M2 / N2≤M4 / N4, M1, M2, M3, M4, N1, N2, N3, N4 are positive integers.

[0290] In the above scheme, for the decoding end, the bit stream can be parsed to obtain the weight indicator in the header information, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be obtained according to the mapping relationship between the different values ​​of the weight indicator in the header information and the weight coefficient combination {Mi, Ni}.

[0291] In some further feasible implementation schemes, the indication information transmitted by the encoder to the decoder through the bitstream includes a weight indication bit in the largest coding unit (LCU) information in the syntax element, and the weight indication bit in the LCU information can also be used to determine the weight coefficient combination. The decoder can determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indication bit of the LCU information.

[0292] In a specific embodiment, when the weight indicator bit of the LCU information is the third indicator value, the weight coefficient combination corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be set to {M1, N1}. When the weight indicator bit of the LCU information is the fourth indicator value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to {M2, N2}. Wherein, M1 / N1≤M2 / N2, M1, M2, N1, N2 are positive integers.

[0293] In a specific embodiment, when the weight indicator bit of the LCU information is a third indicator value, the weight coefficient corresponding to the inter-frame prediction mode is determined from the third set according to the third indicator value, and the weight coefficient corresponding to the intra-frame prediction mode is determined from the fourth set; when the weight indicator bit of the LCU information is a fourth indicator value, the weight coefficient corresponding to the inter-frame prediction mode is determined from the third set according to the fourth indicator value, and the weight coefficient corresponding to the intra-frame prediction mode is determined from the fourth set;

[0294] The third set may include two or more optional values, for example,<M1、M2、M3…> Therefore, a value can be selected from the third set according to the third indicator value, for example, M1 can be selected from the third set as the weight coefficient corresponding to the inter-frame prediction mode according to the third indicator value; the fourth set may include two or more optional values, for example,<N1、N2、N3…> Therefore, a value can be selected from the fourth set according to the third indicator value. For example, N1 is selected from the fourth set as the weight coefficient corresponding to the intra-frame prediction mode according to the third indicator value.

[0295] Similarly, a value can be selected from the third set according to the fourth indicator value, for example, M2 can be selected from the third set as the weight coefficient corresponding to the inter-frame prediction mode according to the fourth indicator value; a value can be selected from the fourth set according to the fourth indicator value, for example, N2 can be selected from the fourth set as the weight coefficient corresponding to the intra-frame prediction mode according to the fourth indicator value.

[0296] Among them, the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the third indicator value is smaller than the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the fourth indicator value.

[0297] Some ways of setting the third set and the fourth set are described below.

[0298] In one possible manner, when there are reference images with different POCs in the multiple reference image sets, and all reference images in all reference image sets are located before the image block to be processed in the time domain, the third set can be set to include at least M1 and M2, and the fourth set can be set to include at least N1 and N2; in other cases except the said case, the third set can be set to include at least M3 and M4, and the fourth set can be set to include at least N3 and N4.

[0299] Among them, M1 / N1≤M3 / N3, M2 / N2≤M4 / N4, M1, M2, M3, M4, N1, N2, N3, N4 are positive integers.

[0300] In another possible manner, the indication information in the code stream includes both the weight indication bit of the LCU information and the weight indication bit of the slice header information. In this case, when the weight indication bit of the slice header information is a first indication value, the third set may be set to include at least M1 and M2, and the fourth set may be set to include at least N1 and N2. When the weight indication bit of the slice header information is a second indication value, the third set may be set to include at least M3 and M4, and the fourth set may be set to include at least N3 and N4;

[0301] Among them, M1 / N1≤M3 / N3, M2 / N2≤M4 / N4, M1, M2, M3, M4, N1, N2, N3, N4 are positive integers.

[0302] It should be noted that the detailed implementation process of determining the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indicator bits in the LCU information can be similar to the implementation scheme of the weight indicator bits in the reference header information. For the sake of brevity of the specification, it will not be elaborated here.

[0303] In the above scheme, for the decoding end, the bitstream can be parsed to obtain the weight indicator in the LCU information, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be obtained according to the relationship between the different values ​​of the weight indicator in the LCU information and the weight coefficient combination {Mi, Ni}. Optionally, the weight indicator in the header information can be further parsed, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be obtained according to the weight indicator in the LCU information and the weight indicator in the header information.

[0304] In some other feasible implementation schemes, the indication information transmitted by the encoder to the decoder through the bitstream includes a weight indication bit in the coding unit (CodingUnit, CU) information in the syntax element, and the weight indication bit in the CU information can also be used to determine the weight coefficient combination. The decoder can determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indication bit of the CU information.

[0305] In a specific embodiment, when the weight indicator bit of the CU information is the fifth indicator value, the weight coefficient combination corresponding to the inter prediction mode and the intra prediction mode can be set to {M1, N1}. When the weight indicator bit of the LCU information is the sixth indicator value, the weight coefficients corresponding to the inter prediction mode and the intra prediction mode are set to {M2, N2}. Wherein, M1 / N1≤M2 / N2, M1, M2, N1, N2 are positive integers.

[0306] In a specific embodiment, when the weight indicator bit of the CU information is a fifth indicator value, the weight coefficient corresponding to the inter prediction mode is determined from the fifth set according to the fifth indicator value, and the weight coefficient corresponding to the intra prediction mode is determined from the sixth set; when the weight indicator bit of the CU information is a sixth indicator value, the weight coefficient corresponding to the inter prediction mode is determined from the fifth set according to the sixth indicator value, and the weight coefficient corresponding to the intra prediction mode is determined from the sixth set;

[0307] The fifth set may include two or more optional values, for example,<M1、M2、M3…> Therefore, a value can be selected from the fifth set according to the fifth indicator value, for example, M1 can be selected from the fifth set as the weight coefficient corresponding to the inter-frame prediction mode according to the fifth indicator value; the sixth set may include two or more optional values, for example,<N1、N2、N3…> Therefore, a value can be selected from the sixth set according to the fifth indicator value. For example, N1 is selected from the sixth set as the weight coefficient corresponding to the intra-frame prediction mode according to the fifth indicator value.

[0308] Similarly, a value can be selected from the fifth set according to the sixth indicator value, for example, M2 can be selected from the fifth set as the weight coefficient corresponding to the inter-frame prediction mode according to the sixth indicator value; a value can be selected from the sixth set according to the sixth indicator value, for example, N2 can be selected from the sixth set as the weight coefficient corresponding to the intra-frame prediction mode according to the sixth indicator value.

[0309] Among them, the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the fifth indicator value is smaller than the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the sixth indicator value.

[0310] Some ways of setting the fifth set and the sixth set are described below. In one possible way, the indication information in the bitstream includes both the weight indication bit of the CU information and the weight indication bit of the slice header information. In this case, when the weight indication bit of the slice header information is a first indication value, the fifth set can be set to include at least M1 and M2, and the sixth set can be set to include at least N1 and N2. When the weight indication bit of the slice header information is a second indication value, the fifth set can be set to include at least M3 and M4, and the sixth set can be set to include at least N3 and N4;

[0311] Among them, M1 / N1≤M3 / N3, M2 / N2≤M4 / N4, M1, M2, M3, M4, N1, N2, N3, N4 are positive integers.

[0312] It should be noted that the detailed implementation process of determining the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indicator bits in the CU information can be similar to the implementation scheme of the weight indicator bits in the reference header information. For the sake of brevity of the specification, it will not be elaborated here.

[0313] In the above scheme, for the decoding end, the bitstream can be parsed to obtain the weight indicator in the CU information, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be obtained according to the relationship between the different values ​​of the weight indicator in the CU information and the weight coefficient combination {Mi, Ni}. Optionally, the weight indicator in the header information can be further parsed, and the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be obtained according to the weight indicator in the CU information and the weight indicator in the header information.

[0314] It can be seen that by implementing various schemes of the embodiments of the present invention, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode can be adaptively determined based on different encoding and decoding scenarios, thereby ensuring the normal progress of multi-hypothesis encoding in diversified scenarios. Compared with the weighted method of medium-proportion weighting in the prior art, the accuracy of image prediction is improved and the encoding performance is improved.

[0315] Based on the above description, the weighted prediction method for multi-hypothesis coding provided by an embodiment of the present invention is described below from the perspective of the decoding end, see Fig.16 The method includes but is not limited to the following steps:

[0316] S701: The decoding end parses the bitstream and determines a prediction mode of a to-be-processed image block (or current decoding block, or current block) of the current image. The prediction mode is, for example, a multi-hypothesis coding prediction mode combining intra-frame prediction coding and inter-frame prediction coding.

[0317] Specifically, the identifier of the multi-hypothesis coding of the joint intra-frame prediction coding and the inter-frame prediction coding and the grammatical elements related to the prediction mode can be obtained by parsing the bitstream;

[0318] For example, the flag of multi-hypothesis coding may be mh_intra_flag. When mh_intra_flag (eg, mh_intra_flag is 1) indicates that the current decoding adopts a multi-hypothesis coding mode of joint intra-frame prediction coding and inter-frame prediction coding, the intra-frame coding mode related syntax elements are parsed from the bitstream.

[0319] In one example, the syntax element of the intra coding mode may include a most probable mode identifier mh_intra_luma_mpm_flag and a most probable mode index mh_intra_luma_mpm_idx, wherein mh_intra_luma_mpm_flag is used to indicate the execution of the intra coding mode, and mh_intra_luma_mpm_idx represents the index number of the intra candidate mode list (intracandidate list), and the intra prediction mode can be selected from the intra candidate mode list based on the index number. For example, for the luma component, the intra candidate mode list may include four modes: DC mode, Planar mode, horizontal mode, and vertical mode. The size of the intra candidate mode list may also be selected according to the shape of the current block, and may include 3 or 4 modes. If the width of the current block / CU is greater than twice the height, the horizontal mode may not be included in the intra candidate mode list. If the height of the current block / CU is greater than twice the width, the vertical mode may not be included in the intra candidate mode list. For the chroma component, the DM mode can be used, that is, the same prediction mode as the luma component is used.

[0320] In another example, for intra-frame prediction coding, no index may be transmitted in the bitstream. In this case, a preset mode (eg, Planar mode) may be directly used as the intra-frame coding mode of the current block.

[0321] In the case where the current decoding adopts a multi-hypothesis coding mode of combining intra-frame prediction coding and inter-frame prediction coding, the inter-frame prediction mode is determined for the inter-frame prediction coding flag. For example, the inter-frame prediction coding flag may be "merge_flag" to indicate the execution of the merge mode. For another example, in a possible embodiment, the inter-frame prediction coding flag may also be used to indicate the execution of the Inter MVP mode (specifically, such as the AMVP mode).

[0322] It should be noted that the above examples are only used to explain the technical solution of the present invention and are not limiting. The present invention does not limit the specific intra-frame prediction coding mode or the specific inter-frame prediction coding mode in the multi-hypothesis coding mode of joint intra-frame prediction coding and inter-frame prediction coding.

[0323] S702a: The decoding end obtains a first target prediction block of the current block according to the inter-frame prediction mode.

[0324] Specifically, the decoding end can obtain the motion information of the current block according to the inter-frame prediction mode of the current block, perform a motion compensation process according to the motion information of the current block, and obtain an inter-frame prediction block, which can be called the first target prediction block of the current block.

[0325] For example, if the current block is in merge mode, a motion information candidate list (merge candidate list) is generated, and then the motion information of the current block is determined according to the index (merge index) of the fused motion information candidate list carried in the bitstream, and then the inter-frame prediction block of the current block is obtained according to the motion information of the current block.

[0326] For another example, if the current block is in Inter MVP mode (specifically, AMVP mode), the motion information of the current block is determined according to the inter-frame prediction direction, reference image index, motion vector prediction value (Motion Vector Prediction, MVP) index, and motion vector difference (motion vector difference, MVD) transmitted in the bitstream, and then the inter-frame prediction block (i.e., the first target prediction block) of the current block is obtained according to the motion information of the current block.

[0327] It should be noted that the relevant implementation process of the inter-frame prediction mode in this step can also refer to the detailed description in the above 1), and for the sake of brevity of the specification, it will not be repeated here.

[0328] S702b: The decoding end obtains a second target prediction block of the current block according to the intra prediction mode.

[0329] Specifically, the decoding end can obtain the motion information of the current block according to the intra prediction mode of the current block, perform a motion compensation process according to the motion information of the current block, and obtain an intra prediction block, which can be called the second target prediction block of the current block.

[0330] In one example, the intra prediction block (ie, the second target prediction block) may be generated by the intra prediction module determined according to mh_intra_luma_mpm_flag and mh_intra_luma_mpm_idx.

[0331] In yet another example, the intra prediction module determined according to mh_intra_luma_mpm_flag and mh_intra_luma_mpm_idx may generate an intra prediction block, but the intra prediction module does not use the two intra coding tools of prediction pixel filtering and / or PDPC.

[0332] In another example, the intra-frame coding mode may be set to the Planar mode, and the Planar mode is called to generate the intra-frame prediction block.

[0333] In another example, the intra-frame coding mode may be set to Planar mode, and the Planar mode is called to generate the intra-frame prediction block, but the intra-frame prediction module does not use the two intra-frame coding tools of prediction pixel filtering and / or PDPC.

[0334] It should be noted that the intra-frame prediction mode in this step can also be referred to the detailed description in 2) above, and for the sake of brevity of the specification, it will not be repeated here.

[0335] It should also be noted that there is no necessary order between S702a and S702b, that is, S702a may be executed before S702b, 702a may be executed after S702b, and S702a and S702b may also be executed at the same time, which is not limited in the present invention.

[0336] S703: The decoding end determines the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the indication information in the bitstream.

[0337] Specifically, the encoder can indicate the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode to the decoder in an implicit or explicit manner through indication information. The encoder can adaptively determine the weight coefficient combination {Mi, Ni} corresponding to the weighted prediction of the current block according to different encoding and decoding scenarios.

[0338] In some embodiments, the indication information includes reference image queue information; the reference image queue information is used to indicate the reference image queue corresponding to the image block to be processed; the decoding end can determine the encoding configuration information corresponding to the image block to be processed based on the reference image queue information; further, the decoding end can determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively based on the encoding configuration information.

[0339] In some embodiments, the indication information includes reference image queue information; the reference image queue information is used to indicate the reference image queue corresponding to the image block to be processed; the encoding end can determine the minimum value Lmin or the maximum value Lmax or the average value Lavg of the nearest time domain distance pocDiffmin of multiple reference image sets corresponding to the image block to be processed according to the reference image queue information, and pocDiffmin represents the minimum value in the time domain distance pocDiff between each reference image in the reference image set and the image block to be processed. Furthermore, the decoding end determines the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the Lmin or Lmax or Lavg.

[0340] In some embodiments, the indication information is used to determine the average value Ravg of the time domain distance pocDiffmin between each reference image in the preset reference image set corresponding to the image block to be processed and the image block to be processed, and the decoding end determines the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively based on the Ravg.

[0341] In some embodiments, the indication information in the bitstream includes preset reference image set information, and the preset reference image set information is used to indicate the preset reference image set in the reference image queue; the decoding end can determine the POC of the reference image of each reference image set in the multiple reference image sets corresponding to the image block to be processed according to the preset reference image set information. Furthermore, the decoding end determines the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the POC of the reference image corresponding to each reference image set.

[0342] In some embodiments, the indication information in the bitstream includes a weight indication bit of slice header information in the bitstream; and the decoding end determines the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indication bit of the slice header information.

[0343] It should be noted that the details of some implementation schemes for adaptively determining the weight coefficient combination {Mi, Ni} corresponding to the weighted prediction of the current block have been described in detail in the previous text and will not be repeated here for the sake of brevity.

[0344] S704: The decoding end weights the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block according to the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively, to obtain a prediction value (prediction image) of the current block.

[0345] For example, in one example, the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block may be weighted according to the formula (6) described above to obtain the prediction value (prediction image) of the current block.

[0346] In a possible embodiment, if the current block has no residual, the predicted image is the reconstructed image of the current block; if the current block has a residual, the residual information and the predicted image may be subsequently added to obtain the reconstructed image of the current block.

[0347] It can be seen that in the multi-hypothesis coding prediction process of joint intra-frame prediction coding and inter-frame prediction coding in the embodiment of the present invention, by parsing the information in the bitstream, the decoding end can adaptively determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively based on different encoding and decoding scenarios. On the one hand, it ensures the normal progress of multi-hypothesis coding in diversified scenarios, and on the other hand, it improves the accuracy of image prediction, thereby improving coding efficiency and performance.

[0348] Based on the above description, the weighted prediction method for multi-hypothesis coding provided by an embodiment of the present invention is described below from the perspective of the coding end. Fig.17 The method includes but is not limited to the following steps:

[0349] S801: The encoder determines a prediction mode of a to-be-processed image block (or current coding block, or current block) of a current image. The prediction mode is, for example, a multi-hypothesis coding prediction mode combining intra-frame prediction coding and inter-frame prediction coding.

[0350] For the inter-frame prediction at the encoding end, in a specific implementation, multiple inter-frame prediction modes can also be preset. The multiple intra-frame prediction modes include, for example, the merge mode or Inter MVP mode (specifically, such as AMVP mode) described above. The encoding end traverses the multiple inter-frame prediction modes to determine the inter-frame prediction mode that is optimal for predicting the current block.

[0351] In another specific implementation, only one inter-frame prediction mode may be preset. That is, in this case, the encoder directly determines that the default inter-frame prediction mode (for example, merge mode) is currently used.

[0352] For intra-frame prediction at the encoding end, in a specific implementation, an intra-frame candidate mode list can be preset, and the intra-frame candidate mode list includes multiple intra-frame prediction modes. The encoding end traverses the multiple intra-frame prediction modes to determine the intra-frame prediction mode that is optimal for predicting the current block.

[0353] In another specific implementation, only one intra-frame prediction mode may be preset. That is, in this case, the encoder directly determines that the default intra-frame prediction mode (for example, Planar mode) is currently used.

[0354] It should be noted that, for the inter-frame prediction mode, please refer to the detailed description in 1) above, and for the intra-frame prediction mode, please refer to the detailed description in 2) above. For the sake of brevity, they will not be repeated here.

[0355] S802: The encoding end determines weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively.

[0356] In some embodiments, the encoding end may determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the encoding configuration information corresponding to the image block to be processed.

[0357] In some embodiments, the encoding end can determine by calculation the minimum value Lmin or the maximum value Lmax or the average value Lavg of the nearest time domain distance pocDiffmin of multiple reference image sets corresponding to the image block to be processed, and then determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the Lmin or Lmax or Lavg.

[0358] In some embodiments, the encoding end can determine by calculation the average value Ravg of the time domain distance pocDiffmin between each reference image in a preset reference image set corresponding to the image block to be processed and the image block to be processed, and then determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the Ravg.

[0359] In some embodiments, the encoding end may determine the POC of the reference image of each reference image set in the multiple reference image sets corresponding to the image block to be processed, and then determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the POC of the reference image corresponding to each reference image set.

[0360] In some embodiments, the encoder may determine the weight coefficients corresponding to the inter prediction mode and the intra prediction mode respectively according to a preset algorithm. The preset algorithm may be, for example, an RD algorithm or a fast algorithm, or other algorithms, which are not limited here.

[0361] It should be noted that the details of some implementation schemes for adaptively determining the weight coefficient combination {Mi, Ni} corresponding to the weighted prediction of the current block have been described in detail in the previous text and will not be repeated here for the sake of brevity.

[0362] S803: The encoder encodes the indication information for indicating the weight coefficient in an implicit or explicit manner, as well as the identifier of the prediction mode, the syntax elements related to the prediction mode, etc. into the bitstream.

[0363] Wherein, in some embodiments, the indication information is used to determine the encoding configuration information corresponding to the image block to be processed. In some embodiments, the indication information is used to determine the minimum value Lmin or the maximum value Lmax or the average value Lavg of the nearest time domain distance pocDiffmin of multiple reference image sets corresponding to the image block to be processed. In some embodiments, the indication information is used to determine the average value Ravg of the time domain distance pocDiffmin between each reference image in the preset reference image set corresponding to the image block to be processed and the image block to be processed. In some embodiments, the indication information includes the weight indication bit of the slice header information.

[0364] It should be noted that the above embodiment only describes the process of implementing encoding and code stream transmission at the encoder. According to the above description, those skilled in the art understand that the encoder can also implement other methods described in the embodiments of the present invention in other links. For example, when the encoder predicts the current block, the specific implementation of the reconstruction process of the current block can refer to the related methods described above at the decoder (such as Fig.16 Embodiment), no further details are given here.

[0365] It can be seen that in the multi-hypothesis coding prediction process of combined intra-frame prediction coding and inter-frame prediction coding in the embodiment of the present invention, the encoding end can adaptively determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively based on different encoding and decoding scenarios. On the one hand, it ensures the normal progress of multi-hypothesis coding in diversified scenarios, and on the other hand, it improves the accuracy of image prediction and improves coding efficiency and performance.

[0366] See also Fig.18 Based on the same inventive concept as the above method, an embodiment of the present invention further provides a device 1000,

[0367] The device 1000 includes a first prediction module 1001 , a second prediction module 1002 , a weight coefficient determination module 1003 and a third prediction module 1004 .

[0368] in:

[0369] A first prediction module 1001, configured to determine a first target prediction block of a to-be-processed image block according to an inter-frame prediction mode;

[0370] A second prediction module 1002, configured to determine a second target prediction block of the image block to be processed according to an intra-frame prediction mode;

[0371] The weight coefficient determination module 1003 is used to determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the indication information in the bit stream;

[0372] The third prediction module 1004 is used to weight the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block according to the weight coefficient to obtain the prediction value of the image block to be processed.

[0373] The specific implementation of the first prediction module 1001, the second prediction module 1002, the weight coefficient determination module 1003 and the third prediction module 1004 can be referred to. Fig.16 , Fig.17 For the sake of brevity, the related descriptions of the previous embodiments are not repeated here.

[0374] The indication information corresponds to different weight coefficient combinations in different situations; wherein the weight coefficient combination includes weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively.

[0375] In some possible embodiments, the indication information includes reference image queue information; the reference image queue information is used to indicate a reference image queue corresponding to the image block to be processed;

[0376] The weight coefficient determination module 1003 is specifically used to: determine the encoding configuration information corresponding to the image block to be processed according to the reference image queue information; determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the encoding configuration information corresponding to the image block to be processed.

[0377] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the encoding configuration information corresponding to the image block to be processed indicates one of a low delay configuration, a P slice only configuration or a B slice only configuration, determine that the weight coefficient corresponding to the inter-frame prediction mode is different from the weight coefficient corresponding to the intra-frame prediction mode, which is M1 and N1.

[0378] In some possible embodiments, the weight coefficient corresponding to the inter-frame prediction mode is greater than the weight coefficient corresponding to the intra-frame prediction mode.

[0379] In some possible embodiments, the indication information includes reference image queue information; the reference image queue information is used to indicate a reference image queue corresponding to the image block to be processed;

[0380] The reference image queue information is used to indicate a reference image queue corresponding to the image block to be processed; the reference image queue includes at least one reference image set, and each reference image set in the at least one reference image set includes at least one reference image;

[0381] The weight coefficient determination module 1003 is specifically used to: determine the time domain distance between each reference image of the at least one reference image in each reference image set and the image block to be processed; determine the smallest value of the time domain distances respectively corresponding to the at least one reference image in each reference image set as the shortest time domain distance of each reference image set;

[0382] The weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined according to the shortest time domain distance of each reference image set in the multiple reference image sets.

[0383] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the smallest of the nearest time domain distances corresponding to each reference image set in the multiple reference image sets.

[0384] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the smallest of the closest time domain distances corresponding to each reference image set is less than or equal to a first preset value, set the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M1 and N1 respectively;

[0385] When the minimum of the closest time domain distances respectively corresponding to the reference image sets is greater than a first preset value and less than or equal to a second preset value, the weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to be M2 and N2 respectively;

[0386] Among them, the first preset value is smaller than the second preset value, the ratio of M1 to N1 is smaller than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0387] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the maximum of the nearest time domain distances corresponding to each reference image set.

[0388] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the maximum of the closest time domain distances corresponding to each reference image set is less than or equal to a first preset value, set the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M1 and N1 respectively;

[0389] When the maximum of the closest time domain distances respectively corresponding to the reference image sets is greater than a first preset value and less than or equal to a second preset value, the weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to be M2 and N2 respectively;

[0390] Among them, the first preset value is smaller than the second preset value, the ratio of M1 to N1 is smaller than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0391] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the average values ​​of the nearest time domain distances corresponding to the respective reference image sets.

[0392] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the average values ​​of the closest time domain distances respectively corresponding to the reference image sets are less than or equal to a first preset value, set the weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M1 and N1 respectively;

[0393] When the average values ​​of the closest time domain distances respectively corresponding to the reference image sets are greater than a first preset value and less than or equal to a second preset value, the weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to be M2 and N2 respectively;

[0394] Among them, the first preset value is smaller than the second preset value, the ratio of M1 to N1 is smaller than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0395] In some possible embodiments, the indication information includes preset reference image set information, and the preset reference image set information is used to indicate a preset reference image set in a reference image queue;

[0396] The weight coefficient determination module 1003 is specifically used to: determine the time domain distance between each reference image and the image block to be processed in the preset reference image set; and determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the average value of the time domain distances corresponding to each reference image.

[0397] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the average values ​​of the time domain distances respectively corresponding to the reference images are less than or equal to a first preset value, set the weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M1 and N1 respectively;

[0398] When the average values ​​of the time domain distances respectively corresponding to the reference images are greater than a first preset value and less than or equal to a second preset value, the weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to be M2 and N2 respectively;

[0399] Among them, the first preset value is smaller than the second preset value, the ratio of M1 to N1 is smaller than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0400] In some possible embodiments, the indication information in the code stream includes reference image queue information; the reference image queue information is used to indicate a reference image queue corresponding to the image block to be processed; the reference image queue includes at least one reference image set, and each reference image set in the at least one reference image set includes at least one reference image.

[0401] The weight coefficient determination module 1003 is specifically used to: determine the image sequence number POC of each reference image in any reference image set;

[0402] The weight coefficients respectively corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined according to the POCs of the reference images respectively corresponding to the reference image sets.

[0403] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the multiple reference image sets each include only one reference image with the same POC, and the reference image with the same POC is located before the image block to be processed in the time domain, set the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M1 and N1 respectively;

[0404] In other cases except the above case, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to be M2 and N2 respectively;

[0405] Among them, the ratio of M1 to N1 is less than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0406] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when there are reference images with different POCs in the multiple reference image sets, and all reference images in all reference image sets are located before the image block to be processed in the time domain, set the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M2 and N2 respectively;

[0407] In other cases except the above case, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to be M1 and N1 respectively;

[0408] Among them, the ratio of M1 to N1 is less than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0409] In some possible embodiments, the indication information in the bitstream includes a weight indication bit of slice header information in the bitstream;

[0410] The weight coefficient determination module 1003 is specifically used to determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indicator bit of the slice header information.

[0411] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the weight indicator bit of the slice header information is a first indicator value, set the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M1 and N1 respectively;

[0412] When the weight indicator bit of the slice header information is a second indicator value, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are set to be M2 and N2 respectively;

[0413] Among them, the ratio of M1 to N1 is less than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0414] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the weight indicator bit of the slice header information is a first indicator value, determine the weight coefficient corresponding to the inter-frame prediction mode from a first set according to the first indicator value, and determine the weight coefficient corresponding to the intra-frame prediction mode from a second set;

[0415] When the weight indicator bit of the slice header information is a second indicator value, determining, according to the second indicator value, a weight coefficient corresponding to the inter-frame prediction mode from a first set, and determining a weight coefficient corresponding to the intra-frame prediction mode from a second set;

[0416] Among them, the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the first indicator value is smaller than the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the second indicator value.

[0417] In some possible embodiments, when there are reference images with different POCs in the multiple reference image sets, and all reference images in all reference image sets are located before the image block to be processed in the time domain, the first set includes M1 and M2, and the second set includes N1 and N2;

[0418] In other cases than the above case, the first set includes M3 and M4, and the second set includes N3 and N4;

[0419] Among them, the ratio of M1 to N1 is smaller than the ratio of M3 to N3, the ratio of M2 to N2 is smaller than the ratio of M4 to N4, and M1, M2, M3, M4, N1, N2, N3, and N4 are positive integers.

[0420] In some possible embodiments, the indication information in the bitstream includes a weight indication bit of the maximum coding unit (LCU) information in the bitstream;

[0421] The weight coefficient determination module 1003 is specifically used to determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight indication bit of the LCU information.

[0422] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the weight indicator bit of the LCU information is a third indicator value, set the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M1 and N1 respectively;

[0423] When the weight indicator bit of the LCU information is a fourth indicator value, setting the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode to be M2 and N2 respectively;

[0424] Among them, the ratio of M1 to N1 is less than the ratio of M2 to N2, and M1, M2, N1, and N2 are positive integers.

[0425] In some possible embodiments, the weight coefficient determination module 1003 is specifically used to: when the weight indicator bit of the LCU information is a third indicator value, determine the weight coefficient corresponding to the inter-frame prediction mode from a third set according to the third indicator value, and determine the weight coefficient corresponding to the intra-frame prediction mode from a fourth set;

[0426] When the weight indicator bit of the LCU information is a fourth indicator value, determining, according to the fourth indicator value, a weight coefficient corresponding to the inter-frame prediction mode from a third set, and determining a weight coefficient corresponding to the intra-frame prediction mode from a fourth set;

[0427] Among them, the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the third indicator value is smaller than the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the fourth indicator value.

[0428] In some possible embodiments, when there are reference images with different POCs in the multiple reference image sets, and all reference images in all reference image sets are located before the image block to be processed in the time domain, the third set includes M1 and M2, and the fourth set includes N1 and N2;

[0429] In other cases than the above case, the third set includes M3 and M4, and the fourth set includes N3 and N4;

[0430] Among them, the ratio of M1 to N1 is smaller than the ratio of M3 to N3, the ratio of M2 to N2 is smaller than the ratio of M4 to N4, and M1, M2, M3, M4, N1, N2, N3, and N4 are positive integers.

[0431] In some possible embodiments, the indication information in the code stream further includes a weight indication bit of slice header information in the code stream; when the weight indication bit of the slice header information is a first indication value, the third set includes M1 and M2, and the fourth set includes N1 and N2;

[0432] When the weight indicator bit of the slice header information is a second indicator value, the third set includes M3 and M4, and the fourth set includes N3 and N4;

[0433] Among them, the ratio of M1 to N1 is smaller than the ratio of M3 to N3, the ratio of M2 to N2 is smaller than the ratio of M4 to N4, and M1, M2, M3, M4, N1, N2, N3, and N4 are positive integers.

[0434] In some possible embodiments, the indication information in the bitstream includes a weight value indication bit of slice header information and a weight indication bit of coding unit (CU) information in the bitstream;

[0435] The weight coefficient determination module 1003 is specifically used to: determine the weight coefficient sets corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the weight value indicator bits of the slice header information; and determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively from the weight information set according to the weight value indicator bits of the CU information.

[0436] In some possible embodiments, according to the weight value indicator bit of the slice header information, it is determined that the weight coefficient set corresponding to the inter-frame prediction mode is the fifth set, and the weight coefficient set corresponding to the intra-frame prediction mode is the sixth set;

[0437] The weight coefficient determination module 1003 is specifically used to: when the weight indicator bit of the CU information is a fifth indicator value, determine the weight coefficient corresponding to the inter-frame prediction mode from the fifth set according to the fifth indicator value, and determine the weight coefficient corresponding to the intra-frame prediction mode from the sixth set;

[0438] When the weight indicator bit of the CU information is a sixth indicator value, determining, according to the sixth indicator value, a weight coefficient corresponding to the inter prediction mode from the fifth set, and determining a weight coefficient corresponding to the intra prediction mode from the sixth set;

[0439] Among them, the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the fifth indicator value is smaller than the ratio of the weight coefficients of the inter-frame prediction mode to the intra-frame prediction mode determined according to the sixth indicator value.

[0440] In some possible embodiments, the indication information in the bitstream further includes a weight indication bit of slice header information in the bitstream;

[0441] When the weight indicator bit of the slice header information is a first indicator value, the fifth set includes M1 and M2, and the sixth set includes N1 and N2; when the weight indicator bit of the slice header information is a second indicator value, the fifth set includes M3 and M4, and the sixth set includes N3 and N4;

[0442] Among them, the ratio of M1 to N1 is smaller than the ratio of M3 to N3, the ratio of M2 to N2 is smaller than the ratio of M4 to N4, and M1, M2, M3, M4, N1, N2, N3, and N4 are positive integers.

[0443] In some possible embodiments, the inter-frame prediction mode is a Merge mode.

[0444] In some possible embodiments, the intra-frame prediction mode is a planar mode.

[0445] It should be noted that the specific implementation of the first prediction module 1001, the second prediction module 1002, the weight coefficient determination module 1003 and the third prediction module 1004 can be referred to Fig.16 , Fig.17 For the sake of brevity, the related descriptions of the previous embodiments are not repeated here.

[0446] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any communication media that facilitates the transfer of computer programs from one place to another (e.g., according to a communication protocol). In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in the present invention. A computer program product may include a computer-readable medium.

[0447] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0448] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.

[0449] The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices for performing the disclosed techniques, but do not necessarily require implementation by different hardware units. In fact, as described above, the various units may be combined in a codec hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).

[0450] In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0451] The above is only an exemplary embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A weighted predictive decoding method for multi-hypothesis coding, characterized in that: include: Parse the instruction information in the code stream; Determine a first target prediction block of the image block to be processed according to only one preset inter-frame prediction mode, wherein the only preset inter-frame prediction mode is a Merge mode; Determine a second target prediction block of the image block to be processed according to only one preset intra-frame prediction mode, wherein the only preset intra-frame prediction mode is a Planar mode; Determining weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively in an implicit manner according to the indication information in the bitstream; The pixel value of the first target prediction block and the pixel value of the second target prediction block are weighted according to the weight coefficient to obtain the prediction value of the image block to be processed.

2. The method according to claim 1, characterized in that The indication information corresponds to different weight coefficient combinations in different situations; wherein the weight coefficient combination includes weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively.

3. The method according to claim 1 or 2, characterized in that: The indication information in the bitstream includes a weight indication bit of the slice header information in the bitstream; Correspondingly, determining the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the indication information in the bitstream includes: The weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined according to the weight indicator bit of the slice header information.

4. The method according to claim 1 or 2, characterized in that: The indication information in the bitstream includes a weight value indication bit of slice header information and a weight indication bit of coding unit (CU) information in the bitstream; Correspondingly, determining the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively according to the indication information in the bitstream includes: Determining, according to the weight value indicator bit of the slice header information, weight coefficient sets corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively; According to the weight value indicator bit of the CU information, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined from the weight information set respectively.

5. A decoding device, characterized in that: include: A first prediction module, used for parsing indication information in a bit stream; A second prediction module, used to determine a first target prediction block of the image block to be processed according to only one preset inter-frame prediction mode, wherein the only preset inter-frame prediction mode is a Merge mode; A third prediction module, used for determining a second target prediction block of the image block to be processed according to only one preset intra-frame prediction mode, wherein the only preset intra-frame prediction mode is a Planar mode; A weight coefficient determination module, used to determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively in an implicit manner according to the indication information in the bit stream; The fourth prediction module is used to weight the pixel value of the first target prediction block and the pixel value of the second target prediction block according to the weight coefficient to obtain the prediction value of the image block to be processed.

6. The device according to claim 5, characterized in that The indication information corresponds to different weight coefficient combinations in different situations; wherein the weight coefficient combination includes weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode, respectively.

7. The device according to claim 5 or 6, characterized in that The indication information includes reference image queue information; the reference image queue information is used to indicate the reference image queue corresponding to the image block to be processed; the reference image queue includes at least one reference image set, wherein each reference image set includes at least one reference image; The weight coefficient determination module is specifically used for: In any reference image set, determining the time domain distance between each reference image and the image block to be processed, and determining the minimum time domain distance as the shortest time domain distance of any reference image set; The weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined according to the closest time domain distances corresponding to each reference image set.

8. The device according to claim 5 or 6, characterized in that The indication information in the bitstream includes a weight value indication bit of slice header information and a weight indication bit of coding unit (CU) information in the bitstream; The weight coefficient determination module is specifically used for: Determining, according to the weight value indicator bit of the slice header information, weight coefficient sets corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively; According to the weight value indicator bit of the CU information, the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode are determined from the weight information set respectively.

9. A weighted predictive coding method for multi-hypothesis coding, characterized in that: include: Determine a first target prediction block of the image block to be processed according to only one preset inter-frame prediction mode, wherein the only preset inter-frame prediction mode is a Merge mode; Determine a second target prediction block of the image block to be processed according to only one preset intra-frame prediction mode, wherein the only preset intra-frame prediction mode is a Planar mode; According to the indication information, determining weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively in an implicit manner; Weighting the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block according to the weight coefficient to obtain a prediction value of the image block to be processed; The indication information is encoded into a bitstream.

10. A coding device, characterized in that: include: A first prediction module, used for determining a first target prediction block of a to-be-processed image block according to only one preset inter-frame prediction mode, wherein the only preset inter-frame prediction mode is a Merge mode; A second prediction module, used for determining a second target prediction block of the image block to be processed according to only one preset intra-frame prediction mode, wherein the only preset intra-frame prediction mode is a Planar mode; A weight coefficient determination module, used to determine the weight coefficients corresponding to the inter-frame prediction mode and the intra-frame prediction mode respectively in an implicit manner according to the indication information; a third prediction module, configured to weight the pixel values ​​of the first target prediction block and the pixel values ​​of the second target prediction block according to the weight coefficient to obtain a prediction value of the image block to be processed; The fourth encoding module is used to encode the indication information into a bit stream.

11. A video decoding device, characterized in that: The device comprises: a non-volatile memory and a processor coupled to each other, wherein the processor calls a program code stored in the memory to execute the method according to any one of claims 1 to 4.

12. A computer-readable storage medium, characterized in that: The invention comprises a code stream containing computer program instructions, wherein when the computer program instructions are executed by one or more processors, the decoder performs the decoding method according to any one of claims 1 to 4.

13. A device for storing a code stream, characterized in that: The method comprises a storage medium and a communication interface, wherein the communication interface is used to receive a code stream, wherein the code stream comprises indication information, wherein the indication information is used to determine weight coefficients corresponding to only one preset inter-frame prediction mode and only one preset intra-frame prediction mode respectively in an implicit manner, wherein the inter-frame prediction mode is used to determine a first target prediction block of an image block to be processed, and is a Merge mode, wherein the intra-frame prediction mode is used to determine a second target prediction block of the image block to be processed, and the intra-frame prediction mode is a Planar mode, and wherein the weight coefficient is used to weight pixel values ​​of the first target prediction block and pixel values ​​of the second target prediction block to obtain a prediction value of the image block to be processed; The storage medium is used to store the code stream.