Encoder, decoder and corresponding method for inter prediction

The proposed search space construction for motion vector refinement in video coding enhances compression efficiency by refining motion vectors, addressing the challenge of high compression ratios with minimal quality loss.

JP2025178247AInactive Publication Date: 2025-12-05HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025135499
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-02-28
Filing Date
2025-08-15
Publication Date
2025-12-05
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing video coding technologies face challenges in achieving high compression ratios with minimal sacrifice in picture quality, particularly in limited bandwidth communication networks and memory resources.

Method used

A scheme for constructing a search space for motion vector refinement is introduced, involving a specific order of examining matching costs of search space locations to determine a refinement motion vector, using a 5x5 search space position square and predefined offsets to enhance inter-prediction efficiency.

Benefits of technology

This approach improves video compression by refining motion vectors, leading to enhanced compression ratios with minimal degradation in picture quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025178247000001_ABST
    Figure 2025178247000001_ABST
Patent Text Reader

Abstract

To provide an encoder, a decoder, and corresponding methods for inter prediction.SOLUTION: An inter prediction method comprises: obtaining an initial motion vector for a current block; determining search space positions according to the initial motion vector; checking matching costs of the search space positions according to a checking order to select a target search space position with a minimal matching cost; and determining a refining motion vector of the current block based on the initial motion vector and the target search space position. A central search space position is checked first according to the checking order, and the central search space position is pointed to by the initial motion vector.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to U.S. Provisional Patent Application No. 62 / 791,869, filed January 13, 2019, and U.S. Provisional Patent Application No. 62 / 812,190, filed February 28, 2019, the entire contents of which are incorporated herein by reference.

[0002] TECHNICAL FIELD Embodiments of the present application relate generally to the field of picture processing, and more particularly to inter prediction. [Background technology]

[0003] Video coding (video encoding and video decoding) is used in a wide range of digital video applications, such as broadcast digital TV, video transmission over the Internet and mobile networks, real-time interactive applications such as video chat and video conferencing, DVD and Blu-ray® discs, video content collection and editing systems, and camcorders for security applications.

[0004] The amount of video data required to render even a relatively short video can be considerable, which can pose challenges when the data is to be streamed or otherwise communicated over communication networks with limited bandwidth capacity. Therefore, video data is typically compressed before being communicated over modern telecommunications networks. Because memory resources may be limited, video size can also be an issue when the video is stored on a storage device. Video compression devices often use software and / or hardware at the source to code video data before transmission or storage, thereby reducing the amount of data needed to represent a digital video image. The compressed data is then received at the destination by a video decompression device, which decodes the video data. With limited network resources and an ever-increasing demand for higher video quality, improved compression and decompression techniques that improve compression ratios with little sacrifice in picture quality are desirable. Summary of the Invention [Means for solving the problem]

[0005] A scheme for constructing a search space for motion vector refinement is provided, and several test orders for testing the matching costs of search space locations within the search space are presented in this application.

[0006] Embodiments of the present application provide apparatus and methods for encoding and decoding according to the independent claims.

[0007] In a first aspect of the present application, an inter-prediction method includes obtaining an initial motion vector for a current block; determining a search space position according to the initial motion vector; examining the matching costs of the search space positions according to a check order to select a target search space position having the smallest matching cost; and determining a refinement motion vector for the current block based on the initial motion vector and the target search space position, wherein a central search space position is examined first according to the check order, and the central search space position is pointed to by the initial motion vector.

[0008] In a possible implementation, the search space positions comprise a central search position and adjacent search space positions, and determining the search space positions according to the initial motion vector comprises determining the central search space position according to the initial motion vector and determining the adjacent search space positions according to one or more preset offsets and the central search space position.

[0009] In a possible implementation, the search space is made up of search space positions, and the pattern of the search space is a 5x5 search space position square.

[0010] In a possible implementation, examining the match costs of the search space locations according to the examination order to select a target search space location having the smallest match cost comprises examining the match cost of each of the search space locations in turn according to the examination order, and selecting the search space location among the search space locations having the smallest match cost as the target search space location.

[0011] In a possible implementation, examining the match cost of each of the search space locations in turn according to the examination order may include comparing the match cost of one of the search space locations with a temporary minimum match cost; when the match cost of one of the search space locations is less than the temporary minimum match cost, setting the match cost of one of the search space locations as the temporary minimum match cost; and setting the temporary minimum match cost as the minimum match cost after the last one of the search space locations has been examined.

[0012] In a possible implementation, the center search space position is set as (0,0) of the coordinate system, horizontal right is set as the positive horizontal direction, and vertical down is set as the positive vertical direction.

[0013] In a possible implementation, the testing order is (0,0), (-2,-2), (-1,-2), (0,-2), (1,-2), (2,-2), (-2,-1), (-1,-1), (0,-1), (1,-1), (2,-1), (-2,0), (-1,0), (1,0), (2,0), (-2,1), (-1,1), (0,1), (1,1), (2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2).

[0014] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (-2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2), (2,1), (2,0), (2,-1), (2,-2), (1,-2), (0,-2), (-1,-2), (-2,-2), (-2,-1).

[0015] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-1), (-2,1), (-2,2), (-1,2), (1,2), (2,2), (2,1), (2,-1), (2,-2), (1,-2), (-1,-2), (-2,-2).

[0016] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-2), (-2,2), (2,2), (2,-2), (-2,-1), (-2,1), (-1,2), (1,2), (2,1), (2,-1), (1,-2), (-1,-2).

[0017] In a second aspect of the present application, an inter-prediction device includes an acquisition module configured to acquire an initial motion vector for a current block; a setting module configured to determine a search space position according to the initial motion vector; a calculation module configured to examine the matching costs of the search space positions according to a check order to select a target search space position having the smallest matching cost; and a prediction module configured to determine a refined motion vector for the current block based on the initial motion vector and the target search space position, wherein a central search space position is examined first according to the check order, and the central search space position is pointed to by the initial motion vector.

[0018] In a possible implementation, the search space positions include a center search position and adjacent search space positions, and the setting module is configured to determine the center search space position according to an initial motion vector and to determine the adjacent search space positions according to one or more preset offsets and the center search space position.

[0019] In a possible implementation, the search space is made up of search space positions, and the pattern of the search space is a 5x5 search space position square.

[0020] In a possible implementation, the calculation module is configured to examine the match cost of each of the search space locations in turn according to the examination order, and select the search space location with the smallest match cost among the search space locations as the target search space location.

[0021] In a possible implementation, the calculation module compares the match cost of one of the search space locations with a temporary minimum match cost, and when the match cost of one of the search space locations is smaller than the temporary minimum match cost, sets the match cost of one of the search space locations as the temporary minimum match cost; After the last one of the search space locations has been examined, the temporary minimum match cost is configured to be set as the minimum match cost.

[0022] In a possible implementation, the center search space position is set as (0,0) of the coordinate system, horizontal right is set as the positive horizontal direction, and vertical down is set as the positive vertical direction.

[0023] In a possible implementation, the testing order is (0,0), (-2,-2), (-1,-2), (0,-2), (1,-2), (2,-2), (-2,-1), (-1,-1), (0,-1), (1,-1), (2,-1), (-2,0), (-1,0), (1,0), (2,0), (-2,1), (-1,1), (0,1), (1,1), (2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2).

[0024] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (-2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2), (2,1), (2,0), (2,-1), (2,-2), (1,-2), (0,-2), (-1,-2), (-2,-2), (-2,-1).

[0025] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-1), (-2,1), (-2,2), (-1,2), (1,2), (2,2), (2,1), (2,-1), (2,-2), (1,-2), (-1,-2), (-2,-2).

[0026] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-2), (-2,2), (2,2), (2,-2), (-2,-1), (-2,1), (-1,2), (1,2), (2,1), (2,-1), (1,-2), (-1,-2).

[0027] In a third aspect of the present application, there is provided a method for determining a motion vector to be used in inter-prediction of a current block of a video picture (or frame), the method comprising: obtaining an initial motion vector; obtaining at least two groups of points (in one example, one group of points may comprise only one point) according to the initial motion vector; and obtaining a motion vector for the current block according to the at least two groups of points and a cost function.

[0028] In a possible implementation, the at least two groups of points comprise all points that lie inside a square, the square being centered on the point that corresponds to the initial motion vector.

[0029] In a possible implementation, the at least two groups of points comprise all points that lie inside a square, the corners of which are determined by the coordinates (-2,-2), (2,2), (-2,2), and (2,-2).

[0030] In a possible implementation, a first group of points of the at least two groups of points comprises a center point pointed to by an initial motion vector.

[0031] In a possible implementation, the second group of points among the at least two groups of points comprises four points that are neighbors to the left, above, right, and below of a center point, and the center point is pointed to by an initial motion vector.

[0032] In a possible implementation, a third group of points among the at least two groups of points comprises four points that are one pixel sample away from the center point and that are not included in the second group.

[0033] In a possible implementation, a fourth group of points among the at least two groups of points comprises points that are two pixel samples away from the center point in at least one coordinate axis.

[0034] In a possible implementation, when the at least two groups of points are processed with the cost function, the at least two groups of points are processed in order.

[0035] In a possible implementation, a fourth group of points among the at least two groups of points comprises points that are 2 pixel samples away from the center point on one coordinate axis and 0 pixel samples away from the center point on the other coordinate axis.

[0036] In a possible implementation, a fifth group of points among the at least two groups of points comprises points that are two pixel samples away from the center point in at least one coordinate axis and that are not included in the fourth group of points.

[0037] In a possible implementation, a fifth group of points among the at least two groups of points comprises points that are two pixel samples away from the center point on both the -x and -y coordinate axes.

[0038] In a possible implementation, a sixth group of points among the at least two groups of points comprises points that are two pixel samples away from the center point in at least one coordinate axis and that are not included in the fourth or fifth groups of points.

[0039] In a possible implementation, a fourth group of points among the at least two groups of points comprises points that are 2 pixel samples away from the center point in only one coordinate axis and 0 pixel samples away from the center point in the other coordinate axis.

[0040] In a possible implementation, when one group of points among at least two groups of points comprises at least two points, the points of the groups are ordered according to a predefined rule.

[0041] In a possible implementation, when one group of points among at least two groups of points comprises at least two points, the leftmost point of the group of points is selected as the first point of the group of points.

[0042] In a possible implementation, when one group of points among at least two groups of points has at least two points, and there are two or more points that are the leftmost points of the group of points, the point that is the leftmost in the group and has a coordinate displacement closer to 0 in the vertical direction (-y direction) is selected as the first point in the group of points.

[0043] In a possible implementation, when one group of points among at least two groups of points has at least two points, and there are two or more leftmost points in the group of points, and the points have the same displacement in the -y direction, the leftmost point in the upward direction is selected as the first point of the group of points.

[0044] In a possible implementation, when one group of points among at least two groups of points comprises at least two points, and after the first point in the group of points is determined, the remaining points in the same group are ordered based on a clockwise or counterclockwise scanning of the points around a central point.

[0045] In a possible implementation, the initial motion vector corresponds to a motion vector that is derived using an index signaled in the bitstream.

[0046] In a possible implementation, the initial motion vector and the derived motion vectors are not coded into the bitstream.

[0047] In a fourth aspect of the present application, a computer program product comprises program code for, when executed on a computer or processor, performing a method according to the first or third aspect.

[0048] In a fifth aspect of the present application, a decoder comprises one or more processors and a non-transitory computer-readable storage medium coupled to the processors and storing programming for execution by the processors, the programming, when executed by the processors, configuring the decoder to perform a method according to the first or third aspect.

[0049] In a sixth aspect of the present application, an encoder comprises one or more processors and a non-transitory computer-readable storage medium coupled to the processors and storing programming for execution by the processors, the programming, when executed by the processors, configuring the encoder to perform a method according to the first or third aspect.

[0050] In a seventh aspect of the present application, a non-transitory computer readable medium carries program code that, when executed by a computing device, causes the computing device to perform the method of the first or third aspect.

[0051] These and other objects are achieved by the subject matter of the independent claims. Further implementations are evident from the dependent claims, the description and the figures.

[0052] Particular embodiments are outlined in the accompanying independent claims, with further embodiments in the dependent claims.

[0053] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims.

[0054] In the following, embodiments of the present application will be described in more detail with reference to the accompanying figures and drawings. [Brief explanation of the drawings]

[0055] [Figure 1A] 1 is a block diagram illustrating an example of a video coding system configured to implement embodiments of the present application. [Figure 1B] 1 is a block diagram illustrating another example of a video coding system configured to implement embodiments of the present application. [Figure 2] 1 is a block diagram illustrating an example of a video encoder configured to implement embodiments of the present application. [Figure 3] 1 is a block diagram illustrating an exemplary structure of a video decoder configured to implement embodiments of the present application. [Figure 4] FIG. 1 is a block diagram illustrating an example of an encoding device or a decoding device. [Figure 5] FIG. 10 is a block diagram showing another example of an encoding device or a decoding device. [Figure 6] FIG. 10 is a block diagram illustrating another example of a prediction method. [Figure 7] FIG. [Figure 8] FIG. 10 is another diagram of the inspection sequence. [Figure 9]FIG. 10 is another diagram of the inspection sequence. [Figure 10] FIG. 10 is another diagram of the inspection sequence. [Figure 11] FIG. 10 is another diagram of the inspection sequence. [Figure 12] FIG. 10 is another diagram of the inspection sequence. [Figure 13] FIG. 10 is another diagram of the inspection sequence. [Figure 14] FIG. 10 is another diagram of the inspection sequence. [Figure 15] 1 is a block diagram illustrating an example of a prediction device configured to implement embodiments of the present application. [Figure 16] FIG. 1 is a block diagram illustrating an example of an encoding device or a decoding device. [Figure 17] 31 is a block diagram illustrating an exemplary structure of a content supply system 3100 for implementing a content distribution service. [Figure 18] FIG. 2 is a block diagram illustrating the structure of an example of a terminal device. DETAILED DESCRIPTION OF THE INVENTION

[0056] In the following, identical reference signs, unless expressly specified otherwise, refer to identical or at least functionally equivalent features.

[0057] In the following description, reference is made to the accompanying figures, which form a part of this disclosure and which show, by way of example, certain aspects of the embodiments of the present application or in which the embodiments of the present application may be used. It is understood that the embodiments of the present application may be used in other ways and may include structural or logical changes not shown in the figures. Therefore, the following detailed description is not to be taken in a limiting sense, and the scope of the present application is defined by the appended claims.

[0058] For example, it is understood that disclosure regarding a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more particular method steps are described, a corresponding device may include one or more units (e.g., one unit that performs one or more steps, or multiple units that each perform one or more of the steps), e.g., functional units, for performing the described one or more method steps, even if such one or more units are not explicitly described or shown in a figure. On the other hand, when a particular apparatus is described, for example, based on one or more units, e.g., functional units, a corresponding method may include one step (e.g., one step that performs the function of one or more units, or multiple steps that each perform one or more functions of multiple units) for performing the function of one or more units, even if such one or more steps are not explicitly described or shown in a figure. Furthermore, it is understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless specifically stated otherwise.

[0059] Video coding typically refers to the processing of a sequence of pictures to form a video or video sequence. Instead of the term "picture," the terms "frame" or "image" may be used synonymously in the field of video coding. Video coding (or, in general, coding) comprises two parts: video encoding and video decoding. Video encoding is performed at the source side and typically comprises processing an original video picture (e.g., by compression) to reduce the amount of data needed to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination side and typically comprises the reverse process compared to an encoder to reconstruct a video picture. Embodiments referring to "coding" a video picture (or, in general, a picture) shall be understood to relate to "encoding" or "decoding" a video picture or a respective video sequence. The combination of the encoding and decoding parts is also called a codec (coding and decoding).

[0060] In the case of lossless video coding, the original video picture can be reconstructed, i.e., the reconstructed video picture has the same quality as the original video picture (assuming there is no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression is performed, e.g., by quantization, to reduce the amount of data representing the video picture, and the video picture cannot always be perfectly reconstructed at the decoder, i.e., the quality of the reconstructed video picture is lower, i.e., worse, than the quality of the original video picture.

[0061] Some video coding standards belong to the group of "lossy hybrid video codecs" (i.e., they combine spatial and temporal prediction in the sample domain with 2D transform coding for applying quantization in the transform domain). Each picture of a video sequence is typically partitioned into a set of non-overlapping blocks, and coding is typically performed at the block level. In other words, at an encoder, video is typically processed or encoded at the block (video block) level, for example, by using spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to generate a predictive block, subtracting the predictive block from a current block (the block currently being / to be processed) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transform domain to reduce (compress) the amount of data to be transmitted; while at a decoder, inverse processing is applied to the coded or compressed block compared to the encoder to reconstruct the current block for representation. Furthermore, the encoder replicates the decoder processing loop to process or code subsequent blocks, so that both generate the same predictions (e.g., intra-prediction and inter-prediction) and / or reconstructions.

[0062] In the following, embodiments of a video coding system 10, a video encoder 20, and a video decoder 30 will be described based on FIGS.

[0063] 1A is a schematic block diagram illustrating an example coding system 10, e.g., video coding system 10 (or short coding system 10), that may utilize the techniques of the present application. A video encoder 20 (or short encoder 20) and a video decoder 30 (or short decoder 30) of video coding system 10 represent examples of devices that may be configured to perform techniques according to various examples described herein.

[0064] As shown in FIG. 1A, coding system 10 includes a source device 12 configured to provide encoded picture data 21 to a destination device 14 for decoding, for example, encoded picture data 13.

[0065] Source device 12 comprises an encoder 20 and may additionally, i.e., optionally, comprise a picture source 16, a preprocessor (or preprocessing unit) 18, for example a picture preprocessor 18, and a communication interface or unit 22.

[0066] Picture source 16 may comprise or be any kind of picture capture device, e.g., a camera for capturing real-world pictures, and / or any kind of picture generation device, e.g., a computer graphics processor for generating computer-animated pictures, or any kind of other device for obtaining and / or providing real-world pictures, computer-generated pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). Picture source may be any kind of memory or storage that stores any of the above-mentioned pictures.

[0067] In contrast to the preprocessor 18 and the processing performed by the preprocessing unit 18 , the pictures or picture data 17 are sometimes referred to as raw pictures or raw picture data 17 .

[0068] The pre-processor 18 is configured to receive (raw) picture data 17 and perform pre-processing on the picture data 17 to obtain a pre-processed picture 19 or pre-processed picture data 19. The pre-processing performed by the pre-processor 18 may comprise, for example, cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or noise removal. It may be understood that the pre-processing unit 18 may be an optional component.

[0069] Video encoder 20 is configured to receive pre-processed picture data 19 and provide encoded picture data 21 (further details are described below, eg, with reference to FIG. 2).

[0070] The communications interface 22 of the source device 12 may be configured to receive the encoded picture data 21 and transmit the encoded picture data 21 (or any further processed version thereof) via the communications channel 13 to another device, e.g., the destination device 14 or any other device, for storage or direct reconstruction.

[0071] The destination device 14 includes a decoder 30 (e.g., a video decoder 30), and may additionally, i.e., optionally, include a communication interface or communication unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.

[0072] The communication interface 28 of the destination device 14 is configured to receive the coded picture data 21 (or any further processed version thereof), for example, directly from the source device 12 or from any other source, for example, a storage device, for example, a coded picture data storage device, and to provide the coded picture data 21 to the decoder 30.

[0073] The communication interface 22 and the communication interface 28 may be configured to transmit or receive the encoded picture data 21 or the encoded data 13 via a direct communication link between the source device 12 and the destination device 14, e.g., a direct wired connection or a direct wireless connection, or via any type of network, e.g., a wired network or a wireless network or any combination thereof, or any type of private network and public network, or any type of combination thereof.

[0074] The communications interface 22 may be configured, for example, to package the encoded picture data 21 in a suitable format, e.g., in packets, and / or to process the encoded picture data using any type of transmission encoding or transmission processing for transmission over a communications link or network.

[0075] The communications interface 28, which forms the counterpart of the communications interface 22, may be configured, for example, to receive transmitted data and process the transmitted data using any type of corresponding transmission decoding or transmission processing and / or depackaging to obtain the encoded picture data 21.

[0076] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrow for communication channel 13 in FIG. 1A pointing from source device 12 to destination device 14, or as bidirectional communication interfaces, and may be configured to send and receive messages, for example, to set up a connection, to acknowledge, respond, and exchange any other information related to the communication link and / or data transmission, e.g., coded picture data transmission.

[0077] The decoder 30 is configured to receive the coded picture data 21 and to provide decoded picture data 31 or decoded pictures 31 (further details are described below, for example, based on Figure 3 or Figure 5).

[0078] Post-processor 32 of destination device 14 is configured to post-process decoded picture data 31 (also referred to as reconstructed picture data), e.g., decoded picture 31, to obtain post-processed picture data 33, e.g., post-processed picture 33. The post-processing performed by post-processing unit 32 may comprise, e.g., color format conversion (e.g., from YCbCr to RGB), color correction, cropping or resampling, or any other processing to prepare decoded picture data 31 for, e.g., display, by display device 34.

[0079] Display device 34 of destination device 14 is configured to receive post-processed picture data 33, e.g., for displaying the picture to a user or viewer. Display device 34 may be or comprise any type of display for presenting the reconstructed picture, e.g., an integrated or external display or monitor. The display may comprise, e.g., a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro-LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.

[0080] 1A depicts source device 12 and destination device 14 as separate devices, device embodiments may also include both source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such embodiments, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software, or by separate hardware and / or software, or any combination thereof.

[0081] As will be clear to those skilled in the art based on the description, the presence and (exact) division of functions of different units or functions within source device 12 and / or destination device 14 as shown in FIG. 1A may vary depending on the actual device and application.

[0082] Encoder 20 (e.g., video encoder 20) or decoder 30 (e.g., video decoder 30), or both encoder 20 and decoder 30, may be implemented via processing circuitry as shown in FIG. 1B , such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, hardware, dedicated to video coding, or any combination thereof. Encoder 20 may be implemented via processing circuitry 46 to embody various modules as described with respect to encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. Decoder 30 may be implemented via processing circuitry 46 to embody various modules as described with respect to decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. The processing circuitry may be configured to perform various operations as described below. As shown in FIG. 5, if the techniques are implemented partially in software, a device may store instructions for the software in a suitable non-transitory computer-readable storage medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Either video encoder 20 and video decoder 30 may be integrated into a single device as part of a combined encoder / decoder (codec), for example, as shown in FIG. 1B.

[0083] Source device 12 and destination device 14 may comprise any of a wide range of devices, including any type of handheld or fixed device, e.g., a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming device (such as a content service server or content distribution server), a broadcast receiver device, a broadcast transmitter device, etc., and may use no operating system or any type of operating system. In some cases, source device 12 and destination device 14 may be equipped for wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.

[0084] 1A is merely an example, and the techniques of the present application may be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between encoding and decoding devices. In other examples, data may be retrieved from local memory, streamed over a network, etc. A video encoding device may encode and store data in memory, and / or a video decoding device may retrieve and decode data from memory. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but simply encode data to memory and / or retrieve and decode data from memory.

[0085] For ease of explanation, embodiments of the present application are described herein by reference to, for example, High-Efficiency Video Coding (HEVC) or to reference software for Versatile Video Coding (VVC), the next-generation video coding standard developed by the Joint Collaboration Team on Video Coding (JCT-VC) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG). Those skilled in the art will understand that embodiments of the present application are not limited to HEVC or VVC.

[0086] Encoder and encoding method FIG. 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the techniques of the present application. In the example of FIG. 2, the video encoder 20 includes an input unit 201 (or an input interface 201), a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210 and an inverse transform processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, an entropy coding unit 270, and an output unit 272 (or an output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a partitioning unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 shown in FIG. 2 may also be referred to as a hybrid video encoder, i.e., a video encoder using a hybrid video codec.

[0087] The residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 may be referred to as forming a forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may be referred to as forming a backward signal path of the video encoder 20, which corresponds to the signal path of a decoder (see video decoder 30 in FIG. 3 ). The inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 are also referred to as forming a “built-in decoder” of the video encoder 20.

[0088] Pictures and picture divisions (pictures and blocks) The encoder 20 may be configured to receive, e.g., via an input 201, a picture 17 (or picture data 17), e.g., a picture of a sequence of pictures forming a video or a video sequence. The received picture or picture data may also be a preprocessed picture 19 (or preprocessed picture data 19). For simplicity, the following description refers to the picture 17. The picture 17 may also be called the current picture or the picture to be coded (particularly in video coding, to distinguish the current picture from other pictures, e.g., previously coded and / or decoded pictures, of the same video sequence, i.e., the video sequence that also comprises the current picture).

[0089] A (digital) picture may be, or may be considered as, a two-dimensional array or matrix of samples with intensity values. The samples in the array are sometimes called pixels (picture elements in short form) or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. For color representation, three color components are usually employed, i.e., a picture may be represented by or contain three sample arrays. In an RBG format or color space, a picture comprises corresponding red, green, and blue sample arrays. However, in video coding, each pixel is usually represented in a luminance and chrominance format or color space, e.g., YCbCr, which comprises a luminance component denoted by Y (although sometimes L is also used instead) and two chrominance components denoted by Cb and Cr. The luminance (or short luma) component Y represents brightness or gray-level intensity (e.g., as in a grayscale picture), and the two chrominance (or short chroma) components Cb and Cr represent chromaticity or color information components. Thus, a picture in YCbCr format comprises a luminance sample array of luminance sample values ​​(Y) and two chrominance sample arrays of chrominance values ​​(Cb and Cr). A picture in RGB format may be converted or transformed to YCbCr format, or vice versa, a process also called color transformation or color conversion. If a picture is monochrome, the picture may comprise only a luminance sample array. Thus, a picture may be, for example, an array of luma samples in monochrome format, or an array of luma samples and two corresponding arrays of chroma samples in 4:2:0, 4:2:2, and 4:4:4 color formats.

[0090] Embodiments of video encoder 20 may include a picture partition unit (not shown in FIG. 2 ) configured to partition picture 17 into multiple (usually non-overlapping) picture blocks 203. These blocks are sometimes called root blocks, macroblocks (H.264 / AVC), or coding tree blocks (CTBs) or coding tree units (CTUs) (H.265 / HEVC and VVC). The picture partition unit may be configured to use the same block size for all pictures of a video sequence and a corresponding grid that defines the block sizes, or to vary the block size among pictures or subsets or groups of pictures, and to partition each picture into corresponding blocks.

[0091] In further embodiments, the video encoder may be configured to directly receive blocks 203 of picture 17, e.g., one, several, or all of the blocks that form picture 17. Picture blocks 203 may also be referred to as current picture blocks or picture blocks to be coded.

[0092] Like picture 17, picture block 203 may again be, or may be considered to be, a two-dimensional array or matrix of samples having intensity values ​​(sample values), but with smaller dimensions than picture 17. In other words, block 203 may comprise, for example, one sample array (e.g., a luma array in the case of a monochrome picture 17, or a luma array or a chroma array in the case of a color picture), or three sample arrays (e.g., a luma array and two chroma arrays in the case of a color picture 17), or any other number and / or type of array depending on the applied color format. The number of samples in the horizontal and vertical directions (or axes) of block 203 define the size of block 203. Thus, a block may be, for example, an M×N (M columns by N rows) array of samples, or an M×N array of transform coefficients.

[0093] An embodiment of video encoder 20, such as that shown in FIG. 2, may be configured to encode picture 17 block-by-block, eg, encoding and prediction is performed on a block-by-block basis.

[0094] An embodiment of video encoder 20 as shown in FIG. 2 may further be configured to partition and / or encode pictures by using slices (also called video slices), where a picture may be partitioned into or encoded using one or more (typically non-overlapping) slices, each of which may comprise one or more blocks (e.g., CTUs) or one or more groups of blocks (e.g., tiles (H.265 / HEVC and VVC) or bricks (VVC)).

[0095] An embodiment of video encoder 20 as shown in FIG. 2 may be further configured to partition and / or encode a picture by using slice / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned into or encoded using one or more (typically non-overlapping) slice / tile groups, each of which may comprise, for example, one or more blocks (e.g., CTUs) or one or more tiles, and each tile may, for example, be rectangular in shape and comprise one or more blocks (e.g., CTUs), e.g., whole or fractional blocks.

[0096] Residual calculation The residual calculation unit 204 may be configured to calculate the residual block 205 (also referred to as the residual 205) based on the picture block 203 and the prediction block 265 (further details about the prediction block 265 will be provided later), for example, by subtracting the sample values ​​of the prediction block 265 from the sample values ​​of the picture block 203 on a sample-by-sample (pixel-by-pixel) basis to obtain the residual block 205 in the sample domain.

[0097] conversion The transform processing unit 206 may be configured to apply a transform, for example, a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values ​​of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and may represent the residual block 205 in the transform domain.

[0098] Transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified for H.265 / HEVC. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by several factors. To preserve the norm of the residual block processed by the forward and inverse transforms, an additional scaling factor is applied as part of the transform process. The scaling factor is typically chosen based on several constraints, such as the scaling factor being a power of two due to shift operations, the bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. For example, a particular scaling factor may be specified for, e.g., the inverse transform by inverse transform processing unit 212 (and the corresponding inverse transform by, e.g., inverse transform processing unit 312 in video decoder 30), and a corresponding scaling factor for the forward transform by, e.g., transform processing unit 206 in encoder 20 may be specified accordingly.

[0099] An embodiment of video encoder 20 (respectively, transform processing unit 206) may be configured to output transform parameters, e.g., one or more types of transform, encoded or compressed, e.g., directly or via entropy coding unit 270, so that, for example, video decoder 30 may receive and use the transform parameters for decoding.

[0100] Quantization The quantization unit 208 may be configured to quantize the transform coefficients 207, for example, by applying scalar quantization or vector quantization, to obtain quantized coefficients 209. The quantized coefficients 209 may also be referred to as quantized transform coefficients 209 or quantized residual coefficients 209.

[0101] The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be truncated to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, in the case of scalar quantization, various scalings may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The applicable quantization step size may be indicated by the quantization parameter (QP). The quantization parameter may, for example, be an index into a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to fine quantization (small quantization step size) and a large quantization parameter may correspond to coarse quantization (large quantization step size), or vice versa. Quantization may include division by a quantization step size, and corresponding inverse quantization and / or inverse dequantization, e.g., by the inverse quantization unit 210, may include multiplication by the quantization step size. Some standards, e.g., HEVC, embodiments may be configured to use a quantization parameter to determine the quantization step size. Generally, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of an equation involving division. Additional scaling factors may be introduced for quantization and inverse quantization to restore the norm of the residual block, which may be modified due to scaling used in the fixed-point approximation of the equation for the quantization step size and the quantization parameter. In one exemplary implementation, the scaling of the inverse transform and inverse quantization may be combined. Alternatively, customized quantization tables may be used and may be signaled, e.g., in the bitstream, from the encoder to the decoder. Quantization is a lossy operation, and loss increases with increasing quantization step size.

[0102] Embodiments of video encoder 20 (respectively, quantization unit 208) may be configured to output a quantization parameter (QP), e.g., encoded directly or via entropy coding unit 270, so that, for example, video decoder 30 may receive and apply the quantization parameter for decoding.

[0103] inverse quantization The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 to the quantized coefficients to obtain the inverse quantized coefficients 211, e.g., by applying the inverse of the quantization scheme applied by the quantization unit 208, based on or using the same quantization step size as the quantization unit 208. The inverse quantized coefficients 211, which are sometimes referred to as the inverse quantized residual coefficients 211, may correspond to the transform coefficients 207, although they are not typically identical to the transform coefficients due to loss due to quantization.

[0104] Inverse transformation The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, for example, an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), or other inverse transform, to obtain a reconstructed residual block 213 in the sample domain (or corresponding dequantized coefficients 213). The reconstructed residual block 213 may also be referred to as a transform block 213.

[0105] Reconstruction The reconstruction unit 214 (e.g., an adder or summer 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain the reconstructed block 215 in the sample domain, for example, by adding the sample values ​​of the reconstructed residual block 213 and the sample values ​​of the prediction block 265 - sample by sample.

[0106] Filtering The loop filter unit 220 (or short "loop filter" 220) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or generally, to filter the reconstructed samples to obtain filtered sample values. The loop filter unit is configured, for example, to smooth pixel transitions or otherwise improve video quality. The loop filter unit 220 may include one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or one or more other filters, for example, an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In one example, the loop filter unit 220 may include a deblocking filter, an SAO filter, and an ALF filter. The order of the filtering process may be deblocking filter, SAO, and ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., adaptive in-loop reshaper) is added. This process is performed before deblocking. In another example, the deblocking filter process may also be applied to interior sub-block edges, such as affine sub-block edges, ATMVP sub-block edges, sub-block transform (SBT) edges, and intra sub-partition (ISP) edges. Although loop filter unit 220 is shown in FIG. 2 as being an in-loop filter, in other configurations, loop filter unit 220 may be implemented as a post-loop filter. Filtered block 221 may also be referred to as filtered reconstruction block 221.

[0107] An embodiment of video encoder 20 (respectively, loop filter unit 220) may be configured to output loop filter parameters (such as SAO filter parameters or ALF filter parameters or LMCS parameters), e.g., encoded directly or via entropy encoding unit 270, so that, for example, decoder 30 may receive and apply the same loop filter parameters or respective loop filters for decoding.

[0108] Decoded Picture Buffer The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures or generally reference picture data for encoding video data by video encoder 20. The DPB 230 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may further be configured to store other previously filtered blocks, e.g., previously reconstructed and filtered blocks 221 of the same current picture or of a different picture, e.g., a previously reconstructed picture, and may provide, for example, a previously reconstructed or decoded overall picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples) for inter prediction. For example, if the reconstructed block 215 has not been filtered by the loop filter unit 220 or is any other further processed version of a reconstructed block or sample, the decoded picture buffer (DPB) 230 may also be configured to store one or more unfiltered reconstructed blocks 215, or generally, unfiltered reconstructed samples.

[0109] Mode Selection (Segmentation and Prediction) The mode select unit 260 includes a partition unit 262, an inter prediction unit 244, and an intra prediction unit 254, and is configured to receive or obtain original picture data, e.g., original block 203 (current block 203 of current picture 17), and reconstructed picture data, e.g., filtered and / or unfiltered reconstructed samples or blocks, from the decoded picture buffer 230 or other buffers (e.g., line buffers, not shown) of the same (current) picture and / or from one or more previously decoded pictures. The reconstructed picture data is used as reference picture data for prediction, e.g., inter prediction or intra prediction, to obtain a prediction block 265 or predictor 265.

[0110] The mode selection unit 260 may be configured to determine or select a partition for the current block prediction mode (not including the partition) and a prediction mode (e.g., intra or inter prediction mode) and generate a corresponding prediction block 265 used for calculating the residual block 205 and for reconstructing the reconstruction block 215.

[0111] Embodiments of the mode selection unit 260 may be configured to select a partition and prediction mode (e.g., from those supported by or available to the mode selection unit 260) that gives the best match, or in other words, the smallest residual (smallest residual means better compression for transmission or storage), or the smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or considers both, or balances both. The mode selection unit 260 may be configured to determine the partition and prediction mode based on rate distortion optimization (RDO), i.e., select the prediction mode that results in the smallest rate distortion. Terms such as “best,” “minimum,” “optimal,” etc. in this context do not necessarily refer to an overall “best,” “minimum,” “optimal,” etc., but may refer to the satisfaction of a termination or selection criterion, such as a value above or below a threshold or other constraint, potentially leading to a “suboptimal selection,” but reducing computational effort and processing time.

[0112] In other words, the partitioning unit 262 may be configured to partition a picture from a video sequence into a sequence of coding tree units (CTUs), which may be further partitioned into smaller block partitions or sub-blocks (which again form blocks), for example using quadtree partitioning (QT), binary partitioning (BT), or triple tree partitioning (TT), or any combination thereof, and to perform prediction on each of the block partitions or sub-blocks, for example, wherein mode selection comprises selecting a tree structure of the partitioned block 203, and a prediction mode is applied to each of the block partitions or sub-blocks.

[0113] Below, the partitioning (eg, by partitioning unit 260) and prediction processes (by inter-prediction unit 244 and intra-prediction unit 254) performed by exemplary video encoder 20 are described in more detail.

[0114] classification The partition unit 262 may be configured to partition a picture from a video sequence into a sequence of coding tree units (CTUs), and the partition unit 262 may partition (i.e., divide) the coding tree units (CTUs) 203 into smaller partitions, e.g., smaller blocks of square or rectangular size. For a picture with three sample arrays, a CTU consists of an N×N block of luma samples along with two corresponding blocks of chroma samples. The maximum allowable size of a luma block in a CTU is specified to be 128×128 in the Versatile Video Coding (VVC) standard, but may be specified as a value other than 128×128, e.g., 256×256, in the future. The CTUs of a picture may be clustered / grouped as slices / tile groups, tiles, or bricks. A tile covers a rectangular area of ​​the picture, and a tile may be divided into one or more bricks. A brick consists of several CTU rows within the tile. A tile that is not partitioned into multiple bricks may be referred to as a brick. However, a brick is a true subset of a tile and is not called a tile. There are two modes of tile groups supported in VVC: raster scan slice / tile group mode and rectangular slice mode. In raster scan tile group mode, a slice / tile group contains a sequence of tiles in a tile raster scan of a picture. In rectangular slice mode, a slice contains several bricks of a picture that collectively form a rectangular region of the picture. The bricks within a rectangular slice are in the order of the brick raster scan of the slice. These smaller blocks (sometimes called sub-blocks) can be further partitioned into even smaller partitions.This is also called tree partitioning or hierarchical tree partitioning; for example, a root block at root tree level 0 (hierarchical level 0, depth 0) may be recursively partitioned, e.g., into two or more blocks at the next lower tree level, e.g., nodes at tree level 1 (hierarchical level 1, depth 1); these blocks may again be partitioned into two or more blocks at the next lower level, e.g., tree level 2 (hierarchical level 2, depth 2), etc., until the partitioning is terminated, e.g., because a termination criterion is met, e.g., a maximum tree depth or a minimum block size has been reached. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree that uses partitioning into two partitions is called a binary tree (BT), a tree that uses partitioning into three partitions is called a ternary tree (TT), and a tree that uses partitioning into four partitions is called a quad tree (QT).

[0115] For example, a coding tree unit (CTU) may be or comprise a CTB of luma samples for a picture having three sample arrays, two corresponding CTBs of chroma samples, or a CTB of samples for a monochrome picture or a picture coded using three separate color planes, and a syntax structure used to code the samples. Correspondingly, a coding tree block (CTB) may be an N×N block of samples for some values ​​of N, such that the division of the components into CTBs is partitioned. A coding unit (CU) may be or comprise a coding block of luma samples for a picture having three sample arrays, two corresponding coding blocks of chroma samples, or a coding block of samples for a monochrome picture or a picture coded using three separate color planes, and a syntax structure used to code the samples. Correspondingly, a coding block (CB) may be an M×N block of samples for some values ​​of M and N, such that the division of the CTB into coding blocks is partitioned.

[0116] For example, in an HEVC embodiment, coding tree units (CTUs) may be divided into CUs by using a quadtree structure denoted as a coding tree. The decision of whether a picture area should be coded using (temporal) inter-picture prediction or (spatial) intra-picture prediction is made at the leaf CU level. Each leaf CU may be further divided into one, two, or four PUs according to a PU partition type. Inside one PU, the same prediction process is applied, and related information is transmitted to the decoder on a PU-by-PU basis. After obtaining residual blocks by applying a prediction process based on the PU partition type, the leaf CUs may be partitioned into transform units (TUs) according to another quadtree structure similar to the coding tree for CUs.

[0117] For example, in an embodiment according to the latest video coding standard currently under development, called Versatile Video Coding (VVC), a combined quadtree nested multitype tree uses, for example, a binary and ternary split segmentation structure used to partition coding tree units. Within the coding tree structure within a coding tree unit, a CU can have either a square or rectangular shape. For example, a coding tree unit (CTU) is first partitioned by a quadtree. The quadtree leaf node may then be further partitioned by a multitype tree structure. In the multitype tree structure, there are four partition types: vertical binary split (SPLIT_BT_VER), horizontal binary split (SPLIT_BT_HOR), vertical ternary split (SPLIT_TT_VER), and horizontal ternary split (SPLIT_TT_HOR). The multitype tree leaf node is called a coding unit (CU), and this segmentation is used for prediction and transform processes without further partitioning, unless the CU is too large for the maximum transform length. This means that in most cases, CUs, PUs, and TUs have the same block size in a quadtree with a nested multi-type tree coding block structure. An exception occurs when the maximum supported transform length is smaller than the width or height of a color component of a CU. VVC develops a unique signaling mechanism for partition division information in a quadtree with a nested multi-type tree coding tree structure. In the signaling mechanism, a coding tree unit (CTU) is treated as the root of the quadtree and is first partitioned by the quadtree structure. Each quadtree leaf node (when large enough to allow it) is then further partitioned by the multi-type tree structure.In a multi-type tree structure, a first flag (mtt_split_cu_flag) is signaled to indicate whether a node is further partitioned; when the node is further partitioned, a second flag (mtt_split_cu_vertical_flag) is signaled to indicate the split direction; and then a third flag (mtt_split_cu_binary_flag) is signaled to indicate whether the split is a binary or ternary split. Based on the values ​​of mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, the multi-type tree split mode (MttSplitMode) of the CU may be derived by the decoder based on a predefined rule or table. Note that for some designs, e.g., for 64x64 luma block and 32x32 chroma pipelined designs in a VVC hardware decoder, TT splitting is prohibited when either the width or height of the luma coding block is greater than 64, as shown in Figure 6. TT partitioning is also prohibited when either the width or height of a chroma coding block is greater than 32. Pipelined designs partition pictures into virtual pipeline data units (VPDUs), which are defined as non-overlapping units within a picture. In hardware decoders, consecutive VPDUs are processed simultaneously by multiple pipeline stages. The VPDU size is roughly proportional to the buffer size in most pipeline stages, so it is important to keep the VPDU size small. In most hardware decoders, the VPDU size may be set to the maximum transform block (TB) size. However, in VVC, ternary tree (TT) and binary tree (BT) partitioning may lead to an increase in the VPDU size.

[0118] In addition, note that when a portion of a tree node block extends beyond the bottom or right picture boundary, the tree node block is forced to be split until all samples of all coded CUs are located inside the picture boundary.

[0119] As an example, an intra subdivision (ISP) tool may divide a luma intra prediction block vertically or horizontally into two or four subdivisions, depending on the block size.

[0120] In one example, mode select unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.

[0121] As described above, video encoder 20 is configured to determine or select a best or optimal prediction mode from a (e.g., predetermined) set of prediction modes, which may comprise, for example, intra-prediction modes and / or inter-prediction modes.

[0122] Intra prediction The set of intra prediction modes may include, for example, 35 different intra prediction modes, e.g., omnidirectional modes such as DC (or average) mode and planar mode, or directional modes, as specified in HEVC, or 67 different intra prediction modes, e.g., omnidirectional modes such as DC (or average) mode and planar mode, or directional modes, as specified for VVC. As an example, for non-square blocks, some conventional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes, as specified in VVC. As another example, to avoid division operations for DC prediction, only the longer side is used to calculate the average for non-square blocks. Then, the results of planar mode intra prediction may be further modified by a position-dependent intra prediction combination (PDPC) method.

[0123] The intra prediction unit 254 is configured to use reconstructed samples of neighboring blocks of the same current picture to generate an intra prediction block 265 according to an intra prediction mode of the set of intra prediction modes.

[0124] The intra prediction unit 254 (or generally, the mode selection unit 260) is further configured to output intra prediction parameters (or generally, information indicating the selected intra prediction mode for the block) to the entropy coding unit 270 in the form of a syntax element 266 for inclusion in the coded picture data 21, so that, for example, the video decoder 30 may receive and use the prediction parameters for decoding.

[0125] Inter Prediction The set of inter prediction modes (or possible inter prediction modes) depends on the available reference pictures (i.e., previous pictures that have been at least partially decoded and are, for example, stored in DBP 230), as well as other inter prediction parameters, such as whether the entire reference picture is used to search for the best matching reference block or only a portion of it, for example, a search window area around the area of ​​the current block of the reference picture, and / or whether pixel interpolation, for example, half-pel / semi-pel, quarter-pel and / or 1 / 16-pel interpolation, is applied.

[0126] In addition to the prediction modes mentioned above, skip mode, direct mode, and / or other inter prediction modes may be applied.

[0127] For example, in the case of extended merge prediction, the merge candidate list for such a mode is constructed by sequentially including the following five types of candidates: spatial MVP from spatially neighboring CUs, temporal MVP from co-located CUs, history-based MVP from a FIFO table, pairwise average MVP, and zero MV. Then, to improve the accuracy of the MV in the merge mode, a bidirectional matching-based decoder-side motion vector refinement (DMVR) may be applied. Coming from the merge mode with motion vector difference, a merge mode with MVD (MMVD) may be applied. To specify whether the MMVD mode is used for a CU, an MMVD flag is signaled immediately after sending the skip flag and merge flag. Then, a CU-level adaptive motion vector resolution (AMVR) scheme may be applied. AMVR allows the MVD of a CU to be coded with different precision. The MVD of the current CU may be adaptively selected depending on the prediction mode for the current CU. When a CU is coded in merge mode, the combined inter / intra prediction (CIIP) mode can be applied to the current CU. To obtain the CIIP prediction, weighted averaging of the inter prediction signal and the intra prediction signal is performed. Affine motion compensation prediction: The affine motion field of a block is described by motion information of two control points (four parameters) or three control point motion vectors (six parameters). Subblock-based temporal motion vector prediction (SbTMVP) is similar to temporal motion vector prediction (TMVP) in HEVC, but predicts the motion vectors of sub-CUs within the current CU.Bi-directional optical flow (BDOF), formerly called BIO, is a simpler version that requires much less computation, especially in terms of the number of multiplications and the size of the multipliers. Triangular partitioning mode: In such a mode, the CU is evenly divided into two triangular partitions using either diagonal or anti-diagonal partitioning. Furthermore, bi-prediction mode is extended beyond simple averaging to allow weighted averaging of the two prediction signals.

[0128] The inter prediction unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (both not shown in FIG. 2). The motion estimation unit may be configured to receive or obtain the picture block 203 (current picture block 203 of current picture 17) and the decoded picture 231, or at least one or more previously reconstructed blocks, e.g., reconstructed blocks of one or more other / different previously decoded pictures 231, for motion estimation. For example, a video sequence may comprise the current picture and the previously decoded picture 231; that is, in other words, the current picture and the previously decoded picture 231 may be part of or form a sequence of pictures that form a video sequence.

[0129] The encoder 20 may be configured to, for example, select a reference block from multiple reference blocks of the same or different pictures among multiple other pictures, and provide the reference picture (or reference picture index) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current block to the motion estimation unit as inter-prediction parameters. This offset is also called a motion vector (MV).

[0130] The motion compensation unit is configured to obtain, e.g., receive, inter prediction parameters and perform inter prediction based on or using the inter prediction parameters to obtain the inter prediction block 265. The motion compensation performed by the motion compensation unit may involve fetching or generating a predictive block based on motion / block vectors determined by motion estimation, possibly performing interpolation to sub-pixel precision. Interpolation filtering may generate additional pixel samples from known pixel samples, thus potentially increasing the number of candidate predictive blocks that can be used to code the picture block. Upon receiving a motion vector for the PU of the current picture block, the motion compensation unit may locate the predictive block to which the motion vector points in one of the reference picture lists.

[0131] The motion compensation unit may also generate syntax elements associated with the blocks and video slices for use by video decoder 30 in decoding picture blocks of the video slices. In addition to, or as an alternative to, slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be generated or used.

[0132] Entropy Coding The entropy encoding unit 270 is configured to apply, for example, an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context-adaptive VLC scheme (CAVLC), an arithmetic coding scheme, a binarization scheme, context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy encoding method or technique), or bypass (no compression), to the quantized coefficients 209, the inter-prediction parameters, the intra-prediction parameters, the loop filter parameters, and / or other syntax elements to obtain coded picture data 21, which may be output via an output unit 272, for example, in the form of coded bitstream 21, so that, for example, video decoder 30 may receive and use the parameters for decoding. The coded bitstream 21 may be transmitted to the video decoder 30 or stored in a memory for later transmission or retrieval by the video decoder 30.

[0133] Other structural variations of the video encoder 20 may be used to encode the video stream. For example, a non-transform-based encoder 20 may directly quantize the residual signal for some blocks or frames without using the transform processing unit 206. In another implementation, the encoder 20 may have the quantization unit 208 and the inverse quantization unit 210 combined into a single unit.

[0134] Decoder and decoding method 3 shows an example of a video decoder 30 configured to implement the techniques of the present application. The video decoder 30 is configured to receive coded picture data 21 (e.g., coded bitstream 21), e.g., coded by encoder 20, to obtain a decoded picture 331. The coded picture data or bitstream comprises information for decoding the coded picture data, e.g., data representing picture blocks of coded video slices (and / or tile groups or tiles), and associated syntax elements.

[0135] 3, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., adder 314), a loop filter 320, a decoded picture buffer (DBP) 330, a mode application unit 360, an inter prediction unit 344, and an intra prediction unit 354. Inter prediction unit 344 may be or may include a motion compensation unit. Video decoder 30 may, in some examples, perform a decoding path that is generally reciprocal to the encoding path described with respect to video encoder 100 from FIG. 2.

[0136] As described with respect to encoder 20, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, loop filter 220, decoded picture buffer (DPB) 230, inter prediction unit 344, and intra prediction unit 354 are also referred to as forming a “built-in decoder” of video encoder 20. Accordingly, inverse quantization unit 310 may be functionally identical to inverse quantization unit 110, inverse transform processing unit 312 may be functionally identical to inverse transform processing unit 212, reconstruction unit 314 may be functionally identical to reconstruction unit 214, loop filter 320 may be functionally identical to loop filter 220, and decoded picture buffer 330 may be functionally identical to decoded picture buffer 230. Accordingly, the descriptions provided for the respective units and functions of video encoder 20 apply correspondingly to the respective units and functions of video decoder 30.

[0137] Entropy Decoding The entropy decoding unit 304 is configured to parse the bitstream 21 (or generally, the coded picture data 21) and, e.g., perform entropy decoding on the coded picture data 21 to obtain, e.g., quantization coefficients 309 and / or decoded coding parameters (not shown in FIG. 3 ), e.g., any or all of inter-prediction parameters (e.g., reference picture indices and motion vectors), intra-prediction parameters (e.g., intra-prediction modes or indices), transform parameters, quantization parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to an encoding scheme such as described with respect to the entropy coding unit 270 of the encoder 20. The entropy decoding unit 304 may be further configured to provide the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to the mode application unit 360 and other parameters to other units of the decoder 30. The video decoder 30 may receive syntax elements at a video slice level and / or a video block level. In addition to or as an alternative to slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be received and / or used.

[0138] inverse quantization Inverse quantization unit 310 may be configured to receive a quantization parameter (QP) (or generally, information related to inverse quantization) and quantized coefficients from coded picture data 21 (e.g., by parsing and / or decoding by entropy decoding unit 304), and apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameter to obtain inverse quantized coefficients 311, which are sometimes referred to as transform coefficients 311. The inverse quantization process may involve using the quantization parameter determined by video encoder 20 for each video block in a video slice (or tile or tile group) to determine the degree of quantization, and similarly, the degree of inverse quantization to be applied.

[0139] Inverse transformation The inverse transform processing unit 312 may be configured to receive the inverse quantized coefficients 311, also referred to as transform coefficients 311, and apply a transform to the inverse quantized coefficients 311 to obtain the reconstructed residual block 213 in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 313. The transform may be an inverse transform, e.g., an inverse DCT transform, an inverse DST transform, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may further be configured to receive transform parameters or corresponding information from the coded picture data 21 (e.g., by parsing and / or decoding by the entropy decoding unit 304) to determine the transform to be applied to the inverse quantized coefficients 311.

[0140] Reconstruction The reconstruction unit 314 (e.g., an adder or summer 314) may be configured to add the reconstructed residual block 313 to the prediction block 365, for example, by adding the sample values ​​of the reconstructed residual block 313 and the sample values ​​of the prediction block 365, to obtain the reconstructed block 315 in the sample domain.

[0141] Filtering The loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter the reconstruction block 315 to obtain a filtered block 321, for example, to smooth pixel transitions or otherwise improve video quality. The loop filter unit 320 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, for example, an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In one example, the loop filter unit 320 may include a deblocking filter, an SAO filter, and an ALF filter. The order of filtering processes may be deblocking filter, SAO, and ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., adaptive in-loop reshaper) is added. This process is performed before deblocking. In another example, the deblocking filter process may also be applied to interior sub-block edges, e.g., affine sub-block edges, ATMVP sub-block edges, sub-block transform (SBT) edges, and intra-subdivision (ISP) edges. Although loop filter unit 320 is shown in FIG. 3 as being an in-loop filter, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.

[0142] Decoded Picture Buffer The decoded video blocks 321 of the picture are then stored in a decoded picture buffer 330, which stores the decoded picture 331 as a reference picture for subsequent motion compensation relative to other pictures and / or for output display, respectively.

[0143] The decoder 30 is arranged to output the decoded pictures 311, for example via an output 312, for presentation or viewing to a user.

[0144] prediction The inter prediction unit 344 may be identical to the inter prediction unit 244 (in particular, the motion compensation unit), and the intra prediction unit 354 may be identical in function to the inter prediction unit 254, performing the partitioning or partition decision and prediction based on the partition and / or prediction parameters or respective information received from the coded picture data 21 (e.g., by parsing and / or decoding by the entropy decoding unit 304). The mode application unit 360 may be configured to perform prediction (intra prediction or inter prediction) for each block based on the (filtered or unfiltered) reconstructed picture, block, or respective sample to obtain a prediction block 365.

[0145] When a video slice is coded as an intra-coded (I) slice, intra prediction unit 354 of mode application unit 360 is configured to generate a predictive block 365 for a picture block of the current video slice based on the signaled intra prediction mode and data from previously decoded blocks of the current picture. When a video picture is coded as an inter-coded (i.e., B or P) slice, inter prediction unit 344 (e.g., a motion compensation unit) of mode application unit 360 is configured to produce a predictive block 365 for a video block of the current video slice based on a motion vector and other syntax elements received from entropy decoding unit 304. For inter prediction, the predictive block may be produced from one of the reference pictures in one of the reference picture lists. Video decoder 30 may construct the reference frame lists, i.e., List 0 and List 1, using a default construction technique based on the reference pictures stored in DPB 330. The same or similar may apply to or with embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or as an alternative to slices (e.g., video slices), e.g., video may be coded using I, P, or B tile groups and / or tiles.

[0146] Mode application unit 360 is configured to determine prediction information for video blocks of the current video slice by parsing motion vectors or related information and other syntax elements, and use the prediction information to produce predictive blocks for the current video block being decoded. For example, mode application unit 360 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) used to code the video blocks of the video slice, the inter-prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information for one or more of the reference picture lists for the slice, motion vectors for each inter-coded video block of the slice, inter-prediction status for each inter-coded video block of the slice, and other information for decoding video blocks in the current video slice. The same or similar may apply to or with embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or as an alternative to slices (e.g., video slices); e.g., video may be coded using I, P, or B tile groups and / or tiles.

[0147] An embodiment of video decoder 30 such as that shown in FIG. 3 may be configured to partition and / or decode pictures by using slices (also called video slices), where a picture may be partitioned into or decoded using one or more (typically non-overlapping) slices, each of which may comprise one or more blocks (e.g., CTUs) or one or more groups of blocks (e.g., tiles (H.265 / HEVC and VVC) or bricks (VVC)).

[0148] An embodiment of video decoder 30 as shown in FIG. 3 may be configured to partition and / or decode a picture by using slice / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), and a picture may be partitioned into or decoded using one or more (typically non-overlapping) slice / tile groups, each of which may comprise, for example, one or more blocks (e.g., CTUs) or one or more tiles, and each tile may be, for example, rectangular in shape and may comprise one or more blocks (e.g., CTUs), e.g., whole or fractional blocks.

[0149] Other variations of the video decoder 30 may be used to decode the coded picture data 21. For example, the decoder 30 may produce an output video stream without using a loop filtering unit 320. For example, a non-transform-based decoder 30 may directly inverse quantize the residual signal for some blocks or frames without using an inverse transform processing unit 312. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.

[0150] It should be understood that the processing result of the current step may be further processed and then output to the next step in the encoder 20 and the decoder 30. For example, after the interpolation filtering, motion vector derivation, or loop filtering, further operations such as clipping or shifting may be performed on the processing result of the interpolation filtering, motion vector derivation, or loop filtering.

[0151] It should be noted that further operations may be applied to the derived motion vector of the current block (including, but not limited to, control point motion vectors in affine mode, sub-block motion vectors in affine mode, planar mode, ATMVP mode, temporal motion vectors, etc.). For example, the value of a motion vector is constrained to a predetermined range according to its representation bits. If the representation bits of a motion vector are bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponentiation. For example, if bitDepth is set equal to 16, the range is -32768 to 32767, and if bitDepth is set equal to 18, the range is -131072 to 131071. For example, the value of a derived motion vector (e.g., MVs of four 4x4 sub-blocks in one 8x8 block) is constrained so that the maximum difference between the integer parts of the four 4x4 sub-block MVs is less than or equal to N pixels, such as less than or equal to 1 pixel. Here, we provide two methods for constraining motion vectors according to bitDepth.

[0152] 4 is a schematic diagram of a video coding device 400 according to one embodiment of the present disclosure. The video coding device 400 is suitable for implementing the disclosed embodiments as described herein. In one embodiment, the video coding device 400 may be a decoder, such as the video decoder 30 of FIG. 1A, or an encoder, such as the video encoder 20 of FIG. 1A.

[0153] Video coding device 400 comprises an ingress port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing the data, a transmitter unit (Tx) 440 and an egress port 450 (or output port 450) for transmitting the data, and a memory 460 for storing data. Video coding device 400 may also comprise optical-to-electrical (OE) and electrical-to-optical (EO) components coupled to ingress port 410, receiver unit 420, transmitter unit 440, and egress port 450 for the egress or ingress of optical or electrical signals.

[0154] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. The processor 430 is in communication with the ingress port 410, the receiver unit 420, the transmitter unit 440, the egress port 450, and the memory 460. The processor 430 includes a coding module 470. The coding module 470 implements the disclosed embodiments described above. For example, the coding module 470 performs, processes, prepares, or provides various coding operations. Thus, the inclusion of the coding module 470 significantly improves the functionality of the video coding device 400 and allows the video coding device 400 to transform into different states. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.

[0155] Memory 460 may comprise one or more disks, tape drives, and solid-state drives, and may be used as an overflow data storage device for storing programs when such programs are selected for execution, and for storing instructions and data read during program execution. Memory 460 may be, for example, volatile and / or non-volatile, and may be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random access memory (SRAM).

[0156] FIG. 5 is a simplified block diagram of an apparatus 500 that may be used as either or both of source device 12 and destination device 14 from FIG. 1 according to an example embodiment.

[0157] The processor 502 in the apparatus 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of device or devices, now existing or later developed, capable of manipulating or processing information. Although the disclosed implementations may be practiced with a single processor, e.g., processor 502, as shown, advantages in speed and efficiency may be achieved using two or more processors.

[0158] The memory 504 in the apparatus 500 may be a read-only memory (ROM) device or a random access memory (RAM) device in one implementation. Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 that is accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510, which include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1-N, which further include a video coding application that performs the methods described herein.

[0159] The apparatus 500 may also include one or more output devices, such as a display 518. The display 518, in one example, may be a touch-sensitive display that combines a display with touch-sensitive elements operable to sense touch input. The display 518 may be coupled to the processor 502 via the bus 512.

[0160] Although shown here as a single bus, bus 512 of device 500 may be comprised of multiple buses. Additionally, secondary storage 514 may be directly coupled to other components of device 500 or may be accessed over a network, and may comprise a single integrated unit such as a memory card, or multiple units such as multiple memory cards. Accordingly, device 500 may be implemented in a wide variety of configurations.

[0161] Current hybrid video codecs employ predictive coding. Pictures of a video sequence are subdivided into blocks of pixels, and these blocks are then coded. Instead of coding blocks pixel by pixel, entire blocks are predicted using previously coded pixels in the block's spatial or temporal neighborhood. The encoder further processes only the difference between the block and its prediction. Further processing typically involves transforming the block pixels into coefficients in the transform domain. The coefficients may then be further compressed (e.g., by quantization) and further condensed (e.g., by entropy coding) to form a bitstream. The bitstream may further include any signaling information that enables a decoder to decode the coded video. For example, the signaling may include settings related to encoder settings, such as the size of the input picture, the frame rate, a quantization step indication, the prediction applied to the block of the picture, etc.

[0162] The difference between a block and its prediction is called the residual of the block. More specifically, each pixel of the block has a residual, which is the difference between the intensity level of that pixel and its predicted intensity level. The intensity level of a pixel is called the pixel value, or the value of the pixel. The residuals of all pixels of a block are collectively called the residual of the block. In other words, a block has a residual, which is a set or matrix comprising the residuals of all pixels of the block.

[0163] Temporal prediction exploits the temporal correlation between pictures, also called frames, of a video. Temporal prediction is also called inter-prediction because it uses the inter-dependence between different video frames. Therefore, a block to be decoded, also called a current block, is predicted from one or more previously decoded pictures, called reference pictures. The one or more reference pictures are not necessarily pictures that precede the current picture in which the current block is located in display order of a video sequence. An encoder may encode pictures in a coding order different from the display order. As a prediction of the current block, a co-located block (called a predictor) in a reference picture may be determined. The co-located block may be located in the reference picture at the same position as the current block in the current picture. Such prediction is accurate for stationary picture regions, i.e., picture regions that do not move from one picture to another.

[0164] In an encoder, motion estimation is usually employed to obtain a predictor that takes movement into account, i.e., a motion-compensated predictor. A current block is predicted by a block located in a reference picture at a position indicated by a motion vector. The motion vector points from the position of the co-located block to the position of the current block (or vice versa, depending on the coding convention). To enable a decoder to determine the same prediction of the current block as the encoder, the motion vector may be signaled in the bitstream. To further reduce the signaling overhead caused by signaling motion vectors for each of the blocks, the motion vectors themselves may be estimated. Motion vector estimation may be performed based on the motion vectors of blocks that are neighbors of the current block in the spatial and / or temporal domains.

[0165] The prediction of the current block may be calculated using one reference picture or by weighting predictions obtained from two or more reference pictures. Because neighboring pictures are most likely to be similar to the current picture, the reference picture may be a neighboring picture, i.e., a picture immediately before or after the current picture in display order. The reference picture may also be any picture that precedes or follows the current picture in display order and precedes the current picture in the bitstream (decoding order). This may provide advantages, for example, in cases of occlusion and / or nonlinear motion in the video content. The reference picture may be signaled in the bitstream.

[0166] A special mode of inter-prediction is so-called bi-prediction, in which two reference pictures are used to generate a prediction of a current block. In particular, two predictions determined in each of the two reference pictures are combined to form a prediction signal of the current block. Bi-prediction can produce a more accurate prediction of the current block than uni-prediction, i.e., prediction that uses only a single reference picture. A more accurate prediction leads to a smaller difference (i.e., a smaller residual) between the pixels of the current block and the prediction, which can be coded more efficiently, i.e., leads to fewer coding bits.

[0167] To provide more accurate motion estimation, the resolution of the reference picture may be extended, for example, by interpolating samples between pixels. Fractional pixel interpolation may be performed by weighted averaging of nearest pixels. For example, in the case of half-pixel resolution, bilinear interpolation may be used. Other fractional pixels may be calculated, for example, as an average of the nearest pixels weighted by the inverse of the distance between the respective pixels nearest to the pixel being predicted.

[0168] The motion vector may be estimated, for example, by calculating the similarity between the current block and the corresponding predictive block pointed to by the candidate motion vector in the reference picture. To reduce the amount of calculation, the number of candidate motion vectors may be reduced by limiting the candidate motion vectors to a search space. The search space may be defined, for example, by the number and / or position of pixels surrounding the position in the reference picture corresponding to the position of the current block in the current image. Alternatively, the candidate motion vector may be defined by a list of candidate motion vectors formed from the motion vectors of neighboring blocks.

[0169] Motion vectors are typically determined at least in part at the encoder side and signaled to the decoder in the coded bitstream. Motion vectors may also be derived at the decoder. In such cases, the current block is not available at the decoder and cannot be used to calculate the similarity between the current block and any of the blocks to which the candidate motion vector points in the reference picture. Therefore, a template may be used that may be composed of pixels of a previously decoded block rather than the current block. For example, previously decoded pixels neighboring the current block may be used. Such motion estimation offers the advantage of reducing signaling: motion vectors are derived in a similar way at both the encoder and the decoder, and therefore no signaling is required. On the other hand, the accuracy of such motion estimation may be lower.

[0170] To provide a trade-off between accuracy and signaling overhead, motion vector estimation can be divided into two steps: motion vector derivation and motion vector refinement. For example, motion vector derivation may involve selecting a motion vector from a list of candidates. The selected motion vector can be further refined, for example, by searching in a search space. The search in the search space is based on calculating a cost function for each candidate motion vector, i.e., for each candidate position of the block to which the candidate motion vector points.

[0171] Document JVET-D0029: Decoder-Side Motion Vector Refinement Based on Bilateral Template Matching, X. Chen, J. An, J. Zheng (which can be found at http: / / phenix.it-sudparis.eu / jvet / site) describes a motion vector refinement in which an initial motion vector at integer pixel resolution is found and further refined by searching with half-pixel resolution in a search space around the initial motion vector. Here, the pixel resolution (e.g., integer or half-integer) represents the resolution of the search space, i.e., the displacement of the searched point relative to the unrefined motion vector input to the process. As a result, the search coordinates of the refinement stage do not necessarily coincide with the actual pixel coordinates on the image plane.

[0172] The motion vector refinement can be performed in the decoder without assistance from the encoder. The decoder loop in the encoder can employ the same refinement to obtain the corresponding reference picture. The refinement can be performed by determining a template, determining a search space, and locating the reference picture portion within the search space that best matches the template. The best matching portion position determines the best motion vector, which is then used to obtain a predictor for the current block, i.e., the current block is reconstructed.

[0173] In one embodiment, as shown in FIG. 6, the inter prediction method comprises:

[0174] S601: Obtain an initial motion vector for the current block.

[0175] An initial motion vector MV0 is obtained, which can be seen as a first estimate or approximation of an accurate motion vector. For example, MV0 can be selected from a list of candidate motion vectors. The list may include the motion vector of at least one block neighboring the current block. Alternatively, MV0 can be obtained at the encoder side by a matching block and signaled to the decoder side in the bitstream. Correspondingly, at the decoder side, the initial motion vector MV0 can be obtained from the bitstream. For example, an index to a list of candidates is extracted from the bitstream, and the motion vector candidate identified by the index is provided as the initial motion vector MV0.

[0176] Alternatively, the coordinates of MV0 are extracted directly from the bitstream. Note that the present application is not limited to any particular method for obtaining the initial motion vector MV0. For example, MV0 may be determined by template matching in the encoder and decoder in a similar manner. Alternatively, the motion vector may be predicted according to the motion vectors of neighboring blocks of the current block in the spatial or temporal domain.

[0177] The initial motion vector MV0 is an initial estimate of the final motion vector MV0'' to be used in the inter prediction of the current block. It constitutes the input for the refinement process, at the end of which the final motion vector MV0'' is output.

[0178] S602: Determine a search space position according to the initial motion vector.

[0179] Assume that the search space positions include a center search position and neighboring search space positions, and the center search space position is pointed to by an initial motion vector. In a possible implementation, step S602 includes determining the center search space position according to the initial motion vector, and determining the neighboring search space positions according to one or more preset offsets and the center search space position.

[0180] In a possible implementation, the search space is made up of search space positions, and the pattern of the search space is a 5x5 search space position square.

[0181] As an example, the search space is constructed according to an initial motion vector MV0, and one or more candidate motion vectors are related to the initial motion vector. Then, a motion vector MV0'' (corresponding to the coordinates of the search space position) is selected according to the matching cost from the initial motion vector MV0 and one or more candidate motion vectors. (S603) It should be noted that for some candidate motion vectors of the search space, the cost may be for all candidate motion vectors of each partial search space determined in each of the stages in different embodiments of the present application, and the cost may be calculated during the search space construction as part of the search space construction.

[0182] In a possible implementation, a candidate motion vector for a current block points from the top-left pixel of the current block in the current picture to the top-left pixel of each of the candidate prediction blocks in the reference picture. The top-left pixel of the candidate prediction block thus represents the search space in the reference picture. The top-left pixel of the block is considered to be the location of the block. Note that any other pixel of the block can be considered to be the location of the block, and it is understood that the same location convention applies to all blocks. For example, a motion vector may be equivalently defined as extending from the center pixel of the current block to the center pixel of each candidate block.

[0183] It should be noted that all candidate motion vectors, including the initial motion vector, point to pixels in the reference picture, which are search space locations, and the coordinate position relationships between the pixels pointed to by the initial motion vector and the pixels pointed to by other candidate motion vectors may be represented by one or more motion vector offsets between the initial motion vector and the other candidate motion vectors.

[0184] The one or more motion vector offsets may be predetermined, which means that the location relationship between the central search position and the neighboring search space positions may be predetermined.

[0185] S603: Check the matching costs of the search space positions according to the checking order to select a target search space position with the smallest matching cost.

[0186] In a possible implementation, the match cost of each of the search space locations is examined in turn according to the examination order, and the search space location with the smallest match cost among the search space locations is selected as the target search space location.

[0187] The matching cost may be measured by a cost function, which may be, for example, the sum of absolute differences between the template and the reference picture area corresponding to the template in the location pointed to by the motion vector candidate. After calculating the sum of absolute differences (SAD) for all candidate motion vectors, the candidate with the smallest SAD is selected. Note that SAD is just an example. The cost function may be SAD (sum of absolute differences), MRSAD (mean removed absolute sum of differences), SSE (sum of squared errors), or any other cost function for expressing similarity. The best motion vector is selected based on a comparison between the matching costs of the search space positions.

[0188] In a possible implementation, the match cost of one of the search space locations is compared with the temporary minimum match cost, and when the match cost of one of the search space locations is smaller than the temporary minimum match cost, the match cost of one of the search space locations is set as the temporary minimum match cost, and after the last one of the search space locations is examined, the temporary minimum match cost is set as the minimum match cost.

[0189] In one embodiment, the search space may be a square pattern as shown in Figure 7. As an example, the pixel pointed to by the initial motion vector is considered to be (0,0) in the coordinate system, where horizontal to the right is considered the positive horizontal direction and vertical down is considered the positive vertical direction.

[0190] The search space may comprise 25 search space locations, and the pixels with coordinates (-2,-2), (2,2), (-2,2), and (2,-2) are corners of the square pattern.

[0191] The 25 search space locations are divided into one or more groups to define the test order. And, it should be noted that, according to various embodiments, the step of dividing the search space locations into one or more groups may not be necessary, and such a step is merely to clearly indicate that a certain type of test order design is determined.

[0192] In a first particular embodiment, the 25 search space locations are divided into two groups. Group I: (0,0). Group II: All other search space locations.

[0193] As shown in Figure 8, the number at each search space location represents the order of each search space location according to the inspection order, with locations marked with smaller numbers being inspected before locations marked with larger numbers. The location (0,0) marked as "1" is inspected first, and then the other search space locations in Group II are inspected according to the horizontal inspection order (line by line, from left to right). Therefore, the test order is (0,0), (-2,-2), (-1,-2), (0,-2), (1,-2), (2,-2), (-2,-1), (-1,-1), (0,-1), (1,-1), (2,-1), (-2,0), (-1,0), (1,0), (2,0), (-2,1), (-1,1), (0,1), (1,1), (2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2). Note that the search space locations in Group II may also be tested according to other test orders, such as a vertical test order (column by column, top to bottom), a zigzag test order, etc.

[0194] In the current embodiment, the center position of the search space is tested first, and then other search space positions are tested based on a preset testing order. This can also be implemented based on a search space with a non-square pattern. As an example, it can be a cross pattern with 21 search space positions, corresponding to the testing order shown in Figure 9. As another example, it can be a British flag pattern with 17 search space positions, corresponding to the testing order shown in Figure 10.

[0195] In a second particular embodiment, Group II may be further divided into more groups, for example, 25 search space locations divided into four groups. Group I: (0,0). Group II: (-1,0), (0,1), (1,0), (0,-1) (vertical or horizontal adjacent positions of the center position). Group III: (-1,-1), (-1,1), (1,1), (1,-1) (positions that are one pixel sample away from the center position and are not included in the second group). Group IV: All other search space locations.

[0196] Groups I, I, III, and IV are examined in order. Note that the examination order within the same group is not limited, for example, for group II, the examination order may be (-1,0), (0,1), (1,0), (0,-1), or (-1,0), (1,0), (0,1), (0,-1). Note also that search space locations in group IV may also be examined according to a different examination order (such as clockwise or counterclockwise) and with a different starting examination point (such as the top-left pixel of the search space or other locations in group IV). As an example in Figure 7, the inspection order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (-2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2), (2,1), (2,0), (2,-1), (2,-2), (1,-2), (0,-2), (-1,-2), (-2,-2), (-2,-1).

[0197] It can also be implemented based on other patterns of search space, as an example it can be a diamond pattern with 13 search space positions, corresponding to the test order shown in FIG.

[0198] In a third particular embodiment, group IV may be further divided into more groups, for example, 25 search space positions divided into 5 groups. Group I: (0,0). Group II: (-1,0), (0,1), (1,0), (0,-1) (vertical or horizontal adjacent positions of the center position). Group III: (-1,-1), (-1,1), (1,1), (1,-1) (positions that are one pixel sample away from the center position and are not included in the second group). Group IV: (-2,0), (0,2), (2,0), (0,-2) (positions 2 pixel samples away from the center position in the vertical / horizontal direction and 0 pixel samples away from the center position in the other horizontal / vertical direction). Group V: All other search space locations.

[0199] As shown in FIG. 12, as an example, the inspection order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-1), (-2,1), (-2,2), (-1,2), (1,2), (2,2), (2,1), (2,-1), (2,-2), (1,-2), (-1,-2), (-2,-2).

[0200] In a fourth particular embodiment, group V may be further divided into more groups, for example, 25 search space locations divided into 6 groups. Group I: (0,0). Group II: (-1,0), (0,1), (1,0), (0,-1) (vertical or horizontal adjacent positions of the center position). Group III: (-1,-1), (-1,1), (1,1), (1,-1) (positions that are one pixel sample away from the center position and are not included in the second group). Group IV: (-2,0), (0,2), (2,0), (0,-2) (positions 2 pixel samples away from the center position in the vertical / horizontal direction and 0 pixel samples away from the center position in the other horizontal / vertical direction). Group V: (-2,-2), (-2,2), (2,2), (2,-2) (positions are 2 pixel samples away from the center position in both vertical and horizontal directions). Group VI: All other search space locations.

[0201] As shown in FIG. 13, as an example, the inspection order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-2), (-2,2), (2,2), (2,-2), (-2,-1), (-2,1), (-1,2), (1,2), (2,1), (2,-1), (1,-2), (-1,-2).

[0202] In a fifth specific embodiment, the 25 search space positions are not divided. They are examined according to a preset examination order, for example, a horizontal examination order. As shown in Figure 14, as an example, the examination order is (-2,-2), (-1,-2), (0,-2), (1,-2), (2,-2), (-2,-1), (-1,-1), (0,-1), (1,-1), (2,-1), (-2,0), (-1,0), (0,0), (1,0), (2,0), (-2,1), (-1,1), (0,1), (1,1), (2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2).

[0203] S604: Determine a refinement motion vector for the current block based on the initial motion vector and the target search space position.

[0204] The refined motion vector MV0'' is a motion vector that points to the target search space position. Then, an offset between the target search space position and the center search space position may be derived first, and then the refined motion vector MV0'' may also be derived by adding the initial motion vector and the offset.

[0205] FIG. 15 shows an inter-prediction device 1500 of the present application.

[0206] The inter prediction device 1500 includes an acquisition module 1501 configured to acquire an initial motion vector for a current block; a setting module 1502 configured to determine a search space position according to the initial motion vector; a calculation module 1503 configured to examine the matching costs of the search space positions according to a check order to select a target search space position having the smallest matching cost; and a prediction module 1504 configured to determine a refined motion vector for the current block based on the initial motion vector and the target search space position, wherein a central search space position is examined first according to the check order, and the central search space position is pointed to by the initial motion vector.

[0207] In a possible implementation, the search space positions include a center search position and adjacent search space positions, and the setting module 1502 is configured to determine the center search space position according to an initial motion vector and to determine the adjacent search space positions according to one or more preset offsets and the center search space position.

[0208] In a possible implementation, the search space is made up of search space positions, and the pattern of the search space is a 5x5 search space position square.

[0209] In a possible implementation, the calculation module 1503 is configured to sequentially examine the match cost of each of the search space locations according to the examination order, and select the search space location with the smallest match cost among the search space locations as the target search space location.

[0210] In a possible implementation, the calculation module 1503 is configured to compare the matching cost of one of the search space positions with a temporary minimum matching cost, and when the matching cost of one of the search space positions is smaller than the temporary minimum matching cost, set the matching cost of one of the search space positions as the temporary minimum matching cost, and after the last one of the search space positions is examined, set the temporary minimum matching cost as the minimum matching cost.

[0211] In a possible implementation, the center search space position is set as (0,0) of the coordinate system, horizontal right is set as the positive horizontal direction, and vertical down is set as the positive vertical direction.

[0212] In a possible implementation, the testing order is (0,0), (-2,-2), (-1,-2), (0,-2), (1,-2), (2,-2), (-2,-1), (-1,-1), (0,-1), (1,-1), (2,-1), (-2,0), (-1,0), (1,0), (2,0), (-2,1), (-1,1), (0,1), (1,1), (2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2).

[0213] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (-2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2), (2,1), (2,0), (2,-1), (2,-2), (1,-2), (0,-2), (-1,-2), (-2,-2), (-2,-1).

[0214] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-1), (-2,1), (-2,2), (-1,2), (1,2), (2,2), (2,1), (2,-1), (2,-2), (1,-2), (-1,-2), (-2,-2).

[0215] In a possible implementation, the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-2), (-2,2), (2,2), (2,-2), (-2,-1), (-2,1), (-1,2), (1,2), (2,1), (2,-1), (1,-2), (-1,-2).

[0216] 16 shows an inter-prediction device 1600 of the present application, which may be a decoder or an encoder. The device 1600 includes one or more processors 1601 and a non-transitory computer-readable storage medium 1602 coupled to the processors and storing programming for execution by the processors, the programming, when executed by the processors, configuring the decoder to perform the method in FIG.

[0217] In another embodiment, a computer program product comprises program code for performing the method in FIG. 6 when executed on a computer or processor.

[0218] In another embodiment, a non-transitory computer readable medium carries program code that, when executed by a computing device, causes the computing device to perform the method in FIG.

[0219] The following is a description of an example application of the encoding method and the decoding method as shown in the above embodiments, and the system using them.

[0220] 17 is a block diagram showing a content supply system 3100 for realizing a content distribution service. The content supply system 3100 includes a capture device 3102, a terminal device 3106, and optionally a display 3126. The capture device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any type of combination thereof.

[0221] The capture device 3102 may generate data and encode the data by an encoding method as shown in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown), which encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, a vehicle-mounted device, or any combination thereof. For example, the capture device 3102 may include the source device 12 described above. When the data includes video, a video encoder 20 included in the capture device 3102 may actually perform the video encoding process. When the data includes audio (i.e., voice), an audio encoder included in the capture device 3102 may actually perform the audio encoding process. For some practical scenarios, the capture device 3102 delivers the encoded video and audio data by multiplexing them together. For other practical scenarios, for example, in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 delivers the encoded audio data and the encoded video data separately to the terminal device 3106 .

[0222] In the content delivery system 3100, a terminal device 3106 receives and plays encoded data. The terminal device 3106 may be a device having data reception and recovery capabilities, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, a vehicle-mounted device 3124, or any combination thereof, capable of decoding the above-mentioned encoded data. For example, the terminal device 3106 may include the destination device 14 described above. When the encoded data includes video, the video decoder 30 included in the terminal device is prioritized to perform video decoding. When the encoded data includes audio, the audio decoder included in the terminal device is prioritized to perform audio decoding processing.

[0223] In the case of a terminal device having its display, for example, a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or a vehicle-mounted device 3124, the terminal device can provide the decoded data to its display. In the case of a terminal device not equipped with a display, for example, an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 is contacted thereto to receive and display the decoded data.

[0224] When each device in this system performs encoding or decoding, a picture encoding device or a picture decoding device may be used as shown in the above embodiments.

[0225] 18 is a diagram illustrating the structure of an example of a terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, a protocol progression unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), HyperText Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real Time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof.

[0226] After the protocol progression unit 3202 processes the stream, a stream file is generated. The file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As explained above, for some practical scenarios, for example, in a video conferencing system, the encoded audio data and encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.

[0227] Through the demultiplexing process, a video elementary stream (ES), an audio ES, and optionally subtitles are generated. The video decoder 3206, which includes the video decoder 30 as described in the above embodiment, decodes the video ES by the decoding method as shown in the above embodiment to generate video frames, and supplies this data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames, and supplies this data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in FIG. 18) before being supplied to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in FIG. 20) before being supplied to the synchronization unit 3212.

[0228] The synchronization unit 3212 synchronizes video and audio frames and provides the video / audio to a video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video with audio information, which may be coded in the syntax using timestamps related to the presentation of the coded audio and visual data as well as timestamps related to the delivery of the data stream itself.

[0229] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes them with the video and audio frames, and provides the video / audio / subtitles to the video / audio / subtitle display 3216 .

[0230] The present application is not limited to the above-mentioned system, and either the picture encoding device or the picture decoding device in the above-mentioned embodiments may be incorporated into other systems, for example, automobile systems.

[0231] Mathematical Operators The mathematical operators used in this application are similar to those used in the C programming language. However, the results of integer division and arithmetic shift operations are more precisely defined, and additional operations such as exponentiation and real-valued division are defined. Numbering and counting conventions generally start at 0, e.g., "first" is equivalent to 0th, "second" is equivalent to 1st, etc.

[0232] Arithmetic operators The following arithmetic operators are defined as follows:

[0233] [Table 1]

[0234] Logical operators The following logical operators are defined as follows: x && y The Boolean logic "connection" of x and y. x || y The Boolean "disjunction" of x and y. ! "Not" in Boolean logic. x ? y : zIf x is TRUE, i.e. not equal to 0, finds the value of y; otherwise, finds the value of z.

[0235] Relational operators The following relational operators are defined as follows: > Greater than. >= Greater than or equal to. < Less than. <= Less than or equal to. == Equal to. != Not equal to.

[0236] When a relational operator is applied to a syntax element or variable that has been assigned the value "na" (not applicable), the value "na" is treated as the unique value for that syntax element or variable. The value "na" is not considered equal to any other value.

[0237] Bitwise Operators The following bitwise operators are defined as follows: & Bitwise "and". When operating on integer arguments, it operates on the two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by adding further significant bits equal to 0. Bitwise "logical or". When operating on integer arguments, it operates on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by adding additional significant bits equal to 0. ^ Bitwise "exclusive or". When operating on integer arguments, it operates on the two's complement representation of the integer values. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by adding further significant bits equal to 0. x >> yArithmetic right shift of the two's complement integer representation of x by y binary places. This function is defined only for non-negative integer values ​​of y. The bit shifted into the most significant bit (MSB) as a result of the right shift has a value equal to the MSB of x before the shift operation. x << yArithmetic left shift of the two's complement integer representation of x by y binary places. This function is defined only for non-negative integer values ​​of y. Bits shifted into the least significant bits (LSBs) as a result of the left shift have value equal to 0.

[0238] assignment operator The following arithmetic operators are defined as follows: = assignment operator. ++ increment, i.e., x++ is equivalent to x = x + 1, and when used in an array index, evaluates to the value of the variable before the increment operation. -- Decrement, i.e., x--, is equivalent to x = x - 1, and when used in an array index, evaluates to the value of the variable before the decrement operation. += Increment by the specified amount, i.e., x += 3 is equivalent to x = x + 3 and x += (-3) is equivalent to x = x + (-3). -= Decrement by the specified amount, i.e., x -= 3 is equivalent to x = x - 3, and x -= (-3) is equivalent to x = x - (-3).

[0239] Range Notation The following notation is used to specify a range of values: x=y..zx takes integer values ​​starting from y up to and including z, where x, y, and z are integers and z is greater than y.

[0240] Mathematical Functions The following mathematical functions are defined:

[0241]

number

[0242] Asin(x) The trigonometric arc sine function, operating on an argument x in the range -1.0 to 1.0 (inclusive), with an output value in radians in the range -π÷2 to π÷2 (inclusive). Atan(x) The trigonometric arctangent function, operated on the argument x, with output values ​​in the range -π÷2 to π÷2 (inclusive), in radians.

[0243]

number

[0244] Ceil(x) The smallest integer greater than or equal to x. Clip1 Y ( x ) = Clip3( 0, ( 1 << BitDepth Y ) - 1, x ) Clip1 C ( x ) = Clip3( 0, ( 1 << BitDepth C ) - 1, x )

[0245]

number

[0246] Cos(x) The trigonometric cosine function, operating on the argument x in radians. Floor(x) The largest integer less than or equal to x.

[0247]

number

[0248] Ln(x) The natural logarithm of x (logarithm to base e, where e is the base constant of the natural logarithm, 2.718 281 828...). Log2(x) The base 2 logarithm of x. Log10(x) The base 10 logarithm of x.

[0249]

number

[0250]

number

[0251] Sin(x) The trigonometric sine function, operating on the argument x in radians.

[0252]

number

[0253] Swap( x, y ) = ( y, x ) Tan(x) The trigonometric tangent function, operating on the argument x in radians.

[0254] Order of precedence of operations When the order of precedence in an expression is not explicitly indicated by the use of parentheses, the following rules apply: - Operations with higher precedence are evaluated before any operations with lower precedence. - Operations of equal rank are evaluated consecutively from left to right.

[0255] The following table (Table 1) specifies the ranking of operations from highest to lowest, with higher positions in the table indicating higher rankings.

[0256] For operators that are also used in the C programming language, the precedence order used herein is the same as that used in the C programming language.

[0257] [Table 2]

[0258] Text description of logical operations A statement of logical operation that may be mathematically written in the text in the following form: if(condition 0) Statement 0 else if(condition 1) Statement 1 ... else / * informative mentions in remaining conditions * / Statement n can be explained as follows: ...as follows / ...the following applies - If condition 0, then statement 0 - Otherwise, if condition 1, then statement 1 - ... - In other cases (informative mention in the remaining conditions), statement n

[0259] Each "if ..., otherwise if ..., otherwise" statement in the text is started with "...as follows" or "...the following applies" followed immediately by "if ...." The final condition in an "if ..., otherwise if ..., otherwise ..." is always "otherwise." Alternating "if ..., otherwise if ..., otherwise ..." statements can be identified by aligning the "...as follows" or "...the following applies" with the ending "otherwise ...."

[0260] A statement of logical operation that may be mathematically written in the text in the following form: if(condition0a && condition0b) Statement 0 else if(condition 1a || condition 1b) Statement 1 ... else Statement n can be explained as follows: ...as follows / ...the following applies - Statement 0 if all of the following conditions are true: - Condition 0a - Condition 0b - Otherwise, if one or more of the following conditions are true, then statement 1: - Condition 1a - Condition 1b - ... - else statement n

[0261] A statement of logical operation that may be mathematically written in the text in the following form: if(condition 0) Statement 0 if(condition1) Statement 1 can be explained as follows: If condition 0, then statement 0 If condition 1, then statement 1

[0262] For example, embodiments of the encoder 20 and the decoder 30, and functions described herein with reference to the encoder 20 and the decoder 30, may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on a computer-readable medium or transmitted over a communication medium as one or more instructions or code and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which correspond to tangible media such as data storage media, or communication media, including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. In this manner, computer-readable media may generally correspond to (1) tangible computer-readable storage media that are non-transitory, or (2) communication media such as a signal or carrier wave. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include the computer-readable medium.

[0263] By way of example, and not limitation, such computer-readable storage media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included within the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy discs, and Blu-ray discs, where disks typically reproduce data magnetically and discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0264] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term "processor," as used herein, may refer to any of the above structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. Also, the techniques may be implemented entirely within one or more circuits or logic elements.

[0265] The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to highlight functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require implementation by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit or provided by a collection of interoperable hardware units, including one or more processors as described above, along with suitable software and / or firmware. [Explanation of symbols]

[0266] 10. Video Coding System 12 Source Devices 13 Communication Channels 14 Destination Device 16 Picture Source 17 Picture, Picture Data, Raw Picture, Raw Picture Data 18 Preprocessor, preprocessing unit 19 Preprocessed Picture, Preprocessed Picture Data 20 Video Encoder 21 Encoded Picture Data 22 Communication interface, communication unit 28 Communication interface, communication unit 30 Video Decoder 31 Decoded Picture, Decoded Picture Data 32 Post-processor, post-processing unit 33 Post-Processed Picture, Post-Processed Picture Data 34 Display Devices 46 Processing circuit configuration 201 Input unit, input interface 203 Picture Block, Coding Tree Unit (CTU) 204 Residual Calculation Unit 205 Residual Block, Residual 206 Conversion Processing Unit 207 Conversion Factor 208 quantization units 209 Quantized Coefficients, Quantized Transform Coefficients, Quantized Residual Coefficients 210 Inverse Quantization Unit 211 Inverse quantization coefficients, inverse quantization residual coefficients 212 Inverse Transformation Processing Unit 213 reconstructed residual blocks, corresponding dequantized coefficients, transform blocks 214 Reconstruction Unit 215 Reconstruction Block 220 Loop Filter Unit 221 Filtered Block, Filtered Reconstructed Block 230 Decoded Picture Buffer 231 Decoded Picture 244 Inter Prediction Units 254 intra prediction units 260 Mode Selection Unit 262 division units 265 prediction block, predictor 266 Syntax Elements 270 Entropy Coding Unit 272 Output section, output interface 304 Entropy Decoding Unit 309 Quantization Coefficients 310 Inverse Quantization Unit 311 Transform coefficients, inverse quantization coefficients 312 Inverse Transformation Processing Unit 313 Reconstruction residual block, transformation block 314 Reconstruction Unit 315 Reconstruction Block 320 Loop Filter Unit 321 Filtered Blocks 330 Decoded Picture Buffer 331 Decoded Picture 344 Inter Prediction Unit 354 intra prediction units 360 mode application unit 365 predicted blocks 400 Video Coding Device 410 inlet port, input port 420 receiver unit 430 Processors, Logic Units, Central Processing Units 440 transmitter unit 450 outlet port, output port 460 memory 470 Coding Module 500 devices 502 processor 504 memory 506 Code and Data 508 Operating Systems 510 Application Program 512 Bus 514 Secondary Storage 518 Display 1500 Inter Prediction Device 1502 Settings Module 1503 Computational Module 1504 Prediction Module 1600 Inter Prediction Device 1601 processor 1602 Non-transitory computer-readable storage medium 3100 Contents Supply System 3102 Capture Device 3104 Communication Links 3106 Terminal Device 3108 Smartphone / Pad 3110 Computer / Laptop 3112 Network Video Recorder / Digital Video Recorder 3114 TV 3116 Set-top Box 3118 Video Conference System 3120 Video Surveillance System 3122 Mobile Information Terminals 3124 Vehicle-mounted devices 3126 Display 3202 Protocol Progression Unit 3204 Demultiplexing Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronous Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display

Claims

1. 1. An inter prediction method, comprising: obtaining an initial motion vector for the current block; determining a search space location according to the initial motion vector; examining the match costs of the search space locations according to an examination order to select a target search space location having a minimum match cost; determining a refinement motion vector for the current block based on the initial motion vector and the target search space location; Equipped with a central search space location is examined first according to the examination order, the central search space location being pointed to by the initial motion vector; Inter prediction method.

2. the search space positions comprise the central search position and neighboring search space positions, and determining the search space positions according to the initial motion vector comprises: determining the center search space location according to the initial motion vector; determining the neighboring search space locations according to one or more preset offsets and the central search space location; Equipped with The method of claim 1.

3. The method of claim 2 , wherein a search space is constructed from the search space locations, and the pattern of the search space is a 5×5 search space location square.

4. examining the match costs of the search space locations according to the examination order to select a target search space location having a minimum match cost, examining the match cost of each of said search space locations in turn according to said examination order; selecting the search space location having the smallest match cost among the search space locations as the target search space location. The method of claim 1.

5. examining the match cost for each of the search space locations in turn according to the examination order, comparing the match cost of one of the search space locations to a temporary minimum match cost; when the match cost of the one of the search space locations is less than the temporary minimum match cost, setting the match cost of the one of the search space locations as the temporary minimum match cost; setting the temporary minimum match cost as the minimum match cost after the last one of the search space locations has been examined; Equipped with The method of claim 4.

6. 6. The method of claim 1, wherein the central search space position is set as (0,0) of the coordinate system, horizontal right is set as the positive horizontal direction, and vertical down is set as the positive vertical direction.

7. 7. The method of claim 6, wherein the test order is (0,0), (-2,-2), (-1,-2), (0,-2), (1,-2), (2,-2), (-2,-1), (-1,-1), (0,-1), (1,-1), (2,-1), (-2,0), (-1,0), (1,0), (2,0), (-2,1), (-1,1), (0,1), (1,1), (2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2).

8. 7. The method of claim 6, wherein the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (-2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2), (2,1), (2,0), (2,-1), (2,-2), (1,-2), (0,-2), (-1,-2), (-2,-2), (-2,-1).

9. 7. The method of claim 6, wherein the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-1), (-2,1), (-2,2), (-1,2), (1,2), (2,2), (2,1), (2,-1), (2,-2), (1,-2), (-1,-2), (-2,-2).

10. 7. The method of claim 6, wherein the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-2), (-2,2), (2,2), (2,-2), (-2,-1), (-2,1), (-1,2), (1,2), (2,1), (2,-1), (1,-2), (-1,-2).

11. An inter prediction device, an acquisition module configured to acquire an initial motion vector for the current block; a setting module configured to determine a search space position according to the initial motion vector; a calculation module configured to examine the match costs of the search space locations according to an examination order to select a target search space location having a minimum match cost; a prediction module configured to determine a refinement motion vector for the current block based on the initial motion vector and the target search space location; Equipped with a central search space location is examined first according to the examination order, the central search space location being pointed to by the initial motion vector; Interpredictor.

12. a search space location comprising the central search location and neighboring search space locations, the setting module: determining the center search space location according to the initial motion vector; configured to determine the neighboring search space locations according to one or more preset offsets and the central search space location.

12. The apparatus of claim 11.

13. 13. The apparatus of claim 12, wherein a search space is constructed from the search space locations, and wherein the pattern of the search space is a 5x5 search space location square.

14. the computing module: examining the match cost of each of said search space locations in turn according to said examination order; configured to select the search space location among the search space locations having the smallest match cost as the target search space location.

12. The apparatus of claim 11.

15. the computing module: comparing a match cost of one of the search space locations to a temporary minimum match cost; if the match cost of the one of the search space locations is less than the temporary minimum match cost, setting the match cost of the one of the search space locations as the temporary minimum match cost; configured to set the temporary minimum match cost as the minimum match cost after the last one of the search space locations is examined.

15. The apparatus of claim 14.

16. 16. The apparatus of claim 12, wherein the central search space position is set as (0,0) of the coordinate system, horizontal right is set as the positive horizontal direction, and vertical down is set as the positive vertical direction.

17. 17. The apparatus of claim 16, wherein the test order is (0,0), (-2,-2), (-1,-2), (0,-2), (1,-2), (2,-2), (-2,-1), (-1,-1), (0,-1), (1,-1), (2,-1), (-2,0), (-1,0), (1,0), (2,0), (-2,1), (-1,1), (0,1), (1,1), (2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2).

18. 17. The apparatus of claim 16, wherein the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (-2,1), (-2,2), (-1,2), (0,2), (1,2), (2,2), (2,1), (2,0), (2,-1), (2,-2), (1,-2), (0,-2), (-1,-2), (-2,-2), (-2,-1).

19. 17. The apparatus of claim 16, wherein the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-1), (-2,1), (-2,2), (-1,2), (1,2), (2,2), (2,1), (2,-1), (2,-2), (1,-2), (-1,-2), (-2,-2).

20. 17. The apparatus of claim 16, wherein the test order is (0,0), (-1,0), (0,1), (1,0), (0,-1), (-1,-1), (-1,1), (1,1), (1,-1), (-2,0), (0,2), (2,0), (0,-2), (-2,-2), (-2,2), (2,2), (2,-2), (-2,-1), (-2,1), (-1,2), (1,2), (2,1), (2,-1), (1,-2), (-1,-2).

21. An encoder comprising processing circuitry for carrying out the method of any one of claims 1 to 10.

22. A decoder comprising processing circuitry for carrying out the method of any one of claims 1 to 10.

23. A computer program product comprising program code for carrying out the method according to any one of claims 1 to 10.

24. A decoder comprising: one or more processors; a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor; Equipped with The programming, when executed by the processor, configures the decoder to perform the method of any one of claims 1 to 10. decoder.

25. 1. An encoder comprising: one or more processors; a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor; Equipped with The programming, when executed by the processor, configures the encoder to perform the method of any one of claims 1 to 10. Encoder.