Method and apparatus for obtaining motion vectors

By constraining the search for co-located sub-blocks within specific value ranges, the method addresses memory read time and bandwidth issues in video encoding, improving efficiency in video encoding and decoding processes.

JP7582598B2Active Publication Date: 2024-11-13HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2022180472
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-06-04
Filing Date
2022-11-10
Publication Date
2024-11-13
Estimated Expiration
2039-06-04

AI Technical Summary

Technical Problem

Existing video encoding technologies face challenges in reducing memory read time and bandwidth due to uncertain ranges of co-located sub-blocks in advanced temporal motion vector prediction (ATMVP), leading to increased complexity and memory usage.

Method used

A method to determine a target offset vector within specific value ranges, limiting the search for co-located sub-blocks to predefined areas in the target picture, thereby reducing memory read time and bandwidth by obtaining motion vectors only within these constrained regions.

Benefits of technology

This approach effectively reduces memory read time and bandwidth by limiting the search for co-located sub-blocks to specific ranges, enhancing the efficiency of motion vector acquisition in video encoding and decoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007582598000010
    Figure 0007582598000010
  • Figure 0007582598000011
    Figure 0007582598000011
  • Figure 0007582598000012
    Figure 0007582598000012
Patent Text Reader

Abstract

A method and apparatus for obtaining a motion vector is provided. The method includes determining a first value range and a second value range, and determining a target offset vector and target picture identifier information for a block to be processed. The block to be processed includes at least one sub-block to be processed, wherein values ​​of components of the target offset vector in a first direction are within a first value range and values ​​of components of the target offset vector in a second direction are within a second value range, the first and second directions being orthogonal to each other. The method further includes determining a co-located sub-block of the sub-block to be processed in the target picture based on the position of the sub-block to be processed and the target offset vector, and determining a motion vector of the sub-block to be processed based on the motion vector of the co-located sub-block.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] Technical Field The present application relates to the field of video encoding and decoding technologies, and more particularly to a method and apparatus for obtaining motion vectors. [Background technology]

[0002] Digital video capabilities may be incorporated into a wide variety of devices, including digital televisions, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones (so-called "smartphones"), video conferencing devices, video streaming devices, and the like. Digital video devices implement video compression techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, and ITU-T H.264 / MPEG-4 part 10 advanced video coding (AVC), video coding standard H.265 / high efficiency video coding (HEVC), and extensions to such standards. By implementing such video compression techniques, video devices may more efficiently transmit, receive, encode, decode, and / or store digital video information.

[0003] Video compression techniques are used to perform spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove inherent redundancy in a video sequence. In block-based video coding, a video slice (i.e., a video frame or a portion of a video frame) is divided into several picture blocks, which may also be referred to as treeblocks, coding units (CUs), and / or coding nodes. Picture blocks in an intra-coded (I) slice of a picture are coded through spatial prediction based on reference samples in neighboring blocks in the same picture. For picture blocks in an inter-coded (P or B) slice of a picture, spatial prediction based on reference samples in neighboring blocks in the same picture or temporal prediction based on reference samples in another reference picture may be used. A picture may be referred to as a frame, and a reference picture may be referred to as a reference picture.

[0004] Various video coding standards, including the HEVC standard, propose predictive coding modes to be used for picture blocks. Specifically, the current block to be coded is predicted based on coded video data blocks. In intra prediction modes, the current block is predicted based on one or more previously decoded neighboring blocks in the same picture as the current block. In inter prediction modes, the current block is predicted based on decoded blocks in a different picture.

[0005] In HEVC inter prediction, motion compensation is performed for all samples in a CU by using the same motion information to obtain the predicted values ​​of the samples in the CU. However, the samples in a CU do not necessarily have the same motion characteristics. Therefore, predicting all samples in a CU using the same motion information may reduce the accuracy of motion compensation and further increase the residual information.

[0006] To solve the above problems, an advanced temporal motion vector prediction (ATMVP) technique has been proposed in existing solutions.

[0007] The process of performing prediction using ATMVP technology mainly includes:

[0008] (1) Determine the offset vector of the current block to be processed.

[0009] (2) In the corresponding picture, determine a co-located sub-block of the to-be-processed sub-block based on the offset vector and the position of the to-be-processed sub-block within the current processed block.

[0010] (3) Determine the motion vector of the current to-be-processed sub-block based on the motion vector of the co-located sub-block.

[0011] (4) performing motion compensated prediction on the sub-block to be processed based on the motion vector of the sub-block to be processed to obtain predicted sample values ​​of the sub-block to be processed.

[0012] However, in the ATMVP technique, the range of the determined co-located sub-block in the corresponding picture is uncertain, and the motion information of the co-located sub-block needs to be frequently read from the corresponding picture, which results in an increased memory read bandwidth and an increased complexity of the prediction process. Summary of the Invention [Problem to be solved by the invention]

[0013] The present application provides a motion vector acquisition method and apparatus to reduce the amount of memory read time. [Means for solving the problem]

[0014] According to a first aspect, there is provided a motion vector acquisition method, the method including: determining a first value range and a second value range; determining a target offset vector of a block to be processed and identifier information of a target picture, the block to be processed including at least one sub-block to be processed; determining a co-located sub-block of the sub-block to be processed in the target picture based on a position of the sub-block to be processed and the target offset vector; and determining a motion vector of the sub-block to be processed based on the motion vector of the co-located sub-block.

[0015] The value of a component of the target offset vector in a first direction falls within a first range of values, the value of a component of the target offset vector in a second direction falls within a second range of values, and the first direction and the second direction are orthogonal to each other.

[0016] It should be understood that the at least one sub-block to be processed may be obtained by subdividing the block to be processed. Furthermore, if the block to be processed is a coding unit CU, the sub-block to be processed is a sub-CU obtained after a CU is divided.

[0017] Furthermore, a (picture) block in the target picture that corresponds to the block to be processed may be referred to as a corresponding block, the corresponding block including at least one co-located sub-block, and a target offset vector is used to determine the (location of) the corresponding block of the block to be processed in the target picture. Here, it should be understood that the target offset vector is different from a common motion vector, in which the target offset vector is used to determine the corresponding block. However, a motion vector is usually used to determine a prediction block of the picture block in order to obtain a predicted sample value of the picture block. Furthermore, the offset vector may be referred to as a temporal vector, and the target picture may be referred to as a corresponding picture.

[0018] The first value range and the second value range may be indicated using the same syntax element.

[0019] Specifically, the first value range includes a first threshold and a second threshold, and the second value range includes a third threshold and a fourth threshold. The first threshold may be obtained by parsing a syntax element. The second threshold, the third threshold, and the fourth threshold each have a certain multiplicative relationship (or another numerical relationship) with the first threshold. In this way, after the first threshold is obtained, the second threshold to the fourth threshold can be obtained based on the multiplicative relationship between the first threshold and each of the second threshold to the fourth threshold.

[0020] Optionally, the target picture identifier information is a picture order count POC of the target picture within the picture sequence.

[0021] It should be understood that POC is used to indicate the actual position of a picture in the original picture sequence. To distinguish it from the encoding order / decoding order, POC is sometimes also referred to as the display order or playback order.

[0022] Optionally, the identifier information of the target picture is index information or an index value of the target picture.

[0023] In the present application, since the component values ​​of the target offset vector are within a certain value range, the co-located sub-block of the sub-block to be processed, which is determined in the target picture based on the target offset vector, is also within the certain range of the target picture. Thus, by pre-reading the temporal motion vector field within the certain range of the target picture, the amount of memory bandwidth and memory read time can be reduced.

[0024] Referring to the first aspect, in some implementations of the first aspect, before determining the motion vector of the sub-block to be processed based on the motion vector of a co-located sub-block, the method further includes a step of: obtaining motion vectors of samples within a preset area in the target picture, the preset area being an area in which a co-located sub-block of the sub-block to be processed may appear.

[0025] In the present application, since the region in the target picture where the co-located sub-block appears is determined, the amount of time to read the motion vector from the target picture can be reduced by pre-obtaining the motion vector in the specific region in the target picture. In other words, the amount of memory read time is reduced. Furthermore, the memory bandwidth can be reduced because the motion vector in only the specific region in the target picture is obtained.

[0026] It should be understood that the first range of values ​​may be a range of values ​​including a first threshold and a second threshold, and the second range of values ​​may be a range of values ​​including a third threshold and a fourth threshold, where the first threshold is less than the second threshold and the third threshold is less than the fourth threshold.

[0027] Optionally, the first value range is one of (first threshold, second threshold), (first threshold, second threshold), [first threshold, second threshold), and [first threshold, second threshold].

[0028] Optionally, the second value range is one of (third threshold, fourth threshold), (third threshold, fourth threshold), [third threshold, fourth threshold), and [third threshold, fourth threshold].

[0029] In other words, each of the first value range and the second value range may be any one of an open range, a closed range, and a range that is open on one side and closed on the other side.

[0030] It should be understood that when the first value range is (first threshold, second threshold), the value of the component of the target offset vector in the first direction being within the first value range includes: the value of the component of the target offset vector in the first direction being greater than the first threshold and less than the second threshold.

[0031] When the first value range is [first threshold, second threshold], the value of the component of the target offset vector in the first direction being within the first value range includes: the value of the component of the target offset vector in the first direction being greater than or equal to the first threshold and less than or equal to the second threshold.

[0032] Referring to the first aspect, in some implementations of the first aspect, determining a target offset vector for the block to be processed includes: determining an initial offset vector for the block to be processed; determining the initial offset vector as the target offset vector if values ​​of components of the initial offset vector in a first direction are within a first value range and values ​​of components of the initial offset vector in a second direction are within a second value range; or performing clipping on parts of values ​​of components of the initial offset vector in the first direction that exceed the first value range and / or parts of values ​​of components of the initial offset vector in the second direction that exceed the second value range if values ​​of components of the initial offset vector in the first direction exceed the first value range and / or if values ​​of components of the initial offset vector in the second direction are outside the second value range; and determining the initial offset vector obtained after clipping as the target offset vector.

[0033] The values ​​of the components in the first and second directions of the initial offset vector obtained after clipping lie within a first value range and a second value range, respectively.

[0034] The values ​​of the components of the initial offset vector in the first direction and the second direction are restricted so that the values ​​of the components of the final target offset vector in the first direction and the second direction can be within a first value range and a second value range, respectively.

[0035] Optionally, the step of performing clipping on the parts of the values ​​of the components of the initial offset vector in the first direction that exceed the first value range and / or on the parts of the values ​​of the components of the initial offset vector in the second direction that exceed the second value range if the values ​​of the components of the initial offset vector in the first direction fall outside a first value range and / or if the values ​​of the components of the initial offset vector in the second direction fall outside a second value range and determining the initial offset vector obtained after clipping as said target offset vector comprises: if a value of a component of the initial offset vector in the first direction is within a first value range and a value of a component of the initial offset vector in the second direction is outside a second value range, performing clipping on the component of the initial offset vector in the second direction that is outside the second value range, and determining the initial offset vector obtained after clipping as said target offset vector; or if a value of a component of the initial offset vector in the first direction exceeds a first value range and a value of a component of the initial offset vector in the second direction falls within a second value range, performing clipping on a part of the component of the initial offset vector in the first direction that exceeds the first value range, and determining the initial offset vector obtained after clipping as said target offset vector; or When a value of a component of an initial offset vector in a first direction exceeds a first value range and a value of a component of an initial offset vector in a second direction exceeds a second value range, performing clipping on a portion of the component of the initial offset vector in the first direction that exceeds the first value range, performing clipping on a portion of the component of the initial offset vector in the second direction that exceeds the second value range, and determining the initial offset vector obtained after clipping as the target offset vector.

[0036] It should be understood that if the value of a component of the initial offset vector in a certain direction exceeds the maximum value in that direction, clipping actually means truncating the part of the component value that exceeds the maximum value so that the resulting component value after truncation is less than or equal to the maximum value. If the value of a component of the initial offset vector in a certain direction is less than the minimum value in that direction, clipping actually means compensating the component value, i.e. increasing it so that the resulting component value after compensation is greater than or equal to the minimum value.

[0037] Referring to the first aspect, in some implementations of the first aspect, determining an initial offset vector of a block to be processed includes: determining a motion vector of a pre-defined spatial neighboring block of the block to be processed as the initial offset vector.

[0038] Optionally, determining a motion vector of a pre-defined spatial neighbouring block of the block to be processed as the initial offset vector comprises: determining a motion vector of a first available spatial neighbouring block in a pre-defined order as the initial offset vector.

[0039] Since the motion vector of the first available spatial neighboring block is directly determined as the initial offset vector, the process of determining the initial offset vector is simplified.

[0040] Referring to the first aspect, in some implementations of the first aspect, determining a target offset vector for a block to be processed includes: determining a target spatial neighboring block in a preset spatial neighborhood of the block to be processed, where a value of a component of a motion vector of the target spatial neighboring block in a first direction falls within a first value range and a value of a component of a motion vector of the target spatial neighboring block in a second direction falls within a second value range; and using the motion vector of the target spatial neighboring block as the target offset vector.

[0041] Since the motion vectors of the spatially neighboring blocks whose component values ​​fall within the first value range and the second value range are directly determined as the target offset vector, the process of determining the target offset vector can be simplified.

[0042] Referring to the first aspect, in some implementations of the first aspect, determining the first value range and the second value range includes: determining the first value range and the second value range based on: a position and a size of the block to be processed, a position and a size of a coding tree unit (CTU) in which the block to be processed is located, and a pre-configured extension range of a temporal motion vector field of the CTU.

[0043] Optionally, determining the first value range based on the position and size of the block to be processed, the position and size of the coding tree unit CTU in which the block to be processed is located, and a preset extension range of a temporal motion vector field of the CTU includes: determining a first threshold and a second threshold based on the position and size of the block to be processed, the position and size of the coding tree unit CTU in which the block to be processed is located, and a preset extension range of a temporal motion vector field of the CTU, where the first threshold is the minimum value available for the component of the target offset vector in a first direction, and the second threshold is the maximum value available for the component of the target offset vector in the first direction; and obtaining the first value range based on the first threshold and the second threshold.

[0044] Optionally, determining the second value range based on the position and size of the block to be processed, the position and size of the coding tree unit CTU in which the block to be processed is located, and a preset extension range of a temporal motion vector field of the CTU includes: determining a third threshold and a fourth threshold based on the position and size of the block to be processed, the position and size of the coding tree unit CTU in which the block to be processed is located, and a preset extension range of a temporal motion vector field of the CTU, where the third threshold is the minimum value available for the component of the target offset vector in the second direction, and the fourth threshold is the maximum value available for the component of the target offset vector in the second direction; and obtaining the second value range based on the third threshold and the fourth threshold.

[0045] Referring to the first aspect, in some implementations of the first aspect, the extended range of the temporal motion vector field of the CTU includes an extended range of the temporal motion vector field of the CTU in a first direction and a second direction.

[0046] Optionally, the first direction is a horizontal direction and the second direction is a vertical direction.

[0047] Optionally, when the first direction is horizontal and the second direction is vertical, the extended range of the temporal motion vector field of the CTU includes an extended range of the temporal motion vector field of the CTU in the upward, downward, leftward, and rightward directions.

[0048] Referring to the first aspect, in some implementations of the first aspect, information regarding the extended range of the temporal motion vector field of the CTU is carried in at least one of a sequence parameter set SPS, a picture parameter set PPS, and a header field.

[0049] Optionally, the extension range of the temporal motion vector field of the CTU is preset.

[0050] Referring to the first aspect, in some implementations of the first aspect, determining the motion vector of the sub-block to be processed based on the motion vector of the co-located sub-block includes: scaling the motion vector of the co-located sub-block based on a picture order count POC of the picture including the sub-block to be processed, a POC of a target reference picture of the picture including the sub-block to be processed, a POC of the target picture, and a POC of a target reference picture of the target picture to obtain the motion vector of the sub-block to be processed.

[0051] Optionally, scaling the motion vector of the co-located sub-block to obtain the motion vector of the sub-block to be processed based on the picture order count POC of the picture containing the sub-block to be processed, the POC of the target reference picture of the picture containing the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture includes: determining a difference between the picture order count POC of the picture containing the sub-block to be processed and the POC of the target reference picture of the picture containing the sub-block to be processed as a first difference; determining a difference between the POC of the target picture and the POC of the target reference picture of the target picture as a second difference; and scaling the motion vector of the co-located sub-block based on a ratio of the first difference to the second difference to obtain the motion vector of the sub-block to be processed.

[0052] Optionally, scaling the motion vector of the co-located sub-block based on a ratio of the first difference to the second difference to obtain the motion vector of the sub-block to be processed includes: determining the ratio of the first difference to the second difference as a first ratio; and determining the product of the first ratio and the motion vector of the co-located sub-block as the motion vector of the sub-block to be processed.

[0053] Referring to the first aspect, in some implementations of the first aspect, the motion vector of the sub-block to be processed is obtained according to the following formula:

number

[0054] where P1 represents the POC of the picture containing the sub-block to be processed, P2 represents the POC of the target reference picture of the picture containing the sub-block to be processed, P3 represents the POC of the target picture, P4 represents the POC of the target reference picture of the target picture, MV represents the motion vector of the co-located sub-block, and MV s represents the motion vector of the sub-block to be processed.

[0055] Optionally, MV is a horizontal motion vector MV x and the vertical motion vector MV y Then, through calculation according to the above formula, the horizontal motion vector MV sx and the vertical motion vector MV sy are obtained separately.

[0056] According to a second aspect, there is provided a motion vector acquisition method, comprising the steps of: determining a target offset vector of a block to be processed and identifier information of a target picture, the block to be processed including at least one sub-block to be processed; determining an initial position of a co-located sub-block of the sub-block to be processed in the target picture based on a position of the sub-block to be processed and the target offset vector; determining the initial position as a target position when the initial position is within a preset area of ​​the target picture; or determining a position in the preset area closest to the initial position as a target position when the initial position is outside the preset area; and determining a motion vector of the sub-block to be processed based on the motion vector corresponding to the target position.

[0057] It should be understood that the block to be processed may include the at least one sub-block to be processed, and obtaining a motion vector of the block to be processed may be decomposed into obtaining a motion vector of each sub-block to be processed. Furthermore, the block to be processed may be a CU, and the sub-block to be processed is a sub-CU.

[0058] A block in the destination picture that corresponds to the block to be processed may be referred to as a corresponding block, where the corresponding block includes at least one co-located sub-block, and the destination offset vector is used to determine the (location of) the corresponding block of the block to be processed in the destination picture.

[0059] It should be understood that the target offset vector is different from a common motion vector, where the target offset vector is used to determine the corresponding block. However, typically, the motion vector is used to determine the prediction block of a picture block to obtain the predicted sample value of the picture block. Furthermore, the offset vector may also be referred to as a temporal vector, and the target picture may also be referred to as the corresponding picture.

[0060] It should be understood that the corresponding position is relative to a preset area. If a single point is used as the basic unit of the preset area, the corresponding position also exists in the form of a single point. If a point set is used as the basic unit of the preset area, the corresponding position also exists in the form of a point set. Correspondingly, the distance between a position in the preset area and the corresponding position is the distance between a single point in the preset area and the corresponding position, or the distance between a point set in the preset area and the point set of the corresponding position.

[0061] In this application, a target position within a preset area is found based on the initial position and the preset area of ​​the target picture, and then a motion vector of the subblock to be processed is determined based on the motion vector within a specific range of the target picture. Thus, by pre-reading the temporal motion vector field within a specific range of the target picture, the amount of memory bandwidth and memory read time can be reduced.

[0062] Optionally, before determining the motion vector of the sub-block to be processed based on the motion vector of the co-located sub-block, the method further comprises the step of: obtaining motion vectors of samples within a preset area in the target picture, where the preset area is an area in which a co-located sub-block of the sub-block to be processed may appear.

[0063] In the present application, since the region in the target picture where the co-located sub-block appears is determined, the amount of time to read the motion vector from the target picture can be reduced by pre-obtaining the motion vector in the specific region in the target picture, in other words, the amount of memory read time is reduced, and the memory bandwidth can be reduced because the motion vector in only the specific region in the target picture is obtained.

[0064] Referring to the second aspect, in some implementations of the second aspect, the preset region is determined based on the position and size of a coding tree unit (CTU) in which the block to be processed is located, the size of the target picture, and a preset extension range of a temporal motion vector field of the CTU.

[0065] Optionally, the preset region may be represented using a range of horizontal and vertical coordinate values.

[0066] With reference to the second aspect, in some implementations of the second aspect, the extended range of the temporal motion vector field of the CTU includes an extended range of the temporal motion vector field of the CTU in a first direction and in a second direction.

[0067] Optionally, the first direction is a horizontal direction and the second direction is a vertical direction.

[0068] Optionally, when the first direction is horizontal and the second direction is vertical, the extended range of the temporal motion vector field of the CTU includes an extended range of the temporal motion vector field of the CTU in the upward, downward, leftward, and rightward directions.

[0069] With reference to the second aspect, in some implementations of the second aspect, information regarding the extended range of the temporal motion vector field of the CTU is carried in at least one of a sequence parameter set SPS, a picture parameter set PPS, and a header field.

[0070] Optionally, the extension range of the temporal motion vector field of the CTU is preset.

[0071] Referring to the second aspect, in some implementations of the second aspect, determining a motion vector for a sub-block to be processed based on a motion vector corresponding to a target position includes: scaling the motion vector corresponding to the target position based on a picture order count POC of the picture including the sub-block to be processed, a POC of a target reference picture of the picture including the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture to obtain a motion vector for the sub-block to be processed.

[0072] Optionally, scaling the motion vector corresponding to the target position to obtain the motion vector of the sub-block to be processed based on the picture order count POC of the picture containing the sub-block to be processed, the POC of the target reference picture of the picture containing the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture includes: determining a difference between the picture order count POC of the picture containing the sub-block to be processed and the POC of the target reference picture of the picture containing the sub-block to be processed as a third difference; determining a difference between the POC of the target picture and the POC of the target reference picture of the target picture as a fourth difference; and scaling the motion vector of the co-located sub-block based on a ratio of the third difference to the fourth difference to obtain the motion vector of the sub-block to be processed.

[0073] Optionally, scaling the motion vector of the co-located sub-block based on a ratio of the third difference to the fourth difference to obtain the motion vector of the sub-block to be processed includes: determining the ratio of the third difference to the fourth difference as the second ratio; and determining a product of the second ratio and the motion vector of the co-located sub-block as the motion vector of the sub-block to be processed.

[0074] Referring to the second aspect, in some implementations of the second aspect, the motion vector of the sub-block to be processed is obtained according to the following formula:

number

[0075] where P1 represents the POC of the picture containing the sub-block to be processed, P2 represents the POC of the target reference picture of the picture containing the sub-block to be processed, P3 represents the POC of the target picture, P4 represents the POC of the target reference picture of the target picture, MV represents a motion vector corresponding to the target position, and MV s represents the motion vector of the sub-block to be processed.

[0076] Optionally, MV is a horizontal motion vector MV x and the vertical motion vector MV y The horizontal motion vector MV sx and the vertical motion vector MV sy are obtained separately through calculation according to the above formula.

[0077] According to a third aspect, there is provided a motion vector acquisition device, the device comprising modules configured to perform the method according to any implementation of the first or second aspect.

[0078] According to a fourth aspect, there is provided a motion vector acquisition device including a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to perform some or all of the steps of the above method in any implementation of the first or second aspect.

[0079] According to a fifth aspect, there is provided a computer readable storage medium having stored thereon program code, the program code including instructions used to perform some or all of the steps of the above-described method in any implementation of the first or second aspect.

[0080] According to a sixth aspect, there is provided a computer program product which, when run on a computer, enables the computer to carry out instructions for some or all of the steps of the above-described method in any implementation of the first or second aspect. [Brief description of the drawings]

[0081] [Figure 1] Schematic diagram of the video encoding process.

[0082] [Diagram 2] Schematic diagram of the video decoding process.

[0083] [Diagram 3] 1 is a schematic flowchart of a motion vector acquisition method according to an embodiment of the present application;

[0084] [Figure 4] FIG. 2 is a schematic diagram of neighbouring blocks of a block to be processed;

[0085] [Diagram 5] 2 is a schematic diagram of a sub-block to be processed in a current picture and a co-located sub-block in a target picture;

[0086] [Figure 6] 4 is a schematic diagram of motion vectors of a sub-block to be processed and of co-located sub-blocks; FIG.

[0087] [Figure 7]FIG. 13 is a schematic diagram of the extended range of the temporal motion vector field of the CTU.

[0088] [Figure 8] FIG. 11 is a schematic diagram of the extended range of the temporal motion vector field for the current CTU and the left CTU.

[0089] [Figure 9] 1 is a schematic flowchart of a motion vector acquisition method according to an embodiment of the present application;

[0090] [Figure 10] FIG. 4 is a schematic diagram of the determination of the initial position of a sub-block to be processed;

[0091] [Figure 11] FIG. 2 is a schematic diagram of determining a target position.

[0092] [Figure 12] 4 is a schematic diagram of the motion vectors of the sub-block to be processed and the motion vectors of the target positions;

[0093] [Figure 13] 2 is a flowchart of a motion vector acquisition method according to an embodiment of the present application;

[0094] [Figure 14] 2 is a flowchart of a motion vector acquisition method according to an embodiment of the present application;

[0095] [Figure 15] 2 is a flowchart of a motion vector acquisition method according to an embodiment of the present application;

[0096] [Figure 16] FIG. 2 is a schematic diagram of the determination of co-located sub-blocks of a sub-block to be processed in the existing solution;

[0097] [Figure 17]FIG. 2 is a schematic diagram of the determination of co-located sub-blocks of a sub-block to be processed according to the present application;

[0098] [Figure 18] 13 illustrates a candidate information list construction process in an existing merge mode.

[0099] [Figure 19] 1 shows the candidate information list construction process in merge mode in which SMVP technology is applied.

[0100] [Figure 20] 1 is a schematic block diagram of a motion vector acquisition device according to an embodiment of the present application;

[0101] [Figure 21] 1 is a schematic block diagram of a motion vector acquisition device according to an embodiment of the present application;

[0102] [Figure 22] 1 is a schematic block diagram of a video encoder according to an embodiment of the present application;

[0103] [Figure 23] 1 is a schematic block diagram of a video decoder according to an embodiment of the present application;

[0104] [Figure 24] 1 is a schematic block diagram of a video transmission system according to an embodiment of the present application;

[0105] [Diagram 25] 1 is a schematic block diagram of a video encoding and decoding device according to an embodiment of the present application;

[0106] [Figure 26] 1 is a schematic block diagram of a video encoding and decoding system according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0107] The following describes the technical solutions of the present application with reference to the accompanying drawings.

[0108] In order to better understand the process of the motion vector acquisition method in the embodiment of the present application, the following first briefly describes the entire video encoding and decoding process with reference to FIG. 1 and FIG.

[0109] Figure 1 is a schematic diagram of the video encoding process.

[0110] As shown in Fig. 1, the current frame F n When prediction is performed on a picture block in the current frame F, either intra prediction or inter prediction can be performed. n For example, the current frame F n Intra prediction is used if F is an I-frame; otherwise, the current frame F n If F is a P-frame or a B-frame, inter prediction is used. If intra prediction is used, the sample values ​​of the samples in the current picture block are calculated based on the sample values ​​of the current frame F. n If inter prediction is used, the sample values ​​of the samples in the current picture block may be predicted by using the sample values ​​of the samples in the reconstructed region of the reference picture F'. n-1 The current picture block may be predicted by using the sample values ​​of samples in the reference block that match the current picture block.

[0111] After the prediction block of the current picture block is obtained through inter prediction or intra prediction, the difference between the sample values ​​of the samples in the current picture block and the sample values ​​of the samples in the prediction block is calculated to obtain residual information, which is then transformed, quantized, and entropy coded to obtain an encoded bitstream. In addition, in the encoding process, n and the residual information of the current frame F n A further registration needs to be performed on the predicted information of F, and a filtering operation is performed to obtain the reconstructed frame F' of the current frame. n The reconstructed frame F' is obtained. n is used as a reference picture for the subsequent encoding.

[0112] Figure 2 is a schematic diagram of the video decoding process.

[0113] The video decoding process shown in FIG. 2 is equivalent to the inverse process of the video encoding process shown in FIG. 1. During decoding, entropy decoding, dequantization, and inverse transform are performed to obtain residual information, and whether intra prediction or inter prediction is performed for the current picture block is determined based on the decoded bitstream. If intra prediction is performed, the sample values ​​of the samples in the reconstructed area in the current frame are used to construct the predicted information according to the intra prediction method. If inter prediction is performed, motion information needs to be obtained through parsing, and based on the motion information obtained through parsing, a reference block in the reconstructed picture is determined, and the sample values ​​of the samples in the reference block are used as predicted information, and then overlapping is performed on the predicted information and the residual information, and a filtering operation is performed to obtain the reconstructed information.

[0114] The motion vector acquisition method in the embodiment of the present application can be applied to both the encoding process and the decoding process. In other words, both the encoder side and the decoder side may execute the motion vector acquisition method in the embodiment of the present application. Specifically, the motion vector acquisition method in the embodiment of the present application can be applied to the inter prediction process shown in FIG. 1 and FIG. 2.

[0115] In HEVC, there are two inter prediction modes: advanced motion vector prediction (AMVP) mode and merge mode. The motion vector acquisition method in the embodiment of the present application may be applied to the merge mode of inter prediction.

[0116] 3 is a schematic flowchart of a motion vector acquisition method according to an embodiment of the present application. The method shown in FIG. 3 can be performed by a video encoding and decoding device, a video codec, a video encoding and decoding system, and other devices having video encoding and decoding functions.

[0117] 3 includes steps 110 to 140. The following describes steps 110 to 140 in detail.

[0118] 110: Determine a first range of values ​​and a second range of values.

[0119] Optionally, the first value range is a value range including a first threshold and a second threshold, and the second value range is a value range including a third threshold and a fourth threshold, the first threshold being smaller than the second threshold and the third threshold being smaller than the fourth threshold.

[0120] It should be understood that the first range of values ​​and the second range of values ​​may each be any one of an open range, a closed range, and a one-sided open and one-sided closed range.

[0121] A specific expression format of the first value range may be (first threshold, second threshold), (first threshold, second threshold], or [first threshold, second threshold].

[0122] A specific expression format of the second value range may be (third threshold, fourth threshold), (third threshold, fourth threshold], or [third threshold, fourth threshold].

[0123] 120: Determine the target offset vector of the block to be processed and the target picture identifier information.

[0124] The block to be processed includes at least one sub-block to be processed, the values ​​of the components of the target offset vector in a first direction are within a first value range, the values ​​of the components of the target offset vector in a second direction are within a second value range, and the first direction and the second direction are orthogonal to each other.

[0125] A (picture) block in the destination picture that corresponds to the block to be processed may be referred to as a corresponding block, the corresponding block including at least one co-located sub-block, and a target offset vector is used to determine the (location of) the corresponding block of the block to be processed in the destination picture. The target offset vector is different from the common motion vector. The target offset vector is used to determine the corresponding block. However, the motion vector is usually used to determine a prediction block of the picture block to obtain predicted sample values ​​of the picture block. Furthermore, the offset vector may also be referred to as a temporal vector, and the destination picture may also be referred to as a corresponding picture.

[0126] The identifier information of the target picture may in particular be a picture order count (POC) of a picture frame in a picture sequence, or may be index information or an index value of the target picture.

[0127] It should be understood that POC is used to indicate the actual position of a picture in the original picture sequence. To distinguish it from the encoding order / decoding order, POC is sometimes also referred to as the display order or playback order.

[0128] It should be understood that the at least one sub-block to be processed may be obtained by dividing the block to be processed, and the at least one sub-block to be processed may form the block to be processed. If the block to be processed is a CU, the CU may include at least one sub-CU. Furthermore, the first direction and the second direction may be horizontal and vertical, respectively.

[0129] When there is a change in the form of the first value range, there are the following specific forms in which the values ​​of the components of the target offset vector in the first direction fall within the first value range:

[0130] (1) When the first value range is (first threshold, second threshold), the value of the component of the target offset vector in the first direction is greater than the first threshold and less than the second threshold.

[0131] (2) When the first value range is (first threshold, second threshold) the value of the component of the target offset vector in the first direction is greater than the first threshold and less than or equal to the second threshold.

[0132] (3) When the first value range is [first threshold, second threshold], the value of the component of the target offset vector in the first direction is greater than or equal to the first threshold and less than or equal to the second threshold.

[0133] Similarly, when there is a change in the form of the second value range, there are the following specific forms in which the values ​​of the components of the target offset vector in the second direction fall within the second value range:

[0134] (4) When the second value range is (third threshold, fourth threshold), the value of the component of the target offset vector in the second direction is greater than the third threshold and less than the fourth threshold.

[0135] (5) When the second value range is (third threshold, fourth threshold) [, the value of the component of the target offset vector in the second direction is greater than the third threshold and less than or equal to the fourth threshold.

[0136] (6) When the second value range is [third threshold, fourth threshold], the value of the component of the target offset vector in the second direction is greater than or equal to the third threshold and less than or equal to the fourth threshold.

[0137] In step 120, the target offset vector can be determined in several ways. Specifically, an initial offset vector (which can also be referred to as a starting offset vector) may be determined first, and then the values ​​of the components of the initial offset vector in the first direction and the second direction are limited to a first value range and a second value range, respectively, to obtain a final target offset vector. Alternatively, a motion vector whose component values ​​in the first direction and the second direction fall within the first value range and the second value range, respectively, may be directly selected as the target offset vector from a plurality of motion vectors. The following will describe these two ways of determining the target offset vector in detail.

[0138] A first aspect includes determining an initial offset vector and limiting values ​​of components of the initial offset vector in a first direction and a second direction to obtain a target offset vector.

[0139] Specifically, in the first aspect, the determination of the target offset vector includes steps 1201 to 1203. The following describes steps 1201 to 1203 in detail.

[0140] 1201: Determine the initial offset vector of the block to be processed.

[0141] Optionally, the motion vectors of predefined spatial neighboring blocks of the block to be processed are determined as initial offset vectors.

[0142] Specifically, the motion vector of the first available obtained preset spatial neighboring block in a particular order may be determined as the initial offset vector.

[0143] For example, as shown in Figure 4, A0, A1, B0, B1, and B2 are spatial neighboring blocks of the block to be processed, T is a temporal neighboring block of the block to be processed, and C is a picture block in the reference picture of the block to be processed and in the same position as the block to be processed. When the initial offset vector of the block to be processed is determined, the motion vector of the first available found neighboring blocks in the order of A1, B1, B0, and A0 may be determined as the initial offset vector.

[0144] Since the motion vector of the first available spatial neighboring block is directly determined as the initial offset vector, the process of determining the initial offset vector is simplified.

[0145] 1202: If the value of a component of an initial offset vector in a first direction falls within a first value range and the value of a component of an initial offset vector in a second direction falls within a second value range, the initial offset vector is determined as a target offset vector.

[0146] For example, when the first value range is (first threshold, second threshold) and the second value range is (third threshold, fourth threshold), if the value of a component of the initial offset vector in the first direction is greater than the first threshold and less than the second threshold, and the value of a component of the initial offset vector in the second direction is greater than the third threshold and less than the fourth threshold, the initial offset vector may be directly determined as the target offset vector.

[0147] 1203: If the value of a component of the initial offset vector in the first direction is outside a first value range and / or the value of a component of the initial offset vector in the second direction is outside a second value range, clipping is performed on the portion of the value of the component of the initial offset vector in the first direction that exceeds the first value range and / or the portion of the value of the component of the initial offset vector in the second direction that exceeds the second value range, and the initial offset vector obtained after clipping is determined as a target offset vector.

[0148] The values ​​of the components in the first and second directions of the initial offset vector obtained after clipping in step 1203 fall within a first value range and a second value range, respectively.

[0149] Specifically, when the value of a component of the initial offset vector in a first direction is outside a first value range, and / or when the value of a component of the initial offset vector in a second direction is outside a second value range, the processing for the initial offset vector includes case 1 to case 3. The following describes the three cases in detail.

[0150] Case 1:

[0151] If the value of a component of the initial offset vector in the first direction is within a first value range and the value of the component of the initial offset vector in the second direction exceeds a second value range, clipping is performed on the part of the component of the initial offset vector in the second direction that exceeds the second value range, and the initial offset vector obtained after clipping is determined as the target offset vector.

[0152] For example, the first value range is [first threshold, second threshold], the second value range is [third threshold, fourth threshold], and the components of the initial offset vector in the first and second directions are the first and second components. The first component is smaller than the second threshold and larger than the first threshold, and the second component is larger than the fourth threshold. In this case, the second component of the initial offset vector is outside the value range limited by [third threshold, fourth threshold], and clipping (which may alternatively be referred to as truncation) needs to be performed on the part of the value of the second component that exceeds the fourth threshold, such that the second component obtained after clipping is greater than or equal to the third threshold and less than or equal to the fourth threshold.

[0153] Case 2:

[0154] If the value of a component of the initial offset vector in the first direction exceeds a first value range and the value of a component of the initial offset vector in the second direction falls within a second value range, clipping is performed on the part of the component of the initial offset vector in the first direction that exceeds the first value range, and the initial offset vector obtained after clipping is determined as the target offset vector.

[0155] For example, the first value range is [first threshold, second threshold], the second value range is [third threshold, fourth threshold], and the components of the initial offset vector in the first and second directions are the first and second components. The second component is greater than the third threshold and less than the fourth threshold, and the first component is less than the first threshold. In this case, the first component of the initial offset vector is outside the value range limited by [first threshold, second threshold], and the value of the first component needs to be clipped to be within the value range limited by [first threshold, second threshold]. That is, the difference between the first threshold and the first component needs to be added to the first component so that the first component obtained after clipping falls within the first value range.

[0156] Case 3:

[0157] If the value of a component of the initial offset vector in the first direction exceeds a first value range and the value of a component of the initial offset vector in the second direction exceeds a second value range, clipping is performed on the portion of the component of the initial offset vector in the first direction that exceeds the first value range, clipping is performed on the portion of the component of the initial offset vector in the second direction that exceeds the second value range, and the initial offset vector obtained after clipping is determined as the target offset vector.

[0158] For example, the first value range is [first threshold, second threshold], the second value range is [third threshold, fourth threshold], and the components of the initial offset vector in the first and second directions are the first and second components. The first component is greater than the second threshold and the second component is greater than the fourth threshold. In this case, the first component of the initial offset vector is outside the value range limited by [first threshold, second threshold] and the second component of the initial offset vector is outside the value range limited by [third threshold, fourth threshold], and clipping needs to be performed on the part of the value of the first component that exceeds the second threshold and clipping needs to be performed on the part of the value of the second component that exceeds the fourth threshold, so that the value of the first component obtained after clipping falls within the range of [first threshold, second threshold] and the value of the second component obtained after clipping falls within the range of [third threshold, fourth threshold].

[0159] The second aspect includes: determining as a target offset vector a motion vector of a spatially neighboring block of the block to be processed, the motion vector having component values ​​in a first direction and a second direction satisfying a certain requirement.

[0160] Specifically, in the second embodiment, the determination of the target offset vector includes steps 1204 and 1205. The following describes steps 1204 and 1205 in detail.

[0161] 1204: Determine a destination spatial neighboring block among preset spatial neighboring blocks of the block to be processed, where a value of a component of a motion vector of the destination spatial neighboring block in a first direction falls within a first value range and a value of a component of a motion vector of the destination spatial neighboring block in a second direction falls within a second value range.

[0162] Specifically, in step 1204, the motion vectors of spatially neighboring blocks of the block to be processed may be obtained in a specific order, and then it is determined whether the component values ​​of the motion vectors of the spatially neighboring blocks in the first direction and the second direction fall within the first value range and the second value range, respectively, and the motion vector whose component values ​​in the first direction and the second direction fall within the first value range and the second value range, respectively, is determined as the target offset vector.

[0163] 1205: The motion vector of the target spatial neighboring block is used as the target offset vector.

[0164] For example, as shown in FIG. 4, the motion vector of the first available neighboring block may be found in the order of A1, B1, B0, A0. Then, it is determined whether the component values ​​of the motion vector meet a certain requirement, which is that the component values ​​of the first direction and the second direction are respectively in the first value range and the second value range. If the motion vector meets the requirement, the motion vector is determined as the target offset vector. If the motion vector does not meet the requirement, the motion vector of the next available neighboring block is continued to be searched in the order of A1, B1, B0, A0. Then, it is determined whether the requirement is met until a motion vector that meets the requirement is found.

[0165] It should be understood that the target offset vector used in step 120 may instead be a zero offset vector, in which case the picture block in the target picture that is in the same location as the block to be processed is the corresponding block of the block to be processed in the target picture.

[0166] Furthermore, if no target offset vector is found that satisfies the requirements, the ATMVP technique may be used instead, but a different technique is used to obtain the motion vector for the sub-block to be processed.

[0167] 130: Determine a co-located sub-block of the sub-block to be processed in the target picture based on the position of the sub-block to be processed and the target offset vector.

[0168] Since the target offset vector points to a corresponding block in the target picture of the block to be processed, first the corresponding block is obtained based on the offset vector, and then based on the position of the sub-block to be processed, a co-located sub-block having a certain relative positional relationship with the sub-block to be processed may be determined in the target picture (this may be understood as a co-located sub-block having the relative positional relationship with the sub-block to be processed being determined in the corresponding block).

[0169] When a co-located sub-block having the relative positional relationship with the sub-block to be processed is determined within the corresponding block, a sub-block that is within the corresponding block and has the same relative position as the relative position of the sub-block to be processed may be determined as the co-located sub-block of the sub-block to be processed.

[0170] For example, as shown in FIG. 5, the current picture includes a block to be processed, and the block to be processed includes four sub-blocks. A corresponding block in the target picture that corresponds to the block to be processed may be obtained based on the position of the block to be processed and the offset vector of the block to be processed. The corresponding block also includes four sub-blocks. The sub-block to be processed is located at the upper left corner of the block to be processed. In this case, when the co-located sub-block of the sub-block to be processed is determined, the upper left sub-block of the corresponding block may be determined as the co-located sub-block of the sub-block to be processed.

[0171] 140: Determine the motion vector of the sub-block to be processed based on the motion vector of the co-located sub-block.

[0172] In this application, since the component values ​​of the target offset vector fall within a certain value range, the sub-blocks to be processed that are determined in the target picture based on the target offset vector also fall within the certain range of the target picture. Thus, by pre-reading the temporal motion vector field within the certain range of the target picture, the amount of memory bandwidth and memory read time can be reduced.

[0173] Optionally, before step 140, the method shown in FIG. 3 further includes the step of: obtaining motion vectors of samples within a preset area in the target picture, where the preset area is an area in which co-located sub-blocks of the sub-block to be processed may appear.

[0174] In the present application, since the area where the co-located sub-block appears in the target picture is determined, the amount of time to read the motion vector from the target picture can be reduced by pre-obtaining the motion vector in the specific area in the target picture. In other words, the amount of memory read time is reduced. Furthermore, the memory bandwidth can be reduced because the motion vector in only the specific area in the target picture is obtained.

[0175] After the motion vector of the co-located sub-block is obtained, the motion vector of the sub-block to be processed may be obtained by scaling the motion vector of the co-located sub-block.

[0176] Specifically, determining the motion vector of the sub-block to be processed based on the motion vector of the co-located sub-block includes: scaling the motion vector of the co-located sub-block based on the picture order count (POC) of the picture including the sub-block to be processed, the POC of the target reference picture of the picture including the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture to obtain the motion vector of the sub-block to be processed.

[0177] For example, as shown in Figure 6, the picture containing the sub-block to be processed is picture frame 1, the target reference picture of picture frame 1 is picture frame 2, the picture frame in which the target picture is located is picture frame 3, the target reference picture of picture frame 3 is picture frame 4, and the motion vector of the co-located sub-block is MV. In this case, the MV may be scaled based on the POC of picture frame 1 to picture frame 4 to obtain the motion vector of the sub-block to be processed.

[0178] Optionally, scaling the motion vector of the co-located sub-block to obtain the motion vector of the sub-block to be processed based on the POC of the picture including the sub-block to be processed, the POC of the target reference picture of the picture including the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture includes: determining a difference between the POC of the picture including the sub-block to be processed and the POC of the target reference picture of the picture including the sub-block to be processed as a first difference; determining a difference between the POC of the target picture and the POC of the target reference picture of the target picture as a second difference; and scaling the motion vector of the co-located sub-block based on a ratio of the first difference to the second difference to obtain the motion vector of the sub-block to be processed.

[0179] When the motion vector of the co-located sub-block is scaled based on the ratio of the first difference to the second difference to obtain the motion vector of the sub-block to be processed, specifically, the ratio of the first difference to the second difference may be first calculated to obtain a first ratio, and then the product of the first ratio and the motion vector of the co-located sub-block is determined as the motion vector of the sub-block to be processed.

[0180] Specifically, Fig. 6 is still used as an example. The motion vector of the sub-block to be processed may be calculated according to formula (1):

number

[0181] Here, MV s is the motion vector of the sub-block to be processed, MV is the motion vector of the co-located sub-block, P1~P4 are POC of picture frame 1 to picture frame 4, P1-P2 represents the first difference, and P3-P4 represents the second difference.

[0182] Optionally, in an embodiment, determining the first value range and the second value range includes: determining the first value range and the second value range based on a position and a size of the block to be processed, a position and a size of a coding tree unit (CTU) in which the block to be processed is located, and a pre-configured extension range of a temporal motion vector field of the CTU.

[0183] It should be understood that the first and second value ranges may be determined by determining the maximum and minimum values ​​available for the target offset vector in the first and second directions, respectively. Below is provided a detailed description of determining the first and second value ranges in this manner.

[0184] Specifically, the determination of the first value range and the second value range includes the following process.

[0185] (1) determining a first threshold and a second threshold based on a position and a size of the block to be processed, a position and a size of a coding tree unit (CTU) in which the block to be processed is located, and a preset extension range of a temporal motion vector field of the CTU;

[0186] (2) determining a third threshold and a fourth threshold based on a position and a size of the block to be processed, a position and a size of a coding tree unit (CTU) in which the block to be processed is located, and a preset extension range of a temporal motion vector field of the CTU;

[0187] (3) Obtaining a first range of values ​​based on the first threshold and the second threshold.

[0188] (4) Obtain a second range of values ​​based on the third and fourth thresholds.

[0189] The first threshold is the minimum value available for the component of the target offset vector in the first direction, the second threshold is the maximum value available for the component of the target offset vector in the first direction, the third threshold is the minimum value available for the component of the target offset vector in the second direction, and the fourth threshold is the maximum value available for the component of the target offset vector in the second direction.

[0190] Optionally, in an embodiment, the extended range of the temporal motion vector field of the CTU includes an extended range of the temporal motion vector field of the CTU in a first direction and in a second direction.

[0191] The first direction and the second direction are two directions that are perpendicular to each other.

[0192] Optionally, the first direction may be horizontal and the second direction may be vertical.

[0193] It should be understood that if the first direction is horizontal and the second direction is vertical, the extended range of the temporal motion vector field of the CTU includes extended values ​​of the temporal motion vector field of the CTU in the upward, downward, leftward and rightward directions.

[0194] For example, as shown in Figure 7, the area surrounded by the rectangle in which the CTU is located and the dashed line is the extension range of the temporal motion vector field of the CTU, and the extension values ​​of the temporal motion vector field of the CTU in the upward, downward, leftward, and rightward directions are U, B, L, and R, respectively.

[0195] If U, B, L, and R are all 0, it indicates that the extension value of the CTU in each direction is 0. In this case, the temporal motion vector field of the current CTU is constrained to the temporal motion vector field of the CTU at the corresponding position.

[0196] If U and B are zero and L or R is not zero, the temporal motion vector field obtained by the current CTU cannot cross the top or bottom boundary of the CTU, but can cross the left and right boundaries of the CTU. As shown in Figure 8, the MVF of the current CTU and the MVF of the left CTU can extend to the left and right, but not above or below. The temporal motion vector field of the current CTU and the temporal motion vector field of the left CTU partially overlap. In this case, when the current CTU is processed, the temporal motion vector field read by the CTU to the left of the current CTU can be partially reused through window sliding.

[0197] Specifically, the first value range and the second value range may be determined according to formulas (2) to (5): HorMin=CTUX-CUX-L (2) HorMax=CTUX+CTUW-CUX-CUW+R (3) VerMin=CTUY-CUY-U (4) VerMax=CTUY+CTUH-CUY-CUH+B (5)

[0198] where CUX and CUY respectively represent the horizontal and vertical coordinates of the top left sample of the block to be processed, CUW and CUH respectively represent the width and height of the block to be processed, CTUX and CTUY respectively represent the horizontal and vertical coordinates of the CTU in which the block to be processed is located, CTUW and CTUH respectively are the width and height of the CTU in which the block to be processed is located, U, B, L, R respectively represent the extension values ​​of the CTU in the upward, downward, leftward and rightward directions, HorMin and HorMax respectively represent the first and second thresholds, and VerMin and VerMax respectively represent the third and fourth thresholds.

[0199] Optionally, information about the extended range of the temporal motion vector field of the CTU is carried in at least one of the sequence parameter set SPS, the picture parameter set PPS, and the header field.

[0200] It should be understood that the SPS, PPS, and header fields can each indicate an extended range of the CTU using the parameters they carry (U, B, L, and R).

[0201] Optionally, the extension range of the temporal motion vector field of the CTU is preconfigured, in which case the extension range of the temporal motion vector field of the CTU may be written directly into the protocol and does not need to be carried in an SPS, PPS or header field.

[0202] 9 is a schematic flowchart of a motion vector acquisition method according to an embodiment of the present application. The method shown in FIG. 9 can be performed by a video encoding and decoding device, a video codec, a video encoding and decoding system, and other devices having video encoding and decoding functions.

[0203] The method shown in Figure 9 includes steps 210 to 250. The following describes steps 210 to 250 in detail.

[0204] 210: Determine the target offset vector of the block to be processed and the identifier information of the target picture.

[0205] The block to be processed includes at least one sub-block to be processed. When the motion vector of the block to be processed is obtained, it is necessary to actually obtain the motion vector of each sub-block to be processed of the block to be processed. If the block to be processed is a CU, the sub-block to be processed is a sub-CU.

[0206] The target offset vector in step 210 has the same meaning as the target offset vector mentioned in the method shown in FIG. 3, and the details will not be described again here.

[0207] The identifier information of the target picture may specifically be a POC of the target picture in a picture sequence, or may be index information or an index value of the target picture.

[0208] 220: Based on the position of the sub-block to be processed and the target offset vector, determine an initial position of the co-located sub-block of the sub-block to be processed in the target picture.

[0209] Specifically, when the initial position of the co-located sub-block of the sub-block to be processed in the target picture is determined, the co-located sub-block of the sub-block to be processed may be determined first, and then a specified position on the co-located sub-block is determined as the initial position of the co-located sub-block of the sub-block to be processed in the target picture. For example, after the co-located sub-block is determined, the center point or the upper left corner of the co-located sub-block may be determined as the initial position of the co-located sub-block of the sub-block to be processed in the target picture.

[0210] For manner in which co-located sub-blocks are determined, please refer to the description in the relevant paragraph below step 130 in the method illustrated in FIG.

[0211] Furthermore, when the initial position of the co-located sub-block of the sub-block to be processed in the target picture is determined, alternatively, the co-located sub-block may not be determined, and a position corresponding to the sub-block to be processed in the target picture is directly determined as the initial position of the co-located sub-block of the sub-block to be processed in the target picture based on the position of the sub-block to be processed and the target offset vector. For example, a specified position such as the center point or the upper left corner of the sub-block to be processed can be first determined, and the target offset vector can be added to the coordinates of the position to determine the initial position of the co-located sub-block of the sub-block to be processed in the target picture.

[0212] 230: If the initial position is within the preset region of the target picture, determine the initial position as the target position.

[0213] For example, as shown in Figure 10, the current picture includes a block to be processed, the block to be processed includes the top-left sub-block to be processed, the target picture includes a corresponding block, the corresponding block includes the top-left co-located sub-block, the target offset vector of the block to be processed points to the corresponding block, and the rectangular area within the dashed box in the target picture is the preset area of ​​the target picture. From Figure 10, it can be seen that the initial position of the co-located sub-block of the sub-block to be processed in the target picture is within the preset area of ​​the target picture, and the initial position may be directly determined as the target position.

[0214] 240: If the initial position is outside the preset region, a position within the preset region that is closest to the initial position is determined as the target position.

[0215] For example, as shown in Fig. 11, the current picture includes the block to be processed, the block to be processed includes the top-left sub-block to be processed, the target picture includes the corresponding block, the corresponding block includes the top-left co-located sub-block, the target offset vector of the block to be processed points to the corresponding block, and the rectangular area within the dashed box in the target picture is the preset area of ​​the target picture. From Fig. 11, it can be seen that the initial position of the co-located sub-block of the sub-block to be processed in the target picture is outside the preset area of ​​the target picture. In this case, we need to determine the position A, which is within the preset area and is closest to the initial position, as the target position.

[0216] 250: Determine the motion vector of the sub-block to be processed based on the motion vector corresponding to the destination position.

[0217] In this application, a target position in a preset area is found based on an initial position and the preset area of ​​a target picture, and then a motion vector of a subblock to be processed is determined based on a motion vector within a specific range of the target picture. Thus, by pre-reading a temporal motion vector field within a specific range of the target picture, the amount of memory bandwidth and memory read time can be reduced.

[0218] Optionally, before step 250, the method shown in FIG. 9 further comprises: obtaining motion vectors of samples in a preset region in the target picture.

[0219] It should be understood that before the motion vector of the subblock to be processed is determined based on the motion vector of the target position in step 250, the motion vector corresponding to the target position needs to be obtained first. In order to reduce the amount of memory reading time and the occupied memory bandwidth, the motion vector of the sample in the preset area of ​​the target picture may be obtained in advance. In this way, when the motion vector of the target position needs to be used, the motion vector corresponding to the target position may be obtained directly from the read motion vector of the sample in the preset area. Also, since the motion vector of the sample only in the preset area of ​​the target picture is obtained, the occupied memory bandwidth can be reduced, unlike the conventional solution that may need to obtain the motion vector of the sample in the entire target picture.

[0220] Optionally, in one embodiment, the preset region of step 230 is determined based on the position and size of the coding tree unit CTU in which the block to be processed is located, the size of the target picture, and a preset extension range of the temporal motion vector field of said CTU.

[0221] The extended range of the temporal motion vector field of the CTU includes an extended range of the temporal motion vector field of the CTU in a first direction and in a second direction.

[0222] Optionally, the first direction is a horizontal direction and the second direction is a vertical direction.

[0223] Optionally, when the first direction is horizontal and the second direction is vertical, the extended range of the temporal motion vector field of the CTU includes an extended range of the temporal motion vector field of the CTU in the upward, downward, leftward, and rightward directions.

[0224] The preset region may be limited in a number of ways: For example, optionally, the preset region may be expressed using a range of horizontal and vertical coordinate values.

[0225] Specifically, the preset region may be expressed by a horizontal coordinate value range [minimum horizontal coordinate value, maximum horizontal coordinate value] and a vertical coordinate value range [minimum vertical coordinate value, maximum vertical coordinate value].

[0226] The values ​​in the horizontal and vertical coordinate ranges may be calculated according to formulas (6) through (9): HorMin=Max(CTUX-L,0) (6) HorMax=Min(CTUX+CTUW+R-1,PicW-1) (7) VerMin=Max(CTUY-U,0) (8) VerMax=Min(CTUY+CTUH+B-1,PicH-1) (9)

[0227] where CTUX is the horizontal coordinate of the CTU in which the block to be processed is located, CTUY is the vertical coordinate of the CTU in which the block to be processed is located, CTUW and CTUH are respectively the width and height of the CTU in which the block to be processed is located, PicW and PicH are respectively the width and height of the target picture, U, B, L and R represent the extension values ​​of the CTU in the upward, downward, leftward and rightward directions, HorMin and HorMax are respectively the minimum and maximum horizontal coordinate values, and VerMin and VerMax are respectively the minimum and maximum vertical coordinate values.

[0228] The minimum horizontal coordinate value, the maximum horizontal coordinate value, the minimum vertical coordinate value, and the maximum vertical coordinate value are obtained through calculation according to formulas (6) to (9), and the horizontal coordinate value range and the vertical coordinate value range are obtained, and the preset area of ​​the target picture is determined.

[0229] Optionally, information regarding the extended range of the temporal motion vector field of the CTU is carried in at least one of the SPS, PPS, and header fields.

[0230] Alternatively, the extended range of the temporal motion vector field of the CTU may be preconfigured, in which case the extended range of the motion vectors of the CTU may be written directly into the protocol and does not need to be carried in an SPS, PPS or header field.

[0231] Optionally, in one embodiment, determining the motion vector of the sub-block to be processed based on the motion vector corresponding to the target position includes: scaling the motion vector corresponding to the target position based on the POC of the picture including the sub-block to be processed, the POC of the target reference picture of the picture including the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture to obtain the motion vector of the sub-block to be processed.

[0232] Specifically, when scaling a motion vector corresponding to a target position based on the POC of the picture including the sub-block to be processed, the POC of the target reference picture of the picture including the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture to obtain a motion vector of the sub-block to be processed, the difference between the picture order count POC of the picture including the sub-block to be processed and the POC of the target reference picture of the picture including the sub-block to be processed may first be determined as a third difference, and the difference between the POC of the target picture and the POC of the target reference picture of the target picture is determined as a fourth difference, and then the motion vector corresponding to the target position is scaled based on the ratio of the third difference to the fourth difference to obtain a motion vector of the sub-block to be processed.

[0233] Optionally, scaling the motion vector of the co-located sub-block based on a ratio of the third difference to the fourth difference to obtain a motion vector of the sub-block to be processed includes: determining the ratio of the third difference to the fourth difference as the second ratio; and determining the product of the second ratio and the motion vector corresponding to the target position as the motion vector of the sub-block to be processed.

[0234] 12, a picture including the sub-block to be processed is picture frame 1, a target reference picture of picture frame 1 is picture frame 2, a picture frame where the target picture is located is picture frame 3, a target reference picture of picture frame 3 is picture frame 4, and a motion vector of the target position is MV. In this case, the MV may be scaled based on the POC of picture frame 1 to picture frame 4 to obtain the motion vector of the sub-block to be processed.

[0235] Specifically, the motion vector of the sub-block to be processed may be calculated according to formula (10):

number

[0236] Here, MV s where P1 is the motion vector of the sub-block to be processed, MV is the motion vector of the target position, P1 to P4 are the POCs of picture frames 1 to 4, P1-P2 represents the third difference, and P3-P4 represents the fourth difference.

[0237] To implement prediction for the block to be processed, the block to be processed may be predicted after the motion vectors of all the sub-blocks to be processed of the block to be processed are obtained, and the predicted sample values ​​of the block to be processed are obtained. Alternatively, after the motion vectors of each sub-block to be processed are obtained, the sub-block to be processed may be predicted to obtain the predicted sample values ​​of each sub-block to be processed, and after all the sub-blocks to be processed are predicted, the predicted sample values ​​of the block to be processed are obtained.

[0238] The above describes the motion vector acquisition method in the embodiment of the present application with reference to Figures 3 to 12. In order to better understand the technical solution of the present application, the following describes in detail the motion vector acquisition method in the embodiment of the present application with reference to specific embodiments.

[0239] The first and second embodiments correspond to the method shown in FIG. 3, in which the value of the target offset vector is restricted so that the finally found co-located sub-block is within a specific area of ​​the target picture. In the third embodiment, no restriction is imposed on the value of the target offset vector, but the target location of the co-located sub-block of the to-be-processed sub-block in the target picture is directly restricted to a specific area. Finally, in all the first to third embodiments, the motion vector of the to-be-processed sub-block is determined based on the motion vectors of the samples in the specific area of ​​the target picture. The following will describe the first to third embodiments separately in detail. EXAMPLES

[0240] EMBODIMENT 1 As shown in FIG. 13, a specific motion vector acquisition process in embodiment 1 includes the following steps:

[0241] 310: Determine the constraint range.

[0242] The constraint range here is equivalent to the first value range and the second value range above.

[0243] It should be understood that the constraint range is determined to constrain the values ​​of the components of the target offset vector of the block to be processed in the first direction and the second direction so that the values ​​of the components of the target offset vector in the first direction and the second direction fall within the constraint range.

[0244] Optionally, the constraint range may be determined based on the extended range of the temporal motion vector field of the CTU, the position and size of the block to be processed, and the position and size of the CTU in which the block to be processed is located.

[0245] The extension range of the temporal motion vector field of the CTU may be defined by using parameters RangeL, RangeR, RangeU, and RangeB (which are equivalent to the parameters L, R, U, and B described above), where the parameters RangeL, RangeR, RangeU, and RangeB represent the extension values ​​of the temporal motion vector field of the CTU in four directions: leftward, rightward, upward, and downward, respectively.

[0246] The values ​​of RangeL, RangeR, RangeU, and RangeB can be 0, 16, 32, 64, etc. (samples are used as the unit).

[0247] It should be understood that the aforementioned parameters RangeL, RangeR, RangeU, and RangeB may be determined directly in a predefined manner or may be carried in a higher layer syntax, for example, RangeL, RangeR, RangeU, and RangeB may be carried in the SPS, PPS, and header fields.

[0248] Specifically, the constraint range may be determined according to formulas (11) to (14): HorMin=CTUX-CUX-RangeL (11) HorMax=CTUX+CTUW-CUX-CUW+RangeR (12) VerMin=CTUY-CUY-RangeU (13) VerMax=CTUY+CTUH-CUY-CUH+RangeB (14)

[0249] where CUX and CUY represent the position coordinates of the upper left sample of the block to be processed, CUW and CUH represent the width and height of the block to be processed, CTUX and CTUY represent the position coordinates of the upper left sample of the CTU in which the block to be processed is located, and CTUW and CTUH represent the width and height of said CTU, HorMin and HorMax represent the minimum and maximum values ​​of the constraint range in the horizontal direction, and VerMin and VerMax represent the minimum and maximum values ​​of the constraint range in the vertical direction.

[0250] 320: Determine the starting offset vector of the block to be processed.

[0251] The starting offset vector here is equivalent to the initial offset vector described above.

[0252] It should be understood that steps 310 and 320 may be performed simultaneously or separately, in sequence.

[0253] The start offset vector is used to determine the location of the target picture block of the block to be processed in the target picture, and the start offset vector can be determined in two ways:

[0254] The third aspect involves: determining an available motion vector of a spatial neighboring block of the block to be processed as a starting offset vector.

[0255] Specifically, in the third embodiment, the motion vector of the first available neighboring block, in the order A1, B1, B0, and A0 in FIG. 4, may be found and used as the starting offset vector for the block to be processed.

[0256] The fourth aspect includes: firstly determining a target picture, and then determining a motion vector of a neighboring block that points to the target picture as a starting offset vector.

[0257] Specifically, in the fourth aspect, the motion vector of the first available neighboring block may be found in the order of A1, B1, B0, A0 in Fig. 4, and if the motion vector points to the destination picture, the motion vector is used as the starting offset vector of the block to be processed. If the motion vector does not point to the destination picture, the motion vector is scaled to enable the motion vector to point to the destination picture, and the scaled motion vector is used as the starting offset vector.

[0258] 330: Determine whether the starting offset vector is outside the constraint range.

[0259] It should be understood that the starting offset vector is determined to be outside the constraint range if the value of the component of the starting offset vector in at least one of the first direction or the second direction is outside the constraint range. The starting offset vector is determined to not be outside the constraint range if the value of the component of the starting offset vector in each of the first direction and the second direction is not outside the constraint range.

[0260] If the starting offset vector is outside the constraint range, steps 340 and 350 are performed; otherwise, if the starting offset vector is not outside the constraint range, step 360 is performed.

[0261] 340: Determine a constrained offset vector based on the constraint range.

[0262] If the starting offset vector is outside the constraint range, the starting offset vector needs to be constrained to obtain a constrained offset vector such that the constrained offset vector is within the constraint range.

[0263] Specifically, if the start offset vector is outside the constraint range, the component (x off,y off ) may be limited according to formulas (15) and (16) to obtain the limited offset vector: x off =Clip3(HorMin,HorMax,x off ) (15) y off =Clip3(VerMin,VerMax,y off ) (16)

[0264] Here, the Clip3 function is a clipping function, specifically defined as follows:

number

[0265] It should be understood that other than the aspect of determining the target offset vector based on the constraint range, alternatively, the zero motion vector may be directly used as the target offset vector, or alternatively, the ATMVP technique may be used, but a different technique is used to obtain the motion vector for the sub-block to be processed.

[0266] 350: The constrained offset vector is determined as a target offset vector.

[0267] Since the bounded offset vector falls within the constraint range, the bounded offset vector may be determined as the target offset vector.

[0268] 360: Determine the starting offset vector as the target offset vector.

[0269] If the starting offset vector falls within the constraint range, no constraint or limiting operation needs to be performed on the starting offset vector, and the starting offset vector may be directly determined as the target offset vector.

[0270] 370: In the destination picture, determine a co-located sub-block of the sub-block to be processed based on the location of the sub-block to be processed and the destination offset vector.

[0271] 380: Determine the motion vector of the sub-block to be processed based on the motion vector of the co-located sub-block.

[0272] Specifically, based on the POC of the picture containing the sub-block to be processed, the POC of the target reference picture of the picture containing the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture, the motion vector of the co-located sub-block may be scaled to obtain the motion vector of the sub-block to be processed.

[0273] After the motion vector of the sub-block to be processed is obtained, the predicted sample values ​​of the sub-block to be processed may be determined based on the motion vector of the sub-block to be processed.

[0274] When the predicted sample value of the subblock to be processed is determined, the predicted subblock of the subblock to be processed may be determined according to the motion vector of the subblock to be processed, and then the sample value of the predicted subblock is determined as the predicted sample value of the subblock to be processed.In this way, after the predicted sample value of each subblock to be processed is obtained, the predicted sample value of the whole block to be processed is obtained. EXAMPLES

[0275] EMBODIMENT 2 As shown in FIG. 14, a specific motion vector acquisition process in embodiment 2 includes the following steps:

[0276] 410: Determine the constraint range.

[0277] The meaning and determination manner of the constraint range here are the same as those of the constraint range in the first embodiment, and the details will not be described again here.

[0278] 420: Obtain the motion vectors of the neighboring blocks of the block to be processed.

[0279] Specifically, the motion vector of the first available neighboring block can be obtained in the order of A1, B1, B0, and A0 in FIG.

[0280] Alternatively, the destination picture may be determined first, and then the motion vectors of the neighboring blocks of the block to be processed are obtained in the order of A1, B1, B0, and A0 in Fig. 4. If the motion vector points to the destination picture, step 430 is executed. If the motion vector does not point to the destination picture, the motion vector is scaled so that the scaled motion vector points to the destination picture. Then, the scaled motion vector is used as the motion vector of the neighboring block, followed by executing step 440.

[0281] 430: Determine whether the motion vector of the neighboring block falls within a constraint range.

[0282] If the value of the component of the motion vector of the neighboring block falls within the constraint range, step 440 is executed; otherwise, if the value of the component of the motion vector of the neighboring block does not fall within the constraint range, step 420 is executed, and so on until the value of the component of the motion vector of the neighboring block falls within the constraint range.

[0283] It should be understood that if the values ​​of the components of the motion vector of the neighboring block in both the first direction and the second direction are within the constraint range, the motion vector of the neighboring block is determined to be within the constraint range. If the value of the motion vector component of the neighboring block in the first direction and / or the value of the motion vector component of the neighboring block in the second direction are outside the constraint range, the motion vector of the neighboring block is determined not to be within the constraint range (the motion vector of the neighboring block is outside the constraint range).

[0284] 440: Determine the motion vector of the neighboring block as the target offset vector.

[0285] 450: In the destination picture, determine a co-located sub-block of the sub-block to be processed based on the location of the sub-block to be processed and the destination offset vector.

[0286] 460: Determine the motion vector of the sub-block to be processed based on the motion vector of the co-located sub-block.

[0287] Specifically, based on the POC of the picture containing the sub-block to be processed, the POC of the target reference picture of the picture containing the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture, the motion vector of the co-located sub-block may be scaled to obtain the motion vector of the sub-block to be processed.

[0288] After the motion vector of the sub-block to be processed is obtained, the predicted sample values ​​of the sub-block to be processed may be determined based on the motion vector of the sub-block to be processed. EXAMPLES

[0289] EMBODIMENT 3 As shown in FIG. 15, a specific motion vector acquisition process in embodiment 3 includes the following steps:

[0290] 510: Determine the target offset vector and target picture identifier information of the block to be processed.

[0291] The process of determining the target offset vector and target picture identifier information in step 510 is the same as in step 210 .

[0292] 520: Determine an initial position of a co-located sub-block of the sub-block to be processed in the target picture based on the position of the sub-block to be processed and the target offset vector.

[0293] Specifically, the position coordinates of the initial position of the co-located sub-block of the sub-block to be processed in the target picture may be determined according to formula (18):

number

[0294] where (x,y) represents the coordinates of the top left vertex of the block to be processed, i represents the i-th sub-block from left to right of the block to be processed, j represents the j-th sub-block from top to bottom of the block to be processed, and (x off ,y off ) represents the values ​​of the components of the target offset motion vector in the first direction and the second direction, M and N represent the size of the sub-block to be processed (where M may represent the width of the sub-block to be processed and N may represent the height of the sub-block to be processed), and (x (i,j) ,y (i,j) ) represents the position coordinates of the (i,j)th co-located sub-block.

[0295] 530: Determine whether the initial position is within a preset region of the target picture.

[0296] If the initial position is within the preset area of ​​the corresponding picture, step 540 is executed directly. If the initial position is outside the preset area of ​​the corresponding picture, step 550 is executed.

[0297] The preset region may be a fixed area in the target picture, and the corresponding picture preset region may be determined according to formulas (19) to (22): HorMin=Min(CTUX-RangeL,0) (19) HorMax=Max(CTUX+CTUW+RangeR-1,PicW-1) (20) VerMin=Min(CTUY-RangeU,0) (21) VerMax=Max(CTUY+CTUH+RangeB-1,PicH-1) (22)

[0298] HorMin and HorMax represent the minimum and maximum values ​​of the constraint range in the horizontal direction, VerMin and VerMax represent the minimum and maximum values ​​of the constraint range in the vertical direction, CTUX and CTUY represent the position coordinates of the top-left sample of the CTU in which the block to be processed is located, CTUW and CTUH represent the width and height of the CTU, RangeU, RangeB, RangeL, RangeR represent the extension values ​​of the temporal motion vector field of the CTU in the upward, downward, leftward and rightward directions respectively, and PicW and PicH are the width and height of the target picture respectively.

[0299] 540: The initial position is determined as the target position.

[0300] If the initial position is within a preset region of the target picture, the initial position may be directly determined as the target position.

[0301] 550: A position in the preset region that is closest to the initial position is determined as a target position.

[0302] Specifically, when the initial position is outside the preset region of the target picture, a position that is within the preset region and is closest to the initial position may be determined as the target position. Specifically, when the initial position is outside the preset region of the target picture, the target position may be determined according to formula (23) and formula (24): x (i,j) =Clip3(HorMin,HorMax,x (i,j) ) (twenty three) y (i,j) =Clip3(VerMin,VerMax,y (i,j) ) (twenty four)

[0303] Here, the Clip3 function is a clipping function, and its specific definition is shown in formula (17) above.

[0304] 560: Determine the motion vector of the sub-block to be processed based on the motion vector corresponding to the destination position.

[0305] Specifically, based on the POC of the picture containing the sub-block to be processed, the POC of the target reference picture of the picture containing the sub-block to be processed, the POC of the target picture, and the POC of the target reference picture of the target picture, the motion vector of the target position may be scaled to obtain the motion vector of the sub-block to be processed.

[0306] After the motion vector of the sub-block to be processed is obtained, the predicted sample values ​​of the sub-block to be processed may be determined based on the motion vector of the sub-block to be processed.

[0307] In order to better understand the beneficial effects brought by the present application, the following will describe in detail the beneficial effects of the motion vector acquisition method in the embodiment of the present application with reference to FIG. 16 and FIG.

[0308] As shown in FIG. 16, the current picture includes a current CTU, the current CTU includes a number of blocks to be processed, each block to be processed includes a number of sub-blocks to be processed, and each block to be processed corresponds to one offset vector. The corresponding blocks of the blocks to be processed can be found based on the corresponding offset vectors. Each sub-block to be processed corresponds to one co-located sub-block in the destination picture. If the area in which the co-located sub-block in the destination picture corresponding to the sub-block to be processed is located is uncertain, or the location in the destination picture corresponding to the sub-block to be processed is uncertain, when the motion vector of the co-located sub-block is obtained, the temporal motion vector field of the entire corresponding picture may have to be obtained in advance. As a result, the memory bandwidth is increased.

[0309] As shown in FIG. 17, the current picture includes a current CTU, the current CTU includes a number of blocks to be processed, each block to be processed includes a number of sub-blocks to be processed, and the dashed area in the destination picture indicates a preset area of ​​the destination picture. In the present application, the range of the offset vector of the block to be processed is constrained so that the co-located sub-block in the destination picture corresponding to the sub-block to be processed is within the preset area of ​​the destination picture, or the corresponding position of the co-located sub-block of the sub-block to be processed in the destination picture is within the preset area of ​​the destination picture. In this way, it is the co-located sub-block or the corresponding position that needs to be obtained, and the motion vector of the entire destination picture does not need to be obtained. This can reduce memory bandwidth. Furthermore, through look-ahead, the amount of memory read time can be reduced.

[0310] The motion vector acquisition method in the embodiment of the present application may be applied to the merge mode of inter prediction.

[0311] In the Sub-CU based motion vector prediction (SMVP) technique, the current coding unit is divided into sub-coding units of size M×N, the motion information of each sub-coding unit is estimated, and then motion compensation is performed based on the motion information of each sub-coding unit to obtain a predictor for the current coding unit.

[0312] When the SMVP technique is applied to the merge mode, two types of candidate motion information, advanced temporal motion vector prediction (ATMVP) and spatial-temporal motion vector prediction (STMVP), are added based on the original merge mode.

[0313] In the ATMVP technique, a collocated reference picture is first determined, then the current coding unit is divided into sub-coding units of size M×N, motion information of a sample at the center point of the sub-coding unit that is in the collocated reference picture and corresponds to each current sub-coding unit is obtained, the motion information is scaled, and the motion information is converted into the motion information of each current sub-coding unit. The motion vector acquisition method in the embodiment of the present application may be understood as an improved ATMVP technique.

[0314] Based on the neighboring blocks of the block to be processed shown in Figure 4, the following will separately describe the candidate information list construction process in the existing merge mode and the candidate information list construction process in the merge mode in which SMVP technology is applied, with reference to Figures 18 and 19.

[0315] The candidate information list building process in the existing merge mode is shown in FIG.

[0316] The candidate information list building process shown in FIG.

[0317] 610: Insert motion information for positions A1, B1, B0, and A0.

[0318] 620: Insert the movement information of the position of B2.

[0319] 630: Insert motion information of the time position (T or C).

[0320] 640: Pad the candidate motion information list.

[0321] The candidate information list construction process in the merge mode in which the SMVP technology is applied is shown in FIG.

[0322] The candidate information list building process shown in FIG.

[0323] 710: Insert motion information for positions A1, B1, B0, and A0.

[0324] 720: ATMVP motion information and STMVP motion information are inserted.

[0325] 730: Insert the movement information of the position of B2.

[0326] 740: Insert motion information of the time position (T or C).

[0327] 750: Pad candidate motion information list.

[0328] Compared with Fig. 18, Fig. 19 further includes step 720 of inserting ATMVP motion information and STMVP motion information, while other steps remain unchanged.

[0329] It should be understood that the motion vector of the sub-block to be processed, which is obtained according to the motion vector obtaining method in the embodiment of the present application, is part of the ATMVP motion information inserted in step 720 .

[0330] Specifically, based on the neighboring blocks of the block to be processed shown in FIG. 4, when the SMVP technique is applied to the merge mode, encoding in the merge mode specifically includes the following process.

[0331] (1) Obtain the motion information of the positions of spatially neighboring blocks A1, B1, B0, A0 in order, check the availability, remove the repeated items, and insert the motion information into the candidate motion information list.

[0332] (2) Get the ATMVP and STMVP motion information, check for availability, remove repeated items, and insert the motion information into the candidate motion information list.

[0333] (3) If the length of the candidate motion information list is less than 6, get the motion information of the position of B2, check the availability, delete the repeated items, and insert the motion information into the candidate motion information list.

[0334] (4) Obtain motion information of a block corresponding to position T in a neighboring encoded frame (if such motion information does not exist, then the motion information of a block corresponding to position C is obtained), scale the motion information, and insert the scaled motion information into the candidate motion information list.

[0335] (5) If the length of the candidate motion information list is less than 7, perform padding to obtain a candidate motion information list with a length of 7.

[0336] (6) Follow each candidate motion information in the candidate motion information list, perform motion compensation and reconstruction to obtain a reconstructed value, and then determine the candidate motion information with the lowest rate distortion cost (RD cost) according to a rate distortion optimization (RDO) method to obtain a merge index.

[0337] (7) Based on the length of the candidate motion information list, write a merge index into the bitstream and send the bitstream to the decoder side.

[0338] The candidate motion information list building process in merge mode is shown in FIG.

[0339] The above describes in detail the motion vector acquisition method in the embodiment of the present application with reference to Figures 3 to 19. It should be understood that the motion vector acquisition method in the embodiment of the present application may correspond to the inter prediction shown in Figures 1 and 2. The motion vector acquisition method in the embodiment of the present application may be performed in the inter prediction process shown in Figures 1 and 2. The motion vector acquisition method in the embodiment of the present application may be specifically performed by an inter prediction module in an encoder or decoder. Furthermore, the motion vector acquisition method in the embodiment of the present application may be implemented in any electronic device or apparatus that may need to encode and / or decode a video picture.

[0340] The following describes in detail the motion vector acquisition device in the embodiment of the present application with reference to Figures 20 and 21. The device shown in Figure 20 corresponds to the method shown in Figures 3, 13, and 14, and can execute the steps in the method shown in Figures 3, 13, and 14. The device shown in Figure 21 corresponds to the method shown in Figures 9 and 15, and can execute the steps in the method shown in Figures 9 and 15. For the sake of brevity, repeated descriptions will be omitted below as appropriate.

[0341] 20 is a schematic block diagram of a motion vector acquisition device 800 according to an embodiment of the present application. The device 800 shown in FIG. 20 includes: A determination module 810, comprising: determining a first range of values ​​and a second range of values; determining a target offset vector of a block to be processed and target picture identifier information, the block to be processed including at least one sub-block to be processed, a value of a component of the target offset vector in a first direction falls within a first value range, a value of a component of the target offset vector in a second direction falls within a second value range, and the first direction and the second direction are orthogonal to each other; determining a co-located sub-block of the sub-block to be processed based on the location of the sub-block to be processed and the target offset vector in the target picture; and The image processing device 800 includes an obtaining module 820 configured to obtain a motion vector of a sub-block to be processed based on the motion vector of a co-located sub-block.

[0342] In this application, since the component values ​​of the target offset vector fall within a certain value range, the sub-blocks to be processed that are determined in the target picture based on the target offset vector also fall within the certain range of the target picture, so that the amount of memory bandwidth and memory read time can be reduced by pre-reading the temporal motion vector field within the certain range of the target picture.

[0343] The determination module 810 and the acquisition module 820 may correspond to a prediction module (which may be an inter-prediction module in particular) in an encoding and decoding device. During a specific implementation, the determination module 810 and the acquisition module 820 may be implemented by using software or hardware, or may be implemented by using a combination of software and hardware.

[0344] 21 is a schematic block diagram of a motion vector acquisition device according to an embodiment of the present application. The device 900 shown in FIG. 21 includes: A decision module 910, comprising: determining a target offset vector and target picture identifier information of a block to be processed, the block to be processed including at least one sub-block to be processed; determining an initial position of a co-located sub-block of the to-be-processed sub-block in the target picture based on the position of the to-be-processed sub-block and the target offset vector; If the initial position is within a preset region of the target picture, then determining the initial position as the target position; or if the initial position is outside the preset region, determining a position that is within the preset region and closest to the initial position as the target position; and The method further includes: acquiring a motion vector of a sub-block to be processed based on the motion vector corresponding to the target position;

[0345] In this application, a target position within a preset area is found based on the initial position and the preset area of ​​the target picture, and then a motion vector of the subblock to be processed is determined based on the motion vector within a specific range of the target picture. Thus, by pre-reading the temporal motion vector field within a specific range of the target picture, the amount of memory bandwidth and memory read time can be reduced.

[0346] The determining module 910 and the obtaining module 920 may correspond to a prediction module in an encoding and decoding device, and the prediction module may be an inter-prediction module in particular. During specific implementation, the determining module 910 and the obtaining module 920 may be implemented by using software or hardware, or may be implemented by using a combination of software and hardware.

[0347] The motion vector acquisition method in the embodiment of the present application may alternatively be performed by a video encoder or a video decoder. The following describes the structures of the video encoder and the video decoder in the embodiment of the present application with reference to Figure 22 and Figure 23.

[0348] 22 is a schematic block diagram of a video encoder according to an embodiment of the present application. The video encoder 1000 shown in FIG. 22 includes an encoder-side prediction module 1001, a transform and quantization module 1002, an entropy coding module 1003, an encoding and reconstruction module 1004, and an encoder-side filtering module.

[0349] The video encoder 1000 shown in Fig. 22 can encode a video. Specifically, the video encoder 1000 can perform the video encoding process shown in Fig. 1 to encode a video. In addition, the video encoder 1000 can further perform a motion vector acquisition method in an embodiment of the present application, and the video encoder 1000 can perform steps of the methods shown in Figs. 3, 9, and 13 to 15.

[0350] The motion vector acquisition device in the embodiment of the present application may be an encoder-side prediction module 1001 in a video encoder 1000. Specifically, the device 800 and the device 900 shown in FIG. 20 and FIG. 21 are equivalent to the encoder-side prediction module 1001 in the video encoder 1000.

[0351] 20 is a schematic block diagram of a video decoder according to an embodiment of the present application. The video decoder 2000 shown in FIG. 20 includes an entropy decoding module 2001, an inverse transform and inverse quantization module 2002, a decoder-side prediction module 2003, a decoding and reconstruction module 2004, and a decoder-side filtering module 2005.

[0352] The video decoder 2000 shown in Fig. 23 can decode video. Specifically, the video decoder 2000 can decode video by performing the video decoding process shown in Fig. 2. In addition, the video decoder 2000 can further perform the motion vector acquisition method in the embodiment of the present application, and the video decoder 2000 can perform the steps of the motion vector acquisition method shown in Fig. 3, Fig. 9, and Fig. 13 to Fig. 15.

[0353] The motion vector acquisition device in the embodiment of the present application may be the decoder-side prediction module 2003 in the video decoder 2000. Specifically, the device 800 and the device 900 shown in Figures 20 and 21 are equivalent to the decoder-side prediction module 2003 in the video decoder 2000.

[0354] The following describes application scenarios of the motion vector acquisition method in the embodiment of the present application with reference to Figures 24 to 26. The motion vector acquisition method in the embodiment of the present application may be implemented by the video transmission system, the encoding and decoding device, and the encoding and decoding system shown in Figures 24 to 26.

[0355] FIG. 24 is a schematic block diagram of a video transmission system according to an embodiment of the present application.

[0356] As shown in FIG. 24 , the video transmission system includes: a collection module 3001 , an encoding module 3002 , a transmission module 3003 , a network transmission 3004 , a receiving module 3005 , a decoding module 3006 , and a rendering module 3007 .

[0357] The module of the video transmission system has the following specific functions:

[0358] The acquisition module 3001 includes a camera or a group of cameras and is configured to acquire video pictures and perform processing on the acquired video pictures to convert the optical signal into a digitized video sequence prior to encoding.

[0359] The encoding module 3002 is configured to encode a video sequence to obtain a bitstream.

[0360] The transmission module 3003 is configured to transmit the encoded bitstream.

[0361] The receiving module 3005 is configured to receive the bitstream transmitted by the transmitting module 3003 .

[0362] The network 3004 is configured to transmit the bitstream transmitted by the transmitting module 3003 to the receiving module 3005 .

[0363] The decoding module 3006 is configured to decode the bitstream received by the receiving module 3005 to reconstruct a video sequence.

[0364] The rendering module 3007 is configured to render the reconstructed video sequence obtained through decoding by the decoding module 3006, so as to improve the video display effect.

[0365] The video transmission system shown in Figure 24 can perform the motion vector acquisition method in the embodiment of the present application. Specifically, both the encoding module 3002 and the decoding module 3006 in the video transmission system shown in Figure 24 may perform the motion vector acquisition method in the embodiment of the present application.

[0366] The following will describe in detail an encoding and decoding device and an encoding and decoding system including the encoding and decoding device with reference to Figures 25 and 26. It should be understood that the encoding and decoding device and the encoding and decoding system shown in Figures 25 and 26 can execute the motion vector acquisition method in the embodiment of the present application.

[0367] 25 is a schematic diagram of a video encoding and decoding device according to an embodiment of the present application. The video encoding and decoding device 50 may be a dedicated device for encoding and / or decoding video pictures, or an electronic device having video encoding and decoding functions. Alternatively, the encoding and decoding device 50 may be a mobile terminal or user equipment in a wireless communication system.

[0368] The encoding and decoding device 50 may include the following modules or units: a controller 56, a codec 54, a wireless interface 52, an antenna 44, a smart card 46, a card reader 48, a keypad 34, a memory 58, an infrared port 42, and a display 32. In addition to the modules and units shown in FIG. 25, the encoding and decoding device 50 may further include a microphone and any suitable audio input module. The audio input module may input a digital or analog signal. The encoding and decoding device 50 may further include an audio output module. The audio output module may be a headset, a speaker, or an analog or digital audio output connection. The encoding and decoding device 50 may further include a battery. The battery may be a solar cell, a fuel cell, or the like. The encoding and decoding device 50 may further include an infrared port configured to perform short-range line-of-sight communication with other devices. Alternatively, the encoding and decoding device 50 may communicate with said other devices in any suitable short-range communication mode, for example through a Bluetooth wireless connection or a USB / live line wired connection.

[0369] Memory 58 may store data in the form of pictures and audio, and may also store instructions that are executed on controller 56 .

[0370] The codec 54 may encode and decode audio and / or video data or, under the control of the controller 56, implement assisted encoding and assisted decoding of the audio and / or video data.

[0371] The smart card 46 and the card reader 48 can provide user information and can provide credential information for network authentication and authorized users. A specific implementation of the smart card 46 and the card reader 48 can be a universal integrated circuit card (UICC) and a UICC reader.

[0372] The wireless interface 52 is capable of generating wireless communication signals, which may be communication signals generated during communication in a cellular communication network, a wireless communication system, or a wireless local area network.

[0373] The antenna 44 is configured to transmit radio frequency signals generated by the wireless interface 52 to another device (which may be one or more devices), and may also be configured to receive radio frequency signals from the other device (which may be one or more devices).

[0374] In some embodiments of the present application, the encoding and decoding device 50 may receive video picture data to be processed from another device before transmission and / or storage, while in some other embodiments of the present application, the encoding and decoding device 50 may receive pictures over a wireless or wired connection and encode / decode the received pictures.

[0375] FIG. 26 is a schematic block diagram of a video encoding and decoding system 7000 according to an embodiment of the present application.

[0376] As shown in FIG. 26, the video encoding and decoding system 7000 includes a source device 4000 and a destination device 5000. The source device 4000 generates encoded video data. The source device 4000 may also be referred to as a video encoding device or a video encoding device. The destination device 5000 may decode the encoded video data generated by the source device 4000. The destination device 5000 may also be referred to as a video decoding device or a video decoding device.

[0377] Particular embodiments of source device 4000 and destination device 5000, respectively, may be a desktop computer, a mobile computing device, a notebook (e.g., laptop) computer, a tablet computer, a set-top box, a smartphone, a handset, a television, a camera, a display device, a digital media player, a video game console, an in-vehicle computer, or any other similar device.

[0378] The destination device 5000 may receive the encoded video data from the source device 4000 through a channel 6000. The channel 6000 may include one or more media and / or devices capable of transferring the encoded video data from the source device 4000 to the destination device 5000. In one example, the channel 6000 may include one or more communication media capable of enabling the source device 4000 to transmit the encoded video data directly to the destination device 5000 in real time. In this example, the source device 4000 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to the destination device 5000. The one or more communication media may include wireless and / or wired communication media, e.g., a radio frequency (RF) spectrum or one or more physical transmission cables. The one or more communication media may form part of a packet-based network (e.g., a local area network, a wide area network, or a global network (e.g., the Internet)). The one or more communication mediums may include routers, switches, base stations, or other devices that facilitate communication between the source device 4000 and the destination device 5000 .

[0379] In another example, the channel 6000 may include a storage medium that stores the encoded video data generated by the source device 4000. In this example, the destination device 5000 may access the storage medium through disk access or card access. The storage medium may include a number of locally accessible data storage media, such as a Blu-ray disc, a high density digital video disc (DVD), a compact disc read-only memory (CD-ROM), flash memory, or other suitable digital storage media configured to store the encoded video data.

[0380] In another example, the channel 6000 may include a file server or another intermediate storage device that stores the encoded video data generated by the source device 4000. In this example, the destination device 5000 may access the encoded video data stored in the file server or another intermediate storage device through streaming transmission or download. The file server may be any type of server that can store the encoded video data and transmit the encoded video data to the destination device 5000. For example, the file server may include a world wide web (WWW) server (e.g., used for websites), a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive.

[0381] The destination device 5000 can access the encoded video data through a standard data connection (e.g., an Internet connection). Exemplary types of data connections include wireless channels or wired connections (e.g., cable modems), or combinations thereof, suitable for accessing encoded video data stored on a file server. The transmission of the encoded video data from the file server may be a streaming transmission, a download transmission, or a combination thereof.

[0382] The motion vector acquisition method in the present application is not limited to wireless application scenarios. For example, the motion vector acquisition method in the present application may be applied to video encoding and decoding to support multiple multimedia applications, such as wireless television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., over the Internet), encoding video data stored in a data storage medium, decoding video data stored in a data storage medium, or other applications. In some examples, the video encoding and decoding system 7000 may be configured to support one-way or two-way video transmission to support applications such as video streaming transmission, video playback, video broadcasting, and / or video telephony.

[0383] 26, source device 4000 includes a video source 4001, a video encoder 4002, and an output interface 4003. In some examples, output interface 4003 may include a modulator / demodulator (modem) and / or a transmitter. Video source 4001 may include a video capture device (e.g., a video camera), a video archive containing previously captured video data, a video input interface configured to receive video data from a video content provider, and / or a computer graphics system configured to generate video data, or may include a combination of the aforementioned video data sources.

[0384] The video encoder 4002 may encode video data from the video source 4001. In some examples, the source device 4000 transmits the encoded video data directly to the destination device 5000 through the output interface 4003. The encoded video data may further be stored on a storage medium or a file server for the destination device 5000 to later access the encoded video data for decoding and / or playback.

[0385] In the example of FIG. 26, the destination device 5000 includes an input interface 5003, a video decoder 5002, and a display device 5001. In some examples, the input interface 5003 includes a receiver and / or a modem. The input interface 5003 may receive encoded video data over a channel 6000. The display device 5001 may be integrated with the destination device 5000 or may be located external to the destination device 5000. Typically, the display device 5001 displays the decoded video data. The display device 5001 may include multiple types of display devices, such as a liquid crystal display, a plasma display, an organic light emitting diode display, or another type of display device.

[0386] The video encoder 4002 and the video decoder 5002 may operate according to a video compression standard (e.g., the high efficiency video coding H.265 standard) and may conform to the high efficiency video coding (HEVC) test model (HM). The H.265 standard text description ITU-TH.265(V3)(04 / 2015) was released on April 29, 2015 and can be downloaded from http: / / handle.itu.int / 11.1002 / 7000 / 12455. This file is incorporated herein by reference in its entirety.

[0387] Those skilled in the art may recognize that the units and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware in combination with the examples described in the embodiments disclosed herein. Whether a function is performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to go beyond the scope of this application.

[0388] Those skilled in the art can clearly understand that for the sake of convenience and simplicity, the detailed work processes of the above-mentioned systems, devices and units may be referred to the corresponding processes in the method embodiments, and the details will not be described again here.

[0389] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is merely an example. For example, the division into units is merely a logical division of function. In actual implementation, there may be other division ways. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. Indirect couplings or communication connections between devices or units may be implemented electronically, mechanically, or in other ways.

[0390] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, and may be located in one location or distributed over multiple network units. Some or all of those units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0391] In addition, the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.

[0392] When these functions are implemented in the form of software functional units and sold or used as independent products, these functions may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application may be essentially implemented in the form of a software product, or the part that contributes to the prior art, or some of the technical solutions may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. The above storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or a compact disk.

[0393] The above description is merely a specific implementation of the present application, and is not intended to limit the scope of protection of the present application. Any variation or replacement that is easily determined by a person skilled in the art within the technical scope disclosed in the present application falls within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims.

Claims

1. 1. An encoding method implemented by an encoding device, comprising: determining a target offset motion vector and target picture identifier information of a block to be processed, the block to be processed including at least one sub-block to be processed; determining an initial position of a co-located sub-block of the to-be-processed sub-block based on the position of the to-be-processed sub-block and the target offset motion vector; determining the initial position as a target position when the initial position is within a preset area, the preset area being determined based on a position and a size of a coding tree unit CTU in which the block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU; or when the initial position is outside the preset area, determining a position in the preset area that is closest to the initial position as a target position; obtaining a motion vector of the sub-block to be processed based on a motion vector corresponding to the target position; performing motion compensation based on the motion vector of the sub-block to be processed to obtain predicted sample values ​​of the sub-block to be processed; obtaining residual information according to sample values ​​of the block to be processed and predicted sample values ​​of the block to be processed, where the predicted sample values ​​of the block to be processed include the predicted sample values ​​of the sub-block to be processed; and performing a transform, a quantization and an entropy coding on the residual information to obtain an encoded bitstream. method.

2. the preset region is represented by using a horizontal coordinate value range and a vertical coordinate value range, the horizontal coordinate value range including a minimum horizontal coordinate value and a maximum horizontal coordinate value, and the vertical coordinate value range including a minimum vertical coordinate value and a maximum vertical coordinate value; determining the initial position as a target position when the initial position is inside a preset region; or determining a position in the preset region closest to the initial position as a target position when the initial position is outside the preset region; The target position is calculated using the following formula: x (i,j) = Clip3(HorMin,HorMax,x (i,j) ); and and (i,j) =Clip3(ViewMin,ViewMax,and (i,j) ) wherein: HorMin is the minimum horizontal coordinate value, HorMax is the maximum horizontal coordinate value, VerMin is the minimum vertical coordinate value, VerMax is the maximum vertical coordinate value, and Clip3 function is a clipping function, [0070] The steps are defined as follows: The method of claim 1.

3. the initial position includes at least one of a horizontal coordinate or a vertical coordinate; The horizontal coordinate is the horizontal coordinate of the position of the sub-block and the horizontal component of the target offset motion vector (x off ) and The vertical coordinate is the vertical coordinate of the position of the sub-block and the vertical component of the target offset motion vector (y off ) and The method according to claim 1 or 2.

4. The initial position is: [0080] where: (x,y) represents the position coordinates of the block to be processed, i represents the i-th sub-block of the block to be processed in the horizontal direction, j represents the j-th sub-block of the block to be processed in the vertical direction, and (x off ,y off ) represents the values ​​of the components of the target offset motion vector in the horizontal and vertical directions, M and N are the width and height of the sub-block, respectively, and (x (i,j) ,y (i,j) ) represents the initial position of the co-located sub-block corresponding to the (i,j)th sub-block; 4. The method according to any one of claims 1 to 3.

5. (x, y) represents the position coordinates of the upper left vertex of the block to be processed, (i,j) ,y (i,j) 5. The method of claim 4, wherein i,j represents the position coordinates of the center point or top left vertex of a co-located sub-block corresponding to the (i,j)th sub-block in the block to be processed.

6. 2. The method of claim 1, wherein (x+M×i+M / 2, y+N×j+N / 2) represents the position coordinates of the (i,j)th sub-block, (x,y) represents the position coordinates of the block to be processed, i represents the i-th sub-block of the block to be processed in the horizontal direction, j represents the j-th sub-block of the block to be processed in the vertical direction, and M and N are the width and height of the sub-block, respectively.

7. 2. The method of claim 1, wherein the extended range of the temporal motion vector field of the CTU includes: an extended range of the temporal motion vector field of the CTU in a horizontal direction and an extended range of the temporal motion vector field of the CTU in a vertical direction.

8. The method of claim 1 , wherein the extended range values ​​of the temporal motion vector field of the CTU are predetermined values.

9. The preset region is determined by the following formula: HorMin=Max(CTUX-RangeL,0); HorMax=Min(CTUX+CTUW+RangeR-1,PicW-1); VerMin = Max(CTUY - RangeU,0); and VerMax=Min(CTUY+CTUH+RangeB-1,PicH-1) where: HorMin and HorMax are respectively the minimum and maximum values ​​of the preset area in the horizontal direction, VerMin and VerMax are respectively the minimum and maximum values ​​of the preset area in the vertical direction, CTUX and CTUY represent the position coordinates of the CTU in which the block to be processed is included, CTUW and CTUH represent the width and height of the CTU in which the block to be processed is included, RangeU, RangeB, RangeL, and RangeR represent respectively the upward, downward, leftward, and rightward extension values ​​of the temporal motion vector field of the CTU in which the block to be processed is included, and PicW and PicH are respectively the width and height of the target picture.

8. The method of claim 1, 2 or 7.

10. The method of claim 9 , wherein RangeU, RangeB, RangeL or RangeR is a predetermined value.

11. Obtaining a motion vector of the sub-block to be processed based on a motion vector corresponding to the target position: scaling a motion vector corresponding to the target position based on a picture order count POC of a picture including the sub-block to be processed, a POC of a target reference picture of the picture including the sub-block to be processed, a POC of the target picture, and a POC of a target reference picture of the target picture to obtain a motion vector of the sub-block to be processed.

8. The method of claim 1, 2 or 7.

12. The motion vector of the sub-block to be processed is calculated using the following formula: [0097] where: P1 represents the POC of the picture containing the sub-block to be processed, P2 represents the POC of the target reference picture of the picture containing the sub-block to be processed, P3 represents the POC of the target picture, P4 represents the POC of the target reference picture of the target picture, MV represents a motion vector corresponding to the target position, and MV s represents the motion vector of the sub-block to be processed, The method of claim 11.

13. To determine a target offset motion vector for a block to be processed: determining a motion vector of a spatially neighboring block of the block to be processed as the target offset motion vector; 8. The method of claim 1, 2 or 7.

14. The method of claim 1 , 2 or 7 , wherein the target position indicates a target position of the co-located sub-block of the to-be-processed sub-block.

15. The method of claim 1 , 2 or 7, wherein the target offset motion vector is a temporal vector.

16. 1. A decoding method implemented by a decoding device, comprising: determining a target offset motion vector and target picture identifier information of a block to be processed, the block to be processed including at least one sub-block to be processed; determining an initial position of a co-located sub-block of the to-be-processed sub-block based on the position of the to-be-processed sub-block and the target offset motion vector; determining the initial position as a target position when the initial position is within a preset area, the preset area being determined based on a position and a size of a coding tree unit CTU in which the block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU; or when the initial position is outside the preset area, determining a position in the preset area that is closest to the initial position as a target position; obtaining a motion vector of the sub-block to be processed based on a motion vector corresponding to the target position; performing motion compensation based on the motion vector of the sub-block to be processed to obtain predicted sample values ​​of the sub-block to be processed; performing entropy decoding, dequantization and inverse transform on the bitstream to obtain residual information; obtaining reconstructed sample values ​​of the block to be processed according to the residual information and predicted sample values ​​of the block to be processed, the predicted sample values ​​of the block to be processed including the predicted sample values ​​of the sub-block to be processed; method.

17. a memory configured to store video data in the form of a bitstream; a video decoder configured to decode the video data in the form of a bitstream, the decoding process comprising: determining a target offset motion vector and target picture identifier information of a block to be processed, the block to be processed including at least one sub-block to be processed; determining an initial position of a co-located sub-block of the to-be-processed sub-block based on the position of the to-be-processed sub-block and the target offset motion vector; determining the initial position as a target position when the initial position is within a preset area, the preset area being determined based on a position and a size of a coding tree unit CTU in which the block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU; or when the initial position is outside the preset area, determining a position in the preset area that is closest to the initial position as a target position; obtaining a motion vector of the sub-block to be processed based on a motion vector corresponding to the target position; performing motion compensation based on the motion vector of the sub-block to be processed to obtain predicted sample values ​​of the sub-block to be processed; performing entropy decoding, dequantization and inverse transform on the bitstream to obtain residual information; obtaining reconstructed sample values ​​of the block to be processed according to the residual information and predicted sample values ​​of the block to be processed, the predicted sample values ​​of the block to be processed including the predicted sample values ​​of the sub-block to be processed; Decoding device.

18. 18. The decoding device of claim 17, wherein the extended range of the temporal motion vector field of the CTU includes: an extended range of the temporal motion vector field of the CTU in a horizontal direction and an extended range of the temporal motion vector field of the CTU in a vertical direction.

19. a memory configured to store video data, the video data including one or more picture blocks; and a video encoder configured to encode the video data, the encoding process comprising: determining a target offset motion vector and target picture identifier information of a block to be processed, the block to be processed including at least one sub-block to be processed; determining an initial position of a co-located sub-block of the to-be-processed sub-block based on the position of the to-be-processed sub-block and the target offset motion vector; determining the initial position as a target position when the initial position is within a preset area, the preset area being determined based on a position and a size of a coding tree unit CTU in which the block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU; or when the initial position is outside the preset area, determining a position in the preset area that is closest to the initial position as a target position; obtaining a motion vector of the sub-block to be processed based on a motion vector corresponding to the target position; performing motion compensation based on the motion vector of the sub-block to be processed to obtain predicted sample values ​​of the sub-block to be processed; obtaining residual information according to sample values ​​of the block to be processed and predicted sample values ​​of the block to be processed, where the predicted sample values ​​of the block to be processed include the predicted sample values ​​of the sub-block to be processed; and performing a transform, a quantization and an entropy coding on the residual information to obtain an encoded bitstream. Encoding device.

20. The encoding device of claim 19, wherein the extended range of the temporal motion vector field of the CTU includes: an extended range of the temporal motion vector field of the CTU in a horizontal direction and an extended range of the temporal motion vector field of the CTU in a vertical direction.

21. 1. A method for storing a bitstream, the method comprising: receiving a bitstream generated by the method; storing the bitstream on a computer readable medium; The method comprises: determining a target offset motion vector and target picture identifier information of a block to be processed, the block to be processed including at least one sub-block to be processed; determining an initial position of a co-located sub-block of the to-be-processed sub-block based on the position of the to-be-processed sub-block and the target offset motion vector; determining the initial position as a target position when the initial position is within a preset area, the preset area being determined based on a position and a size of a coding tree unit CTU in which the block is included, a size of the target picture, and an extension range of a temporal motion vector field of the CTU; or when the initial position is outside the preset area, determining a position in the preset area that is closest to the initial position as a target position; obtaining a motion vector of the sub-block to be processed based on a motion vector corresponding to the target position; performing motion compensation based on the motion vector of the sub-block to be processed to obtain predicted sample values ​​of the sub-block to be processed; obtaining residual information according to sample values ​​of the block to be processed and predicted sample values ​​of the block to be processed, where the predicted sample values ​​of the block to be processed include the predicted sample values ​​of the sub-block to be processed; and performing a transform, a quantization and an entropy coding on the residual information to obtain an encoded bitstream. method.

22. The method of claim 21 , wherein the extended range of the temporal motion vector field of the CTU includes: an extended range of the temporal motion vector field of the CTU in a horizontal direction and an extended range of the temporal motion vector field of the CTU in a vertical direction.

Citation Information

Patent Citations

  • JPP7177181B