Video decoding method, video decoding device, and bitstream generating method
Patent Information
- Application Number
- JP2024025977
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-10-30
- Filing Date
- 2024-02-22
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2039-03-13
Smart Images

Figure 0007648296000001 
Figure 0007648296000002 
Figure 0007648296000003
Abstract
Description
[Technical field]
[0001] This application claims priority to PCT application numbers PCT / CN2018 / 081652, PCT / CN2018 / 095710, PCT / CN2018 / 103693, PCT / CN2018 / 107436 and PCT / CN2018 / 112805, the contents of which are incorporated herein by reference in their entireties.
[0002] Copyright Notice The subject matter disclosed in this patent document contains material that is subject to copyright protection. Such copyright is owned by the Copyright Owner. The Copyright Owner has no objection to the facsimile reproduction by anyone of these patent documents or the patent disclosure, as it appears in the official Patent and Trademark Office records or files.
[0003] The present application relates to the field of video encoding and decoding, and in particular to a video processing method and apparatus. [Background technology]
[0004] Currently, all major video coding standards adopt block-based motion compensation technology in the inter-frame prediction part, and its main principle is to search for the most similar block in the already coded image for the current image block, and this process is called motion compensation. For example, for a frame image, it is first divided into coding tree units (CTUs) of the same size, for example, 64×64 or 128×128 in size. Each CTU can be further divided into square or rectangular coding units (CUs). Each CU searches for the most similar block in a reference frame (usually a reconstructed frame in the vicinity of the time domain of the current frame) as the prediction block of the current CU. The relative displacement between the current block (i.e., the current CU) and the similar block (i.e., the prediction block of the current CU) is called the motion vector (MV). The process of searching for the most similar block in the reference frame as the prediction block of the current block is motion compensation.
[0005] In the prior art, the motion vector candidate list of the current CU is usually constructed in two ways, and the motion vector candidate list is also called merge candidate list. The motion vector candidate list includes motion vector candidates in the spatial domain, which usually incorporates the motion vectors (or motion information) of the coded 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, and temporal motion vector prediction (TMVP) utilizes the motion vectors (or motion information) of the CUs (i.e., the same CUs) at the corresponding positions in the coded images in the vicinity of the current CU. From the merge candidate list, the most suitable motion vector candidate is selected as the motion vector of the current CU, and the predicted block of the current CU is determined according to the motion vector of the current CU.
[0006] Advanced / Alternative temporal motion vector prediction (ATMVP) is a motion vector prediction mechanism. The basic idea of ATMVP technology is to perform motion compensation by obtaining motion information of multiple sub-blocks in the current CU. ATMVP technology introduces motion information of multiple sub-blocks in the current CU as candidates in constructing a candidate list (e.g., merge candidate list or AMVP (Advanced Motion Vector Prediction) candidate list). The realization of ATMVP technology is 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 vector of the neighboring image block 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 block in 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 vector of the corresponding block in the reference frame of each sub-block.
[0007] In step 1 of the current ATMVP technology, the process of determining the time vector by scanning the motion vector candidate list of the current CU or the motion vectors of the neighboring image blocks of the current CU has room for improvement. 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. If certain pre-setting conditions are met, the size of the sub-CU is set to 8×8. There are some issues with setting the size of the sub-CU, such as not matching the current motion information storage granularity (8×8). In ATMVP and TMVP technologies, there are redundant operations in some situations, and the process of building the list of motion vector candidates has room for improvement. Summary of the Invention
[0008] The present application provides a video processing method and apparatus that can reduce the complexity of the ATMVP technology while maintaining the performance gains of the conventional ATMVP technology.
[0009] A first aspect provides a moving image processing method, the method comprising: Sequentially scanning N neighboring blocks, which are smaller than M, among the M predetermined 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 according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block; Dividing the current image block and the associated block into a plurality of sub-image blocks in the same manner, each sub-image block in the current image block having a one-to-one correspondence with each sub-image block in the associated block; and respectively predicting corresponding sub-image blocks in the current image block based on the motion vectors of each sub-image block in the associated block.
[0010] In the solution provided by the present application, in the process of obtaining a reference motion vector of a current image block, only N (N is smaller than M) motion vector candidates among the already obtained M motion vector candidates are sequentially scanned, and the number of scanning times for the motion vector candidates in the process of obtaining a reference motion vector of a current image block can be reduced compared with the prior art. It should be understood that the solution provided by the present application can be applied to step 1 of the prior art ATMVP technology to simplify redundant operations therein.
[0011] A second aspect provides a moving image processing method, the method comprising: determining M neighboring blocks of the current image block according to the M candidates in the second motion vector candidate list of the current image block; Sequentially scanning N neighboring blocks, which is smaller than M, among the M neighboring blocks, and determining a target neighboring block based on the scanning result; determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block; determining a specific candidate in a first motion vector candidate list for the current image block according to a related block of the current image block; If 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 manner, and each sub-image block in the current image block corresponds to each sub-image block in the related block one-to-one; and respectively predicting corresponding sub-image blocks in the current image block based on the motion vectors of each sub-image block in the associated block.
[0012] A third aspect provides a moving image processing device, the device comprising: a construction module for sequentially scanning N neighboring blocks, which is smaller than M, of a preset M neighboring blocks of a current image block, and determining a target neighboring block according to the scanning result; determining an associated block of the current image block according to a motion vector of the target neighboring block, the current image block, and a reference image of the current image block; and dividing the current image block and the associated block into a plurality of sub-image blocks in the same manner, such that each sub-image block in the current image block corresponds one-to-one with each sub-image block in the associated block; a prediction module used for respectively predicting corresponding sub-image blocks in the current image block based on the motion vector of each sub-image block in the associated block.
[0013] A fourth aspect provides a moving image processing device, the device comprising: a construction module used for determining M neighboring blocks of a current image block according to M candidates in a second motion vector candidate list of the current image block; sequentially scanning N neighboring blocks, which is less than M, among the M neighboring blocks, and determining a target neighboring block according to the scanning result; determining an associated block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block; determining a specific candidate in a first motion vector candidate list of the current image block according to the associated block of the current image block; and, if it is determined to use the specific candidate, dividing the current image block and the associated block into a plurality of sub-image blocks in the same manner, and each sub-image block in the current image block corresponds one-to-one to each sub-image block of the associated block; a prediction module used for respectively predicting corresponding sub-image blocks in the current image block based on the motion vector of each sub-image block in the associated block.
[0014] A fifth aspect provides an apparatus for processing a moving image, the apparatus comprising a memory and a processor, the memory adapted to store instructions and the processor adapted to execute instructions stored in the memory, and by executing instructions stored in the memory, the processor adapted to perform a method of the first aspect or any possible embodiment of the first aspect.
[0015] A sixth aspect provides an apparatus for processing moving images, the apparatus comprising a memory and a processor, the memory adapted to store instructions and the processor adapted to execute instructions stored in the memory, and by executing instructions stored in the memory, the processor adapted to perform a method of the second aspect or any possible embodiment of the second aspect.
[0016] A seventh aspect provides a computer storage medium having stored thereon a computer program which, when executed by a computer, causes the computer to perform a method of the first aspect or any possible embodiment of the first aspect.
[0017] An eighth aspect provides a computer storage medium having stored thereon a computer program which, when executed by a computer, causes the computer to perform a method of the second aspect or any possible embodiment of the second aspect.
[0018] A ninth aspect provides a computer program product comprising instructions which, when executed by a computer, cause the computer to perform a method of the first aspect or any possible embodiment of the first aspect.
[0019] A tenth aspect provides a computer program product comprising instructions which, when executed by a computer, cause the computer to perform a method of the second aspect or any possible embodiment of the second aspect.
[0020] An eleventh aspect provides a moving image processing method, the method comprising: determining a base motion vector list including at least one bi-predictive base motion vector group including a first base motion vector and a second base motion vector; determining two motion vector offset amounts corresponding to the first base motion vector and the second base motion vector from a preset offset amount set; determining a motion vector of a current image block according to the first base motion vector, the second base motion vector, and the deviation amount of the two motion vectors; predicting the current image block based on the motion vector of the current image block.
[0021] A twelfth aspect provides a moving image processing method, the method comprising: determining a base motion vector list including a set of base motion vectors; The method further comprises abandoning determining the motion vector of the current image block based on the base motion vector group and a motion vector deviation amount when at least one base motion vector in the base motion vector group points to a specific reference image.
[0022] A thirteenth aspect provides a moving image processing device, the device comprising: a construction module used for determining a base motion vector list including at least one bi-prediction base motion vector group including a first base motion vector and a second base motion vector; determining two motion vector offset amounts corresponding to the first base motion vector and the second base motion vector from a preset offset amount set; and 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 offset amounts; a prediction module adapted to predict the current image block based on the motion vector of the current image block.
[0023] A fourteenth aspect provides a moving image processing device, the device comprising: a determining module used for determining a base motion vector list including a set of base motion vectors; The base motion vector group includes a processing module used to abandon 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 15th aspect provides a motion image processing apparatus, the apparatus comprising a memory and a processor, the memory being adapted to store instructions and the processor being adapted to execute instructions stored in the memory, and by executing instructions stored in the memory, the processor being adapted to perform a method in the 11th aspect or any possible embodiment of the 11th aspect.
[0025] A 16th aspect provides an apparatus for processing a moving image, the apparatus comprising a memory and a processor, the memory being adapted to store instructions and the processor being adapted to execute instructions stored in the memory, and by executing instructions stored in the memory, the processor being adapted to perform a method of the 12th aspect or any possible embodiment of the 12th aspect.
[0026] A seventeenth aspect provides a computer storage medium having stored thereon a computer program which, when executed by a computer, causes the computer to perform a method of the eleventh aspect or any possible embodiment of the eleventh aspect.
[0027] An eighteenth aspect provides a computer storage medium having stored thereon a computer program which, when executed by a computer, causes the computer to perform a method of the twelfth aspect or any possible embodiment of the twelfth aspect.
[0028] A nineteenth aspect provides a computer program product comprising instructions which, when executed by a computer, cause the computer to perform a method of the eleventh aspect or any possible embodiment of the eleventh aspect.
[0029] A twentieth aspect provides a computer program product comprising instructions which, when executed by a computer, cause the computer to perform a method of the twelfth aspect or any possible embodiment of the twelfth aspect. [Brief description of the drawings]
[0030] [Figure 1] 1 is a schematic flow chart of a video processing method provided by an embodiment of the present application. [Diagram 2] FIG. 2 is a schematic diagram of obtaining motion vector candidates for a current block according to neighboring blocks of the current image block; [Diagram 3] FIG. 2 is a schematic diagram of a scaling process performed on candidate motion vectors; [Figure 4] 4 is another schematic flow chart of a video processing method provided by an embodiment of the present application; [Diagram 5] 1 is a schematic block diagram of a video processing device provided by an embodiment of the present application; [Figure 6] FIG. 2 is another schematic block diagram of a video processing device provided by an embodiment of the present application; [Figure 7] 1 is a schematic flow chart of a video processing method provided by an embodiment of the present application. [Figure 8] 4 is another schematic flow chart of a video processing method provided by an embodiment of the present application; [Figure 9] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; [Figure 10] FIG. 2 is a schematic block diagram of a further video processing device provided by an embodiment of the present application; [Figure 11] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; [Figure 12] FIG. 13 is a schematic diagram of obtaining candidates for a first candidate motion vector list. [Figure 13] FIG. 11 is a further schematic diagram of constructing candidates for the motion vector first candidate list; [Figure 14] 1 is a schematic flow chart of a video processing method provided by an embodiment of the present application. [Figure 15] 1 is a schematic flow chart of a video processing method provided by an embodiment of the present application. [Figure 16] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; [Figure 17] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; [Figure 18]4 is another schematic flow chart of a video processing method provided by an embodiment of the present application; [Figure 19] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; [Figure 20] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0031] The technical solutions in the embodiments of the present application are described below with reference to the drawings.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terms used in the specification of this application herein are for the purpose of describing specific examples only and are not intended to be limiting of this application.
[0033] In the coding and decoding of video images, a prediction step is used to reduce redundant information in an image. A prediction block means a basic unit for prediction in an image of one frame, and in some standards, this prediction block is also called a prediction unit (PU). Before coding / compressing an image of one frame, the image is divided into a number of image blocks, and each image block in the plurality of image blocks can be further divided into a number of image blocks, and an analogy can be made based on this. In different coding methods, the number of divided layers may be different, and the operation methods in charge are also different. In different coding standards, the names of image blocks on the same layer may be different. For example, in some video standards, each image block in the plurality of image blocks into which an image of one frame is divided for the first time is called a coding tree unit (CTU), and each coding tree unit may include one coding unit (CU), or may be divided into a number of coding units again. One coding unit can be divided into one, two, four, or other number of prediction units according to the prediction method. In some video standards, the coding tree unit is also called the Largest Coding Unit (LCU).
[0034] Prediction refers to searching for image data similar to the predicted block, which is also called the reference block of the predicted block. The difference between the predicted block and the reference block of the predicted block is encoded / compressed to reduce redundant information in encoding / compression. Here, the difference between the predicted block and the reference block may be a residual obtained by subtracting the corresponding pixel value of the reference block from the predicted block. Prediction includes intraframe prediction and interframe prediction. Intraframe prediction refers to searching for the reference block of the predicted block in the frame in which the predicted block is located, and interframe prediction refers to searching for the reference block of the predicted block in a frame other than the frame in which the predicted block is located.
[0035] In some conventional video standards, a prediction unit is the smallest unit in an image, and the prediction unit is not subsequently divided into multiple image blocks. In the following, "image block" or "current image block" refers to one prediction unit (or one coding unit), and one image block can be subsequently divided into multiple 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 according to the motion vector candidate selected in the motion vector candidate list. The motion vector candidate list has several modes. The following provides an example to describe several modes of the motion vector candidate list.
[0037] In the first mode, as a first example, after constructing a motion vector candidate list, the encoding side can complete the encoding of the current image block through the following steps:
[0038] 1) Select an optimal motion vector (denoted as MV1) from the motion vector candidate list, set the selected MV1 as the motion vector of the current image block, and obtain the index of the MV1 in the motion vector candidate list.
[0039] 2) Determine a predicted image block of the current image block from a reference image (i.e., reference frame) according to the motion vector MV1 of the current image block, that is, determine the position of the predicted image block of the current image block in the reference frame.
[0040] 3) Obtaining the residual between the current image block and the predicted image block.
[0041] 4) The motion vector MV1 of the current image block is sent to the decoding side, along with its index in the motion vector candidate list and the residual obtained in step 3).
[0042] As an example, on the decoding side, the current image block can be decoded in the following steps.
[0043] 1) Receive a residual and an index in a motion vector candidate list of a motion vector of a current image block from an encoding side.
[0044] 2) Obtain a motion vector candidate list according to the method of the embodiment of the present application, and the motion vector candidate list obtained on the decoding side is consistent with 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) Obtain a predicted image block of the current image block according to the motion vector MV1, and obtain the current image block by decoding together with the residual.
[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 standards, the first mode is also called Merge mode.
[0048] In the second mode, different from the first mode, the encoding side selects the most suitable motion vector MV1 from the motion vector candidate list, and then performs motion search using the MV1 as the search starting point, and the displacement between the final searched position and the search starting point is recorded as a motion vector difference (MVD). Then, based on the motion vector MV1+MVD of the current image block, the prediction image block of the current image block is determined from the reference image. The encoding side also transmits the MVD to the decoding side. In some standards, the second mode is also called AMVP mode (i.e., normal interframe prediction mode).
[0049] The construction methods of the motion vector candidate lists in different modes may be the same or different, and the motion vector candidate lists constructed in the same manner may be applied to only one of the modes or to different construction modes, and are not limited thereto.
[0050] In this solution, two constructional motion vector candidate lists are provided, and for convenience of description, the two constructional motion vector candidate lists are hereinafter referred to as motion vector first candidate list and motion vector second candidate list. One difference between these two lists is that at least one candidate in the motion vector first candidate list includes a motion vector of a sub-image block, and each candidate in the motion vector second candidate list includes a motion vector of an image block. As explained above, the image block and the current image block here are the same type of concept, both of which refer to one prediction unit (or one coding unit), and the sub-image block refers to a number of sub-image blocks divided based on the image block. When predicting using a candidate in the motion vector first candidate list, a reference block of the current image block is determined based on the candidate, and then a residual between the image block and the reference block is calculated. When making prediction using a candidate in the second motion vector candidate list, if the candidate used is a motion vector of a sub-image block, determine a reference block for each sub-image block in the current image block based on the candidate, then calculate the residual between each sub-image block in the current image block and its reference block, and splice the residual of each sub-image block into the residual of the current image block.
[0051] Here, when determining candidates in the first motion vector candidate list and / or the second motion vector candidate list, one of the candidates can be determined according to the ATMVP technique. In one example, when constructing the first motion vector candidate list, the motion vector determined according to the ATMVP technique can be listed as the first candidate. In one example, when constructing the second motion vector candidate list, candidates are listed in the second motion vector candidate list according to the motion vectors of a preset number of spatial domain neighboring blocks at a preset position of the current image block, and then the motion vector determined according to the ATMVP technique is listed as a candidate; of course, the addition order of the candidates in the two candidate lists can be other orders, but is not limited here.
[0052] Hereinafter, an example will be given to explain how to determine one of the candidates based on the ATMVP technique according to the construction method of the second candidate motion vector list.
[0053] In the description of the construction method of the second motion vector candidate list, a motion vector will be described here for ease of understanding. 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 image block and the displacement in the image pointed to by the motion vector. For an encoded / decoded image block, the concept of the 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 an image block used to calculate the residual of the image block.
[0054] 1 is a schematic flow chart of a video processing method provided by an embodiment of the present application. The method includes the following steps:
[0055] S110, determining M motion vector candidates for entering into a motion vector second candidate list for the current image block.
[0056] The current image block is the image block to be coded (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 motion vector second candidate list of the current image block may be a Merge candidate list or an AMVP candidate list. For example, the motion vector second candidate list may be a normal motion vector candidate list in the Merge candidate list. It should be understood that the motion vector second candidate list may have another name.
[0058] The M motion vector candidates may be determined based on the motion vectors of M neighboring blocks in a current frame of the current image block, where the neighboring blocks may be image blocks adjacent to or having a certain position pitch with the position of the current image block in the current frame, and the M neighboring blocks are image blocks that have been coded (or decoded) in the current frame.
[0059] For example, as shown in Fig. 2, the M neighboring blocks of the current image block are image blocks located at four positions A1 (left) → B1 (top) → B0 (top right) → A0 (bottom left) around the current image block as shown in Fig. 2. M (i.e. M is equal to 4) motion vector candidates of the current image block are determined based on the motion vectors of the image blocks at these four positions.
[0060] In addition, if an unobtainable neighboring block appears among the M neighboring blocks, or if a neighboring block using an intraframe coding mode appears among the M neighboring blocks, the motion vector of the unobtainable neighboring block or the neighboring block using the intraframe coding mode cannot be obtained, and the motion vector of the unobtainable neighboring block is not selected as a motion vector candidate, and the unobtainable motion vector is not included in the second motion vector candidate list of the current image block.
[0061] As one possible embodiment, after completing step S110, the M motion vector candidates have already been put into the motion vector second candidate list, and in step S120, the motion vector second candidate list can be scanned directly.
[0062] S120, sequentially scanning N motion vector candidates among the M motion vector candidates, and determining a reference motion vector according to the scanning result, where N is less than M, where M and N are both natural numbers.
[0063] Regardless of whether all of the M motion vector candidates are put into the second motion vector candidate list or whether only some of the M motion vector candidates are put into the second motion vector candidate list because some motion vectors among the M motion vector candidates become unobtainable, N motion vector candidates out of the M motion vector candidates are scanned in a fixed sequential manner. Fixed sequential scanning of N motion vector candidates out of the M motion vector candidates may refer to fixed scanning of motion vector candidates that have already been put into the motion vector candidate list out of the N motion vector candidates, or may refer to fixed scanning of N motion vector candidates that have already been put into the motion vector candidate list out of the M motion vector candidates.
[0064] The process of determining the reference motion vector based on the scanning result of the N motion vector candidates may be a process of sequentially judging the N motion vector candidates based on a preset condition, and determining the reference motion vector based on the judgment result.
[0065] As an example, the preset conditions include: the image block is obtainable or does not adopt an intraframe predictive coding mode, 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 a reference image that is closest in time to the image in which the current image block is located, or the reference image of the current image block is a reference image that is preset on the encoding and decoding side, or the reference image of the current image block is a reference image specified in the video parameter set, sequence header, sequence parameter set, image header, image parameter set, or slice header.
[0067] For example, the reference image of the current image block is a collocated frame of the current image block, and the collocated frame is a frame for obtaining and predicting the motion information set in the slice level information header. In some application scenarios, the collocated frame is also called a collocated picture.
[0068] It should be understood that, depending on future technological evolution, this pre-set condition may be given other different definitions, and the corresponding solutions also fall within the scope of protection of the present application.
[0069] The process of determining a reference motion vector based on the scanning result of N motion vector candidates will now be described in detail.
[0070] In step S120, only N motion vectors among the M motion vector candidates obtained in step S110 are scanned, thus reducing the number of scans.
[0071] Optionally, in step S120, the previous 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, a part of the motion vector candidates that are already included in the second motion vector candidate list are sequentially scanned.
[0075] S130, determining a motion vector candidate to be subsequently put into the motion vector second candidate list according to the reference motion vector, the current image block and the reference image of the current image block.
[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+1th motion vector candidates to be subsequently added to the second motion vector candidate list in S130, other motion vector candidates to be subsequently added to the second motion vector candidate list are determined by other methods, not limited herein.
[0077] After completing the construction of the second candidate list of motion vectors, as shown in FIG. 1, the method further includes step S140 of determining a motion vector of a current image block according to the second candidate list of motion vectors obtained in step S130.
[0078] It should be understood that the solution provided in this application can be applied to the ATMVP technique. In step 1 of the conventional ATMVP technique, the temporal vector of the current image block is obtained by scanning all spatial motion vector candidates currently already put into the motion vector second candidate list. For example, since the motion vector second candidate list generally takes in four spatial motion vector candidates, it may be necessary to scan four motion vector candidates to obtain the temporal vector of the image block.
[0079] Meanwhile, in the embodiment of the present application, in the process of obtaining a reference motion vector of a current image block, only N (N is smaller than M) motion vector candidates among the M motion vector candidates already obtained are sequentially scanned, so that the number of scans of the motion vector candidates in the process of obtaining a reference motion vector of a current image block can be reduced compared with the prior art. It should be understood that the solution provided by the present application can be applied to step 1 of the prior art ATMVP technology to simplify redundant operations therein.
[0080] The applicant selected the official common test sequence as the test sequence on the latest reference software VTM-2.0 for next-generation video coding (Versatile Video Coding), and conducted tests on the solution provided in this application in the test configurations of RA configuration and LDB configuration. The test results show that the performance gains of ATMVP technology can be maintained after reducing the number of scans.
[0081] 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.
[0082] The motion vector second candidate list formed by the construction solution 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 can be the encoding side or the decoding side.
[0083] As an example, the second candidate list of motion vectors formed by the construction solution provided in this application can be applied to the first mode above (eg, Merge mode).
[0084] Optionally, in this embodiment, in step S110, based on the motion vectors of four neighboring blocks in the current frame of the current image block, determine four motion vector candidates to be put into the motion vector second candidate list of the current image block, i.e., M is equal to 4. In step S120, scan N motion vector candidates among the four motion vector candidates, where N is less than 4.
[0085] For example, N is equal to 1. For example, in step S120, only the first motion vector candidate in the motion vector second candidate list is scanned. Also, for example, N is equal to 2 or 3.
[0086] The method of determining the reference motion vector of the current image block based on the scanning result of the N motion vector candidates in step S120 will be described below.
[0087] In step S120, determine whether N motion vector candidates among M motion vector candidates satisfy a preset condition one by one, and determine a reference motion vector according to the determination result. Here, the definition of the preset condition is taken as an example that the reference frame indicated by the motion vector candidate is the same as the reference image of the current image block.
[0088] Optionally, in step S120, the N motion vector candidates are sequentially scanned, and when a motion vector candidate that meets the first preset condition is scanned, i.e., when a motion vector candidate whose first reference frame and the same frame of the current frame are the same is scanned, the scanning is stopped, and a reference motion vector is determined based on the scanned motion vector candidate that meets the first preset condition.
[0089] When the first motion vector candidate that meets the preset condition is scanned, the number of scans may be equal to or less than N. For example, when the first motion vector candidate that is scanned meets the preset condition, the scan is stopped and this motion vector candidate is set as the reference motion vector for the current image block.
[0090] Optionally, in step S120, when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, i.e., when the reference frames pointed to by the N motion vector candidates are all different from the same frame of the current image block, a default value is set 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 another definition.
[0092] Optionally, in step S120, when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, i.e., when the reference frames pointed to by the N motion vector candidates are all different from the same frame of the current image block, a scaling process is performed on a specific motion vector candidate in the second motion vector candidate list, and a reference motion vector is determined based on the specific motion vector candidate after the scaling process.
[0093] The specific motion vector candidate may be the first or last motion vector obtained in scanning order among the N motion vector candidates.
[0094] The specific motion vector candidate may also be a motion vector obtained in another scanning order 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, a scaling process is performed on a specific motion vector candidate in the motion vector second candidate list, and a reference motion vector is determined based on the specific motion vector candidate after the scaling process, which includes performing a scaling process on a specific motion vector candidate in the motion vector second 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 setting the specific motion vector candidate after the scaling process as the reference motion vector.
[0096] As shown in Figure 3, curr_pic represents the image in which 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 a specific motion vector candidate. In one embodiment, the scale of the specific motion vector is determined based on the time distance between the reference picture neigh_ref_pic pointed to by the specific motion vector candidate and the picture curr_pic in which the image block corresponding to the specific motion vector is located, and the time distance between the reference picture col_pic of the current image block and the picture curr_pic in which the current image block is located.
[0097] When the difference in the degree of motion between image frames is not large and there is a lot of motion between the current frame and its corresponding frame, if the motion vector (0,0) is used as the basis for positioning the corresponding block of the current block, the motion between frames is not taken into consideration and it is assumed that the absolute coordinates of the current block in the corresponding frame have not changed. However, it should be understood that in reality, there is a very high probability that the coordinates of the current block in the corresponding frame will differ from its coordinates in the current frame, resulting in large variations.
[0098] In the embodiment of the present application, if the motion vector candidate whose reference frame and the same frame of the current frame are not scanned among the N motion vector candidates, one of the N motion vector candidates is scaled so that its reference frame and the same frame of the current frame are the same, and then the scaled motion vector candidate is taken as the motion vector of the current image block, thus improving the accuracy of the motion vector of the current image block.
[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 whose reference frame and the same frame of the current image block are closest in distance in the time domain.
[0100] Among the N motion vector candidates, the motion vector candidate with the closest distance between the reference frame and the same frame of the current frame is selected and a scaling process is performed on it, thereby reducing the time required for the scaling process and 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 larger 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 the motion vector candidate to be scanned.
[0103] Optionally, as an embodiment, N is equal to 1, and in step S120, obtain the reference motion vector of the current image block by scanning one motion vector candidate in the motion vector second candidate list. If the reference frame indicated by the scanned motion vector candidate is different from the same frame of the current frame where the current image block is located, perform scaling on the motion vector candidate, so that the reference frame of the scaled motion vector candidate is the same as the same frame of the current frame, and the motion vector candidate after the scaling is taken 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 same frame of the current frame, the motion vector candidate is taken as the motion vector of the current image block.
[0104] In this embodiment, the motion vector of the current image block is obtained by scanning one motion vector candidate in the motion vector candidate list, and the number of scanning motion vector candidates in the process of obtaining the motion vector of the current image block is effectively reduced, and when the reference frame of the scanned motion vector candidate is different from the same frame of the current frame, the motion vector candidate is scaled to make its reference frame and the same frame of the current frame, and then the motion vector candidate after the scaling process is taken as the motion vector of the current image block, thus improving the accuracy of the motion vector of the current image block.Therefore, compared with the prior art, the solution provided by the embodiment of the present application not only simplifies the process of determining the motion vector of the current image block, but also improves the accuracy of the motion vector of the current image block.
[0105] It should be understood that when the definition of the preset condition changes, the process of performing a scaling process on a specific motion vector candidate in the second motion vector candidate list also changes correspondingly, i.e., it is necessary to ensure that the specific motion vector candidate after the scaling process satisfies the preset condition.
[0106] The process of determining the motion vector candidate to be subsequently put into the motion vector second candidate list according to the reference motion vector, the current image block and the reference image of the current image block in step S130 will be described below.
[0107] Optionally, in one embodiment, determining a motion vector candidate to be subsequently included in the motion vector second candidate list based on the reference motion vector, the current image block and a reference image of the current image block includes dividing the current image block into a plurality of sub-image blocks, determining an associated block of the sub-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 motion vector second candidate list based on the motion vector of the associated block.
[0108] In one embodiment, the motion vector of an associated block of each sub-image block in the current image block is entered as a candidate into a second candidate motion vector list, and when predicting using the candidate, the sub-image block is predicted based on the motion vector of the associated block of each sub-image block in the current image block.
[0109] In one embodiment, the representative motion vector of the associated block of the current image block is put into the motion vector second candidate list as a candidate, and the candidate is marked as being determined according to the ATMVP technique. When predicting using the candidate, the associated block of the current image block is determined according to 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 the corresponding sub-image block in the current image block is predicted according to the motion vector of each sub-image block in the associated block. Optionally, if the associated block has a sub-image block whose motion vector is not obtainable, the representative motion vector of the associated block is used to replace the unobtainable motion vector, and the corresponding sub-image block in the current image block is predicted. Optionally, if the associated block has a sub-image block whose motion vector is not obtainable and all the representative motion vectors of the associated blocks are not obtainable, the candidate determined according to the ATMVP technique is abandoned from being put into the motion vector second candidate list. In one example, if a sub-image block in the associated block is not obtainable or uses an intraframe coding mode, it is determined that a sub-image block in the associated block has a motion vector that is not obtainable.
[0110] Optionally, the representative motion vector of the associated block of the current image block may refer to the motion vector at the center position of the associated block, or may refer to the motion vector representative of other associated blocks, and is not limited here.
[0111] In some video encoding and decoding standards, the associated blocks may be called collocated blocks or corresponding blocks.
[0112] For example, the current image block is a 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 associated block of the sub-image block are fixed to 64 pixels or more. Optionally, the size of the sub-image block and / or the size of the associated block of the sub-image block are both fixed to 8×8 pixels.
[0113] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, when the encoding side encodes a current image block, it calculates the average block size of each sub-image block in a CU during encoding of a previous encoded image block in the same temporal layer in ATMVP mode, and if the average block size is greater than a threshold, the size of the sub-image block of the current image block is set to 8×8, otherwise it uses the default value of 4×4. Currently, in the next generation video encoding standard (Versatile Video Coding, VVC), the motion vector is stored with a size of 8×8. It should be understood that if the size of the sub-image block is set to 4×4, the size of the motion vector of the sub-image block (also referred to as 4×4) does not match the storage granularity of the motion vector in the current standard. In addition, in the current ATMVP technology, when encoding a current image block, it is further necessary to store the information of the size of the sub-image block of the previous encoded image block in the same temporal layer.
[0114] 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, while there is no need to store information on the size of the sub-image block of the previous encoded image block, thereby saving storage space.
[0115] Currently, the TMVP technique obtains a time-domain motion vector candidate for the current CU by scaling the MV of the CU in the coded image near the lower right corner or center position of the current CU. That is, the TMVP obtains the MVP by full searching two fixed-position coding blocks in the reference image, in the order of TB→TC, and the first MV obtained in the full search is directly used as the MVP of the TMVP. In the embodiment of the present application, the size of the sub-image block in the ATMVP technique is set to 8×8, which uses one MV in the existing merge candidate list in each implementation of the present application to locate the relevant block, and the MV of the located relevant block is used as the MVP of the ATMVP.
[0116] In some versions of the video standard VVC, constructing a merge list involves constructing a merge candidate list for ATMVP first and then constructing a merge candidate list for TMVP. In other versions of the video standard VVC, constructing a merge candidate list for TMVP is done in the process of constructing a merge list, and constructing a merge candidate list for ATMVP is done in the process of constructing an affine merge list. Although ATMVP and TMVP each construct two different lists, it is not necessary to add the same or the same group of MVs to the two merge candidate lists. If the width and height of the current CU are both 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 time-domain candidate motion information for the current CU.
[0117] In some embodiments of the present application, if the width and height of the current CU are both equal to 8, TMVP operation is set not to be performed. That is, if the size of a sub-image block and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operation is set not to be performed. This can avoid including the same or the same group of MVs in the merge candidate lists respectively constructed by ATMVP and TMVP, and skip some redundant operations, effectively saving the encoding and decoding time and improving the encoding efficiency.
[0118] In some embodiments of the present application, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed. That is, if at least one of the width and height of a sub-image block and / or an associated block of the sub-image block is smaller than 8 pixels, the TMVP operation is set not to be performed. This is because the hardware design of the coder and / or decoder requires consistency in the time to complete encoding or decoding in a processing area of the same size as much as possible.
[0119] However, for a region containing many small blocks, the tact time required for encoding or decoding is much longer than other regions. In addition, if the width and height of a sub-image block and / or its associated block are both less than 8 pixels, the TMVP operation may be set not to be performed. Therefore, saving the tact time for encoding or decoding a small block is of great significance for hardware parallel processing. In addition, current encoding techniques are increasingly using time domain correlation, and many time domain prediction techniques, such as ATMVP technology, have been adopted. Therefore, for small blocks, the impact of skipping the TMVP operation on performance is negligible, which can effectively save the encoding and decoding time and improve the encoding efficiency.
[0120] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated 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 motion vector second candidate list based on the reference motion vector, the current image block and a reference image of the current image block includes determining an associated 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 motion vector second candidate list based on the motion vector of the associated block.
[0122] In the encoding / decoding technology, a previously encoded / decoded image is generally used as a reference image for the current encoding / decoding target. In some embodiments, a reference image can be further constructed to improve the similarity between the reference image and the current encoding / decoding target image.
[0123] For example, there are certain coding / decoding scenes in video content where the background hardly changes and only the foreground of the video changes or moves. For example, video monitoring belongs to such a scene. In a video monitoring scene, a surveillance camera is usually fixed or moves slowly, and the background is considered to be almost unchanged. In contrast, objects such as people and cars captured by a video surveillance 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 multiple image blocks, and any image block may be 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 image to be currently coded / decoded can refer to the specific reference image to reduce residual information of inter-frame prediction, thereby improving coding / decoding efficiency.
[0124] The above is a specific example of a specific reference image. In some embodiments, the specific reference image has at least one of the following properties: a composite reference, a long-term reference image, and a non-output image. Here, the non-output image refers to an image that is not output and 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 reference frame is also called a composite 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 a structural frame, a long-term reference image, a non-output image, etc. For example, the non-specific reference image may include a reference image other than a structural frame, or may include a reference image other than a long-term reference image, or may include a reference image other than a non-output image, or may include a reference image other than a constructed long-term reference image, or may include a reference image other than a non-output structural frame, or may include a reference image other than a non-output long-term reference image, etc.
[0126] In some embodiments, when a picture in a video sequence can be used as a reference picture, a distinction can be made between long-term and short-term reference pictures, where the short-term reference picture is a concept corresponding to the long-term reference picture. The short-term reference picture resides in the reference picture buffer for a certain period of time, and after some entry and exit operations in the reference picture buffer of the decoded reference picture behind the short-term reference picture, the short-term reference picture is moved out of the buffer. The reference picture buffer may also be called a reference picture list cache, a reference picture list, a reference frame list cache, a reference frame list, etc., and are collectively referred to herein as a reference picture buffer.
[0127] The long-term reference picture (or a portion of the data in the long-term reference picture) can always reside in the reference picture buffer, and the long-term reference picture (or a portion of the data in the long-term reference picture) is not affected by the entry and exit movement of the decoded reference picture into and out of the reference picture buffer, and the long-term reference picture (or a portion of the data in the long-term reference picture) is moved out of the reference picture buffer only when an operation to send an update command is performed on the decoding side.
[0128] The short-term reference picture and the long-term reference picture may be called differently in different standards. For example, in standards such as H.264 / advanced video coding (AVC) or H.265 / HEVC, the short-term reference picture is called a short-term reference frame, and the long-term reference picture is called a long-term reference frame. 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 picture is called a background picture. In standards such as VP8 and VP9, the long-term reference picture is called a golden frame.
[0129] In addition, although specific terms are used in the embodiments of the present application, this does not mean that they must be applied to a specific scene. For example, calling a long-term reference image a long-term reference frame does not mean that it must be applied to a technology corresponding to a standard such as H.264 / AVC or H.265 / HEVC.
[0130] Such a long-term reference image may be obtained from an image block structure extracted from a number of previously decoded images, or may be obtained by updating an existing reference frame (e.g., a pre-stored reference frame) using a number of previously decoded images. Of course, the structural specific reference image may be a short-term reference image, or the long-term reference image may not be a structural reference image.
[0131] In the above embodiment, the specific reference image may include a long-term reference image, and the non-specific reference image may include a short-term reference image.
[0132] Optionally, the type of reference frame may be identified in the codestream structure by a special field.
[0133] Optionally, if the reference image is determined to be a long-term reference image, the reference image is determined to be a specific reference image, or if the reference image is determined to be a non-output frame, the reference image is determined to be a specific reference image, or if the reference image is determined to be a structural frame, the reference image is determined to be a specific reference image, or if the reference image is determined to be a non-output frame and further the reference image is determined to be a structural frame, the reference image is determined to be a specific reference image.
[0134] Optionally, each kind of reference picture may have its own identifier, in which case the decoding side can determine whether a reference picture is a specific reference picture according to the identifier of the reference picture.
[0135] In some embodiments, a reference image is determined to be a particular reference image if the reference image is determined to have a long-term reference image identifier.
[0136] In some embodiments, if a reference image is determined to have a non-output identifier, then the reference image is determined to be a particular reference image.
[0137] In some embodiments, a reference image is determined to be a particular reference image if the reference image is determined to have a structural frame identifier.
[0138] In some embodiments, when the reference image is determined to have at least two of the following three identifiers: a long-term reference image identifier, a non-output identifier, and a structural frame or synthetic reference frame identifier, the reference image is determined to be a specific reference image. For example, when the reference image is determined to have a non-output identifier and the reference image is determined to have a structural frame identifier, the reference image is determined to be a specific reference image.
[0139] Specifically, an image may have an identifier indicating whether it is an output frame, and when an image is indicated not to be output, it indicates that the frame is a reference image, and further determines whether the frame has an identifier of a structural frame, and if so, determines that the reference image is a specific reference image.When an image is indicated to be output, it can be directly determined that the frame is not a specific reference image without determining whether it is a structural frame.Or, when an image is indicated not to be output but has an identifier indicating that it is not a structural frame, it can be determined that the frame is not a specific reference image.
[0140] Optionally, determining that the reference picture is a specific reference picture when determining that the reference picture satisfies one of the following conditions by analyzing parameters from a picture header, a picture parameter set (PPS), and a slice header: the reference image is a long-term reference image; the reference image is a structural reference image; the reference image is a non-output image; If the reference image is a non-output image, it is further determined that the reference image is a structural reference image.
[0141] In some embodiments of the embodiment of the present application, in the process of determining the motion vector of a current image block, the motion vector of the image block is related to using the motion vector of an image block on another image. For convenience of explanation, the image block is called a first image block, and the image block on the other image to be used is called the time-domain reference block or associated block of the first image block. It can be understood that the first image block and the time-domain reference block (or associated 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 using the motion vector of the time-domain reference block (or associated block), the motion vector of the time-domain reference block (or associated block) may need to be scaled. For convenience of explanation, the term "associated block" is used uniformly in this specification.
[0142] For example, when the ATMVP technology is applied to construct an AMVP candidate list, when determining the motion vector of the associated block of the current image block based on the ATMVP technology, the motion vector of the associated block needs to be scaled, and then the motion vector of the current image block needs to be determined based on the motion vector after scaling. In general, the scale of the motion vector of the associated block is determined based on the time distance between the reference image pointed to by the motion vector of the associated block and the image in which the associated block is located, and the time distance between the reference image of the current image block and the image in which the current image block is located.
[0143] In one example, the motion vector of the relevant block is called MV2, and the reference frame index value of the reference image that the motion vector MV2 points to is called x. Here, the reference frame index value x is the difference between the sequence number of the reference image that MV2 points to (e.g. POC) and the sequence number of the image in which the relevant 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 in which the first image block is located. Then, the scale for the motion vector MV2 is y / x. Optionally, the product of the motion vector MV2 and y / x can be the motion vector of the first image block.
[0144] However, when the motion vector MV2 of the associated block points to a specific reference picture, or when the reference picture of the first image block is a specific reference picture, scaling to the motion vector MV2 of the associated block is meaningless because the definition of the temporal distance between the specific reference picture and the picture in which the first image block is located is ambiguous.
[0145] Optionally, in this embodiment, when the motion vector of the current image block is determined based on the motion vector of the associated block, specifically, 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 motion vector of the current image block is determined based on the motion vector of the associated block after processing, in which the motion vector of the associated block after processing is the same as the motion vector of the associated block before processing.
[0146] For example, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block with a scale value of 1, or the motion vector of the related block skipping the scaling step.
[0147] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vector of the associated block, specifically, 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, determining the motion vector of the current image block based on the motion vector of the associated block is abandoned.
[0148] In some embodiments, step S120 includes performing a scaling process on a specific motion vector candidate in the motion vector second candidate list when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, and determining a reference motion vector based on the specific motion vector candidate after the scaling process. In this case, optionally, the method further includes determining a motion vector candidate to be subsequently included in the motion vector second candidate list based on the specific motion vector candidate after the processing 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, 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 relevant block after processing includes the motion vector obtained after scaling the motion vector of the relevant block with a scale value of 1, or the motion vector of the relevant block skipping the scaling step.
[0150] In some embodiments, step S120 includes performing a scaling process on a specific motion vector candidate in the motion vector second candidate list when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, and determining a reference motion vector based on the specific motion vector candidate after the scaling process. In this case, optionally, the method further includes abandoning determining a motion vector candidate to be subsequently included in the motion vector second candidate list based on the specific motion vector candidate 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.
[0151] As can be seen from the above, in the embodiment of the present application, in the process of obtaining a reference motion vector of a current image block, only N (N is smaller than M) motion vector candidates among M motion vector candidates already obtained are sequentially scanned, and the number of scannings of motion vector candidates in the process of obtaining a reference motion vector of a current image block can be reduced compared with the prior art. It should be understood that the solution provided by the present application can be applied to the prior art ATMVP technology to simplify redundant operations therein.
[0152] If no motion vector candidate among the N motion vector candidates has a reference frame and a peer frame of the current frame that are the same, a scaling process is performed on one of the N motion vector candidates so that its reference frame is the same as the peer frame of the current frame, and then this scaled motion vector candidate is set 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 is divided into sub-image blocks of size 8×8 to accommodate the storage granularity of motion vectors defined in the video standard VVC, while eliminating the need to store information about the size of the sub-blocks of the previous coded image block, thereby saving storage space.
[0154] In some embodiments of the present application, when the size of a sub-image block and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operations are set to not be performed, so that some redundant operations can be skipped, which can effectively save encoding and decoding time and improve encoding efficiency.
[0155] In some embodiments of the present application, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed. That is, if at least one of the width and height of a sub-image block and / or its associated block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the impact on performance caused by skipping the TMVP operation is negligible, so that the encoding and decoding time 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 video processing method, which includes the following steps.
[0157] S410, obtain M motion vector candidates to be put into a motion vector second candidate list of the current image block.
[0158] Step S410 corresponds to step S110 described above, and the specific description can be referred to the above description and will not be described again here.
[0159] S420, sequentially scan at least some of the M motion vector candidates, and determine a reference motion vector of the current image block according to the scanning result.
[0160] As an optional embodiment, some of the M motion vector candidates are sequentially scanned, and a reference motion vector of the current image block is determined according to the scanning result. In this embodiment, step S420 can correspond to step S120 described above, and reference is made to the above description for a detailed description.
[0161] As another optional embodiment, all the motion vector candidates among 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] It should be noted that in step S420, the specific manner of determining the reference motion vector of the current image block according to the scanning result can be referred to the relevant description in the above embodiment, and will not be described again here.
[0163] S430, divide the current image block into a plurality of sub-image blocks, where the size of the sub-image block is fixed at 64 pixels or more.
[0164] For example, the current image block is a CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0165] S440, determining an associated block of the sub-image block in the reference image of the current image block according to the reference motion vector.
[0166] The reference image of the current image block may be a peer frame of the current image block.
[0167] S450, determining the motion vector candidates to be subsequently added to the motion vector second candidate list according to the motion vectors of the associated blocks.
[0168] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, the average block size of each sub-image block in the CU is calculated during the encoding of the previous encoded image block in the same temporal layer in ATMVP mode, and if the average block size is greater than a 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 of the size of the sub-image block of the previous 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 information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0170] Optionally, in this embodiment, the size of a sub-image block and / or the size of its associated block are both fixed to 8x8 pixels.
[0171] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, when the encoding side encodes a current image block, it calculates the average block size of each sub-image block in a CU during encoding of a previous encoded image block in the same temporal layer in ATMVP mode, and if the average block size is greater than a threshold, the size of the sub-image block of the current image block is set to 8×8, otherwise it uses the default value of 4×4. Currently, in the next generation video encoding standard (Versatile Video Coding, VVC), the motion vector is stored with a size of 8×8. It should be understood that if the size of the sub-image block is set to 4×4, the size of the motion vector of the sub-image block (also referred to as 4×4) does not match the storage granularity of the motion vector in the current standard. In addition, in the current ATMVP technology, when encoding a current image block, it is further necessary to store the information of the size of the sub-image block of the previous encoded image block in the same temporal 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, while there is no need to store information on the size of the sub-image block of the previous encoded image block, thereby saving storage space.
[0173] In some embodiments of the present application, when the size of a sub-image block and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operations are set to not be performed, so that some redundant operations can be skipped, which can effectively save encoding and decoding time and improve encoding efficiency.
[0174] In some embodiments of the present application, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed. That is, if at least one of the width and height of a sub-image block and / or its associated block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the impact on performance caused by skipping the TMVP operation is negligible, so that the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.
[0175] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0176] Optionally, in step S420, at least some of the motion vector candidates are sequentially scanned, and when a motion vector candidate that meets a first preset condition is scanned, the scanning is stopped, and a reference motion vector is determined based on the scanned motion vector candidate that meets the first preset condition.
[0177] Determining the reference motion vector based on the scanned motion vector candidates that meet the first preset condition includes determining the motion vector candidates that meet the first preset condition as the target neighboring block.
[0178] Optionally, the pre-set condition includes that a reference image of the motion vector candidate and a reference image of the current image block are the same.
[0179] Optionally, step S450 includes determining a motion vector candidate to be subsequently included in the second motion vector candidate list based on the motion vector of the associated block after processing 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, where the motion vector of the associated block after processing and the motion vector of the associated block before processing are the same.
[0180] For example, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block with a scale value of 1, or the motion vector of the related block skipping the scaling step.
[0181] Optionally, step S450 includes abandoning determining the motion vector candidate to be subsequently included in the second candidate vector list based on the motion vector of the associated block 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.
[0182] Thus, in the embodiment shown in FIG. 4, the current image block is divided into sub-image blocks of size 8×8 to accommodate the storage granularity of motion vectors defined in the video standard VVC, while there is no need to store information about the size of the sub-blocks of the previous encoded image block, thereby saving storage space.
[0183] In some embodiments of the present application, when the size of a sub-image block and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operations are set to not be performed, so that some redundant operations can be skipped, which can effectively save encoding and decoding time and improve encoding efficiency.
[0184] In some embodiments of the present application, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed. That is, if at least one of the width and height of a sub-image block and / or its associated block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the impact on performance caused by skipping the TMVP operation is negligible, so that the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.
[0185] The above describes how to determine the candidate to be put into the second candidate list of motion vectors according to ATMVP technology. In some embodiments, other candidates can be put into the second candidate list of motion vectors, but this is not limited thereto.
[0186] Above, the method embodiment of the present application has been described in relation to Figures 1 and 4. Hereinafter, the device embodiment corresponding to the above method embodiment will be described. Since the description of the device embodiment and the description of the method embodiment correspond to each other, the contents not described in detail may be referred to the above method embodiment. For the sake of simplicity, they will not be described again here.
[0187] 5 is a schematic block diagram of a video processing apparatus 500 provided by an embodiment of the present application. The apparatus 500 is used to perform the embodiment of the method shown in FIG 1. The apparatus 500 includes the following units:
[0188] An obtaining unit 510 is used for obtaining M motion vector candidates to be put into the motion vector second candidate list of the current image block.
[0189] a determining unit 520, which is used for sequentially scanning N motion vector candidates among the M motion vector candidates, and determining a reference motion vector based on the scanning result, where N is less than M;
[0190] The determining unit 520 is further used for determining, based on the reference motion vector, the current image block and the reference image of the current image block, a motion vector candidate to be subsequently put into the motion vector second candidate list.
[0191] The determining unit 520 is further used for determining the motion vector of the current image block according to the motion vector second candidate list.
[0192] In step 1 of the conventional ATMVP technique, the temporal vector of the current image block is obtained by scanning all the motion vector candidates currently already entered in the motion vector second candidate list. For example, since the motion vector second candidate list generally includes four motion vector candidates, it may be necessary to scan the four motion vector candidates to obtain the temporal vector of the image block.
[0193] Meanwhile, in the embodiment of the present application, in the process of obtaining a reference motion vector of a current image block, only N (N is smaller than M) motion vector candidates among the M motion vector candidates already obtained are sequentially scanned, so that the number of scans of the motion vector candidates in the process of obtaining a reference motion vector of a current image block can be reduced compared with the prior art. It should be understood that the solution provided by the present application can be applied to step 1 of the prior art ATMVP technology to simplify redundant operations therein.
[0194] The applicant selected the official common test sequence as the test sequence on the latest reference software VTM-2.0 for next-generation video coding (Versatile Video Coding), and conducted tests on the solution provided in this application in the test configurations of RA configuration and LDB configuration. The test results show that the performance gains of ATMVP technology can be maintained after reducing the number of scans.
[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 embodiment, the acquisition unit 510 is used to acquire M motion vector candidates to be put into a motion vector second candidate list of the current image block based on the motion vectors of M neighboring blocks in the current frame of the current image block.
[0197] Optionally, as one embodiment, the neighboring block is an image block adjacent to or having a certain position pitch with respect to the position of the current image block on the current frame.
[0198] Optionally, as one embodiment, the determination unit 520 is used to sequentially scan the previous N motion vector candidates of the M motion vector candidates.
[0199] Optionally, in one embodiment, M is equal to four and N is less than four.
[0200] Optionally, in one embodiment, N is equal to 1 or 2.
[0201] Optionally, as one embodiment, 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 embodiment, the pre-set conditions include a motion vector candidate whose reference frame it points to and whose reference image of the current image block are the same.
[0203] Optionally, as one embodiment, the determination unit 520 is used to sequentially scan the N motion vector candidates, stop scanning when it scans to a motion vector candidate that meets the first preset condition, and determine a reference motion vector based on the scanned motion vector candidate that meets the first preset condition.
[0204] Optionally, as one embodiment, the determination unit 520 is used to perform a scaling process on a specific motion vector candidate in the second motion vector candidate list when no motion vector candidate that meets a preset condition is scanned among the N motion vector candidates, and determine a reference motion vector based on the specific motion vector candidate after the scaling process.
[0205] Optionally, as one embodiment, the specific motion vector candidate is the first motion vector or the last motion vector obtained in scan order among the N motion vector candidates.
[0206] Optionally, as one embodiment, the determination unit 520 performs a scaling process on a 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 is used to set the specific motion vector candidate after the scaling process as the reference motion vector.
[0207] Optionally, as one embodiment, the determination unit 520 is used to set a default value as the reference motion vector when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates.
[0208] Optionally, as one embodiment, the default value is the motion vector (0,0).
[0209] Optionally, as one embodiment, the determination unit 520 is used to divide the current image block into multiple sub-image blocks, determine an associated block of the sub-image block in the reference image of the current image block based on the reference motion vector, and determine a motion vector candidate to be subsequently included in the motion vector second candidate list based on the motion vector of the associated block.
[0210] Optionally, as one embodiment, the size of a sub-image block and / or the size of its associated block is fixed at 64 pixels or more.
[0211] Optionally, in one embodiment, the current image block is one coding unit CU.
[0212] Optionally, as one embodiment, the determination unit 520 is used to determine an associated block of the current image block in the reference image of the current image block based on the reference motion vector, and to determine a motion vector candidate to be subsequently included in the motion vector second candidate list based on the motion vector of the associated block.
[0213] Optionally, as one embodiment, the determination unit 520 is used to determine a motion vector candidate to be subsequently included in the motion vector second candidate list based on the motion vector of the associated block after processing 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, in which the motion vector of the associated block after processing and the motion vector of the associated block before processing are the same.
[0214] Optionally, as one embodiment, the motion vector of the associated block after processing includes a motion vector obtained after scaling the motion vector of the associated block with a scale value of 1, or a motion vector of the associated block skipping the scaling step.
[0215] Optionally, as one embodiment, the determination unit 520 is used to abandon determining a motion vector candidate to be subsequently included in the second candidate list of vectors based on the motion vector of the motion vector of the associated block 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.
[0216] Optionally, as one embodiment, the determination unit 520 is used to determine a motion vector candidate to be subsequently included in the motion vector second candidate list based on the specific motion vector candidate after processing when the specific motion vector candidate refers to a specific reference image or the reference image of the current image block is a specific reference image, in which the motion vector of the specific motion vector candidate after processing and the motion vector of the specific motion vector candidate before processing are the same.
[0217] Optionally, as one embodiment, the motion vector of the associated block after processing includes a motion vector obtained after scaling the motion vector of the associated block with a scale value of 1, or a motion vector of the associated block skipping the scaling step.
[0218] Optionally, as one embodiment, the determination unit 520 is used to abandon determining a motion vector candidate to be subsequently included in the second candidate list of vectors based on a specific motion vector candidate when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is a specific reference image.
[0219] Optionally, as one embodiment, the motion vector second candidate list is a Merge candidate list.
[0220] Optionally, as one embodiment, the reference image of the current image block is a peer frame of the current image block.
[0221] Optionally, as one embodiment, the size of a sub-image block and / or the size of its associated block are both fixed at 8x8 pixels.
[0222] Optionally, in some embodiments of the present application, when the size of a sub-image block and / or the size of an associated block of the sub-image block is 8×8 pixels, TMVP operation is set to not be performed, so that 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, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed, that is, if at least one of the width and height of a sub-image block and / or an associated block of the sub-image block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the performance impact of skipping the TMVP operation is negligible, so that the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.
[0224] In addition, 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, an embodiment of the present application further provides a video processing device 600. The device 600 is used to perform the embodiment of the method shown in Fig. 4. The device 600 includes the following units:
[0226] A determination unit 610 is used for obtaining M motion vector candidates to be put into the motion vector second candidate list of the current image block.
[0227] A determination unit 620 is used for sequentially scanning at least some of the motion vector candidates among the M motion vector candidates, and determining a reference motion vector of the current image block according to the scanning result.
[0228] A division unit 630 is used to divide the current image block into multiple sub-image blocks, where the size of the sub-image blocks is fixed at 64 pixels or more.
[0229] The determining unit 620 is further used for determining an associated block of the sub-image block in the reference image of the current image block according to the reference motion vector.
[0230] The determining unit 620 is further used for determining the motion vector candidate to be subsequently entered into the motion vector second candidate list according to the motion vector of the associated block.
[0231] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, the average block size of each sub-image block in the CU is calculated during the encoding of the previous encoded image block in the same temporal layer in ATMVP mode, and if the average block size is greater than a 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 of the size of the sub-image block of the previous encoded image block in the same temporal layer.
[0232] 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 information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0233] Optionally, as one embodiment, the size of a sub-image block and / or the size of its associated block are both fixed at 8x8 pixels.
[0234] Currently, in the next generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored with a size of 8 x 8. In the embodiment of the present application, the size of the sub-image block of the current image block is set to 8 x 8, which can be adapted to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previously coded image block, thereby saving storage space.
[0235] In some embodiments of the present application, when the size of a sub-image block and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operations are set to not be performed, so that some redundant operations can be skipped, which can effectively save encoding and decoding time and improve encoding efficiency.
[0236] In some embodiments of the present application, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed. That is, if at least one of the width and height of a sub-image block and / or its associated block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the impact on performance caused by skipping the TMVP operation is negligible, so that 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 is used to sequentially scan at least some of the motion vector candidates, stop scanning when scanning to a motion vector candidate that meets a first preset condition, and determine a reference motion vector based on the scanned motion vector candidate that meets the first preset condition.
[0238] Optionally, as one embodiment, the determining unit 620 is used to determine a motion vector candidate that meets a first preset condition as a target neighboring block.
[0239] Optionally, as one embodiment, the pre-set condition includes that a reference image of the motion vector candidate and a reference image of the current image block are the same.
[0240] In addition, 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 an 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 an image block only includes the information "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 the motion vector includes the displacement of the reference block of the encoded / decoded image block relative to an image block that is located in the same position as the encoded / decoded image block on the reference image and is located in 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 video processing method shown in FIG. 1, step S120 directly scans the image block corresponding to the motion vector candidate instead of scanning the motion vector candidate in the second motion vector candidate list. Hereinafter, a video processing method is provided for the new definition of the motion vector (i.e., including "displacement" information but not including "pointing image"). Note that the methods of determining motion vector candidates based on the ATMVP technology provided respectively for the two different meanings of "motion vector" are almost the same, and the above description also applies to the video processing method provided below, with the main difference being that in constructing the motion vector second candidate list, when determining candidates to be included in the motion vector second candidate list based on the ATMVP technology, the above video processing method scans the motion vectors included in the motion vector second candidate list, while the video processing method described below scans the image blocks corresponding to the motion vectors included in the motion vector second candidate list.
[0242] As shown in FIG. 7, an embodiment of the present application provides a video processing method, which includes the following steps.
[0243] S710, M neighboring blocks of the current image block are determined.
[0244] The current image block is the image block to be coded (or decoded). For example, the current image block is a coding unit (CU).
[0245] The image frame in which the current image block is located is called the current frame.
[0246] A neighboring block is an image block that is adjacent to or has a certain position pitch with respect to the position of the current image block in the current image.
[0247] The M neighboring blocks are image blocks that have been coded (or decoded) in the current frame.
[0248] As an example, as shown in Figure 2, the four neighboring blocks of the current image block are determined sequentially in the order of image blocks located at four positions A1 (left) → B1 (top) → B0 (top right) → A0 (bottom left) around the current image block shown in Figure 2.
[0249] S720, sequentially scan N neighboring blocks among the M neighboring blocks, and determine a target neighboring block based on the scanning result, where N is less than M;
[0250] The process of determining the target neighboring block based on the scanning result of the N neighboring blocks may be a process of sequentially judging the N neighboring blocks based on a preset condition, and determining the target neighboring block based on the judgment result.
[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 a reference image that is closest in time to the image in which the current image block is located, or the reference image of the current image block is a reference image that is preset on the encoding and decoding side, or the reference image of the current image block is a reference image specified in the video parameter set, sequence header, sequence parameter set, image header, image parameter set, or slice header.
[0253] For example, the reference image of the current image block is the same-order frame of the current image block, and the same-order frame is a frame for obtaining and predicting motion information set in the slice-level information header.
[0254] It should be understood that, depending on future technological evolution, this pre-set condition may be given other different definitions, and the corresponding solutions also fall within the scope of protection of the present application.
[0255] The process of determining the target neighboring block based on the scanning result of N neighboring blocks will be described in detail below.
[0256] In step S720, only N neighboring blocks among the M neighboring blocks obtained in step S710 are scanned, thus reducing the number of scans.
[0257] Optionally, in step S720, the previous N neighboring blocks of the M neighboring blocks may be scanned sequentially.
[0258] In step S710, when M neighboring blocks of the current image block are sequentially determined in a preset order, the previous N neighboring blocks obtained in step S720 refer to the N neighboring blocks that were first determined in the preset order.
[0259] Optionally, in step S720, the last N neighboring blocks of the M neighboring blocks may be sequentially scanned, or the middle N neighboring blocks of the M neighboring blocks may be sequentially scanned, although the present application is not limited thereto.
[0260] S730, determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block.
[0261] S740, encoding / decoding the current image block according to the motion vector of the associated block.
[0262] Optionally, step S740 includes determining a reference block of the current image block according to the motion vector of the related block and the reference image.
[0263] For example, step S740 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 performs encoding and decoding for 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 a merge candidate list for the current image block. In one example, the candidate block list is an AMVP candidate list for the current image block.
[0265] At the encoding side, an index of a candidate block of a current block is written into a code stream. At the decoding side, after obtaining the index, a candidate block corresponding to the index is found from a candidate block list, and a reference block of the current image block is determined according to the reference block of the candidate block, or a motion vector of the current image block is determined according to the motion vector of the candidate block.
[0266] For example, the reference block of the candidate block is directly determined as the reference block of the current image block, or the motion vector of the candidate block is directly determined 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 motion vector of the candidate block to the MVD to determine 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 an embodiment of the present application, in the process of obtaining a target neighboring block of a current image block, only N (N is less than M) neighboring blocks among the M neighboring blocks already obtained are sequentially scanned, and compared with the prior art, the number of scans of the neighboring blocks in the process of obtaining a target neighboring block of a current image block can be reduced, thereby reducing the complexity.
[0268] Optionally, in this embodiment, in step S710, determine 4 neighboring blocks in the current frame of the current image block, that is, M is equal to 4. In step S720, scan N neighboring blocks of the 4 neighboring blocks, where N is less than 4.
[0269] For example, N is equal to 1. For example, in step S720, only the first neighboring block of the four neighboring blocks is scanned.
[0270] Also, for example, N is equal to 2 or 3.
[0271] The method of determining the target neighboring block based on the scanning result of the N neighboring blocks in step S720 will be described below.
[0272] Optionally, in step S720, sequentially scan the N neighboring blocks, and when a neighboring block that meets a first preset condition is reached, the scanning is stopped, and a target neighboring block is determined based on the scanned neighboring block that meets the first preset condition.
[0273] For example, the preset condition is defined as the reference image of the neighboring block and the reference image of the current image block being the same.
[0274] It should be understood that in future evolving technologies, the preconditions may be given other definitions.
[0275] Here, the definition of the preset condition is taken as an example that the reference image of the neighboring block is the same as the reference image of the current image block.
[0276] For example, a neighboring block that meets a first preset condition is determined as a target neighboring block.
[0277] Optionally, in step S720, if no neighboring block that meets the preset condition is scanned among the N neighboring blocks, the method further includes performing a scaling process on the motion vector of a specific neighboring block among the M neighboring blocks, and encoding / decoding the current image block based on the motion vector after the scaling process.
[0278] For example, the reference block of the current image block is determined based on the motion vector after scaling and the reference image of the current image block.
[0279] Optionally, the particular neighboring block is the first neighboring block or the last neighboring block obtained in scan order among the N neighboring blocks.
[0280] The specific neighboring block may be one of the N neighboring blocks obtained in another scan order.
[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 vector of a 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 setting 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 no neighboring block that meets the preset condition is scanned among the N neighboring blocks, the default block is taken 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] The following describes the process of determining the related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block in step S730.
[0285] Optionally, as an embodiment, determining an associated 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 includes dividing the current image block into a plurality of sub-image blocks, and determining an 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, where the associated block of the current image block includes an associated block of the sub-image block.
[0286] The associated block may be called a collocated block or a corresponding block.
[0287] For example, the current image block is a CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0288] Optionally, the size of a sub-image block and / or the size of its associated block is fixed at 64 pixels or more.
[0289] Optionally, the size of the sub-image block and / or the size of the associated block of the sub-image block are both fixed at 8x8 pixels.
[0290] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, when the encoding side encodes a current image block, it calculates the average block size of each sub-image block in a CU during encoding of a previous encoded image block in the same temporal layer in ATMVP mode, and if the average block size is greater than a threshold, the size of the sub-image block of the current image block is set to 8×8, otherwise it uses the default value of 4×4. Currently, in the next generation video encoding standard (Versatile Video Coding, VVC), the motion vector is stored with a size of 8×8. It should be understood that if the size of the sub-image block is set to 4×4, the size of the motion vector of the sub-image block (also referred to as 4×4) does not match the storage granularity of the motion vector in the current standard. In addition, in the current ATMVP technology, when encoding a current image block, it is further necessary to store the information of the size of the sub-image block of the previous encoded image block in the same temporal layer.
[0291] 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, while there is no need to store information on the size of the sub-image block of the previous encoded image block, thereby saving storage space.
[0292] In some embodiments of the present application, when the size of a sub-image block and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operations are set to not be performed, so that some redundant operations can be skipped, which can effectively save encoding and decoding time and improve encoding efficiency.
[0293] In some embodiments of the present application, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed. That is, if at least one of the width and height of a sub-image block and / or its associated block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the impact on performance caused by skipping the TMVP operation is negligible, so that the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.
[0294] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0295] Optionally, as another embodiment, determining an associated 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 includes determining an 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.
[0296] Optionally, step S740 includes determining a candidate reference block for the current image block based on the motion vector of the related block after processing 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, where the motion vector of the related block after processing and the motion vector of the related block before processing are the same.
[0297] For example, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block with a scale value of 1, or the motion vector of the related block skipping the scaling step.
[0298] Optionally, step S740 abandons determining the candidate 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.
[0299] In some embodiments, step S720 includes, when the motion vector of a specific neighboring block points to a specific reference image or the reference image of the current image block is a specific reference image, determining a 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, where the motion vector of the related block after processing and the motion vector of the related block before processing are the same.
[0300] Here, the motion vector of the relevant block after processing includes the motion vector obtained after scaling the motion vector of the relevant block with a scale value of 1, or the motion vector of the relevant block skipping the scaling step.
[0301] As can be seen from the above, in the embodiment of the present application, in the process of obtaining a target neighboring block of a current image block, only N (N is less than M) neighboring blocks out of the M neighboring blocks already obtained are sequentially scanned, and compared with the prior art, the number of scans of the neighboring blocks in the process of obtaining a target neighboring block of a current image block can be reduced, thereby reducing the complexity.
[0302] If a neighboring block among the N neighboring blocks whose reference frame and the same frame of the current frame are the same is not scanned, a motion vector of one of the N neighboring blocks is scaled so that its reference frame is the same as the same frame of the current frame, and then this scaled motion vector is used as the motion vector of the current image block, thereby improving the accuracy of the motion vector of the current image block.
[0303] The current image block is divided into sub-image blocks of size 8×8 to accommodate the storage granularity of motion vectors defined in the video standard VVC, while eliminating the need to store information about the size of the sub-blocks of the previous coded image block, thereby saving storage space.
[0304] In some embodiments of the present application, when the size of a sub-image block and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operations are set to not be performed, so that some redundant operations can be skipped, which can effectively save encoding and decoding time and improve encoding efficiency.
[0305] In some embodiments of the present application, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed. That is, if at least one of the width and height of a sub-image block and / or its associated block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the impact on performance caused by skipping the TMVP operation is negligible, so that the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.
[0306] In some embodiments of the embodiment of the present application, in the process of determining the motion vector of a current image block, the motion vector of the image block is determined using the motion vector of an image block on another image. For convenience of explanation, the image block is called a first image block, and the image block on the other image to be used is called the time-domain reference block or associated block of the first image block. It can be understood that the first image block and the time-domain reference block (or associated 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 using the motion vector of the time-domain reference block (or associated block), the motion vector of the time-domain reference block (or associated block) may need to be scaled. For convenience of explanation, the term "associated block" is used uniformly in this specification.
[0307] For example, when applying the ATMVP technology to construct an AMVP candidate list, it is necessary to determine an associated block of a current image block according to the ATMVP technology, determine a motion vector of the current image block according to the motion vector of the associated block, scale the motion vector of the associated block, and then determine a motion vector of the current image block according to the motion vector after scaling. In general, the scale of the motion vector of the associated block is determined according to the time distance between the reference image pointed to by the motion vector of the associated block and the image in which the associated block is located, and the time distance between the reference image of the current image block and the image in which the current image block is located.
[0308] In one example, the motion vector of the relevant block is called MV2, and the reference frame index value of the reference image that the motion vector MV2 points to is called x. Here, the reference frame index value x is the difference between the sequence number of the reference image that MV2 points to (e.g. POC) and the sequence number of the image in which the relevant 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 in which the first image block is located. Then, the scale for the motion vector MV2 is y / x. Optionally, the product of the motion vector MV2 and y / x can be the motion vector of the first image block.
[0309] However, when the motion vector MV2 of the associated block points to a specific reference picture, or when the reference picture of the first image block is a specific reference picture, scaling to the motion vector MV2 of the associated block is meaningless because the definition of the temporal distance between the specific reference picture and the picture in which the first image block is located is ambiguous.
[0310] Optionally, in this embodiment, when the motion vector of the current image block is determined based on the motion vector of the associated block, specifically, 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 motion vector of the current image block is determined based on the motion vector of the associated block after processing, in which the motion vector of the associated block after processing is the same as the motion vector of the associated block before processing.
[0311] For example, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block with a scale value of 1, or the motion vector of the related block skipping the scaling step.
[0312] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vector of the associated block, specifically, 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, determining the motion vector of the current image block based on the motion vector of the associated block is abandoned.
[0313] As shown in FIG. 8 , an embodiment of the present application further provides a video processing method, which includes the following steps.
[0314] S810, M neighboring blocks of the current image block are determined.
[0315] Step S810 corresponds to step S710 in the above embodiment.
[0316] S820: scanning at least some of the M neighboring blocks in sequence, and determining a target neighboring block based on the scanning result.
[0317] Optionally, the partial neighboring blocks among the M neighboring blocks are scanned sequentially, and the target neighboring block is determined based on the scanning result.
[0318] Optionally, all neighboring blocks among the M neighboring blocks are scanned sequentially, and the target neighboring block is determined based on the scanning result.
[0319] S830, divide the current image block into a number of sub-image blocks, where the size of the sub-image block is fixed at 64 pixels or more.
[0320] S840, determining a related block of the current image block in the reference image of the current image block according to the motion vector and the sub-image block of the target neighboring block.
[0321] Optionally, the reference image of the current image block is the reference image that has the closest time distance to the image in which the current image block is located.
[0322] Optionally, the reference image of the current image block is a reference image preset at the encoding side and the decoding side.
[0323] Optionally, the reference image of the current image block is a reference image specified in the current picture parameter set, the sequence header, the sequence parameter set, the picture header, the picture parameter set, the slice header.
[0324] S850, encoding / decoding the current image block according to the motion vector of the associated block.
[0325] 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 information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0326] Optionally, in this embodiment, the size of a sub-image block and / or the size of a time-domain reference block of a sub-image block are both fixed to 8×8 pixels.
[0327] Currently, in the next generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored with a size of 8 x 8. In the embodiment of the present application, the size of the sub-image block of the current image block is set to 8 x 8, which can be adapted to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previously coded image block, thereby saving storage space.
[0328] In some embodiments of the present application, when the size of a sub-image block and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operations are set to not be performed, so that some redundant operations can be skipped, which can effectively save encoding and decoding time and improve encoding efficiency.
[0329] In some embodiments of the present application, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed. That is, if at least one of the width and height of a sub-image block and / or its associated block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the impact on performance caused by skipping the TMVP operation is negligible, so that the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.
[0330] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated 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, stopping the scanning when a neighboring block that meets a first preset condition is reached, and determining the target neighboring block based on the scanned neighboring block that meets the first preset condition.
[0332] For example, a neighboring block that meets a first preset condition is determined as a target neighboring block.
[0333] For example, the preset condition is defined as the reference image of the neighboring block and the reference image of the current image block being the same.
[0334] Optionally, step S840 includes determining an associated block of the sub-image block in the reference image of the current image block based on the motion vector and the sub-image block of the target neighboring block, where the associated block of the current image block includes the associated block of the sub-image block.
[0335] Above, the method embodiment of the present application has been described in relation to Figures 7 and 8. Hereinafter, an apparatus embodiment corresponding to the method embodiment shown in Figures 7 and 8 will be described. Note that the description of the apparatus embodiment and the description of the method embodiment correspond to each other, so that for those that are not described in detail, reference may be made to the above method embodiment. For the sake of simplicity, they will not be described again here. 9 is a schematic block diagram of a video processing apparatus 900 provided by an embodiment of the present application. The apparatus 900 is used to implement the embodiment of the method shown in FIG 7. The apparatus 900 includes the following units:
[0336] An acquisition unit 910 is used to acquire M neighboring blocks of a current image block.
[0337] An obtaining unit 920 is used for sequentially scanning N neighboring blocks among the M neighboring blocks, and determining a target neighboring block based on the scanning result, where N is less than M.
[0338] The determining unit 920 is further used for determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block and the reference image of the current image block.
[0339] An encoding / decoding unit 930 is used to encode / decode the current image block based on the motion vector of the associated block.
[0340] In an embodiment of the present application, in the process of obtaining a target neighboring block of a current image block, only N (N is less than M) neighboring blocks among the M neighboring blocks already obtained are sequentially scanned, and compared with the prior art, the number of scans of the neighboring blocks in the process of obtaining a target neighboring block of a current image block can be reduced, thereby reducing the complexity.
[0341] Optionally, in one embodiment, M is equal to four and N is less than four.
[0342] Optionally, in one embodiment, N is equal to 1 or 2.
[0343] Optionally, as one embodiment, the determining unit 920 is used to sequentially scan the previous N neighboring blocks in the M neighboring blocks.
[0344] Optionally, as one embodiment, the acquisition unit 910 sequentially acquires M neighboring blocks of the current image block in a preset order, and the previous N neighboring blocks refer to the N neighboring blocks that are first determined in the preset order.
[0345] Optionally, as one embodiment, the determination unit 920 is used to sequentially scan the N neighboring blocks, stop scanning when it scans to a neighboring block that meets a first preset condition, and determine a target neighboring block based on the scanned neighboring block that meets the first preset condition.
[0346] Optionally, as one embodiment, the determining unit 920 is used to determine a neighboring block that meets a first preset condition as a target neighboring block.
[0347] Optionally, as one embodiment, the pre-set condition includes that a reference image of the neighboring block and a reference image of the current image block are the same.
[0348] Optionally, as one embodiment, the encoding / decoding unit 930 is used to determine a reference block of the current image block according to the motion vector of the related block and the reference image.
[0349] Optionally, as one embodiment, the encoding / decoding unit 930 constructs a candidate block list for the current image block, where the candidate blocks in the candidate block list include M neighboring blocks and associated blocks, and are 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 one embodiment, the encoding / decoding unit 930 is further used to perform a scaling process on the motion vector of a specific neighboring block among the M neighboring blocks when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, and encode / decode the current image block based on the motion vector after the scaling process.
[0351] Optionally, as one embodiment, the encoding / decoding unit 930 is used to determine a reference block of the current image block according to the motion vector after the scaling process and the reference image of the current image block.
[0352] Optionally, as one embodiment, the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scan order among the N neighboring blocks.
[0353] Optionally, as one embodiment, the encoding / decoding unit 930 is used to perform a scaling process on the motion vector of a 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 the image block pointed to by the motion vector after the scaling process in the reference image of the current image block is the reference block of the current image block.
[0354] Optionally, as one embodiment, the determination unit 920 is used to set a default block as a reference block of the current image block if no neighboring block that meets the preset condition is scanned among the N neighboring blocks.
[0355] Optionally, as one embodiment, the default block is the image block pointed to by the motion vector (0,0).
[0356] Optionally, as one embodiment, the determining unit 920: Dividing a current image block into a plurality of sub-image blocks; According to the motion vector of the target neighboring block, the motion vector is used to determine the associated block of the sub-image block in the reference image of the current image block, where the associated block of the current image block includes the associated block of the sub-image block.
[0357] Optionally, as one embodiment, the size of a sub-image block and / or the size of its associated block is fixed at 64 pixels or more.
[0358] Optionally, in some embodiments of the present application, when the size of a sub-image block and / or the size of an associated block of the sub-image block is 8×8 pixels, TMVP operation is set to not be performed, so that 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, if the width and / or height of the current CU is smaller than 8 pixels, the TMVP operation is set not to be performed, that is, if at least one of the width and height of a sub-image block and / or an associated block of the sub-image block is smaller than 8 pixels, the TMVP operation is set not to be performed. In this case, the performance impact of skipping the TMVP operation is negligible, so that the encoding and decoding time can be effectively saved and the encoding efficiency can be improved.
[0360] Optionally, in one embodiment, the current image block is one coding unit CU.
[0361] Optionally, as one embodiment, the determining unit 920 is used for determining a 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.
[0362] Optionally, as one embodiment, the neighboring block is an image block adjacent to or having a certain position pitch with respect to the position of the current image block on the current image.
[0363] Optionally, as an embodiment, the encoding / decoding unit 930 is used to determine a reference block of a current image block according to the motion vector of the related block after processing 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 related block after processing is the same as the motion vector of the related block before processing.
[0364] Optionally, as one embodiment, the motion vector of the associated block after processing includes a motion vector obtained after scaling the motion vector of the associated block with a scale value of 1, or a motion vector of the associated block skipping the scaling step.
[0365] Optionally, as one embodiment, 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 associated block when the reference image of the associated block is a specific reference image, or the reference image of the current block is a specific reference image.
[0366] Optionally, as one embodiment, the determination unit 920 is used to determine a 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 when the motion vector of a specific neighboring block points to a specific reference image or the reference image of the current image block is a specific reference image, in which the motion vector of the related block after processing and the motion vector of the related block before processing are the same.
[0367] Optionally, as one embodiment, the motion vector of the associated block after processing includes a motion vector obtained after scaling the motion vector of the associated block with a scale value of 1, or a motion vector of the associated block skipping the scaling step.
[0368] In addition, 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, an embodiment of the present application further provides a video processing apparatus 1000. The apparatus 1000 is used to perform the embodiment of the method shown in Fig. 8. The apparatus 1000 includes the following units:
[0370] An acquisition unit 1010 is used to acquire M neighboring blocks of a current image block.
[0371] A determining unit 1020 is used for sequentially scanning at least some of the M neighboring blocks, and determining a target neighboring block based on the scanning result.
[0372] A division unit 1030 is used to divide the current image block into multiple sub-image blocks, where the size of the sub-image blocks is fixed at 64 pixels or more.
[0373] The determining unit 1020 is further used for determining a related block of the current image block in the reference image of the current image block according to the motion vector and the sub-image block of the target neighboring block.
[0374] An encoding / decoding unit 1040 is used to encode / decode a current image block based on the motion vector of an associated block.
[0375] 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 information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0376] Optionally, as one embodiment, the size of a sub-image block and / or the size of a time-domain reference block of a sub-image block are both fixed to 8x8 pixels.
[0377] Currently, in the next generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored with a size of 8 x 8. In the embodiment of the present application, the size of the sub-image block of the current image block is set to 8 x 8, which can be adapted to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previously coded image block, thereby saving storage space.
[0378] In some embodiments of the present application, when the size of a sub-image block in ATMVP technology and / or the size of the associated block of the sub-image block is 8x8 pixels, TMVP operation is set not to be performed, so that some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0379] In some embodiments of the present application, if at least one of the width and height of the current CU is smaller than 8, TMVP operation is set not to be performed, and the impact on performance of skipping TMVP operation is negligible, so that encoding and decoding time can be effectively saved and encoding efficiency can be improved.
[0380] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0381] Optionally, as one embodiment, sequentially scanning at least some of the 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, stopping the scanning when scanning to a neighboring block that meets a first preset condition, and determining the target neighboring block based on the scanned neighboring block that meets the first preset condition.
[0382] Optionally, as one embodiment, the determining unit 1020 is used to determine a neighboring block that meets a first preset condition as a target neighboring block.
[0383] Optionally, as one embodiment, the pre-set condition includes that a reference image of the neighboring block and a reference image of the current image block are the same.
[0384] Optionally, as one embodiment, the determination unit 1020 is used to determine an associated block of the sub-image block in the reference image of the current image block based on the motion vector and the sub-image block of the target neighboring block, where the associated block of the current image block includes the associated block of the sub-image block.
[0385] In addition, 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, an embodiment of the present application further provides a video processing apparatus 1100. The apparatus 1100 may be used to perform the method embodiments described above. The apparatus 1100 includes a processor 1110 and a memory 1120, where the memory 1120 is used to store instructions, and the processor 1110 is used to execute the instructions stored in the memory 1120 and to cause the processor 1110 to perform the method according to the method embodiments described above by executing the instructions stored in the memory 1120.
[0387] Optionally, as shown in Fig. 11, the device 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 devices 500, 600, 900, 1000 and 1100 provided in this application may be applied in a coder or in a decoder.
[0389] The above description has been given of the second motion vector candidate list, but hereinafter, the first motion vector candidate list will be described.
[0390] In the motion compensation prediction stage, traditionally, only a translational motion model is applied in mainstream video coding standards. In the real world, there are various motion forms, such as zooming, rotation, distant motion, and other irregular motions. In order to improve the efficiency of inter-frame prediction, an affine motion compensation model can be introduced into the encoding and decoding technology. Affine motion compensation describes the affine motion field of an image block by the MV of a set of control points. In one example, a four-parameter Affine model is used for the affine motion compensation model, in which the set of control points includes two control points (e.g., the upper left corner point and the upper right corner point of the image block). In one example, a six-parameter Affine model is used for the affine motion compensation model, in which the set of control points includes three control points (e.g., the upper left corner point, the upper right corner point, and the lower left corner point of the image block).
[0391] In one embodiment, when constructing the first candidate list of motion vectors, the candidates to be included may be the MV 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 a Merge mode, specifically, may be referred to as an Affine Merge mode, and correspondingly, the first candidate list of motion vectors may be referred to as an 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 technique may be placed in a first candidate list of motion vectors.
[0393] Here, in one example, the motion vectors of the control points of the associated blocks of the current image block are put into a first candidate list of motion vectors as candidates, and when predicting using the candidates in the first list of motion vectors, the current image block is predicted according to the motion vectors of the control points of the associated 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 put into a first candidate list of motion vector as a candidate. Optionally, the candidate is marked as determined according to ATMVP technology. When using the candidate in the first candidate list of motion vector to predict, the related block of the current image block is determined according to the mark and the candidate, and the current image block and the related block are divided into a number of sub-image blocks in the same manner, each sub-image block in the current image block corresponds to each sub-image block in the related block one-to-one, and the motion vector of the corresponding sub-image block in the current image block is predicted according to the motion vector of each sub-image block in the related block.
[0395] Here, optionally, when a sub-image block whose motion vector is not obtainable is found in the related block, the representative motion vector of the related block is used to replace the motion vector that is not obtainable, and predict the corresponding sub-image block in the current image block. Optionally, if the representative motion vectors of all the related blocks are not obtainable, the candidate determined based on the ATMVP technique is abandoned from being put into the motion vector second candidate list. In one example, when a sub-image block in the related block is not obtainable or the sub-image block in the related block uses an intraframe coding mode, it is determined that a sub-image block whose motion vector is not obtainable is found 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, and when the representative motion vector of an associated block of the current image block is put into the first candidate list of motion vectors, the representative motion vector of the associated block may be inserted as the motion vector of each control point in the candidate (i.e., the motion vectors of each control point in the candidate are all assigned to the representative motion vector of the associated block) to ensure the consistency of the data format.
[0397] Here, optionally, the representative motion vector of the associated block of the current image block may refer to the motion vector at the center position of the associated block, or may refer to a motion vector representative of another associated block, and is not limited here.
[0398] As can be seen from the above description of the second motion vector candidate list, when determining candidates according to the ATMVP technique, it is necessary to determine the associated block of the current image block. In this solution, when determining candidates to be put into the first motion vector candidate list according to the ATMVP technique, the method of determining the associated block of the current image block includes: A method 1, which sequentially scans N neighboring blocks among a preset M neighboring blocks of a current image block, and determines a target neighboring block according to a scanning result, where N is smaller than M and M is equal to or smaller than 4, and determines a related block of the current image block according to a motion vector of the target neighboring block, the current image block, and a reference image of the current image block; and method 2: determining M neighboring blocks of the current image block according to M candidates in a motion vector second candidate list of the current image block, sequentially scanning N neighboring blocks among the M neighboring blocks, and determining a target neighboring block according to a scanning result, where N is smaller than M and M is equal to or smaller than 4, and determining an associated block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block. Here, the M candidates in the motion vector second candidate list may refer to the M neighboring blocks of the current image block.
[0399] Here, for the explanation of the two steps in method 1 and method 2, namely, “determining a target neighboring block based on the scanning 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”, you may refer to the above explanation, and will not be described again here.
[0400] In one embodiment, a method for determining candidates to be included in a first candidate list of motion vectors includes: determining a group of motion vectors of control points of neighboring blocks of a current image block that are predicted in an affine transformation mode according to a specific scanning order; and including each of the determined group of motion vectors of control points of the neighboring blocks as a candidate in the first candidate list of motion vectors.
[0401] Here, in one example, the neighboring block predicted in affine transformation mode refers to the motion vector of the neighboring block determined based on the candidate in the affine merge candidate list, that is, the candidate is from the affine motion model of the spatial domain neighboring block using the affine mode of the current image block, that is, the CPMV of the spatial domain neighboring block using the affine mode is the CPMVP of the current block.
[0402] Here, in one example, the group of motion vectors of a control point may include motion vectors of two control points of the neighboring block (e.g., the top left corner point and the top right corner point of the neighboring block), or may include motion vectors of three control points of the neighboring block (e.g., the top left corner point, the top right corner point and the bottom left corner point of the image block), depending on whether a 4-parameter Affine model or a 6-parameter Affine model is used.
[0403] Here, in one example, determining a group of motion vectors of control points of neighboring blocks predicted in an affine transformation mode according to a specific scan order includes: determining a group of motion vectors of control points of a first neighboring block according to a first scanning order in a left neighboring block of the current image block; determining a group of motion vectors of control points of second neighboring blocks according to a second scanning order in the upper neighboring blocks of the current image block; and putting the motion vectors of the control points of the first neighboring block and the motion vectors of the control points of the second neighboring block into the first candidate list of motion vectors.
[0404] For example, as shown in FIG. 12, FIG. 12 is a schematic diagram of obtaining candidates of the first candidate list of motion vectors according to the neighboring blocks of the current image block. On the left side of the current image block, sequentially scan according to the scanning order of image block A->image block D->image block E, and the motion vector group of the control point of the first image block that meets the first preset condition is entered as a candidate in the first candidate list of motion vectors. On the upper side of the current image block, sequentially scan according to the scanning order of image block B->image block C, and the motion vector group of the control point of the first image block that meets the first preset condition is entered as a candidate in the first candidate list of motion vectors. Optionally, if no image block that meets the threshold condition is found in the scanning order, the candidate determination in the scanning order is abandoned.
[0405] In one embodiment, a method for determining candidates for inclusion in the motion vector first candidate list includes: constructing motion vectors of some control points of the current image block based on neighboring blocks of the some control points; 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, the candidate is constructed to be added to the first candidate list of motion vectors. In one example, before the candidate is constructed to be added to the first candidate list of motion vectors, first determine whether the number of candidates in the first candidate list of motion vectors has already reached a preset number (e.g., 5); if not, the candidate is constructed to be added to the first candidate list of motion vectors.
[0407] In one example, the candidate to be constructed 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 of constructing candidates of the first candidate list of motion vectors according to the neighboring blocks of the current image block. The current image block has a total of four control points, which are CP1, CP2, CP3, and CP4. Here, image blocks A0 and A1 are the spatial domain neighboring blocks of CP1, image blocks A2, B2, and B3 are the spatial domain neighboring blocks of CP2, image blocks B0 and B1 are the spatial domain neighboring blocks of CP2, and T is the temporal domain neighboring block of CP4. The coordinates of the control points CP1, CP2, CP3, and CP4 are (0,0), (W,0), (H,0), and (W,H), respectively, where W and H respectively indicate the width and height of the current CU. The priority of obtaining the motion information of the neighboring blocks of each control point is as follows: For CP1, the acquisition priority is B2->B3->A2. If B2 is available, the MV of B2 is used as the MV of control point CP1, if B2 is unavailable, the MV of B3 is used as the MV of control point CP1, if B2 and B3 are both unavailable, the MV of A1 is used as the MV of control point CP1, and if B2, B3, and A1 are all unavailable, the movement 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, and for CP4, the MV of T is used directly to obtain the MV of control point CP4.
[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) are available, insert the constructed MV; otherwise, go directly to the next step. After obtaining the MVs of all control points (if they exist), we can perform different combinations of the MVs of the control points to obtain multiple affine candidates. The combination method is as follows: When using the four-parameter affine model, combining two of the MVs of the four control points can yield one or more candidates, among which two combination schemes, i.e., {CP1, CP2} and {CP1, CP3}, are selected. Here, in the combination scheme {CP1, CP3}, the MVs of the two selected control points need to be transformed into the MVs of the control points at the top-left and top-right corners of the current CU (CP1 and CP2) based on the four-parameter model.
[0411] When using the 6-parameter affine model, combining three of the MVs of the four control points can result in one or more candidates, and four combination methods are selected: {CP1, CP2, CP4}, {CP1, CP2, CP3}, {CP2, CP3, CP4}, and {CP1, CP3, CP4}. Here, the combination methods {CP1, CP2, CP3}, {CP2, CP3, CP4}, and {CP1, CP3, CP4} require transforming the MVs of the three selected control points into the MVs of the control points (CP1, CP2, and CP3) at the top-left, top-right, and bottom-left corners of the current CU based on the 6-parameter model. In one example, if the reference frames used for different combinations of MVs (2 or 3) are different, the candidates constructed by the combinations are considered unusable.
[0412] In one embodiment, the method for determining the candidates to be put into the first candidate list of the motion vector includes using a default vector to populate. Optionally, the default vector can be a zero vector or other vector. Optionally, after determining the candidates to be put into the first candidate list of the motion vector by other methods, determine whether the number of candidates currently put into the first candidate list has already reached a preset number, and if not, use the default vector to populate the first candidate list until the number of candidates in the first candidate list reaches the preset number.
[0413] When predicting a current image block using candidates in the first candidate list of motion vectors, if the used candidate is at least one candidate other than the candidate determined by the ATMVP technique, derive a motion vector of a sub-image block in the current image block according to the candidate by an affine motion model. If the used candidate is a candidate determined by the ATMVP technique, determine a reference block of each sub-image block in the current image block according to the motion vector of each sub-image block in the associated block according to the above description, splice the reference block of each sub-image block to the reference block of the current image block, and calculate a residual of the current image block according to the reference block.
[0414] Hereinafter, the video processing method provided in the embodiment of the present application will be described by way of example with reference to Figures 14 and 15. As shown in Figure 14, the method includes the following steps:
[0415] S1410, sequentially scanning N neighboring blocks among the preset M neighboring blocks of the current image block, and determining a target neighboring block based on the scanning result, where N is less than M. Optionally, M is equal to or less than 4.
[0416] S1420, determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block.
[0417] S1430, the current image block and the associated block are divided into a plurality of sub-image blocks in the same manner, and each sub-image block in the current image block has a one-to-one correspondence with each sub-image block in the associated block.
[0418] S1440, predicting corresponding sub-image blocks in the current image block according to the motion vectors of each sub-image block in the associated block respectively.
[0419] The video processing method shown in FIG. 14 can be described above, and will not be described here.
[0420] As shown in FIG. 15, the method includes the following steps.
[0421] S1510, determining M neighboring blocks of the current image block according to the M candidates in the motion vector second candidate list of the current image block.
[0422] S1520, sequentially scanning N neighboring blocks among the M neighboring blocks, and determining a target neighboring block based on a scanning result, where N is less than M. Optionally, M is equal to or less than 4.
[0423] S1530, determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block.
[0424] S1540, according to the related block of the current image block, determine a specific candidate in a first motion vector candidate list of the current image block, where the specific candidate may be a candidate determined by the ATMVP technique mentioned in the above description.
[0425] S1550: if it is determined to use the specific candidate, divide the current image block and the associated block into multiple sub-image blocks in the same manner, and each sub-image block in the current image block has a one-to-one correspondence with each sub-image block in the associated block.
[0426] S1560, predicting corresponding sub-image blocks in the current image block according to the motion vectors of each sub-image block in the associated block respectively.
[0427] The video processing method shown in FIG. 15 can be described above, and will not be described here.
[0428] Fig. 16 is a schematic block diagram of a video processing apparatus 1600 provided by an embodiment of the present application. The apparatus 1600 is used to perform the embodiment of the method shown in Fig. 14. The apparatus 1600 includes the following units:
[0429] a construction module 1610 for sequentially scanning N (N is smaller than M) neighboring blocks among M preset neighboring blocks of a current image block, determining a target neighboring block according to the scanning result, determining an associated block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block, and dividing the current image block and the associated block into a plurality of sub-image blocks in the same manner, so that each sub-image block in the current image block corresponds one-to-one with each sub-image block in the associated block; a prediction module 1620 used for respectively predicting corresponding sub-image blocks in the current image block based on the motion vector of each sub-image block in the associated block.
[0430] In one example, N is equal to 1 or 2.
[0431] In one example, the prediction module further includes: before predicting the corresponding sub-image block in the current image block according to the motion vector of each sub-image block in the associated block, the representative motion vector of the associated block is input as a candidate into a motion vector first candidate list; If it is determined that the candidate is adopted, the prediction module is used to respectively predict the corresponding sub-image block in the current image block according to the motion vector of each sub-image block in the associated block.
[0432] In one example, predicting a corresponding sub-image block in the current image block based on a motion vector of each sub-image block in the associated block includes: The motion vector of each sub-image block in the associated block is taken as the motion vector of the corresponding sub-image block in the current image block.
[0433] In one example, the representative motion vector of the relevant block is put into a motion vector first candidate list as the first candidate.
[0434] In one example, the representative motion vector of the associated block includes a motion vector of a center position of the associated block.
[0435] In one example, the prediction module further comprises: when a sub-image block for which a motion vector cannot be obtained is encountered in the associated block, a representative motion vector of the associated block is used to predict the corresponding sub-image block in the current image block as the motion vector of the sub-image block for which a motion vector cannot be obtained.
[0436] In one example, the prediction module further abandons predicting the corresponding sub-image blocks in the current image block based on the motion vectors of each sub-image block in the associated block when a sub-image block for which a motion vector cannot be obtained is present in the associated block and a representative motion vector of the associated block is not obtainable.
[0437] In one example, the prediction module is further used to determine that a sub-image block in the associated block is not obtainable or that a sub-image block for which a motion vector is not obtainable has appeared in the associated block when the sub-image block in the associated block uses an intraframe coding mode.
[0438] In one example, the construction module is further used to determine other candidates and enter the other candidates into the motion vector first candidate list, where at least one candidate among the other candidates includes a motion vector of a sub-image block.
[0439] In one example, when the construction module determines to adopt one of the other candidates, it is further used for determining a motion vector of a sub-image block in the current image block based on the adopted candidate.
[0440] In one example, the at least one candidate includes a motion vector of a set of control points.
[0441] In one example, the prediction module further comprises: when determining to adopt a candidate among the at least one candidate, performing affine transformation on the adopted candidate according to an affine transformation model; and predicting a 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 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 motion vectors of three control points.
[0443] In one example, the construction module further comprises: determining a group of control point motion vectors of the neighboring blocks of the current image block, the control point motion vectors being predicted in an affine transformation mode in a specific scan order; and inputting the control point motion vectors of each determined neighboring block as a candidate into the first motion vector candidate list.
[0444] In one example, determining a group of control point motion vectors of neighboring blocks of the current image block, which are predicted in an affine transformation mode according to a specific scan order, includes: determining a group of control point motion vectors of a first neighboring block in a first scanning order in a left neighboring block of the current image block; determining a group of control point motion vectors of a second neighboring block in a second scanning order in an upper neighboring block of the current image block; and putting the motion vectors of the control points of the first neighboring block and the motion vectors of the control points of the second neighboring block into the first candidate list of motion vectors.
[0445] In one example, the construction module further comprises: constructing motion vectors of the control points of the current image block based on neighboring blocks of the control points; and putting the motion vectors of some control points of the current image block into the first candidate list of motion vectors.
[0446] In one example, constructing motion vectors of the control points of the current image block based on neighboring blocks of the control points includes: For each control point in the portion of control points, sequentially scanning a specific neighboring block of the control point in a third scanning order, and setting a 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 comprises: When the motion vectors of the part of the control points respectively point to different reference frames, the part of the motion vectors of the current image block are used to discard being put into the first motion vector candidate list.
[0448] In one example, if the number of candidates in the first motion vector candidate list is greater than a preset value, the motion vectors of some control points of the current image block are discarded from being included in the first motion vector candidate list.
[0449] In one example, the construction module further comprises: Construct a motion vector second candidate list, where the candidate in the motion vector second candidate list is a motion vector of an image block; If it is determined that a candidate in the second motion vector candidate list is adopted, the motion vector of the candidate is used to determine the motion vector of the current image block.
[0450] In one example, determining the motion vector of the current image block based on the candidate motion vectors includes: The method includes setting the determined candidate to be adopted as the motion vector of the current image block, or setting the determined candidate to be adopted as the motion vector of the current image block after scaling the determined candidate to be adopted.
[0451] In one example, the constructed motion vector second candidate list includes: determining a candidate to be included in the second motion vector candidate list based on the motion vectors of a plurality of neighboring blocks in the current image of the current image block;
[0452] In one example, the plurality of neighboring blocks in the current image of the current image block includes the predetermined M neighboring blocks.
[0453] In one example, the construction module further comprises: The motion vectors of the M predetermined neighboring blocks are used in turn in a predetermined order to be put into the second motion vector candidate list as M candidates, respectively.
[0454] The N neighboring blocks refer to the N neighboring blocks that are first determined in the preset order.
[0455] In one example, the construction module further comprises: When the motion vectors of one or more neighboring blocks among the M neighboring blocks are unavailable, this is used to abandon determining candidates to be included in the second motion vector candidate list based on the motion vectors of the one or more neighboring blocks.
[0456] In one example, the step of sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result includes: The method includes sequentially scanning the N neighboring blocks, stopping the scanning when a neighboring block that meets a first preset condition is scanned, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition.
[0457] In one example, determining the target neighboring block based on the scanned first neighboring block that meets the preset condition includes: The method further comprises determining a neighboring block that meets the first preset condition as the target neighboring block.
[0458] In one example, the preset condition is: The reference image of the neighboring block and the reference image of the current image block are the same.
[0459] In one example, the construction module is further used to perform a scaling process on a motion vector of a specific neighboring block among the M neighboring blocks when no neighboring block matching the preset condition is scanned among the N neighboring blocks, and a prediction module is used to predict the current image block based on the motion vector after the scaling process.
[0460] In one example, predicting the current image block based on the scaled motion vector includes: determining a reference block for the current image block based on the motion vector after the scaling process and a reference image for the current image block;
[0461] In one example, the specific neighboring block is the first neighboring block or the last neighboring block obtained in a scanning order among the N neighboring blocks.
[0462] In one example, performing a scaling process on a 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, performing a scaling process on the motion vector of the specific neighboring block so that a reference frame indicated by the motion vector after the scaling process is the same as a reference image of the current image block; The method includes setting an image block indicated by the motion vector after the scaling process in a reference image for the current image block as the reference block for the current image block.
[0463] In one example, when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, a default block is taken as the reference block for the current image block.
[0464] In one example, the default block is the image block pointed to by motion vector (0,0).
[0465] In one example, the size of the sub-image block and / or the size of its associated block is fixed at 64 pixels or greater.
[0466] In one example, the size of the sub-image block and / or the size of its associated block is fixed to 8x8 pixels, or 16x4 pixels or 4x16 pixels.
[0467] In one example, when the size of a sub-image block in ATMVP technology and / or the size of an associated block of the sub-image block is 8×8 pixels or at least one of the width and height is smaller than 8 pixels, TMVP operation is set not to be performed, so that some redundant operations can be skipped, effectively saving the encoding and decoding time, and improving the encoding efficiency.
[0468] In one example, the current image block is a coding unit CU.
[0469] In one example, 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 includes: The motion vector of the target neighboring block includes determining a related block of the current image block in a reference image of the current image block.
[0470] In one example, the neighboring blocks are image blocks adjacent to or having a certain position pitch to the position of the current image block on the current image.
[0471] In one example, predicting the current image block based on the motion vector of the associated block includes: 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, the reference block of the current image block is determined based on the motion vector of the associated block after processing and the reference image of the current image block.
[0472] Here, the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing.
[0473] In one example, the motion vector of the associated block after the processing is: a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or It contains the motion vectors of the associated blocks for which the scaling step has been skipped.
[0474] In one example, predicting the current image block based on the motion vector of the associated block includes: The method further comprises abandoning 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.
[0475] In one example, the construction module further comprises: 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, it is used to determine 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.
[0476] Here, the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing.
[0477] In one example, the motion vector of the associated block after the processing is: a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or It contains the motion vectors of the associated blocks for which the scaling step has been skipped.
[0478] In one example, M is 4 or less.
[0479] Fig. 17 is a schematic block diagram of a video processing apparatus 1700 provided by an embodiment of the present application. The apparatus 1700 is used to perform the embodiment of the method shown in Fig. 15. The apparatus 1700 includes the following units:
[0480] a construction module 1710 for determining M neighboring blocks of a current image block according to M candidates in a second motion vector candidate list of the current image block, sequentially scanning N (N is smaller than M) neighboring blocks among the M neighboring blocks, and determining a target neighboring block according to the scanning result; determining an associated block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block; determining a specific candidate in a first motion vector candidate list of the current image block according to the associated block of the current image block; and if it is determined to use the specific candidate, dividing the current image block and the associated block into a plurality of sub-image blocks in the same manner, and each sub-image block in the current image block is used to make a one-to-one correspondence with each sub-image block of the associated block; a prediction module 1720 used for respectively predicting corresponding sub-image blocks in the current image block based on the motion vector of each sub-image block in the associated block.
[0481] In one example, at least one candidate in the first motion vector candidate list includes a motion vector of a sub-image block, and each candidate in the second motion vector candidate list includes a 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 motion vectors of M neighboring blocks of the current image block in the current image.
[0484] In one example, the step of sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result includes: The method includes sequentially scanning the N neighboring blocks, stopping the scanning when a neighboring block that meets a first preset condition is scanned, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition.
[0485] In one example, determining the target neighboring block based on the scanned neighboring block that meets the first preset condition includes: The method further comprises determining a neighboring block that meets the first preset condition as the target neighboring block.
[0486] In one example, the preset condition is: The reference image of the neighboring block and the reference image of the current image block are the same.
[0487] In one example, the construction module is further used to perform a scaling process on a motion vector of a specific neighboring block among the M neighboring blocks when no neighboring block matching the preset condition is scanned among the N neighboring blocks, and a prediction module is used to predict the current image block based on the motion vector after the scaling process.
[0488] In one example, predicting the current image block based on the scaled motion vector includes: determining a reference block for the current image block based on the motion vector after the scaling process and a reference image for the current image block;
[0489] In one example, the specific neighboring block is the first neighboring block or the last neighboring block obtained in a scanning order among the N neighboring blocks.
[0490] In one example, performing a scaling process on a 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, performing a scaling process on the motion vector of the specific neighboring block so that a reference frame indicated by the motion vector after the scaling process is the same as a reference image of the current image block; The method includes setting an image block indicated by the motion vector after the scaling process in a reference image for the current image block as the reference block for 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 taken as the reference block for the current image block.
[0492] In one example, the default block is the image block pointed to by motion vector (0,0).
[0493] In one example, the size of the sub-image block and / or the size of its associated block is fixed at 64 pixels or greater.
[0494] In one example, the size of the sub-image block and / or the size of its associated block is fixed to 8x8 pixels, or 16x4 pixels or 4x16 pixels.
[0495] In one example, when the size of a sub-image block in ATMVP technology and / or the size of an associated block of the sub-image block is 8×8 pixels or at least one of the width and height is smaller than 8 pixels, TMVP operation is set not to be performed, so that some redundant operations can be skipped, which can effectively save the encoding and decoding time and improve the encoding efficiency.
[0496] In one example, the current image block is a coding unit CU.
[0497] In one example, 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 includes: The motion vector of the target neighboring block includes determining a related block of the current image block in a reference image of the current image block.
[0498] In one example, the neighboring blocks are image blocks adjacent to or having a certain position pitch to the position of the current image block on the current image.
[0499] In one example, predicting the current image block based on the motion vector of the associated block includes: 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, the reference block of the current image block is determined based on the motion vector of the associated block after processing and the reference image of the current image block.
[0500] Here, the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing.
[0501] In one example, the motion vector of the associated block after the processing is: a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or It contains the motion vectors of the associated blocks for which the scaling step has been skipped.
[0502] In one example, predicting the current image block based on the motion vector of the associated block includes: The method further comprises abandoning 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.
[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 related block after processing 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 relevant block after the processing is the same as the motion vector of the relevant block before the processing.
[0505] In one example, the motion vector of the associated block after the processing is: a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or It contains the motion vectors of the associated blocks for which the scaling step has been skipped.
[0506] In one example, predicting a corresponding sub-image block in the current image block based on a motion vector of each sub-image block in the associated block includes: The motion vector of each sub-image block in the associated block is set as the motion vector of a corresponding sub-image block in the current image block.
[0507] In one example, determining a specific candidate in a first motion vector candidate list for the current image block based on the associated block of the current image block includes: and inputting a representative motion vector of a related block of the current image block as the specific candidate into the motion vector first candidate list.
[0508] In one example, the representative motion vector of the relevant block is put into a motion vector first candidate list as the first candidate.
[0509] In one example, the representative motion vector of the associated block includes a motion vector of a center position of the associated block.
[0510] In one example, the prediction module further comprises: when a sub-image block with an unobtainable motion vector is encountered in the associated block, a representative motion vector of the associated block is used 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.
[0511] In one example, the prediction module is further used to abandon predicting corresponding sub-image blocks in the current image block based on the motion vectors of each sub-image block in the associated block when a sub-image block for which a motion vector cannot be obtained is present in the associated block and a representative motion vector of the associated block is not obtainable.
[0512] In one example, the prediction module is further used to determine that a sub-image block in the associated block is not obtainable or that a sub-image block for which a motion vector is not obtainable has appeared in the associated block when the sub-image block in the associated block uses an intraframe coding mode.
[0513] In one example, the prediction module further performs affine transformation on the adopted candidate according to an affine transformation model when determining to adopt one of the candidates other than the specific candidate in the second motion vector candidate list; and predicting a sub-image block in the current image block based on the candidate after the affine transformation.
[0514] In one example, in at least one candidate other than the particular candidate in the second motion vector candidate list, 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; 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 embodiment, the prediction module further determines a group of control point motion vectors of the neighboring blocks of the current image block, the control point motion vectors being predicted by adopting an affine transformation mode in a specific scan order; The control point motion vectors of each determined neighboring block are used as a candidate to be entered into the first candidate motion vector list.
[0517] In one example, determining a group of control point motion vectors of neighboring blocks of the current image block, which are predicted in an affine transformation mode according to a specific scan order, includes: determining a group of control point motion vectors of a first neighboring block in a first scanning order in a left neighboring block of the current image block; determining a group of control point motion vectors of a second neighboring block in a second scanning order in an upper neighboring block of the current image block; and putting the motion vectors of the control points of the first neighboring block and the 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 motion vectors of the control points of the current image block based on neighboring blocks of the control points; It is used to put the motion vectors of some control points of the current image block into the motion vector first candidate list.
[0519] In one example, constructing motion vectors of the control points of the current image block based on neighboring blocks of the control points includes: For each control point in the portion of control points, sequentially scanning a specific neighboring block of the control point in a third scanning order, and setting a motion vector of the specific neighboring block that satisfies a preset condition as the motion vector of the control point.
[0520] In one example, the construction module is further used to discard motion vectors of some control points of the current image block from being included in the motion vector first candidate list if the motion vectors of the some control points respectively point to different reference frames.
[0521] In one example, the construction module is further used to discard motion vectors of some control points of the current image block from being included in the first motion vector candidate list when the number of candidates in the first motion vector candidate list is greater than a predetermined value.
[0522] In one example, the construction module further constructs a motion vector second candidate list, where the candidate in the motion vector second candidate list is a motion vector of an image block; If it is determined that a candidate in the second motion vector candidate list is adopted, the motion vector of the candidate is used to determine the motion vector of the current image block.
[0523] In one example, determining the motion vector of the current image block based on the candidate motion vectors includes: The method includes setting the determined candidate to be adopted as the motion vector of the current image block, or setting the determined candidate to be adopted as the motion vector of the current image block after scaling the determined candidate to be adopted.
[0524] In one example, the constructed motion vector second candidate list includes: determining the M candidates to be put into the second motion vector candidate list based on the motion vectors of M neighboring blocks in the current image of the current image block;
[0525] In one example, the construction module is further used for inputting the motion vectors of the predetermined M neighboring blocks into the motion vector second candidate list as M candidates in a predetermined order; The N neighboring blocks refer to the N neighboring blocks that are first determined in the preset order.
[0526] In one example, the construction module is further used to abandon determining candidates to be included in the second motion vector candidate list based on the motion vectors of one or more neighboring blocks when the motion vectors of one or more neighboring blocks among the M neighboring blocks are unavailable.
[0527] In one example, M is 4 or less.
[0528] As shown in FIG. 18 , an embodiment of the present application further provides a video processing method 1800, which includes the following steps.
[0529] S1810, determining a base motion vector list, the base motion vector list including at least one bi-predictive base motion vector group, the bi-predictive base motion vector group including a first base motion vector and a second base motion vector.
[0530] S1820, determining two motion vector offsets from a preset offset set, the two motion vector offsets corresponding to the first base motion vector and the second base motion vector respectively.
[0531] S1830, determining a motion vector of a current image block according to the first base motion vector, the second base motion vector and the deviation amount of the two motion vectors.
[0532] S1840, predicting the current image block according to the motion vector of the current image block.
[0533] The video processing method of an embodiment of the present application shifts a base motion vector of a bi-predictive base motion vector group based on a preset set of shift amounts, thereby obtaining a more accurate motion vector for a current image block through a finite number of calculations, and making the predicted residual smaller, thereby improving coding efficiency.
[0534] In some embodiments, the video processing method of the embodiments of the present application can be used to improve the Merge with Motion Vector Difference (MMVD) technique, also called the Ultimate motion vector expression (UMVE) technique, and in particular to construct a merge candidate list for the MMVD technique, also called the motion vector candidate list.
[0535] In some embodiments, before S1810, the video processing method 1800 may further include a step of obtaining a merge candidate list, where the merge candidate list includes P sets of merge motion vector candidates, where P is an integer equal to or greater than 1. The step of determining a base motion vector list S1810 may include determining the base motion vector list based on the merge candidate list. For example, when P is equal to or greater than 2, take two sets of merge motion vector candidates in the merge candidate list to form the base motion vector list. Optionally, the two sets of merge motion vector candidates may be the previous two sets of merge motion vector candidates in the merge candidate list, or may be the other two sets of merge motion vector candidates when the previous two sets of merge motion vector candidates do not meet a condition. Alternatively, the two sets of merge motion vector candidates may be any two sets of merge motion vector candidates in the merge candidate list that meet a condition, and the embodiment of the present application is not limited thereto. Also, for example, when P is less than 2, the base motion vector list is formed by filling with motion vector (0,0).
[0536] Specifically, the MMVD technique may first construct a base motion vector list 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, the merge motion vector candidates in the existing merge candidate list are fully searched, and if the number of merge motion vector candidate pairs in the existing merge list is greater than two, the first two merge motion vector candidate pairs in the merge list are taken to form the base MVP list of the MMVD. If not, the base MVP list of the MMVD is filled with MV(0,0). In the embodiment of the present application, the base motion vector list may be filled with other default motion vectors, such as (1,1), (2,2), etc., and the embodiment of the present application is not limited thereto.
[0537] It should be understood that, among the two sets of base MVs included in the base MVP list, each set of base MVs may be a unidirectional prediction base motion vector or a bi-prediction base motion vector group. Of course, the base MVP list may include more or less sets of base MVs, and the present application is not limited thereto. In this specification, the bi-prediction base motion vector group situation is considered, and the two base motion vectors included in the bi-prediction base motion vector group may be a forward base motion vector and a backward base motion vector, or may be two base motion vectors of the same direction, for example, two forward base motion vectors or two forward base motion vectors.
[0538] Optionally, in some embodiments, determining two motion vector offsets from a preset offset set S1820 may include determining a set of multiple motion vector offsets including two motion vector offsets from the offset set, and 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 offsets S1830 may include determining a motion vector offset set from the multiple motion vector offset sets that makes a rate-distortion loss satisfy a preset condition, and determining a motion vector of a current image block according to the first base motion vector, the second base motion vector, and the motion vector offset set that makes the rate-distortion loss satisfy a preset condition. Optionally, the rate-distortion loss satisfying the preset condition may be a rate-distortion loss smaller than a preset threshold, or a rate-distortion loss that is the smallest, for example, a prediction residual that is the smallest, and the embodiments of the present application are not limited thereto.
[0539] In the embodiment of the present application, the MMVD technique can offset the base motion vector predictor according to a certain rule, generate a new motion vector prediction candidate, and enter it into the MMVD motion vector candidate list as the MMVD motion vector predictor. Optionally, in some embodiments, the motion vector offset in the offset set can be selected from 8 options (2 1 ,2 2 ,……,2 8 ), that is, the preset offset set 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 offset (offset) has 8 choices (2 1 ,2 2 ,……,2 8) for two components MV_x, MV_y of a set of base MVs in the base MVP list of MMVD, (two selections) motion vector offset can be added to or subtracted from them. Specifically, for example, MMVD motion vector predictor=base motion vector predictor+motion vector deviation offset. Therefore, the motion vector of the current image block of MMVD has a total of 2x8x2x2=64 refinement modes. The embodiment of the present application may select a part of the 64 refinement modes or derive more refinement modes from the 64 refinement modes, but is not limited to the 64 refinement modes. For example, the number of refinement modes may be 32, 128, etc., but the embodiment of the present application is not limited thereto. From these motion vectors, a motion vector that satisfies a preset condition for 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 makes the rate-distortion loss satisfy a preset condition may be equivalent to determining a set of motion vector deviations that make the rate-distortion loss satisfy a preset condition from among the plurality of sets of motion vector deviations. A motion vector of a current image block is determined based on the first base motion vector, the second base motion vector, and the set of motion vector deviations that make the rate-distortion loss satisfy a preset condition.
[0541] It should be understood that two motion vector offsets in a motion vector offset set may be the same or different.
[0542] Optionally, a combination set of multiple motion vector shift amounts including two motion vector shift amounts can be formed by fully searching the motion vector shift amounts in a preset shift amount set to form a combination of multiple motion vector shift amounts.
[0543] Alternatively, one of the combinations of the motion vector deviation amounts may be one of the motion vector deviation amounts in the deviation amount set obtained by calculation according to a preset algorithm, and the motion vector deviation amount obtained by the calculation is set as one fixed value, and the motion vector deviation amounts in the deviation amount set are subjected to a full search to obtain another motion vector deviation amount in the combinations of the motion vector deviation amounts, thereby forming a combination of the motion vector deviation amounts.A suitable combination of motion vector deviation amounts is found by a simple full search without performing a scaling operation (scaling operation with a scale of 1), thereby reducing the overall amount of calculation and improving the encoding / decoding efficiency.
[0544] Alternatively, one of the combinations of multiple sets of motion vector deviation amounts may be one of the motion vector deviation amounts in a set of deviation amounts calculated using a preset algorithm, and the motion vector deviation amount obtained by the calculation is set as a fixed value, and the fixed value is scaled to obtain another motion vector deviation amount in the combinations of multiple sets of motion vector deviation amounts, thereby forming a combination of multiple sets of motion vector deviation amounts.
[0545] Alternatively, the combinations of the sets of motion vector deviation amounts including two motion vector deviation amounts can be formed in other manners, and the embodiments of the present application are not particularly limited thereto.
[0546] Optionally, in some embodiments, when the first base motion vector and the second base motion vector both point to a non-specific reference image, a new motion vector offset can be obtained after performing a scaling operation on the selected motion vector offset. Also, the first base motion vector and the second base motion vector are adjusted according to the new motion vector offset. The motion vector of the current image block is determined based on the first base motion vector, the second base motion vector and the two new motion vector offsets, i.e., the adjusted motion vector is determined, and the current image block is predicted based on the motion vector of the current image block. That is, in bi-prediction, when determining a motion vector prediction value of the current image block using MMVD technology, if the distances from the current image to the reference images of the two base motion vectors are different, it is necessary to scale the motion vector offset, and then add (or subtract) the scaled motion vector offset to (or from) the base motion vector prediction value to determine the motion vector of the current image block.
[0547] When the first base motion vector and the second base motion vector both point to a non-specific reference image, the two motion vector offsets are used to adjust the first base motion vector and the second base motion vector according to the two motion vector offsets. Optionally, a ratio between a distance from the current image to a reference image of the first base motion vector and a distance from the current image to a reference image of the second base motion vector is equal to a ratio between a motion vector offset used by the first base motion vector and a motion vector offset used by the second base motion vector. In other words, a scale is determined by a distance between an image where a current image block (e.g., a first image block) is located and reference images in two reference directions of the current image block, and the two reference images are reference images of the current base motion vector. This embodiment can further reduce the number of combinations of motion vector offsets to be tried, and can further improve encoding and decoding efficiency.
[0548] The adjustment may be to add the two motion vector shift amounts to the first base motion vector and the second base motion vector, respectively, or may be to subtract the two motion vector shift amounts to the first base motion vector and the second base motion vector, respectively.
[0549] For example, in the encoding or decoding process, there are eight selectable motion vector deviations: {2, 4, 8, 16, 32, 64, 128, 256}. The motion vector deviation selected in the current process is denoted as X. The frame number of the current image is denoted as P2, and the frame number of the reference image of the first base motion vector and the frame number of the reference image of the second base motion vector are denoted as P0 and P1, respectively. If P2-P0=P2-P1, the same size of motion vector deviation X is added to the two base motion vectors. If P2-P0=2*(P2-P1), the motion vector deviation 2*X is added to the first base motion vector, and the motion vector deviation X is added to the second base motion vector; similarly, if P2-P1=2*(P2-P0), the motion vector deviation X is added to the first base motion vector, and the motion vector deviation 2*X is added to the second base motion vector.
[0550] Also, if the ratio between 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 (multiple of 2) is selected so that the ratio between the motion vector shift amount used by the first base motion vector and the motion vector shift amount used by the second base motion vector is as close as possible to the ratio between 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), the ratio is selected as 2 or 4. The motion vector shift amount 2*X is added to the first base motion vector, and the motion vector shift amount X is added to the second base motion vector, or the motion vector shift amount 4*X is added to the first base motion vector, and the motion vector shift amount X is added to the second base motion vector. Also, for example, if P2-P0=5*(P2-P1), the ratio is selected as 4, which is a multiple of 2 closest to 5. A motion vector deviation amount 4*X is added to the first base motion vector, and a motion vector deviation amount X is added to the second base motion vector.
[0551] When the first base motion vector and / or the second base motion vector point to a specific reference picture (i.e., when the reference picture of the current image block is a specific reference picture), scaling with respect to the motion vector shift amount is meaningless because the definition of the temporal distance between the specific reference picture and the current image block is ambiguous.
[0552] Optionally, in some embodiments, 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 deviation amounts includes a motion vector deviation amount obtained after scaling an initial starting motion vector deviation amount with 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 point to a specific reference image, determine the motion vector of the current image block according to the processed motion vector deviation amount and the base motion vector group, where the processed motion vector deviation amount is the same as the pre-processed motion vector deviation amount. For example, at least one of the processed two motion vector deviation amounts includes a motion vector deviation amount obtained after row scaling the initial start vector deviation amount with a scale of value 1, or a motion vector deviation amount obtained by skipping the scaling operation.
[0554] In one specific embodiment, a certain motion vector deviation (e.g., offset1) among the two motion vector deviations 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 the first base motion vector and the second base motion vector both point to a specific reference image, another motion vector deviation (e.g., offset2) may be obtained by scaling offset1 with scale 1, or may be obtained without scaling offset1. Or, another motion vector deviation (e.g., offset2) may be obtained by scaling an initial deviation with scale 1, or may be obtained without scaling. In other words, the initial motion vector deviation may be offset1, or may be another initial deviation, and the embodiment of the present application is 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 sending a code stream to the decoding side, and the code stream includes an index for instructing the combination of the motion vector deviations that makes the rate-distortion loss satisfy a preset condition. In this embodiment, the encoding side notifies the decoding side of the index of the combination of the determined motion vector deviations, so that the decoding side can know the two motion vector deviations with less calculation, and the decoding side can be simplified. Optionally, when a certain motion vector deviation (e.g., offset1) among the two motion vector deviations can be calculated by a preset algorithm, the index can be the ratio of another motion vector deviation (e.g., offset2) to offset1.
[0556] In some embodiments of the present application, the method is performed by the decoding side, and the method further includes receiving a code stream sent by the encoding side, the code stream includes an index for instructing two motion vector offsets to be a combination, and determining the two motion vector offsets from the set of preset offsets includes determining the two motion vector offsets based on the index. In this embodiment, the encoding side notifies the decoding side of an index of the combination of the determined motion vector offsets, so that the decoding side can know the two motion vector offsets with less calculation, and the decoding side can be simplified. Optionally, when a certain motion vector offset (e.g., offset1) of the two motion vector offsets can be calculated by a preset algorithm, the index may be a ratio of another motion vector offset (e.g., offset2) to offset1.
[0557] Above, the method embodiment of the present application has been described with reference to FIG. 1 and FIG. 18. Hereinafter, the device embodiment corresponding to the above method embodiment will be described. Note that the description of the device embodiment corresponds to the description of the method embodiment, so that the above method embodiment may be referred to for those that are not described in detail. For simplicity, they will not be described again here. 19 is a schematic block diagram of a video processing apparatus 1900 provided by an embodiment of the present application. The apparatus 1900 is used to perform the embodiment of the method shown in FIG. 18. The apparatus 1900 includes: a construction module 1910 for determining a base motion vector list, the base motion vector list including at least one bi-prediction base motion vector group, the bi-prediction base motion vector group including a first base motion vector and a second base motion vector; determining two motion vector offsets from a preset offset set, the two motion vector offsets respectively corresponding to the first base motion vector and the second base motion vector; and 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 offsets; a prediction module 1920 used for predicting the current image block based on the motion vector of the current image block.
[0558] The video processing device of an embodiment of the present application shifts a base motion vector of a bi-predictive base motion vector group based on a preset set of shift amounts, and can obtain a more accurate motion vector for a current image block through a finite number of calculations, and can reduce the predicted residual, thereby improving encoding efficiency.
[0559] Optionally, in some embodiments, the construction module 1910 determining two motion vector offsets from a predetermined offset set includes the construction module determining a plurality of sets of motion vector offset combinations including two motion vector offsets from the offset set, and the construction module 1910 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 offsets includes the construction module 1910 determining a combination of motion vector offsets from the plurality of sets of motion vector offset combinations, the rate distortion loss of which satisfies a predetermined condition, and determining a motion vector of a current image block based on the combination of the first base motion vector, the second base motion vector and the motion vector offset that makes the rate distortion loss satisfy a predetermined condition.
[0560] Optionally, in some embodiments, the video processing device 1900 is used on the encoding side, and the video processing device 1900 further includes a transmission module used for coding based on a prediction result and transmitting a code street to a decoding side, and the code street includes an index for indicating a combination with a motion vector deviation amount that makes a rate distortion loss satisfy a predetermined condition.
[0561] Optionally, in some embodiments, the video processing device 1900 is used on the decoding side, and the video processing device 1900 further includes a receiving module used for receiving a code street transmitted by the encoding side, where the code street includes an index for instructing two motion vector offset amounts to be combined, and the construction module 1910 determining two motion vector offset amounts from a preset offset set includes determining the two motion vector offset amounts based on the index.
[0562] Optionally, in some embodiments, 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 deviation amounts includes a motion vector deviation amount obtained after scaling an initial starting motion vector deviation amount with a scale of numerical value 1, or a motion vector deviation amount obtained by skipping the scaling operation.
[0563] Optionally, in some embodiments, when the first base motion vector and the second base motion vector both point to a non-specific reference image, the two motion vector offset amounts are used to adjust the first base motion vector and the second base motion vector based on the two motion vector offset 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 shift amount used by the first base motion vector to the motion vector shift 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 including P sets of merge motion vector candidates, where P is an integer greater than or equal to 1, and the construction module 1910 determining a 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 two sets of merge motion vector candidates in the merge candidate list to form the base motion vector list.
[0567] Optionally, in some embodiments, the construction module 1910 determining the base motion vector list based on the merge candidate list includes, if P is less than 2, the construction module 1910 filling with motion vector (0,0) to form the base motion vector list.
[0568] Optionally, in some embodiments, the preset set of offset amounts 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-predictive image block.
[0571] Fig. 20 is a schematic block diagram of a video processing device provided by an embodiment of the present application. The video processing device 2000 shown in Fig. 20 may include a processor 2010 and a memory 2020, and computer instructions are stored in the memory 2020. When the processor 2010 executes the computer instructions, the video processing device 2000 executes the steps of determining a base motion vector list, the base motion vector list including at least one bi-prediction base motion vector group, the bi-prediction base motion vector group including a first base motion vector and a second base motion vector, determining two motion vector offsets from a preset offset set, the two motion vector offsets respectively corresponding to the first base motion vector and the second base motion vector, 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 offsets, and predicting the current image block based on the motion vector of the current image block.
[0572] It should be noted that the video processing device 2000 according to the embodiment of the present application may further include a network interface for transmitting a codestream, for example, receiving a codestream transmitted from an encoding device.
[0573] In some embodiments of the present application, the processor 2010 determining two motion vector offsets from a predetermined offset set includes determining a plurality of sets of motion vector offset combinations including two motion vector offsets from the offset set, and the processor 2010 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 offsets includes determining a combination of motion vector offsets from the plurality of sets of motion vector offset combinations that makes the rate distortion loss satisfy a predetermined condition, and determining a motion vector of the current image block based on the combination of the first base motion vector, the second base motion vector and the motion vector offset that makes the rate distortion loss satisfy a predetermined condition.
[0574] In some embodiments of the present application, the video processing device 2000 is used on the encoding side, and the processor 2010 is further used for encoding based on the result of prediction and transmitting a code street to the decoding side, the code street including an index used to indicate a combination of motion vector displacement amounts that makes the rate distortion loss satisfy a predetermined condition.
[0575] In some embodiments of the present application, the video processing device 2000 is used on the decoding side, and the processor 2010 is further used to receive an encoded stream transmitted by the encoding side, where the encoded stream includes an index for instructing two motion vector offset amounts to be combined, and the processor 2010 determining two motion vector offset amounts from a preset offset amount set includes determining the two motion vector offset 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 deviation amounts includes a motion vector deviation amount obtained after scaling an initial motion vector deviation amount with a scale value of 1, or a motion vector deviation amount obtained by skipping a zoom operation.
[0577] In some embodiments of the present application, when the first base motion vector and the second base motion vector all point to a non-specific reference image, the two motion vector offset amounts are used to adjust the first base motion vector and the second base motion vector based on the two motion vector offset 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 shift amount used for the first base motion vector to the motion vector shift 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 including P sets of merge motion vector candidates, where P is an integer greater than or equal to 1, and the processor 2010 determining a 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 previous 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, the processor 2010 determining the base motion vector list based on the merge candidate list includes filling with motion vector (0,0) to form the base motion vector list if P is less than 2.
[0582] In some embodiments of the present application, the preset offset 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-predictive image block.
[0585] It should be understood that the video processing device 2000 as shown in FIG. 20 or the video processing device 1900 as shown in FIG. 19 can perform the operations or flows in the above-mentioned method embodiments, and the operations and / or functions of each module and device in the video processing device 2000 or the video processing device 1900 are for realizing the corresponding flows of the above-mentioned method embodiments, and will not be described again here for the sake of simplicity.
[0586] An embodiment of the present application further provides a video processing method, comprising: determining a base motion vector list, the base motion vector list including a base motion vector group, and when at least one base motion vector in the base motion vector group points to a specific reference image, abandoning determining a motion vector of the current image block according to the base motion vector group and a motion vector deviation amount, i.e., abandoning putting a corresponding motion vector into an MV candidate list when at least one base motion vector in the base motion vector group points to a specific reference image.
[0587] In some embodiments of the present application, a merge candidate list is obtained, the merge candidate list including 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, determining the base motion vector list based on the merge candidate list includes, when P is greater than or equal to 2, taking the previous two sets of merge motion vector candidates in the merge candidate list to form the base motion vector list.
[0589] In some embodiments of the present application, determining the base motion vector list based on the merge candidate list includes, if P is less than 2, filling with motion vector (0,0) to form the base motion vector list.
[0590] In some embodiments of the present application, the current image block is a coding unit CU.
[0591] Accordingly, the present application provides a moving image processing device, including a determination module used for determining a base motion vector list including a group of base motion vectors, and a processing module used for abandoning determining a motion vector of the current image block based on a motion vector deviation amount from the 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.
[0592] In some embodiments of the present application, the video processing device further includes a construction module, which is used to obtain a merge candidate list, the merge candidate list including P sets of merge motion vector candidates, where P is an integer greater than or equal to 1, and the determination module is specifically used to determine the base motion vector list based on the merge candidate list.
[0593] In some embodiments of the present application, the determination module is specifically used for taking the previous two sets of merge motion vector candidates in the merge candidate list to form the base motion vector list when P is greater than or equal to 2.
[0594] In some embodiments of the present application, the determination module is specifically used to fill in motion vector (0,0) when P is less than 2 to form the base motion vector list.
[0595] In some embodiments of the present application, the current image block is a coding unit CU.
[0596] The present application further provides a video processing device including a processor and a memory, wherein the memory is used for storing instructions, and when the processor executes the instructions stored in the memory, the video processing device performs a step of determining a base motion vector list, the base motion vector list including a group of base motion vectors, and if at least one base motion vector in the group of base motion vectors points to a specific reference image, abandoning determining a motion vector of the current image block based on the group of base motion vectors and a motion vector deviation amount.
[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, and each memory is used to store instructions for performing the method according to each embodiment of the present application, and the processor can execute the above instructions to perform the method according to each embodiment of the present application.
[0598] It should be understood that the processor referred to in the embodiments of this specification may include a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP. The processor may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The 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] It should be noted that the memory referred to in the embodiments of this specification may be a volatile memory or a non-volatile memory, or may include both a volatile memory and a non-volatile memory. Here, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The volatile memory may be a random access memory (RAM), which is used as an external high-speed cache. By way of example, and not limitation, many types of RAM can be used, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM), and direct memory bus random access memory (direct RAMbus RAM, DR RAM).
[0600] It should be noted that when the processor is a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, the memory (storage module) may be integrated into the processor.
[0601] It should be understood that memory as described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
[0602] An embodiment of the present application further provides a computer-readable storage medium having instructions stored thereon, which, when executed by a computer, cause the computer to perform steps of the above method embodiments.
[0603] An embodiment of the present application further provides a computing device including the computer-readable storage medium.
[0604] An embodiment of the present application further provides a computer program product comprising instructions that, when the computer executes the instructions of the computer program product, cause the computer to perform steps of the method embodiments.
[0605] The embodiments of the present application further provide a computer chip for causing a computer to execute the steps of the above method embodiments.
[0606] Embodiments of the present application are applicable in the aviation, and in particular unmanned aerial vehicle, field.
[0607] It should be noted that the division of circuits, sub-circuits, and sub-cells in each embodiment of the present application is only schematic, and those skilled in the art will recognize that the circuits, sub-circuits, and sub-units in each example described in the embodiments disclosed herein can be divided or combined.
[0608] The apparatus provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may 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 a computer and executed, the process or function according to the embodiments of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another site, computer, server, or data center in a wired (e.g., coaxial cable, fiber optic, digital (DSL)) or wireless (e.g., infrared, radio, microwave, etc.) manner. The computer-readable storage medium may be any available medium accessible by a computer or may be a data storage device, such as a server, data center, in which one or more available media are integrated. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), optical medium (e.g., high-density digital video disc (DVD)), or semiconductor medium (e.g., SSD), etc.
[0609] It should be understood that the first, second, and various numeral numbers described herein are merely distinctions for convenience of description and are not intended to limit the scope of the present application.
[0610] Here, the term "and / or" merely describes the relationship between related objects and indicates that a triple relationship can exist, for example, A and / or B can indicate that A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the character " / " in this specification generally means that the related objects before and after it are in an "or" relationship.
[0611] It should be understood that in the embodiments of the present application, the size of the numbers of each of the above processes does not imply the order of execution, and the order of execution of each process should be determined by its function and inherent logic, and is not limited in any way to the implementation process of the embodiments of the present application.
[0612] Those skilled in the art can recognize that each example unit and algorithm step described in connection with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to realize the described functions, but such realization should not be considered as being outside the scope of this application.
[0613] For ease of description and conciseness, the specific operation procedures of the above-mentioned systems, devices and units may be referred to the corresponding procedures in the above-mentioned method embodiments and will not be described here.
[0614] In some embodiments provided herein, it should be understood that the disclosed systems, devices, and methods can be realized in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical functional division, and in actual implementation, there may be other division methods, for example, multiple units or assemblies may be combined or integrated into other systems, or some features may be omitted or not implemented. And, the shown or discussed mutual couplings or direct couplings or communication connections may be indirect couplings or communication connections via some interfaces, devices or units, which may be electrical, mechanical, or other forms.
[0615] The units described as separate components may or may not be physically separated, and the components represented as units may or may not be physical units, i.e., they may be located in one place or distributed among multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the solution of this embodiment.
[0616] Furthermore, each functional unit in each embodiment of this specification may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0617] As described above, the present application is merely a form for carrying out the invention, and the scope of protection of the present application is not limited thereto, and if a person skilled in the art can easily make modifications or replacements within the technical scope disclosed in the present application, they will be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall conform to the scope of the claims. [Item 1] A moving image processing method, comprising: Sequentially scanning N neighboring blocks, which are smaller than M, among the M predetermined 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 according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block; Dividing the current image block and the associated block into a plurality of sub-image blocks in the same manner, each sub-image block in the current image block having a one-to-one correspondence with each sub-image block in the associated block; and predicting, based on the motion vectors of each sub-image block in the associated block, each corresponding sub-image block in the current image block. [Item 2] 2. The method according to item 1, wherein N is equal to 1 or 2. [Item 3] before 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, Putting the representative motion vector of the relevant block into a first candidate motion vector list as a candidate; The method according to claim 1 or 2, further comprising: predicting, based on the motion vectors of the sub-image blocks in the related block, the corresponding sub-image blocks in the current image block, if it is determined that the candidate is adopted. [Item 4] Predicting, based on the motion vector of each sub-image block in the associated block, a corresponding sub-image block in the current image block, respectively, 4. The method according to claim 3, comprising: setting the motion vector of each sub-image block in the associated block to the motion vector of a corresponding sub-image block in the current image block. [Item 5] The method according to item 3, further comprising putting the representative motion vector of the relevant block into a motion vector first candidate list as a first candidate. [Item 6] 4. The method according to item 3, wherein the representative motion vector of the relevant block includes a motion vector of a center position of the relevant block. [Item 7] The above method is The method according to item 3, further comprising, when a sub-image block for which a motion vector cannot be obtained is found in the associated block, setting a representative motion vector of the associated block as the motion vector of the sub-image block for which a motion vector cannot be obtained, and predicting a corresponding sub-image block in the current image block. [Item 8] The above method is The method described in item 7 further includes, when there is a sub-image block in the associated block for which a motion vector cannot be obtained and a representative motion vector of the associated block cannot be obtained, abandoning prediction of each corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the associated block. [Item 9] The method described in item 8, wherein if a sub-image block in the associated block is not obtainable or if a sub-image block in the associated block uses an intraframe coding mode, it is determined that a sub-image block for which a motion vector cannot be obtained has appeared in the associated block. [Item 10] The above method is 4. The method of claim 3, further comprising determining other candidates and placing the other candidates in the motion vector first candidate list, wherein at least one of the other candidates includes a motion vector of a sub-image block. [Item 11] The above method is Item 11. The method of item 10, further comprising, when it is determined to adopt one of the other candidates, determining a motion vector of a sub-image block in the current image block based on the adopted candidate. [Item 12] 12. The method according to claim 10 or 11, wherein the at least one candidate comprises a motion vector of a set of control points. [Item 13] The above method is if determining to adopt a candidate among the at least one candidate, performing affine transformation on the adopted candidate according to an affine transformation model; 13. The method according to any one of claims 10 to 12, further comprising predicting a sub-image block in the current image block based on the candidate after the affine transformation. [Item 14] 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; Item 14. The method according to item 13, wherein, 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. [Item 15] The above method is determining a group of control point motion vectors of the neighboring blocks of the current image block, the control point motion vectors being predicted by adopting an affine transformation mode in a specific scanning order; 15. The method according to any one of items 3 to 14, further comprising: inputting a control point motion vector group of each determined neighboring block as one candidate into the first motion vector candidate list. [Item 16] Determining a group of control point motion vectors of neighboring blocks of the current image block using an affine transformation mode in a specific scan order to perform prediction from the neighboring blocks of the current image block; determining a group of motion vectors of control points of a first neighboring block in a first scanning order in a left neighboring block of the current image block; determining a group of motion vectors of control points of second neighboring blocks in a second scanning order in an upper neighboring block of the current image block; Item 16. The method of item 15, further comprising: putting the motion vectors of the control points of the first neighboring block and the motion vectors of the control points of the second neighboring block into the first candidate list of motion vectors. [Item 17] The above method is constructing motion vectors of the part of the control points of the current image block based on neighboring blocks of the part of the control points; 15. The method according to any one of items 3 to 14, further comprising: inputting motion vectors of some control points of the current image block into the motion vector first candidate list. [Item 18] Constructing motion vectors of the control points of the current image block based on neighboring blocks of the control points of the current image block includes: Item 18. The method according to item 17, comprising: for each control point in the portion of control points, sequentially scanning a specific neighboring block of the control point in a third scanning order, and setting the motion vector of the specific neighboring block that satisfies a preset condition as the motion vector of the control point. [Item 19] The above method is The method of item 17 or 18, further comprising abandoning the motion vectors of some control points of the current image block from being included in the motion vector first candidate list when the motion vectors of the some control points respectively point to different reference frames. [Item 20] The above method is The method according to item 17 or 18, further comprising: abandoning putting motion vectors of some control points of the current image block into the first motion vector candidate list when the number of candidates in the first motion vector candidate list is greater than a predetermined value. [Item 21] The above method is A second candidate motion vector list is constructed, and the candidate in the second candidate motion vector list is a motion vector of an image block; The method described in any one of items 3 to 15, further comprising, when it is determined to adopt a candidate in the second motion vector candidate list, determining a motion vector of the current image block based on the motion vector of the candidate. [Item 22] determining a motion vector of the current image block based on the candidate motion vectors, 22. The method of claim 21, further comprising: setting the candidate determined to be adopted as the motion vector of the current image block, or setting the candidate determined to be adopted as the motion vector of the current image block after scaling the candidate determined to be adopted. [Item 23] Constructing the second candidate list of motion vectors as described above includes the steps of: 22. The method of claim 21, further comprising determining candidates to be included in the second motion vector candidate list based on motion vectors of a plurality of neighboring blocks in the current image of the current image block. [Item 24] 24. The method according to item 23, wherein the plurality of neighboring blocks in the current image of the current image block include the predetermined M neighboring blocks. [Item 25] Enter the motion vectors of the M predetermined neighboring blocks as M candidates in the second motion vector candidate list in a predetermined order; 25. The method according to item 24, wherein the N neighboring blocks refer to the N neighboring blocks that are determined first in the preset order. [Item 26] The above method is 25. The method of claim 24, further comprising abandoning determining candidates to be included in the second motion vector candidate list based on the motion vectors of one or more of the M neighboring blocks if the motion vectors of one or more of the neighboring blocks are unavailable. [Item 27] Sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result, 27. The method according to claim 1 or 26, further comprising: sequentially scanning the N neighboring blocks, stopping the scanning when a neighboring block that meets a first preset condition is reached, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition. [Item 28] determining a target neighboring block based on the scanned neighboring block that meets the first preset condition; 20. The method of claim 19, further comprising determining a neighboring block that meets the first preset condition as the target neighboring block. [Item 29] The above pre-defined conditions are: 29. The method according to item 19 or 28, comprising the reference image of the neighbouring block and the reference image of the current image block being the same. [Item 30] The above method is 30. The method according to any one of items 27 to 29, further comprising: performing a scaling process on a motion vector of a specific neighboring block among the M neighboring blocks when no neighboring block that meets the preset condition is scanned among the N neighboring blocks; and predicting the current image block based on the motion vector after the scaling process. [Item 31] The step of predicting the current image block based on the motion vector after the scaling process includes: 31. The method according to claim 30, comprising determining a reference block for the current image block based on the motion vector after the scaling process and a reference image for the current image block. [Item 32] Item 31. The method according to item 30, wherein the specific neighboring block is the first neighboring block or the last neighboring block obtained in scan order among the N neighboring blocks. [Item 33] performing a scaling process on a 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, performing a scaling process on the motion vector of the specific neighboring block so that a reference frame indicated by the motion vector after the scaling process is the same as a reference image of the current image block; Item 31. The method according to item 30, further comprising: setting an image block pointed to in a reference image of the current image block by the motion vector after the scaling process as a reference block of the current image block. [Item 34] The above method is 31. The method according to any one of items 27 to 30, further comprising: if no neighboring block that meets the preset condition is scanned among the N neighboring blocks, setting a default block as a reference block for the current image block. [Item 35] Item 35. The method according to item 34, wherein the default block is the image block pointed to by the motion vector (0,0). [Item 36] 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 its associated block is fixed to 64 pixels or more. [Item 37] Item 37. The method according to item 36, wherein the size of the sub-image block and / or the size of its associated block are fixed to 8x8 pixels, or 16x4 pixels or 4x16 pixels. [Item 38] The size of said sub-image block and / or the size of its associated block are fixed at 8x8 pixels, and said method further comprises: 38. The method of claim 37, further comprising setting to no temporal motion vector prediction (TMVP) operation. [Item 39] The above method is 37. A method according to any one of items 1 to 36, further comprising setting not to perform a temporal motion vector prediction (TMVP) operation if at least one of the width and height of the sub-image block and / or the associated block of the sub-image block is smaller than 8 pixels. [Item 40] 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 according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes: 41. The method according to any one of items 1 to 40, comprising determining a motion vector of the target neighboring block, a related block of the current image block in a reference image of the current image block. [Item 42] Item 42. The method according to any one of items 1 to 41, wherein the neighboring block is an image block adjacent to or having a certain position pitch of the current image block in the current image. [Item 43] predicting the current image block based on the motion vector of the related block includes: 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, determining a reference block of the current image block according to the motion vector of the associated block after processing and the reference image of the current image block; Item 43. The method according to any one of items 1 to 42, wherein the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing. [Item 44] The motion vector of the relevant block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of 1, or Item 44. The method according to item 43, including the motion vector of the relevant block skipping the scaling step. [Item 45] predicting the current image block based on the motion vector of the related block includes: A method according to any one of items 1 to 42, comprising abandoning 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. [Item 46] The above 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, determining a reference block of the current image block according to the motion vector of the related block after processing and the reference image of the current image block; Item 46. The method according to any one of items 1 to 45, wherein the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing. [Item 47] The motion vector of the relevant block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of 1, or Item 47. The method according to item 46, including the motion vector of the relevant block skipping the scaling step. [Item 48] 48. The method according to any one of items 1 to 47, wherein M is 4 or less. [Item 49] A moving image processing method, comprising: determining M neighboring blocks of the current image block according to the M candidates in the second motion vector candidate list of the current image block; Among the M neighboring blocks, sequentially scan N neighboring blocks, which are smaller than M, and determine a target neighboring block based on the scanning result; determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block; determining a candidate in a first candidate list of motion vectors for the current image block according to a related block of the current image block; If 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 corresponds to each sub-image block in the related block one-to-one; 13. A method for processing moving images comprising predicting, based on the motion vectors of each sub-image block in the associated block, a corresponding sub-image block in the current image block, respectively. [Item 50] Item 50. The method according to item 49, wherein at least one candidate in the first motion vector candidate list includes a motion vector of a sub-image block, and each candidate in the second motion vector candidate list includes a motion vector of an image block. [Item 51] 51. The method according to item 49 or 50, wherein N is equal to 1 or 2. [Item 52] 52. The method according to any one of items 49 to 51, wherein the M candidates include motion vectors of M neighboring blocks in the current image of the current image block. [Item 53] Sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result, Item 53. The method according to item 52, comprising: sequentially scanning the N neighboring blocks, stopping the scanning when a neighboring block that meets a first preset condition is scanned, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition. [Item 54] determining a target neighboring block based on the scanned neighboring block that meets the first preset condition; 53. The method of claim 52, further comprising determining a neighboring block that meets the first preset condition as the target neighboring block. [Item 55] The above pre-defined conditions are: 55. The method according to item 53 or 54, comprising the reference image of the neighbouring block and the reference image of the current image block being the same. [Item 56] The above method is 56. The method according to any one of items 53 to 55, further comprising: when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, performing a scaling process on a 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. [Item 57] The step of predicting the current image block based on the motion vector after the scaling process includes: 57. The method according to claim 56, comprising determining a reference block for the current image block based on the motion vector after the scaling process and a reference image for the current image block. [Item 58] Item 57. The method according to item 56, wherein the specific neighboring block is the first neighboring block or the last neighboring block obtained in scan order among the N neighboring blocks. [Item 59] performing a scaling process on a 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, performing a scaling process on the motion vector of the specific neighboring block so that a reference frame indicated by the motion vector after the scaling process is the same as a reference image of the current image block; Item 57. The method according to item 56, comprising setting an image block pointed to in a reference image of the current image block by the motion vector after the scaling process as a reference block of the current image block. [Item 60] The above method is 56. The method according to any one of items 53 to 55, further comprising: if no neighboring block that meets the preset condition is scanned among the N neighboring blocks, setting a default block as a reference block for the current image block. [Item 61] Item 61. The method according to item 60, wherein the default block is the image block pointed to by the motion vector (0,0). [Item 62] 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 its associated block is fixed to 64 pixels or more. [Item 63] Item 63. The method according to item 62, wherein the size of the sub-image block and / or the size of its associated block are fixed to 8x8 pixels, or 16x4 pixels or 4x16 pixels. [Item 64] The size of said sub-image block and / or the size of its associated block are fixed at 8x8 pixels, and said method further comprises: Item 64. The method of item 63, further comprising setting to no temporal motion vector prediction (TMVP) operation. [Item 65] The above method is A method according to any one of items 49 to 62, further comprising setting not to perform a temporal motion vector prediction (TMVP) operation if at least one of the width and height of the sub-image block and / or its associated block is smaller than 8 pixels. [Item 66] 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 a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes: Item 67. The method according to any one of items 49 to 66, comprising determining a motion vector of the target neighboring block, a related block of the current image block in a reference image of the current image block. [Item 68] 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 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 according to the motion vector of the related block after processing and the reference image of the current image block; Item 69. The method according to any one of items 49 to 68, wherein the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing. [Item 70] The motion vector of the relevant block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of 1, or 70. The method according to claim 69, including skipping the scaling step and including the motion vector of the relevant block. [Item 71] predicting the current image block based on the motion vector of the related block includes: A method according to any one of items 49 to 68, comprising abandoning determining the reference block of the current image block based on the motion vector of the associated block when the reference image of the associated block is a specific reference image or the reference image of the current block is a specific reference image. [Item 72] The above 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, determining a reference block of the current image block according to the motion vector of the related block after processing and the reference image of the current image block; Item 72. The method according to any one of items 49 to 71, wherein the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing. [Item 73] The motion vector of the relevant block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of 1, or Item 73. The method according to item 72, including the motion vectors of the relevant blocks skipping the scaling step. [Item 74] Predicting a corresponding sub-image block in the current image block based on a motion vector of each sub-image block in the related block, respectively, comprises: Item 74. A method according to any one of items 49 to 73, comprising: setting the motion vector of each sub-image block in the associated block to the motion vector of the corresponding sub-image block in the current image block. [Item 75] determining a motion vector candidate in the first motion vector candidate list for the current image block based on the associated block of the current image block; 74. The method according to any one of items 49 to 73, further comprising: entering a representative motion vector of a related block of the current image block as the specific candidate into the motion vector first candidate list. [Item 76] Item 76. The method according to item 75, further comprising putting the representative motion vector of the relevant block as the first candidate into a motion vector first candidate list. [Item 77] Item 76. The method according to item 75, wherein the representative motion vector of the relevant block comprises a motion vector of a central position of the relevant block. [Item 78] The above method is Item 76. The method of item 75, further comprising, when a sub-image block for which a motion vector cannot be obtained is found in the associated block, setting a representative motion vector of the associated block as the motion vector of the sub-image block for which a motion vector cannot be obtained, and predicting a corresponding sub-image block in the current image block. [Item 79] The above method is The method described in Item 78 further includes, when there is a sub-image block in the associated block for which a motion vector cannot be obtained and a representative motion vector of the associated block cannot be obtained, abandoning prediction of the corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the associated block. [Item 80] The method described in item 78, wherein if a sub-image block in the associated block is not obtainable or if a sub-image block in the associated block uses an intraframe coding mode, it is determined that a sub-image block for which a motion vector cannot be obtained has appeared in the associated block. [Item 81] The above method is if it is determined to adopt one of the candidates other than the specific candidate in the second motion vector candidate list, performing affine transformation on the adopted candidate according to an affine transformation model; 81. The method according to any one of claims 49 to 80, further comprising predicting a sub-image block in the current image block based on the candidate after the affine transformation. [Item 82] Item 82. The method according to item 81, wherein in at least one candidate other than the particular 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 motion vectors of two control points; Item 83. The method according to item 82, wherein, 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. [Item 84] The above method is determining a group of control point motion vectors of the neighboring blocks of the current image block, the control point motion vectors being predicted by adopting an affine transformation mode in a specific scanning order; Item 84. The method according to any one of Items 49 to 83, further comprising: entering a control point motion vector group of each determined neighboring block as one candidate into the first motion vector candidate list. [Item 85] Determining a group of control point motion vectors of neighboring blocks of the current image block using an affine transformation mode in a specific scan order to perform prediction from the neighboring blocks of the current image block; determining a group of motion vectors of control points of a first neighboring block in a first scanning order in a left neighboring block of the current image block; determining a group of motion vectors of control points of second neighboring blocks in a second scanning order in an upper neighboring block of the current image block; Item 85. The method of item 84, comprising placing the motion vectors of the control points of the first neighboring block and the motion vectors of the control points of the second neighboring block in the first candidate list of motion vectors. [Item 86] The above method is constructing motion vectors of the part of the control points of the current image block based on neighboring blocks of the part of the control points; 86. The method according to any one of items 49 to 85, further comprising: putting motion vectors of some control points of the current image block into the motion vector first candidate list. [Item 87] Constructing motion vectors of the control points of the current image block based on neighboring blocks of the control points of the current image block includes: Item 87. The method of item 86, comprising: for each control point in the portion of control points, sequentially scanning a specific neighboring block of the control point in a third scanning order, and setting the motion vector of the specific neighboring block that satisfies a preset condition as the motion vector of the control point. [Item 88] The above method is The method of item 86 or 87, further comprising abandoning the motion vectors of some control points of the current image block from being included in the motion vector first candidate list when the motion vectors of the some control points respectively point to different reference frames. [Item 89] The above method is The method of item 86 or 87, further comprising: abandoning putting motion vectors of some control points of the current image block into the motion vector first candidate list when the number of candidates in the motion vector first candidate list is greater than a predetermined value. [Item 90] The above method is Construct a second candidate motion vector list, where the candidate in the second candidate motion vector list is a motion vector of an image block; The method according to any one of items 51 to 63, further comprising, when it is determined to adopt a candidate in the second motion vector candidate list, determining a motion vector of the current image block based on the motion vector of the candidate. [Item 91] determining a motion vector of the current image block based on the candidate motion vectors, Item 91. The method of item 90, comprising setting the candidate determined to be adopted as the motion vector of the current image block, or setting the candidate determined to be adopted as the motion vector of the current image block after scaling it. [Item 92] Constructing the second candidate list of motion vectors as described above includes the steps of: Item 91. The method of item 90, comprising determining the M candidates to be included in the second motion vector candidate list based on motion vectors of M neighboring blocks in the current image of the current image block. [Item 93] Putting the motion vectors of the M predetermined neighboring blocks into the second motion vector candidate list as M candidates in a predetermined order, respectively, the N neighboring blocks refer to the N neighboring blocks that are first determined in the predetermined order; and / or The method described in item 92, wherein if the motion vectors of one or more neighboring blocks among the M neighboring blocks are not obtainable, deciding on candidates to be included in the second motion vector candidate list based on the motion vectors of the one or more neighboring blocks is abandoned. [Item 94] 94. The method according to any one of items 49 to 93, wherein M is 4 or less. [Item 95] A moving image processing device, a construction module for sequentially scanning N neighboring blocks, which is smaller than M, of a preset M neighboring blocks of a current image block, and determining a target neighboring block according to a scanning result; determining an associated block of the current image block according to a motion vector of the target neighboring block, the current image block, and a reference image of the current image block; and dividing the current image block and the associated block into a plurality of sub-image blocks in the same manner, so that each sub-image block in the current image block corresponds one-to-one with each sub-image block in the associated block; a prediction module adapted to respectively predict corresponding sub-image blocks in the current image block based on the motion vector of each sub-image block in the associated block. [Item 96] Item 96. The video processing device according to item 95, wherein N is equal to 1 or 2. [Item 97] The prediction module further comprises: before predicting the corresponding sub-image blocks in the current image block according to the motion vectors of the sub-image blocks in the related block, the representative motion vectors of the related blocks are input into a first motion vector candidate list as candidates; A video processing device as described in item 95 or 96, wherein when it is determined that the candidate is to be adopted, the prediction module is used to predict corresponding sub-image blocks in the current image block based on the motion vectors of each sub-image block in the associated block. [Item 98] predicting a corresponding sub-image block in the current image block based on the motion vector of each sub-image block in the related block, respectively, Item 98. A video processing device according to item 97, comprising setting the motion vector of each sub-image block in the associated block to the motion vector of a corresponding sub-image block in the current image block. [Item 99] Item 98. The video processing device according to Item 97, wherein the representative motion vector of the relevant block is entered as a first candidate in a motion vector first candidate list. [Item 100] Item 98. The video processing device according to item 97, wherein the representative motion vector of the relevant block includes a motion vector at a central position of the relevant block. [Item 101] The prediction module further comprises: Item 98. A video processing device as described in Item 97, wherein when a sub-image block for which a motion vector cannot be obtained is found in the associated block, a representative motion vector of the associated block is used as the motion vector of the sub-image block for which the motion vector cannot be obtained, and is used to predict the corresponding sub-image block in the current image block. [Item 102] The prediction module further comprises: A moving image processing device as described in Item 101, which is used to abandon predicting corresponding sub-image blocks in the current image block based on the motion vectors of each sub-image block in the associated block when a sub-image block for which a motion vector cannot be obtained is present in the associated block and a representative motion vector of the associated block is not obtainable. [Item 103] The prediction module further comprises: A moving image processing device as described in Item 102, wherein when a sub-image block in the associated block is not obtainable or when a sub-image block in the associated block uses an intraframe coding mode, the motion vector is used to determine that a sub-image block in the associated block has a motion vector that is not obtainable. [Item 104] The building module further comprises: Item 98. A video processing device as described in Item 97, used to determine other candidates and include the other candidates in the first motion vector candidate list, at least one of the other candidates further including a motion vector of a sub-image block. [Item 105] The building module further comprises: A moving image processing device as described in Item 104, which, when it is determined to adopt one of the other candidates, is used to determine a motion vector of a sub-image block in the current image block based on the adopted candidate. [Item 106] Item 106. A video processing device according to item 104 or 105, wherein the at least one candidate comprises a motion vector of a set of control points. [Item 107] The prediction module further comprises: if determining to adopt a candidate among the at least one candidate, performing affine transformation on the adopted candidate according to an affine transformation model; 107. The video processing device according to any one of items 104 to 106, which is used for predicting a sub-image block in the current image block based on the candidate after the affine transformation. [Item 108] 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; Item 108. The video processing device according to item 107, wherein, 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. [Item 109] The building module further comprises: determining a group of control point motion vectors of the neighboring blocks of the current image block, the control point motion vectors being predicted by adopting an affine transformation mode in a specific scanning order; The video processing device according to any one of items 97 to 108, wherein the control point motion vector group of each determined neighboring block is entered as one candidate in the first motion vector candidate list. [Item 110] Determining a group of control point motion vectors of neighboring blocks of the current image block using an affine transformation mode in a specific scan order to perform prediction from the neighboring blocks of the current image block; determining a group of motion vectors of control points of a first neighboring block in a first scanning order in a left neighboring block of the current image block; determining a group of motion vectors of control points of second neighboring blocks in a second scanning order in an upper neighboring block of the current image block; Item 109. The video processing device according to item 109, further comprising: inputting a group of motion vectors of the control points of the first neighboring block and a group of motion vectors of the control points of the second neighboring block into the first candidate list of motion vectors. [Item 111] The building module further comprises: constructing motion vectors of the part of the control points of the current image block based on neighboring blocks of the part of the control points; Item 109. The video processing device according to any one of Items 97 to 108, which is used for inputting motion vectors of some control points of the current image block into the first motion vector candidate list. [Item 112] Constructing motion vectors of the control points of the current image block based on neighboring blocks of the control points of the current image block includes: Item 112. The video processing device according to item 111, further comprising: for each control point in the portion of the control points, sequentially scanning a specific neighboring block of the control point in a third scanning order, and setting a motion vector of the specific neighboring block that satisfies a preset condition as the motion vector of the control point. [Item 113] The building module further comprises: A moving image processing device as described in item 111 or 112, which is used to discard putting motion vectors of some control points of the current image block into the first motion vector candidate list when the motion vectors of some control points respectively point to different reference frames. [Item 114] The building module further comprises: A moving image processing device described in any one of items 111 or 112, which is used to abandon putting motion vectors of some control points of the current image block into the first motion vector candidate list when the number of candidates in the first motion vector candidate list is greater than a predetermined value. [Item 115] The building module further comprises: Construct a second candidate motion vector list, where the candidate in the second candidate motion vector list is a motion vector of an image block; A moving image processing device according to any one of items 97 to 109, which is used to determine the motion vector of the current image block based on the motion vector of the candidate when it is decided to adopt a candidate in the second motion vector candidate list. [Item 116] determining a motion vector of the current image block based on the candidate motion vectors, Item 116. A video processing device as described in Item 115, comprising setting the candidate determined to be adopted as the motion vector of the current image block, or setting the candidate determined to be adopted as the motion vector of the current image block after scaling it. [Item 117] The constructed motion vector second candidate list is Item 116. The video processing device according to item 115, further comprising determining candidates to be included in the second motion vector candidate list based on motion vectors of a plurality of neighboring blocks in the current image of the current image block. [Item 118] Item 118. The video processing device according to Item 117, wherein the plurality of neighboring blocks in the current image of the current image block include the predetermined M number of neighboring blocks. [Item 119] The building module further comprises: The motion vectors of the M predetermined neighboring blocks are respectively used in a predetermined order to be input into the second motion vector candidate list as M candidates; Item 119. The video processing device according to Item 118, wherein the N neighboring blocks refer to the N neighboring blocks that are determined first in the predetermined order. [Item 120] The building module further comprises: Item 118. A video processing device as described in Item 118, which is used to abandon determining candidates to be included in the second motion vector candidate list based on the motion vectors of one or more neighboring blocks when the motion vectors of one or more neighboring blocks among the M neighboring blocks cannot be obtained. [Item 121] Sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result, The video processing device according to item 95 or 120 includes sequentially scanning the N neighboring blocks, stopping the scanning when the neighboring block that meets the first preset condition is reached, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition. [Item 122] determining a target neighboring block based on the scanned neighboring block that meets the first preset condition; Item 114. The video processing device according to Item 113, further comprising determining a neighboring block that meets the first preset condition as the target neighboring block. [Item 123] The above pre-defined conditions are: Item 123. The video processing device according to item 113 or 122, wherein the reference image of the neighboring block and the reference image of the current image block are the same. [Item 124] The building module further comprises: When no neighboring block that meets the preset condition is scanned among the N neighboring blocks, a motion vector of a specific neighboring block among the M neighboring blocks is scaled; Item 124. The video processing device according to any one of items 121 to 123, wherein the prediction module is further used to predict the current image block based on the motion vector after the scaling process. [Item 125] The step of predicting the current image block based on the motion vector after the scaling process includes: Item 125. The video processing method according to item 124, further comprising determining a reference block for the current image block based on the motion vector after the scaling process and a reference image for the current image block. [Item 126] Item 125. The video processing device according to Item 124, wherein the specific neighboring block is the first neighboring block or the last neighboring block obtained in scanning order among the N neighboring blocks. [Item 127] performing a scaling process on a 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, Scaling 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; Item 125. The moving image processing device according to item 124, further comprising setting an image block indicated in a reference image of the current image block by the motion vector after the scaling process as the reference block of the current image block. [Item 128] Item 125. The video processing device according to any one of items 121 to 124, wherein if no neighboring block matching the preset condition is scanned among the N neighboring blocks, a default block is used as the reference block for the current image block. [Item 129] Item 129. The video processing device according to Item 128, wherein the default block is an image block pointed to by a motion vector (0,0). [Item 130] 130. The video processing device according to any one of items 95 to 129, wherein the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed to 64 pixels or more. [Item 131] Item 131. A device for processing video according to item 130, wherein the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed to 8x8 pixels, or 16x4 pixels or 4x16 pixels. [Item 132] The size of the sub-image block and / or the size of the associated block of the sub-image block is fixed to 8×8 pixels, and the video processing device Item 132. The video processing device according to item 131, further comprising a processing module used for setting not to perform temporal motion vector prediction (TMVP) operation. [Item 133] The moving image processing device includes: A moving image processing device according to any one of items 95 to 130, further comprising 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 associated block of the sub-image block is smaller than 8 pixels. [Item 134] Item 95. The video processing device according to any one of items 95 to 133, wherein the current image block is one coding unit CU. [Item 135] Determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes: Item 135. The video processing device according to any one of items 95 to 134, further comprising determining a motion vector of the target neighboring block and a related block of the current image block in a reference image of the current image block. [Item 136] Item 85. The video processing device 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 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 according to the motion vector of the related block after processing and the reference image of the current image block; Item 95. The video processing device according to any one of items 95 to 136, wherein the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing. [Item 138] The motion vector of the relevant block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of 1, or Item 138. A video processing device according to item 137, comprising a motion vector of the relevant block for which a scaling step has been skipped. [Item 139] predicting the current image block based on the motion vector of the related block includes: A moving image processing device according to any one of items 95 to 136, comprising abandoning determining a reference block for a current image block based on a 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. [Item 140] The building module further comprises: 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, the motion vector of the neighboring block is used to determine a reference block of the current image block according to the motion vector of the related block after processing and the reference image of the current image block; Item 95. The video processing device according to any one of items 95 to 139, wherein the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing. [Item 141] The motion vector of the relevant block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of 1, or Item 141. A device for processing a moving image according to item 140, comprising a motion vector of the relevant block for which a scaling step has been skipped. [Item 142] The video processing device according to any one of items 95 to 141, wherein M is 4 or less. [Item 143] A moving image processing device, a construction module for determining M neighboring blocks of the current image block according to M candidates in a second motion vector candidate list of the current image block; sequentially scanning N neighboring blocks, which is less than M, among the M neighboring blocks, and determining a target neighboring block according to the scanning result; determining an associated block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block; determining a specific candidate in a first motion vector candidate list of the current image block according to the associated block of the current image block; and, if it is determined to use the specific candidate, dividing the current image block and the associated block into a plurality of sub-image blocks in the same manner, and each sub-image block in the current image block corresponds one-to-one to each sub-image block of the associated block; a prediction module adapted to respectively predict corresponding sub-image blocks in the current image block based on the motion vector of each sub-image block in the associated block. [Item 144] Item 144. A video processing device as described in Item 143, wherein at least one candidate in the first motion vector candidate list includes a motion vector of a sub-image block, and each candidate in the second motion vector candidate list includes a motion vector of an image block. [Item 145] Item 145. A video processing device according to item 143 or 144, wherein N is equal to 1 or 2. [Item 146] Item 146. The video processing device according to any one of items 143 to 145, wherein the M candidates include motion vectors of M neighboring blocks of the current image block on the current image. [Item 147] Sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result, The v...
Claims
1. receiving a bitstream transmitted by an encoding terminal, the bitstream including a first index used to indicate a combination of two motion vector displacement amounts; determining a base motion vector list, the base motion vector list including at least one 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 offset amounts using a preset offset set according to the first index included in the bitstream, the two motion vector offset amounts corresponding to the first base motion vector and the second base motion vector; determining a plurality of motion vectors of a current image block according to the first base motion vector, the second base motion vector, and the two motion vector deviations; predicting the current image block based on the plurality of motion vectors of the current image block; A video decoding method comprising:
2. 2. The video decoding method according to claim 1, wherein the bitstream includes a second index, the second index being used to indicate the first base motion vector and the second base motion vector selected from a motion vector candidate list.
3. The video decoding method according to claim 1 , wherein the preset set of deviation amounts includes a plurality of motion vector deviation amounts.
4. When the first base motion vector and the second base motion vector indicate a non-specific reference image, at least one of the two motion vector deviation amounts includes a motion vector deviation amount obtained by scaling an initial motion vector deviation amount, and the motion vector of the current image block is determined based on the motion vector deviation amount obtained by scaling the first base motion vector, the second base motion vector, and the initial motion vector deviation amount; The video decoding method according to claim 1 , wherein the non-specific reference picture is one of a synthesis frame, a long-term reference picture, and a non-output picture.
5. 5. The video decoding method according to claim 4, wherein a scaling scale is determined by distances between a current image including the current image block and two reference images of the current image block in two reference directions.
6. The video decoding method according to claim 5 , wherein the two reference pictures include a first reference picture indicated by the first base motion vector and a second reference picture indicated by the second base motion vector.
7. 5. The video decoding method of claim 4, wherein when the distance between a current image including the current image block and two reference images of the current image block in two reference directions is the same, the same motion vector shift amount is added to the first base motion vector and the second base motion vector.
8. 5. The video decoding method of claim 4, wherein when the first base motion vector and / or the second base motion vector indicate a specific reference image, at least one of the two motion vector deviation amounts is obtained by skipping a scaling process, and the motion vector of the current image block is determined based on the first base motion vector, the second base motion vector, and the initial motion vector deviation amount.
9. 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 step of determining the base motion vector list includes:
6. The video decoding method according to claim 1, further comprising: determining the base motion vector list based on the merge candidate list, the step including: taking a first two pairs of merge motion vector candidates in the merge candidate list to form the base motion vector list when P is greater than or equal to 2.
10. The method of claim 9 , wherein the two sets of merge motion vector candidates in the merge candidate list include a first set of merge motion vector candidates and a second set of merge motion vector candidates in the merge candidate list.
11. The step of determining two motion vector deviations from a preset deviation set includes: determining a plurality of combinations of motion vector deviations, each combination including two motion vector deviations from the preset deviation set; 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, The video decoding method according to any one of claims 1 to 10, further comprising: determining a combination of motion vector shift amounts from the combinations of the plurality of sets of motion vector shift amounts; and determining the motion vector of the current image block based on the combination of the first base motion vector, the second base motion vector, and the motion vector shift amounts.
12. A video decoding device including a memory and a processor, the memory is used to store instructions; the processor is configured to execute the instructions stored in the memory; A video decoding device, the processor executing the instructions stored in the memory to perform the video decoding method according to any one of claims 1 to 11.
13. determining a base motion vector list, the base motion vector list including at least one 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 offset amounts, the two motion vector offset amounts corresponding to the first base motion vector and the second base motion vector; determining a plurality of motion vectors 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 plurality of motion vectors of the current image block, and generating a bitstream including a first index used to indicate a combination of two motion vector displacements; A bitstream generating method comprising:
14. A bitstream generation method as described in claim 13, wherein the step of determining the two motion vector offset amounts includes a step of determining two motion vector offset amounts that make the rate distortion loss satisfy a preset condition.
15. A bitstream generation method as described in claim 13, wherein the step of determining the two motion vector deviation amounts includes a step of determining the two motion vector deviation amounts according to a predetermined algorithm.
16. A video processing device including a memory and a processor, the memory is used to store instructions; the processor is configured to execute the instructions stored in the memory; Execution of the instructions stored in the memory causes the processor to: determining a base motion vector list, the base motion vector list including at least one 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 offset amounts, the two motion vector offset amounts corresponding to the first base motion vector and the second base motion vector; determining a plurality of motion vectors 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 plurality of motion vectors of the current image block, and generating a bitstream including a first index used to indicate a combination of two motion vector displacements; A video processing device that executes the above.
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