Video Image Processing Method and Apparatus

By scanning and dividing the preset neighboring blocks of the current image block, the problem of redundant operations and storage mismatch in ATMVP technology is solved, more efficient motion vector prediction and reduce coding complexity, and the accuracy and storage efficiency of motion vectors are improved.

CN115037942BActive Publication Date: 2025-07-08SZ DJI TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210376345.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-10-30
Filing Date
2019-03-13
Publication Date
2025-07-08
Estimated Expiration
2039-03-13

AI Technical Summary

Technical Problem

The existing advanced/optional time domain motion vector prediction technology (ATMVP) has problems with redundant operations and storage granularity mismatch when building candidate motion vector lists, resulting in high encoding complexity.

Method used

By scanning the preset neighbor blocks of the current image block, the target neighbor block is determined, and the current block and related block are divided into sub-image blocks. Only the acquired candidate motion vectors are scanned in sequence, reducing the number of scans, adapting to the storage granularity of the video standard, and avoiding redundant operations.

Benefits of technology

While maintaining the performance gain of ATMVP technology, the complexity of motion vector prediction is reduced, the accuracy of motion vectors is improved, and storage space and codec time are saved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115037942B_ABST
    Figure CN115037942B_ABST
Patent Text Reader

Abstract

Provided is a video image processing method and apparatus. The method includes: sequentially scanning N neighboring blocks out of M preset neighboring blocks of a current image block, determining a target neighboring block according to the scanning result, where N is less than M; determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block; dividing the current image block and the related block into a plurality of sub-image blocks in the same manner, with each sub-image block in the current image block corresponding to each sub-image block in the related block one by one; and predicting the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the related block. The complexity can be reduced while ensuring the codec performance.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese patent application "Video Image Processing Method and Apparatus" with an application date of March 13, 2019 and an application number of 201980002813.5.

[0002] This application claims the priority of PCT applications with application numbers PCT / CN2018 / 081652, PCT / CN2018 / 095710, PCT / CN2018 / 103693, PCT / CN2018 / 107436, and PCT / CN2018 / 112805, the entire contents of which are incorporated herein by reference.

[0003] Copyright Notice

[0004] The content disclosed in this patent document contains copyrighted material. This copyright is owned by the copyright owner. The copyright owner does not object to anyone copying this patent document or the patent disclosure as it exists in the official records and files of the Patent and Trademark Office. Technical Field

[0005] This application relates to the field of video coding and decoding, and specifically relates to a video image processing method and apparatus. Background Art

[0006] Currently, the main video coding standards all adopt block-based motion compensation technology in the inter-frame prediction part. The main principle is to find a most similar block for the current image block in the encoded image, and this process is called motion compensation. For example, for a frame of image, it is first divided into coding regions (Coding Tree Unit, CTU) of equal size, such as 64×64 or 128×128. Each CTU can be further divided into square or rectangular coding units (Coding Unit, CU). Each CU searches for the most similar block in the reference frame (generally the reconstructed frame near the time domain of the current frame) as the prediction block of the current CU. The relative displacement between the current block (i.e., the current CU) and the similar block (i.e., the prediction block of the current CU) is called the motion vector (Motion Vector, MV). The process of searching for the most similar block in the reference frame as the prediction block of the current block is motion compensation.

[0007] In the current technology, the motion vector candidate list of the current CU is usually constructed in two ways. The motion vector candidate list is also called the merge candidate list. The motion vector candidate list includes spatial candidate motion vectors. Usually, the motion vectors (or motion information) of the encoded neighboring blocks of the current CU are filled into the motion vector candidate list. The motion vector candidate list also includes temporal candidate motion vectors. Temporal Motion Vector Prediction (TMVP) uses the motion vectors (or motion information) of the corresponding position CU (i.e., the co-located CU) of the current CU in the neighboring encoded images. The optimal candidate motion vector is selected from the merge candidate list as the motion vector of the current CU; the predicted block of the current CU is determined according to the motion vector of the current CU.

[0008] Advanced / Alternative Temporal Motion Vector Prediction (ATMVP) is a motion vector prediction mechanism. The basic idea of the ATMVP technology is to perform motion compensation by obtaining the motion information of multiple sub-blocks within the current CU. The ATMVP technology introduces the motion information of multiple sub-blocks within the current CU as candidates in the construction of the candidate list (such as the merge candidate list or the AMVP (Advanced Motion Vector Prediction) candidate list). The implementation of the ATMVP technology can be roughly divided into two steps. The first step is to determine a temporal vector by scanning the motion vector list of the candidate motion vectors of the current CU or the motion vectors of the adjacent image blocks of the current CU. The second step is to divide the current CU into sub-blocks (sub-CU) of N×N (N is defaulted to 4), determine the corresponding blocks of each sub-block in the reference frame according to the temporal vector obtained in the first step, and determine the motion vectors of each sub-block according to the motion vectors of the corresponding blocks of each sub-block in the reference frame.

[0009] In the first step of the current ATMVP technology, there is still room for improvement in the process of determining a temporal vector by scanning the motion vector list of the candidate motion vectors of the current CU or the motion vectors of the adjacent image blocks of the current CU. In the second step of the current ATMVP technology, the size of the sub-CU is set adaptively at the frame level, and the default size is 4×4. When certain preset conditions are met, the size of the sub-CU will be set to 8×8. There are some problems with the size setting of the sub-CU that do not match the current motion information storage granularity (8×8). There are redundant operations between the ATMVP technology and the TMVP technology in some cases, and there is room for improvement in the process of constructing the candidate motion vector list. Summary of the Invention

[0010] The present application provides a video image processing method and apparatus, which can reduce the complexity of the ATMVP technology while maintaining the performance gain of the existing ATMVP technology.

[0011] In a first aspect, a video image processing method is provided. The method includes:

[0012] Scanning N adjacent blocks out of a preset M adjacent blocks of the current image block in sequence, and determining a target adjacent block according to the scanning result, where N is less than M;

[0013] Determining a related block of the current image block according to the motion vector of the target adjacent block, the current image block, and the reference image of the current image block;

[0014] Dividing the current image block and the related block into a plurality of sub-image blocks in the same manner, and each sub-image block in the current image block corresponds to each sub-image block in the related block one by one;

[0015] Predicting the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the related block.

[0016] In the solution provided by the present application, during the process of obtaining the reference motion vector of the current image block, only N (N is less than M) candidate motion vectors out of the already obtained M candidate motion vectors are scanned in sequence. Compared with the prior art, the number of scans of the candidate motion vectors during the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that applying the solution provided by the present application to the first step of the existing ATMVP technology can simplify the redundant operations existing therein.

[0017] In a second aspect, a video image processing method is provided. The method includes:

[0018] Determining M adjacent blocks of the current image block according to M candidates in the second candidate list of the motion vector of the current image block;

[0019] Scanning N adjacent blocks out of the M adjacent blocks in sequence, and determining a target adjacent block according to the scanning result. N is less than M;

[0020] Determining a related block of the current image block according to the motion vector of the target adjacent block, the current image block, and the reference image of the current image block;

[0021] Determining a specific candidate in the first candidate list of the motion vector of the current image block according to the related block of the current image block;

[0022] When it is determined to adopt the specific candidate, the current image block and the related block are divided into multiple sub-image blocks in the same way, and each sub-image block in the current image block corresponds one-to-one to each sub-image block in the related block;

[0023] Predict the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the related block.

[0024] In a third aspect, a video image processing apparatus is provided, and the apparatus includes:

[0025] A construction module, configured to sequentially scan N adjacent blocks among M preset adjacent blocks of a current image block, determine a target adjacent block according to the scanning result, where N is less than M; determine a related block of the current image block according to the motion vector of the target adjacent block, the current image block, and the reference image of the current image block; divide the current image block and the related block into multiple sub-image blocks in the same way, and each sub-image block in the current image block corresponds one-to-one to each sub-image block in the related block;

[0026] A prediction module, configured to predict the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the related block.

[0027] In a fourth aspect, a video image processing apparatus is provided, and the apparatus includes:

[0028] A construction module, configured to determine M adjacent blocks of the current image block according to M candidates in a second candidate list of the motion vector of the current image block; sequentially scan N adjacent blocks among the M adjacent blocks, determine a target adjacent block according to the scanning result, where N is less than M; determine a related block of the current image block according to the motion vector of the target adjacent block, the current image block, and the reference image of the current image block; determine a specific candidate in a first candidate list of the motion vector of the current image block according to the related block of the current image block; when it is determined to adopt the specific candidate, divide the current image block and the related block into multiple sub-image blocks in the same way, and each sub-image block in the current image block corresponds one-to-one to each sub-image block in the related block;

[0029] A prediction module, configured to predict the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the related block.

[0030] Fifth aspect, a video image processing apparatus is provided, which includes a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. And the execution of the instructions stored in the memory enables the processor to execute the method in the first aspect or any possible implementation manner of the first aspect.

[0031] Sixth aspect, a video image processing apparatus is provided, which includes a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. And the execution of the instructions stored in the memory enables the processor to execute the method in the second aspect or any possible implementation manner of the second aspect.

[0032] Seventh aspect, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by the computer, the computer is enabled to implement the method in the first aspect or any possible implementation manner of the first aspect.

[0033] Eighth aspect, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by the computer, the computer is enabled to implement the method in the second aspect or any possible implementation manner of the second aspect.

[0034] Ninth aspect, a computer program product containing instructions is provided. When the instructions are executed by the computer, the computer is enabled to implement the method in the first aspect or any possible implementation manner of the first aspect.

[0035] Tenth aspect, a computer program product containing instructions is provided. When the instructions are executed by the computer, the computer is enabled to implement the method in the second aspect or any possible implementation manner of the second aspect.

[0036] Eleventh aspect, a video image processing method is provided, which includes:

[0037] Determine a basic motion vector list, where the basic motion vector list includes at least one set of dual-prediction basic motion vector groups, and the dual-prediction basic motion vector groups include a first basic motion vector and a second basic motion vector;

[0038] Determine two motion vector offsets from a preset offset set, and the two motion vector offsets respectively correspond to the first basic motion vector and the second basic motion vector;

[0039] Determine the motion vector of the current image block according to the first basic motion vector, the second basic motion vector and the two motion vector offsets;

[0040] Predict the current image block according to the motion vector of the current image block.

[0041] In a twelfth aspect, a video image processing method is provided, the method comprising:

[0042] Determine a basic motion vector list, the basic motion vector list including basic motion vector groups;

[0043] When at least one basic motion vector in the basic motion vector group points to a specific reference image, give up determining the motion vector of the current image block according to the basic motion vector group and the motion vector offset.

[0044] In a thirteenth aspect, a video image processing apparatus is provided, the apparatus comprising:

[0045] A construction module for determining a basic motion vector list, the basic motion vector list including at least one group of dual-prediction basic motion vector groups, the dual-prediction basic motion vector groups including a first basic motion vector and a second basic motion vector; determining two motion vector offsets from a preset offset set, the two motion vector offsets corresponding to the first basic motion vector and the second basic motion vector respectively; determining the motion vector of the current image block according to the first basic motion vector, the second basic motion vector and the two motion vector offsets;

[0046] A prediction module for predicting the current image block according to the motion vector of the current image block.

[0047] In a fourteenth aspect, a video image processing apparatus is provided, the apparatus comprising:

[0048] A determination module for determining a basic motion vector list, the basic motion vector list including basic motion vector groups;

[0049] A processing module for, when at least one basic motion vector in the basic motion vector group points to a specific reference image, giving up determining the motion vector of the current image block according to the basic motion vector group and the motion vector offset.

[0050] In a fifteenth aspect, a video image processing apparatus is provided, the apparatus comprising a memory and a processor, the memory for storing instructions, the processor for executing the instructions stored in the memory, and the execution of the instructions stored in the memory causes the processor to execute the method in the eleventh aspect or any possible implementation manner of the eleventh aspect.

[0051] Sixteenth aspect, a video image processing device is provided, which includes a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory, and the execution of the instructions stored in the memory causes the processor to execute the method in the twelfth aspect or any possible implementation manner of the twelfth aspect.

[0052] Seventeenth aspect, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer is caused to implement the method in the eleventh aspect or any possible implementation manner of the eleventh aspect.

[0053] Eighteenth aspect, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer is caused to implement the method in the twelfth aspect or any possible implementation manner of the twelfth aspect.

[0054] Nineteenth aspect, a computer program product including instructions is provided. When the instructions are executed by a computer, the computer is caused to implement the method in the eleventh aspect or any possible implementation manner of the eleventh aspect.

[0055] Twentieth aspect, a computer program product including instructions is provided. When the instructions are executed by a computer, the computer is caused to implement the method in the twelfth aspect or any possible implementation manner of the twelfth aspect. Description of the Drawings

[0056] Figure 1 is a schematic flowchart of the video image processing method provided by an embodiment of the present application.

[0057] Figure 2 is a schematic diagram of obtaining a candidate motion vector of a current block through adjacent blocks of the current image block.

[0058] Figure 3 is a schematic diagram of performing scaling processing on the candidate motion vector.

[0059] Figure 4 is another schematic flowchart of the video image processing method provided by an embodiment of the present application.

[0060] Figure 5 is a schematic block diagram of the video image processing device provided by an embodiment of the present application.

[0061] Figure 6 is another schematic block diagram of the video image processing device provided by an embodiment of the present application.

[0062] Figure 7 is a schematic flowchart of the video image processing method provided by an embodiment of the present application.

[0063] Figure 8 It is another schematic flowchart of the video image processing method provided by the embodiments of the present application.

[0064] Figure 9 It is another schematic block diagram of the video image processing device provided by the embodiments of the present application.

[0065] Figure 10 It is another schematic block diagram of the video image processing device provided by the embodiments of the present application.

[0066] Figure 11 It is another schematic block diagram of the video image processing device provided by the embodiments of the present application.

[0067] Figure 12 It is a schematic diagram for obtaining candidates of the first candidate list of motion vectors.

[0068] Figure 13 It is another schematic diagram for constructing candidates of the first candidate list of motion vectors.

[0069] Figure 14 and Figure 15 It is a schematic flowchart of the video image processing method provided by the embodiments of the present application.

[0070] Figure 16 It is another schematic block diagram of the video image processing device provided by the embodiments of the present application.

[0071] Figure 17 It is another schematic block diagram of the video image processing device provided by the embodiments of the present application.

[0072] Figure 18 It is another schematic flowchart of the video image processing method provided by the embodiments of the present application.

[0073] Figure 19 It is another schematic block diagram of the video image processing device provided by the embodiments of the present application.

[0074] Figure 20 It is another schematic block diagram of the video image processing device provided by the embodiments of the present application. Detailed implementation manners

[0075] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings.

[0076] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used in the specification of this application herein are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0077] In video coding and decoding, the prediction step is used to reduce redundant information in an image. A prediction block refers to the basic unit for prediction in a frame of an image. In some standards, this prediction block is also referred to as a Prediction Unit (PU). Before encoding / compressing a frame of an image, the image is divided into multiple image blocks. Further, each of these multiple image blocks can be divided into multiple image blocks again, and so on. In different coding methods, the number of levels of segmentation can be different, and the operating methods are also different. In different coding standards, the names of image blocks at the same level may be different. For example, in some video standards, each of the multiple image blocks obtained by first dividing a frame of an image is called a Coding Tree Unit (CTU); each coding tree unit can contain a Coding Unit (CU) or be divided into multiple coding units again; a coding unit can be divided into one, two, four, or other numbers of prediction units according to the prediction method. In some video standards, this coding tree unit is also referred to as the Largest Coding Unit (LCU).

[0078] Prediction refers to finding image data similar to the prediction block, which is also called the reference block of the prediction block. By encoding / compressing the difference between the prediction block and its reference block, redundant information in the encoding / compressing is reduced. Among them, the difference between the prediction block and the reference block can be the residual obtained by subtracting the corresponding pixel values of the prediction block and the reference block. Prediction includes intra-frame prediction and inter-frame prediction. Intra-frame prediction refers to finding the reference block of the prediction block within the frame where the prediction block is located, and inter-frame prediction refers to finding the reference block of the prediction block within other frames except the frame where the prediction block is located.

[0079] In some existing video standards, the prediction unit is the smallest unit in the image, and the prediction unit will not be further divided into multiple image blocks. The "image block" or "current image block" mentioned below refers to a prediction unit (or a coding unit), and an image block can be further divided into multiple sub-image blocks, and each sub-image block can be further predicted.

[0080] In this solution, before predicting the current image block, a motion vector candidate list is constructed, and the current image block is predicted according to the selected candidate motion vector in the motion vector candidate list. The motion vector candidate list has multiple modes. The multiple modes of the motion vector candidate list will be illustrated by examples below.

[0081] In the first type of mode, as the first example, at the encoding end, after constructing the motion vector candidate list, the encoding of the current image block can be completed through the following steps.

[0082] 1) Select the optimal motion vector (denoted as MV1) from the motion vector candidate list, use the selected MV1 as the motion vector of the current image block, and obtain the index of MV1 in the motion vector candidate list.

[0083] 2) Determine the predicted image block of the current image block from the reference image (i.e., the reference frame) according to the motion vector MV1 of the current image block. That is, determine the position of the predicted image block of the current image block in the reference frame.

[0084] 3) Obtain the residual between the current image block and the predicted image block.

[0085] 4) Send the index of the motion vector MV1 of the current image block in the motion vector candidate list and the residual obtained in step 3) to the decoding end.

[0086] As an example, at the decoding end, the current image block can be decoded through the following steps.

[0087] 1) Receive the residual and the index of the motion vector of the current image block in the motion vector candidate list from the encoding end.

[0088] 2) Obtain the motion vector candidate list by the method according to the embodiments of the present application. The motion vector candidate list obtained by the decoding end is consistent with the motion vector candidate list obtained by the encoding end.

[0089] 3) Obtain the motion vector MV1 of the current image block in the motion vector candidate list according to the index.

[0090] 4) Obtain the predicted image block of the current image block according to the motion vector MV1, and then combine it with the residual to decode the current image block.

[0091] That is, in the first type of mode, the motion vector of the current image block is equal to the predicted MV (Motion vector prediction, MVP). In some standards, this first type of mode is also called the Merge mode.

[0092] In the second type of mode, different from the first type of mode, after the encoding end selects the optimal motion vector MV1 from the motion vector candidate list, it also performs a motion search starting from MV1, and records the displacement between the finally searched position and the search starting point as the motion vector difference (Motion vector difference, MVD). Then, according to the motion vector MV1 + MVD of the current image block, the predicted image block of the current image block is determined from the reference image. The encoding end also sends the MVD to the decoding end. In some standards, this second type of mode is also called the AMVP mode (i.e., the ordinary inter-frame prediction mode).

[0093] The construction methods of the motion vector candidate lists in different types of modes can be the same or different. The motion vector candidate list constructed in the same way can be applicable to only one type of mode, or can be applicable to different types of construction modes, which is not restricted here.

[0094] In this solution, motion vector candidate lists constructed in two ways will be provided. For convenience of description, in the following text, the motion vector candidate lists constructed in these two ways are referred to as the first motion vector candidate list and the second motion vector candidate list. One difference between these two lists is that at least one candidate in the first motion vector candidate list includes the motion vector of a sub-image block, and each candidate in the second motion vector candidate list includes the motion vector of an image block. As mentioned above, the image block and the current image block here are concepts of the same type, both referring to a prediction unit (or a coding unit), and the sub-image block refers to multiple sub-image blocks segmented on the basis of this image block. When using the candidate in the first motion vector candidate list for prediction, the reference block of the current image block is determined according to this candidate, and then the residual between this image block and this reference block is calculated. When using the candidate in the second motion vector candidate list for prediction, if the candidate used is the motion vector of a sub-image block, then the reference blocks of each sub-image block in the current image block are determined according to this candidate, and then the residuals between each sub-image block in the current image block and its reference block are calculated, and the residuals of each sub-image block are spliced into the residual of this current image block.

[0095] Among them, when determining the candidates in the first motion vector candidate list and / or the second motion vector candidate list, one of the candidates can be determined according to the ATMVP technology. In one example, when constructing the first motion vector candidate list, the motion vector determined according to the ATMVP technology can be added as the first candidate to the list. In one example, when constructing the second motion vector candidate list, after adding candidates to the second motion vector candidate list according to the motion vectors of a preset number of spatial neighboring blocks at a preset position of the current image block, the motion vector determined according to the ATMVP technology can be added as a candidate to the list. Of course, the order of adding candidates to these two candidate lists can be other orders, which is not restricted.

[0096] Next, an example will be given to illustrate how to determine one of the candidates according to the ATMVP technology in combination with the construction method and usage method of the second motion vector candidate list.

[0097] In the description of the construction method of the second candidate list of motion vectors, for the convenience of understanding, the motion vectors are explained herein. The motion vector of an image block can include two pieces of information: 1) the image pointed to by the motion vector; 2) the displacement. The meaning represented by the motion vector of an image block is the image block in the image pointed to by the motion vector that has the same displacement as this image block. For an encoded / decoded image block, the meaning included in its motion vector is the reference image of the encoded / decoded image block, and the displacement of the reference block of the encoded / decoded image block relative to the encoded / decoded image block. It should be noted that the reference block of an image block mentioned in this article refers to the image block used to calculate the residual of this image block.

[0098] Figure 1 FIG. is a schematic flowchart of the video image processing method provided by an embodiment of the present application. The method includes the following steps.

[0099] S110, determine M candidate motion vectors for adding to the second candidate list of motion vectors of the current image block.

[0100] The current image block is an image block to be encoded (or decoded). The image frame where the current image block is located is called the current frame. For example, the current image block is a coding unit (CU).

[0101] For example, the second candidate list of motion vectors of the current image block can be a Merge candidate list or an AMVP candidate list. For example, the second candidate list of motion vectors can be the normal motion vector candidate list (Normal Merge List) in the Merge candidate list. It should be understood that the second candidate list of motion vectors can also have other names.

[0102] The M candidate motion vectors can be determined according to the motion vectors of M neighboring blocks of the current image block in the current frame. The neighboring blocks can be image blocks adjacent to the position of the current image block or having a certain position spacing on the current frame. It should be understood that these M neighboring blocks are image blocks that have been encoded (or decoded) in the current frame.

[0103] As an example, as Figure 2 shown, the M neighboring blocks of the current image block are Figure 2 the image blocks located at 4 positions A1 (left) → B1 (up) → B0 (upper right) → A0 (lower left) around the current image block as shown in. The M (i.e., M equals 4) candidate motion vectors of the current image block are determined according to the motion vectors of the image blocks at these 4 positions.

[0104] In addition, when an unavailable neighboring block appears among the M neighboring blocks, or when a neighboring block using an intra coding mode appears among the M neighboring blocks, the motion vector of the unavailable neighboring block or the neighboring block using the intra coding mode is unavailable. Then, the motion vector of the unavailable neighboring block is not used as a candidate motion vector, and adding the unavailable motion vector to the second candidate list of motion vectors of the current image block is abandoned.

[0105] As a possible implementation, after step S110 is completed, the M candidate motion vectors have been added to the second candidate list of motion vectors. In step S120, the second candidate list of motion vectors can be directly scanned.

[0106] S120, sequentially scan N candidate motion vectors among the M candidate motion vectors, and determine a reference motion vector according to the scanning result, where N is less than M. Here, both M and N are natural numbers.

[0107] Whether all of the M candidate motion vectors are added to the second candidate list of motion vectors, or whether some of the M candidate motion vectors are unavailable, resulting in only some of the M candidate motion vectors being added to the second candidate list of motion vectors, the N candidate motion vectors among the M candidate motion vectors are always sequentially scanned. Sequentially scanning the N candidate motion vectors among the M candidate motion vectors fixedly can refer to fixedly scanning the candidate motion vectors that have been added to the candidate motion vector list among the N candidate motion vectors; or, it can refer to fixedly scanning the N candidate motion vectors that have been added to the candidate motion vector list among the M candidate motion vectors.

[0108] The process of determining the reference motion vector according to the scanning result of the N candidate motion vectors can be to sequentially judge the N candidate motion vectors based on a preset condition, and determine the reference motion vector according to the judgment result.

[0109] As an example, the preset condition includes: the image block is available or does not use intra prediction coding mode, and the reference frame pointed to by the candidate motion vector is the same as the reference image of the current image block.

[0110] Here, the reference image of the current image block is the reference image with the closest temporal distance to the image where the current image block is located; or, the reference image of the current image block is a reference image preset at the encoding and decoding ends; or, the reference image of the current image block is a reference image specified in the video parameter set, sequence header, sequence parameter set, picture header, picture parameter set, and slice header.

[0111] For example, the reference image of the current image block is the collocated frame of the current image block, and the collocated frame is the frame set in the slice level information header for obtaining motion information for prediction. In some application scenarios, the collocated frame is also referred to as a collocated picture.

[0112] It should be understood that according to the evolution of future technologies, the preset conditions may be given other different definitions, and the corresponding solutions also fall within the protection scope of this application.

[0113] The process of determining the reference motion vector based on the scanning results of N candidate motion vectors will be described in detail below.

[0114] In step S120, only N motion vectors out of the M candidate motion vectors obtained in step S110 are scanned, which can reduce the number of scans.

[0115] Optionally, in step S120, the first N candidate motion vectors among the M candidate motion vectors can be scanned sequentially.

[0116] Optionally, in step S120, the last N candidate motion vectors among the M candidate motion vectors can be scanned sequentially; or, the middle N candidate motion vectors among the M candidate motion vectors can be scanned sequentially. This application does not make any limitations in this regard.

[0117] As an example, in step S120, some of the candidate motion vectors among the M candidate motion vectors are scanned sequentially.

[0118] As another example, in step S120, some of the candidate motion vectors among the candidate motion vectors that have been added to the second candidate list of motion vectors are scanned sequentially.

[0119] S130. Determine the candidate motion vectors to be continuously added to the second candidate list of motion vectors based on the reference motion vector, the current image block, and the reference image of the current image block.

[0120] The second candidate list of motion vectors of the current image block includes the M candidate motion vectors determined in step S110 and the candidate motion vectors determined in step S130. In one example, after determining the (M + 1)-th candidate motion vector to be continuously added to the second candidate list of motion vectors according to S130, other candidate motion vectors to be continuously added to the second candidate list of motion vectors are also determined according to other methods, which are not limited here.

[0121] After constructing the second candidate list of motion vectors, as Figure 1 shown, the method may further include: S140. Determine the motion vector of the current image block based on the second candidate list of motion vectors obtained in step S130.

[0122] It should be understood that the solution provided in this application can be applied to the ATMVP technology. In the first step of the existing ATMVP technology, the temporal vector of the current image block is obtained by scanning all the spatial candidate motion vectors that have been added to the second candidate list of motion vectors. For example, the second candidate list of motion vectors is usually filled with 4 spatial candidate motion vectors, and the following situation may occur: it is necessary to scan 4 candidate motion vectors to obtain the temporal vector of the current image block.

[0123] In the embodiment of this application, during the process of obtaining the reference motion vector of the current image block, only N (N is less than M) of the M candidate motion vectors that have been obtained are scanned in sequence. Compared with the prior art, the number of scans of candidate motion vectors during the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that applying the solution provided in this application to the first step of the existing ATMVP technology can simplify the redundant operations therein.

[0124] The applicant selected the official general test sequences as the test sequences on the latest reference software VTM-2.0 of Versatile Video Coding, and the test configurations were the RA configuration and the LDB configuration to test the solution provided in this application. The test results show that after reducing the number of scans, the performance gain of the ATMVP technology can still be maintained.

[0125] Therefore, the solution provided in this application can reduce the complexity of the ATMVP technology on the premise of maintaining the performance gain of the existing ATMVP technology.

[0126] It should be understood that the second candidate list of motion vectors formed by the solution provided in this application can be applied to both the encoding end and the decoding end. In other words, the execution subject of the method provided in this application can be the encoding end or the decoding end.

[0127] As an example, the second candidate list of motion vectors formed by the solution provided in this application can be applied to the above-mentioned first type of mode (such as the Merge mode).

[0128] Optionally, in this embodiment, in step S110, according to the motion vectors of 4 neighboring blocks of the current image block within the current frame, 4 candidate motion vectors to be added to the second candidate list of motion vectors of the current image block are determined, that is, M is equal to 4. In step S120, N of the 4 candidate motion vectors are scanned, and N is less than 4.

[0129] For example, N is equal to 1. For example, in step S120, only the first candidate motion vector in the second candidate list of motion vectors is scanned. For another example, N is equal to 2 or 3.

[0130] The method for determining the reference motion vector of the current image block according to the scanning results of N candidate motion vectors in step S120 will be described below.

[0131] In step S120, it is determined one by one whether N candidate motion vectors among M candidate motion vectors meet a preset condition, and the reference motion vector is determined according to the determination results. In this article, it is described by taking the definition of the preset condition that the reference frame pointed to by the candidate motion vector is the same as the reference image of the current image block as an example.

[0132] Optionally, in step S120, the N candidate motion vectors are scanned in sequence. When the first candidate motion vector that meets the preset condition is scanned, that is, when the first candidate motion vector whose reference frame is the same as the co-located frame of the current frame is scanned, the scanning stops, and the reference motion vector is determined according to the first candidate motion vector that meets the preset condition.

[0133] It should be understood that when the first candidate motion vector that meets the preset condition is scanned, the number of scans may be equal to N or less than N. For example, if the first scanned candidate motion vector meets the preset condition, the scanning stops, and this candidate motion vector is used as the reference motion vector of the current image block.

[0134] Optionally, in step S120, when no candidate motion vector that meets the preset condition is scanned among the N candidate motion vectors, that is, when the reference frames pointed to by the N candidate motion vectors are all different from the co-located frame of the current image block, the default value is used as the value of the reference motion vector.

[0135] For example, the default value is (0, 0), that is, the reference motion vector is (0, 0). It should be understood that according to the actual situation, the default value can also have other definitions.

[0136] Optionally, in step S120, when no candidate motion vector that meets the preset condition is scanned among the N candidate motion vectors, that is, when the reference frames pointed to by the N candidate motion vectors are all different from the co-located frame of the current image block, the specific candidate motion vector in the second candidate list of motion vectors is scaled, and the reference motion vector is determined according to the scaled specific candidate motion vector.

[0137] The specific candidate motion vector can be the first motion vector or the last motion vector obtained in the scanning order among the N candidate motion vectors.

[0138] This specific candidate motion vector may also be a motion vector obtained according to other scanning orders among the N candidate motion vectors.

[0139] When the preset condition is defined as that the reference frame pointed to by the candidate motion vector is the same as the reference frame of the current image block, perform a scaling process on the specific candidate motion vector in the second candidate list of motion vectors, and determine the reference motion vector according to the scaled specific candidate motion vector, including: performing a scaling process on the specific candidate motion vector in the second candidate list of motion vectors so that the reference frame pointed to by the scaled specific candidate motion vector is the same as the reference image of the current image block; using the scaled specific candidate motion vector as the reference motion vector.

[0140] Such as Figure 3 shown, curr_pic represents the image where the current image block is located, col_pic represents the collocated picture of the current image block, and neigh_ref_pic represents the reference frame pointed to by the specific candidate motion vector. In one implementation manner, determine the scaling ratio of the specific motion vector based on the temporal distance between the reference image neigh_ref_pic pointed to by the specific candidate motion vector and the image curr_pic where the image block corresponding to the specific motion vector is located, and the temporal distance between the reference image col_pic of the current image block and the image curr_pic where the current image block is located.

[0141] It should be understood that the difference in the degree of motion between image frames is relatively small. In the case where the motion between the current frame and its collocated frame is intense, if the motion vector (0, 0) is used as the basis for locating the corresponding block of the current block, the inter-frame motion is not considered, but it is directly assumed that the absolute coordinates of the current block in the collocated frame have not changed at all. In fact, there is a high probability that the coordinates of the current block in the collocated frame are different from its coordinates in the current frame. Therefore, a large deviation will occur.

[0142] In the embodiment of the present application, in the case where no candidate motion vector with a reference frame the same as the collocated frame of the current frame is scanned among the N candidate motion vectors, perform a scaling process on one candidate motion vector among the N candidate motion vectors so that its reference frame is the same as the collocated frame of the current frame, and then use this scaled candidate motion vector as the motion vector of the current image block. This can improve the accuracy of the motion vector of the current image block.

[0143] Optionally, when N is an integer less than M and greater than 1, the specific candidate motion vector in this embodiment may be the candidate motion vector among the N candidate motion vectors with the closest temporal distance between the reference frame and the collocated frame of the current image block.

[0144] It should be understood that selecting a candidate motion vector with the closest co-located frame distance between the reference frame and the current frame among the N candidate motion vectors for scaling processing can reduce the time consumption for scaling processing, thereby improving the efficiency of obtaining the motion vector of the current image block.

[0145] Optionally, when N is an integer less than M and greater than 1, the specific candidate motion vector in this embodiment may also be any one of the N candidate motion vectors.

[0146] It should be understood that when N is equal to 1, the specific candidate motion vector in this embodiment is this scanned candidate motion vector.

[0147] Optionally, as an embodiment, N is equal to 1. In step S120, a candidate motion vector in the second candidate list of motion vectors is scanned to obtain the reference motion vector of the current image block. When the reference frame of the scanned candidate motion vector is different from the co-located frame of the current frame where the current image block is located, the candidate motion vector is scaled so that the reference frame of the scaled candidate motion vector is the same as the co-located frame of the current frame; the scaled candidate motion vector is used as the reference motion vector of the current image block. When the reference frame of the scanned candidate motion vector is the same as the co-located frame of the current frame, this candidate motion vector is used as the motion vector of the current image block.

[0148] In this embodiment, by scanning a candidate motion vector in the candidate motion vector list to obtain the motion vector of the current image block, the number of times of scanning candidate motion vectors in the process of obtaining the motion vector of the current image block is effectively reduced; when the reference frame of the scanned candidate motion vector is different from the co-located frame of the current frame, the candidate motion vector is scaled so that its reference frame is the same as the co-located frame of the current frame, and then this scaled candidate motion vector is used as the motion vector of the current image block, which can improve the accuracy of the motion vector of the current image block. Therefore, compared with the prior art, the solution provided by the embodiment of the present application can both simplify the process of determining the motion vector of the current image block and improve the accuracy of the motion vector of the current image block.

[0149] It should be understood that when the definition of the preset condition changes, the process of scaling the specific candidate motion vector in the second candidate list of motion vectors should also change accordingly, that is, to ensure that the scaled specific candidate motion vector meets the preset condition.

[0150] The following will describe the process of determining the candidate motion vectors to be continuously added to the second candidate list of motion vectors according to the reference motion vector, the current image block, and the reference image of the current image block in step S130.

[0151] Optionally, as an implementation manner, determining a candidate motion vector to be continuously added to the second candidate list of motion vectors according to a reference motion vector, a current image block, and a reference image of the current image block includes: dividing the current image block into a plurality of sub-image blocks; determining a related block of the sub-image block in the reference image of the current image block according to the reference motion vector; and determining a candidate motion vector to be continuously added to the second candidate list of motion vectors according to the motion vector of the related block.

[0152] In one example, the motion vectors of the related blocks of each sub-image block in the current image block are used as candidates and added to the second candidate list of motion vectors. When using this candidate for prediction, each sub-image block in the current image block is predicted according to the motion vector of the related block of each sub-image block in the current image block.

[0153] In one example, the representative motion vector of the related block of the current image block is used as a candidate and added to the second candidate list of motion vectors, and this candidate is marked as determined according to the ATMVP technology. When using this candidate for prediction, the related block of the current image block is determined according to this mark and the candidate, the current image block and this related block are divided into a plurality of sub-image blocks in the same way, and each sub-image block in the current image block corresponds one-to-one to each sub-image block in the related block; each sub-image block in the current image block is predicted according to the motion vector of each corresponding sub-image block in this related block. Optionally, when there is a sub-image block with an unavailable motion vector in the related block, the representative motion vector of this related block is used to replace this unavailable motion vector to predict the corresponding sub-image block in the current image block. Optionally, when there is a sub-image block with an unavailable motion vector in the related block and the representative motion vectors of the related block are all unavailable, the candidate determined according to the ATMVP technology is not added to the second candidate list of this motion vector. In one example, when the sub-image block in the related block is unavailable, or the sub-image block in the related block uses an intra coding mode, it is determined that there is a sub-image block with an unavailable motion vector in this related block.

[0154] Optionally, the representative motion vector of the related block of the current image block may refer to the motion vector at the center position of this related block, or other motion vectors representing this related block, which is not limited here.

[0155] In some video coding and decoding standards, the related block may be referred to as a collocated block or a corresponding block.

[0156] For example, the current image block is a CU, and the sub-image blocks obtained after dividing it can be called sub-CU. Optionally, the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be greater than or equal to 64 pixels. Optionally, the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed to 8×8 pixels.

[0157] In the current ATMVP technology, the size of the sub-image block is set adaptively at the frame level. The size of the sub-image block defaults to 4×4. When certain conditions are met, the size of the sub-image block is set to 8×8. For example, at the encoding end, when encoding the current image block, the average block size of each sub-image block in the CU when the previous coded image block of the same time domain layer is coded in ATMVP mode is calculated. When the average block size is greater than the threshold, the size of the sub-image block of the current image block is set to 8×8, otherwise the default value of 4×4 is used. At present, in the new generation of video coding standards (Versatile Video Coding, VVC), motion vectors are stored in a size of 8×8. It should be understood that when the size of the sub-image block is set to 4×4, the size of the motion vector of the sub-image block (also 4×4) does not meet the storage granularity of the motion vector in the current standard. In addition, in the current ATMVP technology, when encoding the current image block, it is also necessary to store information on the size of the sub-image block of the previous coded image block of the same time domain layer.

[0158] In an embodiment of the present application, the size of the sub-image block of the current image block is set to 8×8. On the one hand, it can adapt to the storage granularity of the motion vector specified in the video standard VVC. On the other hand, there is no need to store information about the size of the sub-image block of the previous encoded image block, thereby saving storage space.

[0159] At present, the TMVP technology scales the MV of the co-located CU in the adjacent encoded image at the lower right corner or center of the current CU to obtain the time domain candidate motion vector of the current CU. In other words, TMVP obtains the MVP by traversing the coding blocks at two fixed positions in the reference image, and the order is TB→TC, and the first traversed MV is directly used as the MVP of TMVP. In an embodiment of the present application, the sub-image block size in the ATMVP technology is set to 8×8, and it will use an MV in the existing merge candidate list (merge list) of each embodiment of the present application to locate the relevant block, and the MV of the located relevant block is used as the MVP of ATMVP.

[0160] In some versions of the video standard VVC, the merge list is constructed by first constructing the merge candidate list of ATMVP and then constructing the merge candidate list of TMVP. In some other versions of the video standard VVC, the construction of the merge candidate list of TMVP is carried out during the merge list construction process, and the construction of the merge candidate list of ATMVP is carried out during the affine merge list construction process. ATMVP and TMVP respectively construct two different lists. However, theoretically, there is no need to add the same or the same group of MVs to the two merge candidate lists. When the width and height of the current CU are both equal to 8, there may be a certain redundancy in the merge candidate lists respectively constructed by TMVP and ATMVP, that is, the two technologies may derive the same group of temporal candidate motion information for the current CU.

[0161] In some embodiments of the present application, when the width and height of the current CU are both equal to 8, it is set not to perform the TMVP operation. In other words, when the size of the sub-image block and / or the size of the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation. Thereby, it is possible to avoid including the same or the same group of MVs in the merge candidate lists respectively constructed by ATMVP and TMVP, skip some redundant operations, effectively save the encoding and decoding time, and improve the encoding efficiency.

[0162] In some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. The reason is that: the hardware design of the encoder and / or decoder tries to require that the encoding or decoding time of the same-sized processing area is consistent. However, for the area containing more small blocks, the pipeline time required for encoding or decoding will far exceed that of other areas. Further, it can be set not to perform the TMVP operation when the width and height of the sub-image block and / or the related block of the sub-image block are both less than 8 pixels. Therefore, saving the pipeline time for encoding or decoding small blocks is very meaningful for the parallel processing of the hardware. In addition, the current encoding technology has a higher and higher utilization rate of temporal correlation, and many temporal prediction technologies are adopted, such as the ATMVP technology. Therefore, for small blocks, the performance impact caused by skipping the TMVP operation can be ignored, thereby effectively saving the encoding and decoding time and improving the encoding efficiency.

[0163] It should be understood that on the premise that the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be equal to 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block can also be other sizes. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is A×B, where A≤64, B≤64, and both A and B are integers divisible by 4. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is 4×16 pixels, or 16×4 pixels.

[0164] Optionally, as another implementation manner, determining a candidate motion vector to be continuously added to the second candidate list of motion vectors according to a reference motion vector, a current image block, and a reference image of the current image block includes: determining a related block of the current image block in the reference image of the current image block according to the reference motion vector; and determining a candidate motion vector to be continuously added to the second candidate list of motion vectors according to the motion vector of the related block.

[0165] In encoding / decoding technology, generally an encoded / decoded image is used as a reference image for the current image to be encoded / decoded. In some embodiments, a reference image can also be constructed to improve the similarity between the reference image and the current image to be encoded / decoded.

[0166] For example, there is a specific type of encoding / decoding scenario in video content, in which the background basically does not change, and only the foreground in the video changes or moves. For example, video surveillance belongs to this type of scenario. In the video surveillance scenario, usually the surveillance camera is fixed or only moves slowly, and it can be considered that the background basically does not change. In contrast, objects such as people or vehicles captured in the video surveillance camera often move or change, and it can be considered that the foreground often changes. In this type of scenario, a specific reference image can be constructed, and only high-quality background information is included in the specific reference image. The specific reference image can include multiple image blocks, and any one of the image blocks is taken from a certain decoded image, and different image blocks in the specific reference image may be taken from different decoded images. When performing inter-frame prediction, the background part of the current image to be encoded / decoded can refer to the specific reference image, thereby reducing the residual information of inter-frame prediction and improving the encoding / decoding efficiency.

[0167] The above is a specific example of a specific reference image. In some implementations, the specific reference image has at least one of the following properties: composite reference, long-term reference image, an image that is not output. Among them, the image that is not output refers to an image that is not output for display; generally speaking, the image that is not output exists as a reference image for other images. For example, the specific reference image can be a constructed long-term reference image, or can be a composite frame that is not output, or can be a long-term reference image that is not output, and so on. In some implementations, the composite frame is also referred to as a composite reference frame.

[0168] In some implementations, the non-specific reference image can be a reference image that does not have at least one of the following properties: composite reference, long-term reference image, an image that is not output. For example, the non-specific reference image can include a reference image other than the composite frame, or include a reference image other than the long-term reference image, or include a reference image other than the image that is not output, or include a reference image other than the constructed long-term reference image, or include a reference image other than the composite frame that is not output, or include a reference image other than the long-term reference image that is not output, and so on.

[0169] In some implementations, when the images in the video can be used as reference images, the long-term reference images and short-term reference images can be distinguished. Among them, the short-term reference image is a concept corresponding to the long-term reference image. The short-term reference image exists in the reference image buffer for a period of time. After several move-in and move-out operations of the decoded reference images after the short-term reference image in the reference image buffer, the short-term reference image will be moved out of the reference image buffer. The reference image buffer can also be referred to as a reference image list cache, reference image list, reference frame list cache, or reference frame list, etc., and will be collectively referred to as the reference image buffer in this article.

[0170] The long-term reference image (or a part of the data in the long-term reference image) can always exist in the reference image buffer. The long-term reference image (or a part of the data in the long-term reference image) is not affected by the move-in and move-out operations of the decoded reference images in the reference image buffer. Only when an update instruction operation is issued at the decoding end, the long-term reference image (or a part of the data in the long-term reference image) will be moved out of the reference image buffer.

[0171] The names of short-term reference images and long-term reference images may be different in different standards. For example, in standards such as H.264 / Advanced Video Coding (AVC) or H.265 / HEVC, the short-term reference image is called the short-term reference frame, and the long-term reference image is called the long-term reference frame. Another example is in standards such as Audio Video Coding Standard (AVS) 1-P2, AVS2-P2, Institute of Electrical and Electronics Engineers (IEEE) 1857.9-P4, etc., where the long-term reference image is called the background picture. Another example is in standards such as VP8, VP9, etc., where the long-term reference image is called the golden frame.

[0172] It should be understood that the use of specific terms in the embodiments of the present application does not mean that they must be applied to a specific scenario. For example, calling the long-term reference image the long-term reference frame does not mean that it must be used in technologies corresponding to standards such as H.264 / AVC or H.265 / HEVC.

[0173] The long-term reference image mentioned above can be constructed from image blocks taken from multiple decoded images, or the existing reference frame (for example, the pre-stored reference frame) can be updated using multiple decoded images. Of course, the specific reference image constructed can also be a short-term reference image. Or, the long-term reference image can also not be a constructed reference image.

[0174] In the above implementation, the specific reference image can include the long-term reference image, and the non-specific reference image can include the short-term reference image.

[0175] Optionally, the type of the reference frame can be identified by a special field in the bitstream structure.

[0176] Optionally, when it is determined that the reference image is a long-term reference image, it is determined that the reference image is a specific reference image; or, when it is determined that the reference image is a frame that is not to be output, it is determined that the reference image is a specific reference image; or, when it is determined that the reference image is a constructed frame, it is determined that the reference image is a specific reference image; or, when it is determined that the reference image is a frame that is not to be output and it is further determined that the reference image is a constructed frame, it is determined that the reference image is a specific reference image.

[0177] Optionally, various types of reference images can have corresponding identifiers. In this case, for the decoding end, it can determine whether a reference image is a specific reference image based on the identifier of the reference image.

[0178] In some implementation manners, when it is determined that a reference image has the identifier of a long-term reference image, it is determined that the reference image is a specific reference image.

[0179] In some implementation manners, when it is determined that a reference image has the identifier of not being output, it is determined that the reference image is a specific reference image.

[0180] In some implementation manners, when it is determined that a reference image has the identifier of a constructed frame, it is determined that the reference image is a specific reference image.

[0181] In some implementation manners, when it is determined that a reference image has at least two of the following three identifiers, it is determined that the reference image is a specific reference image: the identifier of a long-term reference image, the identifier of not being output, the identifier of a constructed frame or a synthesized reference frame. For example, when it is determined that a reference image has the identifier of not being output and it is determined that the reference image has the identifier of a constructed frame, it is determined that the reference image is a specific reference image.

[0182] Specifically, an image can have an identifier indicating whether it is an output frame. When a certain image is indicated as not being output, it indicates that this frame is a reference image. Further, it is determined whether this frame has the identifier of a constructed frame. If so, it is determined that the reference image is a specific reference image. If a certain image is indicated as being output, the determination of whether it is a constructed frame may not be performed, and it is directly determined that this frame is not a specific reference image. Or, if a certain image is indicated as not being output but has an identifier of not being a constructed frame, it can be determined that this frame is not a specific reference image.

[0183] Optionally, when it is determined that the reference image meets one of the following conditions by parsing parameters from a picture header, a picture parameter set (PPS), or a slice header, it is determined that the reference image is a specific reference image:

[0184] The reference image is a long-term reference image;

[0185] The reference image is a constructed reference image;

[0186] The reference image is an image not to be output;

[0187] When the reference image is an image not to be output, it is further determined whether the reference image is a constructed reference image.

[0188] In some implementation manners of the embodiments of the present application, in the process of determining the motion vector of the current image block, it is involved to use the motion vector of a certain image block on another image to determine the motion vector of this image block. For the convenience of description, this image block is called the first image block, and a certain image block on another image to be used is called the temporal reference block or the related block of the first image block. It can be understood that the first image block and the temporal reference block (or related block) of the first image block are located on different images. Then, in the process of using the motion vector of the temporal reference block (or related block) to determine the motion vector of the first image block, it may be necessary to scale the motion vector of the temporal reference block (or related block). For the convenience of description, the term "related block" is uniformly used in this article.

[0189] For example, when the ATMVP technology is applied to construct the AMVP candidate list, when determining the motion vector of the related block of the current image block according to the ATMVP technology, it is necessary to scale the motion vector of the related block, and then determine the motion vector of the current image block according to the scaled motion vector. Generally speaking, based on the time distance between the reference image pointed to by the motion vector of the related block and the image where the related block is located, and the time distance between the reference image of the current image block and the image where the current image block is located, the scaling ratio of the motion vector of the related block is determined.

[0190] In an example, the motion vector of the related block is called MV2, and the reference frame index value of the reference image pointed to by the motion vector MV2 is x. Wherein, the reference frame index value x is the difference between the sequence number (such as POC) of the reference image pointed to by MV2 and the sequence number of the image where the related block is located. The reference frame index value of the reference image of the first image block is called y. Wherein, the reference frame index value y is the difference between the sequence number of the reference image of the first image block and the sequence number of the image where the first image block is located. Then, the scaling ratio of the motion vector MV2 is y / x. Optionally, the product of the motion vector MV2 and y / x can be used as the motion vector of the first image block.

[0191] However, when the motion vector MV2 of the related block points to a specific reference image, or when the reference image of the first image block is a specific reference image, since the time distance between the specific reference image and the image where the first image block is located is not clearly defined, it is meaningless to scale the motion vector MV2 of the related block.

[0192] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vectors of relevant blocks, specifically: when the motion vector of the relevant block points to a specific reference image, or the reference image of the current image block is a specific reference image, determine the motion vector of the current image block based on the motion vector of the processed relevant block, where the motion vector of the processed relevant block is the same as that of the unprocessed relevant block.

[0193] For example, the motion vector of the processed relevant block includes: the motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or the motion vector of the relevant block that skips the scaling step.

[0194] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vectors of relevant blocks, specifically: when the motion vector of the relevant block points to a specific reference image, or the reference image of the current image block is a specific reference image, abandon determining the motion vector of the current image block based on the motion vector of the relevant block.

[0195] In some embodiments, step S120 includes: when no candidate motion vector that meets the preset conditions is scanned among the N candidate motion vectors, perform a scaling process on a specific candidate motion vector in the second candidate list of motion vectors, and determine a reference motion vector based on the scaled specific candidate motion vector. In this case, optionally, the method further includes: when the specific candidate motion vector points to a specific reference image, or the reference image of the current image block is a specific reference image, determine the candidate motion vector to continue to be added to the second candidate list of motion vectors based on the processed specific candidate motion vector, where the processed specific candidate motion vector is the same as the unprocessed specific candidate motion vector.

[0196] Among them, the motion vector of the processed relevant block includes: the motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or the motion vector of the relevant block that skips the scaling step.

[0197] In some embodiments, step S120 includes: when no candidate motion vector that meets the preset conditions is scanned among the N candidate motion vectors, perform a scaling process on a specific candidate motion vector in the second candidate list of motion vectors, and determine a reference motion vector based on the scaled specific candidate motion vector. In this case, optionally, the method further includes: when the specific candidate motion vector points to a specific reference image, or the reference image of the current image block is a specific reference image, abandon determining the candidate motion vector to continue to be added to the second candidate list of motion vectors based on the specific candidate motion vector.

[0198] As described above, in the embodiment of the present application, during the process of obtaining the reference motion vector of the current image block, only N (N is less than M) of the M candidate motion vectors that have been obtained are sequentially scanned. Compared with the prior art, the number of scans of the candidate motion vectors during the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that applying the solution provided by the present application to the existing ATMVP technology can simplify the redundant operations existing therein.

[0199] In the case that no candidate motion vector with the same co-located frame between the reference frame and the current frame is scanned among the N candidate motion vectors, one of the N candidate motion vectors is scaled so that its reference frame is the same as the co-located frame of the current frame, and then this scaled candidate motion vector is used as the motion vector of the current image block, which can improve the accuracy of the motion vector of the current image block.

[0200] The current image block is divided into sub-image blocks of size 8×8. On the one hand, it can adapt to the storage granularity of the motion vector specified in the video standard VVC. On the other hand, there is no need to store the information about the size of the sub-blocks of the previous encoded image block. Therefore, the storage space can be saved.

[0201] In some embodiments of the present application, when the size of the sub-image block and / or the size of the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0202] In some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved and the encoding efficiency can be improved.

[0203] As Figure 4 shown, the embodiment of the present application also provides a video image processing method, which includes the following steps.

[0204] S410, obtain M candidate motion vectors to be added to the second candidate list of the motion vector of the current image block.

[0205] Step S410 corresponds to step S110 described above. For the specific description, refer to the above, and it will not be elaborated here.

[0206] S420, sequentially scan at least some of the M candidate motion vectors, and determine the reference motion vector of the current image block according to the scan result.

[0207] As an alternative implementation, some of the M candidate motion vectors are sequentially scanned, and the reference motion vector of the current image block is determined according to the scanning result. In this implementation, step S420 may correspond to step S120 described above, and for the specific description, please refer to the above text.

[0208] As another alternative implementation, all of the M candidate motion vectors are sequentially scanned, and the reference motion vector of the current image block is determined according to the scanning result.

[0209] It should be understood that in step S420, the specific manner of determining the reference motion vector of the current image block according to the scanning result may refer to the relevant description in the above embodiments, and will not be elaborated here.

[0210] S430, divide the current image block into a plurality of sub-image blocks, where the size of the sub-image block is fixed to be greater than or equal to 64 pixels.

[0211] For example, if the current image block is a CU, the sub-image blocks obtained after dividing it can be referred to as sub-CUs.

[0212] S440, determine the relevant blocks of the sub-image blocks in the reference image of the current image block according to the reference motion vector.

[0213] The reference image of the current image block may be the co-located frame of the current image block.

[0214] S450, determine the candidate motion vectors to be continuously added to the second candidate list of motion vectors according to the motion vectors of the relevant blocks.

[0215] In the current ATMVP technology, the size of the sub-image blocks is set adaptively at the frame level. The default size of the sub-image blocks is 4×4, and when certain conditions are met, the size of the sub-image blocks is set to 8×8. For example, at the encoding end, when encoding the current image block, calculate the average block size of each sub-image block in the CU during the ATMVP mode encoding of the previous encoded image block in the same temporal layer. When the average block size is greater than the threshold, the size of the sub-image blocks of the current image block is set to 8×8, otherwise the default value 4×4 is used. In other words, in the prior art, when encoding the current image block, it is also necessary to store the information of the size of the sub-image blocks of the previous encoded image block in the same temporal layer.

[0216] In the embodiment of the present application, the size of the sub-image blocks of the current image block is fixed to be greater than or equal to 64 pixels, and there is no need to store the information of the size of the sub-image blocks of the previous encoded image block. Therefore, the storage space can be saved.

[0217] Optionally, in this embodiment, the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed to 8×8 pixels.

[0218] In the current ATMVP technology, the size of the sub-image block is set adaptively at the frame level. The default size of the sub-image block is 4×4. When certain conditions are met, the size of the sub-image block is set to 8×8. For example, at the encoding end, when encoding the current image block, calculate the average block size of each sub-image block in the CU during ATMVP mode encoding of the previous encoded image block in the same temporal layer. When the average block size is greater than the threshold, the size of the sub-image block of the current image block is set to 8×8; otherwise, the default value 4×4 is used. Currently, in the new generation of video coding standard (Versatile Video Coding, VVC), the motion vectors are stored in a size of 8×8. It should be understood that when the size of the sub-image block is set to 4×4, the size of the motion vector of this sub-image block (also 4×4) does not conform to the storage granularity of the motion vectors in the current standard. In addition, in the current ATMVP technology, when encoding the current image block, it is also necessary to store the information of the size of the sub-image block of the previous encoded image block in the same temporal layer.

[0219] In the embodiment of this application, setting the size of the sub-image block of the current image block to 8×8 can, on the one hand, adapt to the storage granularity of the motion vectors specified in the video standard VVC, and on the other hand, there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.

[0220] In some embodiments of this application, when the size of the sub-image block and / or the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0221] In some embodiments of this application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved and the encoding efficiency can be improved.

[0222] It should be understood that on the premise that the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to be equal to 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block can also be other sizes. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is A×B, where A≤64, B≤64, and both A and B are integers divisible by 4. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is 4×16 pixels, or 16×4 pixels.

[0223] Optionally, in step S420, at least some of the candidate motion vectors are scanned in sequence. When the first candidate motion vector that meets the preset conditions is scanned, the scanning stops, and the reference motion vector is determined according to the first candidate motion vector that meets the preset conditions.

[0224] Determining the reference motion vector according to the first candidate motion vector that meets the preset conditions may include: using the first candidate motion vector that meets the preset conditions as the target neighboring block.

[0225] Optionally, the preset conditions include: the reference image of the candidate motion vector is the same as the reference image of the current image block.

[0226] Optionally, step S450 includes: when the motion vector of the related block points to a specific reference image, or the reference image of the current image block is a specific reference image, determining the candidate motion vector to be continuously added to the second candidate list of motion vectors according to the motion vector of the processed related block, where the motion vector of the processed related block is the same as the motion vector of the related block before processing.

[0227] For example, the motion vector of the processed related block includes: the motion vector obtained by scaling the motion vector of the related block according to a scaling ratio of 1, or the motion vector of the related block that skips the scaling step.

[0228] Optionally, step S450 includes: when the motion vector of the related block points to a specific reference image, or the reference image of the current image block is a specific reference image, abandoning the candidate motion vector determined according to the motion vector of the related block to be continuously added to the second candidate list of motion vectors.

[0229] Therefore, Figure 4 In the shown embodiment, the current image block is divided into sub-image blocks of size 8×8. On the one hand, it can adapt to the storage granularity of the motion vectors specified in the video standard VVC. On the other hand, there is no need to store the information about the size of the sub-blocks of the previous encoded image block. Therefore, the storage space can be saved.

[0230] In some embodiments of the present application, when the size of the sub-image block and / or the size of the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0231] In some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved, and the encoding efficiency can be improved.

[0232] The method for determining candidates to be added to the second candidate list of motion vectors according to the ATMVP technology is described above. In some implementations, other candidates can also be added to the second candidate list of motion vectors, which is not limited here.

[0233] As described above in connection with Figure 1 and Figure 4 the method embodiments of the present application are described. The apparatus embodiments corresponding to the above method embodiments will be described below. It should be understood that the description of the apparatus embodiments corresponds to the description of the method embodiments. Therefore, the content not described in detail can be referred to the previous method embodiments, and for the sake of brevity, it will not be repeated here.

[0234] Figure 5 FIG. 500 is a schematic block diagram of a video image processing apparatus 500 provided in an embodiment of the present application. The apparatus 500 is used to execute the method embodiment as shown in Figure 1 The apparatus 500 includes the following units.

[0235] An obtaining unit 510, configured to obtain M candidate motion vectors for adding to the second candidate list of motion vectors of the current image block;

[0236] A determining unit 520, configured to sequentially scan N candidate motion vectors among the M candidate motion vectors, and determine a reference motion vector according to the scanning result, where N is less than M;

[0237] The determining unit 520 is further configured to determine candidate motion vectors to be continuously added to the second candidate list of motion vectors according to the reference motion vector, the current image block, and the reference image of the current image block;

[0238] The determining unit 520 is further configured to determine the motion vector of the current image block according to the second candidate list of motion vectors.

[0239] In the first step of the existing ATMVP technology, the temporal vector of the current image block is obtained by scanning all the candidate motion vectors that have been added to the second candidate list of motion vectors. For example, if the second candidate list of motion vectors is usually filled with 4 candidate motion vectors, the following situation may occur: it is necessary to scan 4 candidate motion vectors to obtain the temporal vector of the current image block.

[0240] In the embodiment of the present application, during the process of obtaining the reference motion vector of the current image block, only N (N is less than M) of the M candidate motion vectors that have been obtained are sequentially scanned. Compared with the prior art, the number of scans of candidate motion vectors during the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that applying the solution provided by the present application to the first step of the existing ATMVP technology can simplify the redundant operations existing therein.

[0241] The applicant selects the official common test sequences as the test sequences on the latest reference software VTM-2.0 of Versatile Video Coding, and the test configurations are the RA configuration and the LDB configuration, and tests the solution provided by the present application. The test results show that after reducing the number of scans, the performance gain of the ATMVP technology can still be maintained.

[0242] Therefore, the solution provided by the present application can reduce the complexity of the ATMVP technology on the premise of maintaining the performance gain of the existing ATMVP technology.

[0243] Optionally, as an embodiment, the obtaining unit 510 is configured to obtain M candidate motion vectors for adding to the second candidate list of motion vectors of the current image block according to the motion vectors of M neighboring blocks of the current image block within the current frame.

[0244] Optionally, as an embodiment, the neighboring blocks are image blocks that are adjacent to the position of the current image block or have a certain position spacing on the current frame.

[0245] Optionally, as an embodiment, the determining unit 520 is configured to sequentially scan the first N candidate motion vectors among the M candidate motion vectors.

[0246] Optionally, as an embodiment, M is equal to 4 and N is less than 4.

[0247] Optionally, as an embodiment, N is equal to 1 or 2.

[0248] Optionally, as an embodiment, the determining unit 520 is configured to sequentially scan N candidate motion vectors among the M candidate motion vectors based on a preset condition, and determine the reference motion vector according to the scanning result.

[0249] Optionally, as an embodiment, the preset condition includes: a candidate motion vector whose pointed reference frame is the same as the reference image of the current image block.

[0250] Optionally, as an embodiment, the determining unit 520 is configured to sequentially scan the N candidate motion vectors, and stop scanning when the first candidate motion vector that meets the preset condition is scanned, and determine the reference motion vector according to the first candidate motion vector that meets the preset condition.

[0251] Optionally, as an embodiment, when the determining unit 520 does not scan a candidate motion vector that meets the preset condition among the N candidate motion vectors, it scales a specific candidate motion vector in the second candidate list of motion vectors, and determines the reference motion vector according to the scaled specific candidate motion vector.

[0252] Optionally, as an embodiment, the specific candidate motion vector is the first motion vector or the last motion vector obtained in the scanning order among the N candidate motion vectors.

[0253] Optionally, as an embodiment, the determining unit 520 is configured to scale a specific candidate motion vector in the second candidate list of motion vectors so that the reference frame pointed to by the scaled specific candidate motion vector is the same as the reference image of the current image block; and use the scaled specific candidate motion vector as the reference motion vector.

[0254] Optionally, as an embodiment, when the determining unit 520 does not scan a candidate motion vector that meets the preset condition among the N candidate motion vectors, it uses a default value as the reference motion vector.

[0255] Optionally, as an embodiment, the default value is the motion vector (0, 0).

[0256] Optionally, as an embodiment, the determining unit 520 is configured to divide the current image block into multiple sub-image blocks; determine the relevant blocks of the sub-image blocks in the reference image of the current image block according to the reference motion vector; and determine the candidate motion vectors to be continuously added to the second candidate list of motion vectors according to the motion vectors of the relevant blocks.

[0257] Optionally, as an embodiment, the size of the sub-image block and / or the size of the relevant block of the sub-image block is fixed to be greater than or equal to 64 pixels.

[0258] Optionally, as an embodiment, the current image block is a coding unit CU.

[0259] Optionally, as an embodiment, the determining unit 520 is configured to determine a relevant block of the current image block in the reference image of the current image block according to a reference motion vector; and determine a candidate motion vector to be continuously added to the second candidate list of motion vectors according to the motion vector of the relevant block.

[0260] Optionally, as an embodiment, the determining unit 520 is configured to, when the motion vector of the relevant block points to a specific reference image, or the reference image of the current image block is a specific reference image, determine a candidate motion vector to be continuously added to the second candidate list of motion vectors according to the processed motion vector of the relevant block, where the processed motion vector of the relevant block is the same as the unprocessed motion vector of the relevant block.

[0261] Optionally, as an embodiment, the processed motion vector of the relevant block includes: a motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or the motion vector of the relevant block that skips the scaling step.

[0262] Optionally, as an embodiment, the determining unit 520 is configured to, when the motion vector of the relevant block points to a specific reference image, or the reference image of the current image block is a specific reference image, discard the candidate motion vector determined to be continuously added to the second candidate list of motion vectors according to the motion vector of the relevant block.

[0263] Optionally, as an embodiment, the determining unit 520 is configured to, when a specific candidate motion vector points to a specific reference image, or the reference image of the current image block is a specific reference image, determine a candidate motion vector to be continuously added to the second candidate list of motion vectors according to the processed specific candidate motion vector, where the processed specific candidate motion vector is the same as the unprocessed specific candidate motion vector.

[0264] Optionally, as an embodiment, the processed motion vector of the relevant block includes: a motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or the motion vector of the relevant block that skips the scaling step.

[0265] Optionally, as an embodiment, the determining unit 520 is configured to, when a specific candidate motion vector points to a specific reference image, or the reference image of the current image block is a specific reference image, discard the candidate motion vector determined to be continuously added to the second candidate list of motion vectors according to the specific candidate motion vector.

[0266] Optionally, as an embodiment, the second candidate list of motion vectors is a Merge candidate list.

[0267] Optionally, as an embodiment, the reference image of the current image block is the co-located frame of the current image block.

[0268] Optionally, as an embodiment, the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed to 8×8 pixels.

[0269] Optionally, in some embodiments of the present application, when the size of the sub-image block and / or the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0270] Optionally, in some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved, and the encoding efficiency can be improved.

[0271] It should be understood that the acquisition unit 510 and the determination unit 520 in this embodiment can both be implemented by a processor.

[0272] As Figure 6 shown, an embodiment of the present application further provides a video image processing device 600. The device 600 is used to execute the method embodiment as Figure 4 shown. The device 600 includes the following units.

[0273] A determination unit 610, configured to obtain M candidate motion vectors for adding to the second candidate list of motion vectors of the current image block;

[0274] A determination unit 620, configured to sequentially scan at least some of the M candidate motion vectors, and determine the reference motion vector of the current image block according to the scanning result;

[0275] A partitioning unit 630, configured to partition the current image block into a plurality of sub-image blocks, where the size of the sub-image block is fixed to be greater than or equal to 64 pixels;

[0276] The determination unit 620 is further configured to determine the related block of the sub-image block in the reference image of the current image block according to the reference motion vector;

[0277] The determination unit 620 is further configured to determine the candidate motion vector to be continuously added to the second candidate list of motion vectors according to the motion vector of the related block.

[0278] In the current ATMVP technology, the size of the sub-image block is set adaptively at the frame level. The default size of the sub-image block is 4×4, and when certain conditions are met, the size of the sub-image block is set to 8×8. For example, at the encoding end, when encoding the current image block, calculate the average block size of each sub-image block in the CU during the ATMVP mode encoding of the previous encoded image block in the same temporal layer. When the average block size is greater than the threshold, the size of the sub-image block of the current image block is set to 8×8; otherwise, the default value of 4×4 is used. In other words, in the prior art, when encoding the current image block, it is also necessary to store the information about the size of the sub-image block of the previous encoded image block in the same temporal layer.

[0279] In the embodiments of the present application, the size of the sub-image block of the current image block is fixed to be greater than or equal to 64 pixels, and there is no need to store the information about the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.

[0280] Optionally, as an embodiment, the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed to 8×8 pixels.

[0281] Currently, in the new generation of video coding standard (Versatile Video Coding, VVC), the motion vector is stored in a size of 8×8. In the embodiments of the present application, the size of the sub-image block of the current image block is set to 8×8. On the one hand, it can adapt to the storage granularity of the motion vector specified in the video standard VVC. On the other hand, there is no need to store the information about the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.

[0282] In some embodiments of the present application, when the size of the sub-image block and / or the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0283] In some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved and the encoding efficiency can be improved.

[0284] Optionally, as an embodiment, the determination unit 620 is configured to sequentially scan at least some of the candidate motion vectors, stop scanning when the first candidate motion vector that meets the preset conditions is scanned, and determine the reference motion vector according to the first candidate motion vector that meets the preset conditions.

[0285] Optionally, as an embodiment, the determining unit 620 is configured to use the first candidate motion vector that meets the preset conditions as the target neighboring block.

[0286] Optionally, as an embodiment, the preset conditions include: the reference image of the candidate motion vector is the same as the reference image of the current image block.

[0287] It should be understood that the obtaining unit 610, the determining unit 620, and the dividing unit 630 in this embodiment can all be implemented by a processor.

[0288] In the above description, the motion vector of an image block contains two pieces of information: 1) the image pointed to by the motion vector; 2) the displacement. In some application scenarios, the motion vector of an image block only contains the information of "displacement". The image block additionally provides index information for indicating the reference image of the image block. For an encoded / decoded image block, the meaning included in its motion vector is: the displacement of the reference block of the encoded / decoded image block relative to the position of the encoded / decoded image block on the reference image and located in the image block on the reference image. When determining the reference block of the encoded / decoded image block, it is necessary to determine the reference block of the encoded / decoded image block through the index information of the reference image of the encoded / decoded image block and the motion vector of the encoded / decoded image block. Then, in Figure 1 In the video image processing method shown, step S120 does not scan the candidate motion vectors in the second candidate list of motion vectors, but directly scans the image blocks corresponding to the candidate motion vectors. In the following, for the new definition of the motion vector (that is, including the "displacement" information but not including the "pointed image"), a video image processing method is provided. It should be noted that the methods for determining candidate motion vectors based on the ATMVP technology provided for these two different meanings of the "motion vector" are basically the same, and the explanations in the above also apply to the video image processing method provided below. The main difference is that when constructing the second candidate list of motion vectors and determining the candidates to be added to the second candidate list of motion vectors according to the ATMVP technology, in the video image processing method described above, the motion vectors already added to the second candidate list of motion vectors are scanned, while in the video image processing method provided below, the image blocks corresponding to the motion vectors already added to the second candidate list of motion vectors are scanned.

[0289] As Figure 7 shown, an embodiment of the present application provides a video image processing method, and the method includes the following steps.

[0290] S710, determine M neighboring blocks of the current image block.

[0291] The current image block is the image block to be encoded (or decoded). For example, the current image block is a coding unit (CU).

[0292] The image frame where the current image block is located is called the current frame.

[0293] The neighboring block is an image block on the current image that is adjacent to the position of the current image block or has a certain position spacing.

[0294] The M neighboring blocks are the image blocks that have been encoded (or decoded) within the current frame.

[0295] As an example, as Figure 2 shown, in the order of the image blocks located at 4 positions A1 (left) → B1 (upper) → B0 (upper right) → A0 (lower left) around the current image block as shown in Figure 2 , the 4 neighboring blocks of the current image block are determined in sequence.

[0296] S720, scan the N neighboring blocks among the M neighboring blocks in sequence, and determine the target neighboring block according to the scan result, where N is less than M.

[0297] The process of determining the target neighboring block according to the scan results of the N neighboring blocks can be to judge the N neighboring blocks in sequence based on a preset condition, and determine the target neighboring block according to the judgment result.

[0298] As an example, the definition of the preset condition is that the reference image of the neighboring block is the same as the reference image of the current image block.

[0299] Among them, the reference image of the current image block is the reference image with the closest image time distance to the current image block; or, the reference image of the current image block is the reference image preset at the encoding / decoding end; or, the reference image of the current image block is the reference image specified in the video parameter set, sequence header, sequence parameter set, picture header, picture parameter set, slice header.

[0300] For example, the reference image of the current image block is the co-located frame of the current image block, and the co-located frame is the frame set in the slice-level information header for obtaining motion information for prediction.

[0301] It should be understood that according to the evolution of future technologies, the preset condition may be given other different definitions, and the corresponding solutions also fall within the protection scope of this application.

[0302] The process of determining the target neighboring block according to the scan results of the N neighboring blocks will be described in detail below.

[0303] In step S720, only scan the N neighboring blocks among the M neighboring blocks obtained in step S710, which can reduce the number of scans.

[0304] Optionally, in step S720, the first N neighboring blocks among the M neighboring blocks may be scanned in sequence.

[0305] When, in step S710, the M neighboring blocks of the current image block are sequentially determined in a preset order, the first N neighboring blocks obtained in step S720 refer to the first N neighboring blocks determined in this preset order.

[0306] Optionally, in step S720, the last N neighboring blocks among the M neighboring blocks may be scanned in sequence; or, the middle N neighboring blocks among the M neighboring blocks may be scanned in sequence. This application does not limit this.

[0307] S730. Determine the relevant block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block.

[0308] S740. Encode / decode the current image block according to the motion vector of the relevant block.

[0309] Optionally, step S740 includes: determining the reference block of the current image block according to the motion vector of the relevant block and the reference image.

[0310] For example, step S740 includes: constructing a candidate block list of the current image block, where the candidate blocks in the candidate block list include the M neighboring blocks and the relevant block; encoding and decoding the current image block according to the reference blocks of the candidate blocks in the candidate block list.

[0311] In one example, the candidate block list is the merge candidate list of the current image block. In one example, the candidate block list is the AMVP candidate list of the current image block.

[0312] At the encoding end, write the index of the candidate block of the current block into the code stream. At the decoding end, after obtaining the index, find the candidate block corresponding to the index from the candidate block list, determine the reference block of the current image block according to the reference block of the candidate block, or determine the motion vector of the current image block according to the motion vector of the candidate block.

[0313] For example, directly determine the reference block of the current image block with the reference block of the candidate block, or directly determine the motion vector of the current image block with the motion vector of the candidate block. For another example, the encoding end also writes the MVD of the current block into the code stream. After the decoding end obtains the MVD, add the motion vector of the candidate block and the MVD as the motion vector of the current block, and then determine the reference block of the current block according to the motion vector and the reference image of the current block.

[0314] In the embodiments of the present application, during the process of obtaining the target neighboring block of the current image block, only N (N is less than M) out of the M obtained neighboring blocks are sequentially scanned. Compared with the prior art, the number of scans of candidate neighboring blocks during the process of obtaining the target neighboring block of the current image block can be reduced, thereby reducing the complexity.

[0315] Optionally, in this embodiment, in step S710, 4 neighboring blocks of the current image block within the current frame are determined, that is, M is equal to 4. In step S720, N out of the 4 neighboring blocks are scanned, and N is less than 4.

[0316] For example, N is equal to 1. For example, in step S720, only the first neighboring block among the 4 neighboring blocks is scanned.

[0317] For another example, N is equal to 2 or 3.

[0318] The following will describe the method of determining the target neighboring block according to the scanning results of the N neighboring blocks in step S720.

[0319] Optionally, in step S720, the N neighboring blocks are sequentially scanned. When the first neighboring block that meets the preset condition is scanned, the scanning stops, and the target neighboring block is determined according to the first neighboring block that meets the preset condition.

[0320] For example, the definition of the preset condition is that the reference image of the neighboring block is the same as the reference image of the current image block.

[0321] It should be understood that in future evolving technologies, other definitions may also be given to the preset condition.

[0322] In the following, an example where the definition of the preset condition is that the reference image of the neighboring block is the same as the reference image of the current image block will be described.

[0323] For example, the first neighboring block that meets the preset condition is used as the target neighboring block.

[0324] Optionally, when in step S720, no neighboring block that meets the preset condition is scanned among the N neighboring blocks, the method further includes: scaling the motion vector of a specific neighboring block among the M neighboring blocks, and encoding / decoding the current image block according to the scaled motion vector.

[0325] For example, the reference block of the current image block is determined according to the scaled motion vector and the reference image of the current image block.

[0326] Optionally, the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks.

[0327] This specific neighboring block can also be a neighboring block obtained in other scanning orders among the N neighboring blocks.

[0328] Optionally, encoding / decoding the current image block according to the motion vector after scaling processing includes: scaling the motion vector of the specific neighboring block so that the reference frame pointed to by the motion vector after scaling is the same as the reference image of the current image block; using the image block pointed to by the motion vector after scaling in the reference image of the current image block as the reference block of the current image block.

[0329] Optionally, when in step S720, when no neighboring block that meets the preset conditions is scanned among the N neighboring blocks, the default block is used as the candidate reference block of the current image block.

[0330] For example, the default block is the image block pointed to by the motion vector (0, 0).

[0331] The process of determining the related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block in step S730 will be described below.

[0332] Optionally, as an implementation manner, determining the related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes: dividing the current image block into multiple sub-image blocks; determining the related blocks of the sub-image blocks in the reference image of the current image block according to the motion vector of the target neighboring block, and the related block of the current image block includes the related blocks of the sub-image blocks.

[0333] The related block can be referred to as a collocated block or a corresponding block.

[0334] For example, when the current image block is a CU, the sub-image blocks obtained after division can be called sub-CUs.

[0335] Optionally, the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to be greater than or equal to 64 pixels.

[0336] Optionally, the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed to 8×8 pixels.

[0337] In the current ATMVP technology, the size of the sub-image block is set adaptively at the frame level. The default size of the sub-image block is 4×4, and when certain conditions are met, the size of the sub-image block is set to 8×8. For example, at the encoding end, when encoding the current image block, calculate the average block size of each sub-image block in the CU during the ATMVP mode encoding of the previous encoded image block in the same temporal layer. When the average block size is greater than the threshold, the size of the sub-image block of the current image block is set to 8×8; otherwise, the default value of 4×4 is used. Currently, in the new generation of video coding standard (Versatile Video Coding, VVC), the motion vector is stored in a size of 8×8. It should be understood that when the size of the sub-image block is set to 4×4, the size of the motion vector of this sub-image block (also 4×4) does not conform to the storage granularity of the motion vector in the current standard. In addition, in the current ATMVP technology, when encoding the current image block, it is also necessary to store the information of the size of the sub-image block of the previous encoded image block in the same temporal layer.

[0338] In the embodiments of the present application, setting the size of the sub-image block of the current image block to 8×8 can, on the one hand, adapt to the storage granularity of the motion vector specified in the video standard VVC, and on the other hand, there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.

[0339] In some embodiments of the present application, when the size of the sub-image block and / or the size of the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0340] In some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved and the encoding efficiency can be improved.

[0341] It should be understood that on the premise of ensuring that the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be equal to 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block can also be other sizes. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is A×B, where A≤64, B≤64, and both A and B are integers of 4. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is 4×16 pixels, or 16×4 pixels.

[0342] Optionally, as another implementation, determine the relevant block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, including: determining the relevant block of the current image block in the reference image of the current image block according to the motion vector of the target neighboring block.

[0343] Optionally, step S740 includes: when the reference image of the relevant block is a specific reference image, or the reference image of the current image block is a specific reference image, determine the candidate reference block of the current image block according to the motion vector of the processed relevant block and the reference image of the current image block; wherein, the motion vector of the processed relevant block is the same as the motion vector of the relevant block before processing.

[0344] For example, the motion vector of the processed relevant block includes: the motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or the motion vector of the relevant block that skips the scaling step.

[0345] Optionally, step S740 includes: when the reference image of the relevant block is a specific reference image, or the reference image of the current block is a specific reference image, discard the determination of the candidate reference block of the current image block according to the motion vector of the relevant block.

[0346] In some embodiments, step S720 includes: when the motion vector of a specific neighboring block points to a specific reference image, or the reference image of the current image block is a specific reference image, determine the reference block of the current image block according to the motion vector of the processed relevant block and the reference image of the current image block; wherein, the motion vector of the processed relevant block is the same as the motion vector of the relevant block before processing.

[0347] Among them, the motion vector of the processed relevant block includes: the motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or the motion vector of the relevant block that skips the scaling step.

[0348] As can be seen from the above, in the embodiment of the present application, in the process of obtaining the target neighboring block of the current image block, only N (N is less than M) of the M neighboring blocks that have been obtained are scanned in sequence. Compared with the prior art, the number of scans of candidate neighboring blocks in the process of obtaining the target neighboring block of the current image block can be reduced, thereby reducing the complexity.

[0349] In the case that no neighboring block with a reference frame identical to the co-located frame of the current frame is scanned among the N neighboring blocks, scale the motion vector of one of the N neighboring blocks so that its reference frame is identical to the co-located frame of the current frame, and then use this scaled motion vector as the motion vector of the current image block, which can improve the accuracy of the motion vector of the current image block.

[0350] The current image block is divided into sub-image blocks of size 8×8. On the one hand, it can adapt to the storage granularity of motion vectors specified in the video standard VVC. On the other hand, there is no need to store the information about the size of the sub-blocks of the previous encoded image block. Therefore, the storage space can be saved.

[0351] In some embodiments of the present application, when the size of the sub-image block and / or the size of the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0352] In some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved and the encoding efficiency can be improved.

[0353] In some implementation manners of the embodiments of the present application, in the process of determining the motion vector of the current image block, it is involved to use the motion vector of a certain image block on another image to determine the motion vector of this image block. For the convenience of description, this image block is called the first image block, and a certain image block on another image to be used is called the temporal reference block or related block of the first image block. It can be understood that the first image block and the temporal reference block (or related block) of the first image block are located on different images. Then, in the process of using the motion vector of the temporal reference block (or related block) to determine the motion vector of the first image block, it may be necessary to scale the motion vector of the temporal reference block (or related block). For the convenience of description, the term "related block" is uniformly used in this article.

[0354] For example, when the ATMVP technology is applied to construct the AMVP candidate list, after determining the related block of the current image block according to the ATMVP technology, when determining the motion vector of the current image block according to the motion vector of the related block, it is necessary to scale the motion vector of the related block, and then determine the motion vector of the current image block according to the scaled motion vector. Generally, based on the time distance between the reference image pointed to by the motion vector of the related block and the image where the related block is located, and the time distance between the reference image of the current image block and the image where the current image block is located, the scaling ratio of the motion vector of the related block is determined.

[0355] In one example, the motion vector of the relevant block is called MV2, and the reference frame index value of the reference image pointed to by the motion vector MV2 is x. Herein, the reference frame index value x is the difference between the sequence number (e.g., POC) of the reference image pointed to by MV2 and the sequence number of the image where the relevant block is located. The reference frame index value of the reference image of the first image block is called y. Herein, the reference frame index value y is the difference between the sequence number of the reference image of the first image block and the sequence number of the image where the first image block is located. Then, the scaling ratio of the motion vector MV2 is y / x. Optionally, the product of the motion vector MV2 and y / x can be used as the motion vector of the first image block.

[0356] However, when the motion vector MV2 of the relevant block points to a specific reference image, or when the reference image of the first image block is a specific reference image, since the temporal distance between the specific reference image and the image where the first image block is located is not clearly defined, scaling the motion vector MV2 of the relevant block is meaningless.

[0357] Optionally, in this embodiment, when determining the motion vector of the current image block according to the motion vector of the relevant block, specifically: when the motion vector of the relevant block points to a specific reference image, or when the reference image of the current image block is a specific reference image, determine the motion vector of the current image block according to the motion vector of the processed relevant block, where the motion vector of the processed relevant block is the same as the motion vector of the relevant block before processing.

[0358] For example, the motion vector of the processed relevant block includes: the motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or the motion vector of the relevant block that skips the scaling step.

[0359] Optionally, in this embodiment, when determining the motion vector of the current image block according to the motion vector of the relevant block, specifically: when the motion vector of the relevant block points to a specific reference image, or when the reference image of the current image block is a specific reference image, abandon determining the motion vector of the current image block according to the motion vector of the relevant block.

[0360] As Figure 8 shown, the embodiments of the present application further provide a video image processing method, and the method includes the following steps.

[0361] S810, determine M neighboring blocks of the current image block.

[0362] Step S810 may correspond to step S710 in the above embodiment.

[0363] S820, sequentially scan at least some of the M neighboring blocks, and determine a target neighboring block according to the scanning result.

[0364] Optionally, some of the M neighboring blocks are sequentially scanned, and the target neighboring block is determined according to the scanning result.

[0365] Optionally, all of the M neighboring blocks are sequentially scanned, and the target neighboring block is determined according to the scanning result.

[0366] S830, divide the current image block into multiple sub-image blocks, where the size of the sub-image block is fixed to be greater than or equal to 64 pixels.

[0367] S840, determine the relevant block of the current image block in the reference image of the current image block according to the motion vector of the target neighboring block and the sub-image block.

[0368] Optionally, the reference image of the current image block is the reference image with the closest temporal distance to the image where the current image block is located.

[0369] Optionally, the reference image of the current image block is a reference image preset at the encoding / decoding end.

[0370] Optionally, the reference image of the current image block is the reference image specified in the video parameter set, sequence header, sequence parameter set, picture header, picture parameter set, slice header.

[0371] S850, encode / decode the current image block according to the motion vector of the relevant block.

[0372] In the embodiment of the present application, the size of the sub-image block of the current image block is fixed to be greater than or equal to 64 pixels, and there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.

[0373] Optionally, in this embodiment, the size of the sub-image block and / or the size of the temporal reference block of the sub-image block are both fixed to 8×8 pixels.

[0374] Currently, in the new generation video coding standard (Versatile Video Coding, VVC), the motion vector is stored in a size of 8×8. In the embodiment of the present application, the size of the sub-image block of the current image block is set to 8×8. On the one hand, it can adapt to the storage granularity of the motion vector specified in the video standard VVC. On the other hand, there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.

[0375] In some embodiments of the present application, when the size of the sub-image block and / or the size of the relevant block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding / decoding, and improve the encoding efficiency.

[0376] In some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.

[0377] It should be understood that on the premise that the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be equal to 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block can also be other sizes. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is A×B, where A≤64, B≤64, and both A and B are integers divisible by 4. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is 4×16 pixels, or 16×4 pixels.

[0378] Optionally, step S820 includes: sequentially scanning at least some of the neighboring blocks, and when the first neighboring block that meets the preset condition is scanned, stop scanning, and determine the target neighboring block according to the first neighboring block that meets the preset condition.

[0379] For example, take the first neighboring block that meets the preset condition as the target neighboring block.

[0380] For example, the definition of the preset condition is that the reference image of the neighboring block is the same as the reference image of the current image block.

[0381] Optionally, step S840 includes: determining the related block of the sub-image block in the reference image of the current image block according to the motion vector of the target neighboring block and the sub-image block, where the related block of the current image block includes the related block of the sub-image block.

[0382] As described above in conjunction with Figure 7 and Figure 8 the method embodiments of the present application have been described. The following will describe Figure 7 and Figure 8 the device embodiments corresponding to the method embodiments shown. It should be understood that the description of the device embodiments corresponds to the description of the method embodiments. Therefore, for the content not described in detail, reference can be made to the previous method embodiments. For the sake of brevity, it will not be repeated here.

[0383] Figure 9 FIG. is a schematic block diagram of a video image processing device 900 provided by an embodiment of the present application. The device 900 is used to execute the method embodiment as shown in Figure 7 The device 900 includes the following units.

[0384] An obtaining unit 910, configured to obtain M neighboring blocks of a current image block;

[0385] A determining unit 920, configured to sequentially scan N neighboring blocks among the M neighboring blocks, and determine a target neighboring block according to a scanning result, where N is less than M;

[0386] The determining unit 920 is further configured to determine a relevant block of the current image block according to a motion vector of the target neighboring block, the current image block, and a reference image of the current image block;

[0387] An encoding / decoding unit 930, configured to encode / decoder the current image block according to a motion vector of the relevant block.

[0388] In an embodiment of the present application, in the process of obtaining a target neighboring block of a current image block, only N (N is less than M) neighboring blocks among the already obtained M neighboring blocks are sequentially scanned. Compared with the prior art, the number of times of scanning candidate neighboring blocks in the process of obtaining the target neighboring block of the current image block can be reduced, thereby reducing complexity.

[0389] Optionally, as an embodiment, M is equal to 4 and N is less than 4.

[0390] Optionally, as an embodiment, N is equal to 1 or 2.

[0391] Optionally, as an embodiment, the determining unit 920 is configured to sequentially scan the first N neighboring blocks among the M neighboring blocks.

[0392] Optionally, as an embodiment, the obtaining unit 910 is configured to obtain M neighboring blocks of the current image block in a preset order; the first N neighboring blocks refer to the first N neighboring blocks determined in the preset order.

[0393] Optionally, as an embodiment, the determining unit 920 is configured to sequentially scan the N neighboring blocks, and stop scanning when the first neighboring block that meets a preset condition is scanned, and determine the target neighboring block according to the first neighboring block that meets the preset condition.

[0394] Optionally, as an embodiment, the determining unit 920 is configured to use the first neighboring block that meets the preset condition as the target neighboring block.

[0395] Optionally, as an embodiment, the preset condition includes: a reference image of the neighboring block is the same as a reference image of the current image block.

[0396] Optionally, as an embodiment, the encoding / decoding unit 930 is configured to determine a reference block of the current image block according to a motion vector of the relevant block and a reference image.

[0397] Optionally, as an embodiment, the encoding / decoding unit 930 is configured to construct a candidate block list for the current image block, where the candidate blocks in the candidate block list include M neighboring blocks and associated blocks; and encode and decode the current image block according to the reference blocks of the candidate blocks in the candidate block list.

[0398] Optionally, as an embodiment, the encoding / decoding unit 930 is further configured to, when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, scale the motion vector of a specific neighboring block among the M neighboring blocks, and encode and decode the current image block according to the scaled motion vector.

[0399] Optionally, as an embodiment, the encoding / decoding unit 930 is configured to determine the reference block of the current image block according to the scaled motion vector and the reference image of the current image block.

[0400] Optionally, as an embodiment, the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks.

[0401] Optionally, as an embodiment, the encoding / decoding unit 930 is configured to scale the motion vector of the specific neighboring block such that the reference frame pointed to by the scaled motion vector is the same as the reference image of the current image block; and use the image block pointed to by the scaled motion vector in the reference image of the current image block as the reference block of the current image block.

[0402] Optionally, as an embodiment, the determination unit 920 is configured to, when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, use the default block as the reference block of the current image block.

[0403] Optionally, as an embodiment, the default block is the image block pointed to by the motion vector (0, 0).

[0404] Optionally, as an embodiment, the determination unit 920 is configured to:

[0405] Divide the current image block into multiple sub-image blocks;

[0406] Determine the associated blocks of the sub-image blocks in the reference image of the current image block according to the motion vector of the target neighboring block, where the associated blocks of the current image block include the associated blocks of the sub-image blocks.

[0407] Optionally, as an embodiment, the size of the sub-image blocks and / or the size of the associated blocks of the sub-image blocks is fixed to be greater than or equal to 64 pixels.

[0408] Optionally, in some embodiments of the present application, when the size of the sub-image block and / or the size of the related block of the sub-image block is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0409] Optionally, in some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, it is set not to perform the TMVP operation. In other words, when at least one of the width and height of the sub-image block and / or the related block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. For the above situation, the performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved, and the encoding efficiency can be improved.

[0410] Optionally, as an embodiment, the current image block is a coding unit CU.

[0411] Optionally, as an embodiment, the determination unit 920 is configured to determine the related block of the current image block in the reference image of the current image according to the motion vector of the target neighboring block.

[0412] Optionally, as an embodiment, the neighboring block is an image block adjacent to the position of the current image block on the current image or having a certain position spacing.

[0413] Optionally, as an embodiment, the encoding / decoding unit 930 is configured to, when the reference image of the related block is a specific reference image, or the reference image of the current image block is a specific reference image, determine the reference block of the current image block according to the motion vector of the processed related block and the reference image of the current image block;

[0414] Wherein, the motion vector of the processed related block is the same as the motion vector of the related block before processing.

[0415] Optionally, as an embodiment, the motion vector of the processed related block includes: the motion vector obtained by scaling the motion vector of the related block according to a scaling ratio of 1, or the motion vector of the related block that skips the scaling step.

[0416] Optionally, as an embodiment, the encoding / decoding unit 930 is configured to, when the reference image of the related block is a specific reference image, or the reference image of the current block is a specific reference image, abandon determining the reference block of the current image block according to the motion vector of the related block.

[0417] Optionally, as an embodiment, the determination unit 920 is configured to: when the motion vector of a specific neighboring block points to a specific reference image, or the reference image of the current image block is the specific reference image, determine the reference block of the current image block according to the motion vector of the processed relevant block and the reference image of the current image block; wherein, the motion vector of the processed relevant block is the same as the motion vector of the relevant block before processing.

[0418] Optionally, as an embodiment, the motion vector of the processed relevant block includes: the motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or the motion vector of the relevant block that skips the scaling step.

[0419] It should be understood that the acquisition unit 910, the determination unit 920, and the encoding / decoding unit 930 in this embodiment can all be implemented by a processor.

[0420] As Figure 10 shown, an embodiment of the present application further provides a video image processing device 1000. The device 1000 is used to execute the method embodiment as Figure 8 shown. The device 1000 includes the following units.

[0421] An acquisition unit 1010, configured to acquire M neighboring blocks of the current image block;

[0422] A determination unit 1020, configured to sequentially scan at least some of the M neighboring blocks, and determine a target neighboring block according to the scanning result;

[0423] A partitioning unit 1030, configured to partition the current image block into a plurality of sub-image blocks, wherein the size of the sub-image block is fixed to be greater than or equal to 64 pixels;

[0424] The determination unit 1020 is further configured to determine a relevant block of the current image block in the reference image of the current image block according to the motion vector of the target neighboring block and the sub-image block;

[0425] An encoding / decoding unit 1040, configured to encode / decode the current image block according to the motion vector of the relevant block.

[0426] In the embodiment of the present application, the size of the sub-image block of the current image block is fixed to be greater than or equal to 64 pixels, and there is no need to store the information about the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.

[0427] Optionally, as an embodiment, the size of the sub-image block and / or the size of the temporal reference block of the sub-image block are both fixed to 8×8 pixels.

[0428] Currently, in the new generation of video coding standard (Versatile Video Coding, VVC), motion vectors are stored in a size of 8×8. In the embodiments of the present application, the size of the sub-image block of the current image block is set to 8×8. On the one hand, it can adapt to the storage granularity of the motion vectors specified in the video standard VVC. On the other hand, there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.

[0429] In some embodiments of the present application, when the size of the sub-image block and / or the size of the related block of the sub-image block in the ATMVP technology is 8×8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0430] In some embodiments of the present application, when at least one of the width and height of the current CU is less than 8, it is set not to perform the TMVP operation. The performance impact brought by skipping the TMVP operation can be ignored, so that the time of encoding and decoding can be effectively saved and the encoding efficiency can be improved.

[0431] It should be understood that on the premise of ensuring that the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be equal to 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block can also be other sizes. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is A×B, A≤64, B≤64, and both A and B are integers of 4. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is 4×16 pixels, or 16×4 pixels.

[0432] Optionally, as an embodiment, at least some of the M neighboring blocks are scanned in sequence, and the target neighboring block is determined according to the scanning result, including: at least some of the neighboring blocks are scanned in sequence. When the first neighboring block that meets the preset condition is scanned, the scanning stops, and the target neighboring block is determined according to the first neighboring block that meets the preset condition.

[0433] Optionally, as an embodiment, the determining unit 1020 is configured to use the first neighboring block that meets the preset condition as the target neighboring block.

[0434] Optionally, as an embodiment, the preset condition includes that the reference image of the neighboring block is the same as the reference image of the current image block.

[0435] Optionally, as an embodiment, the determining unit 1020 is configured to determine the related block of the sub-image block in the reference image of the current image block according to the motion vector and the sub-image block of the target neighboring block, where the related block of the current image block includes the related block of the sub-image block.

[0436] It should be understood that the acquisition unit 1010, the determination unit 1020, the division unit 1030, and the encoding / decoding unit 1040 in this embodiment can all be implemented by a processor.

[0437] As Figure 11 shown, an embodiment of the present application further provides a video image processing device 1100. The device 1100 can be used to execute the method embodiment described above. The device 1100 includes a processor 1110 and a memory 1120. The memory 1120 is used to store instructions, and the processor 1110 is used to execute the instructions stored in the memory 1120. And the execution of the instructions stored in the memory 1120 enables the processor 1110 to execute the method according to the method embodiment above.

[0438] Optionally, as Figure 11 shown, the device 1100 may further include a communication interface 1130 for communicating with an external device. For example, the processor 1110 is used to control the communication interface 1130 to receive and / or send signals.

[0439] The devices 500, 600, 900, 1000, and 1100 provided by the present application can be applied to an encoder or a decoder.

[0440] The second candidate list of motion vectors was explained above, and the first candidate list of motion vectors will be explained below.

[0441] In the motion compensation prediction stage, the previous mainstream video coding standards only applied the translational motion model. However, in the real world, there are too many motion forms, such as zooming in / out, rotation, long-shot motion, and other irregular motions. To improve the efficiency of inter-frame prediction, an affine transformation motion compensation model can be introduced into the encoding / decoding technology. The affine transformation motion compensation will describe the affine motion field of an image block through the MVs of a set of control points. In one example, if the affine transformation motion compensation model adopts a four-parameter Affine model, then this set of control points includes two control points (such as the upper left corner point and the upper right corner point of the image block). In one example, if the affine transformation motion compensation model adopts a six-parameter Affine model, then this set of control points includes three control points (such as the upper left corner point, the upper right corner point, and the lower left corner point of the image block).

[0442] In one implementation, when constructing the first candidate list of motion vectors, the candidates added can be the MVs of a set of control points, or referred to as control point motion vector prediction (CPMVP). Optionally, the first candidate list of motion vectors can be used in the Merge mode. Specifically, it can be called the Affine Merge mode. Correspondingly, this first candidate list of motion vectors can be called the affine merge candidate list. In the Affine Merge mode, the prediction in the first candidate list of motion vectors is directly used as the CPMV (Control point motion vector) of the current image block, that is, no affine motion estimation process is required.

[0443] In one implementation, the candidates determined according to the ATMVP technology can be added to the first candidate list of motion vectors.

[0444] Among them, in one example, the control point motion vector group of the relevant block of the current image block is added as a candidate to the first candidate list of motion vectors. When predicting using this candidate in the first list of motion vectors, the current image block is predicted according to the control point motion vector group of the relevant block of the current image block.

[0445] Among them, in one example, as described above, the representative motion vector of the relevant block of the current image block is added as a candidate to the first candidate list of motion vectors. Further, optionally, this candidate is also marked as determined according to the ATMVP technology. When predicting using this candidate in the first candidate list of motion vectors, the relevant block of the current image block is determined according to this mark and the candidate. The current image block and this relevant block are divided into multiple sub-image blocks in the same way. Each sub-image block in the current image block corresponds to each sub-image block in the relevant block one by one. The motion vectors of the corresponding sub-image blocks in the current image block are predicted respectively according to the motion vectors of each sub-image block in this relevant block.

[0446] Among them, optionally, when there is a sub-image block with an unavailable motion vector in the relevant block, the representative motion vector of this relevant block is used to replace this unavailable motion vector to predict the corresponding sub-image block in the current image block. Optionally, when the representative motion vectors of the relevant block are all unavailable, the candidate determined according to the ATMVP technology is not added to the second candidate list of motion vectors. In one example, when the sub-image block in the relevant block is unavailable, or the sub-image block in the relevant block is in the intra-coding mode, it is determined that there is a sub-image block with an unavailable motion vector in this relevant block.

[0447] Among them, optionally, each candidate in the first candidate list of motion vectors includes the motion vectors of a set of control points; when adding the representative motion vector of the related block of the current image block to the first candidate list of motion vectors, to ensure the consistency of the data format, the representative motion vector of the related block can be inserted as the motion vector of each control point in the candidate (that is, the motion vector of each control point in the candidate is assigned the representative motion vector of the related block).

[0448] Among them, optionally, the representative motion vector of the related block of the current image block may refer to the motion vector of the central position of the related block, or other motion vectors representing the related block, which are not limited here.

[0449] According to the description of the second candidate list of motion vectors above, when determining candidates according to the ATMVP technology, it is necessary to determine the related blocks of the current image block. In this solution, when determining candidates to be added to the first candidate list of motion vectors according to the ATMVP technology, there are two methods for determining the related blocks of the current image block:

[0450] Method 1: Scan N adjacent blocks out of the preset M adjacent blocks of the current image block in sequence, determine the target adjacent block according to the scanning result, where N is less than M and M is less than or equal to 4; determine the related block of the current image block according to the motion vector of the target adjacent block, the current image block, and the reference image of the current image block.

[0451] Method 2: Determine M adjacent blocks of the current image block according to M candidates in the second candidate list of motion vectors of the current image block; scan N adjacent blocks out of the M adjacent blocks in sequence, determine the target adjacent block according to the scanning result, where N is less than M and M is less than or equal to 4; determine the related block of the current image block according to the motion vector of the target adjacent block, the current image block, and the reference image of the current image block. Among them, the M candidates in the second candidate list of motion vectors may refer to the M adjacent blocks of the current image block.

[0452] Among them, for the descriptions of the two steps of "determining the target adjacent block according to the scanning result" and "determining the related block of the current image block according to the motion vector of the target adjacent block, the current image block, and the reference image of the current image block" in Method 1 and Method 2, reference can be made to the explanations in the above text and will not be elaborated here.

[0453] In one implementation, the method for determining candidates to be added to the first candidate list of motion vectors includes: determining the control point motion vector groups of adjacent blocks that use the affine transformation mode for prediction from the adjacent blocks of the current image block in a specific scanning order; adding each determined control point motion vector group of an adjacent block as a candidate to the first candidate list of motion vectors.

[0454] In one example, the neighboring block predicted using the affine transformation mode refers to that the motion vector of the neighboring block is determined according to the candidates in the affine merge candidate list. That is, the candidates come from the affine motion models of the spatial neighboring blocks of the current image block using the affine mode; that is, the CPMV of the spatial neighboring block using the affine mode is used as the CPMVP of the current block.

[0455] In one example, the control point motion vector group may include the motion vectors of two control points of the neighboring block (for example, the upper left point and the upper right point of the neighboring block), or include the motion vectors of three control points of the neighboring block (for example, the upper left point, the upper right point, and the lower left point of the image block), depending on whether a four-parameter Affine model or a six-parameter Affine model is adopted.

[0456] In one example, determining the control point motion vector group of the neighboring block predicted using the affine transformation mode in a specific scanning order includes:

[0457] Determining the control point motion vector group of the first neighboring block in the left neighboring block of the current image block in a first scanning order;

[0458] Determining the control point motion vector group of the second neighboring block in the upper neighboring block of the current image block in a second scanning order;

[0459] Adding the control point motion vector group of the first neighboring block and the control point motion vector group of the second neighboring block to the first candidate list of motion vectors.

[0460] For example, as Figure 12 shown, Figure 12 is a schematic diagram of obtaining candidates for the first candidate list of motion vectors through the neighboring blocks of the current image block. On the left side of the current image block, scan in the scanning order of image block A -> image block D -> image block E in sequence, and add the control point motion vector group of the first image block that meets the preset conditions as a candidate to the first candidate list of motion vectors. On the upper side of the current image block, scan in the scanning order of image block B -> image block C in sequence, and add the control point motion vector group of the first image block that meets the preset conditions as a candidate to the first candidate list of motion vectors. Optionally, in this scanning order, if no image block that meets the threshold conditions is found, give up determining candidates in this scanning order.

[0461] In one implementation, the method for determining the candidates added to the first candidate list of motion vectors includes:

[0462] Construct a motion vector of the partial control points according to neighboring blocks of the partial control points of the current image block;

[0463] Add the motion vector of the partial control points of the current image block to the first candidate list of motion vectors.

[0464] That is to say, in this implementation, candidates are constructed and added to the first candidate list of motion vectors. In one example, before adding candidates to the first candidate list of motion vectors by constructing candidates, first determine whether the number of candidates in the first candidate list of motion vectors has reached a preset value (such as 5). If it has not reached the preset value, add candidates to the first candidate list of motion vectors by constructing candidates.

[0465] In one example, the constructed candidate is to combine the motion information of neighboring blocks of partial control points of the current image block and use it as the CPMVP to add to the first candidate list of motion vectors.

[0466] As Figure 13 shown, Figure 13 is a schematic diagram of constructing candidates for the first candidate list of motion vectors through neighboring blocks of the current image block. The current image block has a total of four control points, namely CP1, CP2, CP3, and CP4. Among them, image blocks A0 and A1 are spatial neighboring blocks of CP1; image blocks A2, B2, and B3 are spatial neighboring blocks of CP2; image blocks B0 and B1 are spatial neighboring blocks of CP2, and T is the temporal neighboring block of CP4. The coordinates of control points CP1, CP2, CP3, and CP4 are: (0, 0), (W, 0), (H, 0), and (W, H) respectively, where W and H represent the width and height of the current CU. The acquisition priority of the motion information of the neighboring blocks of each control point is:

[0467] For CP1, the acquisition priority is: B2 -> B3 -> A2. When B2 is available, use the MV of B2 as the MV of control point CP1; when B2 is unavailable, use the MV of B3 as the MV of control point CP1; if both B2 and B3 are unavailable, use the MV of A1 as the MV of control point CP1; if B2, B3, and A1 are all unavailable, the motion information of control point CP1 is unavailable.

[0468] Similarly, for CP2, the acquisition priority is: B1 -> B0; for CP3, the acquisition priority is: A1 -> A0; for CP4, directly use the MV of T as the MV of control point CP4.

[0469] The constructed generated MVs will be inserted only when the MVs of the control points (six-parameter model: CP0, CP1, and CP2; four-parameter model: CP0 and CP1) of the current CU are all available; otherwise, it will directly jump to the next step. After obtaining the MVs of all control points (if any), different combinations of the MVs of the control points can be used to obtain multiple affine candidates, and the combination methods are as follows:

[0470] If a four-parameter affine model is used, one or more candidates can be obtained by combining two of the MVs of the four control points, and two of the combination methods are selected: {CP1, CP2}, {CP1, CP3}. Among them, for the combination method {CP1, CP3}, the MVs of the two selected control points need to be converted into the MVs of the upper-left and upper-right control points (CP1 and CP2) of the current CU according to the four-parameter model.

[0471] If a six-parameter affine model is used, one or more candidates can be obtained by combining three of the MVs of the four control points, and four combination methods are selected: {CP1, CP2, CP4}, {CP1, CP2, CP3}, {CP2, CP3, CP4}, {CP1, CP3, CP4}. Among them, for the combination methods {CP1, CP2, CP3}, {CP2, CP3, CP4}, {CP1, CP3, CP4}, the MVs of the three selected control points need to be converted into the MVs of the upper-left, upper-right, and lower-left control points (CP1, CP2, and CP3) of the current CU according to the six-parameter model.

[0472] In an example, if the reference frames used for the MVs (two or three) of different combinations are different, the candidates generated by this combination construction are considered unavailable.

[0473] In one implementation, the method for determining the candidates to be added to the first candidate list of motion vectors includes: filling with a default vector. Optionally, the default vector can be a zero vector or other vectors. Optionally, it can be after determining the candidates to be added to the first candidate list of motion vectors by other methods, and then judging whether the number of candidates that have been added to the first candidate list has reached a preset value; if not, the default vector is used to fill the first candidate list until the number of candidates in the first candidate list reaches the preset value.

[0474] When using a candidate in the first candidate list of motion vectors to predict the current image block, if the candidate used is at least one candidate other than the candidate determined by using the ATMVP technique, the motion vector of the sub-image block in the current image block is derived according to the affine motion model based on the candidate. When the candidate used is the candidate determined by using the ATMVP technique, then as described above, the reference block of each sub-image block in the current image block is determined according to the motion vector of each sub-image block in the related block, the reference blocks of each sub-image block are stitched together to form the reference block of the current image block, and the residual of the current image block is calculated according to the reference block.

[0475] The following combines Figure 14 and Figure 15 to give an example description of a video image processing method provided by an embodiment of the present application. As Figure 14 shown, the method includes the following steps.

[0476] S1410, sequentially scan N adjacent blocks among the preset M adjacent blocks of the current image block, and determine the target adjacent block according to the scanning result, where N is less than M. Optionally, M is less than or equal to 4.

[0477] S1420, determine the related block of the current image block according to the motion vector of the target adjacent block, the current image block, and the reference image of the current image block.

[0478] S1430, divide the current image block and the related block into multiple sub-image blocks in the same way, and each sub-image block in the current image block corresponds to each sub-image block in the related block one by one.

[0479] S1440, predict the corresponding sub-image block in the current image block respectively according to the motion vectors of the sub-image blocks in the related block.

[0480] For Figure 14 the explanation of the video image processing method shown above, reference can be made to the above, and details will not be repeated here.

[0481] As Figure 15 shown, the method includes the following steps.

[0482] S1510, determine M adjacent blocks of the current image block according to M candidates in the second candidate list of motion vectors of the current image block.

[0483] S1520, sequentially scan N adjacent blocks among the M adjacent blocks, and determine the target adjacent block according to the scanning result, where N is less than M. Optionally, M is less than or equal to 4.

[0484] S1530. Determine the relevant block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block.

[0485] S1540. Determine a specific candidate in the first candidate list of the motion vector of the current image block according to the relevant block of the current image block. Wherein, the specific candidate may be the candidate determined according to the ATMVP technology mentioned above.

[0486] S1550. When it is determined to adopt the specific candidate, divide the current image block and the relevant block into multiple sub-image blocks in the same way, and each sub-image block in the current image block corresponds to each sub-image block in the relevant block one by one.

[0487] S1560. Predict the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the relevant block.

[0488] For Figure 15 The explanation of the video image processing method shown above can be referred to the above text and will not be elaborated here.

[0489] Figure 16 FIG. 1600 is a schematic block diagram of a video image processing apparatus 1600 provided by an embodiment of the present application. The apparatus 1600 is used to execute the method embodiment as Figure 14 shown. The apparatus 1600 includes the following units.

[0490] A construction module 1610 scans N neighboring blocks out of M preset neighboring blocks of the current image block in sequence, determines a target neighboring block according to the scanning result, where N is less than M; determines the relevant block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block; divides the current image block and the relevant block into multiple sub-image blocks in the same way, and each sub-image block in the current image block corresponds to each sub-image block in the relevant block one by one;

[0491] A prediction module 1620 predicts the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the relevant block.

[0492] In one example, N is equal to 1 or 2.

[0493] In one example, the prediction module is further configured to: before predicting the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the relevant block, add the representative motion vector of the relevant block as a candidate to the first candidate list of the motion vector;

[0494] When it is determined to adopt the candidate, the prediction module predicts the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the relevant block.

[0495] In one example, the predicting the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the relevant block includes:

[0496] Using the motion vectors of the sub-image blocks in the relevant block as the motion vectors of the corresponding sub-image blocks in the current image block respectively.

[0497] In one example, the representative motion vector of the relevant block is added as the first candidate to the first candidate list of motion vectors.

[0498] In one example, the representative motion vector of the relevant block includes the motion vector of the central position of the relevant block.

[0499] In one example, the prediction module is further configured to: when there are sub-image blocks with unavailable motion vectors in the relevant block, use the representative motion vector of the relevant block as the motion vector of the sub-image blocks with unavailable motion vectors to predict the corresponding sub-image blocks in the current image block.

[0500] In one example, the prediction module is further configured to: when there are sub-image blocks with unavailable motion vectors in the relevant block and the representative motion vector of the relevant block is unavailable, give up predicting the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the relevant block.

[0501] In one example, the prediction module is further configured to: when the sub-image blocks in the relevant block are unavailable or the sub-image blocks in the relevant block adopt the intra-frame coding mode, determine that there are sub-image blocks with unavailable motion vectors in the relevant block.

[0502] In one example, the construction module is further configured to: determine other candidates and add the other candidates to the first candidate list of motion vectors, where at least one of the other candidates includes the motion vector of a sub-image block.

[0503] In one example, the construction module is further configured to: when it is determined to adopt one of the other candidates, determine the motion vectors of the sub-image blocks in the current image block according to the adopted candidate.

[0504] In one example, the at least one candidate includes the motion vectors of a set of control points.

[0505] In one example, the prediction module is further configured to:

[0506] When a candidate among the at least one candidate is determined, an affine transformation is performed on the selected candidate according to an affine transformation model;

[0507] The sub-image block in the current image block is predicted according to the candidate after the affine transformation.

[0508] In one example, when the affine transformation model includes a four-parameter affine transformation model, among the at least one candidate, each candidate includes a motion vector of two control points;

[0509] When the affine transformation model includes a six-parameter affine transformation model, among the at least one candidate, each candidate includes a motion vector of three control points.

[0510] In one example, the construction module is further configured to: determine a control point motion vector group of a neighboring block that uses an affine transformation mode for prediction from the neighboring blocks of the current image block according to a specific scanning order;

[0511] Each determined control point motion vector group of the neighboring block is added as a candidate to the first candidate list of motion vectors.

[0512] In one example, the determining a control point motion vector group of a neighboring block that uses an affine transformation mode for prediction from the neighboring blocks of the current image block according to a specific scanning order includes:

[0513] Determining a control point motion vector group of a first neighboring block from the left neighboring block of the current image block according to a first scanning order;

[0514] Determining a control point motion vector group of a second neighboring block from the upper neighboring block of the current image block according to a second scanning order;

[0515] Adding the control point motion vector group of the first neighboring block and the control point motion vector group of the second neighboring block to the first candidate list of motion vectors.

[0516] In one example, the construction module is further configured to: construct a motion vector of partial control points according to neighboring blocks of the partial control points of the current image block;

[0517] Adding the motion vector of the partial control points of the current image block to the first candidate list of motion vectors.

[0518] In one example, the constructing a motion vector of partial control points according to neighboring blocks of the partial control points of the current image block includes:

[0519] For each of the partial control points, sequentially scan the specific neighboring blocks of the control point in the third scan order, and use the motion vectors of the specific neighboring blocks that meet the preset conditions as the motion vectors of the control point.

[0520] In one example, the construction module is further configured to:

[0521] When the motion vectors of the partial control points point to different reference frames respectively, give up adding the motion vectors of the partial control points of the current image block to the first candidate list of motion vectors.

[0522] In one example, when the number of candidates in the first candidate list of motion vectors is greater than a preset value, give up adding the motion vectors of the partial control points of the current image block to the first candidate list of motion vectors.

[0523] In one example, the construction module is further configured to:

[0524] Construct a second candidate list of motion vectors, where the candidates added to the second candidate list of motion vectors are the motion vectors of an image block;

[0525] When it is confirmed to adopt the candidate in the second candidate list of motion vectors, determine the motion vector of the current image block according to the motion vector of the candidate.

[0526] In one example, the determining the motion vector of the current image block according to the motion vector of the candidate includes:

[0527] Use the confirmed candidate as the motion vector of the current image block, or use the confirmed candidate after scaling as the motion vector of the current image block.

[0528] In one example, the constructing the second candidate list of motion vectors includes:

[0529] Determine the candidates added to the second candidate list of motion vectors according to the motion vectors of several neighboring blocks of the current image block on the current image.

[0530] In one example, several neighboring blocks of the current image block on the current image include the preset M neighboring blocks.

[0531] In one example, the construction module is further configured to:

[0532] Sequentially add the motion vectors of the preset M neighboring blocks as M candidates to the second candidate list of motion vectors in a preset order;

[0533] The N neighboring blocks refer to the first N neighboring blocks determined in the preset order.

[0534] In one example, the building module is further configured to:

[0535] When the motion vectors of one or more of the M neighboring blocks are not available, discard candidates for adding to the second candidate list of motion vectors determined based on the motion vectors of the one or more neighboring blocks.

[0536] In one example, the sequential scanning of N of the M neighboring blocks and determining a target neighboring block based on the scanning result includes:

[0537] Sequentially scan the N neighboring blocks, and when the first neighboring block that meets a preset condition is scanned, stop scanning, and determine the target neighboring block based on the first neighboring block that meets the preset condition scanned.

[0538] In one example, determining the target neighboring block based on the first neighboring block that meets the preset condition scanned includes:

[0539] Taking the first neighboring block that meets the preset condition as the target neighboring block.

[0540] In one example, the preset condition includes:

[0541] The reference image of the neighboring block is the same as the reference image of the current image block.

[0542] In one example, when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, the building module is further configured to scale the motion vector of a specific neighboring block among the M neighboring blocks, and the prediction module is further configured to predict the current image block based on the scaled motion vector.

[0543] In one example, predicting the current image block based on the scaled motion vector includes:

[0544] Determine the reference block of the current image block based on the scaled motion vector and the reference image of the current image block.

[0545] In one example, the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks.

[0546] In one example, scaling the motion vector of a specific neighboring block among the M neighboring blocks and predicting the current image block based on the scaled motion vector includes:

[0547] Scale the motion vector of the specific neighboring block so that the reference frame pointed to by the motion vector after the scaling process is the same as the reference image of the current image block;

[0548] Use the image block pointed to by the motion vector after the scaling process in the reference image of the current image block as the reference block of the current image block.

[0549] In one example, when no neighboring block that meets the preset conditions is scanned among the N neighboring blocks, use the default block as the reference block of the current image block.

[0550] In one example, the default block is the image block pointed to by the motion vector (0, 0).

[0551] In one example, the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be greater than or equal to 64 pixels.

[0552] In one example, the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be 8×8 pixels, or 16×4 pixels, or 4×16 pixels.

[0553] In one example, when the size of the sub-image block in the ATMVP technology and / or the size of the related block of the sub-image block is 8×8 pixels or at least one of its width and height is less than 8 pixels, set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0554] In one example, the current image block is a coding unit CU.

[0555] In one example, determining the related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes:

[0556] Determine the related block of the current image block in the reference image of the current image block according to the motion vector of the target neighboring block.

[0557] In one example, the neighboring block is an image block adjacent to the position of the current image block on the current image or having a certain position spacing.

[0558] In one example, predicting the current image block according to the motion vector of the related block includes:

[0559] When the reference image of the relevant block is a specific reference image, or the reference image of the current image block is a specific reference image, determine the reference block of the current image block according to the motion vector of the processed relevant block and the reference image of the current image block;

[0560] Wherein, the motion vector of the processed relevant block is the same as the motion vector of the relevant block before processing.

[0561] In one example, the motion vector of the processed relevant block includes:

[0562] The motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or,

[0563] The motion vector of the relevant block that skips the scaling step.

[0564] In one example, the predicting the current image block according to the motion vector of the relevant block includes:

[0565] When the reference image of the relevant block is a specific reference image, or the reference image of the current block is a specific reference image, give up determining the reference block of the current image block according to the motion vector of the relevant block.

[0566] In one example, the constructing module is further configured to:

[0567] When the motion vector of the specific neighboring block points to a specific reference image, or the reference image of the current image block is a specific reference image, determine the reference block of the current image block according to the motion vector of the processed relevant block and the reference image of the current image block;

[0568] Wherein, the motion vector of the processed relevant block is the same as the motion vector of the relevant block before processing.

[0569] In one example, the motion vector of the processed relevant block includes:

[0570] The motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or,

[0571] The motion vector of the relevant block that skips the scaling step.

[0572] In one example, M is less than or equal to 4.

[0573] Figure 17 This is a schematic block diagram of the video image processing device 1700 provided by the embodiments of the present application. The device 1700 is used to execute the method embodiments as Figure 15 shown. The device 1700 includes the following units.

[0574] A building module 1710, configured to determine M neighboring blocks of the current image block according to M candidates in the second candidate list of motion vectors of the current image block; sequentially scan N neighboring blocks among the M neighboring blocks, determine a target neighboring block according to the scanning result, where N is less than M; determine a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block; determine a specific candidate in the first candidate list of motion vectors of the current image block according to the related block of the current image block; when it is determined to adopt the specific candidate, divide the current image block and the related block into multiple sub-image blocks in the same way, and each sub-image block in the current image block corresponds to each sub-image block in the related block one by one;

[0575] A prediction module 1720, configured to perform prediction on the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the related block.

[0576] In one example, at least one candidate in the first candidate list of motion vectors includes the motion vector of a sub-image block, and each candidate in the second candidate list of motion vectors includes the motion vector of an image block.

[0577] In one example, N is equal to 1 or 2.

[0578] In one example, the M candidates include the motion vectors of M neighboring blocks of the current image block on the current image.

[0579] In one example, the sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block according to the scanning result includes:

[0580] Sequentially scan the N neighboring blocks, and when the first neighboring block that meets a preset condition is scanned, stop scanning, and determine the target neighboring block according to the first neighboring block that meets the preset condition scanned.

[0581] In one example, the determining the target neighboring block according to the first neighboring block that meets the preset condition scanned includes:

[0582] Taking the first neighboring block that meets the preset condition as the target neighboring block.

[0583] In one example, the preset condition includes:

[0584] The reference image of the neighboring block is the same as the reference image of the current image block.

[0585] In one example, the building block is further configured to scale the motion vector of a specific neighboring block among the M neighboring blocks when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, and the prediction module is further configured to predict the current image block according to the scaled motion vector.

[0586] In one example, the predicting the current image block according to the scaled motion vector includes:

[0587] Determining a reference block of the current image block according to the scaled motion vector and a reference image of the current image block.

[0588] In one example, the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks.

[0589] In one example, the scaling the motion vector of a specific neighboring block among the M neighboring blocks and predicting the current image block according to the scaled motion vector includes:

[0590] Scaling the motion vector of the specific neighboring block so that the reference frame pointed to by the scaled motion vector is the same as the reference image of the current image block;

[0591] Using the image block pointed to by the scaled motion vector in the reference image of the current image block as the reference block of the current image block.

[0592] In one example, when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, a default block is used as the reference block of the current image block.

[0593] In one example, the default block is the image block pointed to by the motion vector (0, 0).

[0594] In one example, the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be greater than or equal to 64 pixels.

[0595] In one example, the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to be 8×8 pixels, or 16×4 pixels or 4×16 pixels.

[0596] In one example, when the size of the sub-image block in the ATMVP technology and / or the size of the related block of the sub-image block is 8×8 pixels or at least one of its width and height is less than 8 pixels, it is set not to perform the TMVP operation, which can skip some redundant operations, effectively save the time of encoding and decoding, and improve the encoding efficiency.

[0597] In one example, the current image block is a coding unit CU.

[0598] In one example, determining the relevant block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes:

[0599] Determining the relevant block of the current image block in the reference image of the current image block according to the motion vector of the target neighboring block.

[0600] In one example, the neighboring block is an image block adjacent to the current image block or having a certain position spacing on the current image.

[0601] In one example, predicting the current image block according to the motion vector of the relevant block includes:

[0602] When the reference image of the relevant block is a specific reference image, or the reference image of the current image block is a specific reference image, determining the reference block of the current image block according to the processed motion vector of the relevant block and the reference image of the current image block;

[0603] Wherein, the processed motion vector of the relevant block is the same as the motion vector of the relevant block before processing.

[0604] In one example, the processed motion vector of the relevant block includes:

[0605] The motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or,

[0606] The motion vector of the relevant block that skips the scaling step.

[0607] In one example, predicting the current image block according to the motion vector of the relevant block includes:

[0608] When the reference image of the relevant block is a specific reference image, or the reference image of the current block is a specific reference image, giving up determining the reference block of the current image block according to the motion vector of the relevant block.

[0609] In one example, the construction module is further configured to: when the motion vector of the specific neighboring block points to a specific reference image, or the reference image of the current image block is a specific reference image, determine the reference block of the current image block according to the processed motion vector of the relevant block and the reference image of the current image block;

[0610] Among them, the motion vector of the processed relevant block is the same as that of the relevant block before processing.

[0611] In one example, the motion vector of the processed relevant block includes:

[0612] The motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or,

[0613] The motion vector of the relevant block that skips the scaling step.

[0614] In one example, the predicting, according to the motion vectors of the sub-image blocks in the relevant block, the corresponding sub-image blocks in the current image block includes:

[0615] Using the motion vectors of the sub-image blocks in the relevant block as the motion vectors of the corresponding sub-image blocks in the current image block respectively.

[0616] In one example, the determining, according to the relevant block of the current image block, a specific candidate in the first candidate list of the motion vector of the current image block includes:

[0617] Adding the representative motion vector of the relevant block of the current image block as the specific candidate to the first candidate list of the motion vector.

[0618] In one example, adding the representative motion vector of the relevant block as the first candidate to the first candidate list of the motion vector.

[0619] In one example, the representative motion vector of the relevant block includes the motion vector at the center position of the relevant block.

[0620] In one example, the prediction module is further configured to: when there is a sub-image block in the relevant block for which the motion vector cannot be obtained, use the representative motion vector of the relevant block as the motion vector of the sub-image block for which the motion vector cannot be obtained, and predict the corresponding sub-image block in the current image block.

[0621] In one example, the prediction module is further configured to: when there is a sub-image block in the relevant block for which the motion vector cannot be obtained and the representative motion vector of the relevant block cannot be obtained, give up predicting the corresponding sub-image blocks in the current image block according to the motion vectors of the sub-image blocks in the relevant block respectively.

[0622] In one example, the prediction module is further configured to: when the sub-image block in the relevant block is not available, or the sub-image block in the relevant block uses an intra-frame coding mode, determine that there is a sub-image block in the relevant block for which the motion vector cannot be obtained.

[0623] In one example, the prediction module is further configured to: when it is determined to adopt one of the candidates other than the specific candidate in the second candidate list of motion vectors, perform an affine transformation on the adopted candidate according to an affine transformation model;

[0624] Perform prediction on the sub-image block in the current image block according to the candidate after the affine transformation.

[0625] In one example, among at least one candidate other than the specific candidate in the second candidate list of motion vectors, each candidate includes a motion vector of a set of control points.

[0626] In one example, when the affine transformation model includes a four-parameter affine transformation model, among the at least one candidate, each candidate includes a motion vector of 2 control points;

[0627] When the affine transformation model includes a six-parameter affine transformation model, among the at least one candidate, each candidate includes a motion vector of 3 control points.

[0628] In one example, the prediction module is further configured to: determine a set of motion vectors of control points of a neighboring block that uses the affine transformation mode for prediction from the neighboring blocks of the current image block in a specific scanning order;

[0629] Add the set of motion vectors of control points of each determined neighboring block as a candidate to the first candidate list of motion vectors.

[0630] In one example, the determining a set of motion vectors of control points of a neighboring block that uses the affine transformation mode for prediction from the neighboring blocks of the current image block in a specific scanning order includes:

[0631] Determine a set of motion vectors of control points of a first neighboring block in the left neighboring block of the current image block in a first scanning order;

[0632] Determine a set of motion vectors of control points of a second neighboring block in the upper neighboring block of the current image block in a second scanning order;

[0633] Add the set of motion vectors of control points of the first neighboring block and the set of motion vectors of control points of the second neighboring block to the first candidate list of motion vectors.

[0634] In one example, the construction module is further configured to: construct the motion vectors of partial control points according to the neighboring blocks of the partial control points of the current image block;

[0635] Add the motion vectors of the partial control points of the current image block to the first candidate list of motion vectors.

[0636] In one example, constructing the motion vectors of the partial control points based on the neighboring blocks of the partial control points of the current image block includes:

[0637] For each control point in the partial control points, sequentially scan the specific neighboring blocks of the control point in the third scan order, and use the motion vectors of the specific neighboring blocks that meet the preset conditions as the motion vectors of the control point.

[0638] In one example, the construction module is further configured to: when the motion vectors of the partial control points point to different reference frames respectively, refrain from adding the motion vectors of the partial control points of the current image block to the first candidate list of motion vectors.

[0639] In one example, the construction module is further configured to: when the number of candidates in the first candidate list of motion vectors is greater than a preset value, refrain from adding the motion vectors of the partial control points of the current image block to the first candidate list of motion vectors.

[0640] In one example, the construction module is further configured to: construct a second candidate list of motion vectors, where the candidates added to the second candidate list of motion vectors are the motion vectors of an image block;

[0641] When it is confirmed to adopt the candidate in the second candidate list of motion vectors, determine the motion vector of the current image block according to the motion vector of the candidate.

[0642] In one example, determining the motion vector of the current image block according to the motion vector of the candidate includes:

[0643] Using the confirmed adopted candidate as the motion vector of the current image block, or scaling the confirmed adopted candidate and using it as the motion vector of the current image block.

[0644] In one example, constructing the second candidate list of motion vectors includes:

[0645] Determine the M candidates added to the second candidate list of motion vectors according to the motion vectors of M neighboring blocks of the current image block on the current image.

[0646] In one example, the construction module is further configured to: sequentially add the motion vectors of the preset M neighboring blocks as M candidates to the second candidate list of motion vectors in a preset order;

[0647] The N neighboring blocks refer to the first N neighboring blocks determined in the preset order.

[0648] In one example, the building block is further configured to: when the motion vectors of one or more of the M neighboring blocks are not available, discard candidates for adding to the second candidate list of motion vectors determined based on the motion vectors of the one or more neighboring blocks.

[0649] In one example, M is less than or equal to 4.

[0650] As Figure 18 shown, an embodiment of the present application further provides a video image processing method 1800, which includes the following steps:

[0651] S1810, determine a basic motion vector list, where the basic motion vector list includes at least one set of dual-prediction basic motion vector groups, and the dual-prediction basic motion vector group includes a first basic motion vector and a second basic motion vector;

[0652] S1820, determine two motion vector offsets from a preset set of offsets, where the two motion vector offsets correspond to the first basic motion vector and the second basic motion vector respectively;

[0653] S1830, determine the motion vector of the current image block according to the first basic motion vector, the second basic motion vector, and the two motion vector offsets;

[0654] S1840, perform prediction on the current image block according to the motion vector of the current image block.

[0655] The video image processing method of the embodiment of the present application offsets the basic motion vectors in the dual-prediction basic motion vector group based on a preset set of offsets, and a more accurate motion vector of the current image block can be obtained through a finite number of calculations, so that the predicted residual is smaller, thereby improving the coding efficiency.

[0656] In some embodiments, the video image processing method of the embodiment of the present application can be used to improve the Merge with Motion Vector Difference (MMVD) technology, also known as the Ultimate motion vector expression (UMVE) technology. Especially when applied to constructing a merge candidate list (also known as a motion vector candidate list) in the MMVD technology.

[0657] In some embodiments, before S1810, the video image processing method 1800 may further include the following steps: obtaining a merge candidate list, where the merge candidate list includes P combination merge motion vector candidates, and P is an integer greater than or equal to 1. S1810 determines a base motion vector list, which may include: determining the base motion vector list according to the merge candidate list. For example, when P is greater than or equal to 2, two combination merge motion vector candidates in the merge candidate list are taken to form the base motion vector list. Optionally, the two combination merge motion vector candidates may be the first two combination merge motion vector candidates in the merge candidate list, or may be other two combination merge motion vector candidates when the first two combination merge motion vector candidates do not meet the conditions. Or, the two combination merge motion vector candidates may be any two combination merge motion vector candidates that meet the conditions in the merge candidate list, and the embodiments of the present application do not limit this. Again, when P is less than 2, the base motion vector list is filled with a motion vector (0, 0).

[0658] Specifically, the MMVD technology first constructs a base motion vector list (base MVP list) using the merge motion vector candidates in the existing merge candidate list (or various motion vector candidate lists obtained in different types of modes described above). For example, traverse the merge motion vector candidates in the existing merge candidate list (merge list). If the number of groups of merge motion vector candidates in the existing merge list is greater than 2, take the first 2 groups of merge motion vector candidates in the merge list to form the base MVP list of MMVD; otherwise, use MV(0, 0) to fill and form the base MVP list of MMVD. In the embodiments of the present application, the base motion vector list may also be filled with other default motion vectors, such as (1, 1), (2, 2), etc., and the embodiments of the present application do not limit this.

[0659] It should be understood that each of the two base MVs in the base MVP list may be a base motion vector for uni-directional prediction or a group of bi-prediction base motion vectors. Of course, the base MVP list may include more groups or fewer groups of base MVs, and the present application does not limit this. Only the case of a group of bi-prediction base motion vectors is discussed herein. The two base motion vectors included in the group of bi-prediction base motion vectors may be a forward base motion vector and a backward base motion vector; or may be two base motion vectors with the same direction, such as two forward base motion vectors or two backward base motion vectors.

[0660] Optionally, in some embodiments, S1820 determines two motion vector offsets from a preset set of offsets, which may include: determining multiple sets of motion vector offset combinations including two motion vector offsets from the set of offsets; S1830 determines the motion vector of the current image block according to the first base motion vector, the second base motion vector, and the two motion vector offsets, which may include: determining, from the multiple sets of motion vector offset combinations, a motion vector offset combination that satisfies a preset condition for the rate-distortion loss, and determining the motion vector of the current image block according to the first base motion vector, the second base motion vector, and the motion vector offset combination that satisfies the preset condition for the rate-distortion loss. Optionally, the rate-distortion loss satisfying the preset condition may be that the rate-distortion loss is less than a preset threshold, or the rate-distortion loss is minimized, such as the prediction residual is minimized, etc., and the embodiments of the present application do not limit this.

[0661] In the embodiments of the present application, the MMVD technology can offset the predicted value of the base motion vector according to certain rules to generate a new motion vector prediction candidate as the MMVD motion vector prediction value and put it into the MMVD motion vector candidate list. Optionally, in some embodiments, there may be 8 choices for the motion vector offset (offset) in the set of offsets (2 1 , 2 2 , ……, 2 8 ), that is, the preset set of offsets is {2, 4, 8, 16, 32, 64, 128, 256}. For example, the number of groups of base motion vectors (also called base motion vector candidates) in the base MVP list is 2, and there are 8 choices for the motion vector offset (offset) (2 1 , 2 2 , ……, 2 8 ). For the two components MV_x and MV_y of a group of base MVs in the MMVD's base MVP list, the motion vector offset can be added or subtracted (2 choices) to them. Specifically, for example, the MMVD motion vector prediction value = the base motion vector prediction value + the motion vector offset. Thus, there are a total of 2×8×2×2 = 64 improvement (refine) modes for the motion vector of the current image block in MMVD. The embodiments of the present application may also select a part from the 64 improvement modes, or derive more improvement modes from the 64 improvement modes, and are not limited to 64 improvement modes. For example, the number of improvement modes may be 32 or 128, etc., and the embodiments of the present application do not limit this. Determine the motion vector that satisfies the preset condition for the rate-distortion loss from these motion vectors as the motion vector of the current image block for encoding and / or decoding.

[0662] Understanding from another perspective, determining the motion vector that makes the rate-distortion loss meet the preset condition can also be equivalently considered as determining the combination of motion vector offsets that makes the rate-distortion loss meet the preset condition from the multiple groups of motion vector offset combinations. According to the first basic motion vector, the second basic motion vector, and the combination of motion vector offsets that makes the rate-distortion loss meet the preset condition, the motion vector of the current image block is determined.

[0663] It should be understood that the two motion vector offsets in the combination of motion vector offsets can be the same or different.

[0664] Optionally, the multiple groups of motion vector offset combinations including two motion vector offsets can be formed by traversing the motion vector offsets in a preset offset set.

[0665] Alternatively, one of the motion vector offsets in the multiple groups of motion vector offset combinations can be a motion vector offset in the offset set calculated by a preset algorithm. Taking the calculated motion vector offset as a fixed value, traversing the motion vector offsets in the offset set as the other motion vector offset in the multiple groups of motion vector offset combinations to form the multiple groups of motion vector offset combinations. Instead of performing a scaling operation (performing a scaling operation with a scaling ratio of 1), but simply traversing to find a suitable combination of motion vector offsets, the amount of computation can be reduced overall and the encoding / decoding efficiency can be improved.

[0666] Alternatively, one of the motion vector offsets in the multiple groups of motion vector offset combinations can be a motion vector offset in the offset set calculated by a preset algorithm. Taking the calculated motion vector offset as a fixed value, obtaining the other motion vector offset in the multiple groups of motion vector offset combinations by performing a scaling operation on the fixed value to form the multiple groups of motion vector offset combinations.

[0667] Alternatively, the multiple groups of motion vector offset combinations including two motion vector offsets can also be formed in other ways, and the embodiments of the present application do not limit this.

[0668] Optionally, in some embodiments, when both the first base motion vector and the second base motion vector point to non-specific reference images, a scaling operation may be performed on the selected motion vector offset to obtain a new motion vector offset. Then, the first base motion vector and the second base motion vector are adjusted by the new motion vector offset. According to the first base motion vector, the second base motion vector, and the two new motion vector offsets, that is, according to the adjusted ones, the motion vector of the current image block is determined; the current image block is predicted according to the motion vector of the current image block. In other words, in dual prediction, when determining the motion vector prediction value of the current image block according to the MMVD technology, if the distances of the current image from the reference images of the two base motion vectors are different, the motion vector offset needs to be scaled, and then the scaled motion vector offset is added (or subtracted) to the base motion vector prediction to determine the motion vector of the current image block.

[0669] When both the first base motion vector and the second base motion vector point to non-specific reference images, the two motion vector offsets are used to: adjust the first base motion vector and the second base motion vector according to the two motion vector offsets. Optionally, the ratio of the distance from the current image to the reference image of the first base motion vector to the distance from the current image to the reference image of the second base motion vector is equal to the ratio of the motion vector offset used by the first base motion vector to the motion vector offset used by the second base motion vector. In other words, the scaling ratio is determined by the distance between the image where the current image block (e.g., the first image block) is located and the reference images of the current image block in two reference directions, and these two reference images are the reference images of the current base motion vectors. This implementation can further reduce the number of combinations of motion vector offsets to be tried and can further improve the encoding / decoding efficiency.

[0670] It should be understood that the adjustment may be to add the two motion vector offsets to the first base motion vector and the second base motion vector respectively; or the adjustment may be to subtract the two motion vector offsets from the first base motion vector and the second base motion vector respectively.

[0671] For example, during the encoding or decoding process, there are 8 optional motion vector offsets: {2, 4, 8, 16, 32, 64, 128, 256}. Denote the motion vector offset selected in the current process as X. Denote the frame number of the current image as P2, and the frame numbers of the reference images of the first and second basic motion vectors as P0 and P1 respectively. If P2 - P0 = P2 - P1, then add the same-sized motion vector offset X to the two basic motion vectors; if P2 - P0 = 2 * (P2 - P1), then add the motion vector offset 2 * X to the first basic motion vector and add the motion vector offset X to the second basic motion vector; similarly, if P2 - P1 = 2 * (P2 - P0), then add the motion vector offset X to the first basic motion vector and add the motion vector offset 2 * X to the second basic motion vector.

[0672] In addition, if the ratio of the distance from the current image to the reference image of the first basic motion vector to the distance from the current image to the reference image of the second basic motion vector is not a multiple of 2, then select an appropriate ratio (a multiple of 2) such that the ratio of the motion vector offset used for the first basic motion vector to the motion vector offset used for the second basic motion vector is as close as possible to the ratio of the distance from the current image to the reference image of the first basic motion vector to the distance from the current image to the reference image of the second basic motion vector. For example, if P2 - P0 = 3 * (P2 - P1), then select the ratio 2 or 4. Add the motion vector offset 2 * X to the first basic motion vector and add the motion vector offset X to the second basic motion vector; or, add the motion vector offset 4 * X to the first basic motion vector and add the motion vector offset X to the second basic motion vector. Another example, if P2 - P0 = 5 * (P2 - P1), then select the multiple of 2 closest to 5, which is 4. Add the motion vector offset 4 * X to the first basic motion vector and add the motion vector offset X to the second basic motion vector.

[0673] When the first basic motion vector and / or the second basic motion vector points to a specific reference image (i.e., the reference image of the current image block is a specific reference image), since the definition of the temporal distance between the specific reference image and the image where the current image block is located is not clear, scaling the motion vector offset is meaningless.

[0674] Optionally, in some embodiments, when the first basic motion vector and / or the second basic motion vector points to a specific reference image, at least one of the two motion vector offsets includes: a motion vector offset obtained by scaling the initial motion vector offset according to a scaling ratio of 1, or a motion vector offset obtained by skipping the scaling operation.

[0675] Or in other words, when the first base motion vector and / or the second base motion vector points to a specific reference image, the motion vector of the current image block is determined according to the processed motion vector offset and the base motion vector group, wherein the processed motion vector offset is the same as the motion vector offset before processing. For example, at least one of the two processed motion vector offsets includes: the motion vector offset obtained by scaling the initial motion vector offset by a scaling ratio of 1, or the motion vector offset obtained by skipping the scaling operation.

[0676] In a specific embodiment, one of the two motion vector offsets (for example, offset1) can be obtained by a preset algorithm. When the first base motion vector points to a specific reference image, or the second base motion vector points to a specific reference image, or both the first base motion vector and the second base motion vector point to a specific reference image, the other motion vector offset (for example, offset2) can be obtained by scaling offset1 by a scaling ratio of 1, or by not scaling offset1. Alternatively, the other motion vector offset (for example, offset2) can be obtained by scaling a certain initial offset by a scaling ratio of 1 or by not scaling it. In other words, the initial motion vector offset can be offset1 or other initial offsets, and the embodiments of the present application do not limit this.

[0677] In some embodiments of the present application, the method is executed by an encoding end, and the method further includes: encoding according to the prediction result and sending a bitstream to the decoding end, where the bitstream includes an index for indicating a combination of motion vector offsets that makes the rate-distortion loss meet a preset condition. In this embodiment, the encoding end notifies the decoding end of the index of the determined combination of motion vector offsets, so that the decoding end can know the two motion vector offsets through a small amount of calculation, which can simplify the decoding end. Optionally, when one of the two motion vector offsets (for example, offset1) can be obtained by a preset algorithm, the index can be the ratio of the other motion vector offset (for example, offset2) to offset1.

[0678] In some embodiments of the present application, the method is executed by a decoding end, and the method further includes: receiving a bitstream sent by an encoding end, where the bitstream includes an index for indicating a formation combination of two motion vector offsets; determining the two motion vector offsets from a preset offset set, including: determining the two motion vector offsets according to the index. In this embodiment, the encoding end notifies the decoding end of the index of the determined motion vector offset combination, so that the decoding end can know the two motion vector offsets through a small amount of calculation, which can simplify the decoding end. Optionally, when one of the two motion vector offsets (for example, offset1) can be obtained by a preset algorithm, the index can be the ratio of the other motion vector offset (for example, offset2) to offset1.

[0679] As described above in conjunction with Figure 18 the method embodiments of the present application have been described. The corresponding apparatus embodiments of the above method embodiments will be described below. It should be understood that the description of the apparatus embodiments corresponds to the description of the method embodiments. Therefore, the content not described in detail can be referred to the previous method embodiments. For the sake of brevity, it will not be repeated here.

[0680] Figure 19 FIG. 1900 is a schematic block diagram of a video image processing apparatus provided in an embodiment of the present application. The apparatus 1900 is used to execute the method embodiment as Figure 18 shown. The apparatus 1900 includes the following modules.

[0681] A construction module 1910, configured to determine a basic motion vector list, where the basic motion vector list includes at least one set of dual-prediction basic motion vector groups, and the dual-prediction basic motion vector groups include a first basic motion vector and a second basic motion vector; determine two motion vector offsets from a preset offset set, where the two motion vector offsets respectively correspond to the first basic motion vector and the second basic motion vector; determine a motion vector of a current image block according to the first basic motion vector, the second basic motion vector, and the two motion vector offsets;

[0682] A prediction module 1920, configured to predict the current image block according to the motion vector of the current image block.

[0683] The video image processing apparatus according to the embodiment of the present application offsets the basic motion vectors in the dual-prediction basic motion vector group based on a preset offset set, and can obtain a more accurate motion vector of the current image block through a limited number of calculations, so that the predicted residual is smaller, thereby improving the coding efficiency.

[0684] Optionally, in some embodiments, the building block 1910 determines two motion vector offsets from a preset set of offsets, including: the building block determines multiple sets of motion vector offset combinations including two motion vector offsets from the set of offsets; the building block 1910 determines the motion vector of the current image block according to the first base motion vector, the second base motion vector, and the two motion vector offsets, including: the building block 1910 determines the motion vector offset combination that makes the rate-distortion loss meet the preset condition from the multiple sets of motion vector offset combinations, and determines the motion vector of the current image block according to the first base motion vector, the second base motion vector, and the motion vector offset combination that makes the rate-distortion loss meet the preset condition.

[0685] Optionally, in some embodiments, the video image processing device 1900 is used for the encoding end. The video image processing device 1900 further includes a sending module, configured to: perform encoding according to the prediction result and send a bitstream to the decoding end, where the bitstream includes an index for indicating the motion vector offset combination that makes the rate-distortion loss meet the preset condition.

[0686] Optionally, in some embodiments, the video image processing device 1900 is used for the decoding end. The video image processing device 1900 further includes a receiving module, configured to: receive the bitstream sent by the encoding end, where the bitstream includes an index for indicating the formation combination of two motion vector offsets; the building block 1910 determines two motion vector offsets from a preset set of offsets, including: determining the two motion vector offsets according to the index.

[0687] Optionally, in some embodiments, when the first base motion vector and / or the second base motion vector points to a specific reference image, at least one of the two motion vector offsets includes: the motion vector offset obtained by scaling an initial motion vector offset by a scaling ratio of 1, or the motion vector offset obtained by skipping the scaling operation.

[0688] Optionally, in some embodiments, when both the first base motion vector and the second base motion vector point to non-specific reference images, the two motion vector offsets are used to: adjust the first base motion vector and the second base motion vector according to the two motion vector offsets.

[0689] Optionally, in some embodiments, the ratio of the distance from the current image to the reference image of the first base motion vector to the distance from the current image to the reference image of the second base motion vector is equal to the ratio of the motion vector offset used by the first base motion vector to the motion vector offset used by the second base motion vector.

[0690] Optionally, in some embodiments, the building block 1910 is further configured to: obtain a merge candidate list, where the merge candidate list includes P combined motion vector candidates, and P is an integer greater than or equal to 1; the building block 1910 determines a basic motion vector list, including: the building block 1910 determines the basic motion vector list according to the merge candidate list.

[0691] Optionally, in some embodiments, the building block 1910 determines the basic motion vector list according to the merge candidate list, including: when P is greater than or equal to 2, the building block 1910 takes the first two combined motion vector candidates in the merge candidate list to form the basic motion vector list.

[0692] Optionally, in some embodiments, the building block 1910 determines the basic motion vector list according to the merge candidate list, including: when P is less than 2, the building block 1910 fills the basic motion vector list with the motion vector (0, 0).

[0693] Optionally, in some embodiments, the preset offset set is {2, 4, 8, 16, 32, 64, 128, 256}.

[0694] Optionally, in some embodiments, the current image block is a coding unit CU.

[0695] Optionally, in some embodiments, the current image block is a bi-predicted image block.

[0696] Figure 20 It is a schematic block diagram of a video image processing apparatus 2000 provided by an embodiment of the present application. As Figure 20 shown, the video image processing apparatus 2000 may include a processor 2010 and a memory 2020. Computer instructions are stored in the memory 2020. When the processor 2010 executes the computer instructions, the video image processing apparatus 2000 performs the following steps: determining a basic motion vector list, where the basic motion vector list includes at least one set of bi-predicted basic motion vector groups, and the bi-predicted basic motion vector groups include a first basic motion vector and a second basic motion vector; determining two motion vector offsets from a preset offset set, where the two motion vector offsets respectively correspond to the first basic motion vector and the second basic motion vector; determining a motion vector of the current image block according to the first basic motion vector, the second basic motion vector, and the two motion vector offsets; and predicting the current image block according to the motion vector of the current image block.

[0697] It should be understood that the video image processing device 2000 according to the embodiments of the present application may further include a network interface for transmitting a bitstream. For example, receiving the bitstream sent by an encoding device.

[0698] In some embodiments of the present application, the processor 2010 determines two motion vector offsets from a preset set of offsets, including: determining multiple sets of motion vector offset combinations including two motion vector offsets from the set of offsets; the processor 2010 determines the motion vector of the current image block according to the first base motion vector, the second base motion vector, and the two motion vector offsets, including: determining the motion vector offset combination that makes the rate-distortion loss meet the preset condition from the multiple sets of motion vector offset combinations, and determining the motion vector of the current image block according to the first base motion vector, the second base motion vector, and the motion vector offset combination that makes the rate-distortion loss meet the preset condition.

[0699] In some embodiments of the present application, the video image processing device 2000 is used at the encoding end, and the processor 2010 is further used to perform encoding according to the prediction result and send a bitstream to the decoding end, and the bitstream includes an index for indicating the motion vector offset combination that makes the rate-distortion loss meet the preset condition.

[0700] In some embodiments of the present application, the video image processing device 2000 is used at the decoding end, and the processor 2010 is further used to receive the bitstream sent by the encoding end, and the bitstream includes an index for indicating the formation combination of two motion vector offsets; the processor 2010 determines two motion vector offsets from a preset set of offsets, including: determining the two motion vector offsets according to the index.

[0701] In some embodiments of the present application, when the first base motion vector and / or the second base motion vector points to a specific reference image, at least one of the two motion vector offsets includes: a motion vector offset obtained by scaling an initial motion vector offset according to a scaling ratio of 1, or a motion vector offset obtained by skipping the scaling operation.

[0702] In some embodiments of the present application, when both the first base motion vector and the second base motion vector point to a non-specific reference image, the two motion vector offsets are used to: adjust the first base motion vector and the second base motion vector according to the two motion vector offsets.

[0703] In some embodiments of the present application, the ratio of the distance from the current image to the reference image of the first basic motion vector to the distance from the current image to the reference image of the second basic motion vector is equal to the ratio of the motion vector offset used by the first basic motion vector to the motion vector offset used by the second basic motion vector.

[0704] In some embodiments of the present application, the processor 2010 is further configured to: obtain a merge candidate list, where the merge candidate list includes P combination merge motion vector candidates, and P is an integer greater than or equal to 1; the processor 2010 determines a basic motion vector list, including: determining the basic motion vector list according to the merge candidate list.

[0705] In some embodiments of the present application, when the processor 2010 determines the basic motion vector list according to the merge candidate list, it includes: when P is greater than or equal to 2, taking the first two combination merge motion vector candidates in the merge candidate list to form the basic motion vector list.

[0706] In some embodiments of the present application, when the processor 2010 determines the basic motion vector list according to the merge candidate list, it includes: when P is less than 2, filling with the motion vector (0, 0) to form the basic motion vector list.

[0707] In some embodiments of the present application, the preset offset set is {2, 4, 8, 16, 32, 64, 128, 256}.

[0708] In some embodiments of the present application, the current image block is a coding unit CU.

[0709] In some embodiments of the present application, the current image block is a bi-predicted image block.

[0710] It should be understood that Figure 20 the illustrated video image processing device 2000 or Figure 19 the illustrated video image processing device 1900 can be used to execute the operations or processes in the above method embodiments, and the operations and / or functions of each module and device in the video image processing device 2000 or the video image processing device 1900 are respectively for implementing the corresponding processes in the above method embodiments. For the sake of brevity, they will not be described in detail here.

[0711] The embodiment of the present application further provides a video image processing method, including: determining a basic motion vector list, where the basic motion vector list includes basic motion vector groups; when at least one basic motion vector in the basic motion vector group points to a specific reference image, giving up determining the motion vector of the current image block according to the basic motion vector group and the motion vector offset. That is, when at least one basic motion vector in the basic motion vector group points to a specific reference image, giving up putting the corresponding motion vector into the MV candidate list.

[0712] In some embodiments of the present application, obtaining a merge candidate list, where the merge candidate list includes P combined motion vector candidates, where P is an integer greater than or equal to 1; the determining the basic motion vector list includes: determining the basic motion vector list according to the merge candidate list.

[0713] In some embodiments of the present application, the determining the basic motion vector list according to the merge candidate list includes: when P is greater than or equal to 2, taking the first two combined motion vector candidates in the merge candidate list to form the basic motion vector list.

[0714] In some embodiments of the present application, the determining the basic motion vector list according to the merge candidate list includes: when P is less than 2, filling with the motion vector (0, 0) to form the basic motion vector list.

[0715] In some embodiments of the present application, the current image block is a coding unit CU.

[0716] Correspondingly, the present application provides a video image processing device, including: a determining module, configured to determine a basic motion vector list, where the basic motion vector list includes basic motion vector groups; a processing module, configured to give up determining the motion vector of the current image block according to the basic motion vector group and the motion vector offset when at least one basic motion vector in the basic motion vector group points to a specific reference image.

[0717] In some embodiments of the present application, the video image processing device further includes a constructing module, configured to: obtain a merge candidate list, where the merge candidate list includes P combined motion vector candidates, where P is an integer greater than or equal to 1; the determining module is specifically configured to: determine the basic motion vector list according to the merge candidate list.

[0718] In some embodiments of the present application, the determining module is specifically configured to: when P is greater than or equal to 2, take the first two combined motion vector candidates in the merge candidate list to form the basic motion vector list.

[0719] In some embodiments of the present application, the determining module is specifically configured to: when P is less than 2, fill and form the basic motion vector list with the motion vector (0, 0).

[0720] In some embodiments of the present application, the current image block is a coding unit CU.

[0721] The present application further provides a video image processing device including a processor and a memory. Computer instructions are stored in the memory. When the processor executes the computer instructions, the video image processing device is caused to perform the following steps: determining a basic motion vector list, where the basic motion vector list includes basic motion vector groups; when at least one basic motion vector in the basic motion vector group points to a specific reference image, giving up determining the motion vector of the current image block according to the basic motion vector group and the motion vector offset.

[0722] It should be understood that the devices in the embodiments of the present application can be implemented based on a memory and a processor. Each memory is used to store instructions for executing the methods in the embodiments of the present application. The processor executes the above instructions, causing the device to execute the methods in the embodiments of the present application.

[0723] It should be understood that the processor mentioned in the embodiments of the present application may include a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor may further include a hardware chip. The above hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0724] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, 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), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0725] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) is integrated in the processor.

[0726] It should be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0727] The embodiments of the present application also provide a computer-readable storage medium, on which instructions are stored. When the instructions are run on a computer, the computer is caused to execute the steps of the above method embodiments.

[0728] The embodiments of the present application also provide a computing device, which includes the above computer-readable storage medium.

[0729] An embodiment of the present application further provides a computer program product including instructions. When a computer runs the instructions of the computer program product, the computer executes the steps of the foregoing method embodiment.

[0730] An embodiment of the present application further provides a computer chip, which enables a computer to execute the steps of the foregoing method embodiment.

[0731] The embodiments of the present application can be applied to aircraft, especially in the field of unmanned aerial vehicles.

[0732] It should be understood that the division of the circuits, sub - circuits, and sub - units in the embodiments of the present application is only illustrative. Those of ordinary skill in the art can realize that the circuits, sub - circuits, and sub - units described in the examples of the embodiments disclosed herein can be further split or combined.

[0733] The device provided by the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general - purpose computer, a special - purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer - readable storage medium or transmitted from one computer - readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer - readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a high - density digital video disc (DVD)), or a semiconductor medium (such as an SSD), etc.

[0734] It should be understood that the first, second, and various digital numbers involved herein are only for the convenience of description and are not used to limit the scope of the present application.

[0735] It should be understood that the term "and / or" in this text is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the character " / " in this text generally indicates that the associated objects before and after are in an "or" relationship.

[0736] It should be understood that in the embodiments of this application, the magnitudes of the serial numbers of the above processes do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.

[0737] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this text can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0738] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0739] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0740] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0741] In addition, in each embodiment of this application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0742] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A video image processing method, characterized in that, The method includes: Determining a relevant block of the current image block in a reference image of the current image block according to a motion vector of a specific neighboring block of the current image block; Dividing the current image block into a plurality of sub-image blocks; Determining relevant blocks of the sub-image blocks in the reference image of the current image block according to the motion vector of the specific neighboring block; Predicting the sub-image blocks respectively according to motion vectors of the relevant blocks of the sub-image blocks; Wherein, when there is a relevant block with an unavailable motion vector among the relevant blocks of the sub-image block, using a representative motion vector of the relevant block of the current image block as the motion vector of the relevant block with the unavailable motion vector, and predicting the corresponding sub-image block in the current image block.

2. The method according to claim 1, wherein Before the predicting the sub-image blocks respectively according to the motion vectors of the relevant blocks of the sub-image blocks, it further includes: Adding the representative motion vector of the relevant block as a candidate to a first candidate list of motion vectors; When it is determined to adopt the candidate, predicting the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the sub-image blocks in the relevant block.

3. The method according to claim 1, wherein The predicting the sub-image blocks respectively according to the motion vectors of the relevant blocks of the sub-image blocks includes: Using the motion vectors of the sub-image blocks in the relevant block respectively as the motion vectors of the corresponding sub-image blocks in the current image block.

4. The method according to claim 1, wherein Adding the representative motion vector of the relevant block as the first candidate to a first candidate list of motion vectors.

5. The method according to claim 1, characterized in that, The representative motion vector of the relevant block of the current image block includes the motion vector of the central position of the relevant block of the current image block.

6. The method according to claim 1, wherein The method further includes: When there is a relevant block with an unavailable motion vector among the relevant blocks of the sub-image block, and the representative motion vector of the relevant block of the sub-image block is unavailable, giving up predicting the corresponding sub-image blocks in the current image block respectively according to the motion vectors of the relevant blocks of the sub-image blocks.

7. The method according to claim 6, wherein When the relevant block of the sub-image block is unavailable, or the relevant block of the sub-image block adopts an intra-coding mode, determining that the motion vector of the relevant block of the sub-image block is unavailable.

8. The method according to claim 1, characterized in that The specific neighboring block meets a preset condition, and the preset condition includes: The reference image of the specific neighboring block is the same as the co-located frame of the current image block.

9. The method according to claim 8, wherein When the specific neighboring block does not meet the preset condition, using the image block pointed to by the motion vector (0, 0) as the reference block of the current image block.

10. The method according to claim 1, characterized in that, The current image block is a coding unit CU.

11. The method according to claim 1, characterized in that, The predicting the sub-image blocks respectively according to the motion vectors of the relevant blocks of the sub-image blocks includes: When the reference image of the relevant block of the sub-image block is a specific reference image, and the reference image of the current image block is the specific reference image, determining a reference block of the current image block according to the processed motion vector of the relevant block of the sub-image block and the reference image of the current image block; Wherein, the processed motion vector of the relevant block of the sub-image block is the same as the motion vector of the relevant block of the sub-image block before processing.

12. The method according to claim 11, characterized in that, The processed motion vector of the relevant block includes: The motion vector obtained by scaling the motion vector of the relevant block according to a scaling ratio of 1, or The motion vector of the relevant block that skips the scaling step.

13. The method according to claim 1, characterized in that, The method further includes: Outputting a bitstream obtained by encoding the current image block according to the prediction result.

14. A video image processing device, characterized in that, Including: A construction module, configured to determine a relevant block of the current image block in a reference image of the current image block according to the motion vector of a specific neighboring block of the current image block, and divide the current image block into a plurality of sub-image blocks; A prediction module, configured to determine a relevant block of the sub-image block in the reference image of the current image block according to the motion vector of the specific neighboring block; and perform predictions on the sub-image blocks respectively according to the motion vectors of the relevant blocks of the sub-image blocks; Wherein, when there is a relevant block with an unavailable motion vector among the relevant blocks of the sub-image block, the representative motion vector of the relevant block of the current image block is used as the motion vector of the relevant block with the unavailable motion vector, and the corresponding sub-image block in the current image block is predicted.

15. A video image processing apparatus, characterized in that, Including: A memory and a processor, the memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory, and the execution of the instructions stored in the memory causes the processor to execute the method according to any one of claims 1 to 13.

16. A computer storage medium, characterized in that, A bitstream formed by a computer program is stored thereon, and when the computer program is executed by a computer, the computer executes the method according to any one of claims 1 to 13; wherein, the bitstream includes an index for indicating a motion vector.

17. A video image processing method, characterized in that The method includes: Determining a relevant block of the current image block in a reference image of the current image block according to the motion vector of a specific neighboring block of the current image block; Dividing the current image block into a plurality of sub-image blocks; Determining a relevant block of the sub-image block in the reference image of the current image block according to the motion vector of the specific neighboring block; Performing predictions on the sub-image blocks respectively according to the motion vectors of the relevant blocks of the sub-image blocks; Generating a bitstream according to the prediction result, wherein the bitstream includes an index for indicating a motion vector; Wherein, when there is a relevant block with an unavailable motion vector among the relevant blocks of the sub-image block, the representative motion vector of the relevant block of the current image block is used as the motion vector of the relevant block with the unavailable motion vector, and the corresponding sub-image block in the current image block is predicted.

Citation Information

Patent Citations

  • Method and apparatus for video predictive encoding and method and apparatus for video predictive decoding

    CN101573985A

  • Method and device for encoding and decoding video

    CN101605256A