Motion vector predictor candidate sorting in merge list

By adaptively adjusting the sorting and insertion order of motion vector prediction candidates in video compression technology, the problem of low efficiency of motion vector prediction coding in the existing technology is solved, and a more efficient video compression effect is achieved.

CN113228676BActive Publication Date: 2024-10-29INTERDIGITAL VC HOLDINGS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980073765.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-25
Publication Date
2024-10-29
Estimated Expiration
2039-11-25

AI Technical Summary

Technical Problem

Existing video compression technology has the problem of low coding efficiency in motion vector prediction, especially in the construction and sorting of merge candidate lists, resulting in compression efficiency that fails to fully utilize the redundant information in the video sequence.

Method used

An adaptive motion vector predictor list method is proposed, by inserting history-based motion vector predictor candidates and pairwise average motion vector predictor candidates into the merge candidate list, and adjusting their sorting order in the list to optimize Coding efficiency. Specific measures include in the HEVC and VVC standards, dynamically adjusting the insertion position of HMVP and pairwise candidates according to the reference frame time structure and maximum list size of the current block to ensure that the construction of the merge candidate list has the highest coding efficiency.

Benefits of technology

By optimizing the sorting and insertion order of motion vector predictor candidates, the coding efficiency of video compression is significantly improved, and the compression effect is improved. Especially in low-latency configuration and random access configuration, the compression performance of video sequences is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113228676B_ABST
    Figure CN113228676B_ABST
Patent Text Reader

Abstract

Different implementations are described; in particular, implementations using a merged list including history-based motion vector predictor candidates and average motion vector predictor candidates for video encoding and decoding. The method comprises: determining one or more history-based motion vector predictor candidates for a current block of a picture using motion information of blocks preceding a current block; determining one or more average motion vector predictor candidates for the current block from a pair of motion vector predictor candidates in a list of average motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of blocks spatially and temporally surrounding the current block; and inserting one or more average motion vector predictor candidates before one or more history-based motion vector predictor candidates in the list of motion vector predictor candidates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application is in the field of video compression and its aim is to improve the compression efficiency compared to existing video compression systems. Background Art

[0002] For compression of video data, blocky regions of a picture are encoded using inter-picture prediction to exploit temporal redundancy between different pictures of a video source signal, or intra-picture prediction to exploit spatial redundancy in a single picture of a source signal. To this end, various block sizes within a picture can be specified, depending on the compression standard used. The prediction residuals are then further compressed using transforms to remove correlations within the residuals before being quantized and even ultimately compressed using entropy coding (also known as residual coding).

[0003] In the HEVC video compression standard (see "ITU-T H.265ITU Telecommunication Standardization Sector (10 / 2014)", Series H: Audiovisual and Multimedia Systems, Infrastructure of Audiovisual Services – Motion Video Coding, High Efficiency Video Coding, Recommendation ITU-T H.265"), a motion vector (MV) is assigned to a uni-predictive prediction unit (PU) and a pair of motion vectors is assigned to a bi-predictive PU for motion compensated temporal prediction of the considered PU. Two modes are utilized in HEVC to encode motion data. They are called AMVP (Adaptive Motion Vector Prediction) and Merge.

[0004] AMVP basically consists in signaling the reference picture(s) used to predict the current PU, the motion vector predictor index (obtained in two predictor lists) and the motion vector difference. The merge mode consists in signaling and decoding the index of some motion data collected in a list of motion data predictors. The merge list consists of five candidates and is constructed in the same way on the decoder and encoding side. The merge list typically contains motion information associated with some spatial and temporal surrounding blocks that are available in their decoding state when processing the current PU.

[0005] In addition, in VTM-3 (see “Versatile Video Coding (Draft 3)”, B. Bross, J. Chen, S. Liu, document JVET-L1001, Macau, October 2018), two types of merge candidates are adopted, called history-based motion vector predictor (HMVP) and pairwise average candidate. Summary of the invention

[0006] According to one aspect of the present disclosure, a method for encoding and / or decoding a picture is disclosed. The method comprises:

[0007] determining one or more history-based motion vector predictor candidates for the current block using motion information of blocks preceding the current block of the picture;

[0008] determining one or more average motion vector predictor candidates for the current block from a pair of motion vector predictor candidates in a list of average motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of blocks spatially and temporally surrounding the current block; and

[0009] One or more average motion vector predictor candidates are inserted before one or more history-based motion vector predictor candidates in the list of motion vector predictor candidates.

[0010] According to another aspect of the present disclosure, a device for encoding and / or decoding a picture is disclosed. Such a device includes one or more processors, wherein the one or more processors are configured to:

[0011] determining one or more history-based motion vector predictor candidates for the current block using motion information of blocks preceding the current block of the picture;

[0012] determining one or more average motion vector predictor candidates for the current block from a pair of motion vector predictor candidates in a list of average motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of blocks spatially and temporally surrounding the current block; and

[0013] One or more average motion vector predictor candidates are inserted before one or more history-based motion vector predictor candidates in the list of motion vector predictor candidates.

[0014] According to another aspect of the present disclosure, an apparatus for encoding and / or decoding a picture is disclosed, the apparatus comprising:

[0015] means for determining one or more history-based motion vector predictor candidates for a current block using motion information of blocks preceding the current block of the picture;

[0016] means for determining one or more average motion vector predictor candidates for a current block from a pair of motion vector predictor candidates in a list of average motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of blocks spatially and temporally surrounding the current block; and

[0017] Before one or more history-based motion vector predictor candidates in the list of motion vector predictor candidates, one or more components of average motion vector predictor candidates are inserted.

[0018] According to aspects of the present disclosure, a method for encoding and / or decoding a picture is disclosed. The method comprises:

[0019] determining one or more history-based motion vector predictor candidates for the current block using motion information of blocks preceding the current block of the picture;

[0020] For a current block, determining one or more average motion vector predictor candidates and / or one or more combined motion vector predictor candidates; and

[0021] The determined motion vector predictor candidate is inserted into the list of motion vector predictor candidates depending on the temporal structure of the reference frames of the current block.

[0022] According to another aspect of the present disclosure, a device for encoding and / or decoding a picture is disclosed. Such a device includes one or more processors, wherein the one or more processors are configured to:

[0023] determining one or more history-based motion vector predictor candidates for the current block using motion information of blocks preceding the current block of the picture;

[0024] For a current block, determining one or more average motion vector predictor candidates and / or one or more combined motion vector predictor candidates; and

[0025] The determined motion vector predictor candidate is inserted into the list of motion vector predictor candidates depending on the temporal structure of the reference frames of the current block.

[0026] According to another aspect of the present disclosure, an apparatus for encoding and / or decoding a picture is disclosed, the apparatus comprising:

[0027] means for determining one or more history-based motion vector predictor candidates for a current block using motion information of blocks preceding the current block of the picture;

[0028] means for determining, for a current block, one or more average motion vector predictor candidates and / or one or more combined motion vector predictor candidates; and

[0029] A component that inserts a determined motion vector predictor candidate into a list of motion vector predictor candidates depending on the temporal structure of a reference frame of a current block.

[0030] The present disclosure also provides a computer program product including instructions that, when executed by a computer, cause the computer to perform the described method. The present disclosure also provides a non-transitory computer-readable medium storing executable program instructions to cause a computer executing the instructions to perform any of the described methods. The present disclosure also provides a signal including data generated according to any of the described methods. The present disclosure also provides a bitstream that is formatted according to any of the described methods to include syntax elements and encoded image information.

[0031] The present disclosure also provides a device, comprising:

[0032] the device described; and

[0033] At least one of: (i) an antenna configured to receive a signal, the signal including data representing image information, (ii) a frequency band limiter configured to limit the received signal to a frequency band including data representing image information, and (iii) a display configured to display an image from the image information.

[0034] A simplified overview of the subject matter is presented above in order to provide a basic understanding of some aspects of the subject matter embodiments. This overview is not an exhaustive overview of the subject matter. It is not intended to identify key / important elements of the embodiments or to delineate the scope of the subject matter. Its sole purpose is to present some concepts of the subject matter in a simplified form as a prelude to a more detailed description that will be presented later.

[0035] Additional features and advantages of the present disclosure will become apparent from the following detailed description of illustrative embodiments which proceeds with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 Block diagram illustrating an example of a general video compression scheme.

[0037] Figure 2 Block diagram illustrating an example of a general video decompression scheme.

[0038] Figure 3 Some coding tree units representing compressed HEVC pictures are illustrated.

[0039] Figure 4 The example illustrates dividing the coding tree unit into coding units, prediction units, and transform units.

[0040] Figure 5 The signaling of inter-frame prediction information according to the HEVC specification is illustrated.

[0041] Figure 6 The construction of a list of merge motion motion vector predictor candidates in HEVC is illustrated.

[0042] FIG. 7 illustrates the locations of spatial (a) and temporal (b) motion vector predictors used in merge mode in HEVC.

[0043] Figure 8 Example for Figure 6 The construction of a list of merged motion vector predictor candidates showing the positions of the spatial and temporal motion vector predictors is shown.

[0044] Fig. 9 An example of updating a table in a method using history-based motion vector predictor candidates is illustrated.

[0045] Fig.10 The non-sub-block (or translation) merge candidate list construction according to VVC Draft 3 is illustrated.

[0046] Fig.11 The construction of a sub-block-based motion vector prediction candidate list according to VTM-3 is illustrated.

[0047] Fig.12 A modified translation merge candidate list construction according to the first variation of the first embodiment is illustrated.

[0048] Fig.13 A second variation of the first embodiment utilizing modified conditions to insert history-based motion vector predictors is illustrated.

[0049] Fig.14 A third variation of the first embodiment utilizing modified conditions to insert pair-wise average motion vector predictors is illustrated.

[0050] Fig.15 A first variation of the second embodiment is illustrated, wherein during candidate list construction the order between pairwise and history-based motion vector predictors depends on the maximum list size.

[0051] Fig.16 A second variation of the second embodiment is illustrated, in which the conditions for considering HMVP candidates and pair candidates are modified compared to the first variation.

[0052] Fig.17 A first variation of the third embodiment for candidate list construction is illustrated, in which history-based motion vector predictors and pairs of candidates are interleaved in a merge list.

[0053] Fig.18 A second variation of the third embodiment for candidate list construction is illustrated, in which the insertion condition of the HMVP candidate is modified compared to the first variation.

[0054] Fig.19 A fourth embodiment of candidate list construction is illustrated, where combined and paired candidates are added depending on the temporal structure of the current frame.

[0055] Fig. 20 A general flow chart illustrating a method according to an embodiment of the present disclosure.

[0056] Fig.21 A block diagram illustrating an example of a system in which aspects of the illustrative embodiments may be implemented.

[0057] It should be understood that the drawings are for purposes of illustrating examples of various aspects and embodiments and are not necessarily the only possible configurations. In the various drawings, like reference numerals refer to the same or similar features. DETAILED DESCRIPTION

[0058] For clarity of description, the following description will describe various aspects with reference to embodiments involving video compression techniques such as, for example, HEVC and / or VVC / H.266. However, the described aspects are applicable to other video processing techniques and standards.

[0059] Figure 1 An exemplary encoder 100 is illustrated. Variations of the encoder 100 are contemplated, but for clarity, the encoder 100 is described below without describing all contemplated variations.

[0060] Before being encoded, the video sequence may undergo a pre-encoding process (101), for example, applying a color transform to the input color picture (e.g., conversion from RGB 4:4:4 to YCbCr 4:2:0), or performing a remapping of the input picture components in order to obtain a signal distribution that is more resilient to compression (e.g., using histogram equalization of one of the color components). Metadata may be associated with the pre-processing and appended to the bitstream.

[0061] To encode a video sequence having one or more pictures, the pictures are, for example, divided (102) into one or more slices, where each slice may include one or more slice segments. In HEVC, slice segments are organized into coding units, prediction units, and transform units. The HEVC specification distinguishes between "blocks" and "units", where a "block" addresses a specific area in a sample array (e.g., luma, Y), and a "unit" includes a concatenated block of all coded color components (Y, Cb, Cr or monochrome), syntax elements, and prediction data (e.g., motion vectors) associated with these blocks.

[0062] In encoder 100, a picture is encoded by an encoder element as described below. The picture to be encoded is processed, for example, in units of CUs. Each CU is encoded, for example, using intra or inter mode. When the unit is encoded in intra mode, it performs intra prediction (160). In inter mode, motion estimation (175) and motion compensation (170) are performed. The encoder decides (105) which of intra mode or inter mode to use for the coding unit, and indicates the intra / inter decision, for example, by a prediction mode flag. The prediction residual is calculated by subtracting (110) the predicted block from the original image block.

[0063] The prediction residual is then transformed (125) and quantized (130). The quantized transform coefficients are entropy encoded (145) along with motion vectors and other syntax elements to output a bitstream. The encoder can skip the transform and apply quantization directly to the untransformed residual signal. The encoder can also bypass both the transform and quantization, i.e., directly encode the residual without applying the transform or quantization process.

[0064] The encoder decodes the coded block to provide a reference for further prediction. The quantized transform coefficients are dequantized (140) and inverse transformed (150) to decode the prediction residual. The decoded prediction residual and the prediction block are combined (155) to reconstruct the image block. An in-loop filter (165) is applied to the reconstructed picture to, for example, perform deblocking / SAO (sample adaptive offset) filtering to reduce coding artifacts. The filtered image is stored in a reference picture buffer (180).

[0065] Figure 2 200. In the decoder 200, the bitstream is decoded by the decoder elements, as described below. The video decoder 200 generally performs the same Figure 1 The decoding path is the inverse of the encoding path described in . The encoder 100 also typically performs video decoding as part of encoding the video data.

[0066] Specifically, the input to the decoder includes a video bitstream that may be generated by the video encoder 100. The bitstream is first entropy decoded (230) to obtain transform coefficients, motion vectors, and other encoding information. Picture partition information indicates how the picture is partitioned. Thus, the decoder can divide (235) the picture according to the decoded picture partition information. The transform coefficients are dequantized (240) and inverse transformed (250) to decode the prediction residual. The decoded prediction residual and the prediction block are combined (255) to reconstruct the image block. The prediction block can be obtained (270) from intra-frame prediction (260) or motion compensated prediction (i.e., inter-frame prediction) (275). An in-loop filter (265) is applied to the reconstructed image. The filtered image is stored at a reference picture buffer (280).

[0067] The decoded picture may further undergo post-decoding processing (285), such as inverse color conversion (e.g., conversion from YCbCr 4:2:0 to RGB 4:4:4) or inverse remapping to perform the inverse of the remapping process performed in the pre-encoding process (101). The post-decoding process may use metadata derived in the pre-encoding process and signaled in the bitstream.

[0068] The present application proposes adaptation of the lists of motion vector predictors in the encoder and decoder, such as in Figure 1 and Figure 2 An encoder and decoder are illustrated in FIG. 4 , which employs motion compensated temporal prediction to exploit the redundancy existing between consecutive pictures of a video sequence.

[0069] In the HEVC video compression standard or a technique similar to HEVC, a motion vector is associated with a prediction unit (PU). The picture to be encoded or decoded is divided into so-called coding tree units (CTUs) as the basic unit of encoding, and a coherent set of CTUs is grouped into slices. A CTU typically includes three coding tree blocks (CTBs), one block for luma samples and two blocks for chroma samples, and associated syntax elements. The coding tree unit can be further divided into coding units (CUs), which are the smallest coding elements for prediction type decision (i.e., whether to perform inter-picture or intra-picture prediction). Finally, the coding unit is further divided into one or more prediction units (PUs).

[0070] Figure 3 An example of partitioning a portion of a picture into CTUs 0, 1, and 2 is shown in FIG. In the figure, CTU 0 on the left is used directly as it is, while CTU 1 on the right is partitioned into multiple smaller parts based on the signal characteristics of the picture area covered by the CTU. The arrows indicate the motion vectors of the corresponding parts.

[0071] The CTB is the root of the quadtree partition into coding blocks (CB), and the coding blocks can be partitioned into one or more prediction blocks (PB) and form the root of the quadtree partition into transform blocks (TB). Transform blocks (TB) larger than 4x4 are divided into 4x4 sub-blocks of quantized coefficients, called coefficient groups (CG). Corresponding to the coding blocks, prediction blocks and transform blocks, the coding unit (CU) includes a set of prediction units (PU) and transform units (TU) in a tree structure. The PU includes prediction information for all color components, and the TU includes a residual coding syntax structure for each color component. The same prediction applies to the prediction block (PB). The sizes of the CB, PB and TB for the luminance component apply to the corresponding CU, PU and TU. In Figure 4 An example of dividing a coding tree unit into coding units, prediction units, and transform units is shown in FIG.

[0072] In the following, the proposed method is described in detail. First, the general principles of merge mode, pairwise average and history-based motion vector prediction candidates are described. Then, different embodiments for constructing a merge candidate list including pairwise average and history-based motion vector prediction candidates are proposed.

[0073] The merge mode according to the HEVC standard is to derive the inter-frame prediction information (hereinafter also referred to as motion information) of a given prediction unit from the selected motion information predictor candidate. The motion information considered here includes all inter-frame prediction parameters of the PU, namely:

[0074] - One-way or two-way temporal prediction type;

[0075] - the reference picture index in each reference picture list;

[0076] -(multiple) motion vectors.

[0077] exist Figure 5 The encoding and decoding of inter prediction information in HEVC is summarized in . It can be seen that the motion information encoding / decoding is similar in skip mode and merge mode. In both modes, a single field is signaled to enable the decoder to retrieve the motion information of the PU: the so-called merge index Merge_idx. The merge index indicates which motion vector predictor from the list of merged motion information predictors is used to derive the motion information of the current PU. In the following, the list of motion information predictors is also called merge list or merge candidate list. Furthermore, candidate motion information predictors are called merge candidates.

[0078] In HEVC, the merge candidate list systematically consists of 5 merge candidates. Figure 6 Illustrate how the merge list is constructed on the encoder side and the decoder side. First, up to 5 spatial positions are considered to retrieve some potential candidates. They are visited in the following order:

[0079] 1-Left side (A1)

[0080] 2- Upper side (B1)

[0081] 3-Upper right side (B0)

[0082] 4-Lower left side (A0)

[0083] 5-Upper left side (B2)

[0084] The symbols A0, A1, B0, B1, B2 represent Figure 7a The spatial position shown in .

[0085] Select a maximum of four mutually different spatial candidates. In addition, by considering Figure 7bThe temporal motion information at the illustrated position (i.e., position H) is used to select the temporal prediction quantity denoted as TMVP by considering the "center" if the candidate at position H in the considered reference picture is not available. A pruning process is then performed to ensure that the set of selected spatial and temporal candidates does not contain redundant candidates.

[0086] Next, in the case of B slices, if the list is incomplete, another type of candidate is pushed into the merge list: the so-called merge candidate. This consists in forming a candidate consisting of motion information associated with one reference picture list (L0) from one candidate already present in the list, and motion associated with another reference picture list (L1) from another candidate already present in the merge list.

[0087] Finally, if the merge list is still incomplete, ie, still does not include 5 elements, a zero motion vector is pushed to the end of the merge list until the merge list is complete.

[0088] Figure 8 The diagram in Figure 3 details the entire process of merge list construction in HEVC.

[0089] In JVET-L0090 (see JVET-L0090 "CE4.4.12: Pairwise average candidates", Y.-L. Hsiao, T.-D. Chuang, C.-Y. Chen, C.-W. Hsu, Y.-Huang, S.-M. Lei, Macau, October 2018), so-called pairwise average candidates are added to the merge candidate list to improve VTM-2 compression efficiency. These pairwise candidates are calculated as follows. For each reference picture list, some predefined candidate pairs are taken from the merge candidate list and averaged. When calculating the pairwise candidates, the merge list is taken in its current state. If one or two candidates are available for the reference picture list under consideration and in the considered position in the merge candidate list, a pairwise candidate is formed. Up to six candidates are considered to enrich the merge candidate list.

[0090] The last new merged enhancement tool that is part of the VVC draft standard is called history-based motion vector prediction (JVET-L0266, see JVET-L0266 “CE4: History-based Motion Vector Prediction (Test 4.4.7)”, L. Zhang, K. Zhang, H. Liu, Y. Wang, P. Zhao, D. Hong, Macau, October 2018).

[0091] History-based motion vector prediction consists in maintaining a table consisting of motion information for encoding blocks before the current block. Each time a non-affine inter block is encoded, its associated motion data is added to the end of the table as a new HMVP merge candidate. The maximum number of motion vector predictors in the HMVP table is 6, and past motion data is discarded from the table according to the FIFO (first in, first out) rule. The history-based management of the buffer (table) of motion vector predictors is in Fig. 9 Example.

[0092] Fig.10 The construction of a classic (or non-subblock or translational, not affine or subblock-based) merge list constructed according to VVC draft 3 is illustrated in FIG. Here, "classic" means that the merge list is used for temporal prediction of translational motion compensation, where for each reference picture list, one motion vector is associated with the CU.

[0093] Compared with HEVC, the construction of the classic merge list is enriched as follows. Fig.10 As can be seen in Figure 1, the same spatial and temporal predictors are used in the first stage of the process. After the spatial and temporal MV predictors have been added, if the merged list contains at least 2 free positions, the HMVP candidate is added to the list. During this stage, one or more HMVP candidates are repeatedly pushed to the back of the candidate list. Once the number of free positions remaining in the list is reduced to one, or when no more HMVP candidates are available, this iterative HMVP filling step will stop.

[0094] Next, if the list is still incomplete (i.e., the number of added candidates is less than the maximum number of allowed merge candidates), some pairwise merge candidates are evaluated and added to the list. This phase consists in iteratively computing and pushing pairwise candidates to the back of the merge candidate list. This iterative process stops when the merge candidate list is complete or there are no more pairwise candidates.

[0095] Finally, if the classical merge list is still incomplete, zero motion vectors are filled into the list.

[0096] exist Fig.11 The construction of the affine merge list is illustrated in . As in VVC draft 3. The affine merge list collects all merged MV prediction quantities involved in sub-block based motion compensated temporal prediction. Therefore, this includes the Advanced Temporal Motion Vector Prediction (ATMVP) merge mode and the affine merge mode. The affine merge candidate represents the merge candidate, from which the 4x4 block based affine motion field is derived for the current CU and used in the temporal prediction of the current CU.

[0097] ATMVP consists in temporally predicting one or more motion vectors of a current block from areas in a reference picture pointed to by motion vectors derived from spatially neighboring blocks of the current block.

[0098] like Fig.10 For example, in VVC draft 3, HMVP merge candidates are first inserted into the merge list before inserting pairwise average candidates. In addition, if at least two free positions remain in the merge list when considering HMVP candidates, they are included in the merge candidate list. In fact, before considering HMVP candidates, the merge list construction process fills the list with spatial and temporal predictions (if available).

[0099] It has been observed that this merge list organization may not be optimal from a coding efficiency perspective. Therefore, in the solution proposed in this application, some methods are proposed to order the HMVP and paired candidates in the merge list in a rate-distortion efficient way, i.e. in a way that improves coding efficiency relative to existing codecs (e.g. VTM-3). In particular, it has been noticed that, depending on the maximum list size allowed (maximum 6, 8 or 10 candidates), inserting the HMVP candidate before the paired candidates may not be optimal in terms of coding efficiency.

[0100] Due to these observations, one basic principle of the present disclosure is to put certain (some) pairwise candidates before the HMVP candidate in the merge candidate list. Several embodiments are provided for this purpose and are described in detail below.

[0101] According to the first embodiment, the pairwise average candidate is inserted before the HMVP candidate in the merge candidate list. Fig.12 The proposed process for constructing a translation merge candidate list is given. The process is performed by both the encoder and the decoder. It can be seen that the modified process is to reverse the order in which the pairwise average and HMVP merge candidates are put into the list.

[0102] Depend on Fig.13 A further modified version of the proposed process is provided. Compared to the previous process, this variant is a further refined process, in which the conditions for inserting the HMVP candidate into the list are modified. Here, the HMVP candidate is inserted once the merged list is still incomplete. This modification is justified by the fact that the pairwise candidates have been calculated and pushed to the list before the HMVP candidate is considered.

[0103] according to Fig.14 Another variation shown in , modifies the condition for inserting the pairwise average candidate so that if there are at least two free positions left in the list, the pairwise candidate is used. Otherwise, the pairwise candidate will not be considered.

[0104] According to another embodiment, the ordering of the merge list between HMVP and paired candidates depends on the maximum allowed size of the merge list. In fact, it has been observed that when the maximum list size is 8, placing paired candidates before HMVP candidates can improve coding efficiency. Otherwise, if it is 6, it is observed that the coding efficiency is unchanged.

[0105] Therefore, in this embodiment it is proposed to make the order depend on the maximum list size. The maximum list size is encoded as a slice or picture header parameter and is up to 6 in VVC so far. In this embodiment it is envisaged to allow merge list sizes greater than 6, possibly up to 10.

[0106] Then, the order between HMVP and paired in the merge list is automatically decided based on the maximum merge list size. If it is higher than or equal to a threshold (e.g., 8), paired candidates are considered before HMVP during merge list construction. Otherwise, HMVP candidates are considered first, as is the case in VVC draft 3.

[0107] The proposed embodiment is Fig.15 and 16 Two variants of are shown. Fig.15 In the first variant shown, the conditions for considering HMVP and paired candidates are unchanged compared to VTM-3. This means that if there are at least 2 free positions left in the merged list, the HMVP candidate is processed. If the list is incomplete, paired candidates are considered.

[0108] exist Fig.16 In the second variant shown, if at least two free positions remain in the merged list being constructed, the candidates of the first considered type are processed (according to the dynamically selected order). If the merged list is still incomplete, the second type of candidates being processed are processed in the selected order.

[0109] According to another embodiment, HMVP and paired candidates are interleaved in the merged list. Fig.17 This new embodiment includes using Fig.17 The repeated process is enclosed by the dotted line in . The loop consists in alternately inserting HMVP and paired candidates until no HMVP or paired candidates are available. During the loop, if no HMVP candidates are available, but some paired candidates are still available, the loop continues until no paired candidates are available. In the same way, during the loop, if no paired candidates are available, but some HMVP candidates are still available, the loop continues until no HMVP candidates are available.

[0110] According to a variation of this embodiment, Fig.18As shown, the modification is driven to check whether the HMVP candidate has to be inserted into the test in the merged list. For the first HMVP candidate to be inserted, the process tests whether there are at least two free positions in the list. If so, the HMVP candidate is inserted, otherwise, the process will consider alternative insertion of the first paired candidate. Next, for subsequent repetitions, the same conditions are used for the insertion of HMVP and paired candidates: if the list is still incomplete, these candidates are added to the list.

[0111] In JVET-L0090, it has been claimed that the gain of adding paired candidates is higher in random access configuration than in low delay configuration. Candidates for HEVC combinations are more efficient in low delay than in random access configuration.

[0112] According to the current embodiment, the merge candidate derivation process depends on the current temporal structure of the reference frames. If all reference frames have a POC smaller than the current one, i.e., the reference frames are in the past, the current frame is considered to have a low delay (LD) configuration. If some reference frames are in the past and others are in the future, the current frame is considered to have a random access (RA) configuration. In the current embodiment, if the current picture has a random access configuration, paired candidates are added, and if the current picture has a low delay configuration, combined candidates are added, such as Fig.19 Describe.

[0113] In a variation of the embodiment, the HMVP insertion position depends on the low latency configuration.

[0114] According to another embodiment, the ranking between the HMVP and the paired average candidates in the list is derived based on the usage rates of the two corresponding candidates in the past coding units. JVET-L0318 (see JVET-L0318 "CE4: rankingbased spatial merge candidate list for inter prediction (Test CE4.4.14))", G. Li, X. Xu, X. Li, S. Liu (Tencent), Macau, October 2018) proposes a ranking-based spatial merge candidate list for inter-frame prediction. Here, a similar method is applied to the ranking between HMVP and paired in the translation merge candidate list. Therefore, as long as the coding unit is decoded or encoded, the usage rates of HMVP and paired are maintained respectively. Then, the patterns with higher occurrences are put into the list first.

[0115] Various proposed embodiments provide a merged list including HMVP and pairwise candidates in a speed-distortion efficient manner. Fig. 20A general flow chart 300 illustrating the general basic principles of these embodiments is illustrated in FIG. 3 . For a current block of a picture, in step 310, one or more history-based motion vector predictor candidates are determined using motion information of blocks preceding the current block. Furthermore, in step 320, one or more averaged motion vector predictor candidates are determined for the current block by averaging a pair of motion vector predictor candidates in a list of motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of blocks that spatially and / or temporally surround the current block. Finally, the one or more averaged motion vector predictor candidates are inserted before the one or more history-based motion vector predictor candidates in the list of motion vector predictor candidates.

[0116] This application describes multiple aspects including tools, features, embodiments, models, methods, etc. Many of these aspects are specifically described, and at least to illustrate the individual features, are often described in a manner that may sound restrictive. However, this is for clarity of description and does not limit the application or scope of those aspects. In fact, all different aspects can be combined and interchanged to provide further aspects. In addition, these aspects can also be combined and interchanged with aspects described in previous applications.

[0117] The aspects described and contemplated in this application can be implemented in many different forms. Figure 1 , Figure 2 and Fig.21 Some embodiments are provided, but other embodiments are contemplated, and Figure 1 , 2 and 21 do not limit the breadth of implementations. At least one of these aspects generally relates to video encoding and decoding, and at least another aspect generally relates to transmitting a generated or encoded bitstream. These and other aspects can be implemented as methods, apparatus, a computer-readable storage medium having stored thereon instructions for encoding or decoding video data according to any of the described methods, and / or a computer-readable storage medium having stored thereon a bitstream generated according to any of the described methods.

[0118] In this application, the terms "reconstructed" and "decoded" are used interchangeably, the terms "pixel" and "sample" are used interchangeably, and the terms "image", "picture", and "frame" are used interchangeably. Usually, but not necessarily, the term "reconstructed" is used on the encoder side, and "decoded" is used on the decoder side.

[0119] Various methods are described herein, and each method includes one or more steps or actions for implementing the described method. Unless a specific order of steps or actions is required for proper operation of the method, the order and / or use of specific steps and / or actions may be modified or combined.

[0120] Various methods and other aspects described in this application can be used to modify modules, e.g. Figure 1 and Figure 2 The motion estimation and / or motion compensation modules (170, 175, 275) of the video encoder 100 and decoder 200 are shown. Moreover, the present aspects are not limited to VVC or HEVC, and can be applied to, for example, other standards and recommendations, whether pre-existing or developed in the future, as well as extensions of any such standards and recommendations (including VVC and HEVC). Unless otherwise specified or technically excluded, the aspects described in this application can be used alone or in combination.

[0121] Various values ​​are used in this application, such as the number of points remaining in the merge candidate list, and the threshold value of the maximum allowed size of the merge candidate list. The specific values ​​are for example purposes, and the described aspects are not limited to these specific values.

[0122] Fig.21 A block diagram illustrating an example of a system in which various aspects and embodiments are implemented. System 1000 may be embodied as a device including various components described below, and is configured to perform one or more aspects described in this document. Examples of such devices include, but are not limited to, various electronic devices, such as personal computers, laptop computers, smart phones, tablet computers, digital multimedia set-top boxes, digital television receivers, personal video recording systems, connected home appliances and servers. The elements of system 1000 may be embodied in a single integrated circuit, multiple ICs and / or discrete components, either individually or in combination. For example, in at least one embodiment, the processing and encoder / decoder elements of system 1000 are distributed across multiple ICs and / or discrete components. In various embodiments, system 1000 is communicatively coupled to one or more other systems or other electronic devices, for example, via a communication bus or by dedicated input and / or output ports. In various embodiments, system 1000 is configured to implement one or more aspects described in this document.

[0123] The system 1000 includes at least one processor 1010 configured to execute instructions loaded therein for implementing, for example, various aspects described in this document. The processor 1010 may include embedded memory, input-output interfaces, and various other circuits known in the art. The system 1000 may also include at least one memory 1020 (e.g., a volatile memory device, a non-volatile memory device). The system 1000 may include a storage device 1040, which may include non-volatile memory and / or volatile memory, including but not limited to electrically erasable programmable read-only memory (EEPROM), read-only memory (ROM), programmable read-only memory (PROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, magnetic disk drive, and / or optical disk drive. As non-limiting examples, the storage device 1040 may include an internal storage device, an attached storage device (including removable and non-removable storage devices), and / or a network accessible storage device.

[0124] The system 1000 includes an encoder / decoder module 1030, which is configured, for example, to process data to provide encoded video or decoded video, and the encoder / decoder module 1030 may include its own processor and memory. The encoder / decoder module 1030 represents a (multiple) module that may be included in a device to perform encoding and / or decoding functions. As is known, a device may include one or both of the encoding and decoding modules. In addition, as known to those skilled in the art, the encoder / decoder module 1030 may be implemented as a separate element of the system 1000, or may be incorporated into the processor 1010 as a combination of hardware and software.

[0125] Program code to be loaded onto the processor 1010 or the encoder / decoder 1030 to perform various aspects described herein may be stored in the storage device 1040 and subsequently loaded onto the memory 1020 for execution by the processor 1010. According to an exemplary embodiment, one or more of the processor 1010, the memory 1020, the storage device 1040, and the encoder / decoder module 1030 may store one or more of various items during the execution of the processes described herein. Such stored items may include, but are not limited to, input video, decoded video or a portion of decoded video, bitstreams, matrices, variables, and intermediate or final results of equations, formulas, operations, and operational logic.

[0126] In some embodiments, memory internal to the processor 1010 and / or encoder / decoder module 1030 is used to store instructions and provide working memory for processing required during encoding or decoding. However, in other embodiments, memory external to the processing device (e.g., the processing device may be the processor 1010 or the encoder / decoder module 1030) is used for one or more of these functions. The external memory may be memory 1020 and / or storage device 1040, such as dynamic volatile memory and / or non-volatile flash memory. In several embodiments, the external non-volatile flash memory is used to store, for example, an operating system for the television. In at least one embodiment, fast external dynamic volatile memory such as RAM is used as working memory for video encoding and decoding operations, such as for MPEG-2 (MPEG refers to Moving Picture Experts Group, MPEG-2 is also known as ISO / IEC 13818, and 13818-1 is also known as H.222, and 13818-2 is also known as H.262), HEVC (HEVC refers to High Efficiency Video Coding, also known as H.265 and MPEG-H Part 2), or VVC (Versatile Video Coding, a new standard developed by JVET (Joint Video Experts Group)).

[0127] Input to the elements of system 1000 may be provided through various input devices as indicated in block 1130. Such input devices include, but are not limited to, (i) a radio frequency (RF) portion for receiving an RF signal transmitted over the air, such as by a broadcaster, (ii) a composite input terminal (or a collection of COMP input terminals), (iii) a universal serial bus (USB) input terminal, and / or (iv) a high-definition multimedia interface (HDMI) input terminal. Fig.21 Other examples not shown include composite video.

[0128] In various embodiments, the input device of block 1130 has associated corresponding input processing elements, as known in the art. For example, the RF portion may be associated with elements suitable for: (i) selecting a desired frequency (also referred to as selecting a signal, or band limiting a signal to a frequency band), (ii) down-converting the selected signal, (iii) again band-limiting a narrower frequency band to select a signal frequency band that may be referred to as a channel in some embodiments, (iv) demodulating the down-converted and band-limited signal, (v) performing error correction, and (vi) demultiplexing to select a desired data packet stream. The RF portion of various embodiments includes one or more elements that perform these functions, such as a frequency selector, a signal selector, a band limiter, a channel selector, a filter, a down-converter, a demodulator, an error corrector, and a demultiplexer. The RF portion may include a tuner that performs various of these functions, including, for example, down-converting a received signal to a lower frequency (e.g., an intermediate frequency or near-baseband frequency) or baseband. In a set-top box embodiment, the RF part and its associated input processing element receive the RF signal transmitted by wired (e.g., cable) medium, and by filtering, down-convert and filter to the desired frequency band again to perform frequency selection. Various embodiments rearrange the order of above-mentioned (and other) elements, remove some in these elements, and / or add other elements that perform similar or different functions. Adding elements can include inserting elements between existing elements, for example, inserting amplifiers and analog-to-digital converters. In various embodiments, the RF part includes an antenna.

[0129] In addition, the USB and / or HDMI terminals may include corresponding interface processors for connecting the system 1000 to other electronic devices via USB and / or HDMI connections. It is to be understood that various aspects of input processing, such as Reed-Solomon error correction, may be implemented, for example, within a separate input processing IC or within the processor 1010 as desired. Similarly, various aspects of USB or HDMI interface processing may be implemented, for example, within a separate interface IC or within the processor 1010 as desired. The demodulated, error corrected, and demultiplexed streams are provided to various processing elements, including, for example, the processor 1010 and the encoder / decoder 1030 operating in conjunction with memory and storage elements to process the data streams for presentation on an output device.

[0130] The various elements of system 1000 may be provided within an integrated housing. Within the integrated housing, the various elements may be interconnected and data may be transferred between them using a suitable connection arrangement, such as an internal bus known in the art, including an inter-IC (I2C) bus, wiring, and printed circuit boards.

[0131] The system 1000 includes a communication interface 1050 that enables communication with other devices via a communication channel 1060. The communication interface 1050 may include, but is not limited to, a transceiver configured to send and receive data over the communication channel 1060. The communication interface 1050 may include, but is not limited to, a modem or a network card, and the communication channel 1060 may be implemented, for example, within a wired and / or wireless medium.

[0132] In various embodiments, a wireless network such as a Wi-Fi network, such as IEEE 802.11 (IEEE refers to the Institute of Electrical and Electronics Engineers), is used to transmit data streams to or otherwise provide data to the system 1000. The Wi-Fi signals of these embodiments are received on a communication channel 1060 and a communication interface 1050 adapted to Wi-Fi communication. The communication channel 1060 of these embodiments is usually connected to an access point or a router, which provides access to an external network including the Internet to allow streaming applications and other over-the-top communications. Other embodiments use a set-top box to provide streaming data to the system 1000, which is connected to the HDMI of the input block 1130 to pass data. Other embodiments also use the RF connection of the input block 1130 to provide streaming data to the system 1000. As described above, various embodiments provide data in a non-streaming mode. In addition, various embodiments use a wireless network other than Wi-Fi, such as a cellular network or a Bluetooth network.

[0133] The system 1000 can provide output signals to various output devices including a display 1100, a speaker 1110, and other peripherals 1120. The display 1100 of various embodiments includes, for example, one or more of a touch screen display, an organic light emitting diode (OLED) display, a curved display, and / or a foldable display. The display 1100 can be used for a television, a tablet computer, a laptop computer, a cellular phone (mobile phone), or other devices. The display 1100 can also be integrated with other components (e.g., as in a smart phone), or standalone (e.g., an external monitor for a laptop computer). Other peripherals 1120 include one or more of a standalone digital video disk (or digital versatile disk) DVR (for both), a disk player, a stereo system, and a lighting system in various examples of embodiments. Various embodiments use one or more peripherals 1120 that provide functions based on the output of the system 1000. For example, a disk player performs the function of playing the output of the system 1000.

[0134] In various embodiments, control signals are communicated between the system 1000 and the display 1100, speaker 1110, or other peripheral device 1120 using signaling such as AV.Link, Consumer Electronics Control (CEC), or other communication protocols that enable device-to-device control with or without user intervention. Output devices can be communicatively coupled to the system 1000 via dedicated connections through various interfaces 1070, 1080, and 1090. Alternatively, the output devices can be connected to the system 1000 via the communication interface 1050 using the communication channel 1060. The display 1100 and speaker 1110 can be integrated with other components of the system 1000 into a single unit in an electronic device (such as, for example, a television). In various embodiments, the display interface 1070 includes a display driver, such as, for example, a timing controller (T Con) chip.

[0135] For example, if the RF portion of input 1130 is part of a separate set-top box, the display 1100 and speaker 1110 may alternatively be separate from one or more other components. In various embodiments where the display 1100 and speaker 1110 are external components, the output signal may be provided via a dedicated output connection (including, for example, an HDMI port, a USB port, or a COMP output).

[0136] The embodiments may be implemented by computer software implemented by the processor 1010 or by hardware, or by a combination of hardware and software. As a non-limiting example, the embodiments may be implemented by one or more integrated circuits. As a non-limiting example, the memory 1020 may be of any type suitable for the technical environment and may be implemented using any appropriate data storage technology, such as optical storage devices, magnetic storage devices, semiconductor-based storage devices, fixed memory, and removable memory. As a non-limiting example, the processor 1010 may be of any type suitable for the technical environment and may include one or more of a microprocessor, a general-purpose computer, a special-purpose computer, and a processor based on a multi-core architecture.

[0137] Various implementations involve decoding. "Decoding" as used in this application may encompass, for example, all or part of the processing performed on a received coded sequence to produce a final output suitable for display. In various embodiments, such processing includes one or more processes typically performed by a decoder, such as entropy decoding, inverse quantization, inverse transform, and differential decoding. In various embodiments, such processing also or alternatively includes processing performed by a decoder of the various implementations described in this application.

[0138] As another example, in one embodiment, "decoding" refers only to entropy decoding, in another embodiment, "decoding" refers only to differential decoding, and in another embodiment, "decoding" refers to a combination of entropy decoding and differential decoding. Whether the phrase "decoding process" is intended to refer specifically to a subset of operations or broadly to a more extensive decoding process will be clear based on the context of the particular description and is believed to be well understood by those skilled in the art.

[0139] Various implementations involve encoding. In a manner similar to the above discussion of "decoding", "encoding" as used in this application can encompass, for example, all or part of the processing performed on an input video sequence to produce an encoded bitstream. In various embodiments, such processing includes one or more processes typically performed by an encoder, such as partitioning, differential encoding, transforms, quantization, and entropy encoding. In various embodiments, such processing also or alternatively includes processing performed by an encoder of the various implementations described in this application.

[0140] As another example, in one embodiment, "encoding" refers only to entropy encoding, in another embodiment, "encoding" refers only to differential encoding, and in another embodiment, "encoding" refers to a combination of entropy encoding and differential encoding. Whether the phrase "encoding process" is intended to refer specifically to a subset of operations or broadly to a more extensive encoding process will be clear based on the context of the particular description and is believed to be well understood by those skilled in the art.

[0141] When the figures are presented as flow charts, it should be understood that they also provide block diagrams of corresponding devices. Similarly, when the figures are presented as block diagrams, it should be understood that they also provide flow charts of corresponding methods / processes.

[0142] The implementations and aspects described herein can be implemented in, for example, methods or processes, devices, software programs, data streams, or signals. Even if only discussed in the context of a single implementation (e.g., discussed only as a method), the implementation of the features discussed can also be implemented in other forms (e.g., devices or programs). The device can be implemented in, for example, appropriate hardware, software, and firmware. The method can be implemented in, for example, a processor, which generally refers to a processing device, including, for example, a computer, a microprocessor, an integrated circuit, or a programmable logic device. The processor also includes communication devices, such as computers, cellular phones, portable / personal digital assistants ("PDAs"), and other devices that facilitate information communication between end users.

[0143] References to "one embodiment" or "an embodiment" or "one implementation" or "an implementation" and other variations thereof mean that a particular feature, structure, characteristic, etc. described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "in one implementation" or "in an implementation" and any other variations appearing in various places throughout this document are not necessarily all referring to the same embodiment.

[0144] Additionally, this application may refer to "determining" various information. Determining information may include, for example, one or more of estimating information, calculating information, predicting information, or retrieving information from a memory.

[0145] Additionally, this application may refer to "accessing" various information. Accessing information may include, for example, receiving information, retrieving information (e.g., from a memory), storing information, moving information, copying information,

[0146] One or more of calculated information, determined information, predicted information, or estimated information.

[0147] Additionally, the present application may refer to "receiving" various information. As with "accessing," receiving is intended to be a broad term. Receiving information may include, for example, one or more of accessing information or retrieving information (e.g., from a memory). Furthermore, "receiving" typically involves, in one way or another, storing information, processing information, transmitting information, moving information, copying information, erasing information, calculating information, determining information, predicting information, or estimating information during an operation.

[0148] It is to be recognized that the use of " / ", "and / or", and "at least one of" below, for example, in the case of "A / B", "A and / or B", and "at least one of A and B", is intended to include selection of only the first listed option (A), or only the second listed option (B), or both options (A and B). As a further example, in the case of "A, B, and / or C" and "at least one of A, B, and C", such language is intended to include selection of only the first listed option (A), or only the second listed option (B), or only the third listed option (C), or only the first and second listed options (A and B), or only the first and third listed options (A and C), or only the second and third listed options (B and C), or all three options (A and B and C). As will be readily apparent to one of ordinary skill in this and related arts, the language may be expanded for many of the items listed.

[0149] It will be apparent to those skilled in the art that implementations may generate various signals formatted to carry information that may be stored or transmitted, for example. The information may include, for example, instructions for executing a method or data generated by one of the described embodiments. For example, a signal may be formatted to carry a bitstream of the described embodiments. Such a signal may be formatted, for example, as an electromagnetic wave (e.g., using a radio frequency portion of a spectrum) or as a baseband signal. Formatting may include, for example, encoding a data stream and modulating a carrier with the encoded data stream. The information carried by the signal may be, for example, analog or digital information. As is known, the signal may be transmitted over a variety of different wired or wireless links. The signal may be stored on a processor readable medium.

Claims

1. A method for encoding a picture, include: determining one or more history-based motion vector predictor candidates for the current block using motion information of a block preceding the current block of the picture, wherein the one or more history-based motion vector predictor candidates are maintained in a table according to a first-in, first-out rule; determining one or more average motion vector predictor candidates for the current block by averaging a pair of motion vector predictor candidates in a list of motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of at least one or more blocks spatially and temporally surrounding the current block; obtaining a maximum list size of the list of motion vector predictor candidates, wherein an ordering between history-based motion vector predictor candidates and average motion vector predictor candidates in the list of motion vector predictor candidates depends on the maximum list size of the list of motion vector predictor candidates; and In response to the maximum list size being greater than or equal to a predefined value, all average motion vector predictor candidates are inserted before all history-based motion vector predictor candidates in the list of motion vector predictor candidates.

2. The method according to claim 1, in, If any free position remains in the list after inserting the average motion vector predictor candidate, the history-based motion vector predictor candidate is inserted into the list of motion vector predictor candidates.

3. The method according to claim 1, in, The average motion vector predictor candidate is only inserted into the list if at least two free positions are available in the list of motion vector predictor candidates.

4. The method according to claim 1, in, For a maximum list size that is smaller than a predefined value, the average motion vector predictor candidate is inserted after the history based motion vector predictor candidate in the list of motion vector predictor candidates.

5. The method according to claim 1, in, The maximum list size is encoded as a slice or picture header parameter.

6. An apparatus for encoding a picture, comprising one or more processors, in, The one or more processors are configured to: determining one or more history-based motion vector predictor candidates for the current block using motion information of a block preceding the current block of the picture, wherein the one or more history-based motion vector predictor candidates are maintained in a table according to a first-in, first-out rule; determining one or more average motion vector predictor candidates for the current block by averaging a pair of motion vector predictor candidates in a list of motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of at least one or more blocks spatially and temporally surrounding the current block; obtaining a maximum list size of the list of motion vector predictor candidates, wherein an ordering between history-based motion vector predictor candidates and average motion vector predictor candidates in the list of motion vector predictor candidates depends on the maximum list size of the list of motion vector predictor candidates; and In response to the maximum list size being greater than or equal to a predefined value, all average motion vector predictor candidates are inserted before all history-based motion vector predictor candidates in the list of motion vector predictor candidates.

7. The device according to claim 6, in, The average motion vector predictor candidate is only inserted into the list if at least two free positions are available in the list of motion vector predictor candidates.

8. The device according to claim 6, in, For a maximum list size that is smaller than a predefined value, the average motion vector predictor candidate is inserted after the history based motion vector predictor candidate in the list of motion vector predictor candidates.

9. The device according to claim 8, in, The maximum list size is encoded as a slice or picture header parameter.

10. The device according to claim 8, in, If at least two free positions remain in the list of motion vector predictor candidates after inserting the average motion vector predictor candidate, the history based motion vector predictor candidate is inserted into the list.

11. A method for decoding a picture, include: determining one or more history-based motion vector predictor candidates for the current block using motion information of a block preceding the current block of the picture, wherein the one or more history-based motion vector predictor candidates are maintained in a table according to a first-in, first-out rule; determining one or more average motion vector predictor candidates for the current block by averaging a pair of motion vector predictor candidates in a list of motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of at least one or more blocks spatially and temporally surrounding the current block; obtaining a maximum list size of the list of motion vector predictor candidates, wherein an ordering between history-based motion vector predictor candidates and average motion vector predictor candidates in the list of motion vector predictor candidates depends on the maximum list size of the list of motion vector predictor candidates; and In response to the maximum list size being greater than or equal to a predefined value, all average motion vector predictor candidates are inserted before all history-based motion vector predictor candidates in the list of motion vector predictor candidates.

12. The method according to claim 11, in, The average motion vector predictor candidate is only inserted into the list if at least two free positions are available in the list of motion vector predictor candidates.

13. The method according to claim 11, in, For a maximum list size that is smaller than a predefined value, the average motion vector predictor candidate is inserted after the history based motion vector predictor candidate in the list of motion vector predictor candidates.

14. The method according to claim 11, in, The maximum list size is encoded as a slice or picture header parameter.

15. An apparatus for decoding a picture, comprising one or more processors, in, The one or more processors are configured to: determining one or more history-based motion vector predictor candidates for the current block using motion information of a block preceding the current block of the picture, wherein the one or more history-based motion vector predictor candidates are maintained in a table according to a first-in, first-out rule; determining one or more average motion vector predictor candidates for the current block by averaging a pair of motion vector predictor candidates in a list of motion vector predictor candidates, wherein the motion vector predictor candidates in the list are formed using motion information of at least one or more blocks spatially and temporally surrounding the current block; obtaining a maximum list size of the list of motion vector predictor candidates, wherein an ordering between history-based motion vector predictor candidates and average motion vector predictor candidates in the list of motion vector predictor candidates depends on the maximum list size of the list of motion vector predictor candidates; and In response to the maximum list size being greater than or equal to a predefined value, all average motion vector predictor candidates are inserted before all history-based motion vector predictor candidates in the list of motion vector predictor candidates.

16. The device according to claim 15, in, For a maximum list size that is smaller than a predefined value, the average motion vector predictor candidate is inserted after the history based motion vector predictor candidate in the list of motion vector predictor candidates.

17. The device according to claim 15, in, The maximum list size is encoded as a slice or picture header parameter.

18. The device according to claim 15, in, If at least two free positions remain in the list of motion vector predictor candidates after inserting the average motion vector predictor candidate, the history based motion vector predictor candidate is inserted into the list.