Video image coding method, video image decoding method, and bit stream generation method
The video processing method simplifies the complexity of ATMVP by scanning fewer neighboring blocks to determine motion vectors, reducing redundant operations and maintaining performance, thus addressing inefficiencies in existing ATMVP technologies.
Patent Information
- Application Number
- JP2025032694
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-10-30
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-03
AI Technical Summary
The existing Advanced/Alternative Temporal Motion Vector Prediction (ATMVP) technology in video encoding and decoding is complex and inefficient, with redundant operations and sub-optimal motion vector candidate list construction.
A video processing method that reduces the complexity of ATMVP by sequentially scanning only N neighboring blocks out of M to determine a target block, and then predicting corresponding sub-image blocks based on the motion vectors of related blocks.
This approach simplifies the process of obtaining reference motion vectors, reduces redundant operations, and maintains the performance gains of conventional ATMVP technology, while adapting to the storage granularity of motion vectors in modern video coding standards.
Smart Images

Figure 2025084926000001_ABST
Abstract
Description
Technical Field
[0001] 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, and all of its content is incorporated herein by reference.
[0002] Copyright Notice The content disclosed in this patent document includes materials subject to copyright protection. The copyright is owned by the copyright owner. The copyright owner will not object to any reproduction by anyone of these patent documents or patent disclosures, provided that it is as shown in the official seal encoding or file of the Patent Office.
[0003] This application relates to the field of video encoding and decoding, and specifically relates to a video processing method and apparatus.
Background Art
[0004] Currently, in the main standard specifications for video coding, block-based motion compensation technology is adopted in the inter-frame prediction part. The main principle is to search for the most similar block in the already encoded images for the current image block. This process is called motion compensation. For example, for an image of one frame, first, it is divided into coding regions (Coding Tree Unit, CTU) of the same 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 (usually the reconstructed frame near the temporal region 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 as the prediction block of the current block in the reference frame is motion compensation.
[0005] In the prior art, usually, the motion vector candidate list of the current CU is constructed in two ways, and the motion vector candidate list is also called the merge candidate list. The motion vector candidate list includes motion vector candidates in the spatial domain, which usually incorporate the motion vectors (or motion information) of the encoded neighboring blocks of the current CU into the motion vector candidate list. The motion vector candidate list further includes motion vector candidates in the temporal domain. Temporal Motion Vector Prediction (TMVP) utilizes the motion vectors (or motion information) of the corresponding position CUs (i.e., co-located CUs) in the encoded images near the current CU. From the merge candidate list, the optimal motion vector candidate is selected as the motion vector of the current CU, and the prediction block of the current CU is determined based on the motion vector of the current CU.
[0006] Advanced / Alternative temporal motion vector prediction (ATMVP) is a motion vector prediction mechanism. The basic concept of the ATMVP technology is to perform motion compensation by obtaining the motion information of multiple sub-blocks within the current CU. In the construction of the candidate list (for example, the merge candidate list or the AMVP (Advanced Motion Vector Prediction) candidate list), the ATMVP technology introduces the motion information of multiple sub-blocks within the current CU as candidates. The realization of the ATMVP technology can be roughly divided into two steps. Step 1 is to determine one temporal vector by scanning the motion vector candidate list of the current CU or the motion vectors of adjacent image blocks of the current CU. Step 2 is to divide the current CU into N×N (N is 4 by default) sub-blocks (sub-CUs), determine the corresponding blocks within the reference frame of each sub-block based on the temporal vector obtained in Step 1, and determine the motion vector of each sub-block based on the motion vectors of the corresponding blocks within the reference frame of each sub-block.
[0007] In Step 1 of the current ATMVP technology, there is room for improvement in the process of determining the temporal vector by scanning the motion vector candidate list of the current CU or the motion vectors of adjacent image blocks of the current CU. In Step 2 of the current ATMVP technology, the size of the sub-CU is adaptively set at the frame level, and the default size is 4×4. When a certain preset condition is met, the size of the sub-CU is set to 8×8. There are some problems with the setting of the sub-CU size that do not match the current motion information storage granularity (8×8). There are redundant operations in the ATMVP technology and the TMVP technology depending on the situation, and there is room for improvement in the process of constructing the list of motion vector candidates. Summary of the Invention
[0008] This application provides a video processing method and apparatus that can reduce the complexity of ATMVP technology while maintaining the performance gains of conventional ATMVP technology.
[0009] The first aspect provides a video processing method, and the method includes: sequentially scanning N neighboring blocks smaller than M out of M preset neighboring blocks of the current image block, and determining a target neighboring block based on the scanning result; determining a related block of the current image block based on 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 way, and each sub-image block in the current image block corresponds one-to-one to each sub-image block in the related block; predicting each corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the related block.
[0010] In the solution provided by this application, in the process of obtaining the reference motion vector of the current image block, only N (N is smaller than M) out of the M motion vector candidates that have already been obtained are sequentially scanned, which can reduce the number of scans for the motion vector candidates in the process of obtaining the reference motion vector of the current image block compared with the prior art. It should be understood that by applying the solution provided by this application to step 1 of the conventional ATMVP technology, the redundant operations therein can be simplified.
[0011] The second aspect provides a video processing method, and the method includes: determining M neighboring blocks of the current image block based on M candidates in the second candidate list of the motion vector of the current image block; sequentially scanning N neighboring blocks smaller than M out of the M neighboring blocks, and determining a target neighboring block based on the scanning result; Based on the motion vector of the block near the target, the current image block, and the reference image of the current image block, determining the related block of the current image block; Based on the related block of the current image block, determining a specific candidate in the first candidate list of the motion vector of the current image block; When it is determined to use the specific candidate, dividing the current image block and the related block 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; Based on the motion vector of each sub-image block in the related block, respectively predicting the corresponding sub-image block in the current image block.
[0012] A third aspect provides a moving image processing apparatus, which sequentially scans N neighboring blocks smaller than M among M preset neighboring blocks of the current image block, determines a target neighboring block based on the scanning result, determines the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, and divides the current image block and the related block 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, and a construction module used for this; and a prediction module used for respectively predicting the corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the related block.
[0013] A fourth aspect provides a moving image processing apparatus, which Based on M candidates in the motion vector second candidate list of the current image block, determining M neighboring blocks of the current image block; sequentially scanning N neighboring blocks smaller than M among the M neighboring blocks, and determining a target neighboring block based on the scanning result; based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, determining a related block of the current image block; based on the related block of the current image block, determining a specific candidate in the motion vector first candidate list of the current image block; when it is determined to use the specific candidate, dividing the current image block and the related block into a plurality of sub-image blocks in the same method, and each sub-image block in the current image block is used to correspond one-to-one to each sub-image block in the related block, and a construction module for this purpose, including a prediction module used to predict corresponding sub-image blocks in the current image block respectively based on the motion vectors of each sub-image block in the related block.
[0014] The fifth aspect provides a moving image processing apparatus, 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. By executing the instructions stored in the memory, the processor is used to execute the method in the first aspect or any possible implementation form of the first aspect.
[0015] The sixth aspect provides a moving image processing apparatus, 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. By executing the instructions stored in the memory, the processor is used to execute the method in the second aspect or any possible implementation form of the second aspect.
[0016] The seventh aspect provides a computer storage medium, in which a computer program is stored, and when the computer program is executed by a computer, the computer is caused to execute the method according to the first aspect or any possible embodiment of the first aspect.
[0017] The eighth aspect provides a computer storage medium, in which a computer program is stored, and when the computer program is executed by a computer, the computer is caused to execute the method according to the second aspect or any possible embodiment of the second aspect.
[0018] The ninth aspect provides a computer program product including instructions, and when the instructions are executed by a computer, the computer is caused to execute the method according to the first aspect or any possible embodiment of the first aspect.
[0019] The tenth aspect provides a computer program product including instructions, and when the instructions are executed by a computer, the computer is caused to execute the method according to the second aspect or any possible embodiment of the second aspect.
[0020] The eleventh aspect provides a moving image processing method, the method comprising: determining at least one base motion vector list including a dual-prediction-based motion vector group including a first base motion vector and a second base motion vector; determining two motion vector displacement amounts corresponding to the first base motion vector and the second base motion vector respectively from a preset displacement amount set; determining a motion vector of a current image block based on the first base motion vector, the second base motion vector and the two motion vector displacement amounts; predicting the current image block based on the motion vector of the current image block.
[0021] The twelfth aspect provides a moving image processing method, the method comprising: Determining a base motion vector list including a base motion vector group, when at least one base motion vector in the base motion vector group points to a specific reference image, giving up determining the motion vector of the current image block based on the base motion vector group and the motion vector deviation amount.
[0022] A thirteenth aspect provides a moving image processing apparatus, which includes a construction module used for determining a base motion vector list including at least one double-prediction base motion vector group including a first base motion vector and a second base motion vector, determining two motion vector deviation amounts corresponding to the first base motion vector and the second base motion vector respectively from a preset deviation amount set, and determining the motion vector of the current image block based on the first base motion vector, the second base motion vector and the two motion vector deviation amounts, and a prediction module used for predicting the current image block based on the motion vector of the current image block.
[0023] A fourteenth aspect provides a moving image processing apparatus, which includes a determination module used for determining a base motion vector list including a base motion vector group, and a processing module used for giving up determining the motion vector of the current image block based on the base motion vector group and the motion vector deviation amount when at least one base motion vector in the base motion vector group points to a specific reference image.
[0024] A fifteenth aspect provides a moving image processing apparatus, which includes a memory and a processor. The memory is used for storing instructions, and the processor is used for executing the instructions stored in the memory. By executing the instructions stored in the memory, the processor is used for executing the method in any possible implementation of the eleventh aspect or the eleventh aspect.
[0025] Aspect 16 provides a moving image processing apparatus, 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. By executing the instructions stored in the memory, the processor is used to execute the method in any possible embodiment of Aspect 12 or Aspect 12.
[0026] Aspect 17 provides a computer storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer is caused to execute the method in any possible embodiment of Aspect 11 or Aspect 11.
[0027] Aspect 18 provides a computer storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer is caused to execute the method in any possible embodiment of Aspect 12 or Aspect 12.
[0028] Aspect 19 provides a computer program product including instructions. When the instructions are executed by a computer, the computer is caused to execute the method in any possible embodiment of Aspect 11 or Aspect 11.
[0029] Aspect 20 provides a computer program product including instructions. When the instructions are executed by a computer, the computer is caused to execute the method in any possible embodiment of Aspect 12 or Aspect 12.
Brief Description of the Drawings
[0030]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Embodiments for Carrying Out the Invention
[0031] Hereinafter, with reference to the drawings, the technical solutions in the embodiments of the present application will be described.
[0032] 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 the present application belongs. Here, the terms used in the specification of the present application are only for explaining specific embodiments and are not intended to limit the present application.
[0033] In video encoding and decoding, the prediction step is used to reduce redundant information in the 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 called a Prediction Unit (PU). Before encoding / compressing a frame of an image, the image is divided into a plurality of image blocks. Furthermore, each image block among the plurality of image blocks can be divided again into a plurality of image blocks, and it can be inferred based on this. In different encoding methods, the number of divided layers may be different, and the operation methods may also be different. In different encoding standard specifications, the names of image blocks on the same layer may be different. For example, in some video standard specifications, each image block among the plurality of image blocks obtained by first dividing a frame of an image is called a Coding Tree Unit (CTU). Each coding tree unit may contain one Coding Unit (CU), or may be divided again into a plurality of coding units. One coding unit can be divided into one, two, four, or other quantities of prediction units according to the prediction method. In some video standard specifications, the coding tree unit is also called the Largest Coding Unit (LCU).
[0034] Prediction means searching for image data similar to the prediction block, which is also called the reference block of this prediction block. By encoding / compressing the difference between the prediction block and the reference block of the prediction block, redundant information in the encoding / compression is reduced. Here, the difference between the prediction block and the reference block may be the residual obtained by subtracting the corresponding pixel value of the reference block from the prediction block. Prediction includes intra-frame prediction and inter-frame prediction. Intra-frame prediction refers to searching for the reference block of the prediction block within the frame where the prediction block is located, and inter-frame prediction refers to searching for the reference block of the prediction block within a frame other than the frame where the prediction block is located.
[0035] In some conventional video standard specifications, the prediction unit is the smallest unit in an image, and the prediction unit is not continuously divided into a plurality of image blocks. The "image block" or "current image block" described below means one prediction unit (or one coding unit), and one image block can be continuously divided into a plurality of sub-image blocks, and each sub-image block can be further predicted.
[0036] In this solution, before predicting the current image block, a motion vector candidate list is constructed, and the current image block is predicted based on the motion vector candidate selected from the motion vector candidate list. There are multiple modes in the motion vector candidate list. Hereinafter, examples will be given to explain the multiple modes of the motion vector candidate list.
[0037] In the first mode, as a first example, on the encoding side, after constructing the motion vector candidate list, the encoding of the current image block can be completed in the following steps.
[0038] 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 the motion vector candidate list of the MV1.
[0039] 2) Based on the motion vector MV1 of the current image block, determine the predicted image block of the current image block from the reference image (i.e., the reference frame). That is, determine the position of the predicted image block of the current image block in the reference frame.
[0040] 3) Obtain the residual between the current image block and the predicted image block.
[0041] 4) Transmit 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 side.
[0042] As an example, on the decoding side, the current image block can be decoded in the following steps.
[0043] 1) Receive from the encoding side the index in the motion vector candidate list of the residual and the motion vector of the current image block.
[0044] 2) Obtain the motion vector candidate list by the method according to the embodiment of the present application. The motion vector candidate list obtained on the decoding side is identical to the motion vector candidate list obtained on the encoding side.
[0045] 3) Based on the index, obtain the motion vector MV1 of the current image block from the motion vector candidate list.
[0046] 4) Based on the motion vector MV1, obtain the predicted image block of the current image block, and combine it with the residual to obtain the current image block by decoding.
[0047] That is, in the first mode, the motion vector of the current image block is equal to the predicted MV (Motion vector prediction, MVP). In some standard specifications, the first mode is also called the Merge mode.
[0048] In the second mode, different from the first mode, after the encoding side selects the optimal motion vector MV1 from the motion vector candidate list, it further performs motion search with MV1 as the search starting point, and finally records the displacement between the searched position and the search starting point as the motion vector difference value (Motion vector difference, MVD). Subsequently, based on 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 side further transmits the MVD to the decoding side. In some standard specifications, the second mode is also called the AMVP mode (i.e., the normal inter-frame prediction mode).
[0049] The method of constructing the motion vector candidate list in different modes may be the same or different. The motion vector candidate list constructed in the same method may be applied to only one of the modes, or may be applied to different construction modes, and is not limited here.
[0050] In this solution, two construction methods of the motion vector candidate list are provided. For the convenience of description, hereinafter, the motion vector candidate lists of these two construction methods 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 the sub-image block, and each candidate in the second motion vector candidate list includes the motion vector of the image block. As described above, the image block here and the current image block are the same type of concept, both referring to one prediction unit (or one coding unit), and the sub-image block refers to a plurality of sub-image blocks divided based on the image block. When predicting using the candidate in the first motion vector candidate list, the reference block of the current image block is determined based on the candidate, and then the residual between the image block and the reference block is calculated. When predicting using the candidate in the second motion vector candidate list, if the candidate used is the motion vector of the sub-image block, the reference block of each sub-image block in the current image block is determined based on the candidate, and then the residual between each sub-image block in the current image block and its reference block is calculated, and the residuals of each sub-image block are concatenated to the residual of the current image block.
[0051] Here, when determining candidates in the motion vector first candidate list and / or the motion vector second candidate list, one of the candidates can be determined based on the ATMVP technology. In one example, when constructing the motion vector first candidate list, the motion vector determined based on the ATMVP technology can be put into the list as the first candidate. In one example, when constructing the motion vector second candidate list, after putting candidates into the motion vector second candidate list based on the motion vectors of a preset number of spatial region neighboring blocks at a preset position of the current image block, the motion vector determined based on the ATMVP technology is put into the list as a candidate. Of course, the order of adding candidates to these two candidate lists may be other orders, but it is not limited here.
[0052] Next, an example will be given to explain how to determine one of the candidates based on the ATMVP technology according to the usage method of the construction method of the motion vector second candidate list.
[0053] In the description of the construction method of the motion vector second candidate list, for ease of understanding, the motion vector is described here. The motion vector of an image block can include two pieces of information: 1) the image pointed to by the motion vector, and 2) the displacement. The motion vector of an image block means an image block having the same displacement as the image block in the image pointed to by the motion vector. For an encoded / decoded image block, the concept of its motion vector includes 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. Note that the reference block of an image block described here means the image block used to calculate the residual of the image block.
[0054] FIG. 1 is a schematic flowchart of a moving image processing method provided by an embodiment of the present application. The method includes the following steps.
[0055] S110. Determine M motion vector candidates for inclusion in the second candidate list of motion vectors of the current image block.
[0056] The current image block is an image block to be encoded (or decoded). The image frame in which the current image block is located is called the current frame. For example, the current image block is one coding unit (CU).
[0057] For example, the second candidate list of motion vectors of the current image block may be a Merge candidate list or an AMVP candidate list. For example, the second candidate list of motion vectors may be a 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 may have another name.
[0058] The M motion vector candidates may be determined based on the motion vectors of M neighboring blocks within the current frame of the current image block. The neighboring blocks may be image blocks adjacent to the position of the current image block in the current frame or having a certain position pitch. Note that these M neighboring blocks are encoded (or decoded) image blocks within the current frame.
[0059] As an example, as shown in FIG. 2, the M neighboring blocks of the current image block are the four positions A around the current image block shown in FIG. 2 1 (left) → B 1 (above) → B 0 (upper right) → A 0 (lower left). Determine M (i.e., M equals 4) motion vector candidates of the current image block based on the motion vectors of the image blocks at these four positions.
[0060] In addition, when an inaccessible neighboring block appears among the M neighboring blocks, or when a neighboring block using an intra-frame coding mode appears among the M neighboring blocks, the motion vector of the inaccessible neighboring block or the neighboring block using the intra-frame coding mode is inaccessible. Therefore, the motion vector of the inaccessible neighboring block is not used as a motion vector candidate, and the abandonment of putting the inaccessible motion vector into the second candidate list of the motion vectors of the current image block is performed.
[0061] As one possible embodiment, after step S110 is completed, the M motion vector candidates have already been put into the second candidate list of motion vectors. In step S120, the second candidate list of motion vectors can be directly scanned.
[0062] S120. Sequentially scan N motion vector candidates out of the M motion vector candidates, and determine a reference motion vector based on the scanning result, where N is smaller than M. Here, both M and N are natural numbers.
[0063] Regardless of whether all of the M motion vector candidates are put into the second candidate list of motion vectors, or only some of the motion vector candidates among the M motion vector candidates are put into the second candidate list of motion vectors because some of the M motion vector candidates become inaccessible, N motion vector candidates out of the M motion vector candidates are fixedly scanned sequentially. Fixedly scanning N motion vector candidates out of the M motion vector candidates sequentially may refer to fixedly scanning the motion vector candidates that have already been put into the motion vector candidate list among the N motion vector candidates, or may also refer to fixedly scanning N motion vector candidates that have already been put into the motion vector candidate list among the M motion vector candidates.
[0064] The process of determining a reference motion vector based on the scanning results of N motion vector candidates may be a process of sequentially determining the N motion vector candidates based on preset conditions and determining the reference motion vector based on the determination results.
[0065] As an example, the preset conditions include that the image block is acquirable, or the intra-frame prediction coding mode is not adopted, and the reference frame pointed to by the motion vector candidate is the same as the reference image of the current image block.
[0066] 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 on the encoding and decoding sides, 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.
[0067] 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 a frame for obtaining and predicting the motion information set in the slice-level information header. In some application scenarios, the co-located frame is also called a collocated picture.
[0068] It should be understood that according to the evolution of future technologies, this preset condition may give other different definitions, and the corresponding solutions also fall within the protection scope of this application.
[0069] Hereinafter, the process of determining a reference motion vector based on the scanning results of N motion vector candidates will be described in detail.
[0070] In step S120, only N of the M motion vector candidates obtained in step S110 are scanned, so that the number of scans can be reduced in this way.
[0071] Optionally, in step S120, the first N motion vector candidates among the M motion vector candidates may be sequentially scanned.
[0072] Optionally, in step S120, the last N motion vector candidates among the M motion vector candidates may be sequentially scanned, or the middle N motion vector candidates among the M motion vector candidates may be sequentially scanned. The present application is not limited thereto.
[0073] As an example, in step S120, some of the M motion vector candidates are sequentially scanned.
[0074] As another example, in step S120, some of the motion vector candidates that have already been included in the second motion vector candidate list are sequentially scanned.
[0075] S130. Based on the reference motion vector, the current image block, and the reference image of the current image block, determine the motion vector candidates that will continue to be included in the second motion vector candidate list.
[0076] The second motion vector candidate list of the current image block includes the M motion vector candidates determined in step S110 and the motion vector candidates determined in step S130. In one example, after determining the (M + 1)-th motion vector candidate that will continue to be included in the second motion vector candidate list in S130, other motion vector candidates that will continue to be included in the second motion vector candidate list are determined by other methods, which are not limited here.
[0077] After completing the construction of the second motion vector candidate list, as shown in FIG. 1, the method further includes step S140 of determining the motion vector of the current image block based on the second motion vector candidate list obtained in step S130.
[0078] It should be understood that the solution provided in this application can be applied to the ATMVP technology. In step 1 of the conventional ATMVP technology, the temporal vector of the current image block is obtained by scanning all the spatial motion vector candidates that have already been included in the motion vector second candidate list. For example, generally, 4 spatial motion vector candidates are captured in the motion vector second candidate list, so it may be necessary to scan 4 motion vector candidates to obtain the temporal vector of the image block.
[0079] On the other hand, in the embodiment of this application, in the process of obtaining the reference motion vector of the current image block, only N (N is smaller than M) of the M motion vector candidates that have already been obtained are sequentially scanned, compared with the prior art, the number of scans for the motion vector candidates in the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that by applying the solution provided in this application to step 1 of the conventional ATMVP technology, the redundant operations therein can be simplified.
[0080] The applicant selected the official common test sequence as the test sequence on the latest reference software VTM-2.0 of the next-generation video coding (Versatile Video Coding), and conducted tests on the solution provided in this application in the test configurations of the RA configuration and the LDB configuration. According to the test results, after reducing the number of scans, the performance gain of the ATMVP technology can be maintained.
[0081] Therefore, the solution provided in this application can reduce the complexity of the ATMVP technology while maintaining the performance gain of the conventional ATMVP technology.
[0082] The motion vector second candidate list formed by the solution regarding the construction provided in this application can be applied to the encoding side and the decoding side. In other words, the execution subject of the method provided in this application may be the encoding side or the decoding side.
[0083] As an example, the second candidate list of motion vectors formed by the solution regarding the construction provided in the present application can be applied to the above first mode (e.g., Merge mode).
[0084] Optionally, in this embodiment, in step S110, based on the motion vectors of four neighboring blocks of the current image block within the current frame, four motion vector candidates for inclusion in the second candidate list of the motion vector of the current image block are determined, that is, M is equal to 4. In step S120, N of the four motion vector candidates are scanned, and N is smaller than 4.
[0085] For example, N is equal to 1. For example, in step S120, only the first motion vector candidate in the second candidate list of motion vectors is scanned. Also, for example, N is equal to 2 or 3.
[0086] Hereinafter, a method for determining the reference motion vector of the current image block based on the scanning results of N motion vector candidates in step S120 will be described.
[0087] In step S120, it is determined one by one whether N of the M motion vector candidates meet a preset condition, and the reference motion vector is determined based on the determination result. Here, the definition of the preset condition will be described by taking the case where the reference frame pointed to by the motion vector candidate is the same as the reference image of the current image block as an example.
[0088] Optionally, in step S120, when the N motion vector candidates are sequentially scanned and the scanning reaches the motion vector candidate that meets the first preset condition, that is, when the scanning reaches the motion vector candidate whose first reference frame is the same as the co-located frame of the current frame, the scanning is stopped, and the reference motion vector is determined based on the first motion vector candidate that meets the preset condition that has been scanned.
[0089] When scanning up to the motion vector candidate that meets the first preset condition, the number of scans may be equal to N or less than N. For example, if the first motion vector candidate scanned meets the preset condition, the scanning stops, and this motion vector candidate is used as the reference motion vector for the current image block.
[0090] Optionally, in step S120, when a motion vector candidate that meets the preset condition among the N motion vector candidates has not been scanned, that is, when all the reference frames pointed to by the N motion vector candidates are different from the co-located frame of the current image block, a default value is used as the value of the reference motion vector.
[0091] For example, the default value is (0, 0), that is, the reference motion vector is (0, 0). Depending on the actual situation, the default value may have other definitions.
[0092] Optionally, in step S120, when a motion vector candidate that meets the preset condition among the N motion vector candidates has not been scanned, that is, when all the reference frames pointed to by the N motion vector candidates are different from the co-located frame of the current image block, scaling processing is performed on a specific motion vector candidate in the second motion vector candidate list, and the reference motion vector is determined based on the specific motion vector candidate after the scaling processing.
[0093] The specific motion vector candidate may be the first motion vector or the last motion vector obtained in the scanning order among the N motion vector candidates.
[0094] The specific motion vector candidate may further be a motion vector obtained in other scanning orders among the N motion vector candidates.
[0095] The definition of the preset condition is that when the reference frame pointed to by the motion vector candidate is the same as the reference frame of the current image block, scaling processing is performed on a specific motion vector candidate in the second motion vector candidate list, and the reference motion vector is determined based on the specific motion vector candidate after the scaling processing. This includes performing scaling processing on the specific motion vector candidate in the second motion vector candidate list so that the reference frame pointed to by the scaled specific motion vector candidate is the same as the reference image of the current image block, and using the specific motion vector candidate after the scaling processing as the reference motion vector.
[0096] As shown in FIG. 3, 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 motion vector candidate. In one embodiment, based on the time distance between the reference image neigh_ref_pic pointed to by the specific motion vector candidate and the image curr_pic where the image block corresponding to the specific motion vector is located, and the time distance between the reference image col_pic of the current image block and the image curr_pic where the current image block is located, the scale of the specific motion vector is determined.
[0097] If the difference in the degree of motion between image frames is poor and there is intense motion between the current frame and its collocated frame, and the motion vector (0, 0) is used as the basis for positioning the corresponding block of the current block, assuming that the absolute coordinates in the collocated frame of the current block remain unchanged without considering the motion between frames, in fact, since the probability that the coordinates in the collocated frame of the current block are different from its coordinates in the current frame is very high, it should be understood that large variations will occur.
[0098] In an embodiment of the present application, when a motion vector candidate among N motion vector candidates, for which the reference frame and the co-located frame of the current frame are the same, has not been scanned, scaling processing is performed on one of the N motion vector candidates so that the reference frame and the co-located frame of the current frame become the same, and subsequently, the motion vector candidate after this scaling processing is used as the motion vector of the current image block. In this way, the accuracy of the motion vector of the current image block can be improved.
[0099] Optionally, when N is an integer smaller than M and greater than 1, the specific motion vector candidate in this embodiment may be the motion vector candidate among the N motion vector candidates for which the distance between the reference frame and the co-located frame of the current image block is the closest in the time domain.
[0100] Select the motion vector candidate among the N motion vector candidates for which the distance between the reference frame and the co-located frame of the current frame is the closest and perform scaling processing on it, reducing the time taken for the scaling processing, thereby improving the efficiency of obtaining the motion vector of the current image block.
[0101] Optionally, when N is an integer smaller than M and greater than 1, the specific motion vector candidate in this embodiment may be any one of the N motion vector candidates.
[0102] Note that when N is equal to 1, the specific motion vector candidate in this embodiment is this motion vector candidate to be scanned.
[0103] Optionally, as an example, when N is equal to 1, in step S120, the reference motion vector of the current image block is obtained by scanning one motion vector candidate in the second motion vector candidate list. If the reference frame pointed to by the scanned motion vector candidate is different from the co-located frame of the current frame in which the current image block is located, scaling processing is performed on this motion vector candidate so that the reference frame of the scaled motion vector candidate is the same as the co-located frame of the current frame, and the motion vector candidate after the scaling processing is used as the reference motion vector of the current image block. If the reference frame of the scanned motion vector candidate is the same as the co-located frame of the current frame, this motion vector candidate is used as the motion vector of the current image block.
[0104] In this embodiment, by scanning one motion vector candidate in the motion vector candidate list, the motion vector of the current image block is obtained, and the number of times of scanning the motion vector candidate in the process of obtaining the motion vector of the current image block is effectively reduced. If the reference frame of the scanned motion vector candidate is different from the co-located frame of the current frame, scaling processing is performed on this motion vector candidate so that its reference frame is the same as the co-located frame of the current frame, and then the motion vector candidate after this scaling processing is used as the motion vector of the current image block. In this way, the accuracy of the motion vector of the current image block can be improved. Therefore, compared with the prior art, the solution provided by the embodiment of the present application can not only simplify the process of determining the motion vector of the current image block, but also improve the accuracy of the motion vector of the current image block.
[0105] It should be understood that when the definition of the preset conditions changes, the process of performing scaling processing on a specific motion vector candidate in the second motion vector candidate list also changes correspondingly, that is, it is necessary to ensure that the specific motion vector candidate after the scaling processing meets the preset conditions.
[0106] Next, in step S130, a process of determining motion vector candidates to be continuously included in the second motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block will be described.
[0107] Optionally, as an embodiment, determining motion vector candidates to be continuously included in the second motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block includes dividing the current image block into a plurality of sub-image blocks, determining related blocks of the sub-image blocks in the reference image of the current image block based on the reference motion vector, and determining motion vector candidates to be continuously included in the second motion vector candidate list based on the motion vectors of the related blocks.
[0108] 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 included in the second motion vector candidate list. When predicting using the candidates, each sub-image block in the current image block is predicted based on the motion vectors of the related blocks of the sub-image block.
[0109] In one example, the representative motion vector of the associated block of the current image block is used as a candidate and added to the second candidate list of motion vectors, and the candidate is marked as being determined based on the ATMVP technique. When predicting using the candidate, the associated block of the current image block is determined based on the mark and the candidate, the current image block and the associated block are divided into a plurality of sub-image blocks in the same manner, each sub-image block in the current image block is made to correspond one-to-one with each sub-image block in the associated block, and each corresponding sub-image block in the current image block is predicted based on the motion vector of each sub-image block in the associated block. Optionally, when there is a sub-image block in the associated block for which a motion vector cannot be obtained, the unobtainable motion vector is replaced with the representative motion vector of the associated block, and the corresponding sub-image block in the current image block is predicted. Optionally, when there is a sub-image block in the associated block for which a motion vector cannot be obtained and all of the representative motion vectors of the associated block are unobtainable, giving up adding the candidate determined based on the ATMVP technique to the second candidate list of motion vectors. In one example, when a sub-image block in the associated block is unobtainable or when a sub-image block in the associated block uses an intra-frame coding mode, it is determined that there is a sub-image block in the associated block for which a motion vector cannot be obtained.
[0110] Optionally, the representative motion vector of the associated block of the current image block may refer to the motion vector at the central position of the associated block, or may refer to a motion vector representing another such associated block, and is not limited herein.
[0111] In some standard specifications regarding video encoding and decoding, the associated block may be referred to as a collocated block or a corresponding block.
[0112] For example, the current image block is one CU, and the sub-image blocks obtained after dividing it may be called sub-CUs. 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 64 pixels or more. Optionally, both the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels.
[0113] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of the sub-image block. The size of the sub-image block is 4×4 by default, and when a certain condition is met, the size of the sub-image block is set to 8×8. For example, on the encoding side, when encoding the current image block, when encoding the ATMVP mode of the previous encoded image block in the same temporal layer, the average block size of each sub-image block in the CU is calculated. If the average block size is larger than the threshold, the dimension 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 next-generation video coding standard (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 conform to the storage granularity of the motion vector in the current standard. Also, in the current ATMVP technology, when encoding the current image block, it is further necessary to store the information on the size of the sub-image block of the previous encoded image block in the same temporal layer.
[0114] In the embodiments of the present application, the size of the sub-image block of the current image block is set to 8×8, which can adapt to the storage granularity of the motion vector defined in the video standard VVC. On the other hand, it is not necessary to store the information on the size of the sub-image block of the previous encoded image block, so the storage space can be saved.
[0115] Currently, the TMVP technology performs scaling on the MV of the co-located CU in the encoded image near the lower right corner or the central position of the current CU to obtain the temporal motion vector candidate of the current CU. That is, TMVP fully searches two fixed-position encoded blocks in the reference image to obtain the MVP, and this order is TB→TC, and the MV obtained first by the full search is directly used as the MVP of TMVP. In the embodiments of the present application, the size of the sub-image block in the ATMVP technology is set to 8×8, which uses one MV in the existing merge candidate list of each implementation of the present application to position the relevant block, and the MV of the positioned relevant block is used as the MVP of ATMVP.
[0116] In some versions of the video standard VVC, constructing the merge list means constructing the merge candidate list of ATMVP first 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 performed in the merge list construction process, and the construction of the merge candidate list of ATMVP is performed in the affine merge list construction process. Although ATMVP and TMVP construct two different lists respectively, originally, there is no need to add the same or the same group of MVs to the two merge candidate lists. When both the width and height of the current CU are equal to 8, there may be some redundancy in the merge candidate lists constructed by TMVP and ATMVP respectively, that is, the two technologies may derive the same group of temporal candidate motion information for the current CU.
[0117] In some embodiments of the present application, when the width and height of the current CU are both equal to 8, set not to perform the TMVP operation. That is, 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, set not to perform the TMVP operation. Thereby, it is possible to avoid that ATMVP and TMVP include the same or the same group of MVs in the merge candidate lists constructed respectively, skip some redundant operations, effectively save the encoding and decoding time, and improve the encoding efficiency.
[0118] In some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, set not to perform the TMVP operation. That is, 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, set not to perform the TMVP operation. This is because in the hardware design of the coder and / or decoder, the consistency of the time required to complete encoding or decoding in the processing area of the same size as much as possible is required.
[0119] However, in the case of an area containing many small blocks, the clock time required for encoding or decoding is much longer than that of other areas. Furthermore, when both the width and height of the sub-image block and / or the related block of the sub-image block are less than 8 pixels, it may be set not to perform the TMVP operation. Therefore, saving the clock time for encoding or decoding small blocks has great significance for the parallel processing of hardware. In addition, the current encoding technology is becoming increasingly efficient in utilizing temporal correlation, and many temporal prediction technologies such as the ATMVP technology are adopted. Therefore, for small blocks, the impact on performance by skipping the TMVP operation can be ignored, so the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.
[0120] 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 are fixed at 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block may further be other dimensions. 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.
[0121] Optionally, as another embodiment, determining a motion vector candidate to be subsequently included in the second motion vector candidate list based on the reference motion vector, the current image block, and the 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 based on the reference motion vector, and determining a motion vector candidate to be subsequently included in the second motion vector candidate list based on the motion vector of the related block.
[0122] In encoding / decoding techniques, generally, an encoded / decoded image is used as a reference image for the current encoding / decoding target. In some embodiments, furthermore, one reference image can be constructed to improve the similarity between the reference image and the current encoding / decoding target image.
[0123] For example, in moving image content, there are specific encoding / decoding scenes where the background hardly changes, and only the foreground of the moving image changes or moves. For example, video monitoring belongs to such scenes. In the scene of video monitoring, usually, the monitoring camera is fixed or only moves slowly, and it is considered that the background hardly changes. On the other hand, objects such as people and cars captured by the video monitoring camera are always moving or changing, and the foreground is always changing. In such a scene, a specific reference image containing only high-quality background information can be created. The specific reference image may include a plurality of image blocks, and any image block is also taken from a certain decoded image, and different image blocks in the specific reference image may be obtained from different decoded images. When performing inter-frame prediction, the background part of the currently encoded / decoded target image refers to the specific reference image, thereby reducing the residual information of the inter-frame prediction and improving the encoding / decoding efficiency.
[0124] The above is a specific example of the specific reference image. In some embodiments, the specific reference image has at least one property of a composite reference, a long-term reference image, and a non-output image. Here, the non-output image refers to an image that is output but not displayed, and generally, the non-output image exists as a reference image for other images. For example, the specific reference image may be a constructed long-term reference image, a non-output composite frame, or a non-output long-term reference image. In some embodiments, the composite frame is also called a synthetic reference frame.
[0125] In some embodiments, the non-specific reference image may be a reference image that does not have at least one of the following properties of the structural frame, long-term reference image, and non-output image. For example, the non-specific reference image may include a reference image other than the structural frame, or may include a reference image other than the long-term reference image, or may include a reference image other than the non-output image, or may include a reference image other than the constructed long-term reference image, or may include a reference image other than the non-output structural frame, or may include a reference image other than the non-output long-term reference image, etc.
[0126] In some embodiments, when an image in a moving image can be used as a reference image, the long-term reference image and the short-term reference image can be distinguished. Here, 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 certain period of time. After some in-and-out operations of the decoded reference image behind the short-term reference image in the reference image buffer, the short-term reference image is moved out of the buffer. The reference image buffer may also be referred to as a reference image list cache, a reference image list, a reference frame list cache, or a reference frame list, etc., and is collectively referred to as the reference image buffer here.
[0127] 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, and the long-term reference image (or a part of the data in the long-term reference image) is not affected by the in-and-out operations in the reference image buffer of the decoded reference image. Only when an operation of sending an update command is performed on the decoding side, the long-term reference image (or a part of the data in the long-term reference image) is moved out of the reference image buffer.
[0128] The naming methods of short-term reference images and long-term reference images may differ under different standard specifications. For example, in standards such as H.264 / Advanced Video Coding (AVC) or H.265 / HEVC, the short-term reference image is called a short-term reference frame, and the long-term reference image is called a long-term reference frame. Also, in standards such as Audio Video Coding Standard (AVS) 1-P2, AVS2-P2, and Institute of Electrical and Electronics Engineers (IEEE) 1857.9-P4, the long-term reference image is called a background picture. Further, in standards such as VP8 and VP9, the long-term reference image is called a golden frame.
[0129] Note that although specific terms are used in the embodiments of this application, it does not mean that they must be applied to specific scenes. For example, calling the long-term reference image a long-term reference frame does not mean that it must be applied to technologies corresponding to standards such as H.264 / AVC or H.265 / HEVC.
[0130] The above long-term reference image may be obtained from the image block structure extracted from a plurality of decoded images, or may be obtained by updating an existing reference frame (for example, a pre-stored reference frame) using a plurality of decoded images. Naturally, the structural specific reference image may also be a short-term reference image. Or, the long-term reference image may not be a structural reference image.
[0131] In the above embodiments, the specific reference image may include the long-term reference image, and the non-specific reference image may include the short-term reference image.
[0132] Optionally, the type of the reference frame can be identified within the code stream structure by a special field.
[0133] Optionally, when the reference image is determined to be a long-term reference image, determine the reference image as a specific reference image, or when the reference image is determined to be a non-output frame, determine the reference image as a specific reference image, or when the reference image is determined to be a structure frame, determine the reference image as a specific reference image, or when the reference image is determined to be a non-output frame and further the reference image is determined to be a structure frame, determine the reference image as a specific reference image.
[0134] Optionally, various reference images may each have their own identifier. In this case, for the decoding side, based on the identifier of the reference image, it can be determined whether the reference image is a specific reference image.
[0135] In some embodiments, when it is determined that the reference image has an identifier of a long-term reference image, it is determined that the reference image is a specific reference image.
[0136] In some embodiments, when it is determined that the reference image has a non-output identifier, it is determined that the reference image is a specific reference image.
[0137] In some embodiments, when it is determined that the reference image has an identifier of a structure frame, it is determined that the reference image is a specific reference image.
[0138] In some embodiments, when it is determined that the reference image has at least two identifiers out of the three identifiers: the identifier of the long-term reference image, the non-output identifier, the identifier of the structure frame or the identifier of the composite reference frame, it is determined that the reference image is a specific reference image. For example, when it is determined that the reference image has a non-output identifier and it is determined that the reference image has an identifier of a structure frame, it is determined that the reference image is a specific reference image.
[0139] Specifically, the image may have an identifier indicating whether it is an output frame. If it is indicated that a certain image is not output, it indicates that the frame is a reference image. Further, it is determined whether the frame has an identifier of a structure frame. If so, it is determined that the reference image is a specific reference image. When it is indicated that a certain image is output, the determination as to whether it is a structure frame is not made, and it can be directly determined that the frame is not a specific reference image. Alternatively, even if it is indicated that an image is not output, if it has an identifier indicating that it is not a structure frame, it can be determined that the frame is not a specific reference image.
[0140] Optionally, when it is determined that the reference image satisfies one of the following conditions by analyzing 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. That is, the reference image is a long-term reference image, the reference image is a structure reference image, the reference image is a non-output image, and when the reference image is a non-output image, it is further determined that the reference image is a structure reference image.
[0141] In some embodiments of the examples of the present application, in the process of determining the motion vector of the current image block, it is related to determining the motion vector of the image block by using the motion vector of an image block on another image. For the convenience of description, the image block is called the first image block, and an 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. Therefore, in the process of determining the motion vector of the first image block by using the motion vector of the temporal reference block (or related block), it may be necessary to scale the motion vector of the temporal reference block (or related block). For the convenience of description, in this specification, the term "related block" is uniformly used.
[0142] For example, when applying the ATMVP technology to the construction of the AMVP candidate list, when determining the motion vector of the related block of the current image block based on 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 based on the scaled motion vector. Generally, based on the temporal 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 temporal distance between the reference image of the current image block and the image where the current image block is located, the scale of the motion vector of the related block is determined.
[0143] In one 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 called x. Here, 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 related block is located. The reference frame index value of the reference image of the first image block is called y. Here, 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. Therefore, the scale for 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.
[0144] 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 the specific reference image, since the definition of the temporal distance between the specific reference image and the image where the first image block is located is ambiguous, there is no meaning in scaling the motion vector MV2 of the related block.
[0145] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vector of the related block, specifically, when the motion vector of the related block points to a specific reference image, or when the reference image of the current image block is the specific reference image, the motion vector of the current image block is determined based on the motion vector of the related block after processing. Here, the motion vector of the related block after processing is the same as the motion vector of the related block before processing.
[0146] For example, the motion vector of the related block after processing includes the motion vector obtained by scaling the motion vector of the related block with a scale of 1 in terms of value, or the motion vector of the related block with the scaling step skipped.
[0147] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vectors of the related blocks, specifically, when the motion vector of the related block points to a specific reference image or the reference image of the current image block is the specific reference image, the determination of the motion vector of the current image block based on the motion vector of the related block is abandoned.
[0148] In some embodiments, step S120 includes: when a motion vector candidate that meets the preset conditions among the N motion vector candidates has not been scanned, performing scaling processing on a specific motion vector candidate in the second motion vector candidate list, and determining a reference motion vector based on the specific motion vector candidate after the scaling processing. In this case, optionally, the method further includes: when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, determining a motion vector candidate that continues to be included in the second motion vector candidate list based on the specific motion vector candidate after the processing, where the motion vector of the specific motion vector candidate after the processing is the same as the motion vector of the specific motion vector candidate before the processing.
[0149] Here, the motion vector of the related block after the processing includes the motion vector obtained after scaling the motion vector of the related block at a scale of 1 in value, or the motion vector of the related block that skips the scaling step.
[0150] In some embodiments, step S120 includes: when a motion vector candidate that meets the preset conditions among the N motion vector candidates has not been scanned, performing scaling processing on a specific motion vector candidate in the second motion vector candidate list, and determining a reference motion vector based on the specific motion vector candidate after the scaling processing. In this case, optionally, the method further includes: when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, abandoning the determination of a motion vector candidate that continues to be included in the second motion vector candidate list based on the specific motion vector candidate.
[0151] As can be seen from the above, in the embodiment of the present application, in the process of obtaining the reference motion vector of the current image block, only N (N is smaller than M) of the M motion vector candidates that have already been obtained are sequentially scanned, and compared with the prior art, the number of scans for the motion vector candidates in the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that by applying the solution provided by the present application to the conventional ATMVP technology, the redundant operations therein can be simplified.
[0152] If the motion vector candidate among the N motion vector candidates for which the co-located frame of the reference frame and the current frame is the same has not been scanned, scaling processing is performed on one of the N motion vector candidates so that its reference frame becomes the same as the co-located frame of the current frame, and then the scaled motion vector candidate is used as the motion vector of the current image block, thereby improving the accuracy of the motion vector of the current image block.
[0153] The current image block can be divided into sub-image blocks of size 8×8 to adapt to the storage granularity of the motion vectors defined in the video standard VVC. On the other hand, it is not necessary to store the information on the size of the sub-blocks of the previous encoded image block, so the storage space can be saved.
[0154] 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, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0155] In some embodiments of the present application, when the current width and / or height of the CU is less than 8 pixels, the TMVP operation is set not to be performed. That is, 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, the TMVP operation is set not to be performed. In this case, since the impact on performance by skipping the TMVP operation can be ignored, the encoding and decoding times can be effectively saved, and the encoding efficiency can be improved.
[0156] As shown in FIG. 4, an embodiment of the present application further provides a moving image processing method, and the method includes the following steps.
[0157] S410. Obtain M motion vector candidates to be included in the second candidate list of the motion vectors of the current image block.
[0158] Step S410 corresponds to step S110 described above. For a specific description, refer to the above description and it will not be described again here.
[0159] S420. Sequentially scan at least some of the M motion vector candidates, and determine the reference motion vector of the current image block based on the scanning result.
[0160] As an optional embodiment, some of the M motion vector candidates are sequentially scanned, and the reference motion vector of the current image block is determined based on the scanning result. In such an embodiment, step S420 can correspond to step S120 described above. For a specific description, refer to the above description.
[0161] As another optional embodiment, all of the M motion vector candidates are sequentially scanned, and the reference motion vector of the current image block is determined based on the scanning result.
[0162] Note that in step S420, for the specific method of determining the reference motion vector of the current image block based on the scanning result, reference can be made to the relevant descriptions in the above embodiments, and details will not be repeated here.
[0163] S430. Divide the current image block into a plurality of sub-image blocks. Here, the size of the sub-image block is fixed to 64 or more pixels.
[0164] For example, if the current image block is one CU, the sub-image blocks obtained after dividing it may be called sub-CUs.
[0165] S440. Determine the relevant block of the sub-image block in the reference image of the current image block based on the reference motion vector.
[0166] The reference image of the current image block may be the same position frame of the current image block.
[0167] S450. Determine the motion vector candidate to be continuously included in the second candidate list of motion vectors based on the motion vectors of the relevant blocks.
[0168] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of the sub-image block. The size of the sub-image block is 4×4 by default, and when certain conditions are met, the size of the sub-image block is set to 8×8. For example, on the encoding side, when encoding the current image block, when encoding in the ATMVP mode of the previous encoded image block in the same temporal layer, calculate the average block size of each sub-image block in the CU. If the average block size is larger than the threshold, the dimension of the sub-image block of the current image block is set to 8×8; otherwise, the default value of 4×4 is used. That is, in the prior art, when encoding the current image block, it is necessary to further store the information on the size of the sub-image block of the previously encoded image block in the same temporal layer.
[0169] In an embodiment of the present application, the size of the sub-image block of the current image block is fixed to 64 or more pixels, and there is no need to store the information on the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0170] Optionally, in this embodiment, both the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels.
[0171] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of the sub-image block. The size of the sub-image block is 4×4 by default, and when a certain condition is met, the size of the sub-image block is set to 8×8. For example, on the encoding side, when encoding the current image block, when encoding in the ATMVP mode of the previous encoded image block in the same time layer, the average block size of each sub-image block in the CU is calculated. When the average block size is larger 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 next-generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored in the 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 conform to the storage granularity of the motion vector in the current standard. Also, in the current ATMVP technology, when encoding the current image block, it is further necessary to store the information on the size of the sub-image block of the previous encoded image block in the same time layer.
[0172] In an embodiment of the present application, the size of the sub-image block of the current image block is set to 8×8, which can adapt to the storage granularity of the motion vector defined in the video standard VVC. On the other hand, there is no need to store the information on the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0173] 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, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0174] 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. That is, 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. In this case, the impact on performance by skipping the TMVP operation can be ignored, so the encoding and decoding time can be effectively saved, and the encoding efficiency can be improved.
[0175] Note 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 at 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block may be other dimensions. 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.
[0176] Optionally, in step S420, when at least some of the motion vector candidates are sequentially scanned and the scanning stops when a motion vector candidate that meets the first preset condition is scanned, and a reference motion vector is determined based on the first scanned motion vector candidate that meets the preset condition.
[0177] Determining a reference motion vector based on the first scanned motion vector candidate that meets the preset condition includes using the motion vector candidate that meets the first preset condition as the target neighboring block.
[0178] Optionally, the preset condition includes that the reference image of the motion vector candidate is the same as the reference image of the current image block.
[0179] Optionally, when the motion vector of the related block points to a specific reference image or the reference image of the current image block is the specific reference image, step S450 includes determining a motion vector candidate to be continuously included in the second candidate list of motion vectors based on 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.
[0180] For example, the motion vector of the processed related block includes the motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the motion vector of the related block with the scaling step skipped.
[0181] Optionally, when the motion vector of the related block points to a specific reference image or the reference image of the current image block is the specific reference image, step S450 includes abandoning the determination of a motion vector candidate to be continuously included in the second candidate list of vectors based on the motion vector of the related block.
[0182] Therefore, in the embodiment shown in FIG. 4, the current image block can be divided into sub-image blocks of size 8×8 and adapted to the storage granularity of the motion vectors defined in the video standard VVC. On the other hand, it is not necessary to store the information on the size of the sub-blocks of the previous encoded image block, so the storage space can be saved.
[0183] 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, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0184] In some embodiments of the present application, when the current width and / or height of the CU is less than 8 pixels, the TMVP operation is set not to be performed. That is, 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, the TMVP operation is set not to be performed. In this case, since the impact on performance by skipping the TMVP operation can be ignored, the encoding and decoding times can be effectively saved, and the encoding efficiency can be improved.
[0185] The above has described how to determine candidates to be included in the second candidate list of motion vectors based on the ATMVP technology. In some embodiments, other candidates can also be included in the second candidate list of motion vectors, but are not limited herein.
[0186] The above has described embodiments of the method of the present application in relation to FIGS. 1 and 4. Hereinafter, embodiments of the apparatus corresponding to the embodiments of the above method will be described. Since the description of the embodiments of the apparatus corresponds to the description of the embodiments of the method, for the content not described in detail, reference may be made to the above embodiments of the method. For the sake of simplicity, it will not be described again here.
[0187] FIG. 5 is a schematic block diagram of a moving image processing apparatus 500 provided according to an embodiment of the present application. The apparatus 500 is used to execute the embodiment of the method shown in FIG. 1. The apparatus 500 includes the following units.
[0188] An acquisition unit 510, which is used to acquire M motion vector candidates to be included in the second candidate list of motion vectors of the current image block.
[0189] A determination unit 520, which is used to sequentially scan N motion vector candidates among the M motion vector candidates and determine a reference motion vector based on the scanning result, where N is less than M.
[0190] The determination unit 520 is further used to determine motion vector candidates to be continuously included in the second motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block.
[0191] The determination unit 520 is further used to determine the motion vector of the current image block based on the second motion vector candidate list.
[0192] In step 1 of the conventional ATMVP technology, the temporal vector of the current image block is obtained by scanning all the motion vector candidates that have already been included in the second motion vector candidate list. For example, generally, 4 motion vector candidates are incorporated into the second motion vector candidate list, so it may be necessary to scan 4 motion vector candidates to obtain the temporal vector of the image block.
[0193] On the other hand, in the embodiment of the present application, in the process of obtaining the reference motion vector of the current image block, only N (N is smaller than M) of the M motion vector candidates that have already been obtained are sequentially scanned, and compared with the prior art, the number of scans for the motion vector candidates in the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that by applying the solution provided by the present application to step 1 of the conventional ATMVP technology, the redundant operations therein can be simplified.
[0194] The applicant selects the official common test sequence as the test sequence on the latest reference software VTM-2.0 of the next-generation video coding (Versatile Video Coding), and tests the solution provided by the present application in the test configurations of the RA configuration and the LDB configuration. According to the test results, after reducing the number of scans, the performance gain of the ATMVP technology can be maintained.
[0195] Therefore, the solution provided in this application can reduce the complexity of the ATMVP technology while maintaining the performance gains of the conventional ATMVP technology.
[0196] Optionally, as one example, the acquisition unit 510 is used to obtain M motion vector candidates to be included in the second candidate list of the motion vector of the current image block based on the motion vectors of M neighboring blocks within the current frame of the current image block.
[0197] Optionally, as one example, the neighboring blocks are image blocks that are adjacent to the position of the current image block on the current frame or have a certain position pitch.
[0198] Optionally, as one example, the determination unit 520 is used to sequentially scan the previous N motion vector candidates among the M motion vector candidates.
[0199] Optionally, as one example, M is equal to 4 and N is less than 4.
[0200] Optionally, as one example, N is equal to 1 or 2.
[0201] Optionally, as one example, the determination unit 520 is used to sequentially scan N motion vector candidates among the M motion vector candidates based on a preset condition, and determine a reference motion vector based on the scanning result.
[0202] Optionally, as one example, the preset condition includes a motion vector candidate whose reference frame pointed to is the same as the reference image of the current image block.
[0203] Optionally, as an example, the determination unit 520 sequentially scans N motion vector candidates, stops scanning when it reaches a motion vector candidate that meets the first preset condition, and is used to determine a reference motion vector based on the first motion vector candidate that meets the preset condition and has been scanned.
[0204] Optionally, as an example, when a motion vector candidate that meets the preset condition among the N motion vector candidates has not been scanned, the determination unit 520 performs a scaling process on a specific motion vector candidate in the second motion vector candidate list, and is used to determine a reference motion vector based on the specific motion vector candidate after the scaling process.
[0205] Optionally, as an example, the specific motion vector candidate is the first motion vector or the last motion vector obtained in the scanning order among the N motion vector candidates.
[0206] Optionally, as an example, the determination unit 520 performs a scaling process on a specific motion vector candidate in the second motion vector candidate list, makes the reference frame pointed to by the scaled specific motion vector candidate the same as the reference image of the current image block, and is used to use the specific motion vector candidate after the scaling process as the reference motion vector.
[0207] Optionally, as an example, when a motion vector candidate that meets the preset condition among the N motion vector candidates has not been scanned, the determination unit 520 is used to use a default value as the reference motion vector.
[0208] Optionally, as an example, the default value is the motion vector (0, 0).
[0209] Optionally, as one example, the determination unit 520 divides the current image block into a plurality of sub-image blocks, determines the associated blocks of the sub-image blocks among the reference images of the current image block based on the reference motion vectors, and is used to determine motion vector candidates to be continuously included in the second motion vector candidate list based on the motion vectors of the associated blocks.
[0210] Optionally, as one example, the size of the sub-image block and / or the size of the associated block of the sub-image block are fixed to 64 or more pixels.
[0211] Optionally, as one example, the current image block is one coding unit CU.
[0212] Optionally, as one example, the determination unit 520 determines the associated block of the current image block among the reference images of the current image block based on the reference motion vector, and is used to determine motion vector candidates to be continuously included in the second motion vector candidate list based on the motion vector of the associated block.
[0213] Optionally, as one example, when the motion vector of the associated block points to a specific reference image or the reference image of the current image block is a specific reference image, the determination unit 520 is used to determine motion vector candidates to be continuously included in the second motion vector candidate list based on the motion vector of the processed associated block, where the motion vector of the processed associated block is the same as the motion vector of the unprocessed associated block.
[0214] Optionally, as one example, the motion vector of the processed associated block includes the motion vector obtained after scaling the motion vector of the associated block by a scale factor of 1, or the motion vector of the associated block with the scaling step skipped.
[0215] Optionally, as one example, when the motion vector of the relevant block points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit 520 is used to abandon determining a motion vector candidate that continues to be included in the second candidate list of vectors based on the motion vector of the motion vector of the relevant block.
[0216] Optionally, as one example, when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit 520 is used to determine a motion vector candidate that continues to be included in the second candidate list of motion vectors based on the processed specific motion vector candidate, where the motion vector of the processed specific motion vector candidate is the same as the motion vector of the unprocessed specific motion vector candidate.
[0217] Optionally, as one example, the motion vector of the processed relevant block includes the motion vector obtained after scaling the motion vector of the relevant block by a scale of 1, or the motion vector of the relevant block that skips the scaling step.
[0218] Optionally, as one example, when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit 520 is used to abandon determining a motion vector candidate that continues to be included in the second candidate list of vectors based on the specific motion vector candidate.
[0219] Optionally, as one example, the second candidate list of motion vectors is a Merge candidate list.
[0220] Optionally, as one example, the reference image of the current image block is the same-position frame of the current image block.
[0221] Optionally, as an example, the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed at 8×8 pixels.
[0222] 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, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0223] Optionally, in some embodiments of the present application, when the width and / or height of the current CU is less than 8 pixels, set not to perform the TMVP operation. That is, 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, set not to perform the TMVP operation. In this case, since the impact on performance caused by skipping the TMVP operation can be ignored, the encoding and decoding time can be effectively saved, and the encoding efficiency can be improved.
[0224] It should be noted that both the acquisition unit 510 and the determination unit 520 in this embodiment can be realized by a processor.
[0225] As shown in FIG. 6, the embodiment of the present application further provides a moving image processing apparatus 600. The apparatus 600 is used to execute the method embodiment shown in FIG. 4. The apparatus 600 includes the following units.
[0226] A determination unit 610, which is used to obtain M motion vector candidates to be included in the second candidate list of the motion vector of the current image block.
[0227] A determination unit 620, which is used to sequentially scan at least some of the M motion vector candidates and determine the reference motion vector of the current image block based on the scanning result.
[0228] A splitting unit 630, which is used to split a current image block into a plurality of sub-image blocks, where the size of the sub-image blocks is fixed to 64 or more pixels.
[0229] The determination unit 620 is further used to determine associated blocks of the sub-image blocks in the reference image of the current image block based on the reference motion vectors.
[0230] The determination unit 620 is further used to determine motion vector candidates to be continuously included in the second candidate list of motion vectors based on the motion vectors of the associated blocks.
[0231] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of the sub-image blocks. The size of the sub-image blocks is 4×4 by default, and when a certain condition is met, the size of the sub-image blocks is set to 8×8. For example, on the encoding side, when encoding a current image block, when encoding in the ATMVP mode of the previous encoded image block in the same temporal layer, the average block size of each sub-image block in the CU is calculated. If the average block size is larger than a threshold, the size of the sub-image blocks of the current image block is set to 8×8; otherwise, the default value of 4×4 is used. That is, in the prior art, when encoding a current image block, it is necessary to further store information on the size of the sub-image blocks of the previous encoded image block in the same temporal layer.
[0232] In the embodiments of the present application, the size of the sub-image blocks of the current image block is fixed to 64 or more pixels, and there is no need to store information on the size of the sub-image blocks of the previous encoded image block. Therefore, the storage space can be saved.
[0233] Optionally, as an example, both the size of the sub-image blocks and / or the size of the associated blocks of the sub-image blocks are fixed to 8×8 pixels.
[0234] Currently, in the next-generation 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, which can adapt to the storage granularity of the motion vectors defined in the video standard VVC. On the other hand, it is not necessary to store the information on the size of the sub-image block of the previous encoded image block, so the storage space can be saved.
[0235] 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, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0236] In some embodiments of the present application, when the width and / or height of the current CU is smaller than 8 pixels, it is set not to perform the TMVP operation. That is, 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 smaller than 8 pixels, it is set not to perform the TMVP operation. In this case, since the influence on the performance by skipping the TMVP operation can be ignored, the encoding and decoding time can be effectively saved, and the encoding efficiency can be improved.
[0237] Optionally, as one embodiment, the determination unit 620 sequentially scans at least some of the motion vector candidates, stops scanning when it reaches the motion vector candidate that meets the first preset condition, and is used to determine the reference motion vector based on the first motion vector candidate that meets the preset condition scanned.
[0238] Optionally, as one embodiment, the determination unit 620 is used to use the motion vector candidate that meets the first preset condition as the target neighboring block.
[0239] Optionally, as an example, the preset condition includes that the reference image of the motion vector candidate is the same as the reference image of the current image block.
[0240] It should be noted that the acquisition unit 610, the determination unit 620, and the division unit 630 in this embodiment can all be realized by a processor.
[0241] In the above description, the motion vector of one image block includes two pieces of information: 1) the image pointed to by the motion vector and 2) the displacement. In some application scenarios, the motion vector of one image block includes only the information of "displacement". The image block also provides index information for indicating the reference image of the image block. For an encoded / decoded image block, the meaning of its motion vector is that it is the same as the position of the encoded / decoded image block on the reference image of the reference block of the encoded / decoded image block and includes the displacement with respect to the image block located 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 according to the index information of the reference image of the encoded / decoded image block and the motion vector of the encoded / decoded image block. Therefore, in the moving image processing method shown in FIG. 1, in step S120, instead of scanning the motion vector candidates in the second motion vector candidate list, the image blocks corresponding to the motion vector candidates are directly scanned. Hereinafter, a moving image processing method is provided for the new definition of the motion vector (that is, including the "displacement" information but not including the "pointed image"). Note that the method for determining motion vector candidates based on the ATMVP technology provided respectively for the two different meanings of the "motion vector" is substantially the same, and the above description is also applicable to the moving image processing method provided hereinafter. The main difference is that in constructing the second motion vector candidate list, when determining the candidates to be included in the second motion vector candidate list based on the ATMVP technology, in the above-described moving image processing method, the motion vectors included in the second motion vector candidate list are scanned, while in the moving image processing method described hereinafter, the image blocks corresponding to the motion vectors included in the second motion vector candidate list are scanned.
[0242] As shown in FIG. 7, the embodiment of the present application provides a moving image processing method, and the method includes the following steps.
[0243] S710. Determine M neighboring blocks of the current image block.
[0244] The current image block is an image block to be encoded (or decoded). For example, the current image block is one coding unit (CU).
[0245] The image frame in which the current image block is located is called the current frame.
[0246] The neighboring block is an image block adjacent to the position of the current image block in the current image or having a certain position pitch.
[0247] The M neighboring blocks are encoded (or decoded) image blocks in the current frame.
[0248] As an example, as shown in FIG. 2, four positions A around the current image block shown in FIG. 2 1 (left) → B 1 (up) → B 0 (upper right) → A 0 (lower left), the four neighboring blocks of the current image block are sequentially determined in this order.
[0249] S720, sequentially scan N of the M neighboring blocks, determine the target neighboring block based on the scanning result, where N is smaller than M.
[0250] The process of determining the target neighboring block based on the scanning results of the N neighboring blocks may be a process of sequentially determining the N neighboring blocks based on preset conditions and determining the target neighboring block based on the determination results.
[0251] 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.
[0252] 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 on the encoding and decoding sides, 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, and slice header.
[0253] For example, the reference image of the current image block is the same-position frame of the current image block, and the same-position frame is a frame for obtaining and predicting the motion information set in the slice-level information header.
[0254] It should be understood that with the evolution of future technologies, this preset condition may give other different definitions, and the corresponding solutions will also fall within the protection scope of this application.
[0255] Hereinafter, the process of determining the target neighboring block based on the scanning results of N neighboring blocks will be described in detail.
[0256] In step S720, only N out of the M neighboring blocks obtained in step S710 are scanned, and in this way, the number of scans can be reduced.
[0257] Optionally, in step S720, the first N neighboring blocks among the M neighboring blocks may be sequentially scanned.
[0258] In step S710, when sequentially determining the M neighboring blocks of the current image block in a preset order, the previous N neighboring blocks obtained in step S720 refer to the first N neighboring blocks determined in the preset order.
[0259] Optionally, in step S720, the last N neighboring blocks among the M neighboring blocks may be sequentially scanned, or the middle N neighboring blocks among the M neighboring blocks may be sequentially scanned. The present application is not limited thereto.
[0260] S730. Based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, determine the associated block of the current image block.
[0261] S740. Encode / Decode the current image block based on the motion vector of the associated block.
[0262] Optionally, step S740 includes determining the reference block of the current image block based on the motion vector of the associated block and the reference image.
[0263] For example, step S740 constructs a candidate block list for the current image block, where the candidate blocks in the candidate block list include the M neighboring blocks and the associated block, and encodes and decodes the current image block based on the reference blocks of the candidate blocks in the candidate block list.
[0264] 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.
[0265] On the encoding side, write the index of the candidate block of the current block into the code stream. On the decoding side, 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 based on the reference block of the candidate block, or determine the motion vector of the current image block based on the motion vector of the candidate block.
[0266] For example, directly determine the reference block of the candidate block as the reference block of the current image block, or directly determine the motion vector of the candidate block as the motion vector of the current image block. Also, for example, the encoding side writes the MVD of the current block into the code stream. After obtaining the MVD, the decoding side adds the MVD to the motion vector of the candidate block to obtain the motion vector of the current block, and then determines the reference block of the current block based on the motion vector and the reference image of the current block.
[0267] In the embodiment of the present application, in the process of obtaining the target neighboring blocks of the current image block, only N (N is smaller than M) of the M neighboring blocks that have already been obtained are sequentially scanned, compared with the prior art, the number of scans for the neighboring blocks in the process of obtaining the target neighboring blocks of the current image block can be reduced, thereby reducing the complexity.
[0268] Optionally, in this embodiment, in step S710, four neighboring blocks of the current image block within the current frame are determined, that is, M is equal to 4. In step S720, N of the four neighboring blocks are scanned, and N is smaller than 4.
[0269] For example, N is equal to 1. For example, in step S720, only the first neighboring block among the four neighboring blocks is scanned.
[0270] Also, for example, N is equal to 2 or 3.
[0271] Hereinafter, a method for determining the target neighboring block based on the scanning results of the N neighboring blocks in step S720 will be described.
[0272] Optionally, in step S720, when scanning the N neighboring blocks sequentially and reaching the neighboring block that meets the first preset condition, the scanning is stopped, and the target neighboring block is determined based on the first scanned neighboring block that meets the preset condition.
[0273] 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.
[0274] It should be understood that in future evolving technologies, the preset conditions may be defined otherwise.
[0275] Here, the definition of the preset condition will be described by taking the case where the reference image of the neighboring block is the same as the reference image of the current image block as an example.
[0276] For example, the neighboring block that meets the first preset condition is taken as the target neighboring block.
[0277] Optionally, in step S720, if no neighboring block that meets the preset condition has been scanned among the N neighboring blocks, the method further includes performing scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks, and encoding / decoding the current image block based on the scaled motion vector.
[0278] For example, the reference block of the current image block is determined based on the scaled motion vector and the reference image of the current image block.
[0279] 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.
[0280] The specific neighboring block may be a neighboring block obtained in other scanning orders among the N neighboring blocks.
[0281] Optionally, encoding / decoding the current image block based on the motion vector after the scaling process includes performing a scaling process on the motion vectors of specific neighboring blocks 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, and using 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.
[0282] Optionally, in step S720, if a neighboring block that meets the preset conditions among the N neighboring blocks has not been scanned, the default block is used as the candidate reference block of the current image block.
[0283] For example, the default block is the image block pointed to by the motion vector (0, 0).
[0284] Next, in step S730, a process of determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block will be described.
[0285] Optionally, as an embodiment, determining the related block of the current image block based on 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 a plurality of sub-image blocks, and determining the related blocks of the sub-image blocks in the reference image of the current image block based on 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.
[0286] The related block may also be called a collocated block or a corresponding block.
[0287] For example, the current image block is one CU, and the sub-image blocks obtained after dividing it may also be called sub-CUs.
[0288] 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 64 pixels or more.
[0289] Optionally, both the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels.
[0290] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of the sub-image block. The size of the sub-image block is 4×4 by default, and when a certain condition is met, the size of the sub-image block is set to 8×8. For example, on the encoding side, when encoding the current image block, when encoding the ATMVP mode of the previous encoded image block in the same time layer, the average block size of each sub-image block in the CU is calculated. If the average block size is larger than the threshold, the dimension 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 next-generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored in the 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 conform to the storage granularity of the motion vector in the current standard. Also, in the current ATMVP technology, when encoding the current image block, it is further necessary to store the information on the size of the sub-image block of the previous encoded image block in the same time layer.
[0291] In the embodiments of the present application, the size of the sub-image block of the current image block is set to 8×8, which can adapt to the storage granularity of the motion vector defined in the video standard VVC. On the other hand, it is not necessary to store the information on the size of the sub-image block of the previous encoded image block, so the storage space can be saved.
[0292] 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, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0293] 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. That is, 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. In this case, since the impact on performance by skipping the TMVP operation can be ignored, the encoding and decoding time can be effectively saved, and the encoding efficiency can be improved.
[0294] Note 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 at 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block may further be other dimensions. 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.
[0295] Optionally, as another embodiment, determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes determining the related block of the current image block in the reference image of the current image block based on the motion vector of the target neighboring block.
[0296] Optionally, when the reference image of the related block is the specific reference image, or the reference image of the current image block is the specific reference image, step S740 includes determining a candidate reference block of the current image block based on the motion vector of the processed related block and the reference image of the current image block. Here, the motion vector of the processed related block is the same as the motion vector of the related block before processing.
[0297] For example, the motion vector of the processed related block includes the motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the motion vector of the related block with the scaling step skipped.
[0298] Optionally, when the reference image of the related block is the specific reference image, or the reference image of the current block is the specific reference image, step S740 abandons determining a candidate reference block of the current image block based on the motion vector of the related block.
[0299] In some embodiments, when the motion vector of the specific neighboring block points to the specific reference image, or the reference image of the current image block is the specific reference image, step S720 includes determining a reference block of the current image block based on the motion vector of the processed related block and the reference image of the current image block. Here, the motion vector of the processed related block is the same as the motion vector of the related block before processing.
[0300] Here, the motion vector of the processed related block includes the motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the motion vector of the related block with the scaling step skipped.
[0301] As can be seen from the above, in the embodiments of the present application, in the process of obtaining the neighboring blocks near the target of the current image block, only N (N is smaller than M) of the M neighboring blocks that have already been obtained are sequentially scanned. Compared with the prior art, the number of scans of the neighboring blocks in the process of obtaining the neighboring blocks near the target of the current image block can be reduced, thereby reducing the complexity.
[0302] If the neighboring block in which the co-located frame of the reference frame and the current frame among the N neighboring blocks has not been scanned, scaling processing is performed on the motion vector of one of the N neighboring blocks so that its reference frame becomes the same as the co-located frame of the current frame. Subsequently, by using this scaled motion vector as the motion vector of the current image block, the accuracy of the motion vector of the current image block can be improved.
[0303] The current image block can be divided into sub-image blocks of size 8×8 to adapt to the storage granularity of the motion vectors defined in the video standard specification VVC. On the other hand, it is not necessary to store the information on the size of the sub-blocks of the previous encoded image block, so the storage space can be saved.
[0304] 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, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0305] In some embodiments of the present application, when the current width and / or height of the CU is less than 8 pixels, the TMVP operation is set not to be performed. That is, 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, the TMVP operation is set not to be performed. In this case, since the impact on performance by skipping the TMVP operation can be ignored, the encoding and decoding times can be effectively saved, and the encoding efficiency can be improved.
[0306] In some embodiments of the embodiments of the present application, in the process of determining the motion vector of the current image block, it is related to determining the motion vector of the image block by using the motion vector of an image block on another image. For the convenience of description, the image block is called the first image block, and an 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. Therefore, in the process of determining the motion vector of the first image block by using the motion vector of the temporal reference block (or related block), it may be necessary to scale the motion vector of the temporal reference block (or related block). For the convenience of description, in this specification, the term "related block" is uniformly used.
[0307] For example, when applying the ATMVP technology to the construction of the AMVP candidate list, after determining the related block of the current image block based on the ATMVP technology, determining the motion vector of the current image block based on the motion vector of the related block, scaling the motion vector of the related block, and then determining the motion vector of the current image block based on the scaled motion vector. Generally, based on the temporal 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 temporal distance between the reference image of the current image block and the image where the current image block is located, the scale of the motion vector of the related block is determined.
[0308] In one 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 called x. Here, the reference frame index value x is the difference between the sequence number of the reference image pointed to by MV2 (e.g., POC) 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. Here, 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. Therefore, the scale for 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.
[0309] 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 the specific reference image, since the definition of the temporal distance between the specific reference image and the image where the first image block is located is ambiguous, there is no meaning in scaling the motion vector MV2 of the related block.
[0310] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vector of the related block, specifically, when the motion vector of the related block points to a specific reference image, or when the reference image of the current image block is the specific reference image, determine the motion vector of the current image block based on the motion vector of the related block after processing. Here, the motion vector of the related block after processing is the same as the motion vector of the related block before processing.
[0311] For example, the motion vector of the related block after processing includes the motion vector obtained by scaling the motion vector of the related block with a scale of 1, or the motion vector of the related block with the scaling step skipped.
[0312] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vectors of the related blocks, specifically, when the motion vector of the related block points to a specific reference image or the reference image of the current image block is the specific reference image, it is abandoned to determine the motion vector of the current image block based on the motion vector of the related block.
[0313] As shown in FIG. 8, the embodiment of the present application further provides a moving image processing method, and the method includes the following steps.
[0314] S810. Determine M neighboring blocks of the current image block.
[0315] Step S810 can correspond to step S710 in the above embodiment.
[0316] S820. Sequentially scan at least some of the M neighboring blocks, and determine a target neighboring block based on the scanning result.
[0317] Optionally, sequentially scan some of the M neighboring blocks, and determine a target neighboring block based on the scanning result.
[0318] Optionally, sequentially scan all of the M neighboring blocks, and determine a target neighboring block based on the scanning result.
[0319] S830. Divide the current image block into a plurality of sub-image blocks, where the size of the sub-image block is fixed to 64 or more pixels.
[0320] S840. Based on the motion vector of the target neighboring block and the sub-image block, determine a related block of the current image block in the reference image of the current image block.
[0321] 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.
[0322] Optionally, the reference image of the current image block is a reference image preset on the encoding side and the decoding side.
[0323] Optionally, the reference image of the current image block is a reference image specified in the motion picture parameter set, sequence header, sequence parameter set, picture header, picture parameter set, slice header.
[0324] S850, encode / decode the current image block based on the motion vectors of the related blocks.
[0325] In the embodiments of the present application, the size of the sub-image block of the current image block is fixed to 64 or more 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.
[0326] Optionally, in this embodiment, both the size of the sub-image block and / or the size of the temporal region reference block of the sub-image block are fixed to 8×8 pixels.
[0327] Currently, in the next-generation 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, which can adapt to the storage granularity of the motion vectors defined 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.
[0328] 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, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0329] In some embodiments of the present application, when the current width and / or height of the CU is less than 8 pixels, the TMVP operation is set not to be performed. That is, 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, the TMVP operation is set not to be performed. In this case, since the impact on performance by skipping the TMVP operation can be ignored, the encoding and decoding times can be effectively saved, and the encoding efficiency can be improved.
[0330] Note 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 at 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block may be other dimensions. 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.
[0331] Optionally, step S820 includes sequentially scanning at least some of the neighboring blocks. When scanning reaches the neighboring block that meets the first preset condition, the scanning stops, and the target neighboring block is determined based on the first scanned neighboring block that meets the preset condition.
[0332] For example, the neighboring block that meets the first preset condition is used as the target neighboring block.
[0333] 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.
[0334] Optionally, step S840 includes determining a related block of the sub-image block in the reference image of the current image block based on 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.
[0335] As described above, embodiments of the method of the present application have been described in connection with FIGS. 7 and 8. Hereinafter, embodiments of an apparatus corresponding to the embodiments of the method shown in FIGS. 7 and 8 will be described. Since the description of the embodiments of the apparatus corresponds to the description of the embodiments of the method, for those not described in detail, reference may be made to the above embodiments of the method. For the sake of simplicity, it will not be described again here. FIG. 9 is a schematic block diagram of a moving image processing apparatus 900 provided according to an embodiment of the present application. The apparatus 900 is used to execute the embodiment of the method shown in FIG. 7. The apparatus 900 includes the following units.
[0336] An acquisition unit 910, which is used to acquire M neighboring blocks of the current image block.
[0337] An acquisition unit 920, which is used to sequentially scan N neighboring blocks among the M neighboring blocks and determine a target neighboring block based on the scanning result, where N is smaller than M.
[0338] The determination unit 920 is further used to determine a related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block.
[0339] An encoding / decoding unit 930, which is used to encode / decrypt the current image block based on the motion vector of the related block.
[0340] In an embodiment of the present application, in the process of obtaining the target neighboring blocks of the current image block, only N (N is smaller than M) out of the M neighboring blocks that have already been obtained are sequentially scanned, compared with the prior art, the number of scans for the neighboring blocks in the process of obtaining the target neighboring blocks of the current image block can be reduced, thereby reducing the complexity.
[0341] Optionally, as one embodiment, M is equal to 4 and N is smaller than 4.
[0342] Optionally, as one embodiment, N is equal to 1 or 2.
[0343] Optionally, as one embodiment, the determination unit 920 is used to sequentially scan the first N neighboring blocks among the M neighboring blocks.
[0344] Optionally, as one embodiment, the acquisition unit 910 sequentially acquires the M neighboring blocks of the current image block in a preset order, and the first N neighboring blocks refer to the first N neighboring blocks determined in the preset order.
[0345] Optionally, as one embodiment, the determination unit 920 sequentially scans the N neighboring blocks, and when it scans up to the neighboring block that meets the first preset condition, it stops scanning, and is used to determine the target neighboring block based on the first neighboring block that meets the first preset condition that has been scanned.
[0346] Optionally, as one embodiment, the determination unit 920 is used to use the neighboring block that meets the first preset condition as the target neighboring block.
[0347] Optionally, as one 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.
[0348] Optionally, as an example, the encoding / decoding unit 930 is used to determine a reference block of a current image block based on a motion vector of an associated block and a reference image.
[0349] Optionally, as an example, the encoding / decoding unit 930 constructs a candidate block list for a current image block, where the candidate blocks in the candidate block list include M neighboring blocks and associated blocks, and is used to encode and decode the current image block based on the reference blocks of the candidate blocks in the candidate block list.
[0350] Optionally, as an example, if a neighboring block that meets a preset condition has not been scanned among N neighboring blocks, the encoding / decoding unit 930 further performs a scaling process on the motion vector of a specific neighboring block among the M neighboring blocks, and is used to encode / decide the current image block based on the motion vector after the scaling process.
[0351] Optionally, as an example, the encoding / decoding unit 930 is used to determine a reference block of a current image block based on the motion vector after the scaling process and a reference image of the current image block.
[0352] Optionally, as an 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.
[0353] Optionally, as an example, the encoding / decoding unit 930 performs a scaling process on 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, and is used to 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.
[0354] Optionally, as an example, when the determination unit 920 scans no neighboring block that meets the preset condition among the N neighboring blocks, it is used to set the default block as the reference block of the current image block.
[0355] Optionally, as an example, the default block is the image block pointed to by the motion vector (0, 0).
[0356] Optionally, as an example, the determination unit 920 divides the current image block into a plurality of sub-image blocks, and is used to determine the associated block of the sub-image block in the reference image of the current image block based on the motion vector of the target neighboring block, and the associated block of the current image block includes the associated block of the sub-image block.
[0357] Optionally, as an example, the size of the sub-image block and / or the size of the associated block of the sub-image block are fixed to 64 or more pixels.
[0358] Optionally, in some embodiments of the present application, when the size of the sub-image block and / or the size of the associated block of the sub-image block is 8×8 pixels, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0359] 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. That is, when at least one of the width and height of the sub-image block and / or the associated block of the sub-image block is less than 8 pixels, it is set not to perform the TMVP operation. In this case, since the impact on performance by skipping the TMVP operation can be ignored, the encoding and decoding time can be effectively saved, and the encoding efficiency can be improved.
[0360] Optionally, as one example, the current image block is one coding unit CU.
[0361] Optionally, as one example, the determination unit 920 is used to determine a related block of the current image block in the reference image of the current image block based on the motion vector of the neighboring block of the target.
[0362] Optionally, as one example, the neighboring block is an image block that is adjacent to the position of the current image block on the current image or has a certain position pitch.
[0363] Optionally, as one example, the encoding / decoding unit 930 is used to determine the reference block of the current image block based on the motion vector of the processed related block and the reference image of the current image block 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. Here, the motion vector of the processed related block and the motion vector of the related block before processing are the same.
[0364] Optionally, as one example, the motion vector of the processed related block includes the motion vector obtained after scaling the motion vector of the related block by a scale factor of 1, or the motion vector of the related block with the scaling step skipped.
[0365] Optionally, as one example, the encoding / decoding unit 930 is used to abandon determining the reference block of the current image block based on the motion vector of the related block 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.
[0366] Optionally, as an example, 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, the determination unit 920 is used to determine the reference block of the current image block based on the motion vector of the processed related block and the reference image of the current image block. Here, the motion vector of the processed related block is the same as the motion vector of the related block before processing.
[0367] Optionally, as an example, the motion vector of the processed related block includes the motion vector obtained after scaling the motion vector of the related block by a scale factor of 1, or the motion vector of the related block with the scaling step skipped.
[0368] It should be noted that the acquisition unit 910, the determination unit 920, and the encoding / decoding unit 930 in this embodiment can all be realized by a processor.
[0369] As shown in FIG. 10, the embodiment of the present application further provides a moving image processing apparatus 1000. The apparatus 1000 is used to execute the method embodiment shown in FIG. 8. The apparatus 1000 includes the following units.
[0370] An acquisition unit 1010, which is used to acquire M neighboring blocks of the current image block.
[0371] A determination unit 1020, which is used to sequentially scan at least some of the M neighboring blocks and determine the target neighboring block based on the scanning result.
[0372] A splitting unit 1030, which is used to split the current image block into a plurality of sub-image blocks. Here, the size of the sub-image block is fixed to 64 or more pixels.
[0373] The determination unit 1020 is further used to determine the associated block of the current image block in the reference image of the current image block based on the motion vector of the target neighboring block and the sub-image block.
[0374] The encoding / decoding unit 1040 is used to encode / decrypt the current image block based on the motion vector of the associated block.
[0375] In the embodiments of the present application, the size of the sub-image block of the current image block is fixed to 64 or more pixels, and there is no need to store the information on the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0376] Optionally, as an example, the size of the sub-image block and / or the size of the time-domain reference block of the sub-image block are both fixed to 8×8 pixels.
[0377] Currently, in the next-generation 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, which can adapt to the storage granularity of the motion vector defined in the video standard VVC. At the same time, there is no need to store the information on the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0378] In some embodiments of the present application, when the size of the sub-image block in the ATMVP technology and / or the size of the associated block of the sub-image block are 8×8 pixels, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the time of encoding and decoding, and improving the encoding efficiency.
[0379] In some embodiments of the present application, when at least one of the current CU width and height is less than 8, the TMVP operation is set not to be performed. Since the impact on performance by skipping the TMVP operation can be ignored, the encoding and decoding times can be effectively saved, and the encoding efficiency can be improved.
[0380] Note 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 at 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block may be other dimensions. 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.
[0381] Optionally, as an example, sequentially scanning at least some of the M neighboring blocks among the M neighboring blocks and determining the target neighboring block based on the scanning result includes sequentially scanning at least some of the neighboring blocks. When scanning reaches the neighboring block that meets the first preset condition, the scanning stops, and the target neighboring block is determined based on the first scanned neighboring block that meets the preset condition.
[0382] Optionally, as an example, the determination unit 1020 is used to use the neighboring block that meets the first preset condition as the target neighboring block.
[0383] Optionally, as an example, the preset condition includes that the reference image of the neighboring block is the same as the reference image of the current image block.
[0384] Optionally, as an example, the determination unit 1020 is used to determine the associated block of the sub-image block in the reference image of the current image block based on the motion vector of the target-near block and the sub-image block. Here, the associated block of the current image block includes the associated block of the sub-image block.
[0385] It should be noted 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 realized by a processor.
[0386] As shown in FIG. 11, the embodiment of the present application further provides a moving image processing apparatus 1100. The apparatus 1100 may be used to execute the method embodiment described above. The apparatus 1100 includes a processor 1110 and a memory 1120. The memory 1120 is used to store instructions. The processor 1110 executes the instructions stored in the memory 1120 and is used to cause the processor 1110 to execute the method according to the method embodiment by executing the instructions stored in the memory 1120.
[0387] Optionally, as shown in FIG. 11, the apparatus 1100 may 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 transmit signals.
[0388] The apparatuses 500, 600, 900, 1000, and 1100 provided in the present application may be applied to an encoder or a decoder.
[0389] The above description explains the second candidate list of motion vectors. Hereinafter, the first candidate list of motion vectors will be described.
[0390] In the motion compensation prediction stage, conventionally, only the translational motion model has been applied to the mainstream video coding standards. In the real world, there are various motion forms such as zooming in / out, rotation, panoramic motion, and other irregular motions. To improve the efficiency of inter-frame prediction, an affine motion compensation model can be introduced into the encoding and decoding technologies. Affine motion compensation describes the affine motion field of an image block by the motion vectors (MVs) of a set of control points. In one example, the 4-parameter Affine model is used for the affine motion compensation model. In this case, the set of control points includes two control points (for example, the point at the upper left corner and the point at the upper right corner of the image block). In another example, the 6-parameter Affine model is used for the affine motion compensation model. In this set of control points, there are three control points (for example, the point at the upper left corner, the point at the upper right corner, and the point at the lower left corner of the image block).
[0391] In one embodiment, when constructing the first candidate list of motion vectors, the candidates included may be the MVs of a set of control points, or may be referred to as control point motion vector prediction (CPMVP). Optionally, the first candidate list of motion vectors may be used in the Merge mode. Specifically, it may be referred to as the Affine Merge mode. Correspondingly, the first candidate list of the motion vectors may be referred to as 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, there is no need to perform an affine motion estimation process.
[0392] In one embodiment, the candidates determined based on the ATMVP technology can be put into the first candidate list of motion vectors.
[0393] Here, in one example, the motion vector group of the control points of the related blocks of the current image block is used as candidates and put into the first candidate list of motion vectors. When predicting using the candidates in the first list of motion vectors, the current image block is predicted based on the motion vector group of the control points of the related blocks of the current image block.
[0394] Here, in one example, as shown above, the representative motion vector of the related block of the current image block is used as a candidate and put into the first candidate list of motion vectors. Further, optionally, the candidate is marked as being determined based on the ATMVP technology. When predicting using the candidate in the first candidate list of motion vectors, the related block of the current image block is determined based on the mark and the candidate, the current image block and the related block are divided into a plurality of sub-image blocks in the same manner, each sub-image block in the current image block corresponds one-to-one to each sub-image block in the related block, and the motion vector of the corresponding sub-image block in the current image block is predicted based on the motion vector of each sub-image block in the related block.
[0395] Here, optionally, when a sub-image block with an unavailable motion vector appears in the related block, the unavailable motion vector is replaced with the representative motion vector of the related block to predict the corresponding sub-image block in the current image block. Optionally, when all the representative motion vectors of the related block are unavailable, giving up putting the candidates determined based on the ATMVP technology into the second candidate list of motion vectors. In one example, when a sub-image block in the related block is unavailable, or when the sub-image block in the related block uses the intra-frame coding mode, it is determined that a sub-image block with an unavailable motion vector has appeared in the related block.
[0396] Here, optionally, each candidate in the first candidate list of motion vectors includes a motion vector of a set of control points. When inserting the representative motion vector of the related block of the current image block into the first candidate list of motion vectors, in order to ensure the consistency of the data format, the representative motion vector of the related block may be inserted as the motion vector of each control point in the candidate (that is, the motion vectors of each control point in the candidate are all assigned to the representative motion vector of the related block).
[0397] Here, 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 may refer to the motion vector representing other related blocks, and is not limited here.
[0398] As can be seen from the description of the above second candidate list of motion vectors, when determining candidates based on the ATMVP technology, it is necessary to determine the related block of the current image block. In this solution, when determining the candidates to be included in the first candidate list of motion vectors based on the ATMVP technology, the methods for determining the related block of the current image block include Sequentially scanning N neighboring blocks out of M preset neighboring blocks of the current image block, determining the target neighboring block based on the scanning result, where N is smaller than M and M is 4 or less, and determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block (Method 1), Determine M neighboring blocks of the current image block based on M candidates in the motion vector second candidate list of the current image block, sequentially scan N neighboring blocks among the M neighboring blocks, determine a target neighboring block based on the scan result, where N is smaller than M and M is 4 or less, and include method 2 of determining an associated block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block. Here, the M candidates in the motion vector second candidate list may refer to M neighboring blocks of the current image block.
[0399] Here, for the two steps of "determining a target neighboring block based on the scan result" and "determining an associated block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block" in method 1 and method 2, the explanations may refer to the above explanations and will not be repeated here.
[0400] In one embodiment, the method for determining candidates to be included in the first candidate list of motion vectors is to determine a group of motion vectors of control points of neighboring blocks predicted in the affine transformation mode according to a specific scan order from neighboring blocks of the current image block, and include each determined group of motion vectors of control points of neighboring blocks as one candidate in the first candidate list of motion vectors.
[0401] Here, in one example, the neighboring block predicted in the affine transformation mode refers to the one whose motion vector is determined based on candidates in the affine merge candidate list. That is, the candidate is from the affine motion model of the spatial region neighboring block using the affine mode of the current image block, that is, the CPMV of the spatial region neighboring block using the affine mode is taken as the CPMVP of the current block.
[0402] Here, in one example, the motion vector group of the control points may include the motion vectors of two control points of the neighboring block (for example, the point at the upper left corner and the point at the upper right corner of the neighboring block), or may include the motion vectors of three control points of the neighboring block (for example, the point at the upper left corner, the point at the upper right corner, and the point at the lower left corner of the image block), which depends on whether a 4-parameter Affine model or a 6-parameter Affine model is used.
[0403] Here, in one example, determining the motion vector group of the control points of the neighboring block predicted in the Affine conversion mode according to a specific scanning order is determining the motion vector group of the control points of the first neighboring block according to the first scanning order in the left neighboring block of the current image block, determining the motion vector group of the control points of the second neighboring block according to the second scanning order in the upper neighboring block of the current image block, and putting the motion vector group of the control points of the first neighboring block and the motion vector group of the control points of the second neighboring block into the first candidate list of the motion vectors.
[0404] For example, as shown in FIG. 12, FIG. 12 is a schematic diagram for obtaining candidates for the first motion vector candidate list by neighboring blocks of the current image block. On the left side of the current image block, sequential scanning is performed according to the scanning order of image block A -> image block D -> image block E, and the motion vector group of the control points of the first image block that satisfies the first preset condition is taken as one candidate and put into the first candidate list of motion vectors. On the upper side of the current image block, sequential scanning is performed according to the scanning order of image block B -> image block C, and the motion vector group of the control points of the first image block that satisfies the first preset condition is taken as one candidate and put into the first candidate list of motion vectors. Optionally, if no image block that satisfies the threshold condition is found in the scanning order, the determination of candidates in the scanning order is abandoned.
[0405] In one embodiment, the method for determining candidates to be included in the first motion vector candidate list is constructing the motion vectors of some control points of the current image block based on neighboring blocks of some control points of the current image block, and putting the motion vectors of some control points of the current image block into the first candidate list of motion vectors.
[0406] That is, in such an embodiment, it is to put into the first candidate list of motion vectors by constructing candidates. In one example, before putting into 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 already reached a preset value (for example, 5). If the preset value has not been reached, put into the first candidate list of motion vectors by constructing candidates.
[0407] In one example, the constructed candidate is put into the first candidate list of motion vectors as CPMVP after combining the motion information of neighboring blocks of some control points of the current image block.
[0408] As shown in FIG. 13, FIG. 13 is a schematic diagram for constructing candidates of the first candidate list of motion vectors by neighboring blocks of the current image block. The current image block has a total of four control points, namely CP1, CP2, CP3, and CP4. Here, image blocks A0 and A1 are neighboring blocks in the spatial region of CP1, image blocks A2, B2, and B3 are neighboring blocks in the spatial region of CP2, image blocks B0 and B1 are neighboring blocks in the spatial region of CP2, and T is a neighboring block in the temporal region 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 priority for obtaining the motion information of the neighboring blocks of each control point is For CP1, the acquisition priority is B2 -> B3 -> A2. When B2 is available, the MV of B2 is used as the MV of control point CP1. When B2 is unavailable, the MV of B3 is used as the MV of control point CP1. When both B2 and B3 are unavailable, the MV of A1 is used as the MV of control point CP1. When B2, B3, and A1 are all unavailable, the motion information of control point CP1 cannot be obtained.
[0409] Similarly, for CP2, the acquisition priority is B1 -> B0. For CP3, the acquisition priority is A1 -> A0. For CP4, the MV of control point CP4 is directly set as the MV of T.
[0410] Only after all the MVs of the control points of the current CU (6-parameter model: CP0, CP1, and CP2; 4-parameter model: CP0 and CP1) become available, the constructed MV is inserted. Otherwise, directly proceed to the next step. After obtaining the MVs of all control points (if any), different combinations of the MVs of the control points are performed to obtain multiple affine candidates. The combination method is When using a 4-parameter affine model, by combining two of the MVs of the four control points, one or more candidates can be obtained, and two combination methods among them, namely {CP1, CP2} and {CP1, CP3}, are selected. Here, in the combination method {CP1, CP3}, based on the 4-parameter model, it is necessary to convert the MVs of the two selected control points into the MVs of the control points at the upper left and upper right corners of the current CU (CP1 and CP2).
[0411] When using a 6-parameter affine model, by combining three of the MVs of the four control points, one or more candidates can be obtained, and four combination methods, {CP1, CP2, CP4}, {CP1, CP2, CP3}, {CP2, CP3, CP4}, and {CP1, CP3, CP4}, are selected. Here, in the combination methods {CP1, CP2, CP3}, {CP2, CP3, CP4}, and {CP1, CP3, CP4}, based on the 6-parameter model, it is necessary to convert the MVs of the three selected control points into the MVs of the control points at the upper left, upper right, and lower left corners of the current CU (CP1, CP2, and CP3). In one example, if the reference frames used for different combinations of MVs (two or three) are different, the candidates constructed by that combination are considered unusable.
[0412] In one embodiment, the method for determining the candidates to be included in the first candidate list of motion vectors includes capturing using a default vector. Optionally, the default vector may be a zero vector or other vector. Optionally, after determining the candidates to be included in the first candidate list of motion vectors by other methods, it is determined whether the number of candidates already included in the first candidate list has reached a preset value. If not, until the number of candidates in the first candidate list reaches the preset value, the default vector is used to capture into the first candidate list.
[0413] When predicting the current image block using candidates in the first candidate list of motion vectors, if the candidate used is at least one candidate other than the candidate determined by the ATMVP technique, the motion vector of the sub-image block in the current image block is derived based on the candidate by the affine motion model. If the candidate used is the candidate determined by the ATMVP technique, based on the above description, the reference block of each sub-image block in the current image block is determined based on the motion vector of each sub-image block in the related block, the reference blocks of each sub-image block are joined to the reference block of the current image block, and the residual of the current image block is calculated based on the reference block.
[0414] Hereinafter, an example will be given to describe the moving image processing method provided in the embodiment of the present application in relation to FIGS. 14 and 15. As shown in FIG. 14, the method includes the following steps.
[0415] S1410: Sequentially scan N of the preset M neighboring blocks of the current image block, determine the target neighboring block based on the scan result, where N is smaller than M. Optionally, M is 4 or less.
[0416] S1420: Determine the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block.
[0417] S1430: Divide the current image block and the related block 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 with each sub-image block in the related block.
[0418] S1440: Predict each corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the related block.
[0419] The description of the moving image processing method shown in FIG. 14 can be referred to the above description and will not be described here.
[0420] As shown in FIG. 15, the method includes the following steps.
[0421] S1510. Based on M candidates in the second candidate list of motion vectors of the current image block, determine M neighboring blocks of the current image block.
[0422] S1520. Sequentially scan N neighboring blocks among the M neighboring blocks, and determine a target neighboring block based on the scanning result, where N is smaller than M. Optionally, M is 4 or less.
[0423] S1530. Based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, determine the related block of the current image block.
[0424] S1540. Based on the related block of the current image block, determine a specific candidate in the first candidate list of motion vectors of the current image block. Here, the specific candidate may be a candidate determined by the ATMVP technology mentioned in the above description.
[0425] S1550. When it is determined to use the specific candidate, divide the current image block and the related block into a plurality of sub-image blocks in the same method, and each sub-image block in the current image block corresponds one-to-one to each sub-image block in the related block.
[0426] S1560. Based on the motion vectors of each sub-image block in the related block, predict the corresponding sub-image blocks in the current image block respectively.
[0427] The description of the moving image processing method shown in FIG. 15 can be referred to the above description and will not be described here.
[0428] FIG. 16 is a schematic block diagram of a moving image processing apparatus 1600 provided by an embodiment of the present application. The apparatus 1600 is used to execute an embodiment of the method shown in FIG. 14. The apparatus 1600 includes the following units.
[0429] A construction module 1610 that sequentially scans N (N is smaller than M) of the preset M neighboring blocks of the current image block, determines a target neighboring block based on the scanning result, and determines a related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block. The current image block and the 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 is used to correspond one-to-one with each sub-image block in the related block. And a prediction module 1620 that is used to predict the corresponding sub-image blocks in the current image block respectively based on the motion vectors of the sub-image blocks in the related block.
[0430] In one example, N is equal to 1 or 2.
[0431] In one example, the prediction module further puts a representative motion vector of the related block as a candidate into a first motion vector candidate list before predicting the corresponding sub-image blocks in the current image block respectively based on the motion vectors of the sub-image blocks in the related block. When it is determined that the candidate is adopted, the prediction module is used to predict the corresponding sub-image blocks in the current image block respectively based on the motion vectors of the sub-image blocks in the related block.
[0432] In one example, predicting the corresponding sub-image blocks in the current image block respectively based on the motion vectors of the sub-image blocks in the related block means Set the motion vector of each sub-image block in the associated block to be the motion vector of the corresponding sub-image block in the current image block, respectively.
[0433] In one example, the representative motion vector of the associated block is used as the first candidate and put into the first candidate list of motion vectors.
[0434] In one example, the representative motion vector of the associated block includes the motion vector of the central position of the associated block.
[0435] In one example, when a sub-image block with an unobtainable motion vector appears in the associated block, the prediction module further uses the representative motion vector of the associated block as the motion vector of the sub-image block with the unobtainable motion vector, and it is used to predict the corresponding sub-image block in the current image block.
[0436] In one example, when a sub-image block with an unobtainable motion vector appears in the associated block and the representative motion vector of the associated block is also unobtainable, the prediction module gives up predicting the corresponding sub-image block in the current image block based on the motion vectors of each sub-image block in the associated block.
[0437] In one example, when a sub-image block in the associated block is unobtainable, or when a sub-image block in the associated block uses the intra-frame coding mode, the prediction module is used to determine that a sub-image block with an unobtainable motion vector has appeared in the associated block.
[0438] In one example, the construction module is further used to determine other candidates and put the other candidates into the first candidate list of motion vectors, where at least one of the other candidates includes the motion vector of a sub-image block.
[0439] In one example, when the construction module further determines to adopt one of the other candidates, it is used to determine the motion vector of the sub-image block in the current image block based on the adopted candidate.
[0440] In one example, the at least one candidate includes the motion vectors of a set of control points.
[0441] In one example, the prediction module further when determining to adopt a candidate among the at least one candidate, performing an affine transformation on the adopted candidate based on an affine transformation model, and predicting the sub-image block in the current image block based on the candidate after the affine transformation.
[0442] In one example, when the affine transformation model includes a four-parameter affine transformation model, in the at least one candidate, each candidate includes the motion vectors of two control points, when the affine transformation model includes a six-parameter affine transformation model, in the at least one candidate, each candidate includes the motion vectors of three control points.
[0443] In one example, the construction module further determines, from the neighboring blocks of the current image block, a group of control point motion vectors of the neighboring blocks predicted in the affine transformation mode in a specific scanning order, and uses each determined group of control point motion vectors of the neighboring blocks as one candidate and inserts it into the first candidate list of the motion vectors.
[0444] In one example, determining, from the neighboring blocks of the current image block, a group of control point motion vectors of the neighboring blocks predicted in the affine transformation mode according to a specific scanning order is Determining a control point motion vector group of a first neighboring block in a first scanning order in a block near the left side of the current image block; Determining a control point motion vector group of a second neighboring block in a second scanning order in a block near the upper side of the current image block; Including putting the motion vector group of the control points of the first neighboring block and the motion vector group of the control points of the second neighboring block into a first candidate list of the motion vectors.
[0445] In one example, the construction module further includes constructing motion vectors of some control points of the current image block based on neighboring blocks of some control points of the current image block; Including being used for putting the motion vectors of some control points of the current image block into the first candidate list of the motion vectors.
[0446] In one example, constructing the motion vectors of some control points of the current image block based on neighboring blocks of some control points of the current image block includes: For each control point among the some control points, sequentially scanning a specific neighboring block of the control point in a third scanning order, and using the motion vector of the specific neighboring block that satisfies a preset condition as the motion vector of the control point.
[0447] In one example, the construction module further includes: Being used for abandoning putting the motion vectors of some control points of the current image block into the first candidate list of the motion vectors when the motion vectors of the some control points point to different reference frames respectively.
[0448] In one example, when the number of candidates in the first motion vector candidate list is greater than a preset value, it is abandoned to put the motion vectors of some control points of the current image block into the first motion vector candidate list.
[0449] In one example, the construction module further constructs a second motion vector candidate list, where the candidates to be put into the second motion vector candidate list are the motion vectors of one image block, and is used to determine the motion vector of the current image block based on the motion vector of the candidate when it is determined to adopt the candidate in the second motion vector candidate list.
[0450] In one example, determining the motion vector of the current image block based on the motion vector of the candidate described above includes using the candidate determined to be adopted as the motion vector of the current image block, or using the motion vector of the current image block after scaling the candidate determined to be adopted.
[0451] In one example, constructing the second motion vector candidate list includes determining the candidates to be put into the second motion vector candidate list based on the motion vectors of a plurality of neighboring blocks of the current image block on the current image of the current image block.
[0452] In one example, the plurality of neighboring blocks of the current image block on the current image include the preset M neighboring blocks.
[0453] In one example, the construction module further uses the motion vectors of the preset M neighboring blocks in the preset order as M candidates respectively to be put into the second motion vector candidate list.
[0454] The N neighboring blocks refer to the first N neighboring blocks determined in the preset order.
[0455] In one example, the construction module further when the motion vectors of one or more neighboring blocks among the M neighboring blocks are unavailable, is used to abandon determining candidates to be included in the second candidate list of motion vectors based on the motion vectors of the one or more neighboring blocks.
[0456] In one example, sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result includes sequentially scanning the N neighboring blocks and stopping the scanning when reaching a neighboring block that meets the first preset condition, and determining a target neighboring block based on the neighboring block that meets the first preset condition among the scanned blocks.
[0457] In one example, determining a target neighboring block based on the neighboring block that meets the first preset condition among the scanned blocks includes using the neighboring block that meets the first preset condition as the target neighboring block.
[0458] In one example, the preset condition includes that the reference image of the neighboring block is the same as the reference image of the current image block.
[0459] In one example, the construction module is further used to perform scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks when no neighboring block that meets the preset condition has been scanned among the N neighboring blocks, and the prediction module is used to predict the current image block based on the motion vector after the scaling processing.
[0460] In one example, predicting the current image block based on the motion vector after the scaling process described above includes determining a reference block of the current image block based on the motion vector after the scaling process and a reference image of the current image block.
[0461] 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.
[0462] In one example, performing a scaling process on the motion vector of a specific neighboring block among the M neighboring blocks and predicting the current image block based on the motion vector after the scaling process includes performing a scaling process on the motion vector of the specific neighboring block so that the reference frame indicated by the motion vector after the scaling process is the same as the reference image of the current image block, and using the image block indicated 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.
[0463] In one example, when a neighboring block that meets the preset condition has not been scanned among the N neighboring blocks, a default block is used as the reference block of the current image block.
[0464] In one example, the default block is an image block indicated by a motion vector (0, 0).
[0465] In one example, the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 64 or more pixels.
[0466] In one example, the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels, or 16×4 pixels or 4×16 pixels.
[0467] 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 smaller than 8 pixels, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the time of encoding and decoding, and improving the encoding efficiency.
[0468] In one example, the current image block is one coding unit CU.
[0469] In one example, determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes: Determining the related block of the current image block in the reference image of the motion vector of the target neighboring block and the current image block.
[0470] 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 pitch.
[0471] In one example, predicting the current image block based on the motion vector of the related block includes: 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, determining the reference block of the current image block based on the motion vector of the related block after processing and the reference image of the current image block.
[0472] Here, the motion vector of the related block after processing is the same as the motion vector of the related block before processing.
[0473] In one example, the motion vector of the related block after processing is: The motion vector obtained after scaling the motion vector of the related block at a scale of 1 in terms of numerical value, or It includes the motion vector of the related block that skipped the scaling step.
[0474] In one example, predicting the current image block based on the motion vector of the related block described above includes when the reference image of the related block is a specific reference image, or when the reference image of the current block is a specific reference image, giving up determining the reference block of the current image block based on the motion vector of the related block.
[0475] In one example, the construction module further is used to determine the reference block of the current image block based on the motion vector of the processed related block and the reference image of the current image block when the motion vector of the neighboring block points to a specific reference image, or when the reference image of the current image block is a specific reference image.
[0476] Here, the motion vector of the processed related block is the same as the motion vector of the related block before processing.
[0477] In one example, the motion vector of the processed related block is the motion vector obtained after scaling the motion vector of the related block at a scale where the numerical value is 1, or it includes the motion vector of the related block that skipped the scaling step.
[0478] In one example, M is 4 or less.
[0479] FIG. 17 is a schematic block diagram of a moving image processing apparatus 1700 provided by an embodiment of the present application. The apparatus 1700 is used to execute the embodiment of the method shown in FIG. 15. The apparatus 1700 includes the following units.
[0480] Based on M candidates in the motion vector second candidate list of the current image block, determine M neighboring blocks of the current image block, sequentially scan N (N is smaller than M) neighboring blocks among the M neighboring blocks, determine a target neighboring block based on the scanning result, determine a related block of the current image block based on 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 motion vector first candidate list of the current image block based on the related block of the current image block, and when it is determined to use the specific candidate, divide the current image block and the related block into a plurality of sub-image blocks in the same way, and each sub-image block in the current image block is used to correspond one-to-one with each sub-image block of the related block, a construction module 1710; A prediction module 1720 used to predict corresponding sub-image blocks in the current image block respectively based on the motion vectors of each sub-image block in the related block.
[0481] In one example, at least one candidate in the motion vector first candidate list includes the motion vector of a sub-image block, and each candidate in the motion vector second candidate list includes the motion vector of an image block.
[0482] In one example, N is equal to 1 or 2.
[0483] In one example, the M candidates include the motion vectors of M neighboring blocks of the current image block on the current image of the current image block.
[0484] In one example, sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result means: Sequentially scan the N neighboring blocks, stop scanning when reaching the neighboring block that meets the first preset condition, and determine the target neighboring block based on the neighboring block that meets the first preset condition that has been scanned.
[0485] In one example, determining the target neighboring block based on the neighboring block that meets the first preset condition scanned includes: including using the neighboring block that meets the first preset condition as the target neighboring block.
[0486] In one example, the preset condition includes: the reference image of the neighboring block is the same as the reference image of the current image block.
[0487] In one example, when a neighboring block that meets the preset condition among the N neighboring blocks has not been scanned, the construction module is used to perform scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks, and the prediction module is used to predict the current image block based on the motion vector after the scaling processing.
[0488] In one example, predicting the current image block based on the motion vector after the scaling processing includes: including determining the reference block of the current image block based on the motion vector after the scaling processing and the reference image of the current image block.
[0489] 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.
[0490] In one example, performing scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks and predicting the current image block based on the motion vector after the scaling processing includes: performing scaling processing on the motion vector of the specific neighboring block so that the reference frame pointed to by the motion vector after the scaling processing is the same as the reference image of the current image block. including using, as the reference block of the current image block, the image block pointed to by the motion vector after the scaling process in the reference image of the current image block.
[0491] 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.
[0492] In one example, the default block is the image block pointed to by the motion vector (0, 0).
[0493] In one example, the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 64 or more pixels.
[0494] In one example, the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels, or 16×4 pixels, or 4×16 pixels.
[0495] 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 are 8×8 pixels or when at least one of its width and height is smaller than 8 pixels, by setting not to perform the TMVP operation, some redundant operations can be skipped, effectively saving the time of encoding and decoding, and improving the encoding efficiency.
[0496] In one example, the current image block is one coding unit CU.
[0497] In one example, determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes: determining the related block of the current image block in the reference image of the motion vector of the target neighboring block and the current image block.
[0498] In one example, the neighboring block is an image block that is adjacent to the position of the current image block on the current image or has a certain position pitch.
[0499] In one example, predicting the current image block based on the motion vector of the related block includes: 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, determining a reference block of the current image block based on the motion vector of the processed related block and the reference image of the current image block.
[0500] Here, the motion vector of the processed related block is the same as the motion vector of the related block before processing.
[0501] In one example, the motion vector of the processed related block is: a motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the motion vector of the related block without skipping the scaling step.
[0502] In one example, predicting the current image block based on the motion vector of the related block includes: 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, foregoing determining a reference block of the current image block based on the motion vector of the related block.
[0503] In one example, the construction module is further used to determine a reference block of the current image block based on the motion vector of the processed related block and the reference image of the current image block when the motion vector of the neighboring block points to a specific reference image, or the reference image of the current image block is a specific reference image.
[0504] Here, the motion vector of the related block after the processing is the same as the motion vector of the related block before the processing.
[0505] In one example, the motion vector of the related block after the processing is the motion vector obtained after scaling the motion vector of the related block by a scale with a numerical value of 1, or the motion vector of the related block with the scaling step skipped.
[0506] In one example, predicting each corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the related block of the above includes using the motion vector of each sub-image block in the related block as the motion vector of the corresponding sub-image block in the current image block respectively.
[0507] In one example, determining a specific candidate in the first candidate list of the motion vector of the current image block based on the related block of the current image block of the above includes putting the representative motion vector of the related block of the current image block into the first candidate list of the motion vector as the specific candidate.
[0508] In one example, the representative motion vector of the related block is put into the first candidate list of the motion vector as the first candidate.
[0509] In one example, the representative motion vector of the related block includes the motion vector at the central position of the related block.
[0510] In one example, when a sub-image block with an unobtainable motion vector appears in the related block, the prediction module further uses the representative motion vector of the related block as the motion vector of the sub-image block with the unobtainable motion vector, and is used to predict the corresponding sub-image block in the current image block.
[0511] In one example, when there is a sub-image block in the related block for which a motion vector cannot be obtained and the representative motion vector of the related block cannot be obtained, the prediction module is further used to abandon predicting the corresponding sub-image block in the current image block based on the motion vectors of the sub-image blocks in the related block respectively.
[0512] In one example, the prediction module is further used to determine that there is a sub-image block in the related block for which a motion vector cannot be obtained when the sub-image block in the related block cannot be obtained or when the sub-image block in the related block uses an intra-frame coding mode.
[0513] In one example, when the prediction module further determines to adopt one of the candidates other than the specific candidate in the second candidate list of motion vectors, an affine transformation is performed on the adopted candidate based on an affine transformation model, and it is used for predicting the sub-image block in the current image block based on the candidate after the affine transformation.
[0514] In one example, in at least one of the candidates 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.
[0515] In one example, when the affine transformation model includes a four-parameter affine transformation model, in the at least one candidate, each candidate includes motion vectors of two control points, and when the affine transformation model includes a six-parameter affine transformation model, in the at least one candidate, each candidate includes motion vectors of three control points.
[0516] In one example, the prediction module further determines, from the neighboring blocks of the current image block, a group of control point motion vectors of the neighboring blocks that perform prediction by adopting an affine transformation mode in a specific scanning order, and is used to put the group of control point motion vectors of each determined neighboring block into the first candidate list of motion vectors as one candidate.
[0517] In one example, determining, from the neighboring blocks of the current image block, a group of control point motion vectors of the neighboring blocks that perform prediction in an affine transformation mode according to a specific scanning order includes: determining, in the left neighboring block of the current image block, a group of control point motion vectors of the first neighboring block in a first scanning order; determining, in the upper neighboring block of the current image block, a group of control point motion vectors of the second neighboring block in a second scanning order; and putting the group of motion vectors of the control points of the first neighboring block and the group of motion vectors of the control points of the second neighboring block into the first candidate list of motion vectors.
[0518] In one example, the construction module further constructs the motion vectors of some control points of the current image block based on the neighboring blocks of some control points of the current image block, and is used to put the motion vectors of some control points of the current image block into the first candidate list of motion vectors.
[0519] In one example, constructing the motion vectors of some control points of the current image block based on the neighboring blocks of some control points of the current image block includes: for each control point among some control points, sequentially scanning the specific neighboring blocks of the control point in a third scanning order, and using the motion vector of the specific neighboring block that satisfies a preset condition as the motion vector of the control point.
[0520] In one example, when the motion vectors of some of the control points of the construction module further point to different reference frames, the construction module is used to discard the motion vectors of some of the control points of the current image block from being included in the first candidate list of motion vectors.
[0521] In one example, when the number of candidates in the first candidate list of motion vectors is greater than a preset value, the construction module is used to discard the motion vectors of some of the control points of the current image block from being included in the first candidate list of motion vectors.
[0522] In one example, the construction module further constructs a second candidate list of motion vectors, where the candidates included in the second candidate list of motion vectors are the motion vectors of one image block. When it is determined to adopt the candidates in the second candidate list of motion vectors, it is used to determine the motion vector of the current image block based on the motion vectors of the candidates.
[0523] In one example, determining the motion vector of the current image block based on the motion vectors of the candidates includes: using the candidate determined to be adopted as the motion vector of the current image block, or using the motion vector of the current image block after scaling the candidate determined to be adopted.
[0524] In one example, constructing the second candidate list of motion vectors includes: determining M candidates to be included in the second candidate list of motion vectors based on the motion vectors of M neighboring blocks of the current image block on the current image of the current image block.
[0525] In one example, the construction module is further used to put the motion vectors of the M preset neighboring blocks into the second candidate list of motion vectors as M candidates in the preset order, respectively. The N neighboring blocks refer to the N neighboring blocks first determined in the preset order.
[0526] In one example, when the motion vectors of one or more of the M neighboring blocks are unavailable, the construction module is further used to abandon determining candidates to be put into the second candidate list of motion vectors based on the motion vectors of the one or more neighboring blocks.
[0527] In one example, M is 4 or less.
[0528] As shown in FIG. 18, the embodiment of the present application further provides a moving image processing method 1800, and the method includes the following steps.
[0529] S1810. Determine a base motion vector list, where the base motion vector list includes at least one group of dual-prediction base motion vectors, and the group of dual-prediction base motion vectors includes a first base motion vector and a second base motion vector.
[0530] S1820. Determine two motion vector displacement amounts from a preset set of displacement amounts, and the two motion vector displacement amounts correspond to the first base motion vector and the second base motion vector respectively.
[0531] S1830. Determine the motion vector of the current image block based on the first base motion vector, the second base motion vector, and the two motion vector displacement amounts.
[0532] S1840. Predict the current image block based on the motion vector of the current image block.
[0533] The moving image processing method according to an embodiment of the present application can shift the base motion vectors of a dual-prediction-based motion vector group based on a preset displacement amount set, and obtain a more accurate motion vector of the current image block through a finite number of calculations, so that the predicted residual can be made smaller, thereby improving the coding efficiency.
[0534] In some embodiments, the moving image processing method according to an embodiment of the present application can be used to improve the Merge with Motion Vector Difference (MMVD) technique, which is also called the Ultimate motion vector expression (UMVE) technique. In particular, it is applied to the construction of the merge candidate list of the MMVD technique, which is also called the motion vector candidate list.
[0535] In some embodiments, before S1810, the moving image processing method 1800 may further include the step of obtaining a merge candidate list, where the merge candidate list includes P sets of merge motion vector candidates, and here, P is an integer greater than or equal to 1. S1810 of determining the base motion vector list may include determining the base motion vector list based on the merge candidate list. For example, when P is greater than or equal to 2, two sets of merge motion vector candidates in the merge candidate list are taken to form the base motion vector list. Optionally, the two sets of merge motion vector candidates may be the first two sets of merge motion vector candidates in the merge candidate list. If the first two sets of merge motion vector candidates do not meet the conditions, other two sets of merge motion vector candidates may also be used. Or, the two sets of merge motion vector candidates may be any two sets of merge motion vector candidates that meet the conditions in the merge candidate list, and the embodiments of the present application are not limited thereto. Also, for example, when P is less than 2, the base motion vector list is formed by filling with the motion vector (0, 0).
[0536] Specifically, the MMVD technology may first construct a base motion vector list (base MVP list) by using merge motion vector candidates in an existing merge candidate list (or various motion vector candidate lists obtained in different type modes described above). For example, all merge motion vector candidates in the existing merge candidate list (merge list) are exhaustively searched. When the number of sets of merge motion vector candidates in the existing merge list is greater than 2, the first 2 sets of merge motion vector candidates in the merge list are taken to form the base MVP list of MMVD. Otherwise, MV(0, 0) is used to fill and form the base MVP list of MMVD. In the embodiments of this application, other default motion vectors may be used to fill and form the base motion vector list, such as (1, 1), (2, 2), etc., and the embodiments of this application are not limited thereto.
[0537] It should be understood that among the 2 sets of base MVs included in the base MVP list, each set of base MVs may be a base motion vector for uni - prediction or a group of base motion vectors for bi - prediction. Of course, the base MVP list may further include more sets or fewer sets of base MVs, and this application is not limited thereto. In this specification, the situation of the bi - prediction base motion vector group is considered. The 2 base motion vectors included in the bi - prediction base motion vector set may be a forward base motion vector and a backward base motion vector, or 2 base motion vectors in the same direction, for example, 2 forward base motion vectors or 2 forward base motion vectors.
[0538] Optionally, in some embodiments, S1820 for determining two motion vector displacement amounts from a preset set of displacement amounts may include determining a set of a plurality of sets of motion vector displacement amounts including the two motion vector displacement amounts from the set of displacement amounts. Based on the first base motion vector, the second base motion vector, and the two motion vector displacement amounts, S1830 for determining the motion vector of the current image block may include determining a set of motion vector displacement amounts that enables the rate distortion loss to meet a preset condition from the plurality of sets of motion vector displacement amounts, and determining the motion vector of the current image block based on the first base motion vector, the second base motion vector, and the set of motion vector displacement amounts that enables the rate distortion loss to meet the preset condition. Optionally, the rate distortion loss meeting the preset condition may be that the rate distortion loss is smaller than a preset threshold, or the rate distortion loss is the smallest, for example, the prediction residual is the smallest, etc., and the embodiments of the present application are not limited thereto.
[0539] In the embodiments of the present application, the MMVD technology can shift the predicted value of the base motion vector according to a certain rule to generate a new motion vector prediction candidate as the MMVD motion vector predicted value and put it into the MMVD motion vector candidate list. Optionally, in some embodiments, the motion vector displacement amount (offset) in the set of displacement amounts may have 8 selections (2 1 , 2 2 , ……, 2 8 ), that is, the preset set of displacement amounts is {2, 4, 8, 16, 32, 64, 128, 256}. For example, the number of sets of base motion vectors (also called base motion vector candidates) in the base MVP list is 2, and the motion vector displacement amount (offset) has 8 selections (2 1 , 2 2 , ……, 2 8) It has. For two component MVs MV_x and MV_y of a set of base MVs in the base MVP list of MMVD, a motion vector offset can be added to or subtracted from them (two choices). Specifically, for example, the MMVD motion vector prediction value = the base motion vector prediction value + the motion vector deviation amount offset. Therefore, the motion vector of the current image block of MMVD has a total of 2x8x2x2 = 64 refinement modes. Embodiments of this application may select some from the 64 improvement modes, or derive more improvement modes from the 64 improvement modes, but are not limited to the 64 improvement modes. For example, the number of improvement modes can be 32, 128, etc., but the embodiments of this application are not limited thereto. From these motion vectors, a motion vector that satisfies the preset conditions for the rate-distortion loss is determined as the motion vector of the current image block during encoding and / or decoding.
[0540] From another perspective, determining a motion vector that satisfies the preset conditions for the rate-distortion loss may be equivalent to determining a set of motion vector deviation amounts that satisfies the preset conditions for the rate-distortion loss from among the sets of the plurality of sets of motion vector deviation amounts. Based on the first base motion vector, the second base motion vector, and the set of motion vector deviation amounts that satisfies the preset conditions for the rate-distortion loss, the motion vector of the current image block is determined.
[0541] It should be understood that the two motion vector deviation amounts in the set of motion vector deviation amounts may be the same or different.
[0542] Optionally, a combination set of multiple sets of motion vector deviation amounts including two motion vector deviation amounts can perform an exhaustive search of the motion vector deviation amounts in the preset deviation amount set to form combinations of multiple sets of motion vector deviation amounts.
[0543] Alternatively, one of the combinations of a plurality of sets of motion vector displacement amounts may be one of the motion vector displacement amounts in a set of displacement amounts calculated by a preset algorithm. Taking the motion vector displacement amount obtained by this calculation as a fixed value, the motion vector displacement amounts in the set of displacement amounts are exhaustively searched, and another motion vector displacement amount in the combinations of the plurality of sets of motion vector displacement amounts is used to form the combinations of the plurality of sets of motion vector displacement amounts. Without performing a scaling operation (scaling operation with a scale of 1), a simple exhaustive search can be performed to find an appropriate combination of motion vector displacement amounts, reducing the overall computational amount and improving the encoding / decoding efficiency.
[0544] Alternatively, one of the combinations of a plurality of sets of motion vector displacement amounts may be one of the motion vector displacement amounts in a set of displacement amounts calculated by a preset algorithm. Taking the motion vector displacement amount obtained by this calculation as a fixed value, the fixed value is scaled to obtain another motion vector displacement amount in the combinations of the plurality of sets of motion vector displacement amounts, and the combinations of the plurality of sets of motion vector displacement amounts are formed.
[0545] Alternatively, the combinations of a plurality of sets of motion vector displacement amounts including two motion vector displacement amounts can also be formed in other ways, and the embodiments of the present application are not greatly limited thereto.
[0546] Optionally, in some embodiments, when both the current first base motion vector and the second base motion vector point to non-specific reference images, a new motion vector deviation amount can be obtained after performing a scaling operation on the selected motion vector deviation amount. Further, the first base motion vector and the second base motion vector are adjusted according to the new motion vector deviation amount. Based on the first base motion vector, the second base motion vector, and the two new motion vector deviation amounts, that is, the motion vector of the adjusted current image block is determined, and the current image block is predicted based on the motion vector of the current image block. That is to say, in dual prediction, when determining the predicted value of the motion vector of the current image block by the MMVD technology, if the distances from the current image to the reference images of the two base motion vectors are different, the motion vector deviation amount is scaled, and then the scaled motion vector deviation amount is added (or subtracted) to the predicted value of the base motion vector to determine the motion vector of the current image block.
[0547] When both the first base motion vector and the second base motion vector point to non-specific reference images, the two motion vector deviation amounts are used to adjust the first base motion vector and the second base motion vector based on the two motion vector deviation amounts. 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 deviation amount used by the first base motion vector to the motion vector deviation amount used by the second base motion vector. In other words, the scale is determined by the distance between the image where the current image block (for example, the first image block) is located and the reference images in two reference directions of the current image block, and these two reference images are the reference images of the current base motion vectors. This embodiment can further reduce the number of combinations of motion vector deviation amounts to be tried and further improve the encoding and decoding efficiency.
[0548] The adjustment may be to add the two motion vector displacement amounts to the first base motion vector and the second base motion vector respectively, or to subtract the two motion vector displacement amounts from the first base motion vector and the second base motion vector respectively.
[0549] For example, in the encoding or decoding process, there are eight selections for the selectable motion vector displacement amount: {2, 4, 8, 16, 32, 64, 128, 256}. Let the motion vector displacement amount selected in the current process be denoted as X. Let the frame number of the current image be denoted as P2, and the frame numbers of the reference images of the first base motion vector and the second base motion vector be denoted as P0 and P1 respectively. If P2 - P0 = P2 - P1, then add the motion vector displacement amount X of the same size to the two base motion vectors. If P2 - P0 = 2 * (P2 - P1), then add the motion vector displacement amount 2 * X to the first base motion vector and add the motion vector displacement amount X to the second base motion vector. Similarly, if P2 - P1 = 2 * (P2 - P0), then add the motion vector displacement amount X to the first base motion vector and add the motion vector displacement amount 2 * X to the second base motion vector.
[0550] Also, if the ratio of the distance from the current image to the reference image of the first base motion vector and the distance from the current image to the reference image of the second base motion vector is not a multiple of 2, an appropriate ratio (a multiple of 2) is selected so that the ratio of the motion vector deviation amount used by the first base motion vector and the motion vector deviation amount used by the second base motion vector is as close as possible to the ratio of the distance from the current image to the reference image of the first base motion vector and the distance from the current image to the reference image of the second base motion vector. For example, if P2 - P0 = 3*(P2 - P1), a ratio of 2 or 4 is selected. Add a motion vector deviation amount of 2*X to the first base motion vector and a motion vector deviation amount of X to the second base motion vector, or add a motion vector deviation amount of 4*X to the first base motion vector and a motion vector deviation amount of X to the second base motion vector. Also, for example, when P2 - P0 = 5*(P2 - P1), the ratio selects 4, which is the multiple of 2 closest to 5. Add a motion vector deviation amount of 4*X to the first base motion vector and a motion vector deviation amount of X to the second base motion vector.
[0551] When the first base motion vector and / or the second base motion vector points to a specific reference image (i.e., when the reference image of the current image block is the specific reference image), the definition of the temporal distance between the specific reference image and the current image block is ambiguous, so scaling the motion vector deviation amount is meaningless.
[0552] 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 deviation amounts includes a motion vector deviation amount obtained after scaling the initial motion vector deviation amount by a scale of numerical value 1, or a motion vector deviation amount obtained by skipping the scaling operation.
[0553] 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 based on the processed motion vector deviation amount and the base motion vector group. Here, the processed motion vector deviation amount and the pre-processed motion vector deviation amount are the same. For example, at least one of the two processed motion vector deviation amounts is a motion vector deviation amount obtained after scaling the initial motion vector deviation amount by a scale of 1, or a motion vector deviation amount obtained by skipping the scaling operation.
[0554] In one specific embodiment, a certain motion vector deviation amount (e.g., offset1) among the two motion vector deviation amounts is calculated 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, another motion vector deviation amount (e.g., offset2) may be obtained by scaling offset1 by a scale of 1, or may be obtained without scaling offset1. Or, another motion vector deviation amount (e.g., offset2) may be obtained by scaling a certain initial deviation amount by a scale of 1 or without performing the scaling operation. In other words, the initial motion vector deviation amount may be offset1 or other initial deviation amounts, and the embodiments of the present application are not limited thereto.
[0555] In some embodiments of the present application, the method is executed by the encoding side, and the method further includes performing encoding based on the result of prediction and transmitting a code stream to the decoding side, wherein the code stream includes an index for instructing to be combined with a motion vector deviation amount such that the rate distortion loss satisfies a preset condition. In this embodiment, the encoding side notifies the decoding side of the index of the combination of the determined motion vector deviation amounts, whereby the decoding side can know two motion vector deviation amounts with less calculation, and the decoding side can be simplified. Optionally, if a certain motion vector deviation amount (for example, offset1) among the two motion vector deviation amounts can be calculated by a preset algorithm, the index may be the ratio of another motion vector deviation amount (for example, offset2) to offset1.
[0556] In some embodiments of the present application, the method is executed by the decoding side, and the method further includes receiving a code stream transmitted by the encoding side, wherein the code stream includes an index for instructing to be combined with two motion vector deviation amounts, and determining two motion vector deviation amounts from the preset set of deviation amounts includes determining the two motion vector deviation amounts based on the index. In this embodiment, the encoding side notifies the decoding side of the index of the combination of the determined motion vector deviation amounts, whereby the decoding side can know two motion vector deviation amounts with less calculation, and the decoding side can be simplified. Optionally, if a certain motion vector deviation amount (for example, offset1) among the two motion vector deviation amounts can be calculated by a preset algorithm, the index may be the ratio of another motion vector deviation amount (for example, offset2) to offset1.
[0557] The above described the embodiments of the method of the present application in relation to FIGS. 1 and 18. Hereinafter, embodiments of the apparatus corresponding to the embodiments of the above method will be described. Note that the description of the embodiments of the apparatus corresponds to the description of the embodiments of the method. For those not described in detail, reference may be made to the above embodiments of the method. For simplicity, they will not be described again here. FIG. 19 is a schematic block diagram of a moving image processing apparatus 1900 provided according to an embodiment of the present application. The apparatus 1900 is used to execute the method embodiment shown in FIG. 18. The apparatus 1900 includes a construction module 1910 that determines a base motion vector list, the base motion vector list includes at least one dual-prediction base motion vector group, the dual-prediction base motion vector group includes a first base motion vector and a second base motion vector, determines two motion vector displacement amounts from a preset displacement amount set, the two motion vector displacement amounts respectively correspond to the first base motion vector and the second base motion vector, and is used to determine the motion vector of the current image block based on the first base motion vector, the second base motion vector, and the two motion vector displacement amounts, and a prediction module 1920 that is used to predict the current image block based on the motion vector of the current image block.
[0558] The moving image processing apparatus according to the embodiment of the present application can shift the base motion vectors of the dual-prediction base motion vector group based on a preset displacement amount set, obtain a more accurate motion vector of the current image block through a finite number of calculations, make the predicted residual smaller, and thereby improve the coding efficiency.
[0559] Optionally, in some embodiments, the constructing module 1910 determining two motion vector displacement amounts from a preset set of displacement amounts includes the constructing module determining a combination of multiple sets of motion vector displacement amounts including the two motion vector displacement amounts from the set of displacement amounts. The constructing module 1910 determining the motion vector of the current image block based on the first base motion vector, the second base motion vector, and the two motion vector displacement amounts includes the constructing module 1910 determining a combination of motion vector displacement amounts whose rate distortion loss satisfies a predetermined condition from the combinations of the multiple sets of motion vector displacement amounts, and determining the motion vector of the current image block based on the first base motion vector, the second base motion vector, and the combination of motion vector displacement amounts such that the rate distortion loss satisfies a predetermined condition.
[0560] Optionally, in some embodiments, the moving image processing apparatus 1900 is used on the encoding side, and the moving image processing apparatus 1900 further includes a transmitting module used for coating based on the prediction result and transmitting a code stream to the decoding side. The code stream includes an index for indicating a combination of motion vector displacement amounts such that the rate distortion loss satisfies a predetermined condition.
[0561] Optionally, in some embodiments, the moving image processing apparatus 1900 is used on the decoding side, and the moving image processing apparatus 1900 further includes a receiving module used for receiving the code stream transmitted by the encoding side. The code stream includes an index for indicating a combination of two motion vector displacement amounts. The constructing module 1910 determining two motion vector displacement amounts from a preset set of displacement amounts includes determining the two motion vector displacement amounts based on the index.
[0562] 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 displacement amounts is a motion vector displacement amount obtained after scaling the initial motion vector displacement amount by a scale of numerical value 1, or a motion vector displacement amount obtained by skipping the scaling operation.
[0563] 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 displacement amounts are used to adjust the first base motion vector and the second base motion vector based on the two motion vector displacement amounts.
[0564] 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 displacement amount used by the first base motion vector to the motion vector displacement amount used by the second base motion vector.
[0565] Optionally, in some embodiments, the construction module 1910 is further used to obtain a merge candidate list, the merge candidate list includes P sets of merge motion vector candidates, where P is an integer greater than or equal to 1, and the construction module 1910 determining the base motion vector list includes the construction module 1910 determining the base motion vector list based on the merge candidate list.
[0566] Optionally, in some embodiments, the construction module 1910 determining the base motion vector list based on the merge candidate list includes, when P is greater than or equal to 2, the construction module 1910 taking the previous 2 sets of merge motion vector candidates in the merge candidate list to form the base motion vector list.
[0567] Optionally, in some embodiments, when the construction module 1910 determines the base motion vector list based on the merge candidate list, if P is less than 2, the construction module 1910 fills the base motion vector list with the motion vector (0, 0).
[0568] Optionally, in some embodiments, the preset displacement amount set is {2, 4, 8, 16, 32, 64, 128, 256}.
[0569] Optionally, in some embodiments, the current image block is one coding unit CU.
[0570] Optionally, in some embodiments, the current image block is a bi-predicted image block.
[0571] FIG. 20 is a schematic block diagram of a video processing apparatus provided by an embodiment of the present application. The video processing apparatus 2000 shown in FIG. 20 can 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 processing apparatus 2000 is caused to determine a base motion vector list, the base motion vector list includes at least one group of bi-predicted base motion vectors, the group of bi-predicted base motion vectors includes a first base motion vector and a second base motion vector, determine two motion vector displacement amounts from a preset displacement amount set, the two motion vector displacement amounts respectively correspond to the first base motion vector and the second base motion vector, determine the motion vector of the current image block based on the first base motion vector, the second base motion vector and the two motion vector displacement amounts, and execute steps of predicting the current image block based on the motion vector of the current image block.
[0572] Note that the moving image processing apparatus 2000 according to an embodiment of the present application may further include a network interface for transmitting a code stream. For example, it receives the code stream transmitted from the encoding apparatus.
[0573] In some embodiments of the present application, when the processor 2010 determines two motion vector deviation amounts from a preset set of deviation amounts, it includes determining combinations of a plurality of sets of motion vector deviation amounts including the two motion vector deviation amounts from the set of deviation amounts. When the processor 2010 determines the motion vector of the current image block based on the first base motion vector, the second base motion vector, and the two motion vector deviation amounts, it determines a combination of motion vector deviation amounts such that the rate distortion loss satisfies a predetermined condition from the combinations of the plurality of sets of motion vector deviation amounts, and determines the motion vector of the current image block based on the first base motion vector, the second base motion vector, and the combination of motion vector deviation amounts such that the rate distortion loss satisfies a predetermined condition.
[0574] In some embodiments of the present application, the moving image processing apparatus 2000 is used on the encoding side, and the processor 2010 is further used to encode based on the prediction result and transmit a code stream to the decoding side. The code stream includes an index used to indicate a combination of motion vector deviation amounts such that the rate distortion loss satisfies a predetermined condition.
[0575] In some embodiments of the present application, the moving image processing apparatus 2000 is used on the decoding side, and the processor 2010 is further used to receive the encoded stream transmitted from the encoding side. The encoded stream includes an index for indicating a combination of two motion vector deviation amounts. When the processor 2010 determines two motion vector deviation amounts from a preset set of deviation amounts, it includes determining the two motion vector deviation amounts based on the index.
[0576] In some embodiments of the present application, when the first base motion vector and / or the second base motion vector point to a specific reference image, at least one of the two motion vector displacement amounts is a motion vector displacement amount obtained after scaling the initial motion vector displacement amount by a scale of 1 in terms of numerical value, or a motion vector displacement amount obtained by skipping the zoom operation.
[0577] In some embodiments of the present application, when both the first base motion vector and the second base motion vector point to non-specific reference images, the two motion vector displacement amounts are used to adjust the first base motion vector and the second base motion vector based on the two motion vector displacement amounts.
[0578] In some embodiments of the present application, 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 displacement amount used for the first base motion vector to the motion vector displacement amount used for the second base motion vector.
[0579] In some embodiments of the present application, the processor 2010 is further used to obtain a merge candidate list, the merge candidate list includes P sets of merge motion vector candidates, where P is an integer greater than or equal to 1, and the processor 2010 determining the base motion vector list includes determining the base motion vector list based on the merge candidate list.
[0580] In some embodiments of the present application, the processor 2010 determining the base motion vector list based on the merge candidate list includes, when P is greater than or equal to 2, taking the first two sets of merge motion vector candidates in the merge candidate list to form the base motion vector list.
[0581] In some embodiments of the present application, when the processor 2010 determines the base motion vector list based on the merge candidate list, if P is less than 2, it includes filling the base motion vector list with the motion vector (0, 0).
[0582] In some embodiments of the present application, the preset offset amount set is {2, 4, 8, 16, 32, 64, 128, 256}.
[0583] In some embodiments of the present application, the current image block is one coding unit CU.
[0584] In some embodiments of the present application, the current image block is a bi-predicted image block.
[0585] The moving image processing apparatus 2000 as shown in FIG. 20 or the moving image processing apparatus 1900 as shown in FIG. 19 can execute the operations or flows in the embodiments of the above method, and the operations and / or functions of each module and device in the moving image processing apparatus 2000 or the moving image processing apparatus 1900 are respectively for realizing the corresponding flows of the embodiments of the above method. For the sake of simplicity, it should be understood that they will not be described again here.
[0586] The embodiments of the present application further provide a moving image processing method, which determines a base motion vector list. The base motion vector list includes a group of base motion vectors. When at least one base motion vector in the group of base motion vectors points to a specific reference image, it includes abandoning determining the motion vector of the current image block based on the group of base motion vectors and the motion vector offset amount. That is, when at least one base motion vector in the group of base motion vectors points to a specific reference image, abandoning putting the corresponding motion vector into the MV candidate list.
[0587] In some embodiments of the present application, a merge candidate list is obtained, the merge candidate list includes P sets of merge motion vector candidates, where P is an integer greater than or equal to 1, and determining the base motion vector list includes determining the base motion vector list based on the merge candidate list.
[0588] In some embodiments of the present application, based on the merge candidate list, when P is greater than or equal to 2, determining the base motion vector list includes forming the base motion vector list by taking the previous two sets of merge motion vector candidates in the merge candidate list.
[0589] In some embodiments of the present application, based on the merge candidate list, when P is less than 2, determining the base motion vector list includes forming the base motion vector list by filling with motion vector (0, 0).
[0590] In some embodiments of the present application, the current image block is one coding unit CU.
[0591] Accordingly, the present application provides a video processing apparatus, including a determination module used to determine a base motion vector list including a group of base motion vectors, and a processing module used to abandon determining the motion vector of the current image block based on the group of base motion vectors and the motion vector deviation amount when at least one base motion vector in the group of base motion vectors points to a specific reference image.
[0592] In some embodiments of the present application, the video processing apparatus further includes a construction module used to obtain a merge candidate list, the merge candidate list includes P sets of merge motion vector candidates, where P is an integer greater than or equal to 1, and specifically, the determination module is used to determine the base motion vector list based on the merge candidate list.
[0593] In some embodiments of the present application, specifically when P is greater than or equal to 2, the determination module is used to form the base motion vector list by taking the previous two sets of merge motion vector candidates in the merge candidate list.
[0594] In some embodiments of the present application, specifically when P is less than 2, it is used to form the base motion vector list by filling with the motion vector (0, 0).
[0595] In some embodiments of the present application, the current image block is one coding unit CU.
[0596] The present application further provides a video processing apparatus including a processor and a memory. The memory is used to store instructions. When the processor executes the instructions stored in the memory, the video processing apparatus is caused to determine a base motion vector list, the base motion vector list includes a group of base motion vectors, and when at least one base motion vector in the group of base motion vectors points to a specific reference image, the step of determining the motion vector of the current image block based on the group of base motion vectors and the motion vector deviation amount is abandoned.
[0597] It should be understood that the apparatus according to each embodiment of the present application can be realized based on a memory and a processor. Each memory is used to store instructions for executing the method of each embodiment of the present application, and the processor can execute the above instructions to execute the method of each embodiment of the present application.
[0598] It should be understood that the processor referred to in the embodiments of this specification can include a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor can 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.
[0599] In addition, the memory mentioned in the embodiments of this specification may be a volatile memory or a non-volatile memory, or may include both volatile memory and non-volatile memory. Here, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), a flash (registered trademark) 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 high-speed cache. By way of example and not limitation, many forms of RAM can be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0600] In addition, when the processor is a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, discrete gate, or transistor logic device, discrete hardware component, the memory (memory module) is integrated into the processor.
[0601] Note that the memory described herein is intended to include these and other suitable types of memory, but is not limited thereto.
[0602] Embodiments of the present application further provide a computer-readable storage medium storing instructions, which, when executed by a computer, cause the computer to execute the steps of the embodiments of the above method.
[0603] Embodiments of the present application further provide a computing device including the computer-readable storage medium.
[0604] Embodiments of the present application further provide a computer program product including instructions that, when the computer executes the instructions of the computer program product, cause the computer to execute the steps of the embodiments of the above method.
[0605] Embodiments of the present application further provide a computer chip for causing a computer to execute the steps of the embodiments of the above method.
[0606] Embodiments of the present application can be applied to aircraft, especially in the field of unmanned aircraft.
[0607] Note that the division of circuits, sub-circuits, and sub-cells in each embodiment of the present application is schematic. A person skilled in the art can recognize that the circuits, sub-circuits, and sub-units of each example described in the embodiments disclosed herein can be divided or combined.
[0608] The apparatus provided by the embodiments of this application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in 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 uploaded to and executed by a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a certain website, computer, server, or data center to another website, computer, server, or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium may be any available medium accessible by the computer, or may be a data storage device such as a server or data center integrated with one or more available media. The available media may be a magnetic medium (such as a floppy disk, hard disk, tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as an SSD), etc.
[0609] It should be understood that the first, second, and various numerical numbers described in this specification are only for the convenience of description and do not limit the scope of this application.
[0610] Here, the term "and / or" merely describes the relationship of the related objects, indicating that three relationships can exist. For example, A and / or B can represent that A exists alone, A and B exist simultaneously, and B exists alone. Also, the character " / " in this specification generally means that the related objects before and after are in an "or" relationship.
[0611] It should be noted that in the embodiments of this application, the sizes of the numbers of the above processes do not mean the order of execution before and after. The execution order of each process should be determined by its function and inherent logic, and it should be understood that the embodiments of the processes of this application are not limited in any way.
[0612] A person skilled in the art can recognize that the units and algorithm steps of each example described in relation to the embodiments disclosed in this specification can be realized by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods for each specific application to realize the described functions, but such realization should not be regarded as outside the scope of this application.
[0613] For the sake of easy and concise description, the specific operation procedures of the above-described system, apparatus, and unit may refer to the corresponding procedures in the embodiments of the above-described method, and will not be described here.
[0614] In some embodiments provided in this specification, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the embodiments of the devices described above are only schematic. For example, the division of the said units is only a logical function division, and there may be other division methods in actual implementation. For example, a plurality of units or assemblies may be combined, or integrated into other systems, or some features may be ignored or not executed. And the indicated or considered mutual coupling, direct coupling, or communication connection may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be in electrical, mechanical, or other forms.
[0615] The units described as the separation members may or may not be physically separated. The members represented as units may or may not be physical units, that is, they may be located in one place or distributed in a plurality of network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the solution means of this embodiment.
[0616] Also, each functional unit in each embodiment of this specification may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit.
[0617] As described above, it is only a form for implementing the invention of this application, and the protection scope of this application is not limited thereto. Those skilled in the art can easily make changes or exchanges within the technical scope disclosed in this application. If it can be done, it is included in the protection scope of this application. Therefore, the protection scope of this application shall be subject to the scope of the claims. [Item 1] A moving image processing method, Of the preset M neighboring blocks of the current image block, sequentially scan N neighboring blocks smaller than M, and determine a target neighboring block based on the scanning result; Based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, determine a related block of the current image block; Divide the current image block and the related block 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; A method for video processing, including predicting corresponding sub-image blocks in the current image block based on the motion vectors of the sub-image blocks in the related block. [Item 2] The method according to item 1, wherein N is equal to 1 or 2. [Item 3] Before predicting the corresponding sub-image blocks in the current image block based on the motion vectors of the sub-image blocks in the related block, Put the representative motion vector of the related block into the first motion vector candidate list as a candidate; The method according to item 1 or 2, further including, when it is determined to adopt the candidate, predicting the corresponding sub-image blocks in the current image block based on the motion vectors of the sub-image blocks in the related block. [Item 4] Predicting the corresponding sub-image blocks in the current image block based on the motion vectors of the sub-image blocks in the related block means The method according to item 3, including using the motion vectors of the sub-image blocks in the related block as the motion vectors of the corresponding sub-image blocks in the current image block respectively. [Item 5] The method according to item 3, wherein the representative motion vector of the related block is put into the first motion vector candidate list as the first candidate. [Item 6] The method according to item 3, wherein the representative motion vector of the related block includes the motion vector of the central position of the related block. [Item 7] The method further includes when a sub-image block with an unobtainable motion vector appears in the related block, using the representative motion vector of the related block as the motion vector of the sub-image block with the unobtainable motion vector, and predicting the corresponding sub-image block in the current image block. The method according to item 3. [Item 8] The method further includes when a sub-image block with an unobtainable motion vector appears in the related block and the representative motion vector of the related block is unobtainable, giving up predicting the corresponding sub-image blocks in the current image block based on the motion vectors of the sub-image blocks in the related block respectively. The method according to item 7. [Item 9] The method according to item 8, wherein when a sub-image block in the related block is unobtainable or the sub-image block in the related block uses an intra-frame coding mode, it is determined that a sub-image block with an unobtainable motion vector appears in the related block. [Item 10] The method further includes determining other candidates and adding the other candidates to the first motion vector candidate list, wherein at least one of the other candidates includes the motion vector of a sub-image block. The method according to item 3. [Item 11] The method further includes when it is determined to adopt one of the other candidates, further determining the motion vector of the sub-image block in the current image block based on the adopted candidate. The method according to item 10. [Item 12] The method according to item 10 or 11, wherein the at least one candidate includes the motion vectors of a set of control points. [Item 13] When determining to adopt a candidate among the at least one candidate, performing an affine transformation on the adopted candidate based on an affine transformation model, and predicting a sub-image block in the current image block based on the candidate after the affine transformation. The method according to any one of items 10 to 12 further includes: When the affine transformation model includes a four-parameter affine transformation model, in the at least one candidate, each candidate includes a motion vector of two control points, [Item 14] When the affine transformation model includes a six-parameter affine transformation model, in the at least one candidate, each candidate includes a motion vector of three control points. The method according to item 13 When the affine transformation model includes a six-parameter affine transformation model, in the at least one candidate, each candidate includes a motion vector of three control points. The method according to item 13 [Item 15] The method further includes: determining a group of control point motion vectors of a neighboring block that performs prediction by adopting an affine transformation mode in a specific scanning order from neighboring blocks of the current image block, and putting the group of control point motion vectors of each determined neighboring block into the first candidate list of motion vectors as one candidate. The method according to any one of items 3 to 14 further includes: [Item 16] Determining the group of control point motion vectors of the neighboring block that performs prediction by adopting an affine transformation mode in a specific scanning order from the neighboring blocks of the current image block as described above includes: determining a group of motion vectors of control points of a first neighboring block in a first scanning order in the left neighboring block of the current image block, and determining a group of motion vectors of control points of a second neighboring block in a second scanning order in the upper neighboring block of the current image block. Including putting the motion vector group of the control points of the first neighboring block and the motion vector group of the control points of the second neighboring block into the first candidate list of the motion vectors, the method according to item 15. [Item 17] The method is Constructing the motion vectors of some control points of the current image block based on the neighboring blocks of some control points of the current image block, And further including putting the motion vectors of some control points of the current image block into the first candidate list of the motion vectors, the method according to any one of items 3 to 14. [Item 18] Constructing the motion vectors of some control points of the current image block based on the neighboring blocks of some control points of the current image block as described above is For each control point among some control points, sequentially scanning the specific neighboring blocks of the control point in the third scanning order, and using the motion vector of the specific neighboring block that satisfies the preset condition as the motion vector of the control point, the method according to item 17. [Item 19] The method is When the motion vectors of some control points point to different reference frames respectively, further including giving up putting the motion vectors of some control points of the current image block into the first candidate list of the motion vectors, the method according to item 17 or 18. [Item 20] The method is When the quantity of candidates in the first candidate list of the motion vectors is greater than a preset numerical value, further including giving up putting the motion vectors of some control points of the current image block into the first candidate list of the motion vectors, the method according to item 17 or 18. [Item 21] The method is Construct a second candidate list of motion vectors, and the candidate to be included in the second candidate list of motion vectors is the motion vector of one image block. When it is determined to adopt the candidate in the second candidate list of motion vectors, it further includes determining the motion vector of the current image block based on the motion vector of the candidate, according to the method described in any one of items 3 to 15. [Item 22] Determining the motion vector of the current image block based on the motion vector of the candidate described above includes using the candidate determined to be adopted as the motion vector of the current image block, or using the candidate determined to be adopted after scaling as the motion vector of the current image block, according to the method described in item 21. [Item 23] Constructing the second candidate list of motion vectors as described above includes determining the candidate to be included in the second candidate list of motion vectors based on the motion vectors of multiple neighboring blocks of the current image block in the current image, according to the method described in item 21. [Item 24] The multiple neighboring blocks of the current image block in the current image include the preset M neighboring blocks, according to the method described in item 23. [Item 25] Take the motion vectors of the preset M neighboring blocks in the preset order as M candidates respectively, and include them in the second candidate list of motion vectors. The N neighboring blocks refer to the first N neighboring blocks determined in the preset order, according to the method described in item 24. [Item 26] The method further includes abandoning the determination of the candidate to be included in the second candidate list of motion vectors based on the motion vector of the one or more neighboring blocks when the motion vector of one or more neighboring blocks among the M neighboring blocks is unavailable, according to the method described in item 24. [Item 27] Scanning N out of the above-mentioned M neighboring blocks in sequence and determining the target neighboring block based on the scanning result means Scanning the N neighboring blocks in sequence, stopping the scanning when reaching the neighboring block that meets the first preset condition, and determining the target neighboring block based on the neighboring block that meets the first preset condition among the scanned ones, the method according to item 1 or 26. [Item 28] Determining the target neighboring block based on the neighboring block that meets the first preset condition among the scanned ones means The method according to item 19, including using the neighboring block that meets the first preset condition as the target neighboring block. [Item 29] The preset condition is The method according to item 19 or 28, including that the reference image of the neighboring block is the same as the reference image of the current image block. [Item 30] The method is When no neighboring block that meets the preset condition is scanned among the N neighboring blocks, performing scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks, and further including predicting the current image block based on the motion vector after the scaling processing, the method according to any one of items 27 to 29. [Item 31] Predicting the current image block based on the motion vector after the scaling processing means The method according to item 30, including determining the reference block of the current image block based on the motion vector after the scaling processing and the reference image of the current image block. [Item 32] The specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks, the method according to item 30. [Item 33] Performing scaling processing on the motion vector of a specific neighboring block among the above-mentioned M neighboring blocks and predicting the current image block based on the motion vector after the scaling processing means that Performing scaling processing on the motion vector of the specific neighboring block so that the reference frame pointed to by the motion vector after the scaling processing is the same as the reference image of the current image block, and The method according to item 30, further including using, as the reference block of the current image block, the image block pointed to by the motion vector after the scaling processing in the reference image of the current image block. [Item 34] The method is When a neighboring block that meets the above preset conditions has not been scanned among the above N neighboring blocks, the method according to any one of items 27 to 30, further including using a default block as the reference block of the current image block. [Item 35] The method according to item 34, wherein the default block is an image block pointed to by a motion vector (0, 0). [Item 36] The method according to any one of items 1 to 35, wherein the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 64 or more pixels. [Item 37] The method according to item 36, wherein the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels, or 16×4 pixels or 4×16 pixels. [Item 38] The size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels, and the method is The method according to item 37, further including setting not to perform the time motion vector prediction TMVP operation. [Item 39] The method is The method according to any one of items 1 to 36, further comprising setting not to perform a temporal motion vector prediction TMVP operation when at least one of the width and height of the sub-image block and / or related blocks of the sub-image block is smaller than 8 pixels. [Item 40] The method according to any one of items 1 to 39, wherein the current image block is one coding unit CU. [Item 41] Determining a related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, The method according to any one of items 1 to 40, comprising determining a related block of the current image block in the reference image of the motion vector of the target neighboring block and the current image block. [Item 42] The method according to any one of items 1 to 41, wherein the neighboring block is an image block adjacent to the position of the current image block in the current image or having a certain position pitch. [Item 43] Predicting the current image block based on the motion vector of the related block, 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, determining a reference block of the current image block based on the motion vector of the processed related block and the reference image of the current image block, The method according to any one of items 1 to 42, wherein the motion vector of the processed related block and the motion vector of the related block before processing are the same. [Item 44] The motion vector of the processed related block, A motion vector obtained after scaling the motion vector of the related block by a scale with a numerical value of 1, or The method according to item 43, including the motion vector of the related block for which the scaling step is skipped. [Item 45] Predicting the current image block based on the motion vector of the related block described above means that 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, abandoning determining the reference block of the current image block based on the motion vector of the related block, the method according to any one of items 1 to 42. [Item 46] The method is When the motion vector of the neighboring block points to a specific reference image, or the reference image of the current image block is a specific reference image, further including determining the reference block of the current image block based on the motion vector of the related block after processing and the reference image of the current image block, The method according to any one of items 1 to 45, wherein the motion vector of the related block after processing is the same as the motion vector of the related block before processing. [Item 47] The motion vector of the related block after processing is The motion vector obtained after scaling the motion vector of the related block at a scale of 1, or The method according to item 46, including the motion vector of the related block after skipping the scaling step. [Item 48] M is 4 or less, the method according to any one of items 1 to 47. [Item 49] A video processing method, Determining M neighboring blocks of the current image block based on M candidates in the second candidate list of the motion vector of the current image block, and Among the M neighboring blocks, sequentially scanning N neighboring blocks smaller than M, and determining a target neighboring block based on the scanning result, and Determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, and Determining a specific candidate in the first candidate list of motion vectors of the current image block based on the related blocks of the current image block; When it is determined to use the specific candidate, 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 is made to correspond one-to-one to each sub-image block of the related block; A moving image processing method including predicting corresponding sub-image blocks in the current image block based on the motion vectors of the sub-image blocks in the related block. [Item 50] The method according to item 49, wherein 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. [Item 51] The method according to item 49 or 50, wherein N is equal to 1 or 2. [Item 52] The method according to any one of items 49 to 51, wherein the M candidates include the motion vectors of M neighboring blocks of the current image of the current image block. [Item 53] Sequentially scanning N of the M neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result is Sequentially scanning the N neighboring blocks, stopping the scanning when reaching the neighboring block that meets the first preset condition, and determining the target neighboring block based on the neighboring block that meets the first preset condition among the scanned neighboring blocks, the method according to item 52. [Item 54] Determining the target neighboring block based on the neighboring block that meets the first preset condition among the scanned neighboring blocks is The method according to item 52, including using the neighboring block that meets the first preset condition as the target neighboring block. [Item 55] The preset condition is The method according to item 53 or 54, including that the reference image of the neighboring block is the same as the reference image of the current image block. [Item 56] The method further includes when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, performing scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks, and predicting the current image block based on the motion vector after the scaling processing, the method according to any one of items 53 to 55. [Item 57] Predicting the current image block based on the motion vector after the scaling processing as described above includes determining the reference block of the current image block based on the motion vector after the scaling processing and the reference image of the current image block, the method according to item 56. [Item 58] The specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks, the method according to item 56. [Item 59] Performing scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks as described above and predicting the current image block based on the motion vector after the scaling processing includes performing scaling processing on the motion vector of the specific neighboring block so that the reference frame pointed to by the motion vector after the scaling processing is the same as the reference image of the current image block, and using the image block pointed to by the motion vector after the scaling processing in the reference image of the current image block as the reference block of the current image block, the method according to item 56. [Item 60] The method further includes when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, using the default block as the reference block of the current image block, the method according to any one of items 53 to 55. [Item 61] The method according to item 60, wherein the default block is an image block pointed to by a motion vector (0, 0). [Item 62] The method according to any one of items 49 to 61, wherein the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to 64 or more pixels. [Item 63] The method according to item 62, wherein the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to 8×8 pixels, or 16×4 pixels or 4×16 pixels. [Item 64] The size of the sub-image block and / or the size of the related block of the sub-image block is fixed to 8×8 pixels, and the method further includes setting so as not to perform a temporal motion vector prediction TMVP operation, the method according to item 63. [Item 65] The method further includes 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 smaller than 8 pixels, setting so as not to perform a temporal motion vector prediction TMVP operation, the method according to any one of items 49 to 62. [Item 66] The method according to any one of items 49 to 65, wherein the current image block is one coding unit CU. [Item 67] Determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes determining the related block of the current image block in the reference image of the motion vector of the target neighboring block and the current image block, the method according to any one of items 49 to 66. [Item 68] The method according to any one of items 49 to 67, wherein 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 pitch. [Item 69] Predicting the current image block based on the motion vector of the related block described above includes: 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, determining the reference block of the current image block based on the motion vector of the related block after processing and the reference image of the current image block. The method according to any one of items 49 to 68, wherein the motion vector of the related block after processing is the same as the motion vector of the related block before processing. [Item 70] The motion vector of the related block after processing is: A motion vector obtained after scaling the motion vector of the related block at a scale of 1, or The method according to item 69, including the motion vector of the related block without skipping the scaling step. [Item 71] Predicting the current image block based on the motion vector of the related block described above includes: 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, giving up determining the reference block of the current image block based on the motion vector of the related block. The method according to any one of items 49 to 68. [Item 72] The method further includes: When the motion vector of the neighboring block points to a specific reference image, or the reference image of the current image block is a specific reference image, further determining the reference block of the current image block based on the motion vector of the related block after processing and the reference image of the current image block. The method according to any one of items 49 to 71, wherein the motion vector of the related block after processing is the same as the motion vector of the related block before processing. [Item 73] The motion vector of the related block after the above processing is the motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the method according to item 72, including the motion vector of the related block for which the scaling step is skipped. [Item 74] Predicting each corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the related block among the above related blocks is the method according to any one of items 49 to 73, including setting the motion vector of each sub-image block in the related block as the motion vector of the corresponding sub-image block in the current image block. [Item 75] Determining a specific candidate in the first candidate list of the motion vector of the current image block based on the related block of the current image block among the above is the method according to any one of items 49 to 73, including inserting the representative motion vector of the related block of the current image block into the first candidate list of the motion vector as the specific candidate. [Item 76] The method according to item 75, where the representative motion vector of the related block is inserted into the first candidate list of the motion vector as the first candidate. [Item 77] The method according to item 75, where the representative motion vector of the related block includes the motion vector at the central position of the related block. [Item 78] The above method is When a sub-image block for which a motion vector cannot be obtained appears in the related block, the method according to item 75 further includes setting the representative motion vector of the related block as the motion vector of the sub-image block for which the motion vector cannot be obtained, and predicting the corresponding sub-image block in the current image block. [Item 79] The above method is The method according to item 78, further comprising abandoning predicting the corresponding sub-image blocks in the current image block based on the motion vectors of the sub-image blocks in the associated block, respectively, when there is a sub-image block in the associated block for which a motion vector cannot be obtained and the representative motion vector of the associated block cannot be obtained. [Item 80] The method according to item 78, determining that there is a sub-image block in the associated block for which a motion vector cannot be obtained when a sub-image block in the associated block cannot be obtained or when the sub-image block in the associated block uses an intra-frame coding mode. [Item 81] The method includes when determining to adopt one of the candidates other than the specific candidate in the second motion vector candidate list, performing an affine transformation on the adopted candidate based on an affine transformation model, and further predicting the sub-image blocks in the current image block based on the candidate after the affine transformation, the method according to any one of items 49 to 80. [Item 82] The method according to item 81, wherein in at least one candidate other than the specific candidate in the second motion vector candidate list, each candidate includes a motion vector of a set of control points. [Item 83] When the affine transformation model includes a four-parameter affine transformation model, in the at least one candidate, each candidate includes a motion vector of two control points, and when the affine transformation model includes a six-parameter affine transformation model, in the at least one candidate, each candidate includes a motion vector of three control points, the method according to item 82. [Item 84] The method includes determining a group of control point motion vectors of neighboring blocks that perform prediction by adopting an affine transformation mode in a specific scanning order from the neighboring blocks of the current image block, and The method according to any one of items 49 to 83, further comprising putting, as one candidate, the control point motion vector groups of the respective determined neighboring blocks into the first candidate list of motion vectors. [Item 85] Determining the control point motion vector groups of the neighboring blocks that perform prediction by adopting the affine transformation mode in a specific scanning order from the neighboring blocks of the current image block described above means determining the motion vector groups of the control points of the first neighboring block in the first scanning order in the left neighboring block of the current image block described above; determining the motion vector groups of the control points of the second neighboring block in the second scanning order in the upper neighboring block of the current image block described above; and putting the motion vector groups of the control points of the first neighboring block and the motion vector groups of the control points of the second neighboring block into the first candidate list of the motion vectors, the method according to item 84. [Item 86] The method described above further comprises constructing the motion vectors of some control points of the current image block based on the neighboring blocks of some control points of the current image block, and putting the motion vectors of some control points of the current image block into the first candidate list of motion vectors, the method according to any one of items 49 to 85. [Item 87] Constructing the motion vectors of some control points of the current image block based on the neighboring blocks of some control points of the current image block described above means sequentially scanning the specific neighboring blocks of each control point among the some control points in the third scanning order, and using the motion vectors of the specific neighboring blocks that satisfy the preset conditions as the motion vectors of the control points, the method according to item 86. [Item 88] The method described above When the motion vectors of some of the above control points point to different reference frames, the method according to item 86 or 87 further includes abandoning putting the motion vectors of some of the control points of the current image block into the first candidate list of motion vectors. [Item 89] The above method is When the number of candidates in the first candidate list of motion vectors is greater than a preset numerical value, the method according to item 86 or 87 further includes abandoning putting the motion vectors of some of the control points of the current image block into the first candidate list of motion vectors. [Item 90] The above method is Construct a second candidate list of motion vectors, where the candidates to be put into the second candidate list of motion vectors are the motion vectors of one image block. When it is determined to adopt the candidates in the second candidate list of motion vectors, the method according to items 51 to 63 further includes determining the motion vector of the current image block based on the motion vectors of the candidates. [Item 91] Determining the motion vector of the current image block based on the above motion vectors of the candidates is The method according to item 90 includes using the candidate determined to be adopted as the motion vector of the current image block, or using the candidate determined to be adopted after scaling as the motion vector of the current image block. [Item 92] Constructing the above second candidate list of motion vectors is The method according to item 90 includes determining the M candidates to be put into the second candidate list of motion vectors based on the motion vectors of M neighboring blocks of the current image block on the current image of the current image block. [Item 93] In the order of the preset order, the motion vectors of the M preset neighboring blocks are used as M candidates respectively and put into the second candidate list of motion vectors. The N neighboring blocks refer to the first N neighboring blocks determined in the preset order. and / or When the motion vectors of one or more neighboring blocks among the M neighboring blocks are unavailable, the method according to item 92, which abandons determining candidates to be put into the second candidate list of motion vectors based on the motion vectors of the one or more neighboring blocks. [Item 94] The method according to any one of items 49 to 93, where M is 4 or less. [Item 95] A moving image processing apparatus, sequentially scanning N neighboring blocks smaller than M among the M preset neighboring blocks of the current image block, determining a target neighboring block based on the scanning result, determining a related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the 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 method, and each sub-image block in the current image block corresponding one-to-one to each sub-image block in the related block, and a construction module used for this purpose, A moving image processing apparatus including a prediction module used to predict each corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the related block. [Item 96] The moving image processing apparatus according to item 95, where N is equal to 1 or 2. [Item 97] The prediction module further puts the representative motion vector of the related block into the first candidate list of motion vectors as a candidate before predicting each corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the related block. When it is determined to adopt the above candidate, the prediction module is used to predict the corresponding sub-image blocks in the current image block based on the motion vectors of the sub-image blocks in the related block, and is the moving image processing apparatus according to item 95 or 96. [Item 98] Predicting the corresponding sub-image blocks in the current image block respectively based on the motion vectors of the sub-image blocks in the related block described above means The moving image processing apparatus according to item 97, including setting the motion vectors of the sub-image blocks in the related block as the motion vectors of the corresponding sub-image blocks in the current image block respectively. [Item 99] The moving image processing apparatus according to item 97, wherein the representative motion vector of the related block is put into the first candidate list of motion vectors as the first candidate of the motion vector. [Item 100] The moving image processing apparatus according to item 97, wherein the representative motion vector of the related block includes the motion vector of the central position of the related block. [Item 101] The prediction module further When a sub-image block with an unobtainable motion vector appears in the related block, the moving image processing apparatus according to item 97, which uses the representative motion vector of the related block as the motion vector of the sub-image block with the unobtainable motion vector to predict the corresponding sub-image block in the current image block. [Item 102] The prediction module further When a sub-image block with an unobtainable motion vector appears in the related block and the representative motion vector of the related block is also unobtainable, the moving image processing apparatus according to item 101, which is used to abandon predicting the corresponding sub-image blocks in the current image block respectively based on the motion vectors of the sub-image blocks in the related block. [Item 103] The prediction module further The moving image processing apparatus according to item 102, which is used to determine that there is a sub-image block in the related block for which a motion vector cannot be obtained when the sub-image block in the related block cannot be obtained or when the sub-image block in the related block uses an intra-frame encoding mode. [Item 104] The construction module further is used to determine other candidates and put the other candidates into the first motion vector candidate list, and at least one of the other candidates further includes a motion vector of a sub-image block. The moving image processing apparatus according to item 97. [Item 105] The construction module further is used to determine to adopt one of the other candidates, and is used to determine the motion vector of the sub-image block in the current image block based on the adopted candidate. The moving image processing apparatus according to item 104. [Item 106] At least one of the candidates includes a motion vector of a set of control points. The moving image processing apparatus according to item 104 or 105. [Item 107] The prediction module further when it is determined to adopt a candidate among the at least one candidate, performs an affine transformation on the adopted candidate based on an affine transformation model, and is used to predict the sub-image block in the current image block based on the candidate after the affine transformation. The moving image processing apparatus according to any one of items 104 to 106. [Item 108] When the affine transformation model includes a four-parameter affine transformation model, in at least one of the candidates, each candidate includes a motion vector of two control points, When the affine transformation model includes a six-parameter affine transformation model, in at least one of the candidates, each candidate includes a motion vector of three control points. The moving image processing apparatus according to item 107. [Item 109] The above construction module further determines a group of control point motion vectors of neighboring blocks that perform prediction by adopting an affine transformation mode in a specific scanning order from the neighboring blocks of the above current image block, and is used for putting the group of control point motion vectors of each determined neighboring block into the above first candidate list of motion vectors as one candidate, and is the moving image processing apparatus according to any one of Items 97 to 108. [Item 110] Determining a group of control point motion vectors of neighboring blocks that perform prediction by adopting an affine transformation mode in a specific scanning order from the neighboring blocks of the above current image block of the above includes determining a group of motion vectors of control points of a first neighboring block in a first scanning order in the left neighboring block of the above current image block, determining a group of motion vectors of control points of a second neighboring block in a second scanning order in the upper neighboring block of the above current image block, and putting the group of motion vectors of control points of the above first neighboring block and the group of motion vectors of control points of the above second neighboring block into the above first candidate list of motion vectors, and is the moving image processing apparatus according to Item 109. [Item 111] The above construction module further constructs motion vectors of some control points based on neighboring blocks of some control points of the above current image block, and is used for putting the motion vectors of some control points of the above current image block into the above first candidate list of motion vectors, and is the moving image processing apparatus according to any one of Items 97 to 108. [Item 112] Constructing motion vectors of some control points based on neighboring blocks of some control points of the above current image block of the above For each of the control points at the above-mentioned partial control points, sequentially scan the specific neighborhood blocks of the control points in the third scanning order, and use the motion vector of the specific neighborhood block that satisfies the preset conditions as the motion vector of the control point. The moving image processing apparatus according to item 111 including this. [Item 113] The above construction module further When the motion vectors of the above-mentioned partial control points point to different reference frames respectively, it is used to abandon putting the motion vectors of the partial control points of the current image block into the first candidate list of motion vectors. The moving image processing apparatus according to item 111 or 112. [Item 114] The above construction module further When the number of candidates in the first candidate list of motion vectors is larger than a preset numerical value, it is used to abandon putting the motion vectors of the partial control points of the current image block into the first candidate list of motion vectors. The moving image processing apparatus according to any one of items 111 or 112. [Item 115] The above construction module further Construct a second candidate list of motion vectors. Here, the candidates to be put into the second candidate list of motion vectors are the motion vectors of one image block. When it is determined to adopt the candidates in the second candidate list of motion vectors, it is used to determine the motion vector of the current image block based on the motion vector of the candidate. The moving image processing apparatus according to any one of items 97 to 109. [Item 116] Determining the motion vector of the current image block based on the above-mentioned motion vector of the candidate means Taking the candidate determined to be adopted as the motion vector of the current image block, or taking the candidate determined to be adopted as the motion vector of the current image block after scaling. The moving image processing apparatus according to item 115. [Item 117] The above-mentioned construction motion vector second candidate list is The moving image processing apparatus according to item 115, including determining candidates to be included in the above-mentioned motion vector second candidate list based on the motion vectors of a plurality of neighboring blocks of the above-mentioned current image block on the current image. [Item 118] The moving image processing apparatus according to item 117, wherein the plurality of neighboring blocks of the above-mentioned current image block on the current image include the above-mentioned preset M neighboring blocks. [Item 119] The above-mentioned construction module further Is used to put the motion vectors of the above-mentioned preset M neighboring blocks into the above-mentioned motion vector second candidate list as M candidates in the preset order, respectively. The moving image processing apparatus according to item 118, wherein the above-mentioned N neighboring blocks refer to the first N neighboring blocks determined in the above-mentioned preset order. [Item 120] The above-mentioned construction module further Is used to abandon determining candidates to be included in the above-mentioned motion vector second candidate list based on the motion vectors of one or more of the above-mentioned neighboring blocks when the motion vectors of one or more of the above-mentioned M neighboring blocks are unavailable. The moving image processing apparatus according to item 118. [Item 121] Sequentially scanning N of the above-mentioned M neighboring blocks and determining a target neighboring block based on the scanning result is Sequentially scanning the above-mentioned N neighboring blocks, when scanning reaches the neighboring block that meets the first preset condition, stopping the scanning, and determining the target neighboring block based on the first scanned neighboring block that meets the preset condition. The moving image processing apparatus according to item 95 or 120. [Item 122] Determining the target neighboring block based on the above-mentioned first scanned neighboring block that meets the preset condition is The moving image processing apparatus according to item 113, including using the neighboring block that meets the first preset condition as the target neighboring block. [Item 123] The preset condition The moving image processing apparatus according to item 113 or 122, including that the reference image of the neighboring block is the same as the reference image of the current image block. [Item 124] The construction module further When a neighboring block that meets the preset condition among the N neighboring blocks has not been scanned, it is used to perform scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks. The prediction module further, the moving image processing apparatus according to any one of items 121 to 123, which is used to predict the current image block based on the motion vector after the scaling processing. [Item 125] Predicting the current image block based on the motion vector after the scaling processing as described above The moving image processing according to item 124, including determining the reference block of the current image block based on the motion vector after the scaling processing and the reference image of the current image block. [Item 126] The specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks, the moving image processing apparatus according to item 124. [Item 127] Performing scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks as described above, and predicting the current image block based on the motion vector after the scaling processing Performing scaling processing on the motion vector of the specific neighboring block, and making the reference frame pointed to by the motion vector after the scaling processing the same as the reference image of the current image block. The moving image processing apparatus according to item 124, including setting, as the reference block of the current image block, the image block pointed to by the motion vector after the scaling process in the reference image of the current image block. [Item 128] The moving image processing apparatus according to any one of items 121 to 124, wherein when no neighboring block that meets the preset conditions is scanned among the N neighboring blocks, a default block is set as the reference block of the current image block. [Item 129] The moving image processing apparatus according to item 128, wherein the default block is an image block pointed to by a motion vector (0, 0). [Item 130] The moving image processing apparatus according to any one of items 95 to 129, wherein the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 64 or more pixels. [Item 131] The moving image processing apparatus according to item 130, wherein the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels, or 16×4 pixels or 4×16 pixels. [Item 132] The size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels, and the moving image processing apparatus further includes a processing module used to set not to perform a temporal motion vector prediction TMVP operation, the moving image processing apparatus according to item 131. [Item 133] The moving image processing apparatus further includes a processing module used to set not to perform a temporal motion vector prediction TMVP operation 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 smaller than 8 pixels, the moving image processing apparatus according to any one of items 95 to 130. [Item 134] The moving image processing apparatus according to any one of items 95 to 133, wherein the current image block is one coding unit CU. [Item 135] Determining the associated block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block is The moving image processing apparatus according to any one of items 95 to 134, including determining the associated block of the current image block in the reference image of the motion vector of the target neighboring block and the current image block. [Item 136] The moving image processing apparatus according to any one of items 85 to 135, wherein 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 pitch. [Item 137] Predicting the current image block based on the motion vector of the associated block above is When the reference image of the associated block is a specific reference image, or the reference image of the current image block is a specific reference image, it includes determining the reference block of the current image block based on the motion vector of the processed associated block and the reference image of the current image block. The moving image processing apparatus according to any one of items 95 to 136, wherein the motion vector of the processed associated block and the motion ve...
Claims
1. determining a base motion vector list, the base motion vector list including a set of bi-predictive base motion vectors, the set of bi-predictive base motion vectors including a first base motion vector and a second base motion vector; determining two motion vector deviations according to a preset deviation set, the two motion vector deviations corresponding to the first base motion vector and the second base motion vector, respectively; determining a motion vector of a current image block according to the first base motion vector, the second base motion vector, and the two motion vector deviations; performing encoding on the current image block according to the motion vector of the current image block; A video encoding method comprising:
2. 2. The video encoding method according to claim 1, wherein the two motion vector shift amounts are used to adjust the first base motion vector and the second base motion vector according to the two motion vector shift amounts in response to both the first base motion vector and the second base motion vector indicating a non-specific reference image.
3. obtaining a merging candidate list, the merging candidate list including P sets of merging motion vector candidates, where P is an integer greater than or equal to 1; The video encoding method according to claim 1 , wherein determining the base motion vector list comprises determining the base motion vector list according to the merge candidate list.
4. determining the base motion vector list according to the merge candidate list includes obtaining two sets of merge motion vector candidates in the merge candidate list to form the base motion vector list, where P is equal to or greater than 2; The video encoding method according to claim 3.
5. The video encoding method according to claim 1 , wherein the preset set of deviation amounts includes {2, 4, 8, 16, 32, 64, 128}.
6. determining a base motion vector list, the base motion vector list including a set of bi-predictive base motion vectors, the set of bi-predictive base motion vectors including a first base motion vector and a second base motion vector; determining two motion vector deviations according to a preset deviation set, the two motion vector deviations corresponding to the first base motion vector and the second base motion vector, respectively; determining a motion vector of a current image block according to the first base motion vector, the second base motion vector, and the two motion vector deviations; performing decoding on the current image block according to the motion vector of the current image block; A video decoding method comprising:
7. 7. The video decoding method of claim 6, wherein the two motion vector shift amounts are used to adjust the first base motion vector and the second base motion vector according to the two motion vector shift amounts in response to both the first base motion vector and the second base motion vector indicating a non-specific reference image.
8. obtaining a merging candidate list, the merging candidate list including P sets of merging motion vector candidates, where P is an integer greater than or equal to 1; The video decoding method according to claim 6 , wherein determining the base motion vector list comprises determining the base motion vector list according to the merge candidate list.
9. 9. The video decoding method of claim 8, wherein the step of determining the base motion vector list according to the merge candidate list includes the step of obtaining two sets of merge motion vector candidates in the merge candidate list to form the base motion vector list, corresponding to P being 2 or greater.
10. determining a base motion vector list, the base motion vector list including a set of bi-predictive base motion vectors, the set of bi-predictive base motion vectors including a first base motion vector and a second base motion vector; determining two motion vector deviations according to a preset deviation set, the two motion vector deviations corresponding to the first base motion vector and the second base motion vector, respectively; determining a motion vector of a current image block according to the first base motion vector, the second base motion vector, and the two motion vector deviations; encoding the current image block according to the motion vector of the current image block to obtain a bitstream; A method for generating a bitstream comprising:
Citation Information
Patent Citations
Image decoding apparatus and image encoding apparatus
JP2013223049A
Video encoding device and video decoding device using high precision skip encoding, and method thereof
JP2017537529A
Method for encoding and decoding motion information and device for encoding and decoding motion information
WO2019054736A1