Combined inter and intra prediction method and apparatus, and terminal and readable storage medium
By constructing an intra prediction mode list and determining the target intra prediction mode, the problem of limited intra prediction modes in joint inter-frame prediction is solved, and prediction accuracy and video coding efficiency are improved.
Patent Information
- Application Number
- PCT/CN2024/086561
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-14
- Filing Date
- 2024-04-08
- Publication Date
- 2024-10-17
AI Technical Summary
In Versatile Video Coding (VVC), the intra prediction mode of the joint inter-frame mode is limited, resulting in low accuracy of prediction results and the inability to effectively handle the diverse textures of images in real video scenes.
By constructing an intra prediction mode list, the target intra prediction mode is determined, and joint inter prediction is performed based on this mode to increase the flexibility and selectivity of the intra prediction mode.
It improves the accuracy of joint inter-frame and intra-frame prediction, better reflects the image diversity in real video scenes, and improves video coding efficiency.
Smart Images

Figure CN2024086561_17102024_PF_FP_ABST
Abstract
Description
Joint inter-frame and intra-frame prediction method, device, terminal and readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese Patent Application No. 20231040869.4 filed in China on April 14, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application belongs to the field of video coding and decoding technology, and specifically relates to a joint inter-frame and intra-frame prediction method, device, terminal and readable storage medium. Background Art
[0004] In Versatile Video Coding (VVC), combined inter and intra prediction (CIIP) combines inter prediction signals with intra prediction signals. VCC has 67 intra prediction modes, and the next-generation compression standard expands the number of intra prediction modes to 131. However, in related art combined inter and intra prediction methods, intra prediction modes are typically limited to specific modes. This restricts the intra prediction modes in combined inter and intra prediction methods, making them unable to effectively handle the diverse textures of images in real video scenes, resulting in low accuracy in combined inter and intra prediction results.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a joint inter-frame and intra-frame prediction method, apparatus, terminal, and readable storage medium, which can solve the problem of low accuracy of joint inter-frame and intra-frame prediction results in related technologies.
[0007] In a first aspect, a joint inter-frame and intra-frame prediction method is provided, which is applied to an encoding end or a decoding end, and the method includes:
[0008] Constructing an intra-frame prediction mode list, where the intra-frame prediction mode list includes N intra-frame prediction modes, where N is an integer greater than or equal to 1;
[0009] determining a target intra prediction mode based on the intra prediction mode list, wherein the N intra prediction modes include the target intra prediction mode;
[0010] Performing joint inter-frame and intra-frame prediction on the target image block based on the target intra-frame prediction mode.
[0011] In a second aspect, a joint inter-frame and intra-frame prediction apparatus is provided, comprising:
[0012] A construction module, configured to construct an intra-frame prediction mode list, wherein the intra-frame prediction mode list includes N intra-frame prediction modes, where N is an integer greater than or equal to 1;
[0013] a determining module, configured to determine a target intra prediction mode based on the intra prediction mode list, wherein the N intra prediction modes include the target intra prediction mode;
[0014] A prediction module is configured to perform joint inter-frame and intra-frame prediction on a target image block based on the target intra-frame prediction mode.
[0015] In a third aspect, a terminal is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0016] In a fourth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In a fifth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is configured to run a program or instruction to implement the method described in the first aspect.
[0018] In a sixth aspect, a computer program / program product is provided, wherein the computer program / program product is stored in a storage medium, and the program / program product is executed by at least one processor to implement the steps of the method described in the first aspect.
[0019] In an embodiment of the present application, by constructing an intra-frame prediction mode list, when it is necessary to perform joint inter-frame intra-frame prediction on the target image block, the target intra-frame prediction mode is determined from the intra-frame prediction mode list, and the target image block is subjected to joint inter-frame intra-frame prediction based on the target intra-frame prediction mode. In this way, in the joint inter-frame intra-frame prediction method, the intra-frame prediction mode is no longer restricted, making the selection of the intra-frame prediction mode more flexible, thereby helping to better derive the intra-frame prediction signal in the joint inter-frame intra-frame prediction, improve the prediction accuracy, and better reflect the diverse textures of images in real video scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] FIG1a is one of the ways of dividing image blocks in the related art;
[0021] FIG1b shows the second method of dividing image blocks in the related art;
[0022] FIG2 is a flowchart of a joint inter-frame and intra-frame prediction method provided by an embodiment of the present application;
[0023] FIG3a is a schematic diagram showing a preset mapping relationship between a motion vector candidate index and an intra-frame prediction mode list index according to an embodiment of the present application;
[0024] FIG3 b is a second schematic diagram of a preset mapping relationship between motion vector candidate indices and intra-frame prediction mode list indices according to an embodiment of the present application;
[0025] FIG4 is a schematic diagram of an inter-frame prediction template, an intra-frame prediction template, and reconstructed pixels in an embodiment of the present application;
[0026] FIG5 is a structural diagram of a joint inter-frame and intra-frame prediction device provided in an embodiment of the present application;
[0027] FIG6 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0028] FIG7 is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0030] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in this application represents at least one of the connected objects. For example, "A or B" covers three options, namely, Option 1: including A but not including B; Option 2: including B but not including A; Option 3: including both A and B. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0031] The term "indication" in this application can be either a direct indication (or explicit indication) or an indirect indication (or implicit indication). A direct indication can be understood as the sender explicitly informing the receiver of specific information, the operation to be performed, or the requested result, etc. in the instruction sent; an indirect indication can be understood as the receiver determining the corresponding information based on the instruction sent by the sender, or making a judgment and determining the operation to be performed or the requested result, etc. based on the judgment result.
[0032] For better understanding, the following explains relevant concepts that may be involved in the embodiments of this application.
[0033] Combined inter and intra prediction (CIIP):
[0034] In VVC, CIIP prediction combines the inter-frame prediction signal with the intra-frame prediction signal. inter is derived using the same inter-frame prediction applied to the regular Merge mode; the intra-frame prediction signal P intra is derived from the planar mode in conventional intra prediction. The intra and inter prediction signals are then combined using a weighted average, where the weights wt are calculated based on the coding modes of the top and left neighboring blocks. The CIIP prediction is shown below: CIIP =((4-wt)*P inter +wt*P intra +2)>>2
[0035] In the preliminary research of the next generation compression standard, the CIIP mode was proposed to generate prediction samples by weighting the inter-frame prediction signal derived using the CIIP™ Merge mode and the intra-frame prediction signal derived using the TIMD intra-frame prediction mode. This method is only applicable to coding blocks with an area of 1024 or less.
[0036] The template-based intra mode derivation (TIMD) method is used to derive intra prediction modes in CIIP. Specifically, the intra prediction mode with the smallest absolute transformed differences (SATD) value in the TIMD mode list is selected and mapped to one of 67 conventional intra prediction models.
[0037] In addition, it is proposed that if the derived intra prediction mode is an angular mode, the weights of the two tests (wIntra, wInter) are modified. For nearly horizontal mode (2≤angular mode index <34), the current block is split vertically, as shown in Figure 1(a); for nearly vertical mode (34≤angular mode index≤66), the current block is split horizontally, as shown in Figure 1(b).
[0038] The sub-block weights of the angle mode are shown in Table 1 below.
[0039] Table 1. Sub-block weights for angle mode
[0040] Conventional intra prediction mode:
[0041] In VVC, conventional intra-frame prediction modes include 67 prediction modes such as DC, planar and angular prediction modes. These modes use the encoded or decoded reconstructed pixels adjacent to the current coding unit as reference pixels, and calculate the predicted pixels through a preset model.
[0042] Merge mode:
[0043] In the regular merge mode, a motion information candidate list is created. The maximum number of regular merge candidates is 15.
[0044] The CIIP-TM Merge mode also creates a candidate list, which is then optimized using template matching and re-ranked using the ARMC method. The maximum number of CIIP-TM Merge candidates is 2.
[0045] Template-based intra mode derivation (TIMD):
[0046] TIMD mode is also a technology for implicitly deriving intra-frame prediction modes. At the decoding end, if TIMD mode is true, for each candidate mode in the most likely intra-frame prediction mode (MPM) list, the reference pixels of the template are used to generate the predicted pixels of the template. The template described here is composed of the decoded reconstructed pixels adjacent to the current coding block to be decoded, which may include: one row / several rows above, and one column / several columns to the left. The cost is calculated as the sum of the absolute transformed differences (SATD) between the predicted samples and the reconstructed samples of the template. One or more intra-frame prediction modes with the minimum cost are selected as the intra-frame prediction mode for prediction.
[0047] MPM:
[0048] MPM is a technique for explicitly deriving intra-frame prediction modes. Taking into account the strong correlation between the current prediction block and its neighboring blocks, the prediction modes of the neighboring blocks are used to construct a list of the most likely intra-frame prediction mode candidates. If the optimal prediction mode is in the list, only its index in the list needs to be written into the bitstream, saving the number of bits required to encode the intra-frame prediction mode.
[0049] Luma mapping and chroma scaling (LMCS):
[0050] LMCS improves compression efficiency by redistributing codewords across the dynamic range. It consists of two components: luminance mapping based on an adaptive piecewise linear model and luminance-based chrominance residual scaling. Luminance mapping, applied at the pixel level, improves video coding efficiency by fully utilizing the luminance range and photoelectric conversion characteristics. Chroma scaling, applied at the chrominance block level, compensates for the effects of luminance signal mapping on chrominance signals. Therefore, pixels can be in either the original domain or the mapped domain.
[0051] The following describes in detail the joint inter-frame and intra-frame prediction method, apparatus, and related devices provided by the embodiments of the present application through some embodiments and their application scenarios in conjunction with the accompanying drawings.
[0052] Please refer to Figure 2, which is a flowchart of a joint inter-frame and intra-frame prediction method provided by an embodiment of the present application, and the method is applied to the encoding end or the decoding end. As shown in Figure 2, the method includes the following steps:
[0053] Step 201: Construct an intra-frame prediction mode list, where the intra-frame prediction mode list includes N intra-frame prediction modes, where N is an integer greater than or equal to 1.
[0054] It should be noted that in order to better understand the technical solution of the embodiment of the present application, the specific implementation process of the embodiment of the present application will be described below using the execution of the method by the encoding end as an example, but it does not constitute a limitation on the execution subject of the embodiment of the present application.
[0055] In an embodiment of the present application, the encoder constructs an intra-frame prediction mode list. For example, the encoder can construct the intra-frame prediction mode list based on all or part of the existing intra-frame prediction modes, and the intra-frame prediction mode list includes at least one intra-frame prediction mode.
[0056] Optionally, the intra-frame prediction mode list may further include an intra-frame prediction mode list index, and one intra-frame prediction mode list index corresponds to one intra-frame prediction mode, that is, a one-to-one correspondence between the intra-frame prediction mode list index and the intra-frame prediction mode is established.
[0057] Optionally, the N intra-frame prediction modes in the intra-frame prediction mode list are arranged based on preset rules, that is, the N intra-frame prediction modes can be sorted. The intra-frame prediction mode list can be a preset mode list, or it can be based on the correlation between the current image block and the surrounding neighboring blocks, and a most likely intra-frame prediction mode list is constructed based on the prediction mode of the neighboring blocks. It should be noted that if the optimal prediction mode is included in the list, the index of the prediction mode in the list can be written into the code stream, and then the encoding end can directly determine the corresponding intra-frame prediction mode based on the index, so that intra-frame prediction is performed through the intra-frame prediction mode, which can effectively save the number of bits required for encoding the intra-frame prediction mode.
[0058] Optionally, constructing the intra prediction mode list includes:
[0059] Determining an intra-frame prediction template according to the target image block;
[0060] Obtaining M intra-frame prediction values obtained by performing intra-frame prediction on the intra-frame prediction template based on M intra-frame prediction modes, where M is an integer greater than or equal to N;
[0061] Obtaining N intra-frame prediction modes corresponding to N intra-frame prediction values whose cost with the reconstructed value of the template corresponding to the target image block is less than a preset value among the M intra-frame prediction values;
[0062] An intra prediction mode list is constructed based on the N intra prediction modes.
[0063] It should be noted that the intra-frame prediction template is determined according to the target image block, which can be determined based on the adjacent encoded image blocks of the target image block. For example, these image blocks can be used as intra-frame prediction blocks, and the upper row or rows and the left column or columns of the intra-frame prediction block can be used as intra-frame prediction templates.
[0064] Optionally, the M intra-frame prediction modes can be randomly selected from known intra-frame prediction modes, or all known intra-frame prediction modes can be selected. Intra-frame prediction is performed on the intra-frame prediction template based on the M intra-frame prediction modes, thereby obtaining M intra-frame prediction values; obtaining N intra-frame plate prediction values with a cost less than a preset value between the M intra-frame prediction values and the reconstruction value of the template corresponding to the target image block, can be obtaining the first N intra-frame plate prediction values with the smallest cost between the reconstruction value and the template corresponding to the target image block, obtaining N intra-frame prediction modes for these N intra-frame prediction values, and constructing an intra-frame prediction mode list based on these N intra-frame prediction modes, that is, the constructed intra-frame prediction mode list includes these N intra-frame prediction modes.
[0065] Optionally, the N intra prediction modes in the intra prediction mode list may be arranged based on certain rules, for example, they may be arranged in ascending order of the cost between the intra prediction value and the reconstruction value of the template corresponding to the target image block.
[0066] Step 202: Determine a target intra prediction mode based on the intra prediction mode list, where the N intra prediction modes include the target intra prediction mode.
[0067] In an embodiment of the present application, after constructing the intra-frame prediction mode list, the encoder may select an intra-frame prediction mode from the intra-frame prediction mode list as the target intra-frame prediction mode. For example, an intra-frame prediction mode may be randomly selected from the intra-frame prediction mode list as the target intra-frame prediction mode, or the target intra-frame prediction mode may be selected based on a certain selection rule. For example, in the case of including an intra-frame prediction mode list index, an intra-frame prediction mode whose intra-frame prediction mode list index is a certain value may be selected as the target intra-frame prediction mode, and so on. Of course, the target intra-frame prediction mode may also be determined in other possible ways, which are not listed in detail here.
[0068] Step 203: Perform joint inter-frame and intra-frame prediction on the target image block based on the target intra-frame prediction mode.
[0069] After determining the target intra-frame prediction mode, the encoder performs joint inter-frame and intra-frame prediction on the target image block (also referred to as a coding unit, current coding block, etc.) based on the target intra-frame prediction mode. It should be noted that the joint inter-frame and intra-frame prediction includes inter-frame prediction and intra-frame prediction. The intra-frame prediction is performed using the determined target intra-frame prediction mode. The inter-frame prediction mode is not specifically limited in the embodiments of the present application and can be, for example, a Merge mode.
[0070] It can be understood that the encoding end performs inter-frame prediction on the target image block using the inter-frame prediction mode to obtain an inter-frame prediction value, and performs intra-frame prediction on the target image block using the target intra-frame prediction mode to obtain an intra-frame prediction value. Furthermore, based on the inter-frame prediction value and the intra-frame prediction value, a final prediction value of the target image block is calculated, that is, the result of performing joint inter-frame and intra-frame prediction on the target image block is obtained. The specific implementation process of obtaining the final prediction value of the target image block based on the inter-frame prediction value and the intra-frame prediction value can be referred to in related technologies.
[0071] In an embodiment of the present application, by constructing an intra-frame prediction mode list, when it is necessary to perform joint inter-frame intra-frame prediction on the target image block, the target intra-frame prediction mode is determined from the intra-frame prediction mode list, and the target image block is subjected to joint inter-frame intra-frame prediction based on the target intra-frame prediction mode. In this way, in the joint inter-frame intra-frame prediction method, the intra-frame prediction mode is no longer restricted, making the selection of the intra-frame prediction mode more flexible, thereby helping to better derive the intra-frame prediction signal in the joint inter-frame intra-frame prediction, improve the prediction accuracy, and better reflect the diverse textures of images in real video scenes.
[0072] Optionally, the method further includes:
[0073] Get the motion vector candidate index of the joint inter-frame and intra-frame modes from the code stream.
[0074] It should be noted that the code stream may be an encoded code stream or a decoded code stream. For example, when the method is applied to the encoding end, the motion vector candidate index of the joint inter-frame and intra-frame modes is obtained from the encoded code stream.
[0075] In the embodiment of the present application, the motion vector candidate index includes a Merge candidate index and other inter-frame prediction mode indexes. Motion vector information can be determined based on the motion vector candidate index, and inter-frame prediction of the target image block can be achieved through the motion vector information. Furthermore, the inter-frame prediction value of the target image block can be obtained through the motion vector candidate index.
[0076] Optionally, step 203 includes:
[0077] Acquire an inter-frame prediction value of a target image block based on the motion vector candidate index, and acquire an intra-frame prediction value of the target image block based on the target intra-frame prediction mode;
[0078] A target prediction value of the target image block is obtained based on the inter-frame prediction value and the intra-frame prediction value.
[0079] In an embodiment of the present application, after obtaining a motion vector candidate index for a joint inter-frame and intra-frame mode from a bitstream, motion vector information is determined based on the motion vector candidate index, and inter-frame prediction is performed on the target image block using the motion vector information, thereby obtaining an inter-frame prediction value for the target image block. Simultaneously, based on a target intra-frame prediction mode determined from an intra-frame prediction mode list, intra-frame prediction is performed on the target image block to obtain an intra-frame prediction value. Furthermore, a target prediction value for the target image block is obtained based on the inter-frame prediction value and the intra-frame prediction value, which is also the final prediction value for the joint inter-frame and intra-frame prediction.
[0080] Optionally, the acquiring the target prediction value of the target image block based on the inter-frame prediction value and the intra-frame prediction value includes any one of the following:
[0081] Combining the inter-frame prediction value and the intra-frame prediction value based on weighted average to obtain a target prediction value of the target image block;
[0082] The inter-frame prediction value and the intra-frame prediction value are combined based on a linear model or a nonlinear model to obtain a target prediction value of the target image block.
[0083] For example, after obtaining the inter-frame prediction value and intra-frame prediction value of the target image block through inter-frame prediction and intra-frame prediction respectively, the inter-frame prediction value and the intra-frame prediction value can be combined based on a weighted average method to obtain the final target prediction value. Exemplarily, the weight value can be calculated based on the coding mode of the adjacent coded image blocks at the top and left of the target image block, and then the target prediction value is calculated using the following formula: CIIP =((4-wt)*P inter +wt*P intra +2)>>2
[0084] Among them, P CIIP is the target prediction value, P inter is the inter-frame prediction value, P intra is the intra-frame prediction value, and wt is the weight value.
[0085] Alternatively, after obtaining the inter-frame prediction value and the intra-frame prediction value of the target image block through inter-frame prediction and intra-frame prediction, respectively, the inter-frame prediction value and the intra-frame prediction value may be combined through a linear model or a nonlinear model to obtain a final target prediction value. The linear model or the nonlinear model may be a pre-built model.
[0086] For example, when the inter-frame prediction value and the intra-frame prediction value are combined by a linear model, in this case, the target prediction value of the target image block can be determined by Formula 1. Formula 1, pred C (i,j)=α0·pred′0(i,j)+α1·pred′1(i,j)+α2·midValue;
[0087] Among them, pred C (i, j) represents the target prediction value of the target image block; α0, α1, and α2 represent model parameters; pred′0(i, j) represents the inter-frame prediction value of the target image block; pred′1(i, j) represents the intra-frame prediction value of the target image block; and midValue represents the median value corresponding to the target image block. midValue is determined by the video bit depth (optional, for 10-bit depth, midValue = 512, or no midValue is required).
[0088] For example, when the inter-frame prediction value and the intra-frame prediction value are combined by a nonlinear model, in this case, the target prediction value of the target image block can be determined by Formula 2. Formula 2, pred C (i,j)=α0·(((pred′0(i,j)) 2+midValue)>>bitDepth)+α1·pred′0(i,j)+α2·pred′1(i,j)+α3·midValue;
[0089] Among them, pred C (i, j) represents the target prediction value of the target image block; α0, α1, α2 and α3 represent model parameters; pred′0(i, j) represents the inter-frame prediction value of the target image block; pred′1(i, j) represents the intra-frame prediction value of the target image block; midValue represents the median value corresponding to the target image block; bitDepth represents the video bit depth corresponding to the target image block.
[0090] It should be noted that the above median is associated with the above video bit depth. Optionally, when the video bit depth is 10, the median is 512. Of course, midValue may not exist in the above formulas 1 and 2, that is, the value of midValue is 0.
[0091] In an embodiment of the present application, the intra-frame prediction mode list includes N intra-frame prediction mode list indexes, and the N intra-frame prediction mode list indexes correspond one-to-one to the N intra-frame prediction modes. Optionally, determining the target intra-frame prediction mode based on the intra-frame prediction mode list includes:
[0092] Based on the mapping relationship between the motion vector candidate index and the intra prediction mode list index, a target intra prediction mode corresponding to the motion vector candidate index in the intra prediction mode list is obtained.
[0093] It should be noted that the encoding end may pre-construct a mapping relationship between motion vector candidate indices and intra-frame prediction mode list indices. Optionally, the mapping relationship between the motion vector candidate indices and the intra-frame prediction mode list indices may be one-to-one, one-to-many, or many-to-one. As shown in FIG3a , one motion vector candidate index may correspond to one intra-frame prediction mode list index; or, as shown in FIG3b , the mapping relationship between the motion vector candidate indices and the intra-frame prediction mode list indices may include one-to-one and many-to-one.
[0094] Specifically, after obtaining the motion vector candidate index of the joint inter-frame intra-frame mode from the code stream, the intra-frame prediction mode list index corresponding to the motion vector candidate index is determined according to the mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index, and then the intra-frame prediction mode corresponding to the intra-frame prediction mode list index is obtained. The intra-frame prediction mode is also the target intra-frame prediction mode, so that the target image block is jointly inter-frame and intra-frame prediction is performed based on the target intra-frame prediction mode.
[0095] In the embodiments of the present application, by establishing a mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index, the target intra-frame prediction mode corresponding to the motion vector candidate index can be quickly determined based on the mapping relationship, which helps improve the processing efficiency of joint inter-frame and intra-frame prediction. Furthermore, only the motion vector candidate index needs to be transmitted in the bitstream, and the corresponding intra-frame prediction mode can be determined based on the index, thereby effectively reducing the bitstream transmission pressure.
[0096] Optionally, the method further includes:
[0097] Obtaining a first identifier from the code stream;
[0098] The acquiring, based on the mapping relationship between the motion vector candidate index and the intra prediction mode list index, the target intra prediction mode corresponding to the motion vector candidate index in the intra prediction mode list includes:
[0099] Based on the first identifier, a mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index is obtained, and a target intra-frame prediction mode corresponding to the motion vector candidate index in the intra-frame prediction mode list is obtained.
[0100] It should be noted that the first identifier may be used to indicate the existence of a mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index, and then the encoder can know the existence of a mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index based on the first identifier, thereby obtaining the mapping relationship, and obtaining the target intra-frame prediction mode corresponding to the motion vector candidate index based on the mapping relationship. Alternatively, the first identifier may also be used to instruct the encoder to execute the steps of obtaining the mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index, and obtaining the target intra-frame prediction mode corresponding to the motion vector candidate index in the intra-frame prediction mode list.
[0101] In an embodiment of the present application, if the first identifier is obtained from the code stream, it can be known that there is a mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index, so that the target intra-frame prediction mode can be quickly determined based on the mapping relationship and the motion vector candidate index, which helps to improve the processing efficiency of the joint inter-frame and intra-frame prediction.
[0102] Optionally, determining a target intra prediction mode based on the intra prediction mode list may further include:
[0103] Determine an inter-frame prediction template according to the target image block, and obtain an inter-frame prediction value for performing inter-frame prediction on the inter-frame prediction template based on the motion vector candidate index;
[0104] Determine an intra-frame prediction template according to the target image block, and obtain N intra-frame prediction values obtained by performing intra-frame prediction on the intra-frame prediction template based on the N intra-frame prediction modes in the intra-frame prediction mode list;
[0105] Combining the inter-frame prediction value with the N intra-frame prediction values in sequence to obtain N template prediction values;
[0106] A target intra-frame prediction mode is determined according to the N template prediction values.
[0107] It should be noted that the template may be composed of encoded or decoded reconstructed pixels adjacent to the current image block, and may include one or several rows above the current image block and one or several columns to the left of the current image block.
[0108] In the embodiment of the present application, an inter-frame prediction template is determined based on a target image block. For example, an adjacent, already-encoded inter-frame prediction block of the target image block may be obtained. As shown in FIG4 , the upper rows and left columns of the inter-frame prediction block are also the inter-frame prediction template. Based on a motion vector candidate index obtained from the bitstream, motion vector information corresponding to the motion vector candidate index is obtained. Inter-frame prediction is performed on the inter-frame prediction template based on the motion vector information to obtain an inter-frame prediction value.
[0109] Based on a similar principle, an adjacent, already-encoded intra-frame prediction block of the target image block is obtained, as shown in FIG4 . The upper rows and left columns of the intra-frame prediction block are the intra-frame prediction templates. Based on the constructed intra-frame prediction mode list, intra-frame predictions are performed on the intra-frame prediction templates using the N intra-frame prediction modes in the intra-frame prediction mode list. Each intra-frame prediction mode then obtains a corresponding intra-frame prediction value, i.e., N intra-frame prediction values are obtained.
[0110] Furthermore, the inter-frame prediction value is sequentially combined with the N intra-frame prediction values, that is, the inter-frame prediction value is combined with an intra-frame prediction value to obtain a template prediction value, thereby also obtaining N template prediction values, and the target intra-frame prediction mode is determined based on the N template prediction values. For example, the smallest template prediction value among the N template prediction values can be obtained, and the intra-frame prediction mode corresponding to the intra-frame prediction value obtained by combining the template prediction value is determined as the target intra-frame prediction mode. Finally, based on the determined target intra-frame prediction mode, the target image block is subjected to joint inter-frame and intra-frame prediction, that is, the target image block is subjected to inter-frame prediction using the inter-frame prediction mode to obtain an inter-frame prediction value, the target image block is subjected to intra-frame prediction using the selected target intra-frame prediction mode to obtain an intra-frame prediction value, and the final target prediction value is calculated based on the inter-frame prediction value and the intra-frame prediction value, that is, the prediction result of the joint inter-frame and intra-frame prediction on the target image block.
[0111] It should be noted that the inter-frame prediction value is sequentially combined with the N intra-frame prediction values, which can be based on a weighted average method, or can be based on a linear model or a nonlinear model, and is not specifically limited here.
[0112] Optionally, determining a target intra prediction mode according to the N template prediction values includes:
[0113] An intra-frame prediction mode corresponding to a template prediction value having the smallest cost with a reconstruction value of a template corresponding to the target image block among the N template prediction values is obtained, and the intra-frame prediction mode is determined as the target intra-frame prediction mode.
[0114] In the embodiment of the present application, after the inter-frame prediction value is sequentially combined with N intra-frame prediction values to obtain N template prediction values, the costs between each of the N template prediction values and the reconstructed value of the template corresponding to the target image block are calculated. The template prediction value with the lowest calculated cost is obtained, and the intra-frame prediction value corresponding to the template prediction value is obtained. The intra-frame prediction mode corresponding to the intra-frame prediction value is also the target intra-frame prediction mode. In this way, the target intra-frame prediction mode can be selected from the N intra-frame prediction modes based on a certain selection rule, which helps to improve the accuracy of the combined inter-frame and intra-frame prediction results.
[0115] The cost may refer to the sum of absolute transformed differences (SATD) between a template prediction value and a reconstructed value of the target image block corresponding to the template.
[0116] Optionally, the inter-frame prediction value corresponding to the inter-frame prediction template, the intra-frame prediction value corresponding to the intra-frame prediction template, and the reconstructed value of the template corresponding to the target image block are located in the same domain, such as the original domain or the mapping domain.
[0117] It should be noted that the original domain refers to the pixels corresponding to the unmapped image, also known as the pixel domain. The mapped domain refers to the domain where the pixels are located after the image is mapped.
[0118] Optionally, the method further includes:
[0119] Obtaining a second identifier from the code stream;
[0120] The obtaining of N intra-frame prediction values obtained by performing intra-frame prediction on the intra-frame prediction template based on the N intra-frame prediction modes in the intra-frame prediction mode list includes:
[0121] Based on the second identifier, N intra-frame prediction values obtained by performing intra-frame prediction on the intra-frame prediction template based on the N intra-frame prediction modes in the intra-frame prediction mode list are obtained.
[0122] It should be noted that the second identifier may be used to instruct to perform intra-frame prediction on the intra-frame prediction template based on the N intra-frame prediction modes in the intra-frame prediction mode list. Furthermore, when the second identifier is obtained from the bitstream, the step of performing intra-frame prediction on the intra-frame prediction template based on the N intra-frame prediction modes in the intra-frame prediction mode list can be performed based on the second identifier, thereby obtaining N intra-frame prediction values, and continuing to perform subsequent steps to determine the target intra-frame prediction mode.
[0123] In the embodiment of the present application, by obtaining the first identifier or the second identifier from the code stream, the corresponding process can be executed based on the first identifier or the second identifier, so as to select the target intra-frame prediction mode from the intra-frame prediction mode list in different ways, thereby making the selection of the intra-frame prediction mode in the joint inter-frame intra-frame prediction more flexible and also helping to improve the accuracy of the joint inter-frame intra-frame prediction result.
[0124] The joint inter-frame and intra-frame prediction method provided in the embodiment of the present application can be executed by a joint inter-frame and intra-frame prediction device. In the embodiment of the present application, the joint inter-frame and intra-frame prediction method is executed by the joint inter-frame and intra-frame prediction device as an example to illustrate the joint inter-frame and intra-frame prediction device provided in the embodiment of the present application.
[0125] Please refer to Figure 5, which is a structural diagram of a joint inter-frame and intra-frame prediction device provided in an embodiment of the present application, and the device is applied to an encoding end or a decoding end. As shown in Figure 5, the joint inter-frame and intra-frame prediction device 500 includes:
[0126] A construction module 501 is configured to construct an intra-frame prediction mode list, wherein the intra-frame prediction mode list includes N intra-frame prediction modes, where N is an integer greater than or equal to 1;
[0127] A determination module 502 is configured to determine a target intra prediction mode based on the intra prediction mode list, wherein the N intra prediction modes include the target intra prediction mode;
[0128] The prediction module 503 is configured to perform joint inter-frame and intra-frame prediction on the target image block based on the target intra-frame prediction mode.
[0129] Optionally, the device further comprises:
[0130] An acquisition module, configured to acquire a motion vector candidate index of a joint inter-frame and intra-frame mode from a bitstream;
[0131] The prediction module 503 is further configured to:
[0132] Acquire an inter-frame prediction value of a target image block based on the motion vector candidate index, and acquire an intra-frame prediction value of the target image block based on the target intra-frame prediction mode;
[0133] A target prediction value of the target image block is obtained based on the inter-frame prediction value and the intra-frame prediction value.
[0134] Optionally, the device further comprises:
[0135] An acquisition module, configured to acquire a motion vector candidate index of a joint inter-frame and intra-frame mode from a bitstream;
[0136] The determining module 502 is further configured to:
[0137] A target intra prediction mode is determined from the intra prediction mode list based on the motion vector candidate index.
[0138] Optionally, the intra prediction mode list includes N intra prediction mode list indexes, and the N intra prediction mode list indexes correspond one-to-one to the N intra prediction modes;
[0139] The determining module 502 is further configured to:
[0140] Based on the mapping relationship between the motion vector candidate index and the intra prediction mode list index, a target intra prediction mode corresponding to the motion vector candidate index in the intra prediction mode list is obtained.
[0141] Optionally, the acquisition module is further configured to:
[0142] Obtaining a first identifier from the code stream;
[0143] The determining module 502 is further configured to:
[0144] Based on the first identifier, a mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index is obtained, and a target intra-frame prediction mode corresponding to the motion vector candidate index in the intra-frame prediction mode list is obtained.
[0145] Optionally, the determining module 502 is further configured to:
[0146] Determine an inter-frame prediction template according to the target image block, and obtain an inter-frame prediction value for performing inter-frame prediction on the inter-frame prediction template based on the motion vector candidate index;
[0147] Determine an intra-frame prediction template according to the target image block, and obtain N intra-frame prediction values obtained by performing intra-frame prediction on the intra-frame prediction template based on the N intra-frame prediction modes in the intra-frame prediction mode list;
[0148] Combining the inter-frame prediction value with the N intra-frame prediction values in sequence to obtain N template prediction values;
[0149] A target intra-frame prediction mode is determined according to the N template prediction values.
[0150] Optionally, the determining module 502 is further configured to:
[0151] An intra-frame prediction mode corresponding to a template prediction value having the smallest cost with a reconstruction value of a template corresponding to the target image block among the N template prediction values is obtained, and the intra-frame prediction mode is determined as the target intra-frame prediction mode.
[0152] Optionally, the inter-frame prediction value corresponding to the inter-frame prediction template, the intra-frame prediction value corresponding to the intra-frame prediction template, and the reconstructed value of the template corresponding to the target image block are located in the same domain.
[0153] Optionally, the device further comprises:
[0154] Obtaining a second identifier from the code stream;
[0155] The determining module 502 is further configured to:
[0156] Based on the second identifier, N intra-frame prediction values obtained by performing intra-frame prediction on the intra-frame prediction template based on the N intra-frame prediction modes in the intra-frame prediction mode list are obtained.
[0157] Optionally, the prediction module 503 is further configured to perform any one of the following:
[0158] Combining the inter-frame prediction value and the intra-frame prediction value based on weighted average to obtain a target prediction value of the target image block;
[0159] The inter-frame prediction value and the intra-frame prediction value are combined based on a linear model or a nonlinear model to obtain a target prediction value of the target image block.
[0160] Optionally, the building module 501 is further configured to:
[0161] Determining an intra-frame prediction template according to the target image block;
[0162] Obtaining M intra-frame prediction values obtained by performing intra-frame prediction on the intra-frame prediction template based on M intra-frame prediction modes, where M is an integer greater than or equal to N;
[0163] Obtaining N intra-frame prediction modes corresponding to N intra-frame prediction values whose cost with the reconstructed value of the template corresponding to the target image block is less than a preset value among the M intra-frame prediction values;
[0164] An intra prediction mode list is constructed based on the N intra prediction modes.
[0165] In an embodiment of the present application, the device constructs an intra-frame prediction mode list, and when it is necessary to perform joint inter-frame intra-frame prediction on the target image block, determines the target intra-frame prediction mode from the intra-frame prediction mode list, and performs joint inter-frame intra-frame prediction on the target image block based on the target intra-frame prediction mode. In this way, in the joint inter-frame intra-frame prediction method, the intra-frame prediction mode is no longer restricted, making the selection of the intra-frame prediction mode more flexible, thereby helping to better derive the intra-frame prediction signal in the joint inter-frame intra-frame prediction and improving the prediction accuracy.
[0166] The joint inter-frame and intra-frame prediction apparatus in the embodiments of the present application may be an electronic device, such as an electronic device having an operating system, or a component in the electronic device, such as an integrated circuit or chip. The electronic device may be a terminal or other device other than a terminal.
[0167] The joint inter-frame and intra-frame prediction device provided in the embodiment of the present application can implement each process implemented by the method embodiment described in Figure 2 and achieve the same technical effect. To avoid repetition, it will not be described here.
[0168] As shown in Figure 6, an embodiment of the present application also provides an electronic device 600, including a processor 601 and a memory 602, and the memory 602 stores a program or instruction that can be run on the processor 601. When the program or instruction is executed by the processor 601, the various steps of the above-mentioned joint inter-frame and intra-frame prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0169] The present application also provides a terminal comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is configured to execute a program or instruction to implement the steps of the method embodiment shown in FIG2 . The various implementation processes and implementation methods of the aforementioned method embodiment are applicable to this terminal embodiment and can achieve the same technical effects. Specifically, FIG7 is a schematic diagram of the hardware structure of a terminal implementing an embodiment of the present application.
[0170] The terminal 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709 and at least some of the components of the processor 710.
[0171] Those skilled in the art will appreciate that the terminal 700 may also include a power supply (such as a battery) to power various components. The power supply may be logically connected to the processor 710 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The terminal structure shown in FIG7 does not limit the terminal. The terminal may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.
[0172] It should be understood that in an embodiment of the present application, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.
[0173] In the embodiment of the present application, after receiving downlink data from a network-side device, the RF unit 701 may transmit the data to the processor 710 for processing. Furthermore, the RF unit 701 may send uplink data to the network-side device. Typically, the RF unit 701 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like.
[0174] The memory 709 can be used to store software programs or instructions and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 709 may include a volatile memory or a non-volatile memory 70. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0175] Processor 710 may include one or more processing units. Optionally, processor 710 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 710.
[0176] The processor 710 is configured to:
[0177] Constructing an intra-frame prediction mode list, where the intra-frame prediction mode list includes N intra-frame prediction modes, where N is an integer greater than or equal to 1;
[0178] determining a target intra prediction mode based on the intra prediction mode list, wherein the N intra prediction modes include the target intra prediction mode;
[0179] Performing joint inter-frame and intra-frame prediction on the target image block based on the target intra-frame prediction mode.
[0180] In an embodiment of the present application, the terminal constructs an intra-frame prediction mode list, and when it is necessary to perform joint inter-frame intra-frame prediction on the target image block, the terminal determines the target intra-frame prediction mode from the intra-frame prediction mode list, and performs joint inter-frame intra-frame prediction on the target image block based on the target intra-frame prediction mode. In this way, in the joint inter-frame intra-frame prediction method, the intra-frame prediction mode is no longer restricted, making the selection of the intra-frame prediction mode more flexible, thereby helping to better derive the intra-frame prediction signal in the joint inter-frame intra-frame prediction and improving the prediction accuracy.
[0181] It can be understood that the implementation process of each implementation method mentioned in this embodiment can refer to the relevant description of the above-mentioned method embodiment and achieve the same or corresponding technical effects. To avoid repetition, it will not be repeated here.
[0182] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned joint inter-frame and intra-frame prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0183] The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. In some examples, the readable storage medium may be a non-transitory readable storage medium.
[0184] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned joint inter-frame and intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0185] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0186] An embodiment of the present application further provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-mentioned joint inter-frame and intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0187] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0188] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of a computer software product plus a necessary general-purpose hardware platform, or of course, by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes a number of instructions for enabling a terminal or network-side device to execute the methods described in each embodiment of the present application.
[0189] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of this application and the scope of protection of the claims. These implementation methods are all within the protection of this application.
Claims
1. A joint inter-frame and intra-frame prediction method, applied to an encoding end or a decoding end, the method include: Constructing an intra-frame prediction mode list, wherein the intra-frame prediction mode list includes N intra-frame prediction modes, where N is an integer greater than or equal to 1; Determine a target intra prediction mode based on the intra prediction mode list, wherein the N intra prediction modes include the target intra prediction mode; A joint inter-frame intra-frame prediction is performed on the target image block based on the target intra-frame prediction mode.
2. The method according to claim 1, in, The method further comprises: Obtaining a motion vector candidate index of a joint inter-frame and intra-frame mode from a bitstream; The performing joint inter-frame intra-frame prediction on the target image block based on the target intra-frame prediction mode includes: Acquire an inter-frame prediction value of a target image block based on the motion vector candidate index, and acquire an intra-frame prediction value of the target image block based on the target intra-frame prediction mode; A target prediction value of the target image block is obtained based on the inter-frame prediction value and the intra-frame prediction value.
3. The method according to claim 1, in, The method further comprises: Obtaining a motion vector candidate index of a joint inter-frame and intra-frame mode from a bitstream; Determining a target intra prediction mode based on the intra prediction mode list includes: Based on the motion vector candidate index, a target intra prediction mode is determined from the intra prediction mode list.
4. The method according to claim 3, in, The intra prediction mode list includes N intra prediction mode list indexes, and the N intra prediction mode list indexes correspond one-to-one to the N intra prediction modes; The determining, based on the motion vector candidate index, a target intra prediction mode from the intra prediction mode list comprises: Based on the mapping relationship between the motion vector candidate index and the intra prediction mode list index, a target intra prediction mode corresponding to the motion vector candidate index in the intra prediction mode list is obtained.
5. The method according to claim 4, in, The method further comprises: Obtaining a first identifier from the bitstream; The acquiring, based on the mapping relationship between the motion vector candidate index and the intra prediction mode list index, a target intra prediction mode corresponding to the motion vector candidate index in the intra prediction mode list comprises: Based on the first identifier, a mapping relationship between the motion vector candidate index and the intra-frame prediction mode list index is obtained, and a target intra-frame prediction mode corresponding to the motion vector candidate index in the intra-frame prediction mode list is obtained.
6. The method according to claim 2, in, The determining a target intra prediction mode based on the intra prediction mode list comprises: Determine an inter-frame prediction template according to the target image block, and obtain an inter-frame prediction value for inter-frame prediction of the inter-frame prediction template based on the motion vector candidate index; Determine an intra prediction template according to the target image block, and obtain N intra prediction values for performing intra prediction on the intra prediction template respectively based on the N intra prediction modes in the intra prediction mode list; Combining the inter-frame prediction value with the N intra-frame prediction values in sequence to obtain N template prediction values; A target intra-frame prediction mode is determined according to the N template prediction values.
7. The method according to claim 6, in, The determining a target intra-frame prediction mode according to the N template prediction values comprises: An intra-frame prediction mode corresponding to a template prediction value having the smallest cost with a reconstruction value of a template corresponding to the target image block among the N template prediction values is obtained, and the intra-frame prediction mode is determined as the target intra-frame prediction mode.
8. The method according to claim 7, in, The inter-frame prediction value corresponding to the inter-frame prediction template, the intra-frame prediction value corresponding to the intra-frame prediction template, and the reconstruction value of the template corresponding to the target image block are located in the same domain.
9. The method according to claim 6, in, The method further comprises: Acquire a second identifier from the bitstream; The obtaining N intra prediction values for performing intra prediction on the intra prediction template based on the N intra prediction modes in the intra prediction mode list includes: Based on the second identifier, N intra-frame prediction values for performing intra-frame prediction on the intra-frame prediction template based on the N intra-frame prediction modes in the intra-frame prediction mode list are obtained.
10. The method according to any one of claims 2 to 9, in, The obtaining the target prediction value of the target image block based on the inter-frame prediction value and the intra-frame prediction value includes any one of the following: Combining the inter-frame prediction value and the intra-frame prediction value based on weighted average to obtain a target prediction value of the target image block; The inter-frame prediction value and the intra-frame prediction value are combined based on a linear model or a nonlinear model to obtain a target prediction value of the target image block.
11. The method according to any one of claims 1 to 9, in, The constructing of the intra prediction mode list includes: Determine an intra-frame prediction template according to the target image block; Obtaining M intra-frame prediction values for performing intra-frame prediction on the intra-frame prediction template based on M intra-frame prediction modes, where M is an integer greater than or equal to N; Obtaining N intra-frame prediction modes corresponding to N intra-frame prediction values whose cost between the prediction values and the reconstruction value of the template corresponding to the target image block is less than a preset value among the M intra-frame prediction values; An intra prediction mode list is constructed based on the N intra prediction modes.
12. A joint inter-frame and intra-frame prediction device, include: A construction module, configured to construct an intra-frame prediction mode list, wherein the intra-frame prediction mode list includes N intra-frame prediction modes, where N is an integer greater than or equal to 1; A determination module, configured to determine a target intra-frame prediction mode based on the intra-frame prediction mode list, wherein the N intra-frame prediction modes include the target intra-frame prediction mode; A prediction module is used to perform joint inter-frame and intra-frame prediction on a target image block based on the target intra-frame prediction mode.
13. The device according to claim 12, in, The device also includes: An acquisition module, used for acquiring a motion vector candidate index of a joint inter-frame and intra-frame mode from a bitstream; The prediction module is also used to: Acquire an inter-frame prediction value of a target image block based on the motion vector candidate index, and acquire an intra-frame prediction value of the target image block based on the target intra-frame prediction mode; A target prediction value of the target image block is obtained based on the inter-frame prediction value and the intra-frame prediction value.
14. The device according to claim 12, in, The device also includes: An acquisition module, used for acquiring a motion vector candidate index of a joint inter-frame and intra-frame mode from a bitstream; The determining module is also used for: Based on the motion vector candidate index, a target intra prediction mode is determined from the intra prediction mode list.
15. The device according to claim 14, in, The intra prediction mode list includes N intra prediction mode list indexes, and the N intra prediction mode list indexes correspond one-to-one to the N intra prediction modes; The determining module is also used for: Based on the mapping relationship between the motion vector candidate index and the intra prediction mode list index, a target intra prediction mode corresponding to the motion vector candidate index in the intra prediction mode list is obtained.
16. The device according to claim 13, in, The determining module is also used for: Determine an inter-frame prediction template according to the target image block, and obtain an inter-frame prediction value for inter-frame prediction of the inter-frame prediction template based on the motion vector candidate index; Determine an intra prediction template according to the target image block, and obtain N intra prediction values for performing intra prediction on the intra prediction template respectively based on the N intra prediction modes in the intra prediction mode list; Combining the inter-frame prediction value with the N intra-frame prediction values in sequence to obtain N template prediction values; A target intra-frame prediction mode is determined according to the N template prediction values.
17. The device according to claim 16, in, The determining module is also used for: An intra-frame prediction mode corresponding to a template prediction value having the smallest cost with a reconstruction value of a template corresponding to the target image block among the N template prediction values is obtained, and the intra-frame prediction mode is determined as the target intra-frame prediction mode.
18. A terminal comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the joint inter-frame and intra-frame prediction method according to any one of claims 1 to 11 are implemented.
19. A readable storage medium storing a program or an instruction, wherein the program or the instruction, when executed by a processor, implements the steps of the joint inter-frame and intra-frame prediction method according to any one of claims 1 to 11.
20. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement the joint inter-frame and intra-frame prediction method according to any one of claims 1 to 11.
Citation Information
Patent Citations
A coding and decoding method and apparatus therefor
CN110225346A
Intra-frame and inter-frame joint prediction method and device, codec and storage device
CN110519600A
Method for in-frame and inter-frame combined prediction, device and storage medium
CN111010578A
Intra-frame prediction method, encoder, decoder and computer storage medium
CN114830651A
Intra-prediction mode-based image processing method and device therefor
WO2020050697A1
Cited By
Intra prediction method and apparatus, and electronic device
WO2026086663A1
