Moving image processing method, moving image processing apparatus, and bit stream generating method
By optimizing the construction of motion vector candidate lists through reduced scans, the method enhances the efficiency and reduces complexity in video coding standards, maintaining performance gains in advanced temporal motion vector prediction.
Patent Information
- Application Number
- JP2024085959
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-09-25
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2038-10-30
AI Technical Summary
Current video coding standards face inefficiencies in the block-based motion compensation process, particularly in the construction of motion vector candidate lists for advanced temporal motion vector prediction (ATMVP), leading to increased complexity without adequate performance gains.
A method that reduces the number of scans for motion vector candidates by sequentially selecting N (where N < M) motion vector candidates from a larger set, optimizing the construction of motion vector candidate lists to simplify redundant operations in ATMVP technology.
This approach maintains performance gains of conventional ATMVP while reducing computational complexity, thereby improving efficiency and saving storage space in video encoding and decoding processes.
Smart Images

Figure 2024116183000001_ABST
Abstract
Description
[Technical field]
[0001] 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 Patent and Trademark Office official records or files.
[0002] The present application relates to the field of video encoding and decoding, and in particular to a video processing method and apparatus. [Background technology]
[0003] 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.
[0004] In the current technology, a motion vector candidate list for the current CU is usually constructed based on the motion vectors of the coded neighboring blocks of the current CU, also called a merge candidate list. From the merge candidate list, the most suitable motion vector candidate is selected as the motion vector of the current CU, and the prediction block of the current CU is determined based on the motion vector of the current CU.
[0005] 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.
[0006] In step 1 of the current ATMVP technique, the process of determining a temporal vector by scanning the motion vector candidate list of the current CU or the motion vectors of the current CU's neighboring image blocks leaves room for improvement. Summary of the Invention
[0007] 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.
[0008] 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; The method includes 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.
[0009] 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.
[0010] 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; The method includes 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.
[0011] 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.
[0012] 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.
[0013] 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.
[0014] 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.
[0015] 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.
[0016] 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.
[0017] 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.
[0018] 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. [Brief description of the drawings]
[0019] [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 moving image 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; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] 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).
[0021] 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.
[0022] 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.
[0023] 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.
[0024] 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:
[0025] 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.
[0026] 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.
[0027] 3) Obtaining the residual between the current image block and the predicted image block.
[0028] 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).
[0029] As an example, on the decoding side, the current image block can be decoded in the following steps.
[0030] 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.
[0031] 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.
[0032] 3) Based on the index, obtain the motion vector MV1 of the current image block from the motion vector candidate list.
[0033] 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.
[0034] 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.
[0035] 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).
[0036] 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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.
[0041] 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:
[0042] S110, determining M motion vector candidates for entering into a motion vector second candidate list for the current image block.
[0043] A current image block is an 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).
[0044] 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] The process of determining a reference motion vector based on the scanning result of N motion vector candidates will now be described in detail.
[0057] 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.
[0058] Optionally, in step S120, the previous N motion vector candidates among the M motion vector candidates may be sequentially scanned.
[0059] 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.
[0060] As an example, in step S120, some of the M motion vector candidates are sequentially scanned.
[0061] As another example, in step S120, a part of the motion vector candidates among the motion vector candidates already included in the second motion vector candidate list are sequentially scanned.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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).
[0071] 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.
[0072] 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.
[0073] 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.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] The specific motion vector candidate may be the first or last motion vector obtained in scanning order among the N motion vector candidates.
[0081] The specific motion vector candidate may also be a motion vector obtained in another scanning order among the N motion vector candidates.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] Note that when N is equal to 1, the specific motion vector candidate in this embodiment is the motion vector candidate to be scanned.
[0090] 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 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 the motion vector of the current image block.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] In some video encoding and decoding standards, the associated blocks may be called collocated blocks or corresponding blocks.
[0099] 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] In some embodiments, the non-specific reference image may be a reference image that does not have at least one of the following properties among a structural frame, a long-term reference image, and a non-output image. For example, the 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.
[0108] 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.
[0109] 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.
[0110] 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.
[0111] 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.
[0112] 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.
[0113] 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.
[0114] Optionally, the type of reference frame may be identified in the codestream structure by a special field.
[0115] 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.
[0116] 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.
[0117] 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.
[0118] 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.
[0119] 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.
[0120] 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.
[0121] 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.
[0122] 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.
[0123] 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.
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] 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.
[0130] 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.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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.
[0136] As shown in FIG. 4, an embodiment of the present application further provides a video processing method, which includes the following steps.
[0137] S410, obtain M motion vector candidates to be put into a motion vector second candidate list of the current image block.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] 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.
[0142] 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.
[0143] 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.
[0144] For example, the current image block is a CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0145] 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.
[0146] The reference image of the current image block may be a peer frame of the current image block.
[0147] 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.
[0148] 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.
[0149] 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.
[0150] 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.
[0151] 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.
[0152] 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.
[0153] 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.
[0154] 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.
[0155] 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.
[0156] 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.
[0157] 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.
[0158] 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.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] 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.
[0163] 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 implement the embodiment of the method shown in FIG 1. The apparatus 500 includes the following units:
[0164] 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.
[0165] A determining unit 520 sequentially scans N motion vector candidates among the M motion vector candidates, and determines a reference motion vector according to a scanning result, where N is less than M.
[0166] 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.
[0167] 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.
[0168] 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 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.
[0169] 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.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] 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.
[0175] Optionally, in one embodiment, M is equal to four and N is less than four.
[0176] Optionally, in one embodiment, N is equal to 1 or 2.
[0177] 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.
[0178] 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.
[0179] 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.
[0180] 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.
[0181] 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.
[0182] 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.
[0183] 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.
[0184] Optionally, as one embodiment, the default value is the motion vector (0,0).
[0185] 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.
[0186] 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.
[0187] Optionally, in one embodiment, the current image block is one coding unit CU.
[0188] 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.
[0189] 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.
[0190] 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.
[0191] 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.
[0192] 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.
[0193] 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.
[0194] 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.
[0195] Optionally, as one embodiment, the motion vector second candidate list is a Merge candidate list.
[0196] Optionally, as one embodiment, the reference image of the current image block is a peer frame of the current image block.
[0197] 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.
[0198] In addition, both the acquisition unit 510 and the determination unit 520 in this embodiment can be realized by a processor.
[0199] 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:
[0200] 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.
[0201] 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.
[0202] 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.
[0203] 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.
[0204] 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.
[0205] 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.
[0206] 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.
[0207] 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.
[0208] 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.
[0209] 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.
[0210] 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.
[0211] 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.
[0212] 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.
[0213] 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.
[0214] As shown in FIG. 7, an embodiment of the present application provides a video processing method, which includes the following steps.
[0215] S710, M neighboring blocks of the current image block are determined.
[0216] The current image block is the image block to be coded (or decoded). For example, the current image block is a coding unit (CU).
[0217] The image frame in which the current image block is located is called the current frame.
[0218] 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.
[0219] The M neighboring blocks are image blocks that have been coded (or decoded) in the current frame.
[0220] 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.
[0221] 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;
[0222] 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.
[0223] As an example, the definition of the preset condition includes that the reference image of the neighboring block is the same as the reference image of the current image block.
[0224] 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.
[0225] 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.
[0226] 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.
[0227] The process of determining the target neighboring block based on the scanning result of N neighboring blocks will be described in detail below.
[0228] In step S720, only N neighboring blocks among the M neighboring blocks obtained in step S710 are scanned, thus reducing the number of scans.
[0229] Optionally, in step S720, the previous N neighboring blocks of the M neighboring blocks may be scanned sequentially.
[0230] 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.
[0231] 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.
[0232] 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.
[0233] S740, encoding / decoding the current image block according to the motion vector of the associated block.
[0234] 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.
[0235] 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.
[0236] 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.
[0237] 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.
[0238] 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.
[0239] 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.
[0240] 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.
[0241] For example, N is equal to 1. For example, in step S720, only the first neighboring block of the four neighboring blocks is scanned.
[0242] Also, for example, N is equal to 2 or 3.
[0243] 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.
[0244] 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.
[0245] For example, the definition of the preset condition includes that the reference image of the neighboring block and the reference image of the current image block are the same.
[0246] It should be understood that in future evolving technologies, the preconditions may be given other definitions.
[0247] 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.
[0248] For example, a neighboring block that meets a first preset condition is determined as a target neighboring block.
[0249] 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.
[0250] 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.
[0251] Optionally, the particular neighboring block is the first neighboring block or the last neighboring block obtained in scan order among the N neighboring blocks.
[0252] The specific neighboring block may be one of the N neighboring blocks obtained in another scan order.
[0253] 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.
[0254] 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.
[0255] For example, the default block is the image block pointed to by the motion vector (0,0).
[0256] 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.
[0257] 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.
[0258] The associated block may be called a collocated block or a corresponding block.
[0259] For example, the current image block is a CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0260] Optionally, the size of a sub-image block and / or the size of its associated block is fixed at 64 pixels or more.
[0261] 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.
[0262] 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.
[0263] 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.
[0264] 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.
[0265] 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.
[0266] 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.
[0267] 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.
[0268] 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.
[0269] 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.
[0270] 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.
[0271] 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.
[0272] 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.
[0273] 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.
[0274] 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 description, 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 description, the term "associated block" is used uniformly in this specification.
[0275] 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.
[0276] 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.
[0277] 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.
[0278] 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.
[0279] 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.
[0280] 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.
[0281] As shown in FIG. 8 , an embodiment of the present application further provides a video processing method, which includes the following steps.
[0282] S810, M neighboring blocks of the current image block are determined.
[0283] Step S810 corresponds to step S710 in the above embodiment.
[0284] S820: scanning at least some of the M neighboring blocks in sequence, and determining a target neighboring block based on the scanning result.
[0285] 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.
[0286] Optionally, all neighboring blocks among the M neighboring blocks are scanned sequentially, and the target neighboring block is determined based on the scanning result.
[0287] 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.
[0288] 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.
[0289] 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.
[0290] Optionally, the reference image of the current image block is a reference image preset at the encoding side and the decoding side.
[0291] 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.
[0292] S850, encoding / decoding the current image block according to the motion vector of the associated block.
[0293] 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.
[0294] 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.
[0295] 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 previous coded image block, thereby saving storage space.
[0296] 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.
[0297] 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.
[0298] For example, a neighboring block that meets a first preset condition is determined as a target neighboring block.
[0299] For example, the definition of the preset condition includes that the reference image of the neighboring block and the reference image of the current image block are the same.
[0300] 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.
[0301] Above, the method embodiment of the present application has been described with reference to Figs. 7 and 8. Hereinafter, an apparatus embodiment corresponding to the method embodiment shown in Figs. 7 and 8 will be described. Note that since the description of the apparatus embodiment and the description of the method embodiment correspond to each other, 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. 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:
[0302] An acquisition unit 910 is used to acquire M neighboring blocks of a current image block.
[0303] 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.
[0304] 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.
[0305] An encoding / decoding unit 930 is used to encode / decode the current image block based on the motion vector of the associated block.
[0306] 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.
[0307] Optionally, in one embodiment, M is equal to four and N is less than four.
[0308] Optionally, in one embodiment, N is equal to 1 or 2.
[0309] Optionally, as one embodiment, the determining unit 920 is used to sequentially scan the previous N neighboring blocks in the M neighboring blocks.
[0310] 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.
[0311] 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.
[0312] 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.
[0313] Optionally, as one embodiment, the preset condition is that the reference image of the neighboring block and the reference image of the current image block are the same.
[0314] 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.
[0315] 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.
[0316] 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.
[0317] 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.
[0318] 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.
[0319] 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.
[0320] 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.
[0321] Optionally, as one embodiment, the default block is the image block pointed to by the motion vector (0,0).
[0322] 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.
[0323] 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.
[0324] Optionally, in one embodiment, the current image block is one coding unit CU.
[0325] 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.
[0326] 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.
[0327] 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.
[0328] 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.
[0329] 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.
[0330] 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.
[0331] 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.
[0332] 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.
[0333] 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:
[0334] An acquisition unit 1010 is used to acquire M neighboring blocks of a current image block.
[0335] 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.
[0336] 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.
[0337] 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.
[0338] An encoding / decoding unit 1040 is used to encode / decode a current image block based on the motion vector of an associated block.
[0339] 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.
[0340] 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.
[0341] 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.
[0342] 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.
[0343] 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.
[0344] 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.
[0345] Optionally, as one embodiment, the preset condition is that the reference image of the neighboring block and the reference image of the current image block are the same.
[0346] 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.
[0347] 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.
[0348] 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.
[0349] 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.
[0350] The devices 500, 600, 900, 1000 and 1100 provided in this application may be applied in a coder or in a decoder.
[0351] The above description has been given of the second motion vector candidate list, but hereinafter, the first motion vector candidate list will be described.
[0352] 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).
[0353] 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.
[0354] In one embodiment, the candidates determined based on the ATMVP technique may be placed in a first candidate list of motion vectors.
[0355] 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.
[0356] 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.
[0357] 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.
[0358] 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.
[0359] 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.
[0360] 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.
[0361] 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.
[0362] 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.
[0363] 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.
[0364] 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.
[0365] 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 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.
[0366] 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.
[0367] 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.
[0368] 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.
[0369] In one example, the candidate 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.
[0370] 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.
[0371] 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.
[0372] 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.
[0373] 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.
[0374] 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.
[0375] 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.
[0376] 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:
[0377] 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.
[0378] 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.
[0379] 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.
[0380] 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.
[0381] The video processing method shown in FIG. 14 can be described above, and will not be described here.
[0382] As shown in FIG. 15, the method includes the following steps.
[0383] 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.
[0384] 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.
[0385] 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.
[0386] 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.
[0387] 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.
[0388] 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.
[0389] The video processing method shown in FIG. 15 can be described above, and will not be described here.
[0390] 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:
[0391] 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.
[0392] In one example, N is equal to 1 or 2.
[0393] 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.
[0394] 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.
[0395] In one example, the representative motion vector of the relevant block is put into a motion vector first candidate list as the first candidate.
[0396] In one example, the representative motion vector of the associated block includes a motion vector of a center position of the associated block.
[0397] 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 to predict the corresponding sub-image block in the current image block, by setting the representative motion vector of the associated block as the motion vector of the sub-image block with the motion vector unobtainable.
[0398] 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 with an unobtainable motion vector appears in the associated block and the representative motion vector of the associated block is unobtainable.
[0399] 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.
[0400] 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.
[0401] 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.
[0402] In one example, the at least one candidate includes a motion vector of a set of control points.
[0403] 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.
[0404] 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.
[0405] 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 candidate motion vector list.
[0406] 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.
[0407] 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.
[0408] 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.
[0409] 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.
[0410] 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.
[0411] 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.
[0412] 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.
[0413] 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;
[0414] In one example, the plurality of neighboring blocks in the current image of the current image block includes the predetermined M neighboring blocks.
[0415] 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.
[0416] The N neighboring blocks refer to the N neighboring blocks that are first determined in the preset order.
[0417] 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.
[0418] 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.
[0419] 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.
[0420] 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.
[0421] 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.
[0422] 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;
[0423] 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.
[0424] 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.
[0425] 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.
[0426] In one example, the default block is the image block pointed to by motion vector (0,0).
[0427] 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.
[0428] 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.
[0429] In one example, the current image block is a coding unit CU.
[0430] 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.
[0431] 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.
[0432] 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.
[0433] 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.
[0434] 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.
[0435] 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.
[0436] 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.
[0437] 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.
[0438] 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.
[0439] In one example, M is 4 or less.
[0440] 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:
[0441] 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.
[0442] 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.
[0443] In one example, N is equal to 1 or 2.
[0444] In one example, the M candidates include motion vectors of M neighboring blocks of the current image block in the current image.
[0445] 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.
[0446] 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.
[0447] 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.
[0448] 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.
[0449] 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;
[0450] 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.
[0451] 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.
[0452] 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.
[0453] In one example, the default block is the image block pointed to by motion vector (0,0).
[0454] 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.
[0455] 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.
[0456] In one example, the current image block is a coding unit CU.
[0457] 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.
[0458] 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.
[0459] 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.
[0460] 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.
[0461] 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.
[0462] 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.
[0463] 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.
[0464] 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.
[0465] 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.
[0466] 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.
[0467] 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: The method includes: inputting a representative motion vector of an associated block of the current image block into the motion vector first candidate list as the specific candidate.
[0468] In one example, the representative motion vector of the relevant block is put into a motion vector first candidate list as the first candidate.
[0469] In one example, the representative motion vector of the associated block includes a motion vector of a center position of the associated block.
[0470] 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, the 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 the motion vector cannot be obtained.
[0471] 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.
[0472] 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.
[0473] 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.
[0474] 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.
[0475] 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.
[0476] 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.
[0477] 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.
[0478] 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.
[0479] 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.
[0480] 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.
[0481] 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.
[0482] 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.
[0483] 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.
[0484] 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;
[0485] 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.
[0486] 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.
[0487] In one example, M is 4 or less.
[0488] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which when executed by a computer causes the computer to perform the methods provided in the above method embodiments.
[0489] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed by a computer, cause the computer to perform the methods provided in the method embodiments above.
[0490] The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the embodiments 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 on 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., digital video disc (DVD)), or semiconductor medium (e.g., solid state disk (SSD)).
[0491] 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.
[0492] 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.
[0493] 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.
[0494] 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.
[0495] 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 of 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 not obtainable. [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, 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 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] Item 38. The method according to any one of items 1 to 37, wherein the current image block is one coding unit CU. [Item 39] 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 39. The method according to any one of items 1 to 38, 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 40] Item 40. The method according to any one of items 1 to 39, 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 41] 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 41. The method according to any one of items 1 to 40, 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 42] 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 42. The method according to item 41, including the motion vector of the relevant block skipping the scaling step. [Item 43] 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 40, 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 44] 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 44. The method according to any one of items 1 to 43, 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 45] 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 45. The method according to item 44, including the motion vector of the relevant block skipping the scaling step. [Item 46] 46. The method according to any one of items 1 to 45, wherein M is 4 or less. [Item 47] 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 one-to-one to each sub-image block in the related block; 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 48] Item 48. The method according to item 47, wherein at least one candidate in the first motion vector candidate list comprises a motion vector of a sub-image block, and each candidate in the second motion vector candidate list comprises a motion vector of an image block. [Item 49] 49. The method according to item 47 or 48, wherein N is equal to 1 or 2. [Item 50] 50. The method according to any one of items 47 to 49, wherein the M candidates include motion vectors of M neighboring blocks in the current image of the current image block. [Item 51] Sequentially scanning N neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result, Item 51. The method according to item 50, 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 52] determining a target neighboring block based on the scanned neighboring block that meets the first preset condition; 51. The method according to claim 50, further comprising determining a neighboring block that meets the first preset condition as the target neighboring block. [Item 53] The above pre-defined conditions are: 53. The method according to item 51 or 52, wherein the reference image of the neighbouring block and the reference image of the current image block are the same. [Item 54] The above method is The method according to any one of items 51 to 53, 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 55] The step of predicting the current image block based on the motion vector after the scaling process includes: 55. The method according to claim 54, 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 56] Item 55. The method according to item 54, 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 57] 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; 55. The method according to claim 54, 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 58] The above method is 54. The method according to any one of items 51 to 53, 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 59] Item 59. The method according to item 58, wherein the default block is the image block pointed to by the motion vector (0,0). [Item 60] Item 59. The method according to any one of items 47 to 59, wherein the size of the sub-image block and / or the size of its associated block is fixed to 64 pixels or more. [Item 61] Item 61. The method according to item 60, 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 62] Item 62. The method according to any one of items 47 to 61, wherein the current image block is one coding unit CU. [Item 63] 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 63. The method according to any one of items 47 to 62, comprising determining a motion vector of said target neighboring block, a related block of said current image block in a reference image of said current image block. [Item 64] Item 64. The method according to any one of Items 47 to 63, 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 65] 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 65. The method according to any one of items 47 to 64, 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 66] 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 66. The method according to item 65, including the motion vector of the relevant block skipping the scaling step. [Item 67] predicting the current image block based on the motion vector of the related block includes: A method according to any one of items 47 to 64, 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 68] 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 68. The method according to any one of Items 47 to 67, 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 69] 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 69. The method according to item 68, including the motion vectors of the relevant blocks skipping the scaling step. [Item 70] 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 70. A method according to any one of items 47 to 69, 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 71] 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; Item 70. The method according to any one of items 47 to 69, comprising: putting a representative motion vector of a related block of the current image block into the motion vector first candidate list as the specific candidate. [Item 72] Item 72. The method according to item 71, further comprising putting the representative motion vector of the relevant block into a motion vector first candidate list as a first candidate. [Item 73] Item 72. The method according to item 71, wherein the representative motion vector of the relevant block comprises a motion vector of a central position of the relevant block. [Item 74] The above method is Item 72. The method of claim 71, 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 75] The above method is The method described in Item 74, further comprising, 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 76] The method described in item 74, 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 77] 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; 77. The method according to any one of items 47 to 76, further comprising predicting a sub-image block in the current image block based on the candidate after the affine transformation. [Item 78] Item 78. The method according to item 77, 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 79] 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 79. The method of item 78, 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 80] 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; 80. The method according to any one of items 47 to 79, 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 81] 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 81. The method of item 80, 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 82] 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; 82. The method according to any one of items 47 to 81, further comprising: putting motion vectors of some control points of the current image block into the motion vector first candidate list. [Item 83] 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 83. The method of item 82, including: 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 84] The above method is The method of item 82 or 83, 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 85] The above method is The method described in item 82 or 83, 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 86] 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 49 to 61, 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 87] determining a motion vector of the current image block based on the candidate motion vectors, Item 87. The method of claim 86, 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 88] Constructing the second candidate list of motion vectors as described above includes the steps of: Item 87. The method of item 86, 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 89] 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 Item 89. The method of item 88, 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 90] 90. The method according to any one of items 47 to 89, wherein M is 4 or less. [Item 91] 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 92] Item 92. The video processing device according to item 91, wherein N is equal to 1 or 2. [Item 93] 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 91 or 92, 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 related block. [Item 94] 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 94. A video processing device according to item 93, 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 95] Item 94. The video processing device according to Item 93, wherein the representative motion vector of the relevant block is entered as a first candidate in a motion vector first candidate list. [Item 96] Item 94. The video processing device according to item 93, wherein the representative motion vector of the relevant block includes a motion vector at a central position of the relevant block. [Item 97] The prediction module further comprises: Item 94. A video processing device as described in Item 93, 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 98] The prediction module further comprises: A moving image processing device as described in Item 97, 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 99] The prediction module further comprises: A moving image processing device as described in Item 98, which is used to determine that a sub-image block for which a motion vector cannot be obtained has appeared in the associated block when a sub-image block in the associated block is not obtainable or when a sub-image block in the associated block uses an intra-frame coding mode. [Item 100] The building module further comprises: Item 94. A video processing device as described in Item 93, 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 101] The building module further comprises: Item 101. A video processing device as described in Item 100, 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 102] Item 102. The video processing device according to item 100 or 101, wherein the at least one candidate comprises a motion vector of a set of control points. [Item 103] 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; 13. The video processing device according to any one of items 100 to 102, which is used for predicting a sub-image block in the current image block based on the candidate after the affine transformation. [Item 104] 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 104. The video processing device according to item 103, 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 105] 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 93 to 104, 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 106] 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 106. The video processing device according to item 105, 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 107] 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 93. The video processing device according to any one of Items 93 to 104, wherein the device is used for inputting motion vectors of some control points of the current image block into the first motion vector candidate list. [Item 108] 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 108. The video processing device according to item 107, further 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 a motion vector of the specific neighboring block that satisfies a preset condition as the motion vector of the control point. [Item 109] The building module further comprises: A moving image processing device as described in item 107 or 108, 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 110] The building module further comprises: A moving image processing device described in any one of items 107 or 108, 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 number of candidates in the first motion vector candidate list is greater than a predetermined numerical value. [Item 111] 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 93 to 105, 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 112] determining a motion vector of the current image block based on the candidate motion vectors, Item 112. A video processing device as described in Item 111, 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 113] The constructed motion vector second candidate list is Item 112. The video processing device according to item 111, 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 114] Item 114. The video processing device according to Item 113, wherein the plurality of neighboring blocks in the current image of the current image block include the predetermined M number of neighboring blocks. [Item 115] 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 115. The video processing device according to item 114, wherein the N neighboring blocks refer to the N neighboring blocks that are determined first in the predetermined order. [Item 116] The building module further comprises: Item 115. A video processing device as described in Item 114, 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 117] 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 91 or 116 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 118] determining a target neighboring block based on the scanned neighboring block that meets the first preset condition; Item 109. The video processing device according to Item 109, further comprising determining a neighboring block that meets the first preset condition as the target neighboring block. [Item 119] The above pre-defined conditions are: Item 109 or 118. The video processing device according to item 109 or 118, wherein the reference image of the neighboring block and the reference image of the current image block are the same. [Item 120] 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 119. The video processing device according to any one of items 117 to 119, wherein the prediction module is further used to predict the current image block based on the motion vector after the scaling process. [Item 121] The step of predicting the current image block based on the motion vector after the scaling process includes: Item 121. The video processing method according to item 120, 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 122] Item 121. The video processing device according to Item 120, 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 123] 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 121. The moving image processing device according to item 120, 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 124] The video processing device according to any one of items 117 to 120, wherein if no neighboring block matching the preset condition is scanned among the N neighboring blocks, a default block is set as the reference block for the current image block. [Item 125] Item 125. The video processing device according to item 124, wherein the default block is an image block pointed to by a motion vector (0,0). [Item 126] Item 126. The video processing device according to any one of items 91 to 125, 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 127] Item 127. A device for processing video according to item 126, 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 128] Item 91. The video processing device according to any one of Items 91 to 127, wherein the current image block is one coding unit CU. [Item 129] 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 129. The video processing device according to any one of items 91 to 128, 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 130] Item 91. The video processing device according to any one of items 91 to 129, 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 131] 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 131. The video processing device according to any one of Items 91 to 130, 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 132] 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 132. A video processing device according to item 131, comprising a motion vector of the relevant block for which a scaling step has been skipped. [Item 133] 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 91 to 130, 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 134] 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 91. The video processing device according to any one of Items 91 to 133, 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 135] 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 135. A video processing device according to item 134, comprising a motion vector of the relevant block for which a scaling step has been skipped. [Item 136] The video processing device according to any one of items 91 to 135, wherein M is 4 or less. [Item 137] 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 138] Item 138. A video processing device as described in Item 137, 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 139] Item 139. A video processing device according to item 137 or 138, wherein N is equal to 1 or 2. [Item 140] Item 139. The video processing device according to any one of items 137 to 139, wherein the M candidates include motion vectors of M neighboring blocks of the current image block on the current image. [Item 141] 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 described in 140 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 142] determining a target neighboring block based on the scanned neighboring block that meets the first preset condition; Item 141. The video processing device according to item 140, further comprising determining a neighboring block that meets the first preset condition as the target neighboring block. [Item 143] The above pre-defined conditions are: Item 3. The video processing device according to any one of items 141 and 142, wherein the reference image of the neighboring block and the reference image of the current image block are the same. [Item 144] The construction module 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; Item 144. The video processing device according to any one of items 141 to 143, wherein the prediction module is further used to predict the current image block based on the motion vector after the scaling process. [Item 145] The step of predicting the current image block based on the motion vector after the scaling process includes: Item 145. The moving image processing device according to item 144, 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 146] Item 145. The video processing device according to Item 144, 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 147] 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 145. The moving image processing device according to item 144, 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 148] Item 144. The video processing device according to any one of Items 141 to 143, 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 149] Item 149. The video processing device according to Item 148, wherein the default block is an image block pointed to by a motion vector (0,0). [Item 150] 150. The video processing device according to any one of items 137 to 149, 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 151] Item 151. A device for processing video according to item 150, 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 152] Item 152. The video processing device according to any one of Items 137 to 151, wherein the current image block is one coding unit CU. [Item 153] 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 153. The video processing device according to any one of items 137 to 152, 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 154] Item 154. The video processing device according to any one of Items 137 to 153, 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 155] 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 155. The video processing device according to any one of items 137 to 154, 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 156] 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 156. A device for processing a moving image according to Item 155, comprising a motion vector of the relevant block for which a scaling step has been skipped. [Item 157] 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 137 to 154, 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 158] 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 137. The video processing device according to any one of items 137 to 157, 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 159] 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 159. A device for processing a moving image according to item 158, comprising a motion vector of the relevant block for which a scaling step has been skipped. [Item 160] 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 137. The video processing device according to any one of items 137 to 159, 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 161] 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; Item 137. The video processing device according to any one of items 137 to 159, further comprising: inputting a representative motion vector of a related block of the current image block as the specific candidate in the first motion vector candidate list. [Item 162] Item 162. The video processing device according to Item 161, wherein the representative motion vector of the relevant block is entered as a first candidate in a motion vector first candidate list. [Item 163] Item 162. The video processing device according to item 161, wherein the representative motion vector of the relevant block includes a motion vector at a central position of the relevant block. [Item 164] The prediction module further comprises: Item 161. A video processing device as described in Item 161, wherein when a sub-image block for which a motion vector cannot be obtained appears in the associated block, a representative motion vector of the associated block is set as the motion vector of the sub-image block for which a motion vector cannot be obtained, and is used to predict the corresponding sub-image block in the current image block. [Item 165] The prediction module further comprises: A moving image processing device as described in Item 164, 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 cannot be obtained. [Item 166] The prediction module further comprises: A moving image processing device as described in Item 164, 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, a motion vector is used to determine whether a sub-image block in the associated block has a motion vector that is not obtainable. [Item 167] The prediction module further comprises: 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 based on an affine transformation model; Item 167. The video processing device according to any one of items 137 to 166, which is used for predicting a sub-image block in the current image block based on the candidate after the affine transformation. [Item 168] Item 168. The video processing device according to item 167, 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 169] 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 169. A video processing device according to Item 168, 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 170] 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 137 to 169, 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 171] 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 171. The video processing device according to item 170, further comprising: inputting 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 172] 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 172. The video processing device according to any one of Items 137 to 171, which is used to input motion vectors of some control points of the current image block into the first motion vector candidate list. [Item 173] 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 173. The video processing device according to item 172, further 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 174] The building module further comprises: A moving image processing device as described in item 172 or 173, which is used to discard the motion vectors of some of the control points of the current image block from being included in the first motion vector candidate list when the motion vectors of some of the control points respectively point to different reference frames. [Item 175] The building module further comprises: A moving image processing device as described in item 172 or 173, 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 number of candidates in the first motion vector candidate list is greater than a predetermined numerical value. [Item 176] 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 139 to 151, which is used to determine the motion vector of the current image block based on the motion vector of the candidate when it is determined to adopt a candidate in the second motion vector candidate list. [Item 177] determining a motion vector of the current image block based on the candidate motion vectors, Item 177. A video processing device as described in Item 176, 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 178] Constructing the second candidate list of motion vectors as described above includes the steps of: Item 177. The video processing device according to Item 176, further 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 179] The construction module is further used to input the motion vectors of the M predetermined neighboring blocks in a predetermined order as M candidates, respectively, into the second motion vector candidate list, and the N neighboring blocks refer to the N neighboring blocks that are first determined in the predetermined order; and / or The video processing device described in Item 178, wherein 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 cannot be obtained. [Item 180] 180. The video processing device according to any one of items 137 to 179, wherein M is 4 or less. [Item 181] A moving image processing device comprising a memory and a processor, the memory being used for storing instructions, the processor executing the instructions stored in the memory, and by executing the instructions stored in the memory, the processor being used for executing the method according to any one of items 1 to 46. [Item 182] A moving image processing device comprising a memory and a processor, the memory being used for storing instructions, the processor executing the instructions stored in the memory, and by executing the instructions stored in the memory, the processor being used for executing the method according to any one of items 47 to 90. [Item 183] A computer storage medium having a computer program stored therein, the computer program causing the computer to execute the method according to any one of items 1 to 46 when executed by a computer. [Item 184] A computer storage medium having a computer program stored therein, the computer program causing the computer to execute the method according to any one of items 47 to 90 when executed by a computer. [Item 185] A computer program product comprising instructions which, when executed by a computer, cause the computer to carry out the method according to any one of items 1 to 46. [Item 186] A computer program product comprising instructions which, when executed by a computer, cause the computer to carry out the method according to any one of items 47 to 90.
Claims
1. Dividing a current image block into a plurality of sub-blocks; According to a target neighboring block of the current image block that satisfies a preset condition, determining a related block of the plurality of sub-blocks in a same frame of the current image block according to a motion vector of the target neighboring block; encrypting or decrypting the current image block according to a motion vector of the associated block of the plurality of sub-blocks; determining a set of control point motion vectors in an affine transformation mode using one or more neighboring blocks of the current image block; adding the control point motion vectors to a motion vector candidate list of the current image block; A moving image processing method comprising:
2. The video processing method of claim 1 , further comprising determining a zero vector as a temporary motion vector corresponding to the target neighboring block of the current image block that does not satisfy the preset condition.
3. in response to one of the plurality of sub-blocks having an unavailable motion vector, predicting the one sub-block in the current image block using a representative motion vector of an associated block of the current image block to replace the unavailable motion vector; The moving image processing method according to claim 1 , further comprising:
4. inserting a candidate indicating that a temporary motion vector is used to determine motion information of a sub-block of the current image block into the motion vector candidate list; inserting one or more control point motion vectors of surrounding blocks of the current image block as one or more affine candidates of the current image block into the motion vector candidate list; inserting constructed affine candidates, which are obtained using motion information of surrounding blocks of the current image block, into the motion vector candidate list according to a number of candidates in the motion vector candidate list that is smaller than a preset value; inserting a zero vector into the motion vector candidate list in response to the number of candidates in the motion vector candidate list being less than the preset value after the constructed affine candidates have been inserted. The moving image processing method according to claim 1 , further comprising:
5. The video processing method according to claim 1 , wherein the group of control point motion vectors includes motion vectors of two or three control points of the one or more neighboring blocks.
6. The step of determining a set of control point motion vectors comprises: scanning the left neighboring blocks of the current image block according to a first scan order, and determining one or more control point motion vectors of the first left neighboring block using an affine transformation mode for prediction in response to reaching a first left neighboring block; scanning upper neighboring blocks of the current image block according to a second scanning order, and in response to reaching a first upper neighboring block, determining one or more control point motion vectors of the first upper neighboring block using the affine transformation mode for prediction; Including, The step of adding the control point motion vectors to the motion vector candidate list comprises:
2. The method of claim 1, further comprising adding the one or more control point motion vectors of the first left neighboring block and the one or more control point motion vectors of the first upper neighboring block as candidates to the motion vector candidate list of the current image block.
7. determining a scaling factor of the motion vector of the associated block according to a distance between a reference image designated by the motion vector of the associated block and the peer frame located in the reference image, and a distance between the peer frame and a current frame in which the current image block is located; scaling the motion vector of the associated block based on the scaling factor; The moving image processing method according to claim 1 , comprising:
8. 2. The video processing method according to claim 1, further comprising a step of scaling the motion vector of the associated block according to a scaling factor of 1 or skipping the step of scaling the motion vector of the associated block according to a motion vector of the associated block that specifies a long-term reference image or the peer frame of the current image block that is a long-term reference image.
9. at least one memory for storing instructions; By executing the instructions, Divide the current image block into multiple sub-blocks, According to a target neighboring block of the current image block that satisfies a preset condition, determine a related block of the plurality of sub-blocks in a same frame of the current image block according to a motion vector of the target neighboring block; Encrypting or decrypting the current image block according to a motion vector of the associated block of the plurality of sub-blocks; determining a set of control point motion vectors in an affine transformation mode using one or more neighboring blocks of the current image block; at least one processor configured to add the control point motion vectors to a motion vector candidate list for the current image block; A moving image processing device comprising:
10. Dividing a current image block into a plurality of sub-blocks; According to a target neighboring block of the current image block that satisfies a preset condition, determining a related block of the plurality of sub-blocks in a same frame of the current image block according to a motion vector of the target neighboring block; generating a bitstream by encrypting the current image block according to a motion vector of the associated block of the plurality of sub-blocks; determining a set of control point motion vectors in an affine transformation mode using one or more neighboring blocks of the current image block; adding the control point motion vectors to a motion vector candidate list of the current image block; A bitstream generating method comprising:
Citation Information
Patent Citations
Sub-prediction unit (pu)-based temporal motion vector prediction in hevc and sub-pu design in 3d-hevc
JP2016537839A
Image encoding method and device, and image decoding method and device
JP2019506089A
Video coding device and video decoding device
JP2020145486A
Sub-prediction unit (PU) based temporal motion vector prediction in HEVC and sub-PU design in 3d-hevc
US20150085929A1
Image encoding method and apparatus, and image decoding method and apparatus
US20180376161A1
