Motion Vector Prediction in Video Coding and Decoding

By adopting a spatiotemporal motion vector prediction method in video encoding and decoding, and combining multiple spatial and temporal motion vectors, the problem of poor motion vector prediction efficiency and complexity in the existing technology is solved, and more efficient video compression and decoding are achieved. .

CN112753222BActive Publication Date: 2024-09-06INTERDIGITAL VC HOLDINGS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980061798.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-03-01
Filing Date
2019-09-20
Publication Date
2024-09-06
Estimated Expiration
2039-09-20

AI Technical Summary

Technical Problem

When existing video coding technology uses intra-frame or inter-frame prediction, it is difficult to achieve an optimal balance between motion vector prediction efficiency and complexity, resulting in insufficient compression efficiency and decoding complexity.

Method used

By using spatiotemporal motion vector-based prediction methods in video encoders and decoders, combining multiple spatial and temporal motion vectors reduces the number of candidate locations and improves the accuracy and efficiency of motion vector prediction, including during encoding and decoding. Construction and sorting strategy of STMVP merge candidate list.

Benefits of technology

The compression efficiency of video encoding and decoding is improved, the complexity is reduced, and the average bit rate is reduced by about 0.1%, while maintaining efficient decoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112753222B_ABST
    Figure CN112753222B_ABST
Patent Text Reader

Abstract

Typically, encoding or decoding an image portion may involve determining a spatiotemporal motion vector prediction (STMVP) candidate for a merged mode of operation based on spatial motion vector candidates and temporal motion vector candidates taken from spatial positions surrounding a current coding unit (CU), wherein at least one embodiment includes determining the STMVP candidate based on consideration of up to two spatial positions and based on an average of at least two of the spatial and temporal motion vector candidates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to video encoding and decoding. Background Art

[0002] In order to achieve high compression efficiency, image and video coding schemes such as those defined by the HEVC (High Efficiency Video Coding) standard typically employ prediction and transform coding to exploit spatial and temporal redundancy in video content. Typically, intra-frame or inter-frame prediction is used to exploit intra-frame or inter-frame correlations, and then the difference between the original block and the predicted block (usually expressed as a prediction error or prediction residual) is transformed, quantized, and entropy decoded. In order to reconstruct the video, the compressed data is decoded by inverse processes corresponding to the prediction, transform, quantization, and entropy decoding. Recent additions to video compression technology include various versions of reference software and / or documents of the Joint Exploration Model (JEM) developed by the Joint Video Exploration Team (JVET). The purpose of efforts such as JEM is to further improve existing standards such as HEVC. Summary of the invention

[0003] According to another general aspect of at least one embodiment, a method for encoding video data is presented, which includes obtaining a first spatiotemporal motion vector prediction candidate based on at least two motion vectors available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block, and a temporal motion vector co-located with a third spatial position associated with the current block, and based on a combination of the at least two available motion vectors, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; modifying a first value based on the obtained first spatiotemporal motion vector prediction candidate; modifying a first value based on the first value and a position in an ordered set representing non-subblock spatiotemporal motion vector prediction candidates; has a relationship with a second value of, and based on at least two motion vectors available among the third or fourth spatial motion vector or the temporal motion vector, obtain a second spatiotemporal motion vector prediction candidate, wherein the third and fourth spatial motion vectors are associated with fifth and sixth spatial positions different from the first and second spatial positions, and wherein the fifth spatial position is adjacent to the left side of the current block and the sixth spatial position is adjacent to the top of the current block; include at least one of the first and second spatiotemporal motion vector prediction candidates in the ordered set of non-sub-block spatiotemporal motion vector prediction candidates; and encode the video data based on the at least one of the first and second spatiotemporal motion vector prediction candidates to generate encoded video data.

[0004] According to another general aspect of at least one embodiment, an apparatus for encoding video data is presented, comprising at least one or more processors, wherein the one or more processors are configured to: obtain a first spatiotemporal motion vector prediction candidate based on at least two motion vectors available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block, and a temporal motion vector co-located with a third spatial position associated with the current block, and based on a combination of the at least two available motion vectors, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; modify a first value based on the obtained first spatiotemporal motion vector prediction candidate; modify a first value based on the first value and a temporal motion vector co-located with a third spatial position associated with the current block ... The invention relates to a method for encoding video data according to the present invention, wherein the first and second spatial motion vectors are associated with a fifth and a sixth spatial position different from the first and second spatial positions, and wherein the fifth spatial position is adjacent to the left side of the current block and the sixth spatial position is adjacent to the top of the current block; at least one of the first and second spatial motion vector prediction candidates is included in the ordered set of non-sub-block spatial motion vector prediction candidates; and the video data is encoded based on the at least one of the first and second spatial motion vector prediction candidates to generate encoded video data.

[0005] According to another general aspect of at least one embodiment, an apparatus for decoding video data is presented, comprising one or more processors, wherein the one or more processors are configured to: obtain a first spatiotemporal motion vector prediction candidate based on at least two motion vectors available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block, and a temporal motion vector co-located with a third spatial position associated with the current block, and based on a combination of the at least two available motion vectors, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; modify a first value based on the obtained first spatiotemporal motion vector prediction candidate; modify a first value based on the first value and a temporal motion vector prediction candidate representing a non-subblock spatiotemporal motion vector prediction ... The method comprises the steps of: determining a first spatial motion vector prediction candidate and a second spatial motion vector prediction candidate, wherein the first spatial motion vector is associated with a fifth spatial position and a sixth spatial position that are different from the first and second spatial positions, and wherein the fifth spatial position is adjacent to the left side of the current block and the sixth spatial position is adjacent to the top of the current block; including at least one of the first and second spatial motion vector prediction candidates in the ordered set of non-sub-block spatial motion vector prediction candidates; and decoding the video data based on the at least one of the first and second spatial motion vector prediction candidates to generate decoded video data.

[0006] According to another general aspect of at least one embodiment, a method for decoding video data is presented, which includes obtaining a first spatiotemporal motion vector prediction candidate based on a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block, and at least two available motion vectors among a temporal motion vector co-located with a third spatial position associated with the current block, and based on a combination of the at least two available motion vectors, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; modifying a first value based on the obtained first spatiotemporal motion vector prediction candidate; modifying a first value based on the first value and a position in an ordered set representing non-subblock spatiotemporal motion vector prediction candidates; has a relationship with a second value of, and based on at least two motion vectors available among the third or fourth spatial motion vector or the temporal motion vector, obtain a second spatiotemporal motion vector prediction candidate, wherein the third and fourth spatial motion vectors are associated with fifth and sixth spatial positions different from the first and second spatial positions, and wherein the fifth spatial position is adjacent to the left side of the current block and the sixth spatial position is adjacent to the top of the current block; include at least one of the first and second spatiotemporal motion vector prediction candidates in the ordered set of non-sub-block spatiotemporal motion vector prediction candidates; and decode the video data based on the at least one of the first and second spatiotemporal motion vector prediction candidates to generate decoded video data.

[0007]

[0013] In general, another aspect relates to a bitstream formatted to include encoded video data, where the encoded video data is encoded by at least one of the methods described herein.

[0008] One or more embodiments of the present invention further provide a computer-readable storage medium on which instructions for encoding or decoding video data according to the method or apparatus described herein are stored. This embodiment further provides a computer-readable storage medium on which a bitstream generated according to the method or apparatus described herein is stored. This embodiment further provides a method and apparatus for sending or receiving a bitstream generated according to the method or apparatus described herein.

[0009] A simplified overview of the subject matter is given above in order to provide a basic understanding of some aspects of the subject matter embodiments. This overview is not an exhaustive review of the subject matter. It is not intended to identify the key / important elements of the various embodiments or to describe the scope of the subject matter. Its sole purpose is to present some concepts of the subject matter in a simplified form as a preface to a more detailed description presented later. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The present disclosure may be better understood by considering the following detailed description in conjunction with the accompanying drawings, in which:

[0011] Figure 1 A block diagram depicting an example of an embodiment of a video encoder is provided;

[0012] Figure 2 A block diagram depicting an example of an embodiment of a video decoder is provided;

[0013] Figure 3 Aspects of the present disclosure relating to coding tree units (CTUs) are shown;

[0014] Figure 4 Aspects of the present disclosure relating to CTUs and coding units (CUs) are shown;

[0015] Figure 5 A flow chart illustrating signaling of inter-frame prediction information is provided;

[0016] Figure 6 A block diagram is provided showing the locations of spatial and temporal motion vector predictors used in merge mode;

[0017] Figure 7 A flow chart illustrating creation of a list of merged motion vector predictor candidates is provided;

[0018] Figure 8 Another flow chart illustrating creation of a list of merge motion vector predictor candidates is provided;

[0019] Fig. 9 The recursive derivation of spatio-temporal motion vector predictor (STMVP) merge candidates is shown;

[0020] Fig.10 shows the spatial positions considered for determining non-subblock STMVP merge candidates;

[0021] Fig.11 A flowchart illustrating an overall method for determining non-subblock STMVP merge candidates is provided;

[0022] Fig.12 An example of an embodiment that considers spatial locations for determining non-sub-block STMVP merge candidates is shown;

[0023] Fig.13 A method for temporal motion vector predictor candidate derivation is shown;

[0024] Fig.14 An example of an embodiment providing a temporal motion vector predictor for determining a non-subblock STMVP merge candidate is shown;

[0025] Fig.15 A flow chart illustrating an embodiment of a non-sub-block STMVP for determining a merge mode is provided;

[0026] Fig.16An example is shown regarding determining an STMVP for inclusion in a merged list;

[0027] Fig.17 An example of an embodiment for providing alternative merge candidates is shown;

[0028] Fig.18 A flow chart illustrating an example of an embodiment for providing non-sub-block STMVP merge candidates is provided;

[0029] Fig.19 A flowchart illustrating a method of constructing an AMVP candidate list is provided;

[0030] Fig. 20 A flowchart illustrating an example of an embodiment of a method of determining an AMVP candidate list is provided;

[0031] Fig.21 Block diagrams illustrating examples of embodiments of apparatuses according to various aspects described herein are provided;

[0032] Fig. 22 Another example of an embodiment is shown;

[0033] Fig.23 Another example of an embodiment is shown; and

[0034] Fig.24 Another example of an embodiment is shown.

[0035] 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 all drawings, the same reference numerals represent the same or similar features. DETAILED DESCRIPTION

[0036] In general, at least one embodiment is directed to a method for determining a spatiotemporal motion vector (MV) predictor for a motion vector of a block, wherein a reduced number of spatiotemporal candidate positions are considered to construct the spatiotemporal MV predictor for the current block. As explained below, various modifications and embodiments are contemplated that may provide improvements to video coding systems, including but not limited to one or both of increased compression or coding efficiency and reduced complexity.

[0037] Now turning to the attached figure, Figure 1 An example of a video encoder 100 is shown, such as a HEVC encoder. HEVC is a compression standard developed by the Joint Collaborative Team on Video Coding (JCT-VC) (see, e.g., "ITU-T H.265 ITU Telecommunication Standards Section (10 / 2014), Series H: Audiovisual and Multimedia Systems, Infrastructure for Audiovisual Services - Coding of Video in Motion, High Efficiency Video Coding, Recommendation ITU-T H.265"). Figure 1It is also possible to describe encoders in which improvements are made to the HEVC standard or encoders that employ techniques similar to HEVC, such as encoders based on or improved upon the JEM (Joint Exploration Model) under development by JVET.

[0038] In this application, the terms "reconstruction" and "decoding" can be used interchangeably, the terms "pixel" and "sample" can be used interchangeably, and the terms "picture" and "frame" can be used interchangeably. Usually, but not necessarily, the term "reconstruction" is used on the encoder side, while "decoding" is used on the decoder side.

[0039] The HEVC specification distinguishes between "blocks" and "units", where a "block" addresses a specific area in the 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 associated with the block (e.g., motion vectors).

[0040] For encoding, the picture is partitioned into coding tree blocks (CTBs) of a configurable square size, and a continuous set of coding tree blocks is grouped into slices. A coding tree unit (CTU) contains CTBs for coded color components. CTB is the root of the quadtree partitioned into coding blocks (CBs), and the coding blocks can be partitioned into one or more prediction blocks (PBs) and form the root of the quadtree partitioned into transform blocks (TBs). Corresponding to the coding blocks, prediction blocks, and transform blocks, the coding unit (CU) includes a tree structure set of prediction units (PUs) and transform units (TUs), the PU includes prediction information for all color components, and the TU includes a residual coding syntax structure for each color component. The size of the CB, PB, and TB of the luminance component are applied to the corresponding CU, PU, ​​and TU. In the present application, the term "block" may be used to represent any one of CTU, CU, PU, ​​TU, CB, PB, and TB. In addition, "block" may also be used to refer to macroblocks and partitions as specified in H.264 / AVC or other video coding standards, and more generally refers to data arrays of various sizes.

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

[0042] The prediction residual is then transformed (125) and quantized (130). The quantized transform coefficients as well as the motion vectors and other syntax elements are entropy coded (145) to output a bitstream. The encoder can also skip the transform and apply quantization directly to the untransformed residual signal on a 4×4TU basis. The encoder can also bypass the transform and quantization, i.e., directly encode the residual without applying the transform or quantization process. In direct PCM decoding, no prediction is applied and the coding unit samples are encoded directly into the bitstream.

[0043] 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 image, for example, to perform deblocking / SAO (sample adaptive offset) filtering to reduce coding artifacts. The filtered image is stored in a reference picture buffer (180).

[0044] Figure 2 1 shows a block diagram of an example of a video decoder 200, such as a HEVC decoder. In the example decoder 200, a signal or bitstream is decoded by decoder elements as described below. The video decoder 200 generally performs the same operations as described above. Figure 1 The encoding pass described in is reciprocal to the decoding pass, which performs video decoding as part of encoding the video data. Figure 2 Decoders in which improvements are made to the HEVC standard or decoders that employ techniques similar to HEVC may also be described, such as decoders based on or improved upon JEM.

[0045] Specifically, the input to the decoder includes a video signal or bitstream, which can be generated by a processor such as Figure 1 The video encoder 100 of the video encoder generates. The signal or bitstream is first entropy decoded (230) to obtain transform coefficients, motion vectors and other encoding information. The transform coefficients are dequantized (240) and inverse transformed (250) to decode the prediction residual. The decoded prediction residual is combined with the prediction block (255) to reconstruct the image block. The prediction block can be obtained (270) based on intra-frame prediction (260) or motion compensated prediction (i.e., inter-frame prediction) (275). Advanced motion vector prediction (AMVP) and merge mode techniques can be used to derive motion vectors for motion compensation, which can use interpolation filters to calculate interpolated values ​​of sub-integer samples of reference blocks. An in-loop filter (265) is applied to the reconstructed image. The filtered image is stored in a reference picture buffer (280).

[0046] In the HEVC video compression standard, motion compensated temporal prediction is used to exploit the redundancy that exists between consecutive pictures of a video. To this end, a motion vector is associated with each prediction unit (PU). Each coding tree unit (CTU) is represented by a coding tree (CT) in the compressed domain. This is a quadtree partitioning of the CTU, where each leaf is called a coding unit (CU), such as Figure 3 as shown in .

[0047] Each CU is then given some intra-frame or inter-frame prediction parameters (prediction information). To this end, it is spatially split into one or more prediction units (PUs), each of which is assigned some prediction information. Figure 4 As shown, intra or inter coding modes are allocated at the CU level, which shows an example of dividing a coding tree unit into a coding unit, a prediction unit, and a transform unit.

[0048] Specifically, one motion vector is assigned to each PU in HEVC. This motion vector is used for motion compensated temporal prediction of the considered PU. Therefore, in HEVC, the motion model of the linked prediction block and its reference blocks involves translation.

[0049] There are two modes used in HEVC to encode motion data. They are called AMVP (Adaptive Motion Vector Prediction) and Merge. AMVP involves signaling the reference picture used to predict the current PU, the motion vector predictor index (taken from the list of two predictors), and the motion vector difference. In general, at least one embodiment described herein involves Merge mode.

[0050] The merge mode consists of signaling and decoding the index of some motion data collected in a list of motion data predictors. The list consists of five candidates and is constructed in the same way on the decoder and encoding side. Therefore, the merge mode aims to derive some motion information taken from the merge list. The merge list usually contains motion information associated with some spatial and temporal surrounding blocks that are available in their decoding state when the current PU is being processed.

[0051] In the Joint Exploration Model (JEM) developed by the JVET (Joint Video Exploration Team) group, there are some additional temporal prediction tools with associated parameters determined on the decoder side, including spatiotemporal motion vector prediction (STMVP). The basic principle of STMVP is to predict the motion field of the current PU based on 4×4 sub-blocks. This is done by recursive sub-block to sub-block motion vector derivation. For each sub-block, the predicted MV is the average of the motion vectors of the top, left and temporal neighboring blocks around each reference list.

[0052] One method includes a version of the STMVP tool that does not use the sub-blocks of the current block being processed. The process involves searching for some surrounding motion vectors at some given candidate spatial locations. The available spatial neighbors of the current block found and the temporal motion vector prediction value of the current PU are averaged to form the motion vector prediction value of the current CU. Up to four spatial locations are checked to find the two available spatial motion vector prediction values ​​required to be averaged. The advantage of this method is that the PU is not divided into sub-blocks. A single spatiotemporal motion vector prediction value is derived for the entire PU that provides decoding gain.

[0053] In general, at least one embodiment relates to spatiotemporal motion vector derivation to produce a candidate motion data candidate prediction value that will become part of the merge candidate list used in merge mode. A reduced number of spatial positions are considered in the construction of the STMVP merge candidate. As a result, fewer tests are used in the decoding process. In fact, for each spatial position accessed in the process, two tests are driven to check that some decoded PU information is available at the considered adjacent spatial position, and to check the coding mode (intra / inter) of the corresponding coding unit. Reduced complexity is obtained without any loss in compression efficiency.

[0054] In general, at least one embodiment may include determining or obtaining a merge candidate based on an average between at least two motion vectors taken from spatial locations around the current CU. Only two spatial locations are considered, and no temporal candidates are retrieved. Two contemplated candidates are taken at intermediate locations along the top and left edges of the current PU.

[0055] In general, at least one embodiment may include a merge candidate determined or obtained based on a combination, e.g., an average between two spatial candidate MVs located at the same position as described with respect to the previous embodiment, and a temporal candidate MV. . Compared to the previous embodiment, improved decoding efficiency (average bit rate reduction of about 0.1%) may be achieved.

[0056] In general, another embodiment relates to a way to retrieve a temporal candidate MV. According to one aspect, a temporal MV at a spatial position below and to the right of the current CU can be selected. Some variations are presented later. Such embodiments and / or variations can provide an improvement in the tradeoff between coding efficiency and decoder complexity.

[0057] Generally, at least one additional embodiment includes a strategy for deciding whether a proposed STMVP is applicable.

[0058] In general, at least one additional embodiment may provide an improved order for constructing a merge candidate list.

[0059] In general, at least one additional embodiment may provide for constructing spatio-temporal MV prediction values ​​to improve decoding efficiency.

[0060] In general, at least one additional embodiment provides for the use of the proposed STMVP motion vector predictor with respect to the AMVP inter-coding mode.

[0061] The merge mode in the HEVC standard involves deriving inter prediction information (hereinafter also referred to as motion information) for a given prediction unit from the selected motion information prediction value candidate. The motion information includes all inter prediction parameters of the PU, that is:

[0062] - One-way or two-way time prediction type

[0063] - The reference picture index within each reference picture list

[0064] - One or more motion vectors

[0065] The decoding and decoding of inter-frame prediction information in HEVC Figure 5 , which shows the signaling of inter prediction information. It can be seen that motion information coding / decoding according to merge mode occurs in two modes: 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. The merge index indicates which motion vector predictor in the list of merge motion information predictors is used to derive the motion information of the current PU. In the following, the list of motion information predictors is called merge list or merge candidate list. Furthermore, candidate motion information predictors are called merge candidates.

[0066] In HEVC, the merge candidate list is systematically composed of five merge candidates. The merge list is constructed as follows on both the encoder and decoder sides. Figure 6 As can be seen in , up to five spatial locations can be considered to retrieve some potential candidates. They are visited according to the following order:

[0067] 1-Left (Al)

[0068] 2-Up(Bl)

[0069] 3-Upper right (B0)

[0070] 4-Lower left (A0)

[0071] 5-Upper left (B2)

[0072] The symbols A0, Al, BO, Bl, and B2 represent Figure 6 The spatial position shown on the left is Figure 6 in Figure 6 The left side of shows the positions of the spatial and temporal motion vector prediction values ​​used in the merge mode with spatial merge candidates, and Figure 6The right side of shows the temporal merging candidates, and four spatial candidates that are different from each other are selected. Then, by considering the temporal motion information at position H, the temporal prediction value denoted as TMVP is selected, and then the "center" is the unavailable candidate at position H in the considered reference image. Then, the final pruning process is performed (see Figure 7 ) to ensure that the selected spatial and temporal candidate groups do not contain redundant candidates.

[0073] Next, in the case of B slices, if the merge list is incomplete, another type of candidate is pushed to the merge list: the so-called combined candidate. This may involve forming a candidate consisting of motion information associated with one reference picture list (L0) from one candidate already present in the list, where the motion is associated with another reference picture list (L1) from another candidate already present in the merge list. If the merge list is still incomplete (five elements), zero motion vectors are pushed to the back of the merge list until it is complete. The entire process of merge list construction in HEVC is described in Figure 8 Detailed description in the figure.

[0074] A first method of determining STMVP (Spatial Temporal Motion Vector Prediction) merge candidates used in a video codec may include the following method. Here, a block (usually a prediction unit or a coding unit) is divided into sub-blocks or sub-PUs, typically of size 4×4. This Fig. 9 As shown in , A, B, C, D are 4×4 sub-blocks contained in the current block (size is 8×8). Blocks a, b, c, d represent the adjacent 4×4 blocks of the current block. In the STMVP merge candidate construction of this method, the motion vector of each sub-block is recursively derived in raster scan order.

[0075] For each sub-block, retrieve its top and left neighboring motion vectors. Scale each so obtained motion vector from each reference picture list to the temporal position of the first reference picture in the reference picture list under consideration. Furthermore, obtain the temporal motion vector prediction value (TMVP) of the considered sub-block after HEVC’s temporal motion vector prediction. Fig. 9 In the case of block A, the described method involves retrieving the motion vector of the co-located block of block D, and involves scaling. As a result, the STMVP motion vector assigned to the current sub-block is calculated as the average of up to 3 retrieved neighboring spatial and temporal motion vectors.

[0076] The second method of generating STMVP merge candidates does not divide the PU into sub-blocks. The method involves retrieving the two top and left spatial neighboring motion vectors of the current PU, as well as the temporal motion vector prediction value of the current CU. The spatial neighbors are taken from Fig.10The spatial position shown is called Afar, which provides an example of a spatial position considered when determining a non-subblock STMVP merge candidate. The spatial position of Afar relative to the top left position of the current PU is given by the coordinates (nbPW*5 / 2, -1). Here nbPW is the width of the current block. If no motion vector is available at position Afar (not present or intra-frame decoding), the position Amid is considered to be the top neighboring motion vector of the current block.

[0077] The selection of the left neighboring block is similar. If available, the neighboring motion vector at the relative spatial position (-1, nbPH / 2) is selected, denoted as Lfar. nbPH is the height of the current block. If not available, the left neighboring motion vector at the position Lmid (-1, nbPH / 2) is selected, if it is available.

[0078] Fig.10 Variations of the spatial positions shown in can be used in one or more of the above methods. For example, the following can be used:

[0079] -Afar=(2*nbPW,-1)

[0080] -Amid=(nbPW-l,-1)

[0081] -Lfar=(-1,2*nbPH)

[0082] -Lmid=(-l,nbPH-l)

[0083] Next, the TMVP prediction value of the current block is derived, for example, as in the temporal motion vector prediction of HEVC. Finally, the STMVP merge candidate for the current block can be calculated as the average of up to three obtained spatial and temporal neighboring motion vectors. Therefore, in contrast to the sub-block-based approach in the first method described above, the STMVP candidate here consists of at most one motion vector per reference picture list.

[0084] Fig.11 A method for determining a non-subblock-based STMVP merge candidate is described, for example, the second method described above, the input of the process is the block (PU) currently being processed, its position and its size. The output of the process is a flag "available_stmvp", which is equal to "true" if the STMVP candidate has been determined by the method, otherwise the flag "available_stmvp" is equal to "false".

[0085] The first part of the method corresponds to the retrieval of spatial neighboring motion vectors. This is followed by the derivation of the temporal motion vector prediction value of the current block. Finally, the average of the retrieved motion vectors is calculated. Note that if no spatial or temporal neighboring MVs are retrieved, the output flag "available_stmvp" of the process is set to false. This means that the average is calculated between one and three motion vectors.

[0086] In general, various instances of the embodiments described below may include STMVP merge candidates that are determined without any partitioning of the current block into sub-blocks and are determined as a combination of the top, left, and temporal neighboring motion vectors of the current block, as described above. Additionally, in at least one embodiment, for example, the spatial positions contemplated when deriving the left spatial neighboring motion vector include only the mid-Amid and Lmid spatial positions around the current block. This is Fig.12 Shown in.

[0087] One result is that a reduced number of tests are required to derive these spatial MV predictions compared to a scenario involving tests of four spatial positions such as in the second approach described above. This case involves the largest number of operations and checks in the decoding process and can be considered a "worst case" scenario.

[0088] In at least one embodiment, for example, a variation of the foregoing embodiment may include Amid and Lmid corresponding to some other spatial positions. For example, they may correspond to the upper right (A1) and lower left (B1) positions around the current block, respectively.

[0089] In at least one other embodiment, for example, Fig.14 The temporal motion vector prediction value is modified and determined as shown. Fig.14 In , spatial position H is defined as the 4×4 sub-block position at the bottom right and bottom right corner of the current block. If spatial position H is outside the current row of CTU, the co-located block at position H is considered unavailable. In this case, for example, Fig.13 In the arrangement shown, a spatial position corresponding to the center of the current block is considered, and the co-located motion vector at this center position is retrieved. Here, it is proposed to define the spatial position H as the 4×4 sub-block position to the right of the lower right corner of the current CU. This position is contained in the current row of the CTU, as Fig.14As shown, therefore, in this case, the newly defined H position is considered valid, and the process checks whether some MV co-located with this position is available in the co-located slice of the current slice. If not, the center of the current block is used as the fallback spatial position for retrieving the co-located motion vector. The advantage of this feature is that if used in the construction of non-sub-block STMVP merge candidates, the overall decoding efficiency can be improved. In addition, in the worst case scenario, it does not introduce any complexity to the decoder in terms of the number of checksum operations.

[0090] In at least one other embodiment, Fig.14 The temporal motion vector prediction can be used not only for the construction of the STMVP merge candidate, but also for the derivation of the temporal motion vector prediction value marked as TMVP that is usually used in the merge mode. One aspect of this embodiment can be that only one temporal motion vector prediction value is derived in the entire merge mode. It is shared between the STMVP merge mode and the TMVP mode, and therefore can only be calculated once for two different merge modes. This maintains the maximum value of one temporal motion vector prediction value calculated for a given prediction unit. Therefore, the complexity of the decoding process regarding the maximum number of temporal candidates is not increased.

[0091] In at least one other embodiment, for example, the characteristics of the determination of the STMVP merge candidate relate to the conditions under which the STMVP merge candidate is determined to be available or unavailable. Here, if at least two motion vectors (spatial and / or temporal) are obtained, the STMVP merge candidate can be considered available. Therefore, for example, the number of motion vectors combined to calculate the average motion vector is included between two and three. The result can be an improvement in decoding efficiency.

[0092] Fig.15 An example of an embodiment of a method of providing a non-sub-block STMVP merge mode incorporating aspects of the previously described embodiments is shown.

[0093] In the first and second methods above, the merge candidate list is sorted as follows:

[0094] 6-Left (Al)

[0095] 7-Up(Bl)

[0096] 8-Upper right (B0)

[0097] 9-Lower left (A0)

[0098] 10-Upper left (B2)

[0099] 11-TMVP

[0100] 12-Combined predicted value

[0101] 13 - Zero Motion Vector

[0102] In the third method including Alternative Temporal Motion Vector Prediction (ATMVP), merge mode is employed. Basically, it involves retrieving motion information from a reference picture and pointed to by a motion vector. The motion vector and reference picture index used are those derived from the first merge candidate in the classic merge list above. Thus, the ordered list of merge candidates is the following list.

[0103] 1-Left (Al)

[0104] 2-Up(Bl)

[0105] 3-Upper right (B0)

[0106] 4-Lower left (A0)

[0107] 5-ATMVP

[0108] 6-Upper left (B2)

[0109] 7-TMVP

[0110] 8-Combined predicted value

[0111] 9 - Zero Motion Vector

[0112] In the second method described above, the STMVP merge candidate can be inserted into the merge list after the ATMVP candidate. This results in the following sequential list:

[0113] 10-Left (Al)

[0114] 11-on(Bl)

[0115] 12-Upper right (B0)

[0116] 13-Lower left (A0)

[0117] 14-ATMVP

[0118] 15-STMVP

[0119] 16-Upper left (B2)

[0120] 17-TMVP

[0121] 18-Combined predicted value

[0122] 19 - Zero Motion Vector

[0123] In at least one embodiment described herein, the merge list order may be modified as follows:

[0124] 1-Left (Al)

[0125] 2-Up(Bl)

[0126] 3-ATMVP

[0127] 4-STMVP

[0128] 5-Upper right (B0)

[0129] 6-Lower left (A0)

[0130] 7-Upper left (B2)

[0131] 8-TMVP

[0132] 9-Combined predicted value

[0133] 10 - Zero motion vector

[0134] This order can be selected based on such observation that the ATMVP and STMVP candidates provide significant decoding efficiency improvements compared to the deactivated ATMVP and STMVP. In addition, one aspect relates to giving them higher priority in the list. Then, they are considered earlier in the merge list construction process, and are more likely to be considered before the maximum number of merge candidates is reached.

[0135] In at least one other embodiment, a condition may be set on the relevance to obtain a combination of some of the derived spatial and temporal neighboring motion vectors of the current CU, such as calculating their average. In general, it is understood that if the average of two or three retrieved MVs is equal to or close to the zero motion vector, while the derived motion vector is far from the zero MV, then including the STMVP candidate in the merge list may be irrelevant. This is in Fig.16 Thus, an aspect of at least one embodiment may include considering STMVP candidates as potentially relevant based on the average MV. For example, this may take the following form. ∞ norm and L of each retrieved motion vector ∞ If the norm is negligible, the mean motion vector is considered unusable in the STMVP merge candidate. Therefore, the criterion involves evaluating the following tests:

[0136]

[0137] Where ∈ is a threshold. If the above test is true, the STMVP merge candidate may not be included in the merge candidate list.

[0138] In another embodiment, STMVP merge candidates may be determined based on various methods to merge the retrieved spatial and temporal motion vectors. For example, one embodiment may include obtaining a combination of motion vectors based on an alternative scheme of calculating or obtaining an average between three motion vectors. For example, a combination of motion vectors may be obtained based on a weighted average between motion vectors. This may provide some MV prediction value candidates that are not redundant with the classic candidates used in the usual merge mode. Fig.17 An example of an embodiment is shown in FIG, which shows the classical merge candidates in a common 2D plan in the form of marked ellipses (the x-axis and y-axis correspond to the x and y coordinates of the motion vector, respectively). In addition, the vector and The grid area corresponds to a 2D area that can be covered by obtaining one or more combinations of the following three vectors using various weighted averages of the three vectors, and the weighted average has a positive weight. The current embodiment may include considering the motion vectors obtained by such gridding of the 2D area to generate some higher-level STMVP merge candidates. For example, one or more combinations of motion vectors can be obtained by passing through the grid in an orderly manner and selecting a first candidate that is not redundant with the usual candidate and meets the above-mentioned average criteria.

[0139] In general, at least one additional embodiment may include introducing several STMVP merge candidates into the merge list. Such multiple candidates may be obtained by considering various spatial positions around the current block to retrieve some spatially neighboring motion vectors. To this end, Fig.18 The STMVP merge candidate construction process described in FIG. This figure describes the modified STMVP according to this embodiment. Fig.15 Embodiment. It can be seen that, for example, the value of the input index "target_index" is taken as input to the modified process. On the one hand, it involves searching for an STMVP merge candidate at a position "target index" that will appear in an expected ordered set of multiple non-sub-block STMVP merge candidates. A loop at multiple spatial positions around the current block can be called according to a predefined order. Each time at least two adjacent (spatial + temporal) candidates are found, their average value can be considered a valid STMVP merge candidate. Whenever a valid STMVP merge candidate is identified, another value can be modified, such as incremented. For example, a value such as valid_cand_index can represent the index of the current valid STMVP candidate in the expected set of STMVP candidates. When valid_cand_index is equal to target_idx, the process ends. Otherwise, the process further iterates at the next spatial position to consider searching for the next STMVP candidate to provide to the overall merge candidate list.

[0140] In another example of an embodiment, spatiotemporal motion vector prediction candidates may be used in AMVP inter prediction mode. This means that the construction of the list of AMVP motion vector prediction values ​​may integrate additional candidates as spatiotemporal candidates. Fig. 20 , which shows the modified Fig.19 In fact, the process of building STMVP is being called ( Fig.15 process), and if the resulting STMVP prediction value is available, it can be used as an additional input to the replicated MV removal step. In this way, if an incomplete set of AMVP candidates is obtained from spatial and temporal candidate retrieval, STMVP can be considered in the two final AMVP candidates.

[0141] In another variation of the previous embodiment, based on Fig.15 Some additional merge candidates are calculated based on the spatial and / or temporal neighboring motion vector prediction values ​​collected in the first stage and inserted into the merge candidate list.

[0142] After these spatial-temporal candidates have been obtained, Fig.15 In an embodiment, the spatial-temporal merging candidate is calculated as the average of 2 or 3 motion vectors.

[0143] This variant includes Fig.15 When three motion vectors are obtained in the first stage, one or more additional merge candidates are generated.

[0144] According to a first sub-variant, an additional merge candidate is calculated as the average of two spatially neighboring motion vectors already retrieved. Once the average is calculated, it can be checked that it is different from every merge candidate already collected in the merge candidate list. After this (optional) unity check, the calculated average between two spatially neighboring motion vectors is added to the merge candidate list. If the above optional check is performed, the average motion vector is added to the list only if it is different from every candidate already contained in the merge list.

[0145] A second sub-variant may be performed in addition to or as an alternative to the first sub-variant described above. This second sub-variant consists in calculating the average motion vector between the retrieved temporal motion vector prediction value and one of the two retrieved spatial motion vector prediction values ​​(e.g. the left one). Once the average is calculated, it can be checked whether it is different from each merge candidate already collected in the merge candidate list. After this (optional) unity check, the calculated average between the two temporally and spatially neighboring motion vectors is added to the merge candidate list. If the above optional check is performed, the average motion vector is added to the list only if it is different from each MV already contained in the merge candidate list.

[0146] • According to a third sub-variant, performed in addition to or instead of the second sub-variant described above, the same process in the second sub-variant is performed, but with a temporal motion vector predictor and another spatial motion vector predictor (eg, above).

[0147] Fig. 22 The process of this variation is shown.

[0148] Finally, this variation occurs in the same way both on the encoder side and on the decoder side.In addition, for other merge candidates, according to the merge index value of the merged CU decoded from the bitstream, the decoder is able to detect the use of the newly added merge candidates and derive them as described above.

[0149] and Fig.15 Compared to the embodiments of the present invention, at least one advantage of the present variation may be further increased compression efficiency.

[0150] In further variations of the previous embodiment and further variations of the previous variations, the Fig.15 Some additional merge candidates are calculated based on the spatially neighboring motion vector prediction values ​​collected in the first stage and inserted into the merge candidate list.

[0151] After obtaining these spatial-temporal candidates, in the first embodiment of this document, the spatial-temporal merging candidate is calculated as the average of 2 or 3 motion vectors.

[0152] This variant includes Fig.15 1 or 2 additional merge candidates are generated if at least one spatial neighboring motion vector has been retrieved during the first stage.

[0153] • According to a first sub-variant, the first found spatial neighboring motion vector (eg the left spatial neighboring motion vector) is added to the merge candidate list as an additional merge candidate. An optional unity check step verifies that the motion vector predictor is different from every merge candidate already present in the merge list.

[0154] • According to a second sub-variant, the second found spatial neighboring motion vector (eg the above motion vector) is added to the merge candidate list as an additional merge candidate. An optional unity check step verifies that the motion vector predictor is different from every merge candidate already present in the merge list.

[0155] Thus, in this second variation, up to two additional merge candidates may be pushed to the merge candidate list.

[0156] Note that this variant is only available in Fig.15This is relevant in cases where the spatial positions of the spatial candidates collected during the first stage of are different from those already present in the merge candidates used in the considered video codec. In fact, if the spatial candidates used to compute the STMVP candidate are Fig.12 This variation may occur if the Amid and Lmid candidates are .

[0157] Furthermore, this variation occurs in the same manner both at the encoder side and at the decoder side.In addition, for other merge candidates, according to the merge index value of the merged CU decoded from the bitstream, the decoder is able to detect the use of the newly added merge candidates and derive them as described above.

[0158] An advantage of this variant may be that the compression efficiency is further improved.

[0159] This variation of the invention can be used in combination with the previous variation.

[0160] According to a variation of any of the embodiments described herein, the scaling step applied to the spatially neighboring motion vector prediction values ​​for generating the spatiotemporal merging candidates may not be applied. Thus, this motion vector scaling step may be performed from Fig.15 or Fig.18 This enables reducing the complexity of the processing for calculating the spatial-temporal motion vector prediction value (one or more).

[0161] According to another variant, when no scaling of the spatial MV prediction values ​​is applied, the following process may be applied to optimize the overall coding efficiency of the considered video codec.

[0162] The basic principle of this variant is to select a pair of spatial MV prediction values ​​according to their corresponding reference picture indices. The method includes at least two features. First, the top and left neighboring motion vectors of the current CU are searched among multiple spatial positions. Fig.24 The spatial positions considered for the top and left neighboring motion vector predictors are shown, respectively.Secondly, the first pair of motion vector predictors found that satisfy the constraint or condition on the reference picture index is selected and used to calculate the STMVP motion vector predictor without any spatial MV predictor scaling.

[0163] Examples of constraints or conditions placed on reference picture indications for spatial MV predictor candidates may include one of the following exemplary constraints.

[0164] A pair of spatial MV candidates may be selected if the reference picture index is equal to 0 in each of its reference picture lists (list L0, L1, or both) used by the spatial MV candidate under consideration.

[0165] According to another typical constraint on reference picture indices, a pair of spatial MV candidates can be selected if the reference picture indices of the two considered spatial MV candidates (lists L0, L1 or both) are equal in each of their reference picture lists used in common. In addition, in this last variant, if the reference picture indices of the two spatial candidates are equal to each other and equal to zero, the temporal MV predictor is used to generate the final spatial-temporal MV predictor. If they are equal to each other but not equal to zero, the temporal MV predictor can be used to generate the averaged spatial-temporal MV predictor.

[0166] According to another embodiment, Fig.24 The variant can be Fig. 22 This means that after selecting a pair of spatial MV prediction value candidates according to their reference picture index, if the STMVP merge candidate is calculated using three motion vectors, then Fig. 22 During the process, some additional STMVP candidates may be calculated and added to the merge candidate list.

[0167] According to another embodiment, when searching for Fig.24 When a pair of spatial MV candidates is shown, some spatial candidates that are different from the spatially neighboring MVs of the current block can be considered. For example, some vectors stored in a so-called history-based motion vector predictor (e.g., HMVP, known in the art) buffer can be considered as candidate motion vector predictors. Then, constraints on their reference picture indices can be used to select MV predictors for calculating the spatio-temporal motion vector predictor.

[0168] HMVP basically involves storing motion vectors used to code / decode consecutive blocks in a given picture, slice, tile, or tile group in a FIFO (first-in-first-out) buffer, and later using the motion vectors to predict the motion vector(s) used to code subsequent blocks in the considered picture / slice / tile / tile group.

[0169] According to another embodiment, multiple spatiotemporal motion vector candidates may be searched, and two spatial motion vector prediction values ​​and one temporal motion vector prediction value may be calculated. To this end, several different pairs of spatial motion vector prediction values ​​may be found around the current block or in the HMVP buffer. In addition, several different pairs of spatial motion vector candidates may be selected using the above-mentioned constraints on the reference picture index of the candidate motion vector.

[0170] According to another embodiment, the inclusion of the spatial-temporal motion vector predictor into the merge candidate list may be determined based on the merge list size relative to the maximum allowed merge list size when considering STMVP candidates. As an example, if at least two free positions are remaining in the merge list being constructed, then the inclusion of the spatial-temporal motion vector candidate may be allowed or enabled, otherwise not allowed.

[0171] According to another embodiment, the merge candidate list may be sorted such that the spatio-temporal motion vector predictor value(s) are inserted before the HMVP candidate in the merge candidate list.

[0172] According to another approach, the spatiotemporal motion vector candidate(s) may be placed after the HMVP candidate in the merge candidate list.

[0173] According to another embodiment, the spatiotemporal MV prediction value (one or more) can be interleaved with the HMVP candidates in the merged candidate list. For example, a STMVP candidate can be placed first, then a HMVP candidate, then another STMVP candidate, etc. Alternatively, the HMVP candidate can appear first, followed by the STMVP candidate (one or more), and then some other HMVP candidates.

[0174] According to another embodiment, the STMVP candidates may be interleaved with candidates known as paired average candidates. The paired average candidates contain a set of average motion vectors between motion vectors already present in the merge candidate list being constructed. In the case where the STMVP candidates are interleaved with the paired candidates, they may be calculated as the average of the non-temporal MV candidates present in the paired candidates, and the temporal motion vector prediction value (TMVP) associated with the block being encoded / decoded. Then, in this embodiment, one paired candidate may appear first in the list, followed by the STMVP candidate, then the paired candidate, and so on. Alternatively, the STMVP candidate calculated based on the first paired candidate may appear first in the list, followed by the STMVP candidate calculated based on the second paired candidate, and so on.

[0175] According to at least one other embodiment, if both pairwise average candidates and STMVP candidates are used to construct a merge list, the process for constructing pairwise average candidates based on candidates already present in the list may exclude the STMVP candidate(s) from its construction process if some STMVP candidates(s) already exist in the merge being constructed.

[0176] According to another embodiment, a high-level syntax element (e.g., a slice header, tile group header, tile header, or picture header syntax element), for example including a flag, indicates whether the STMVP candidate(s) are used to construct a merge candidate list for each CU coded or decoded in merge mode in the slice, tile group, tile, or picture under consideration.

[0177] According to an embodiment, the value of the flag is determined at the encoder side in order to optimize the decoding efficiency.

[0178] According to an embodiment, the value of the flag is determined according to the temporal layer to which the current slice, tile, tile group or picture belongs. As an example, if the slice, tile, tile group or picture is in temporal layer 0, the flag can be selected as 0 (false). Otherwise, it can be selected as 1 (true).

[0179] According to an embodiment, the value of the flag is determined according to the set of reference pictures that are available and can be used for temporal prediction of the current slice, tile, tile group or picture. As an example, if the slice, tile, tile group or picture has at least one reference picture with a POC value lower than the current POC and at least one reference picture with a POC value higher than the current POC, then the flag can be selected as 1 (true). Otherwise, it can be selected as 0 (false).

[0180] As another example, if the reference picture with reference picture index 0 in each reference picture list L0 and L1 has a respective POC lower and higher than the POC of the current slice, tile, tile group, or picture, then the flag may be selected as 1 (true). Otherwise, it may be selected as 0 (false).

[0181] According to an embodiment, the value of the flag is determined at the encoder side according to the intra-frame period of the sequence being decoded.

[0182] As an example, if the internal period is an integer value strictly above zero, then the flag 1 (true) may be selected. Otherwise, it may be selected as 0 (false).

[0183] At the decoder side, the flag is parsed in the slice, tile, tile group, or picture header (picture parameter set). Then, when decoding each coding unit in the considered slice, tile, tile group, or picture, the value of the flag is taken into account in order to include the spatial-temporal (STMVP) candidate(s) during the construction of the merge candidate list for a given CU being decoded in merge mode.

[0184] According to another embodiment, when constructing a merge candidate list for each CU coded or decoded in merge mode in a considered slice, tile group, tile, or picture, a high-level syntax element, such as a slice header, tile group header, tile header, or picture header syntax element present in a flag indicates information related to the position of the STMVP candidate(s) in the merge candidate list.

[0185] As an example, according to a given value of the flag (e.g., 1 or true), the STMVP candidate is located after the fourth spatial merge candidate in the merge list. Therefore, in this method, the merge list will include the following sorted merge candidate set:

[0186] -First spatial candidate: Left, denoted as Al

[0187] - Second space candidate: above, denoted as Bl

[0188] - Third space candidate: upper right, denoted as B0

[0189] -Fourth space candidate: lower left, denoted as A0

[0190] -Proposed STMVP Candidates

[0191] -Fifth space candidate: upper left, denoted as B2

[0192] -Temporal motion vector prediction candidate, denoted as TMVP

[0193] -Historically based motion vector prediction candidate, denoted as HMVP

[0194] - Pairwise average candidate

[0195] -Zero motion vector

[0196] If the flag value is 0 (false), the STMVP candidate position is after the temporal motion vector predictor (TMVP), and the merge candidate list is sorted as follows:

[0197] -First spatial candidate: Left, denoted as Al

[0198] - Second space candidate: above, denoted as Bl

[0199] - Third space candidate: upper right, denoted as B0

[0200] -Fourth space candidate: lower left, denoted as A0

[0201] -Fifth space candidate: upper left, denoted as B2

[0202] -Temporal motion vector prediction candidate, denoted as TMVP

[0203] -Proposed STMVP Candidates

[0204] -Historically based motion vector prediction candidate, denoted as HMVP

[0205] - Pairwise average candidate

[0206] -Zero motion vector

[0207] According to an embodiment, the value of the flag is determined at the encoder side in order to optimize the decoding efficiency.

[0208] According to an embodiment, the value of the flag is determined according to the temporal layer to which the current slice, tile, tile group or picture belongs. As an example, if the slice, tile, tile group or picture is in temporal layer 0, the flag can be selected as 0 (false). Otherwise, it can be selected as 1 (true).

[0209] According to an embodiment, the value of the flag is determined according to the set of reference pictures that are available and can be used for temporal prediction of the current slice, tile, tile group or picture. As an example, if the slice, tile, tile group or picture has at least one reference picture with a POC value lower than the current POC and at least one reference picture with a POC value higher than the current POC, then the flag can be selected as 1 (true). Otherwise, it can be selected as 0 (false).

[0210] As another example, if the reference picture with reference picture index 0 in each reference picture list L0 and L1 has a respective POC lower and higher than the POC of the current slice, tile, tile group, or picture, then the flag may be selected as 1 (true). Otherwise, it may be selected as 0 (false).

[0211] According to an embodiment, the value of the flag is decided at the encoder side according to the intra-frame period of the sequence being encoded.

[0212] As an example, if the internal period is an integer value strictly above zero, then the flag 1 (true) may be selected. Otherwise, it may be selected as 0 (false).

[0213] At the decoder side, the flag is analyzed in the slice, tile, tile group or picture header (picture parameter set). Then, when decoding each decoding unit in the considered slice, tile, tile group or picture, when constructing the merge candidate list of the decoding unit decoded in merge mode, the value of the flag is taken into account in order to adjust the ordering of the merge candidates in the merge candidate list as described above.

[0214] According to another embodiment, the selection between more than two orderings of merging candidates is performed in a synchronized manner on both the encoder side and the decoder side.In this embodiment, any of the above strategies may be applied on the decoder side in exactly the same way as on the encoder side.

[0215] According to another embodiment, the temporal motion vector predictor (TMVP) is placed closer to the head of the merge candidate list. As an example, the position of the TMVP candidate may be after the first four spatial candidates and before the fifth spatial candidate B2 in the merge list shown above.

[0216] According to another embodiment which can be combined with the last one, the STMVP candidate is placed right after the TMVP candidate in the merge candidate list.

[0217] According to another embodiment, two spatial motion vector prediction values ​​for calculating the STMVP merge candidate are selected according to one of the following ways.

[0218] - When the STMVP candidates are calculated, the first spatial MV prediction value may be set equal to the first spatial candidate already present in the merge list, and the second MV prediction value may be set equal to the last spatial candidate inserted into the merge list being constructed.

[0219] -The first spatial MV prediction value may be set equal to one of the three spatial candidates found above the current CU (i.e., B0, Bl, or B2). If found, it may be set equal to the first found spatial prediction value above the current CU. In this variation, the second spatial MV prediction value used to calculate the STMVP candidate may be set equal to one of the spatial candidates found to the left of the current CU (i.e., in A0 and Al). For example, it may be set equal to the first found spatial MV prediction value to the left of the current CU. In this variation, if the above spatial MV prediction value or the left spatial MV prediction value is not found, the two spatial MV prediction values ​​may be selected as the first and second in the merge list being constructed, or as the first and last spatial MV prediction values ​​in the merge list being constructed.

[0220] This document describes various examples of embodiments, features, models, methods, etc. Many of these examples are described as being specific and, at least to illustrate individual characteristics, are often described in a manner that may appear to be restrictive. However, this is for the purpose of clarity of description and does not limit the application or scope. In fact, the various examples of the embodiments, features, etc. described herein can be combined and interchanged in various ways to provide additional examples of the embodiments.

[0221] Examples of embodiments according to the present disclosure include, but are not limited to, the following.

[0222] In general, at least one example of an embodiment may relate to a device for encoding video data, comprising one or more processors, wherein the one or more processors are configured to: determine that at least two motion vectors are available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block or a temporal motion vector co-located with a third spatial position adjacent to the current block, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; obtain a first spatiotemporal motion vector prediction candidate based on a combination of the at least two motion vectors available among the first or second spatial motion vector or the temporal motion vector; and All three of the second spatial motion vector and the temporal motion vector are available and a second spatiotemporal motion vector prediction candidate is obtained based on one of multiple combinations of the three available motion vectors, the combination comprising: a) a first combination of the first and second spatial motion vectors; or b) a second combination of the first spatial motion vector and the temporal motion vector; or c) a third combination of the second spatial motion vector and the temporal motion vector, wherein the one of the multiple combinations based on which the second spatiotemporal motion vector is obtained is different from the combination of at least two motion vectors based on which the first spatiotemporal motion vector is obtained; and encoding the video data based on at least one of the first and second spatiotemporal motion vector prediction candidates to generate encoded video data.

[0223] In general, at least one other instance of an embodiment may relate to a method for encoding video data, comprising: determining that at least two motion vectors are available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block or a temporal motion vector co-located with a third spatial position adjacent to the current block, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; obtaining a first spatiotemporal motion vector prediction candidate based on a combination of the at least two motion vectors available among the first or second spatial motion vector or the temporal motion vector; and obtaining a first spatiotemporal motion vector prediction candidate based on the first and second spatial motion vectors and the temporal motion vector. All three of the temporal motion vectors are available and a second spatiotemporal motion vector prediction candidate is obtained based on one of multiple combinations of the three available motion vectors, the combination comprising: a) a first combination of the first and second spatial motion vectors; or b) a second combination of the first spatial motion vector and the temporal motion vector; or c) a third combination of the second spatial motion vector and the temporal motion vector, wherein the one of the multiple combinations based on which the second spatiotemporal motion vector is obtained is different from the combination of at least two motion vectors based on which the first spatiotemporal motion vector is obtained; and encoding the video data based on at least one of the first and second spatiotemporal motion vector prediction candidates to generate encoded video data.

[0224] In general, at least one other instance of an embodiment may relate to a device for decoding video data, comprising one or more processors, wherein the one or more processors are configured to: determine that at least two motion vectors are available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block or a temporal motion vector co-located with a third spatial position adjacent to the current block, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; obtain a first spatiotemporal motion vector prediction candidate based on a combination of the at least two motion vectors available among the first or second spatial motion vector or the temporal motion vector; and based on the first and all three of the second spatial motion vector and the temporal motion vector are available and based on one of multiple combinations of the three available motion vectors to obtain a second spatiotemporal motion vector prediction candidate, the combination comprising: a) a first combination of the first and second spatial motion vectors; or b) a second combination of the first spatial motion vector and the temporal motion vector; or c) a third combination of the second spatial motion vector and the temporal motion vector, wherein the one of the multiple combinations based on which the second spatiotemporal motion vector is obtained is different from the combination of at least two motion vectors based on which the first spatiotemporal motion vector is obtained; and decoding the video data based on at least one of the first and second spatiotemporal motion vector prediction candidates to generate decoded video data.

[0225] In general, at least one other instance of an embodiment may involve a method for decoding video data, comprising: determining that at least two motion vectors are available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block or a temporal motion vector co-located with a third spatial position adjacent to the current block, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; obtaining a first spatiotemporal motion vector prediction candidate based on a combination of the at least two motion vectors available among the first or second spatial motion vector or the temporal motion vector; and obtaining a first spatiotemporal motion vector prediction candidate based on the first and second spatial motion vectors and the temporal motion vector. All three of the temporal motion vectors are available and a second spatiotemporal motion vector prediction candidate is obtained based on one of a plurality of combinations of the three available motion vectors, the combination comprising: a) a first combination of the first and second spatial motion vectors; or b) a second combination of the first spatial motion vector and the temporal motion vector; or c) a third combination of the second spatial motion vector and the temporal motion vector, wherein the one of the plurality of combinations based on which the second spatiotemporal motion vector is obtained is different from the combination of at least two motion vectors based on which the first spatiotemporal motion vector is obtained; and decoding the video data based on at least one of the first and second spatiotemporal motion vector prediction candidates to generate decoded video data.

[0226] In general, at least one other instance of an embodiment may involve a device or method as described above, wherein the one or more processors are further configured for or the method further includes: obtaining a third spatiotemporal motion vector prediction candidate based on a second combination of the multiple combinations, wherein the second combination of the multiple combinations is different from the combination based on which the first spatiotemporal motion vector prediction candidate is obtained and one of the multiple combinations based on which the second spatiotemporal motion vector prediction candidate is obtained.

[0227] In general, at least one other example of an embodiment may involve an apparatus or method as described above, wherein one or more processors are further configured to, or the method further includes: applying scaling to one or more spatial motion vectors being averaged, or if scaling is not applied, the determination includes: selecting a pair of spatial motion vector prediction values ​​based on corresponding reference picture indexes, wherein the selection includes: searching for multiple adjacent spatial positions that satisfy a condition placed on the reference picture index to obtain the top and left adjacent motion vectors of the current CU; and obtaining the spatiotemporal motion vector prediction value based on the selected pair of spatial motion vector prediction values.

[0228] In general, at least one other instance of an embodiment may relate to a device or method as described above, wherein the one or more processors are further configured for or the method further includes: applying scaling to one or more spatial motion vectors being averaged, or if scaling is not applied, then the determination includes selecting a spatial motion vector prediction value pair from a history-based motion vector prediction value buffer based on a corresponding reference picture index that satisfies a condition placed on the reference picture index; and obtaining the spatiotemporal motion vector prediction value based on the selected spatial motion vector prediction value pair.

[0229] In general, at least one other example of an embodiment may involve an apparatus or method involving the conditions as described above, wherein the conditions include: if in each reference picture list used by the spatial motion vector candidate under consideration, the reference picture index is equal to 0, then a spatial motion vector candidate pair may be selected; or, if in each reference picture list used by two spatial motion vector candidates, the reference picture indexes of the two candidates are equal, then a spatial motion vector candidate pair may be selected; or, if the reference image indexes of the two spatial candidates are equal to each other and equal to zero, then a spatiotemporal motion vector prediction value is obtained based on the temporal motion vector prediction value; or if the reference image indexes of the two spatial candidates are equal to each other but not equal to zero, then an average spatiotemporal motion vector prediction value is obtained based on the temporal motion vector prediction value.

[0230] In general, at least one other instance of an embodiment may be directed to a device for encoding video data, comprising one or more processors, wherein the one or more processors are configured to: obtain a first spatiotemporal motion vector prediction candidate based on at least two motion vectors available among a first or second spatial motion vector associated with a respective first and second spatial position adjacent to a current block, and a temporal motion vector co-located with a third spatial position associated with the current block, and based on a combination of the at least two available motion vectors, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; modify a first value based on obtaining the first spatiotemporal motion vector prediction candidate; modify a first value based on the first value and a temporal motion vector co-located with a third spatial position associated with the current block ... The second value of the position in the ordered set of quantity prediction candidates has a relationship, and based on at least two motion vectors available among the third or fourth spatial motion vector or the temporal motion vector, a second spatiotemporal motion vector prediction candidate is obtained, wherein the third and fourth spatial motion vectors are associated with fifth and sixth spatial positions different from the first and second spatial positions, and wherein the fifth spatial position is adjacent to the left side of the current block and the sixth spatial position is adjacent to the top of the current block; at least one of the first and second spatiotemporal motion vector prediction candidates is included in the ordered set of non-sub-block spatiotemporal motion vector prediction candidates; and the video data is encoded based on the at least one of the first and second spatiotemporal motion vector prediction candidates to produce encoded video data.

[0231] In general, at least one other instance of an embodiment may be directed to a method for encoding video data, comprising: obtaining a first spatiotemporal motion vector prediction candidate based on at least two motion vectors available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block, and a temporal motion vector co-located with a third spatial position associated with the current block, and based on a combination of the at least two available motion vectors, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; modifying a first value based on obtaining the first spatiotemporal motion vector prediction candidate; modifying a first value based on the first value and a position in an ordered set representing non-subblock spatiotemporal motion vector prediction candidates; The method comprises the steps of: obtaining a first spatial motion vector prediction candidate and a second spatial motion vector prediction candidate based on at least two motion vectors available among the third or fourth spatial motion vector or the temporal motion vector, wherein the third and fourth spatial motion vectors are associated with fifth and sixth spatial positions different from the first and second spatial positions, and wherein the fifth spatial position is adjacent to the left side of the current block and the sixth spatial position is adjacent to the top of the current block; including at least one of the first and second spatial motion vector prediction candidates in the ordered set of non-sub-block spatial motion vector prediction candidates; and encoding the video data based on the at least one of the first and second spatial motion vector prediction candidates to generate encoded video data.

[0232] In general, at least one other instance of an embodiment may involve one or more processors, wherein the one or more processors are configured to: obtain a first spatiotemporal motion vector prediction candidate based on at least two motion vectors available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block, and a temporal motion vector co-located with a third spatial position associated with the current block, and based on a combination of the at least two available motion vectors, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; modify a first value based on obtaining the first spatiotemporal motion vector prediction candidate; modify a first value based on the first value and an ordered set representing non-sub-block spatiotemporal motion vector prediction candidates; The method comprises the steps of: obtaining a second spatiotemporal motion vector prediction candidate based on at least two motion vectors available in the third or fourth spatial motion vector or the temporal motion vector, wherein the third and fourth spatial motion vectors are associated with fifth and sixth spatial positions different from the first and second spatial positions, and wherein the fifth spatial position is adjacent to the left side of the current block and the sixth spatial position is adjacent to the top of the current block; including at least one of the first and second spatiotemporal motion vector prediction candidates in the ordered set of non-sub-block spatiotemporal motion vector prediction candidates; and decoding the video data based on the at least one of the first and second spatiotemporal motion vector prediction candidates to generate decoded video data.

[0233] In general, at least one other instance of an embodiment may relate to a method for decoding video data, comprising: obtaining a first spatiotemporal motion vector prediction candidate based on at least two motion vectors available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block, and a temporal motion vector co-located with a third spatial position associated with the current block, and based on a combination of the at least two available motion vectors, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; modifying a first value based on obtaining the first spatiotemporal motion vector prediction candidate; modifying a first value based on the first value and a position in an ordered set representing non-sub-block spatiotemporal motion vector prediction candidates; The method comprises the steps of: obtaining a second spatiotemporal motion vector prediction candidate based on at least two motion vectors available among the third or fourth spatial motion vector or the temporal motion vector, wherein the third and fourth spatial motion vectors are associated with fifth and sixth spatial positions different from the first and second spatial positions, and wherein the fifth spatial position is adjacent to the left side of the current block and the sixth spatial position is adjacent to the top of the current block; including at least one of the first and second spatiotemporal motion vector prediction candidates in the ordered set of non-sub-block spatiotemporal motion vector prediction candidates; and decoding the video data based on the at least one of the first and second spatiotemporal motion vector prediction candidates to generate decoded video data.

[0234] In general, at least one other instance of an embodiment may relate to a device for encoding video data, comprising one or more processors, wherein the one or more processors are configured to: determine that at least two motion vectors are available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block and a temporal motion vector co-located with a third spatial position, wherein the third spatial position is adjacent to the right side of the current block and abuts the lower right corner of the current block, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; obtain a spatiotemporal motion vector prediction candidate based on the first and second spatial motion vectors and at least two available motion vectors among the temporal motion vector, and based on a combination of the at least two available motion vectors; and encode the video data based on the spatiotemporal motion vector prediction candidates to produce encoded video data.

[0235] In general, at least one other instance of an embodiment may relate to a method for encoding video data, comprising: determining that at least two motion vectors are available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block and a temporal motion vector co-located with a third spatial position, wherein the third spatial position is adjacent to the right side of the current block and abuts the lower right corner of the current block, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; obtaining a spatiotemporal motion vector prediction candidate based on the first and second spatial motion vectors and at least two available motion vectors among the temporal motion vector, and based on a combination of the at least two available motion vectors; and encoding the video data based on the spatiotemporal motion vector prediction candidates to produce encoded video data.

[0236] In general, at least one other instance of an embodiment may relate to a device for decoding video data, comprising one or more processors, wherein the one or more processors are configured to: determine that at least two motion vectors are available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block and a temporal motion vector co-located with a third spatial position, wherein the third spatial position is adjacent to the right side of the current block and abuts the lower right corner of the current block, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; obtain a spatiotemporal motion vector prediction candidate based on the first and second spatial motion vectors and at least two available motion vectors among the temporal motion vector, and based on a combination of the at least two available motion vectors; and decode the video data based on the spatiotemporal motion vector prediction candidates to produce decoded video data.

[0237] In general, at least one other instance of an embodiment may involve a method for decoding video data, comprising: determining that at least two motion vectors are available among a first or second spatial motion vector associated with a corresponding first and second spatial position adjacent to a current block and a temporal motion vector co-located with a third spatial position, wherein the third spatial position is adjacent to the right side of the current block and abuts the lower right corner of the current block, wherein the first spatial position is adjacent to the left side of the current block and the second spatial position is adjacent to the top of the current block; obtaining a spatiotemporal motion vector prediction candidate based on the first and second spatial motion vectors and at least two available motion vectors among the temporal motion vector, and based on a combination of the at least two available motion vectors; and decoding the video data based on the spatiotemporal motion vector prediction candidates to produce decoded video data.

[0238] In general, at least one other example of an embodiment may relate to any example of an embodiment of an apparatus or method as described herein, further comprising determining whether to add at least one obtained spatiotemporal motion vector prediction candidate to a merge candidate list based on a criterion indicating the relevance of the spatiotemporal motion vector prediction candidates.

[0239] In general, at least one other example of an embodiment may be directed to an apparatus or method as described above, wherein the criterion includes determining the L of the averaged result. ∞ norm and L of each of the at least two motion vectors on which the acquisition of the at least one spatiotemporal motion vector is based ∞ Whether the norm is negligible compared to .

[0240] In general, at least one other example of an embodiment may involve an apparatus or method as described above, wherein determining whether to add at least one obtained spatiotemporal motion vector prediction candidate to a merge candidate list includes determining whether at least one spatiotemporal motion vector prediction candidate is redundant with respect to any other candidate in the merge candidate list, and adding at least one spatiotemporal motion vector prediction candidate to the merge candidate list only if the at least one spatiotemporal motion vector prediction candidate is not redundant.

[0241] In general, at least one other instance of an embodiment may involve an apparatus or method as described above, wherein determining whether to include at least one obtained spatiotemporal motion vector prediction candidate in a merge candidate list is based on the size of the merge candidate list relative to a maximum allowed size of the merge candidate list when considering at least one obtained spatiotemporal motion vector prediction value candidate.

[0242] In general, at least one other example of an embodiment may relate to an apparatus or method as described above, wherein at least one obtained spatiotemporal motion vector prediction candidate is included in a merged candidate list based on an ordering of candidates included in the list, wherein the ordering includes one of: placing at least one obtained spatiotemporal motion vector prediction candidate at the fourth position in the list; or placing the at least one obtained spatiotemporal motion vector prediction candidate at a position in the list determined based on the position of an alternative temporal motion vector prediction candidate; or placing the at least one obtained spatiotemporal motion vector prediction candidate at a position in the list that provides a higher priority than all candidates in the list except the alternative temporal motion vector prediction candidate and the left neighboring candidate and the upper neighboring candidate; or placing the at least one obtained spatiotemporal motion vector prediction candidate before or after a history-based motion vector prediction candidate included in the list; or interleaving the at least one obtained spatiotemporal motion vector prediction candidate with a history-based motion vector prediction candidate included in the list; or interleaving the at least one obtained spatiotemporal motion vector prediction candidate with one or more pairwise average candidates included in the list.

[0243] Generally speaking, at least one other example of an embodiment may relate to any example of an embodiment of an apparatus or a method as described herein, wherein the combination or one or more of the plurality of combinations is obtained based on an average value of available motion vectors.

[0244] Generally speaking, at least one other example of an embodiment may involve an apparatus or method as described above involving averaging, wherein the average comprises a weighted average.

[0245] Generally speaking, at least one other example of an embodiment may involve an apparatus or method involving weighted averaging as described above, wherein the weighted averaging includes a plurality of weighted averages, each of the plurality of weighted averages being based on a corresponding one of a plurality of weights.

[0246] In general, at least one other example of an embodiment may relate to any example of an embodiment of an apparatus or method as described herein, wherein the first spatial position and the second spatial position correspond to a middle position along a top edge of the current block and a middle position along a left edge of the current block, respectively.

[0247] Generally speaking, at least one other example of an embodiment may relate to any example of an embodiment of an apparatus or method as described herein, wherein one or more obtained spatiotemporal motion vector prediction candidates are used in an adaptive motion vector prediction mode of operation.

[0248] Generally speaking, at least one other example of an embodiment may involve a computer program product comprising computing instructions that, when executed by one or more processors, are for performing any example of an embodiment of a method as described herein.

[0249] In general, at least one other example of an embodiment may involve a bitstream formatted to include encoded video data, wherein the encoded video data includes indicators associated with spatiotemporal motion vector prediction candidates obtained according to any example of a method of encoding video data as described herein; and picture data encoded based on the spatiotemporal motion vector prediction candidates.

[0250] In general, at least one other example of an embodiment may involve a device comprising: an apparatus according to any example of an embodiment as described herein; and at least one of: (i) an antenna configured to receive a signal, the signal including data representing the video data, (ii) a band limiter configured to limit the received signal to a frequency band including the data representing the video data, and (iii) a display configured to display an image from the video data.

[0251] In general, examples of the embodiments described and contemplated in this document may be implemented in many different forms. Figure 1 and 2 And the following Fig.21 Some embodiments are provided, but other embodiments are contemplated and are not intended to be construed in detail. Figure 1 , 2 The discussion of 21 does not limit the breadth of implementation. At least one embodiment generally provides examples related to video encoding and / or decoding, and at least one other embodiment generally relates to transmitting a generated or encoded bitstream or signal. These and other embodiments may 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 or signal generated according to any of the described methods.

[0252] In this application, the terms "reconstruction" and "decoding" 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 "reconstruction" is used on the encoder side, while "decoding" is used on the decoder side.

[0253] The terms HDR (high dynamic range) and SDR (standard dynamic range) are used in this disclosure. Those terms generally convey a specific value of dynamic range to one of ordinary skill in the art. However, it is also intended that in additional embodiments, references to HDR are understood to mean "higher dynamic range" and references to SDR are understood to mean "lower dynamic range". Such additional embodiments are not constrained by any specific value of dynamic range that may often be associated with the terms "high dynamic range" and "standard dynamic range".

[0254] 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.

[0255] Various methods and other aspects described in this document may be used to modify a module, e.g. Figure 1 and Figure 2 Intra prediction, entropy coding and / or decoding modules (160, 360, 145, 330) of the video encoder 100 and decoder 200 shown in . Furthermore, aspects of the present invention are not limited to VVC or HEVC, and may be applied, for example, to other standards and recommendations, whether pre-existing or developed in the future, and extensions of any such standards and recommendations (including VVC and HEVC). Unless otherwise indicated or technically excluded, the aspects described herein may be used alone or in combination.

[0256] For example, various numerical values ​​are used in this document. The specific values ​​are for illustrative purposes, and the described aspects are not limited to these specific values.

[0257] Fig.21 A block diagram of an example of a system in which various aspects and embodiments can be implemented is shown. System 1000 can be implemented as a device including various components described below, and is configured to perform one or more aspects described herein. 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 household appliances and servers. The elements of system 1000 can be implemented individually or in combination in a single integrated circuit, multiple ICs and / or discrete components. For example, in at least one embodiment, the processing and encoder / decoder elements of system 1000 are distributed on multiple ICs and / or discrete components. In various embodiments, system 1000 is coupled to other similar systems or other electronic devices via, for example, a communication bus or by a dedicated input and / or output port communication. In various embodiments, system 1000 is configured to implement one or more aspects described herein.

[0258] System 1000 includes at least one processor 1010, which is configured to execute instructions loaded therein, for implementing various aspects described herein, for example. Processor 1010 may include embedded memory, input and output interfaces, and various other circuits known in the art. System 1000 includes at least one memory 1020 (e.g., volatile memory device and / or non-volatile memory device). System 1000 includes storage device 1040, which may include non-volatile memory and / or volatile memory, including but not limited to EEPROM, ROM, PROM, RAM, DRAM, SRAM, flash memory, disk drive, and / or optical drive. As a non-limiting example, storage device 1040 may include internal storage device, attached storage device, and / or network accessible storage device.

[0259] The system 1000 includes an encoder / decoder module 1030, which is configured to, for example, 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 module (one or more) 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, 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 as known to those skilled in the art.

[0260] Program code to be loaded onto the processor 1010 or the encoder / decoder module 1030 to perform the various embodiments described in this document may be stored in the storage device 1040 and subsequently loaded onto the memory 1020 for execution by the processor 1010. According to various embodiments, 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 the various items during the execution of the processes described herein. These stored items may include, but are not limited to, input video, decoded video or portions of decoded video, bitstreams or signals, matrices, variables, and intermediate or final results from the processing of equations, formulas, operations, and operational logic.

[0261] In several embodiments, memory within 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 a storage device 1040, such as a dynamic volatile memory and / or a non-volatile flash memory. In several embodiments, the external non-volatile flash memory is used to store the operating system of the television. In at least one embodiment, a fast external dynamic volatile memory such as RAM is used as working memory for video encoding and decoding operations, such as MPEG-2, HEVC, or VVC (Versatile Video Coding).

[0262] As shown in block 1130, input to the elements of system 1000 may be provided through various input devices. Such input devices include, but are not limited to, (i) an RF section that receives an RF signal transmitted over the air, for example, by a broadcaster, (ii) a composite input terminal, (iii) a USB input terminal, and / or (iv) an HDMI input terminal.

[0263] In various embodiments, the input device of block 1130 has associated corresponding input processing elements known in the art. For example, the RF section may be associated with elements 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 to 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 section of various embodiments includes one or more elements to 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 section 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 a near-baseband frequency) or baseband. In a set-top box embodiment, the RF part and its relevant input processing element receive the RF signal that sends by wired (for example, cable) medium, and filter to the frequency band of expectation again by filtering, down-conversion and perform frequency selection.Various embodiments rearrange the order of above-mentioned (and other) element, remove some in these elements, and / or add other elements that perform similar or different functions.Adding element can include and insert element between existing element, for example, insert amplifier and analog-to-digital converter.In various embodiments, the RF part comprises antenna.

[0264] 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 should 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 processor 1010. Similarly, various aspects of USB or HDMI interface processing may be implemented within a separate interface IC or within processor 1010. The demodulated, error corrected, and demultiplexed streams are provided to various processing elements, including, for example, processor 1010 and encoder / decoder 1030, which operate in conjunction with memory and storage elements to process the data streams for presentation on output devices.

[0265] The components of system 1000 may be disposed within an integrated housing, within which the components may be interconnected and data may be transmitted therebetween using suitable connection means 1140, such as an internal bus known in the art, including an I2C bus, wiring, and a printed circuit board.

[0266] 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 through 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.

[0267] In various embodiments, a Wi-Fi network such as IEEE 802.11 is used to transmit the data stream to the system 1000. The Wi-Fi signals of these embodiments are received through, for example, a communication channel 1060 and a communication interface 1050 suitable for Wi-Fi communication. The communication channel 1060 of these embodiments is typically connected to an access point or router that provides access to external networks including the Internet to allow streaming applications and other over-the-top communications. Other embodiments use a set-top box that transmits data through an HDMI connection of the input box 1130 to provide streaming data to the system 1000. Still other embodiments use an RF connection of the input box 1130 to provide streaming data to the system 1000.

[0268] The system 1000 can provide output signals to various output devices, including a display 1100, a speaker 1110, and other peripherals 1120. In various examples of various embodiments, the other peripherals 1120 include one or more of the following: a stand-alone DVR, a disk player, a stereo system, a lighting system, and other devices that provide functions based on the output of the system 1000. In various embodiments, control signals are transmitted between the system 1000 and the display 1100, the speaker 1110, or other peripherals 1120 using signaling, such as AV. Link, CEC, or other communication protocols that enable device-to-device control with or without user intervention. The output devices can be communicatively coupled to the system 1000 via dedicated connections through the corresponding 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 the speaker 1110 can be integrated into a single unit in an electronic device (e.g., a television) along with other components of the system 1000. In various embodiments, the display interface 1070 includes a display driver, such as a timing controller (T Con) chip.

[0269] 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 of the 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.

[0270] The embodiments may be performed by computer software implemented by the processor 1010, or hardware, or a combination of hardware and software. As a non-limiting example, the embodiments may be implemented by one or more integrated circuits. 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 memory devices, magnetic memory devices, semiconductor-based memory devices, fixed memory, and removable memory, as non-limiting examples. The processor 1010 may be of any type suitable for the technical environment and may include one or more of the following as non-limiting examples: a microprocessor, a general-purpose computer, a special-purpose computer, and a processor based on a multi-core architecture.

[0271] Throughout this disclosure, various implementations involve decoding. As used in this application, "decoding" may include, for example, all or part of a process performed on a received coded sequence to produce a final output suitable for display. In various embodiments, such processes include one or more of the processes typically performed by a decoder, such as entropy decoding, inverse quantization, inverse transform, and differential decoding. In various embodiments, such processes also or alternatively include processes performed by the decoder of the various embodiments described in this application, such as extracting a picture from a tiled (packed) picture, determining the upsampling filter to be used and upsampling the picture, and flipping the picture back to its intended direction.

[0272] As a further 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 generally to a broader decoding process will be clear based on the context of the specific description and is believed to be well understood by those skilled in the art.

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

[0274] As a further 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 differential encoding and entropy encoding. Whether the phrase "encoding process" is intended to refer specifically to a subset of operations or generally to a broader encoding process will become clear based on the context of the specific description and is believed to be well understood by those skilled in the art.

[0275] Note that the syntax elements used here are descriptive terms. Therefore, they do not exclude the use of other syntax element names.

[0276] When a figure is presented as a flow chart, it should be understood that it also provides a block diagram of the corresponding apparatus. Similarly, when a figure is presented as a block diagram, it should be understood that it also provides a flow chart of the corresponding method / process.

[0277] Various embodiments relate to rate-distortion optimization. In particular, during the encoding process, a balance or trade-off between code rate and distortion is usually considered, usually given a constraint on computational complexity. Rate-distortion optimization is usually formulated as minimizing a rate-distortion function, which is a weighted sum of code rate and distortion. There are different methods to solve the rate-distortion optimization problem. For example, these methods can be based on extensive testing of all coding options, including all considered modes or decoding parameter values, and a complete evaluation of their decoding costs and the associated distortion of the reconstructed signal after decoding and decoding. Faster methods can also be used to save coding complexity, in particular, to calculate approximate distortion based on prediction or prediction residual signals rather than reconstructed signals. A mixture of these two methods can also be used, for example, by using approximate distortion only for some possible coding options and full distortion for other coding options. Other methods only evaluate a subset of possible coding options. More generally, many methods use any of a variety of techniques to perform optimization, but optimization is not necessarily a complete evaluation of both coding costs and associated distortions.

[0278] The implementations and aspects described herein may be implemented in, for example, a method or process, a device, a software program, a data stream, or a signal. Even if discussed only in the context of a single form of implementation (e.g., discussed only as a method), the implementation of the features discussed may also be implemented in other forms (e.g., a device or program). For example, a device may be implemented with appropriate hardware, software, and firmware. The method may 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 a communication device, such as a computer, a cellular phone, a portable / personal digital assistant ("PDA"), and other devices that facilitate information communication between end users.

[0279] References to "one embodiment," or "an embodiment," or "implementation," or "an implementation," and other variations 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, in various places throughout this document are not necessarily all referring to the same embodiment.

[0280] Additionally, this document may refer to "obtaining" various pieces of information. Obtaining information may include, for example, one or more of: determining the information, estimating the information, calculating the information, predicting the information, or retrieving the information from a memory.

[0281] Additionally, this document may refer to "accessing" various pieces of information. Accessing information may include, for example, one or more of: receiving information, retrieving information (e.g., from memory), storing information, moving information, copying information, calculating information, determining information, predicting information, or estimating information.

[0282] Additionally, this document may refer to "receiving" various information. Like "accessing," receiving is intended to be a broad term. Receiving information may include, for example, one or more of: accessing the information or retrieving the information (e.g., from a memory). Furthermore, during operations such as storing information, processing information, sending information, moving information, copying information, erasing information, calculating information, determining information, predicting information, or estimating information, "receiving" is often involved in one way or another.

[0283] It should be understood that, for example, in the case of "A / B," "A and / or B," and "at least one of A and B," use of any of the following " / ," "and / or," and "at least one of" is intended to encompass 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 wording 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). This can be extended to multiple items listed, as will be apparent to one of ordinary skill in this and related arts.

[0284] In addition, as used herein, the word "signal / signaling" especially refers to a corresponding decoder indicating something. For example, in some embodiments, the encoder signals a specific one of a plurality of weights to be used for an intra-frame prediction reference array. In this way, in an embodiment, the same parameters are used on the encoder side and the decoder side. Therefore, for example, the encoder can send (explicit signaling) specific parameters to the decoder so that the decoder can use the same specific parameters. On the contrary, if the decoder already has specific parameters as well as other parameters, signaling can be used without sending (implicit signaling) to simply allow the decoder to know and select specific parameters. Bit savings are achieved in various embodiments by avoiding the transmission of any actual function. It should be understood that signaling can be implemented in various ways. For example, in various embodiments, one or more syntax elements, flags, etc. are used to signal information to the corresponding decoder. Although the foregoing relates to the verb form of the word "signal / signaling", the word "signal / signaling" can also be used as a noun in this article.

[0285] As will be apparent to one of ordinary skill in the art, 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 implementations. For example, a signal may be formatted to carry a bitstream of the described embodiments. Such a signal may be formatted as, for example, an electromagnetic wave (e.g., using a radio frequency portion of a spectrum) or 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.

[0286] Various embodiments have been described. Embodiments may include any of the following features or entities, alone or in any combination, across various claim categories and types:

[0287] - providing in the encoder and / or decoder a spatio-temporal motion vector predictor for determining a motion vector for a block based on a reduced number of spatio-temporal candidate positions considered to construct a spatio-temporal motion vector predictor for a current block.

[0288] · Providing spatio-temporal motion vector derivation in the encoder and / or decoder to generate some candidate motion data candidate prediction values ​​as part of the merge candidate list used in the merge mode based on considering a reduced number of spatial positions in the construction of the STMVP merge candidates.

[0289] Providing a merge candidate in the encoder and / or decoder, the merge candidate being determined or obtained based on an average between at least two motion vectors taken from spatial positions around the current CU where only two spatial positions are considered and no temporal candidates are retrieved.

[0290] providing, in the encoder and / or decoder, a merge candidate determined or obtained based on an average between at least two motion vectors taken from spatial positions around the current CU considering only two spatial positions, without retrieving temporal candidates, and taking the two envisioned candidates at intermediate positions along the top and left edges of the current PU.

[0291] • Providing, in the encoder and / or decoder, a merge candidate, the merge candidate being determined or obtained according to an average between two spatial candidate MVs and a temporal candidate MV located at middle positions along the top edge and the left edge of the current PU.

[0292] • Providing the temporal candidate MVs retrieved at spatial positions below and to the right of the current CU in the encoder and / or decoder.

[0293] • Providing a strategy in the encoder and / or decoder to decide whether the proposed STMVP is applicable.

[0294] • Providing an improved order for constructing lists of merge candidates in an encoder and / or decoder.

[0295] - Providing a step for constructing spatio-temporal MV prediction values ​​in the encoder and / or decoder, thereby improving decoding efficiency.

[0296] • Providing in the encoder and / or decoder the use of the proposed STMVP motion vector predictor for the AMVP inter-coding mode.

[0297] • Inserting syntax elements in the signaling that enable the encoder and / or decoder to provide spatio-temporal motion vector derivation as described herein.

[0298] • Selecting the spatio-temporal motion vector derivation to be applied at the decoder based on these syntax elements.

[0299] • A bitstream or signal comprising one or more of the described syntax elements or variations thereof.

[0300] • Inserting syntax elements in the signaling that enable the decoder to provide spatio-temporal motion vector derivations in a manner corresponding to that used by the encoder.

[0301] • Creating and / or sending and / or receiving and / or decoding a bitstream or signal comprising one or more of the described syntax elements or variations thereof.

[0302] • TV, set-top box, cell phone, tablet, or other electronic device that performs spatiotemporal motion vector derivation according to any of the described embodiments.

[0303] • A TV, set-top box, cell phone, tablet, or other electronic device that performs spatiotemporal motion vector derivation according to any of the described embodiments and displays (eg, using a monitor, screen, or other type of display) the resulting images.

[0304] A TV, set-top box, cellular phone, tablet or other electronic device that tunes (eg, using a tuner) a channel to receive a signal including an encoded image and performs spatiotemporal motion vector derivation according to any of the described embodiments.

[0305] A TV, set-top box, cell phone, tablet or other electronic device that receives over the air (eg, using an antenna) a signal comprising an encoded image and performs spatiotemporal motion vector derivation according to any of the described embodiments.

[0306] • A computer program product storing program code which, when executed by a computer, implements a spatiotemporal motion vector derivation according to any of the described embodiments.

[0307] • A non-transitory computer readable medium comprising executable program instructions causing a computer to execute the instructions to implement spatiotemporal motion vector derivation according to any of the described embodiments.

[0308] Various other generalized and specialized embodiments are also supported and contemplated in the present disclosure.

Claims

1. An apparatus for encoding video data, comprising: one or more processors, wherein the one or more processors are configured to: determining that at least one of the following motion vectors is available: a first spatial motion vector associated with a first spatial position adjacent to a current block to the left of the current block, and a second spatial motion vector associated with a second spatial position adjacent to the current block above the current block; Determining that a temporal motion vector is available, wherein the temporal motion vector is co-located with a third spatial position, the third spatial position being adjacent to the current block to the right of the current block and abutting a lower right corner of the current block; Obtaining a spatiotemporal motion vector prediction candidate based on a combination of the temporal motion vector and the at least one motion vector available in the first spatial motion vector and the second spatial motion vector; as well as Based on the spatiotemporal motion vector prediction candidates, at least a portion of the video data is encoded, wherein, based on determining that scaling is not applied to the at least one motion vector, the determination of the at least one motion vector includes: selecting a pair of spatial motion vector prediction values ​​from a history-based motion vector prediction value buffer, wherein the spatiotemporal motion vector prediction candidates are obtained based on the selected pair of spatial motion vector prediction values.

2. The device according to claim 1, wherein: The one or more processors are further configured to apply scaling to the one or more spatial motion vectors being combined, or based on determining that scaling is not applied, the determining of the at least one motion vector comprises: selecting the pair of spatial motion vector predictors based on the corresponding reference picture index, wherein the selecting comprises searching for a plurality of neighboring spatial positions satisfying a condition placed on the reference picture index for top and left neighboring motion vectors of the current block, The spatiotemporal motion vector prediction candidate is obtained based on a selected pair of spatial motion vector prediction values.

3. The apparatus of claim 1 , wherein the one or more processors are further configured to: apply scaling to the one or more spatial motion vectors being averaged, or based on determining that scaling is not applied, the determining of the at least one motion vector comprises: selecting the pair of spatial motion vector predictors based on respective reference picture indices satisfying a condition placed on the reference picture indices, The spatiotemporal motion vector prediction candidate is obtained based on a selected pair of spatial motion vector prediction values.

4. The apparatus according to claim 2 or 3, wherein the conditions include: A pair of spatial motion vector candidates is selected based on the following conditions: in each reference picture list used by the considered spatial motion vector candidate, the reference picture index is equal to 0; A pair of spatial motion vector candidates is selected based on the following conditions: in each reference picture list used by two spatial motion vector candidates, the reference picture indexes of the two candidates are equal; Based on the condition that the reference picture indexes of the two spatial motion vector candidates are equal to each other and equal to zero, the spatiotemporal motion vector prediction candidate is obtained based on the temporal motion vector prediction value; or Based on the condition that the reference picture indexes of the two spatial motion vector candidates are equal to each other but are not equal to zero, an averaged spatiotemporal motion vector prediction value is obtained based on the temporal motion vector prediction value.

5. The apparatus of claim 1 , wherein the one or more processors are further configured to: Based on a criterion indicating the relevance of the obtained spatiotemporal motion vector prediction candidate, it is determined whether to add the obtained spatiotemporal motion vector prediction candidate to the merge candidate list.

6. The apparatus according to claim 5, wherein the criterion comprises determining the average result L ∞ norm and L of each of the at least two motion vectors on which the obtaining of the spatiotemporal motion vector prediction candidate is based ∞ Whether the norm is negligible compared to .

7. The apparatus according to claim 5 or 6, wherein determining whether to add the obtained spatiotemporal motion vector prediction candidate to the merge candidate list comprises: Determine whether the obtained spatiotemporal motion vector prediction candidate is redundant with any other candidate in the merge candidate list, and add the obtained spatiotemporal motion vector prediction candidate to the merge candidate list based on the obtained spatiotemporal motion vector prediction candidate being non-redundant.

8. The apparatus of claim 7 , wherein the obtained spatiotemporal motion vector prediction candidate is included in the merge candidate list based on a ranking of the candidates included in the merge candidate list, wherein the ranking comprises one of the following: placing the obtained spatiotemporal motion vector prediction candidate at a fourth position in the list; placing the obtained spatiotemporal motion vector prediction candidate at a position in the list determined based on the position of the replaced temporal motion vector prediction candidate; placing the obtained spatiotemporal motion vector prediction candidate in the list at a position that provides a higher priority than all candidates in the list except the alternative temporal motion vector prediction candidate and the left neighboring candidate and the above neighboring candidate; placing the obtained spatiotemporal motion vector prediction candidate before or after the history-based motion vector prediction candidate included in the list; interleaving the obtained spatio-temporal motion vector prediction candidates with the history-based motion vector prediction candidates included in said list; or The obtained spatio-temporal motion vector prediction candidates are interleaved with one or more pairwise average candidates included in the list.

9. The apparatus of claim 1 , wherein the first spatial position comprises a middle position on a left edge of the current block, and the second spatial position comprises a middle position on a top edge of the current block, and wherein the one or more processors are further configured to determine the first spatial motion vector associated with the middle position on the left edge of the current block or to determine the second spatial motion vector associated with the middle position on the top edge of the current block.

10. The apparatus of claim 1, wherein the one or more processors are further configured to obtain a plurality of adaptive motion vector prediction (AMVP) candidates including the obtained spatiotemporal motion vector prediction candidates, wherein the video data is encoded based on AMVP candidates from the plurality of AMVP candidates.

11. An apparatus for decoding video data, comprising: one or more processors, wherein the one or more processors are configured to: determining that at least one of the following motion vectors is available: a first spatial motion vector associated with a first spatial position adjacent to a current block to the left of the current block, and a second spatial motion vector associated with a second spatial position adjacent to the current block above the current block; Determining that a temporal motion vector is available, wherein the temporal motion vector is co-located with a third spatial position, the third spatial position being adjacent to the current block to the right of the current block and abutting a lower right corner of the current block; Obtaining a spatiotemporal motion vector prediction candidate based on a combination of the temporal motion vector and the at least one motion vector available in the first spatial motion vector and the second spatial motion vector; as well as Based on the spatiotemporal motion vector prediction candidates, at least a portion of the video data is decoded, wherein, based on determining that scaling is not applied to the at least one motion vector, the determination of the at least one motion vector includes: selecting a pair of spatial motion vector prediction values ​​from a history-based motion vector prediction value buffer, wherein the spatiotemporal motion vector prediction candidates are obtained based on the selected pair of spatial motion vector prediction values.

12. The device according to claim 11, wherein: The one or more processors are further configured to apply scaling to the one or more spatial motion vectors being combined, or based on determining that scaling is not applied, the determining of the at least one motion vector comprises: selecting the pair of spatial motion vector predictors based on the corresponding reference picture index, wherein the selecting comprises searching for a plurality of neighboring spatial positions satisfying a condition placed on the reference picture index for top and left neighboring motion vectors of the current block, The spatiotemporal motion vector prediction candidate is obtained based on a selected pair of spatial motion vector prediction values.

13. The apparatus of claim 11, wherein the one or more processors are further configured to: apply scaling to the one or more spatial motion vectors being averaged, or based on determining that scaling is not applied, the determining of the at least one motion vector comprises: selecting the pair of spatial motion vector predictors based on respective reference picture indices satisfying a condition placed on the reference picture indices, The spatiotemporal motion vector prediction candidate is obtained based on a selected pair of spatial motion vector prediction values.

14. The apparatus according to claim 12 or 13, wherein the conditions include: A pair of spatial motion vector candidates is selected based on the following conditions: in each reference picture list used by the considered spatial motion vector candidate, the reference picture index is equal to 0; A pair of spatial motion vector candidates is selected based on the following conditions: in each reference picture list used by two spatial motion vector candidates, the reference picture indexes of the two candidates are equal; Based on the condition that the reference picture indexes of the two spatial motion vector candidates are equal to each other and equal to zero, the spatiotemporal motion vector prediction candidate is obtained based on the temporal motion vector prediction value; or Based on the condition that the reference picture indexes of the two spatial motion vector candidates are equal to each other but are not equal to zero, an averaged spatiotemporal motion vector prediction value is obtained based on the temporal motion vector prediction value.

15. The apparatus of claim 11, wherein the one or more processors are further configured to: Based on a criterion indicating the relevance of the obtained spatiotemporal motion vector prediction candidate, it is determined whether to add the obtained spatiotemporal motion vector prediction candidate to the merge candidate list.

16. The apparatus of claim 15, wherein the criterion comprises determining the average result L ∞ norm and L of each of the at least two motion vectors on which the obtaining of the spatiotemporal motion vector prediction candidate is based ∞ Whether the norm is negligible compared to .

17. The apparatus according to claim 15 or 16, wherein determining whether to add the obtained spatiotemporal motion vector prediction candidate to the merge candidate list comprises: Determine whether the obtained spatiotemporal motion vector prediction candidate is redundant with any other candidate in the merge candidate list, and add the obtained spatiotemporal motion vector prediction candidate to the merge candidate list based on the obtained spatiotemporal motion vector prediction candidate being non-redundant.

18. The apparatus of claim 17, wherein the obtained spatiotemporal motion vector prediction candidate is included in the merge candidate list based on a ranking of the candidates included in the merge candidate list, wherein the ranking comprises one of the following: placing the obtained spatiotemporal motion vector prediction candidate at a fourth position in the list; placing the obtained spatiotemporal motion vector prediction candidate at a position in the list determined based on the position of the replaced temporal motion vector prediction candidate; placing the obtained spatiotemporal motion vector prediction candidate in the list at a position that provides a higher priority than all candidates in the list except the alternative temporal motion vector prediction candidate and the left neighboring candidate and the above neighboring candidate; placing the obtained spatiotemporal motion vector prediction candidate before or after the history-based motion vector prediction candidate included in the list; interleaving the obtained spatio-temporal motion vector prediction candidates with the history-based motion vector prediction candidates included in said list; or The obtained spatio-temporal motion vector prediction candidates are interleaved with one or more pairwise average candidates included in the list.

19. The apparatus of claim 11, wherein the first spatial position comprises a middle position on a left edge of the current block, and the second spatial position comprises a middle position on a top edge of the current block, and wherein the one or more processors are further configured to determine the first spatial motion vector associated with the middle position on the left edge of the current block or to determine the second spatial motion vector associated with the middle position on the top edge of the current block.

20. The apparatus of claim 11, wherein the one or more processors are further configured to obtain a plurality of adaptive motion vector prediction (AMVP) candidates including the obtained spatiotemporal motion vector prediction candidates, wherein the video data is decoded based on an AMVP candidate from the plurality of the AMVP candidates.

21. A device comprising: The device according to any one of claims 1-3, 5, 6, 8-13, 15, 16, 18-20; as well as At least one of: (i) an antenna configured to receive a signal, the signal including data representing the video data, (ii) a frequency band limiter configured to limit the received signal to a frequency band including the data representing the video data, and (iii) a display configured to display an image from the video data.

22. A method for decoding video data, comprising: determining that at least one of the following motion vectors is available: a first spatial motion vector associated with a first spatial position adjacent to a current block to the left of the current block, and a second spatial motion vector associated with a second spatial position adjacent to the current block above the current block; Determining that a temporal motion vector is available, wherein the temporal motion vector is co-located with a third spatial position, the third spatial position being adjacent to the current block to the right of the current block and abutting a lower right corner of the current block; Obtaining a spatiotemporal motion vector prediction candidate based on a combination of the temporal motion vector and the at least one motion vector available in the first spatial motion vector and the second spatial motion vector; as well as Based on the spatiotemporal motion vector prediction candidates, at least a portion of the video data is decoded, wherein, based on determining that scaling is not applied to the at least one motion vector, the determination of the at least one motion vector includes: selecting a pair of spatial motion vector prediction values ​​from a history-based motion vector prediction value buffer, wherein the spatiotemporal motion vector prediction candidates are obtained based on the selected pair of spatial motion vector prediction values.

23. The method of claim 22, wherein the first spatial position comprises a middle position on a left edge of the current block, and the second spatial position comprises a middle position on a top edge of the current block, and wherein the method further comprises at least one of determining the first spatial motion vector associated with the middle position on the left edge of the current block, or determining the second spatial motion vector associated with the middle position on the top edge of the current block.

24. The method of claim 22, further comprising: A plurality of adaptive motion vector prediction (AMVP) candidates including the obtained spatiotemporal motion vector prediction candidates are obtained, wherein the video data is decoded based on AMVP candidates from the plurality of AMVP candidates.

25. The method of claim 22, further comprising: Scaling is applied to one or more spatial motion vectors being combined, or based on determining that scaling is not applied, the determination of at least one motion vector includes: selecting the pair of spatial motion vector prediction values ​​based on corresponding reference picture indexes, wherein the spatiotemporal motion vector prediction candidate is obtained based on the selected pair of spatial motion vector prediction values.

26. A computer program product comprising computing instructions for performing the method of claim 22 when executed by one or more processors.

27. A method for encoding video data, comprising: determining that at least one of the following motion vectors is available: a first spatial motion vector associated with a first spatial position adjacent to a current block to the left of the current block, and a second spatial motion vector associated with a second spatial position adjacent to the current block above the current block; Determining that a temporal motion vector is available, wherein the temporal motion vector is co-located with a third spatial position, the third spatial position being adjacent to the current block to the right of the current block and abutting a lower right corner of the current block; Obtaining a spatiotemporal motion vector prediction candidate based on a combination of the temporal motion vector and the at least one motion vector available in the first spatial motion vector and the second spatial motion vector; as well as Based on the spatiotemporal motion vector prediction candidates, at least a portion of the video data is encoded, wherein, based on determining that scaling is not applied to the at least one motion vector, the determination of the at least one motion vector includes: selecting a pair of spatial motion vector prediction values ​​from a history-based motion vector prediction value buffer, wherein the spatiotemporal motion vector prediction candidates are obtained based on the selected pair of spatial motion vector prediction values.

28. The method of claim 27, wherein the first spatial position comprises a middle position on a left edge of the current block, and the second spatial position comprises a middle position on a top edge of the current block, and wherein the method further comprises at least one of determining the first spatial motion vector associated with the middle position on the left edge of the current block, or determining the second spatial motion vector associated with the middle position on the top edge of the current block.

29. The method of claim 27, further comprising: A plurality of adaptive motion vector prediction (AMVP) candidates including the obtained spatiotemporal motion vector prediction candidates are obtained, wherein the video data is encoded based on the AMVP candidates from the plurality of AMVP candidates.