Method for computing integer grid reference sample locations for block-level boundary sample gradient computation in bipredictive optical flow computation and bipredictive compensation - Patents.com

JP7640647B2Active Publication Date: 2025-03-05HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023190926
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-06-24
Filing Date
2023-11-08
Publication Date
2025-03-05
Estimated Expiration
2040-06-23

Smart Images

  • Figure 0007640647000018
    Figure 0007640647000018
  • Figure 0007640647000019
    Figure 0007640647000019
  • Figure 0007640647000020
    Figure 0007640647000020
Patent Text Reader

Abstract

To provide a method for bidirectional optical flow prediction based on a reference sample value from a sample position belonging to an extended region of a predicted block used in bidirectional optical flow prediction of a current block.SOLUTION: A sub-pixel position within an expanded region of a predicted block within a reference picture is rounded to obtain an integer pixel sample position within the reference picture, and the reference sample value at an acquired integer pixel sample position within the reference picture is used in the calculation of a boundary sample gradient corresponding to the boundary of the predicted blocks within the reference picture.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Indian Patent Application No. IN201931025013, filed with the Indian Patent Office on June 24, 2019, the disclosure of which is incorporated herein by reference in its entirety.

[0002] FIELD OF THE DISCLOSURE Embodiments of the present application relate generally to the field of picture processing, and more particularly to improving optical flow. [Background technology]

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

[0004] The amount of video data required to depict even a relatively short video can be significant, which can pose difficulties when the data is to be streamed or otherwise conveyed over a communication network with limited bandwidth capacity. Thus, video data is generally compressed before being conveyed over modern communication networks. The size of the video can also be an issue when the video is stored in a storage device, since memory resources may be limited. Often, a video compression device uses software and / or hardware at the source to code the video data before transmission or storage, thereby reducing the amount of data required to represent a digital video image. The compressed data is then received at the destination by a video decompression device that decodes the video data. With limited network resources and an ever-increasing demand for higher video quality, improved compression and decompression techniques that increase compression ratios with little or no sacrifice in picture quality are desirable. Summary of the Invention [Means for solving the problem]

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

[0006] These and other objects are achieved by the subject matter of the independent claims. Further implementation forms are evident from the dependent claims, the description and the drawings.

[0007] A first embodiment of the present disclosure provides a method for bidirectional optical flow prediction based on sample values ​​from sample positions belonging to an extended area of ​​a predicted block used in bidirectional optical flow prediction of a current block, implemented by an encoding device or a decoding device, the method including the steps of obtaining a motion vector (MV) of the current block, obtaining sub-pixel sample positions in the extended area of ​​the predicted block in a reference picture based on the MV, processing the obtained sub-pixel sample positions to obtain integer pixel sample positions in the reference picture, and performing bidirectional optical flow prediction by referring to reference sample values ​​at the obtained integer pixel sample positions in the reference picture.

[0008] The step of processing the obtained sub-pixel sample positions to obtain integer pixel sample positions in the reference picture may reduce the memory footprint for bidirectional optical flow (BDOF) prediction and may enable a sub-block level pipeline to be established in the hardware design, since extended sample values ​​(i.e., sample positions outside the M×N sample positions corresponding to the sub-block) are not obtained by motion compensated interpolation of the respective reference samples.

[0009] The reference sample values ​​at the obtained integer pixel sample positions in the reference picture may be referred to as sample values ​​from sub-pixel sample positions in bidirectional optical flow prediction.

[0010] Processing the obtained sub-pixel sample positions may include rounding the obtained sub-pixel sample positions to obtain integer pixel sample positions in the reference picture.

[0011] By rounding the sub-pel positions in the horizontal and vertical directions, the boundary gradients may become more accurate. This may also improve the optical flow calculated based on these sample gradients and the corrections applied using the calculated optical flow. This may provide consistent coding gains compared to previous methods that ignore fractional offsets in the horizontal and vertical directions when selecting integer sample values ​​for the extended sample positions. At the same time, the complexity may not increase much since the addition of horizontal and vertical rounding offsets is the only increase in complexity.

[0012] The step of processing the obtained sub-pixel sample positions may include rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions to respective nearest integer pixel sample positions in each direction, and obtaining integer pixel sample positions in the reference picture based on the nearest integer pixel sample positions in the horizontal and vertical directions.

[0013] The method may further include, before the step of performing bidirectional optical flow prediction, a step of fetching reference sample values ​​at the obtained integer pixel sample positions in the reference picture as predicted sample values ​​used in the bidirectional optical flow prediction, and the step of performing bidirectional optical flow prediction with reference to the reference sample values ​​includes a step of performing bidirectional optical flow prediction using the predicted sample values.

[0014] According to an implementation, the step of rounding the obtained sub-pixel sample position separately in the horizontal and vertical directions may include a step of comparing a fractional portion of the obtained sub-pixel sample position in each direction with a threshold, and if the fractional portion is greater than or equal to the threshold, a nearest higher integer pixel sample position in the respective direction is taken as the nearest integer pixel sample position in the respective direction, and if the fractional portion is less than the threshold, a nearest lower integer pixel sample position in the respective direction is taken as the nearest integer pixel sample position in the respective direction.

[0015] The nearest higher integer pixel sample position in each direction may be obtained by adding an offset of one to the truncated integer pixel sample position in each direction obtained by discarding the fractional portion of the obtained sub-pixel sample position, and the nearest lower integer pixel sample position in each direction may be obtained by adding an offset of zero to the truncated integer pixel sample position in each direction obtained by discarding the fractional portion of the obtained sub-pixel sample position.

[0016] The threshold may be given by P / 2 for 1 / P pel sub-pixel precision. The threshold may be 8 for 1 / 16 pel sub-pixel precision.

[0017] Depending on the implementation, rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions may include applying a shift operation and an inverse shift operation to components of the obtained sub-pixel sample positions in each direction.

[0018] The integer pixel sample position (x_pos, y_pos) in the reference picture may be obtained according to the following formula: x_pos = (x_spel_pos + (1 << (shift_val - 1))) >> shift_val y_pos = (y_spel_pos + (1 << (shift_val - 1))) >> shift_val where (x_spel_pos, y_spel_pos) is the obtained sub-pixel sample position and shift_val is selected according to the sub-pel sample precision used. For half-pel, quarter-pel, 1 / 8 of a pel, or 1 / 16 of a pel sub-pel sample precision, a shift_val of 1, 2, 3, or 4 may be used, respectively.

[0019] According to the implementation, the MV of the current block may be an improved MV obtained by motion vector refinement (MVR) based on the initial MV.

[0020] The MVR may include an integer distance refinement stage with respect to the initial MV, and if the integer distance refinement stage of the MVR results in a non-zero displacement of the refined MV relative to the initial MV, integer pixel sample positions in the reference picture may be obtained by rounding the obtained sub-pixel sample positions.

[0021] If the integer distance refinement stage of the MVR results in a zero displacement of the refined MV relative to the initial MV, the integer pixel sample positions in the reference picture may be obtained by discarding the fractional parts of the obtained sub-pixel sample positions.

[0022] According to the implementation, if the integer distance refinement stage of MVR results in a zero displacement of the refined MV relative to the initial MV, the integer pixel sample position (x_pos, y_pos) in the reference picture may be obtained according to the following formula: x_pos = x_spel_pos >> shift_val y_pos = y_spel_pos >> shift_val where (x_spel_pos, y_spel_pos) is the obtained sub-pixel sample position and shift_val is selected according to the sub-pel sample precision used. For half-pel, quarter-pel, 1 / 8 of a pel, or 1 / 16 of a pel sub-pel sample precision, a shift_val of 1, 2, 3, or 4 may be used, respectively.

[0023] The current block may be the current coding block, or the current coding sub-block, or the current predicted block.

[0024] The reference sample values ​​at the obtained integer pixel sample positions in the reference picture may be used in the calculation of boundary sample gradients that correspond to the boundaries of the predicted block in the reference picture.

[0025] According to an aspect of the first embodiment, there is provided an encoder including processing circuitry for performing any one of the methods according to the first embodiment.

[0026] According to a further aspect of the first embodiment, there is provided a decoder including processing circuitry for performing any one of the methods according to the first embodiment.

[0027] According to a further aspect of the first embodiment, there is provided a computer program product comprising instructions which, when executed by a computer, cause the computer to perform any one of the methods according to the first embodiment.

[0028] According to a further aspect of the first embodiment, there is provided an encoder including one or more processors and a non-transitory computer-readable storage medium coupled to the one or more processors and storing instructions for execution by the one or more processors, the instructions, when executed by the one or more processors, configuring the encoder to perform any one of the methods according to the first embodiment.

[0029] According to a further aspect of the first embodiment, there is provided a decoder including one or more processors and a non-transitory computer-readable storage medium coupled to the one or more processors and storing instructions for execution by the one or more processors, the instructions, when executed by the one or more processors, configuring the decoder to perform any one of the methods according to the first embodiment.

[0030] According to a further aspect of the first embodiment, an encoder is provided that includes a prediction unit configured to perform bidirectional optical flow prediction of a current block, a first acquisition unit configured to acquire a motion vector (MV) of the current block, a second acquisition unit configured to acquire sub-pixel sample positions in an extended area of ​​the predicted block in a reference picture based on the MV, and a processing unit configured to process the acquired sub-pixel sample positions to acquire integer pixel sample positions in the reference picture, where the prediction unit is configured to perform bidirectional optical flow prediction by referring to reference sample values ​​at the acquired integer pixel sample positions in the reference picture.

[0031] According to an implementation, processing the obtained sub-pixel sample position may include rounding the obtained sub-pixel sample position to obtain an integer pixel sample position in the reference picture.

[0032] According to an implementation, processing the obtained sub-pixel sample position may include rounding the obtained sub-pixel sample position separately in the horizontal and vertical directions to a respective nearest integer pixel sample position in each direction, and obtaining an integer pixel sample position in the reference picture based on the nearest integer pixel sample position in the horizontal and vertical directions.

[0033] Rounding the obtained sub-pixel sample position separately in the horizontal and vertical directions may include comparing a fractional portion of the obtained sub-pixel sample position in each direction to a threshold, and if the fractional portion is greater than or equal to the threshold, a nearest higher integer pixel sample position in the respective direction may be taken as the nearest integer pixel sample position in the respective direction, and if the fractional portion is less than the threshold, a nearest lower integer pixel sample position in the respective direction may be taken as the nearest integer pixel sample position in the respective direction.

[0034] The nearest higher integer pixel sample position in each direction may be obtained by adding an offset of one to the truncated integer pixel sample position in each direction obtained by discarding the fractional portion of the obtained sub-pixel sample position, and the nearest lower integer pixel sample position in each direction may be obtained by adding an offset of zero to the truncated integer pixel sample position in each direction obtained by discarding the fractional portion of the obtained sub-pixel sample position.

[0035] According to a further aspect of the first embodiment, a decoder is provided, the decoder including: a prediction unit configured to perform bidirectional optical flow prediction of a current block; a first acquisition unit configured to acquire a motion vector (MV) of the current block from a bitstream of encoded video; a second acquisition unit configured to acquire sub-pixel sample positions in an extended region of the predicted block in a reference picture based on the MV; and a processing unit configured to process the acquired sub-pixel sample positions to acquire integer pixel sample positions in the reference picture, wherein the prediction unit is configured to perform bidirectional optical flow prediction by referring to reference sample values ​​at the acquired integer pixel sample positions in the reference picture.

[0036] According to an implementation, processing the obtained sub-pixel sample position may include rounding the obtained sub-pixel sample position to obtain an integer pixel sample position in the reference picture.

[0037] According to an implementation, processing the obtained sub-pixel sample position may include rounding the obtained sub-pixel sample position separately in the horizontal and vertical directions to a respective nearest integer pixel sample position in each direction, and obtaining an integer pixel sample position in the reference picture based on the nearest integer pixel sample position in the horizontal and vertical directions.

[0038] Rounding the obtained sub-pixel sample position separately in the horizontal and vertical directions may include comparing a fractional portion of the obtained sub-pixel sample position in each direction to a threshold, and if the fractional portion is greater than or equal to the threshold, a nearest higher integer pixel sample position in the respective direction may be taken as the nearest integer pixel sample position in the respective direction, and if the fractional portion is less than the threshold, a nearest lower integer pixel sample position in the respective direction may be taken as the nearest integer pixel sample position in the respective direction.

[0039] The nearest higher integer pixel sample position in each direction may be obtained by adding an offset of one to the truncated integer pixel sample position in each direction obtained by discarding the fractional portion of the obtained sub-pixel sample position, and the nearest lower integer pixel sample position in each direction may be obtained by adding an offset of zero to the truncated integer pixel sample position in each direction obtained by discarding the fractional portion of the obtained sub-pixel sample position.

[0040] According to a further aspect of the first embodiment, there is provided a storage medium for storing a bitstream obtained by using any one of the methods of the first embodiment.

[0041] A second embodiment of the present disclosure provides a method used for obtaining predicted sample values ​​for sample positions belonging to an extended region of a predicted block used in bidirectional optical flow prediction of a current coding block, the method including the steps of obtaining a first MV corresponding to a predicted sample in the extended region of the coding block; obtaining a second MV by discarding a fractional part of the first MV; obtaining a first integer pixel position of the extended region in a reference picture based on the second MV; determining a fractional offset vector based on the first MV; and obtaining a second integer pixel position in the reference picture based on the first integer pixel position and the fractional offset vector, wherein the second integer pixel position is set to the first integer pixel position plus a position offset, and the position offset is determined by comparing each component of the fractional offset vector with a threshold and further padding the predicted sample by using a pixel value in the second integer pixel position in the reference picture.

[0042] Whether a component of the position offset is 1 or 0 may depend on the result of a comparison between the corresponding component of the fractional offset vector and a threshold, the component including an X component and a Y component.

[0043] The threshold may be K, and a component of the position offset may be set to 1 if the corresponding component of the fractional offset is greater than or equal to K, and may be set to 0 otherwise. K may be equal to 7.

[0044] According to an aspect of the second embodiment, there is provided an encoder or decoder including processing circuitry for performing any one of the methods according to the second embodiment.

[0045] According to a further aspect of the second embodiment, there is provided a computer program product comprising program code for performing any one of the methods according to the second embodiment.

[0046] According to a further aspect of the second embodiment, there is provided a decoder or encoder including 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 or encoder to perform any one of the methods according to the second embodiment.

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

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

[0049] [Figure 1A] FIG. 1 is a block diagram illustrating an example of a video coding system configured to implement embodiments of the present disclosure. [Figure 1B] 2 is a block diagram illustrating another example of a video coding system configured to implement embodiments of the present disclosure. [Diagram 2] FIG. 2 is a block diagram illustrating an example of a video encoder configured to implement embodiments of the present disclosure. [Diagram 3] 2 is a block diagram illustrating an example structure of a video decoder configured to implement embodiments of the present disclosure. [Figure 4] FIG. 2 is a block diagram showing an example of an encoding device or a decoding device. [Diagram 5] FIG. 13 is a block diagram showing another example of an encoding device or a decoding device. [Figure 6]A diagram illustrating the sub-pixel position rounding process in one of the directions in a reference picture used in the integer sample fetching process for BDOF gradient calculation. [Figure 7] FIG. 13 illustrates integer positions by using a sub-pixel position rounding process in a reference picture in the integer sample fetch process for BDOF gradient calculation. [Figure 8] 2 is a flow diagram of a video encoding / decoding method according to an embodiment of the present disclosure. [Figure 9] 1 is a block diagram illustrating an example of an encoding / decoding device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0050] In the following, the same reference signs refer to identical or at least functionally equivalent features, unless otherwise stated.

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

[0052] For example, it is understood that disclosure related to 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, the corresponding device may include one or more units, e.g., functional units, for performing the described one or more method steps (e.g., one unit performing one or more steps, or multiple units each performing one or more of the multiple steps), even if such one or more units are not explicitly described or shown in the figures. On the other hand, when, for example, a particular apparatus is described based on one or more units, e.g., functional units, the corresponding method may include one step for performing the function of one or more units (e.g., one step performing the function of one or more units, or multiple steps each performing one or more functions of the multiple units), even if such one or more steps are not explicitly described or shown in the figures. Furthermore, it is understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other unless otherwise specified.

[0053] Video coding generally refers to the processing of a sequence of pictures forming a video or a video sequence. Instead of the term "picture", the terms "frame" or "image" may be used as synonyms in the field of video coding. Video coding (or generally coding) includes two parts: video encoding and video decoding. Video encoding is performed at the source side and generally involves processing an original video picture (e.g., by compression) to reduce the amount of data required to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination side and generally involves the reverse processing compared to the encoder to reconstruct the video picture. The embodiments referring to "coding" of a video picture (or generally pictures) are understood to relate to "encoding" or "decoding" of the video picture or the respective video sequence. The combination of the encoding and decoding parts is also referred to as a codec (coding and decoding).

[0054] In the case of lossless video coding, the original video picture can be reconstructed (assuming no transmission losses or other data losses occur during storage or transmission), i.e. the reconstructed video picture has the same quality as the original video picture. In the case of lossy video coding, further compression, e.g. by quantization, is performed to reduce the amount of data representing the video picture, which cannot be completely reconstructed in the decoder, i.e. the quality of the reconstructed video picture is lower or worse than that of the original video picture.

[0055] 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 to apply quantization in the transform domain). Each picture of a video sequence is generally partitioned into a set of non-overlapping blocks, and coding is generally performed at the block level. In other words, in an encoder, a video is generally processed, i.e., encoded, at the block (video block) level, for example, by generating a prediction block using spatial (intra-picture) prediction and / or temporal (inter-picture) prediction, subtracting the prediction block from a current block (currently being / to be processed block) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (compression), while in a decoder, a reverse process is applied to the coded or compressed block compared to the encoder in order to reconstruct the current block for representation. Furthermore, the encoder replicates the decoder's processing loop so that both generate the same prediction (eg, intra- and inter-prediction) and / or reconstruction for processing, i.e., coding, subsequent blocks.

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

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

[0058] As shown in FIG. 1A, the coding system 10 receives encoded picture data. 21 2. The image processing system may include, for example, a source device 12 configured to provide encoded picture data 21 to a destination device 14 for decoding the encoded picture data.

[0059] The source device 12 includes an encoder 20 and may additionally, i.e. optionally, include a picture source 16, a pre-processor (or pre-processing unit) 18, e.g., a picture pre-processor 18, and a communication interface or unit 22.

[0060] Picture source 16 may include or be any kind of picture taking device, e.g., a camera for taking pictures of the real world, and / or any kind of picture generating 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 for storing any of the above mentioned pictures.

[0061] In distinction to the pre-processor 18 and the processing performed by the pre-processing unit 18 , the picture or picture data 17 may also be referred to as a raw picture or raw picture data 17 .

[0062] The pre-processor 18 may be 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 include, 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.

[0063] Video encoder 20 may be configured to receive pre-processed picture data 19 and provide encoded picture data 21 (further details are described below, e.g., with reference to FIG. 2).

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

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

[0066] The communications interface 28 of the destination device 14 may be configured to receive the encoded 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 such as a storage device for encoded picture data, and to provide the encoded picture data 21 to a decoder 30.

[0067] 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 or wireless connection, or via any type of network, e.g., a wired or wireless network or any combination thereof, or any type of private and public network, or any type of combination thereof.

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

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

[0070] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrows for communication channel 13 in FIG. 1A pointing from source device 12 toward destination device 14, or as bidirectional communication interfaces, and may be configured to send and receive messages, for example, to set up a connection, confirm, and exchange any other information related to the communication link and / or data transmission, such as the transmission of encoded picture data.

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

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

[0073] A display device 34 of destination device 14 may be configured to receive the post-processed picture data 33, for example, to display the picture to a user or viewer. The display device 34 may be or include any type of display for showing the reconstructed picture, such as an integrated or external display or monitor. The display may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.

[0074] 1A illustrates source device 12 and destination device 14 as separate devices, an embodiment of the devices could include both devices or both functionality, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such an embodiment, source device 12 or corresponding functionality and destination device 14 or corresponding functionality could be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof.

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

[0076] The encoder 20 (e.g., video encoder 20) or the decoder 30 (e.g., video decoder 30) or both the encoder 20 and the decoder 30 may be implemented by processing circuitry 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 encoding, or any combination thereof. The encoder 20 may be implemented by processing circuitry 46 to embody various modules discussed in connection with the encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented by processing circuitry 46 to embody various modules discussed in connection with the 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 discussed later. 5, where the techniques are implemented in part in software, a device may store instructions for the software on a suitable non-transitory computer-readable storage medium and may execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Video encoder 20 and video decoder 30 may be incorporated as part of a combined encoder / decoder (codec) in a single device, for example, as shown in FIG. 1B.

[0077] 1B includes processing circuitry implementing both video encoder 20 and video decoder 30. Additionally, one or more imaging devices 41, such as a camera for capturing pictures of the real world, an antenna 42, one or more memory stores 44, one or more processors 43, and / or a display device 45, such as display device 34 described above, may be provided as part of video coding system 40.

[0078] The source device 12 and the destination device 14 may include any of a wide range of devices, including any type of handheld or fixed device, for example, 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 a content delivery server), a broadcast receiver device, a broadcast transmitter device, and the like, and may use no operating system or any type of operating system. In some cases, the source device 12 and the destination device 14 may be enabled for wireless communication. Thus, the source device 12 and the destination device 14 may be wireless communication devices.

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

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

[0081] 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 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, 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 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 or a video encoder with a hybrid video codec.

[0082] The residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 may be said to form 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 loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may be said to form a backward signal path of the video encoder 20, which corresponds to the signal path of the decoder (see the video decoder 30 of 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 may also be said to form a “built-in decoder” of the video encoder 20.

[0083] Picture & Picture Division (Picture & Block) The encoder 20 may, for example, be configured to receive 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 referred to as a current picture or a picture to be coded (particularly in video coding, to distinguish the current picture from other pictures, e.g. already coded and / or decoded pictures of the same video sequence, i.e. a video sequence that also includes the current picture).

[0084] A (digital) picture is or can be considered as a two-dimensional array or matrix of samples with intensity values. The samples of the array may also be referred to as pixels (short for picture element) 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, typically three color components are used, i.e. a picture may be represented as or contain three sample arrays. In an RBG format or color space, a picture contains corresponding red, green, and blue sample arrays. However, in video coding, each pixel is typically represented in a luminance and chrominance format or color space, e.g. YCbCr, which contains a luminance component denoted by Y (sometimes L is used instead) and two chrominance components denoted by Cb and Cr. The luminance (or luma for short) component Y represents the brightness or intensity of a gray level (e.g., similar to a grayscale picture), while the two chrominance (or chroma for short) components Cb and Cr represent the chromaticity or color information components. Thus, a picture in YCbCr format contains 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 into YCbCr format and vice versa. The process is also known as color transformation or conversion. If the picture is monochrome, the picture may contain only a luminance sample array. Thus, a picture may be, for example, an array of luma samples in a 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.

[0085] An embodiment of video encoder 20 may include a picture partitioning unit (not shown in FIG. 2) configured to partition picture 17 into multiple (usually non-overlapping) picture blocks 203. These blocks may also be referred to as root blocks, macroblocks (H.264 / AVC), or coding tree blocks (CTBs) or coding tree units (CTUs) (according to H.265 / HEVC and VVC). The picture partitioning 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 size, or to vary the block size among pictures or a subset or group of pictures, and to partition each picture into corresponding blocks.

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

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

[0088] The embodiment of video encoder 20 shown in FIG. 2 may be configured to encode picture 17 block-by-block, eg, encoding and prediction are performed for each block 203.

[0089] The embodiment of video encoder 20 shown in Figure 2 may be further configured to partition and / or encode a picture by using slices (also referred to as video slices), where a picture may be partitioned into or encoded using one or more (generally non-overlapping) slices, each of which may include one or more blocks (e.g., CTUs). A slice may include a collection of rectangular tiles or may be a collection of raster-ordered rows of CTUs within a tile.

[0090] The embodiment of video encoder 20 shown in FIG. 2 may be further configured to partition and / or encode a picture by using 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 (generally non-overlapping) tile groups, where each tile group may include one or more blocks (e.g., CTUs) or one or more tiles, where each tile may be rectangular in shape and may include one or more blocks (e.g., CTUs), e.g., complete or fractional blocks.

[0091] Calculating the residuals The residual calculation unit 204 may be configured to calculate the residual block 205 (also referred to as residual 205) based on the picture block 203 and the prediction block 265 (further details about the prediction block 265 are provided later), for example, by subtracting sample values ​​of the prediction block 265 from 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.

[0092] conversion The transform processing unit 206 may be configured to apply a transform, such as 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 a transform domain. The transform coefficients 207, also referred to as transform residual coefficients, may represent the residual block 205 in the transform domain.

[0093] The 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 generally scaled by a certain ratio. In order to maintain the norm of the residual blocks processed by the forward and inverse transforms, an additional scaling factor is applied as part of the transform process. The scaling factor is generally selected based on certain constraints, such as the scaling factor being a power of two for shift operations, the bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, and the like. For example, a certain scaling factor may be specified for, e.g., an inverse transform by, e.g., the inverse transform processing unit 212 (and a corresponding inverse transform by, e.g., the inverse transform processing unit 312 in the video decoder 30), and a corresponding scaling factor for, e.g., a forward transform by, e.g., the transform processing unit 206 of the encoder 20 may be specified accordingly.

[0094] An embodiment of the video encoder 20 (respectively, the transform processing unit 206) may be configured to output transform parameters, e.g., a certain transform or transforms, either as is or encoded or compressed by the entropy encoding unit 270, such that, for example, the video decoder 30 may receive the transform parameters and use them for decoding.

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

[0096] 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, for scalar quantization, different scaling may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to a finer quantization, while a larger quantization step size corresponds to a coarser quantization. The applicable quantization step size may be indicated by the quantization parameter (QP). The quantization parameter may, for example, be an index of 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, e.g., corresponding and / or inverse quantization by inverse quantization unit 210. The transformation , multiplication by the quantization step size. Some standards, for example, HEVC, embodiments may be configured to use the quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed point approximation of an equation involving division. An additional scaling factor may be introduced for quantization and inverse quantization to restore the norm of the residual block that may be modified due to the 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, a customized quantization table may be used, for example, signaled from the encoder to the decoder in the bitstream. Quantization is a lossy operation, and the loss increases as the quantization step size increases.

[0097] An embodiment of video encoder 20 (respectively, quantization unit 208) may be configured to output a quantization parameter (QP), e.g., as is or to be encoded by entropy encoding unit 270, such that video decoder 30 may receive the quantization parameter and apply it for decoding.

[0098] 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 dequantized 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 dequantized coefficients 211, also referred to as dequantized residual coefficients 211, may correspond to the transform coefficients 207, although they are generally not identical to the transform coefficients due to losses due to quantization.

[0099] Reverse 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 (or corresponding dequantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 213.

[0100] Rebuild The reconstruction unit 214 (e.g., an adder or summator 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, 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, to obtain a reconstructed block 215 in the sample domain.

[0101] filtering The loop filter unit 220 (or "loop filter" 220 for short) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or in general, to filter the reconstructed samples to obtain filtered samples. The loop filter unit may be configured 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, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening, a smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 220 is illustrated in FIG. 2 as being an in-loop filter, in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221.

[0102] An embodiment of video encoder 20 (respectively, loop filter unit 220) may be configured to output loop filter parameters (such as sample adaptive offset information), e.g., as is or encoded by entropy encoding unit 270, such that decoder 30 may receive and apply the same loop filter parameters or the respective loop filter for decoding.

[0103] 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 the 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 be further configured to store other already filtered blocks, e.g., already reconstructed and filtered blocks 221, of the same current picture or different pictures, e.g., already reconstructed pictures, and may provide, e.g., a complete already reconstructed, i.e., decoded picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples) for inter prediction. The decoded picture buffer (DPB) 230 may be configured to store one or more unfiltered reconstructed blocks 215 or generally unfiltered reconstructed samples, for example if the reconstructed blocks 215 are not filtered by the loop filter unit 220, or to store any other further processed version of the reconstructed blocks or samples.

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

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

[0106] An embodiment of the mode selection unit 260 may be configured to select a partitioning and prediction mode (e.g., from partitioning and prediction modes supported by or available to the mode selection unit 260) that provides 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 that considers or balances both. The mode selection unit 260 may be configured to determine the partitioning and prediction mode based on rate-distortion optimization (RDO), i.e., to select the prediction mode that provides the smallest rate-distortion. Terms such as "best," "minimum," "optimum," etc. in this context do not necessarily refer to the overall "best," "minimum," "optimum," etc., but may also refer to the satisfaction of termination or selection criteria, such as values ​​exceeding or falling below a threshold, or other constraints that potentially lead to a "suboptimal selection," but that reduce complexity and processing time.

[0107] In other words, the partitioning unit 262 may be configured to partition the block 203 into smaller block partitions or sub-blocks (which also form blocks) using, for example, quad-tree partitioning (QT), binary-tree partitioning (BT), or ternary-tree partitioning (TT), or any combination thereof in an iterative manner, and perform prediction on each of the block partitions or sub-blocks, where the mode selection includes selecting a tree structure of the partitioned block 203, and a prediction mode is applied to each of the block partitions or sub-blocks.

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

[0109] Classification The partitioning unit 262 may partition (or divide) the current block 203 into smaller sections, e.g., smaller blocks of square or rectangular size. These smaller blocks (which may also be referred to as subblocks) may be further partitioned into even smaller sections. This is also referred to as tree partitioning or hierarchical tree partitioning, where, for example, a root block at root tree level 0 (hierarchical level 0, depth 0) may be partitioned recursively, 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), which may be partitioned again into two or more blocks at the next lower level, e.g., tree level 2 (hierarchical level 2, depth 2), and so on, until, e.g., the partitioning is terminated because a termination criterion is met, e.g., a maximum tree depth or a minimum block size is reached. Blocks that are not further partitioned are also referred to as leaf blocks or leaf nodes of the tree. A tree that uses a partition into two partitions is called a binary tree (BT), a tree that uses a partition into three partitions is called a ternary tree (TT), and a tree that uses a partition into four partitions is called a quad tree (QT).

[0110] As mentioned above, the term "block" used in this specification may be a part of a picture, in particular a square or rectangular part. For example, in the context of HEVC and VVC, a block may be or correspond to a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), or a transform unit (TU), and / or a corresponding block, such as a coding tree block (CTB), a coding block (CB), a transform block (TB), or a prediction block (PB).

[0111] For example, a coding tree unit (CTU) may be or include a CTB of luma samples and two corresponding coding blocks of chroma samples for a picture with three sample arrangements, or a CTB of samples for a picture coded using three separate color planes and syntax structures used to code a monochrome picture or sample. Correspondingly, a coding tree block (CTB) may be an NxN block of samples for some value of N such that the division of the components into CTBs is a partition. A coding unit (CU) may be or include a coding block of luma samples and two corresponding coding blocks of chroma samples for a picture with three sample arrangements, or a coding block of samples for a picture coded using three separate color planes and syntax structures used to code a monochrome picture or sample. Correspondingly, a coding block (CB) may be an MxN block of samples for some value of M and N such that the division of the CTB into coding blocks is a partition.

[0112] For example, in some embodiments according to HEVC, a coding tree unit (CTU) may be divided into CUs by using a quadtree structure represented as a coding tree. The decision of whether to code a picture area using inter-picture (temporal) prediction or intra-picture (spatial) prediction is made at the CU level. Each CU may be further divided into one, two, or four PUs according to the PU partition type. Within one PU, the same prediction process is applied, and related information is sent to the decoder based on the PU. After obtaining the residual block by applying the prediction process based on the PU partition type, the CU may be partitioned into transform units (TUs) by another quadtree structure similar to the coding tree for the CU.

[0113] For example, in an embodiment according to the latest video coding standard currently being developed, called Versatile Video Coding (VVC), a combined quad-tree and binary tree (QTBT) partitioning is used, for example, to partition the coding block. In the QTBT block structure, the CU may have either a square or a rectangular shape. For example, a coding tree unit (CTU) is first partitioned by a quad-tree structure. The leaf nodes of the quad-tree are further partitioned by a binary tree or a ternary (or triple) tree structure. The leaf nodes of the partitioning tree are called coding units (CUs), and the partitions are used for prediction and transformation processes without any further partitioning. This means that CUs, PUs, and TUs have the same block size in the QTBT coding block structure. In parallel, multi-partitions, for example, ternary tree partitions, can be used together with the QTBT block structure.

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

[0115] As mentioned above, video encoder 20 is configured to determine or select a best or optimal prediction mode from a set of (e.g., predetermined) prediction modes. The set of prediction modes may include intra-prediction modes and / or inter-prediction modes.

[0116] Intra prediction The set of intra prediction modes may include, for example, 35 different intra prediction modes, such as non-directional modes such as DC (or average) mode and planar mode, or directional modes, as defined in HEVC, or may include, for example, 67 different intra prediction modes, such as non-directional modes such as DC (or average) mode and planar mode, or directional modes, as defined for VVC.

[0117] The intra prediction unit 254 is configured to generate an (intra) prediction block 265 using reconstructed samples of neighboring blocks of the same current picture with an intra prediction mode from a set of intra prediction modes.

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

[0119] Inter Prediction The set (or possible) inter prediction modes depends on the available reference pictures (i.e., e.g., previous at least partially decoded pictures 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 the reference picture, e.g., a search window area around the area of ​​the current block, is used, and / or whether pixel interpolation such as, e.g., half / semi-pel and / or quarter-pel interpolation is applied.

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

[0121] 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 at least one or more already reconstructed blocks, such as the picture block 203 (current picture block 203 of current picture 17) and the decoded picture 231, or a reconstructed block of one or more already decoded pictures 231, for motion estimation. As an example, a video sequence may include the current picture and the already decoded picture 231, or in other words, the current picture and the already decoded picture 231 may be part of or form a sequence of pictures forming a video sequence.

[0122] The encoder 20 may be configured to select a reference block from a plurality of reference blocks of the same or different pictures among a plurality of already decoded 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 as an inter-prediction parameter to the motion estimation unit. This offset is also referred to as a motion vector (MV). In a particular implementation, the MV may be further refined at both the encoding side and the decoding side to improve prediction accuracy and ultimately improve compression performance. Furthermore, the prediction obtained by the MV or the improved MV may be further corrected or adjusted by using bi-predictive optical flow refinement (BPOF), in which the prediction may be corrected in the presence of fine-grained motion at the pixel level. The techniques of decoding side motion vector refinement (DMVR) and (BPOF) are described in detail below.

[0123] The motion compensation unit may be configured to obtain, for example, 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 include fetching or generating a prediction block based on a motion / block vector determined by motion estimation, possibly performing sub-pixel accuracy interpolation. Interpolation filtering may generate additional pixel samples from known pixel samples, thus potentially increasing the number of candidate prediction blocks that may 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 find the prediction block to which the motion vector points in one of the reference picture lists.

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

[0125] 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, binarization, 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 (uncompressed) to the quantized coefficients 209, the inter-prediction parameters, the intra-prediction parameters, the loop filter parameters, and / or other syntax elements to obtain encoded picture data 21 that may be output via an output 272, for example in the form of an encoded bitstream 21, such that, for example, the video decoder 30 may receive the parameters and use them for decoding. The encoded bitstream 21 may be transmitted to video decoder 30 or stored in memory for later transmission or retrieval by video decoder 30 .

[0126] 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 a particular block or frame without a 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.

[0127] 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 encoded picture data 21 (e.g., encoded bitstream 21), e.g., encoded by encoder 20, to obtain a decoded picture 331. The encoded picture data or bitstream includes information for decoding the encoded picture data, e.g., data representing picture blocks of an encoded video slice (and / or tile group or tile) and associated syntax elements.

[0128] 3, the 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., summer 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. The inter prediction unit 344 may be or include a motion compensation unit. The video decoder 30, in some examples, may perform a decoding path that is generally the reverse of the encoding path described in connection with the video encoder 20 of FIG. 2.

[0129] As described in connection with 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 244, and intra prediction unit 254 are also said to form a “built-in decoder” of video encoder 20. Thus, inverse quantization unit 310 may be functionally identical to inverse quantization unit 210, 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. Oye Encoder 20 applies mutatis mutandis to the respective units and functions of video decoder 30.

[0130] Entropy Decoding The entropy decoding unit 304 is configured to parse the bitstream 21 (or the coded picture data 21 in general) and, for example, perform entropy decoding on the coded picture data 21 to obtain decoded coding parameters 366, such as, for example, quantized coefficients 309 and / or any or all of inter prediction parameters (e.g., reference picture indexes 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 the encoding scheme described in connection with the entropy encoding 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 provide other parameters to other units of the decoder 30. The video decoder 30 may receive syntax elements at the level of a video slice and / or at the level of a video block. 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.

[0131] inverse quantization Inverse quantization unit 310 may be configured to receive a quantization parameter (QP) (or information generally related to inverse quantization) and quantized coefficients from encoded picture data 21 (e.g., by parsing and / or decoding, e.g., by entropy decoding unit 304), and apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameter to obtain dequantized coefficients 311, which may also be referred to as transform coefficients 311. The inverse quantization process may include 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.

[0132] Reverse transformation The inverse transform processing unit 312 may be configured to receive the dequantized coefficients 311, also referred to as transform coefficients 311, and apply a transform to the dequantized coefficients 311 to obtain a reconstructed residual block 313 in the sample domain. The reconstructed residual block 313 may also be referred to as a transform block 213. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, 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 encoded picture data 21 (e.g., by analyzing and / or decoding, e.g., by the entropy decoding unit 304) to determine the transform to apply to the dequantized coefficients 311.

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

[0134] filtering A loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter the reconstructed block 315 to, for example, smooth pixel transitions or otherwise improve video quality to obtain a filtered block 321. 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, e.g., a bilateral filter, an adaptive loop filter (ALF), a sharpening, smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 320 is shown in FIG. 3 as being an in-loop filter, in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.

[0135] 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 with respect to other pictures and / or for output or display, respectively.

[0136] The decoder 30 outputs the decoded picture 331 for presentation or viewing to a user, e.g., 332 The signal is configured to be output via

[0137] prediction The inter prediction unit 344 may be identical to the inter prediction unit 244 (especially the motion compensation unit), and the intra prediction unit 354 may be functionally identical to the intra prediction unit 254, performing the partitioning or partitioning decision and prediction based on partitioning and / or prediction parameters or respective information received from the decoded 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 or inter prediction) for each block based on the (filtered or unfiltered) reconstructed picture, block, or respective sample to obtain a prediction block 365.

[0138] When a video slice or picture is coded as an intra-coded (I) slice, the intra prediction unit 354 of the mode application unit 360 is configured to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra prediction mode and data from already decoded blocks of the current picture. When a video slice or picture is coded as an inter-coded (i.e., B or P) slice, the inter prediction unit 344 (e.g., a motion compensation unit) of the mode application unit 360 is configured to generate a prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from the entropy decoding unit 304. For inter prediction, the prediction block may be generated from one of the reference pictures in one of the reference picture lists. The video decoder 30 may construct the reference picture lists, List 0 and List 1, using a default construction technique based on the reference pictures stored in the DPB 330. The same or similar approaches may be applied for or by 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); for example, video may be coded using I, P, or B tile groups and / or tiles.

[0139] Mode application unit 360 is configured to determine prediction information for video / picture blocks of the current video slice by parsing the motion vectors or related information and other syntax elements, and to generate a predictive block for the current video block being decoded using the prediction information. For example, mode application unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to code the video blocks of the video slice, a slice type for inter prediction (e.g., B slice, P slice, or GPB slice), construction information for one or more of the reference picture lists for the slice, motion vectors for each inter coded video block of the slice, a status of inter prediction 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 approaches may be applied for or by 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.

[0140] The embodiment of video decoder 30 shown in FIG. 3 may be configured to partition and / or decode pictures by using slices (also referred to as video slices), where a picture may be partitioned into or decoded using one or more (generally non-overlapping) slices, and each slice may include one or more blocks (e.g., CTUs).

[0141] The embodiment of video decoder 30 shown in FIG. 3 may be configured to partition and / or decode a picture by using 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 decoded using one or more (generally non-overlapping) tile groups, where each tile group may include one or more blocks (e.g., CTUs) or one or more tiles, where each tile may be rectangular in shape and may include one or more blocks (e.g., CTUs), e.g., complete or fractional blocks.

[0142] Other variations of the video decoder 30 may be used to decode the encoded picture data 21. For example, the decoder 30 may generate an output video stream without a loop filtering unit 320. For example, a non-transform-based decoder 30 may directly inverse quantize the residual signal for a particular block or frame without the 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.

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

[0144] 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 vector in affine mode, lower block motion vector in affine, planar, ATMVP mode, temporal motion vector, etc.). For example, the value of the motion vector is constrained to a certain range according to its representation bit number. If the representation bit number of the motion vector is bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponentiation. For example, if bitDepth is set to be equal to 16, the range is -32768 to 32767, and if bitDepth is set to be equal to 18, the range is -131072 to 131071. For example, the values ​​of the derived motion vectors (e.g., the MVs of four 4x4 sub-blocks in one 8x8 block) are constrained such that the maximum difference between the integer parts of the MVs of the four 4x4 sub-blocks is no more than N pixels, such as no more than 1 pixel. The following description provides two methods for constraining the motion vectors according to bitDepth.

[0145] Method 1: Remove the overflow MSB (Most Significant Bit) by the following operation: ux = ( mvx + 2 bitDepth ) % 2 bitDepth (1) mvx = ( ux >= 2 bitDepth-1 ) ? ( ux - 2 bitDepth ) : ux (2) uy= ( mvy+2 bitDepth ) % 2 bitDepth (3) mvy = ( uy >= 2 bitDepth-1 ) ? ( uy - 2 bitDepth ) : uy (4) where mvx is the horizontal component of the motion vector of the image block or sub-block, mvy is the vertical component of the motion vector of the image block or sub-block, and ux and uy denote the respective intermediate values.

[0146] For example, if the value of mvx is -32769, then after applying equations (1) and (2), the resulting value is 32767. In computer systems, decimal numbers are stored as two's complements. The two's complements of -32769 are 1, 0111, 1111, 1111, 1111 (17 bits). Then, the MSB is discarded, and thus the resulting two's complements are 0111, 1111, 1111, 1111 (decimal 32767), which is the same as the output by applying equations (1) and (2). ux= ( mvpx + mvdx +2 bitDepth ) % 2 bitDepth (5) mvx = ( ux >= 2 bitDepth-1 ) ? (ux - 2 bitDepth ) : ux (6) uy = ( mvpy + mvdy +2 bitDepth ) % 2 bitDepth (7) mvy = ( uy >= 2 bitDepth-1 ) ? (uy - 2 bitDepth ) : uy (8) The operations may be applied during the summation of the motion vector predictor mvp and the motion vector difference mvd as shown in equations (5) to (8).

[0147] Method 2: Remove the overflowing MSB by clipping the value vx = Clip3(-2 bitDepth-1 , 2 bitDepth-1 -1, vx) vy = Clip3(-2 bitDepth-1 , 2 bitDepth-1 -1, vy) In the formula, vx is the horizontal component of the motion vector of the image block or sub-block, vy is the vertical component of the motion vector of the image block or sub-block, x, y, and z correspond to the three input values ​​of the clipping process of MV respectively, and the definition of the function Clip3 is as follows:

[0148]

number

[0149] 4 is a schematic diagram of a video coding device 400 according to an embodiment of the present disclosure. The video coding device 400 is suitable for implementing the disclosed embodiments as described below. In an 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.

[0150] The video coding device 400 may include an incoming port 410 (or input port 410) and one or more receiver units (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing data, one or more transmitter units (Tx) 440 and outgoing ports 450 (or output ports 450) for transmitting data, and a memory 460 for storing data. The video coding device 400 may also include optical-electrical (OE) and electrical-optical (EO) components coupled to the incoming port 410, the receiver units 420, the transmitter units 440, and the outgoing ports 450 for emitting or receiving optical or electrical signals.

[0151] The processor 430 may be implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGA, ASIC, and DSP. The processor 430 may communicate with the incoming port 410, the receiver unit 420, the transmitter unit 440, the outgoing port 450, and the memory 460. The processor 430 may include a coding module 470. The coding module 470 implements the disclosed embodiments described above and below. For example, the coding module 470 may implement, process, prepare, or provide various coding operations. Thus, the inclusion of the coding module 470 significantly improves the functionality of the video coding device 400 and results in the transition of the video coding device 400 to different states. Alternatively, the coding module 470 may be implemented as instructions stored in the memory 460 and executed by the processor 430.

[0152] Memory 460 may include one or more disks, tape drives, and solid state drives, and may be used to store programs when such programs are selected for execution as well as an overflow data storage device for storing instructions and data read during execution of programs. 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).

[0153] 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 of FIG. 1A, according to an example embodiment.

[0154] The processor 502 of the apparatus 500 can be a central processing unit. Alternatively, the processor 502 can be any other type of device or devices, existing or later developed, that can manipulate or process information. Although the disclosed implementations can be performed by a single processor as shown, e.g., processor 502, advantages in speed and efficiency can be realized by using two or more processors.

[0155] The memory 504 of the device 500 can be a read-only memory (ROM) device or a random access memory (RAM) device in implementation. Any other suitable type of storage device can be used as the memory 504. The memory 504 can include code and data 506 accessed by the processor 502 using a bus 512. The memory 504 can 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 can include applications 1 through N, which further include a video coding application that performs the methods described herein.

[0156] 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-sensing elements operable to sense touch input. The display 518 may be coupled to the processor 502 via the bus 512.

[0157] Although shown here as a single bus, bus 212 of device 500 may be comprised of multiple buses. Additionally, secondary storage (not shown) may be directly coupled to other components of device 500 or may be accessed over a network, and may include a single integrated unit such as a memory card or multiple units such as multiple memory cards. Thus, device 500 may be implemented in a wide variety of configurations.

[0158] Motion Vector Improvement (MVR) Usually, motion vectors are at least partially determined on the encoder side and signaled to the decoder in the encoded bitstream. However, motion vectors may also be improved in the decoder (and also in the encoder) starting from an initial motion vector indicated in the bitstream. In such a case, for example, similarity between already decoded patches or blocks of pixels pointed to by the initial motion vector may be used to improve the accuracy of the initial motion vector. Such motion vector improvement brings the advantage of reducing signaling overhead, i.e., the accuracy of the initial motion vector is increased in the same way in both the encoder and the decoder, and therefore no additional signaling for the improvement is required.

[0159] It is noted that the initial motion vector before improvement may not be the best motion vector that results in the best prediction. Since the initial motion vector is signaled in the bitstream, it may not be possible to express the initial motion vector with very high accuracy (which would increase the bitrate). Therefore, a motion vector improvement process is utilized to make the initial motion vector better. The initial motion vector may be, for example, a motion vector used in predicting a neighboring block of the current block. In this case, it is sufficient to signal an indication in the bitstream that which neighboring block's motion vector is used by the current block. Such a prediction mechanism is very effective in reducing the number of bits for representing the initial motion vector. However, since the motion vectors of two neighboring blocks are generally not predicted to be the same, the accuracy of the initial motion vector may be low.

[0160] To further increase the accuracy of the motion vectors without further increase in signaling overhead, it may be beneficial to further refine the motion vectors derived at the encoder side and provided (signaled) in the bitstream. The refinement of the motion vectors may be performed in the decoder without assistance from the encoder. The encoder may use the same refinement to obtain the corresponding refined motion vector available in the decoder in its decoder loop. The refinement for the current block being reconstructed in the current picture is performed by determining a template of the reconstructed samples, determining a search space around the initial motion information for the current block, and finding the part of the reference picture that best matches the template in the search space. The best matching part determines an refined motion vector for the current block, and the refined motion vector is used to obtain the inter-predicted samples for the current block, i.e., the current block being reconstructed.

[0161] Motion vector refinement is part of the inter prediction unit 244 in FIG. 2 and 344 in FIG.

[0162] The motion vector refinement may be performed according to the following steps.

[0163] Generally, an initial motion vector may be determined based on an indication in a bitstream. For example, an index indicating a position in a list of candidate motion vectors may be signaled in the bitstream. In another example, a motion vector predictor index and a motion vector difference value may be signaled in the bitstream. The motion vector determined based on an indication in the bitstream is defined as being an initial motion vector. In the case of bi-prediction, in which inter-prediction for a current block is obtained as a weighted combination of predicted blocks of samples determined by two motion vectors, an initial motion vector in a first reference picture of a first reference picture list L0 shall be denoted as MV0, and an initial motion vector in a second reference picture of a second reference picture list L1 shall be denoted as MV1.

[0164] Using the initial motion vector, a pair of refinement candidate motion vectors (MVs) is determined. At least two refinement candidate pairs may be determined. In general, the refinement candidate motion vector pair is determined based on the initial motion vector pair (MV0, MV1). Furthermore, the candidate MV pair may be determined by adding a small motion vector difference to MV0 and MV1. For example, the candidate MV pair may include: (MV0, MV1) (MV0 + (0,1), MV1 + (0,-1)) (MV0 + (1,0), MV1 + (-1,0)) (MV0 + (0,-1), MV1 + (0,1)) (MV0 + (-1,0), MV1 + (1,0)) ·... Here, (1,-1) represents a vector with a displacement of 1 integer pixel in the horizontal (or x) direction and a displacement of -1 integer pixel in the vertical (or y) direction.

[0165] It is noted that the above list of candidate MV pairs are merely examples for illustrative purposes, and the present disclosure is not limited to any particular list of candidates.

[0166] The refinement candidate motion vector (MV) pairs form the search space of the motion vector refinement process.

[0167] In bi-prediction of the current block, two prediction blocks obtained using the respective first motion vector of list L0 and the second motion vector of list L1 are combined into a single prediction signal or block, which can provide a better adaptation to the original signal than uni-prediction, resulting in less residual information and possibly more efficient compression.

[0168] In the motion vector refinement, two prediction blocks obtained using the first and second motion vectors of each of the candidate MV pairs are compared with each other based on a similarity metric for each of the refinement candidate MV pairs. Usually, the pair of candidate MVs that results in the highest similarity is selected as the refinement motion vector, denoted as MV0' and MV1', i.e., the refinement motion vector in the first reference picture of list L0 and the refinement motion vector in the second reference picture of list L1, respectively. In other words, predictions corresponding to the motion vectors of list L0 and list L1 of the candidate motion vector pair are obtained, and then the predictions are compared with each other based on a similarity metric. The pair of candidate motion vectors with the highest relative similarity is selected as the refinement MV pair.

[0169] In general, the output of the refinement process is an refined MV. The refined MV may be the same as the initial MV or may be different from the initial MV. Depending on which pair of candidate MVs achieves the highest similarity, the pair of candidate MVs formed by the initial MV is also among the pairs of candidate MVs. In other words, if the pair of candidate MVs achieving the highest similarity is formed by the initial MV, the refined MV and the initial MV are equal to each other.

[0170] Instead of selecting the location that maximizes a similarity metric, another method is to select the location that minimizes a dissimilarity metric. The measure of dissimilarity comparison could be SAD (sum of absolute differences), MRSAD (mean removed sum of absolute differences), SSE (sum of squared residuals), etc. The SAD between two prediction blocks could be obtained using a pair of candidate MVs (CMV0, CMV1), and the SAD could be calculated as follows:

[0171]

number

[0172] where nCbH and nCbW are the height and width of the prediction block, the function abs(a) specifies the absolute value of the argument a, and predSamplesL0 and predSamplesL1 are the prediction block samples obtained by the pair of candidate MVs represented by (CMV0, CMV1).

[0173] Alternatively, a comparison measure of dissimilarity may be obtained by evaluating only a subset of samples in a prediction block to reduce the number of calculations. An example is given below, where rows of samples are alternatively included in the SAD calculation (every other row is evaluated).

[0174]

number

[0175] An illustrative example of motion vector refinement is described in the JVET (ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11) document JVET-M1001-v3, "Versatile Video Coding (Draft 4)", published at http: / / phenix.it-sudparis.eu / jvet / . Section "8.4.3 Decoder side motion vector refinement process" of the document illustrates motion vector refinement.

[0176] To reduce internal memory requirements for the refinement, in some embodiments, the motion vector refinement process may be performed independently for blocks of luma samples obtained by partitioning a coding block of samples that exceeds a certain predetermined width and / or height in the luma samples into sub-blocks of samples that are equal to or smaller than the luma predetermined width and height. The pair of refined MVs for each sub-block in the partitioned coding block may be different. Then, inter prediction for both luma and chroma is performed for each sub-block using its pair of refined MVs.

[0177] Each MV of the pair of initial MVs may have fractional pixel accuracy. In other words, the MV indicates the displacement between the current block of samples and the resampled reference region, which may point to a fractional position in the horizontal and vertical directions from the integer grid of the reconstructed reference samples. In general, a two-dimensional interpolation of the integer grid of the reconstructed reference samples is performed to obtain the sample value of the fractional sample offset position. The process of obtaining a predicted sample from the reconstructed reference picture using the pair of candidate MVs may be by one of the following methods. · Round the fractional parts of the initial MV pairs to the nearest integer position to get integer grid values ​​for the reconstructed reference picture. · Perform a 2-tap (e.g., bilinear) separable bilinear interpolation to obtain predicted sample values ​​with fractional-pixel accuracy as indicated by the initial MV pair. · Perform a separable interpolation of more taps (e.g., 8 taps or 6 taps) to obtain predicted sample values ​​with fractional pixel accuracy as indicated by the initial MV pair.

[0178] Although the candidate MV pairs may have any sub-pixel offset with respect to the initial MV pair, in some embodiments, to simplify the search, candidate MV pairs with integer pixel distance or integer displacement with respect to the initial MV pair are selected. Such candidate MV pairs with integer pixel distance with respect to the initial MV pair may also be used in the first stage of the motion vector refinement (MVR) process, the so-called MVR integer distance refinement stage. In such a case, the predicted samples of all candidate MV pairs may be obtained by performing prediction on a block of samples around the initial MV pair to encompass all refinement positions around the initial MV pair.

[0179] In some embodiments, once the dissimilarity cost values ​​for all candidate MV pairs at integer distances (integer displacements) from the initial MV pair have been evaluated, additional candidate MV pairs at sub-pixel distance offsets from the best cost value location may be added. This second stage may be performed as a fractional distance refinement stage of the MVR process. A predicted sample may be obtained for each of these locations using one of the methods described above, and the dissimilarity costs are evaluated and compared with each other to obtain the location with the lowest dissimilarity cost. In certain other embodiments, to avoid this computationally expensive prediction process for each sub-pixel distance location around the lowest cost integer distance location, the evaluated integer distance cost values ​​are stored and a parametric error surface is fitted near the integer distance locations. The minimum of this error surface is then analytically calculated and used as the location with the smallest dissimilarity. In such a case, the dissimilarity cost value is said to be derived from the calculated integer distance cost value.

[0180] The application of motion vector refinement for a given coding block of samples may be conditioned by the specific coding properties of the coding block of samples. Some examples of such coding properties may include: The distance, expressed in number of pictures (when sampled at a uniform frame rate), from the current picture to the two reference pictures used for bi-prediction of the coding block of samples, or the difference in Picture Order Count (POC), is equal and decreases on both sides of the current picture. The initial discrepancy between the two predicted blocks obtained using a pair of initial MVs is less than a predefined sample-wise threshold.

[0181] Bi-predictive Optical Flow Improvement (BPOF) Bi-predictive optical flow (BPOF) or bi-directional optical flow (BDOF) refinement is a process that increases the bi-predictive accuracy of a block without any explicit additional signaling in the bitstream other than the signaling for bi-prediction. Bi-predictive optical flow or bi-directional optical flow refinement is part of the inter prediction unit 244 in FIG. 2 and 344 in FIG. 3.

[0182] In bi-prediction, two inter predictions are obtained according to two motion vectors, and then the predictions are combined by applying a weighted average. The combined prediction can result in reduced residual energy because the quantization noise in the two reference patches or blocks is cancelled, thereby providing higher coding efficiency than uni-prediction. The weighted combination of bi-prediction is expressed by the following formula: Bi-prediction = Prediction1 * W1 + Prediction2 * W2 + K where W1 and W2 are weighting factors that may be signaled in the bitstream or predefined at the encoder and / or decoder side. K is an additive factor that may also be signaled in the bitstream or predefined at the encoder and / or decoder side. As an example, bi-prediction is Bi-prediction = (Prediction1 + Prediction2) / 2 where W1 and W2 are set to 1 / 2 and K is set to 0.

[0183] The goal of optical flow refinement is to increase the accuracy of bi-prediction. Optical flow is the pattern of visible movement of image objects between two successive frames. Optical flow is caused by object and / or camera movement. The optical flow refinement process increases the accuracy of bi-prediction by applying the optical flow equation (solving the optical flow equation).

[0184] In the example, a pixel I(x,y,t) is in a first frame (x and y correspond to spatial coordinates and t corresponds to the time dimension). The object represented by the pixel moves a distance (dx,dy) in the next frame acquired after a time dt. Under the assumption that the pixels are the same and do not change intensity, the equation for optical flow is: I(x,y,t) = I(x+dx, y+dy, t+dt) where I(x,y,t) specifies the intensity (sample value) of the pixel at coordinates (x,y,t).

[0185] In another example, for small displacements where the higher order terms in the Taylor series expansion are ignored, the optical flow equation is

[0186]

number

[0187] where:

[0188]

number

[0189] and

[0190]

number

[0191] are the horizontal and vertical spatial sample gradients at location (x,y),

[0192]

number

[0193] is the time partial derivative at position (x,y), and v x = dx / dt and v y =dy / dt represents the rate of displacement.

[0194] Optical flow improvement utilizes the above principles to enhance the quality of bi-prediction.

[0195] The implementation of optical flow refinement generally involves the following steps. 1. Calculate the gradient of the sample 2. Calculate the difference between the first and second predictions 3. Calculate the error Δ between two reference patches or blocks using the optical flow formula

[0196]

number

[0197] Calculate the displacement (dx, dy) of a pixel or group of pixels that minimizes I (0) corresponds to the sample value of the first prediction, and I (1) is the sample value of the second prediction, and v x and v y are the calculated displacement velocities in the x and y directions, and ∂I (0) / ∂x, ∂I (0) / ∂y, ∂I (1) / ∂x, and ∂I (1)∂y are the gradients in the -x and -y directions of the first and second predictions, respectively. τ1 and τ0 represent the temporal distances from the current picture to the respective reference pictures in display order from which the first and second predictions are obtained. Some techniques minimize the sum of squared residuals, while some techniques minimize the sum of absolute errors. 4. Use an implementation of the optical flow equation such as the one below. pred BIO = 1 / 2 (I (0) + I (1) + v x / 2·(τ1∂I (1) / ∂x - τ0∂I (0) / ∂x) + v y / 2·(τ1∂I (1) / ∂y - τ0∂I (0) / ∂y)) In the formula, pred BIO Specifies the revised prediction that is the output of the optical flow refinement process.

[0198] The gradient of the sample may be obtained according to the following formula: ·∂I(x, y, t) / ∂x = I(x + 1, y, t) - I(x - 1, y, t) ·∂I(x, y, t) / ∂y = I(x, y + 1, t) - I(x, y - 1, t)

[0199] In some embodiments, to reduce the complexity of estimating the displacement for each pixel, the displacement is estimated for a group of pixels. In some examples, to compute an improved bi-prediction for a block of 4x4 luma samples, the displacement is estimated using sample values ​​of a block of 8x8 luma samples centered on the 4x4 block of samples.

[0200] The input of the optical flow refinement process is the predicted samples from two reference pictures, and the output of the optical flow refinement is the combined prediction (predBIO) calculated by the optical flow equation:

[0201] One example of optical flow improvement has been published at http: / / phenix.it-sudparis.eu / jvet / and is described in section 8.5.6.4 "Bidirectional optical flow prediction process" of document JVET-N1001, Versatile Video Coding (Draft 5), referenced below for reference.

[0202] The inputs to this process are: - Two variables nCbW and nCbH that specify the width and height of the current coding block - Two (nCbW + 2) x (nCbH + 2) luma prediction sample arrays, predSamplesL0 and predSamplesL1 - Prediction list usage flags predFlagL0 and predFlagL1 - Reference indices refIdxL0 and refIdxL1 - Bidirectional optical flow utilization flag bdofUtilizationFlag[ xIdx ][ yIdx ] with xIdx = 0..( nCbW >> 2 ) - 1, yIdx = 0..( nCbH >> 2 ) - 1

[0203] The output of this process is a (nCbW) x (nCbH) array of luma prediction sample values, pbSamples.

[0204] The variables bitDepth, shift1, shift2, shift3, shift4, offset4, and mvRefineThres are derived as follows: - The variable bitDepth is Y , i.e. set equal to the bit depth of the luma component. - The variable shift1 is set equal to Max(6, bitDepth - 6). - The variable shift2 is set equal to Max(4, bitDepth - 8). - The variable shift3 is set equal to Max(1, bitDepth - 11). - The variable shift4 is set equal to Max(3, 15 - bitDepth), and the variable offset4 is set equal to 1 << (shift4 - 1). - The variable mvRefineThres is set equal to 1 << Max( 5, bitDepth - 7 ).

[0205] For xIdx = 0..( nCbW >> 2 ) - 1 and yIdx = 0..( nCbH >> 2 ) - 1, the following applies: The variable xSb is set equal to ( xIdx << 2 ) + 1, and ySb is set equal to ( yIdx << 2 ) + 1. If bdofUtilizationFlag[ xIdx ][ yIdx ] is equal to FALSE, for x = xSb - 1.. xSb + 2, y = ySb - 1.. ySb + 2, the predicted sample value of the current sub-block is derived as follows: pbSamples[ x ][ y ] = Clip3( 0, ( 2 bitDepth ) - 1, ( predSamplesL0[ x + 1 ][ y + 1 ] + offset4 + predSamplesL1[ x + 1 ][ y + 1 ] ) >> shift4 ) Otherwise (bdofUtilizationFlag[ xIdx ][ yIdx ] is equal to TRUE), the predicted sample value of the current sub-block is derived as follows: For x = xSb - 1..xSb + 4, y = ySb - 1..ySb + 4, the following ordered steps are applied: 1. For each corresponding sample position (x, y) in the prediction sample array, x , v y ) is derived as follows: h x = Clip3( 1, nCbW, x ) v y = Clip3( 1, nCbH, y ) 2. The variables gradientHL0[x][y], gradientVL0[x][y], gradientHL1[x][y], and gradientVL1[x][y] are derived as follows: gradientHL0[ x ][ y ] = (predSamplesL0[ h x + 1 ][v y ] - predSampleL0[ h x - 1 ][ v y ] ) >> shift1 gradientVL0[ x ][ y ] = (predSampleL0[ h x ][ v y + 1 ] - predSampleL0[ h x ][v y - 1 ] ) >> shift1 gradientHL1[ x ][ y ] = (predSamplesL1[ h x + 1 ][v y ] - predSampleL1[ h x - 1 ][ v y ] ) >> shift1 gradientVL1[ x ][ y ] = (predSampleL1[ h x ][ v y + 1 ] - predSampleL1[ h x ][v y - 1 ] ) >> shift1 3. The variables diff[x][y], tempH[x][y], and tempV[x][y] are derived as follows: diff [ x ][ y ] = ( predSamplesL0 [ h x ][ v y ] >> shift2 ) - ( predSamplesL1 [ h x ][ v y ] >> shift2 ) tempH[ x ][ y ] = ( gradientHL0 [ x ][ y ] + gradientHL1[ x ][ y ] ) >> shift3 tempV[ x ][ y ] = ( gradientVL0 [ x ][ y ] + gradientVL1[ x ][ y ] ) >> shift3 sGx2, sGy2, sGxGy, sGxdI, and sGydI. i, j = -1..4 and sGx2 = Σ i Σ j ( tempH[ xSb + i ][ ySb + j ] * tempH[ xSb + i ][ ySb + j ]) i, j = -1..4 and sGy2 = Σ i Σ j ( tempV[ xSb + i ][ ySb + j ] * tempV[ xSb + i ][ ySb + j ]) i, j -1..4 and sGxGy = Σ i Σ j ( tempH[ xSb + i ][ ySb + j ] * tempV[ xSb + i ][ ySb + j ]) sGxGy m = sGxGy >> 12 sGxGy s = sGxGy & ((1<<12)-1) i, j = -1..4 and sGxdI = Σ i Σ j ( -tempH[ xSb + i ][ ySb + j ] * diff[ xSb + i ][ ySb + j ]) With i, j = -1..4, sGydI = Σ i Σ j ( -tempV[ xSb + i ][ ySb + j ] * diff[ xSb + i ][ ySb + j ] ) - The horizontal and vertical motion offsets for the current sub-block are derived as follows: v x = sGx2 > 0 ? Clip3( -mvRefineThres, mvRefineThres, -( sGxdI << 3 ) >> Floor( Log2( sGx2 ) ) ) : 0 v y = sGy2 > 0 ? Clip3( -mvRefineThres, mvRefineThres, ( ( sGydI << 3 ) - ( ( v x * sGxGym ) << 12 + v x *sGxGy s ) >> 1 ) >> Floor( Log2( sGx2 ) ) ) : 0 For x=xSb-1..xSb+2, y=ySb-1..ySb+2, the predicted sample values ​​of the current sub-block are derived as follows: bdofOffset = Round( ( v x * ( gradientHL1[ x + 1 ][ y + 1 ] - gradientHL0[ x + 1 ][ y + 1 ] ) ) >> 1 ) + Round( ( v y * (gradientVL1[ x + 1 ][ y + 1 ] - gradientVL0[ x + 1 ][ y + 1 ] ) ) >> 1 ) [The Round() operation is defined for float inputs. The Round() operation may be omitted here.] pbSamples[ x ][ y ] = Clip3( 0, ( 2 bitDepth) - 1, ( predSamplesL0[ x + 1 ][ y + 1 ] + offset4 + predSamplesL1[ x + 1 ][ y + 1 ] + bdofOffset ) >> shift4 )

[0206] The terms improved optical flow, improved bi-predictive optical flow, and improved bidirectional optical flow are used interchangeably in this disclosure as the terms are essentially equivalent.

[0207] Technical problem addressed by this disclosure In the currently adopted version of BPOF, in order to reduce the memory footprint for BPOF and to allow a sub-block level pipeline to be established in the hardware design, the coding units are partitioned into sub-blocks. Any coding unit with a width greater than 16 is partitioned horizontally with a sub-block width of 16. Any coding unit with a height greater than 16 is partitioned vertically with a sub-block height of 16.

[0208] To calculate the optical flow and apply corrections based on the calculated optical flow, sample gradients are needed for all sample positions within a 4x4 block (as explained in the background section of BPOF). Getting a 4x4 sample gradient requires extended sample values ​​in both references beyond the 4x4 sample values. When using a [-1 0 1] filter to calculate the gradient, one extended sample value is needed all around the 4x4 block in each reference. In other words, a 4x4 sample gradient requires a 6x6 sample area (excluding the four corner samples of the 6x6 area).

[0209] At the subblock level, a subblock of size M×N requires (M+2)×(N+2) sample values ​​to calculate sample gradients with respect to M×N sample positions. To keep the complexity low, in the currently adopted version of BDOF, the extended sample values ​​(i.e., sample positions outside the M×N sample positions corresponding to the subblock) are not obtained by motion compensated interpolation of the respective reference samples. Instead, the extended sample positions with subpixel accuracy are obtained in each reference picture, and the fractional parts in the horizontal and vertical directions are ignored to obtain sample values ​​of the reference sample positions reconstructed in the corresponding integer grid in each reference.

[0210] These extended sample values ​​are used in the computation of boundary sample gradients at each reference. Since the computation of the 4×4 optical flow uses sample gradient values ​​and sample values ​​of 6×6 sample positions centered on the 4×4, the sample gradient values ​​of the extended positions are set to the sample gradient values ​​of the nearest sub-block boundary samples. When extended sample values ​​obtained from the values ​​of the reference sample positions reconstructed on an integer grid are used for the boundary gradient computation, the sample values ​​of the extended samples are set to the sample values ​​of the nearest sub-block boundary samples.

[0211] This aspect of removing the fractional parts in the horizontal and vertical directions of the sample positions to obtain reconstructed reference sample values ​​on an integer grid for the extended samples introduces a small compression loss compared to performing two-dimensional separable K-tap interpolation with padded samples by taking the nearest boundary sample values ​​as shown in JVET-M0487.

[0212] Proposed method In this disclosure, a method is provided that nearly eliminates the coding loss introduced by the deletion of the fractional horizontal and vertical parts, while maintaining the low complexity aspect of obtaining the extended sample values.

[0213] In particular, instead of ignoring the fractional horizontal and vertical offsets of the extended sample positions in each reconstructed reference sample grid, the fractional offsets are used to perform rounding operations in both the horizontal and vertical directions to identify the nearest integer sample position in the integer sample grid of the corresponding reconstructed reference frame, and the sample value at such identified position is then assigned to the extended sample.

[0214] In general, the proposed method for bidirectional optical flow prediction based on sample values ​​from sample positions belonging to an extended area of ​​a predicted block used in bidirectional optical flow prediction of a current block may be implemented by the following steps, as shown in FIG. 8 . Step 1310, obtain the motion vector (MV) of the current block. Step 1320, obtain sub-pixel sample positions in the expanded region of the predicted block in the reference picture based on the MV. Here, the extended region of the predicted block in the reference picture is based on the MV. In particular, by using the MV, a prediction block having an offset indicated by the MV as a reference to a collocated block corresponding to the current block can be found. The extended region is a region that is adjacent to the prediction block and includes at least one row / column of pixels surrounding / containing the prediction block. The extended region can be considered as a padding region surrounding the prediction block in the reference picture, for example, used for applying a K-tap interpolation filter at block boundaries and / or calculating 3-tap sample gradients. Step 1330 processes the obtained sub-pixel sample positions to obtain integer pixel sample positions in the reference picture. Step 1340 performs bidirectional optical flow prediction by looking up reference sample values ​​at the obtained integer pixel sample positions in the reference picture.

[0215] The following embodiment illustrates how this method can be implemented.

[0216] EMBODIMENT 1 Let the top-left sample of a current sub-block of dimension M×N samples for which bi-prediction with BPOF / BDOF is being performed be at (sb_start_x, sb_start_y). Let (mvx0, mvy0) be the MV of the current sub-block with 1 / 16 pixel precision relative to the first reference frame L0, and (mvx1, mvxy1) be the MV of the current sub-block with 1 / 16 pixel precision relative to the second reference frame L1.

[0217] The 1 / 16 pixel accurate location in LO that corresponds to the current sub-block's top-left location in L0 is given by ((sb_start_x << 4) + mvx0, (sb_start_y << 4) + mvy0). The 1 / 16 pixel accurate location in L1 that corresponds to the current sub-block's top-left location in L0 is given by ((sb_start_x << 4) + mvx1, (sb_start_y << 4) + mvy1). Various sub-pixel precisions such as half-pel, quarter-pel, or eighth of a pel may be used, and the current sub-block's top-left location is determined by applying a corresponding left shift by 1, 2, or 3, respectively.

[0218] For M×N locations in the L0 and L1 reference frames corresponding to the sub-blocks, a two-dimensional separable K-tap motion compensated interpolation is performed in each reference frame based on the corresponding sample locations with, for example, 1 / 16 sub-pixel accuracy, and used as the predicted sample values ​​used in the BDOF process to calculate sample gradients.

[0219] For the purposes of the M×N sub-block boundary sample gradient calculation, the following procedure (for typical sub-pel sample accuracy) is followed to obtain predicted sample values ​​for the remaining extended corresponding sample positions that are outside of the central M×N sample positions within an (M+2)×(N+2) block of sample positions. Let x_spel_pos be the horizontal sub-pel sample location of the extended sample position, and y_spel_pos be the vertical sub-pel sample location. The sample value for this extended sample position is given by x_pos = (x_spel_pos + (1 << (shift_val - 1))) >> shift_val y_pos = (y_spel_pos + (1 << (shift_val - 1))) >> shift_val where shift_val is selected according to the sub-pel sample precision used. For half-pel, quarter-pel, ⅛ of a pel, and 1 / 16 of a pel sub-pel precision, a shift_val of 1, 2, 3, or 4 is used, respectively.

[0220] This process of rounding sub-pel positions in the horizontal and vertical directions results in more accurate boundary gradients, as can be seen in FIGS.

[0221] In FIG. 6, it is shown from which position in the reference picture pixel values ​​are fetched. In the diagram (A) showing the state of the art, as MVs point to fractional positions in the reference picture, the fractional part is discarded and only the integer part is used to fetch pixel values. For example, for MV (4, 0), MV (9, 0) in the Q4 format, the (0, 0) position in the reference picture is used to fetch pixel values ​​(reference samples). In contrast, in the diagram (B) according to the present disclosure, the fractional part is taken into consideration to round to the nearest integer position that is finally used to fetch pixel values. For MV (4, 0), MV (9, 0) in the Q4 format, the positions (0, 0) and (16, 0) in the reference picture are respectively used to fetch the respective pixel values, which can greatly improve the accuracy of fetching reference samples.

[0222] In FIG. 7B, the described method for determining integer grid reference sample positions based on sample positions with sub-pixel accuracy (i.e., 1 / 16 of a pixel) is shown. It can be seen that in the horizontal and vertical directions, the nearest integer sample positions are selected based on rounding (half) the horizontal and vertical components of the positions. Thus, sub-pixel accurate offsets from (i - 8 / 16) to (i + 7 / 16) in the horizontal direction and (j - 8 / 16) to (j + 7 / 16) in the vertical direction use (i, j) as the nearest integer sample position. In comparison, FIG. 7A shows the problem of selecting integer sample positions by truncation, where sub-pixel accurate offsets from i to (i + 15 / 16) in the horizontal direction and from j to (j + 15 / 16) in the vertical direction use (i, j) as the integer sample position.

[0223] At the left boundary sample location of an M×N block, the horizontal boundary sample gradient is calculated by taking the difference between the sample value at its right location (calculated using two-dimensional separable K-tap interpolation) and the sample value at its left extended sample location (assigned the nearest reconstructed reference sample value rounded as described above). Similarly, at the right boundary sample location of an M×N block, the horizontal boundary sample gradient is calculated by taking the difference between the sample value at its right location (assigned the nearest reconstructed reference sample value rounded as described above) and the sample value at its left location (calculated using two-dimensional separable K-tap interpolation).

[0224] At the top boundary sample location of an M×N block, the vertical boundary sample gradient is calculated by taking the difference between the sample value of the location below (calculated using two-dimensional separable K-tap interpolation) and the sample value of the extended sample location above (assigned the nearest reconstructed reference sample value rounded as described above). Similarly, at the bottom boundary sample location of an M×N block, the vertical boundary sample gradient is calculated by taking the difference between the sample value of the location below (assigned the nearest reconstructed reference sample value rounded as described above) and the sample value of the location above (calculated using two-dimensional separable K-tap interpolation).

[0225] EMBODIMENT 2 In this embodiment, the value of the extended sample position is derived using the procedure described in embodiment 1 whenever BPOF / BDOF is applied and motion vector refinement (MVR) is not applied to the given coding unit to which the current subblock belongs, or whenever MVR and BDOF are both applied to the given coding unit to which the current subblock belongs but MVR does not produce an integer displacement during the integer distance refinement stage of MVR compared to the initial MV pair. In other words, when MVR and BDOF are both applied and the integer distance refinement stage of MVR produces an initial MV pair, i.e., an MV pair of zero displacement, the value of the extended sample position is derived using the procedure described in embodiment 1.

[0226] If MVR and BDOF are both applied to a given coding unit to which the current subblock belongs, but the MVR generates an integer mutation during the integer distance refinement stage of the MVR compared to the initial MV pair, i.e., the improved MV pair after the integer distance refinement stage is different from the initial MV pair, the sample value for the extended sample position (x_spel_pos, y_spel_pos) is calculated as follows: x_pos = x_spel_pos >> shift_val y_pos = y_spel_pos >> shift_val where shift_val is selected according to the sub-pel sample precision used. For half-pel, quarter-pel, ⅛ of a pel, and 1 / 16 of a pel sub-pel precision, a shift_val of 1, 2, 3, or 4 is used, respectively. In other words, in obtaining the sample position in this case, the fractional part of the position in both the horizontal and vertical directions is ignored.

[0227] Advantages of the proposed method The described method of rounding sub-pel positions in the horizontal and vertical directions results in more accurate boundary gradients. This improves the optical flow calculated based on these sample gradients, and also improves the correction applied using the calculated optical flow. This provides consistent coding gains compared to previous methods that ignore fractional offsets in the horizontal and vertical directions when selecting integer sample values ​​for the extended sample positions. At the same time, the complexity is not significantly changed, since the addition of horizontal and vertical rounding offsets is the only increase in complexity.

[0228] Based on the solution, a possible embodiment in combining the standard VVC Draft 5 may be shown as follows:

[0229] Luma Integer Sample Fetch Process The inputs to this process are: - Luma position in full sample units (xInt L , yInt L ) - Luma position in fractional sample units (xFrac L , yFrac L ) - Luma reference sample array refPicLX L The output of this process is the predicted luma sample value predSampleLX. L It is.

[0230] The variable shift is Max(2, 14 - BitDepth Y ).

[0231] The variable picW is set equal to pic_width_in_luma_samples, and the variable picH is set equal to pic_height_in_luma_samples.

[0232] The luma position in full sample units ( xInt, yInt ) is derived as follows: xOffset = xFrac L > 7 ? 1 : 0 yOffset = yFrac L > 7 ? 1 : 0 xInt = Clip3( 0, picW - 1, sps_ref_wraparound_enabled_flag ? ClipH( ( sps_ref_wraparound_offset_minus1 + 1 ) * MinCbSizeY, picW, xInt L - 1 + xOffset) : xInt L - 1 + xOffset) yInt = Clip3( 0, picH - 1, yInt L - 1 + yOffset)

[0233] Predicted luma sample value predSampleLX L is derived as follows: predSampleLX L =refPicLX L [ xInt ][ yInt ] << shift3

[0234] It should be noted that although these exemplary modifications in the VVC draft are made only to the luma component, they may be used for the chroma components in the same way or with some modifications to adopt the properties of the chroma components.

[0235] FIG. 8 shows a flow diagram of a method for video encoding / decoding according to an embodiment of the present disclosure. The illustrated method performs bidirectional optical flow prediction based on sample values ​​from sample positions belonging to an extended region of a predicted block used in bidirectional optical flow prediction of a current block as follows: In step 1310, a motion vector (MV) of the current block is obtained. In step 1320, sub-pixel sample positions in the extended region of a predicted block in a reference picture are obtained based on the MV. In step 1330, the obtained sub-pixel sample positions are processed, in particular rounded, to obtain integer pixel sample positions in the reference picture. In step 1340, finally, bidirectional optical flow prediction is performed by referring to reference sample values ​​at the obtained integer pixel sample positions in the reference picture.

[0236] 9 is a block diagram showing an example of an encoding / decoding device according to an embodiment of the present disclosure. The encoding / decoding device 20 / 30 includes a prediction unit 1440 configured to perform bidirectional optical flow prediction of a current block, a first acquisition unit 1410 configured to acquire a motion vector (MV) of the current block, a second acquisition unit 1420 configured to acquire sub-pixel sample positions in an extended area of ​​a predicted block in a reference picture based on the MV, and a processing unit 1430 configured to process, in particular, round, the acquired sub-pixel sample positions to acquire integer pixel sample positions in the reference picture, and the prediction unit 1440 is configured to perform bidirectional optical flow prediction by referring to reference sample values ​​at the acquired integer pixel sample positions in the reference picture.

[0237] The acquisition units 1410 and 1420, the processing unit 1430, and the prediction unit 1440 may be implemented in hardware, software, firmware, or any combination thereof. When 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 codes and executed by a hardware-based processing unit. 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 circuits. Thus, the term "processor" as used herein may refer to any of the above structures or any other structures suitable for implementing the techniques described herein. In addition, in some aspects, the functions described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Also, the techniques may be fully implemented in one or more circuits or logic elements.

[0238] Some specific embodiments are outlined in the following aspects of the disclosure.

[0239] According to a first aspect, there is provided a method used for obtaining predicted sample values ​​for sample positions belonging to an extended region of a predicted block used in bidirectional optical flow prediction of a current coding block, the method comprising the steps of obtaining an MV of the current coding block, obtaining sub-pixel positions in a reference picture based on the MV and extended sample positions in the current picture surrounding the sample positions of the current coding block, obtaining integer pixel positions in the reference picture by rounding / relocating the obtained sub-pixel sample positions towards a nearest integer pixel local, and setting the predicted sample values ​​for sample positions belonging to the extended region of the predicted block as reference sample values ​​at the obtained integer pixel positions.

[0240] The step of rounding / repositioning the obtained sub-pixel sample positions towards the nearest integer pixel positions may include rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions to the nearest integer sample positions in that direction, with half sample positions between two integer sample positions being rounded to a higher integer sample position in that direction.

[0241] The step of rounding / relocating the obtained sub-pixel sample position towards the nearest integer pixel position may include comparing the obtained sub-pixel sample position to a threshold value separately in the horizontal and vertical directions, and if the sub-pixel sample position is greater than or equal to the threshold value, the nearest higher integer sample position may be taken as the integer pixel position, and if the sub-pixel sample position is less than the threshold value, the nearest lower integer sample position may be taken as the integer pixel position.

[0242] According to a second aspect, there is provided a method used for obtaining predicted sample values ​​for sample positions belonging to an extended region of a predicted block used in bidirectional optical flow prediction of a current coding block, the method comprising the steps of obtaining a first MV corresponding to a predicted sample in the extended region of the coding block; obtaining a second MV by discarding a fractional part of the first MV; obtaining a first integer pixel position of the extended region in a reference picture based on the second MV; determining a fractional offset vector based on the first MV; and obtaining a second integer pixel position in the reference picture based on the first integer pixel position and the fractional offset vector, wherein the second integer pixel position is set to the first integer pixel position plus a position offset, the position offset being determined by a comparison between each component of the fractional offset vector and a threshold value, the method further comprising padding the predicted sample by using a pixel value at the second integer pixel position in the reference picture.

[0243] Whether a component of the position offset is 1 or 0 may depend on the result of a comparison between the corresponding component of the fractional offset vector and a threshold, the component including an X component and a Y component.

[0244] The threshold may be K, and a component of the position offset is set to 1 if the corresponding component of the fractional offset is greater than or equal to K, and is set to 0 otherwise. K may be equal to 8.

[0245] According to a further aspect, there is provided an encoder or decoder comprising processing circuitry for performing any one of the methods according to the first and second aspects described above.

[0246] According to a further aspect there is provided a computer program product comprising program code for performing any one of the methods according to the first and second aspects described above.

[0247] According to a further aspect, there is provided a decoder or encoder including 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 processor, configuring the decoder to perform any one of the methods according to the first and second aspects described above.

[0248] 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 division of real values ​​are defined. The numbering and counting rules generally start at 0, i.e., "first" is equivalent to number 0, "second" is equivalent to number 1, and so on.

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

[0250] [Table 1]

[0251] Logical Operators The following logical operators are defined as follows: x && y The Boolean logic "intersection" of x and y x || y The Boolean logic "union" of x and y Boolean logic "negation" x ? y : zIf x is true or not equal to 0, evaluates to the value y, otherwise it evaluates to the value z.

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

[0253] When a relational operator is applied to a syntax element or variable to which the value "na" (not applicable) is assigned, the value "na" is treated as a distinct value with respect to the syntax element or variable. The value "na" is considered not equal to any other value.

[0254] Bitwise Operators The following bitwise operators are defined as follows. & Bitwise "AND". When operating on integer arguments, it acts on the two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding leading bits equal to 0. | Bitwise "OR". When operating on integer arguments, it acts on the two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding leading bits equal to 0. ^ Bitwise "XOR". When operating on integer arguments, it acts on the two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding leading bits equal to 0. x>>y Arithmetic right shift of the two's complement representation of an integer by y bits. 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 the same value as the MSB of x before the shift operation. x<<y Arithmetic left shift of the two's complement representation of an integer by y bits. This function is defined only for non-negative integer values of y. The bit shifted into the least significant bit (LSB) as a result of the left shift has a value equal to 0.

[0255] Assignment Operators 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, is evaluated to the value of the variable before the increment operation. -- Decrement, i.e., x--, is equivalent to x = x - 1, and when used to index an array, is evaluated 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 the specified amount, i.e. x -= 3 is equivalent to x = x - 3 and x -= (-3) is equivalent to x = x - (-3).

[0256] Range notation The following notation is used to specify ranges of values: x = y..zx takes the integer values ​​from y to z, inclusive, where x, y, and z are integer values ​​and z is greater than y.

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

[0258]

number

[0259] Asin( x ) The trigonometric arcsine function, operating on an argument x in the range of -1.0 to 1.0, inclusive, and with an output value in the range of -π÷2 to π÷2, inclusive, in radians. Atan(x) The trigonometric arctangent function that operates on the argument x and has an output value in the range -π÷2 to π÷2, inclusive, in radians.

[0260]

number

[0261] 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 )

[0262]

number

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

[0264]

number

[0265] Ln( x ) The natural logarithm of x (the base e logarithm, where e is the constant base of natural logarithms, 2.718281828...). Log2( x ) The base 2 logarithm of x. Log10( x ) The base 10 logarithm of x.

[0266]

number

[0267] Round( x ) = Sign( x ) * Floor( Abs( x ) + 0.5 )

[0268]

number

[0269] Sin(x) The trigonometric sine function of the argument x in radians.

[0270]

number

[0271] Tan(x) The trigonometric tangent function of the argument x in radians.

[0272] Precedence of operations When precedence within a formula is not made explicit using parentheses, the following rules apply: - An operation with higher precedence is evaluated before any operation with lower precedence. - Operations of equal precedence are evaluated in order from left to right.

[0273] The table below specifies the precedence of operations from highest to lowest, with higher positions in the table indicating higher precedence.

[0274] With respect to operators that are also used in the C programming language, the precedence used herein is the same as that used in the C programming language.

[0275] [Table 2]

[0276] Text description of logical operations In the text, in the following forms: if( condition 0 ) Statement 0 else if( condition1 ) Statement 1 ... else / * Comment giving information about remaining conditions * / Statement n A statement of logical operation, mathematically written in the form: may be written as follows: As follows... / ...the following applies: - if condition 0, then statement 0 - Otherwise, if condition 1, then statement 1 - ... - otherwise (comment conveying information about the remaining conditions), statement n

[0277] Each "If ..., then ...; otherwise, ..." statement in the text is introduced by "As such..." or "... the following applies" immediately followed by "If ..., then ...". The final condition of an "If ..., then ...; otherwise, ..." can always be "Otherwise, ...". Alternately inserted "If ..., then ...; otherwise, ..." statements can be identified by matching the "As such..." or "... the following applies" with the closing "Otherwise, ...".

[0278] In the text, in the following forms: if( condition0a && condition0b ) Statement 0 else if( condition 1a || condition 1b ) Statement 1 ... else Statement n A statement of logical operation, mathematically written in the form: may be written 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 - ... - otherwise, statement n

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

[0280] It should be noted that, although embodiments of the present disclosure have been described primarily based on video coding, embodiments of coding system 10, encoder 20, and decoder 30 (and correspondingly system 10), as well as other embodiments described herein, may also be configured for still picture processing or coding, i.e., processing or coding of individual pictures independent of any preceding or successive pictures, similar to video coding. In general, when picture processing coding is limited to a single picture 17, only inter prediction units 244 (encoder) and 344 (decoder) may not be available. All other functions (also referred to as tools or technologies) of the video encoder 20 and the video decoder 30, such as residual calculation 204 / 304, transform 206, quantization 208, inverse quantization 210 / 310, (inverse) transform 212 / 312, partitioning 262, intra prediction 254 / 354, and / or loop filters 220, 320, and entropy coding 270, and entropy decoding 304, may equally be used for processing still pictures.

[0281] For example, the encoder 20 and the decoder 30, and embodiments of the functionality described herein in relation to the encoder 20 and the decoder 30, for example, may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored on a computer-readable medium or transmitted over a communication medium as one or more instructions or codes and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium including any medium that facilitates the transfer of a computer program from one place to another, for example via a communication protocol. Thus, generally, the computer-readable medium may correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium, such as a signal or carrier wave. The data storage medium 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. The computer program product may include a computer-readable medium.

[0282] By way of example and not limitation, such computer-readable storage media may include 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 referred to as a computer-readable medium. For example, if the 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 waves, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio waves, and microwaves are included in the definition of the 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 disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks usually reproduce data magnetically while discs reproduce data optically using a laser. Combinations of the above should also be included within the scope of computer-readable media.

[0283] 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 circuits. Thus, the term "processor" as used herein may refer to any of the above structures or any other structures suitable for implementing the techniques described herein. In addition, in some aspects, the functions described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Also, the techniques may be implemented entirely in one or more circuits or logic elements.

[0284] The techniques of the present 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 aspects of the functionality of devices configured to perform the disclosed techniques, but do not necessarily require realization 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 in conjunction with suitable software and / or firmware. [Explanation of symbols]

[0285] 10. Video coding system, coding system 12 Source Device 13 Encoded picture data, communication channel 14 Destination Device 16 Picture Source 17 Picture, Picture Data, Raw Picture, Raw Picture Data, Monochrome Picture, Color Picture, Current Picture 18 Preprocessor, preprocessing unit, picture preprocessor 19 Preprocessed Picture, Preprocessed Picture Data 20 Video Encoder, Encoder, Coding Device 21 Encoded picture data, encoded bitstream 22 Communication interface, communication unit 28 Communication interface, communication unit 30 Decoder, video decoder, decoding device 31 Decoded picture data, decoded picture 32 Post-processor, post-processing unit 33 Post-processed picture data, post-processed picture 34 Display Devices 40 Video Coding System 41 Imaging Devices 42 Antenna 43 Processors 44 Memory Store 45 Display Devices 46 Processing Circuit 201 Input, input interface 203 picture block, original block, current block, partitioned block, current picture block 204 Residual Calculation Unit, Residual Calculation 205 Residual Blocks, Residual 206 Conversion Processing Unit, Conversion 207 Conversion Factors 208 Quantization Unit, Quantization 209 Quantized Coefficients, Quantized Transform Coefficients, Quantized Residual Coefficients 210 Inverse quantization unit, inverse quantization 211 Dequantized coefficients, dequantized residual coefficients 212 Inverse Transform Processing Unit, (inverse) transform 213 Reconstructed residual block, dequantized coefficients, transform block 214 Reconstruction Unit, Adder, Combiner 215 reconstructed blocks 220 Loop filter unit, loop filter 221 Filtered Block, Filtered Reconstructed Block 230 Decoded Picture Buffer (DPB) 231 Decoded Pictures 244 Inter Prediction Units 254 intra prediction units, intra prediction 260 Mode Selection Unit 262 Division Unit, Division 265 prediction block, predictor 266 Syntax Elements 270 Entropy coding unit, entropy coding 272 Output, Output Interface 304 Entropy Decoding Unit, Residual Calculation, Entropy Decoding 309 Quantized Coefficients 310 Inverse quantization unit, inverse quantization 311 Dequantized Coefficients, Transform Coefficients 312 Inverse transformation processing unit, (inverse) transformation, output 313 Reconstructed Residual Blocks 314 Reconstruction Unit, Summer, Adder 315 Reconstructed Blocks 320 Loop filter, loop filter unit 321 Filtered Blocks, Decoded Video Blocks 330 Decoded Picture Buffer (DPB) 331 Decoded Pictures 344 Inter Prediction Units 354 Intra Prediction Unit, Intra Prediction 360 mode application unit 365 predicted blocks 400 Video Coding Device 410 Incoming port, input port 420 Receiver Unit (Rx) 430 Processor, Logic Unit, Central Processing Unit (CPU) 440 Transmitter Unit (Tx) 450 outgoing port, outgoing port 460 Memory 470 Coding Module 500 devices 502 processor 504 Memory 506 Data 508 Operating Systems 510 Application Program 512 Bus 518 Display 1410 First acquisition unit, acquisition unit 1420 Second acquisition unit, acquisition unit 1430 Processing Unit 1440 prediction units

Claims

1. 1. A method implemented by an encoding device that applies a bidirectional optical flow prediction based on sample values ​​from sample positions that belong to an extended region of a predicted block used in the bidirectional optical flow prediction of a current block, the method comprising: obtaining a motion vector (MV) of the current block; obtaining sub-pixel sample positions in the extended region of the predicted block in a reference picture based on the MV, the sub-pixel sample positions including a fractional part; processing the obtained sub-pixel sample positions to obtain integer pixel sample positions within the reference picture; performing bidirectional optical flow prediction by referencing reference sample values ​​at the obtained integer pixel sample positions in the reference picture to obtain predicted values ​​of a predicted block; obtaining a residual block based on the predicted block; Including, The step of processing the obtained sub-pixel sample positions comprises: rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions to the nearest integer pixel sample positions in each direction; obtaining the integer pixel sample location in the reference picture based on the nearest integer pixel sample location in the horizontal and vertical directions; Including, The method, wherein the sub-pixel sample positions and the integer pixel sample positions are luma sample positions.

2. The method of claim 1 , wherein the reference sample values ​​at the obtained integer pixel sample positions in the reference picture are referred to as the sample values ​​from the sub-pixel sample positions in the bidirectional optical flow prediction.

3. 3. The method of claim 1, wherein processing the obtained sub-pixel sample positions comprises rounding the obtained sub-pixel sample positions to obtain the integer pixel sample positions in the reference picture.

4. The method comprises: Before performing the bidirectional optical flow prediction, the method further includes fetching the reference sample values ​​at the obtained integer pixel sample positions in the reference picture as predicted sample values ​​used in the bidirectional optical flow prediction; The step of performing the bidirectional optical flow prediction by referring to the reference sample values ​​includes: performing bidirectional optical flow prediction using the predicted sample values; 4. The method according to any one of claims 1 to 3.

5. The step of rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions comprises: comparing the fractional portion of the obtained sub-pixel sample positions in the respective directions with a threshold; if the fractional portion is greater than or equal to the threshold, a nearest higher integer pixel sample location in the respective direction is taken as the nearest integer pixel sample location in the respective direction; if the fractional portion is less than the threshold, then the closest lower integer pixel sample position in the respective direction is taken as the closest integer pixel sample position in the respective direction. The method of claim 1.

6. the nearest higher integer pixel sample location in the respective direction is obtained by adding an offset of one to a truncated integer pixel sample location in the respective direction obtained by discarding the fractional portion of the obtained sub-pixel sample location; the nearest lower integer pixel sample location in the respective direction is obtained by adding an offset of zero to the truncated integer pixel sample location in the respective direction obtained by discarding the fractional portion of the obtained sub-pixel sample location. The method of claim 5.

7. The method of claim 5 or 6, wherein the threshold is given by P / 2 for a sub-pixel accuracy of 1 / P pels.

8. The method of claim 7 , wherein the threshold is 8 for 1 / 16 pel sub-pixel accuracy.

9. The step of rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions comprises: applying a shift operation to components of the obtained sub-pixel sample positions in the respective directions; The method of claim 1.

10. The integer pixel sample position (x_pos, y_pos) in the reference picture is determined according to the following formula: x_pos = (x_spel_pos + (1 << (shift_val - 1))) >> shift_val y_pos = (y_spel_pos + (1 << (shift_val - 1))) >> shift_val where (x_spel_pos, y_spel_pos) is the obtained sub-pixel sample position and shift_val is selected according to the sub-pel sample precision used. The method of claim 9.

11. 11. The method of claim 10, wherein for sub-pel sample precision of half-pel, quarter-pel, one-eighth of a pel, or one-sixteenth of a pel, a shift_val of 1, 2, 3, or 4 is used, respectively.

12. 12. The method according to claim 1, wherein the MV of the current block is an improved MV obtained by motion vector refinement (MVR) based on an initial MV.

13. The MVR includes an integer distance refinement step with respect to the initial MV; if the integer distance refinement step of the MVR results in a non-zero displacement of the refined MV relative to the initial MV, the integer pixel sample positions in the reference picture are obtained by rounding the obtained sub-pixel sample positions. The method of claim 12.

14. 14. The method of claim 13, wherein if the integer distance refinement stage of the MVR results in a zero displacement of the refined MV relative to the initial MV, the integer pixel sample positions in the reference picture are obtained by discarding the fractional parts of the obtained sub-pixel sample positions.

15. If the integer distance refinement step of the MVR results in a zero displacement of the refined MV relative to the initial MV, the integer pixel sample position (x_pos, y_pos) in the reference picture is given by the following formula: x_pos = x_spel_pos >> shift_val y_pos = y_spel_pos >> shift_val where (x_spel_pos, y_spel_pos) is the obtained sub-pixel sample position and shift_val is selected according to the sub-pel sample precision used. The method of claim 13.

16. 16. The method of claim 15, wherein for sub-pel sample precision of half-pel, quarter-pel, 1 / 8 of a pel, or 1 / 16 of a pel, a shift_val of 1, 2, 3, or 4 is used, respectively.

17. The method according to claim 1 , wherein the current block is a current coding block, or a current coding sub-block, or a current prediction block.

18. 18. The method of claim 1, wherein the reference sample values ​​at the obtained integer pixel sample positions in the reference picture are used in calculating boundary sample gradients corresponding to boundaries of the predicted block in the reference picture.

19. An encoder (20) comprising processing circuitry for carrying out the method of any one of claims 1 to 18.

20. A decoder (30) comprising processing circuitry for carrying out the method of any one of claims 1 to 18.

21. A computer program comprising instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 18.

22. one or more processors; a non-transitory computer-readable storage medium coupled to the one or more processors and storing instructions for execution by the one or more processors; 19. An encoder (20) comprising: instructions, when executed by the one or more processors, that configure the encoder to perform a method according to any one of claims 1 to 18. Encoder(20).

23. one or more processors; a non-transitory computer-readable storage medium coupled to the one or more processors and storing instructions for execution by the one or more processors; 19. A decoder (30) comprising: instructions, when executed by the one or more processors, that configure the decoder to perform a method according to any one of claims 1 to 18. Decoder(30).

24. a prediction unit configured to perform a bidirectional optical flow prediction of the current block; A first acquisition unit configured to acquire a motion vector (MV) of the current block; A second acquisition unit configured to acquire sub-pixel sample positions in an expanded region of a predicted block in a reference picture based on the MV, the sub-pixel sample positions including a fractional part; and a processing unit configured to process the obtained sub-pixel sample positions to obtain integer pixel sample positions within the reference picture; An encoder (20) comprising: The prediction unit is configured to perform the bidirectional optical flow prediction by referring to reference sample values ​​at the obtained integer pixel sample positions in the reference picture to obtain predicted values ​​of a prediction block; The encoder further includes a residual calculation unit configured to obtain a residual block based on the prediction block; Processing the obtained sub-pixel sample locations includes: rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions to their respective nearest integer pixel sample positions in each direction; obtaining the integer pixel sample location in the reference picture based on the nearest integer pixel sample location in the horizontal and vertical directions; the sub-pixel sample positions and the integer pixel sample positions are luma sample positions. Encoder(20).

25. 25. The encoder of claim 24, wherein processing the obtained sub-pixel sample position comprises rounding the obtained sub-pixel sample position to obtain the integer pixel sample position in the reference picture.

26. Rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions may include: comparing the fractional portion of the obtained sub-pixel sample positions in the respective directions to a threshold; if the fractional portion is greater than or equal to the threshold, a nearest higher integer pixel sample location in the respective direction is taken as the nearest integer pixel sample location in the respective direction; if the fractional portion is less than the threshold, then the closest lower integer pixel sample position in the respective direction is taken as the closest integer pixel sample position in the respective direction. An encoder (20) according to claim 24.

27. the nearest higher integer pixel sample location in the respective direction is obtained by adding an offset of one to a truncated integer pixel sample location in the respective direction obtained by discarding the fractional portion of the obtained sub-pixel sample location; the nearest lower integer pixel sample location in the respective direction is obtained by adding an offset of zero to the truncated integer pixel sample location in the respective direction obtained by discarding the fractional portion of the obtained sub-pixel sample location. An encoder (20) according to claim 26.

28. a prediction unit configured to perform a bidirectional optical flow prediction of the current block; A first acquisition unit configured to acquire a motion vector (MV) of the current block from a coded video bitstream; A second acquisition unit configured to acquire sub-pixel sample positions in an expanded region of a predicted block in a reference picture based on the MV, the sub-pixel sample positions including a fractional part; and a processing unit configured to process the obtained sub-pixel sample positions to obtain integer pixel sample positions within the reference picture; A decoder (30) comprising: The prediction unit is configured to perform the bidirectional optical flow prediction by referring to reference sample values ​​at the obtained integer pixel sample positions in the reference picture to obtain predicted values ​​of a prediction block; The decoder further includes a reconstruction unit configured to obtain a reconstructed block based on the prediction block and a reconstructed residual block; Processing the obtained sub-pixel sample locations includes: rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions to their respective nearest integer pixel sample positions in each direction; obtaining the integer pixel sample location in the reference picture based on the nearest integer pixel sample location in the horizontal and vertical directions; the sub-pixel sample positions and the integer pixel sample positions are luma sample positions. Decoder(30).

29. 30. The decoder of claim 28, wherein processing the obtained sub-pixel sample position includes rounding the obtained sub-pixel sample position to obtain the integer pixel sample position in the reference picture.

30. Rounding the obtained sub-pixel sample positions separately in the horizontal and vertical directions may include: comparing the fractional portion of the obtained sub-pixel sample positions in the respective directions to a threshold; if the fractional portion is greater than or equal to the threshold, a nearest higher integer pixel sample location in the respective direction is taken as the nearest integer pixel sample location in the respective direction; if the fractional portion is less than the threshold, then the closest lower integer pixel sample position in the respective direction is taken as the closest integer pixel sample position in the respective direction. A decoder (30) according to claim 28.

31. the nearest higher integer pixel sample location in the respective direction is obtained by adding an offset of one to a truncated integer pixel sample location in the respective direction obtained by discarding the fractional portion of the obtained sub-pixel sample location; the nearest lower integer pixel sample location in the respective direction is obtained by adding an offset of zero to the truncated integer pixel sample location in the respective direction obtained by discarding the fractional portion of the obtained sub-pixel sample location. A decoder (30) according to claim 30.

32. 19. A computer-readable storage medium, the computer-readable storage medium storing a computer program executable by a processor, the computer program, when executed by the processor, causing the processor to perform the method of any one of claims 1 to 18.

Citation Information

Patent Citations

  • System and method for deriving low-complexity motion vectors

    JP2013543318A

  • Method for computing integer grid reference sample locations for block-level boundary sample gradient computation in bipredictive optical flow computation and bipredictive compensation

    JP2022540771A

  • Motion vector rounding

    US20130272410A1