Calculation of sample distance for geometric partitioning mode
By calculating sample distances using angular parameters and ratio values, the method enhances video coding efficiency, addressing the challenge of high compression ratios with minimal quality loss in video streaming and storage.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-25
AI Technical Summary
Existing video coding technologies face challenges in achieving high compression ratios with minimal quality loss, particularly in streaming and storage scenarios with limited bandwidth, necessitating improved encoding and decoding techniques.
A method and apparatus for calculating sample distances using angular parameters and ratio values to enhance prediction accuracy, thereby reducing predicted residuals and improving coding efficiency.
This approach allows for more accurate prediction of sample distances, leading to improved coding efficiency and reduced data requirements for video transmission and storage.
Smart Images

Figure 2026053417000001_ABST
Abstract
Description
[Technical Field]
[0001] Embodiments of this application (disclosure) generally relate to the field of picture processing, and more particularly to prediction for partitioning, and more specifically to the calculation of sample distances for geometric partitioning modes. [Background technology]
[0002] Video coding (video encoding and decoding) is used in a wide range of digital video applications, such as broadcast digital TV, video transmission over the internet and mobile networks, real-time conversation applications like video chat, video conferencing, DVD and Blu-ray discs, video content acquisition and editing systems, and camcorders in security applications.
[0003] Even relatively short videos can require a considerable amount of video data to render, which can pose challenges when the data needs to be streamed or otherwise transmitted over communication networks with limited bandwidth. Therefore, video data is generally compressed before being transmitted over modern communication networks. Video size can also be a concern when video is stored on a storage device, as memory resources may be limited. Often, video compression devices use software and / or hardware at the source to encode the video data before transmission or storage, thereby reducing the amount of data required to represent the digital video image. The compressed data is then received at the destination by a video decompression device that decodes the video data. Given limited network resources and the increasing demand for higher video quality, improved compression and decompression techniques that increase the compression ratio with little to no sacrifice of picture quality are desirable. [Overview of the project] [Means for solving the problem]
[0004] Embodiments of this application provide an apparatus and method for encoding and decoding according to an independent claim.
[0005] The other objectives described above are achieved by the subject matter of the independent claims. Further forms of implementation are evident from the dependent claims, specification, and drawings.
[0006] A first aspect of the present invention provides a coding method performed by a decoding device or encoding device, comprising the steps of: obtaining an angular parameter value for the current block; obtaining a width value and a height value for the current block; calculating a ratio value between the width value and the height value; calculating a sample distance value for the sample of the current block according to the angular parameter value and the ratio value; and obtaining a predicted value for the sample of the current block according to the sample distance value.
[0007] In embodiments of the present invention, the angle parameter and the angle parameter are synonymous.
[0008] According to embodiments of the present invention, a ratio value between the block width value and the block height value is calculated. This ratio value is used to calculate the sample distance value, and the predicted value is calculated much more accurately. Thus, the predicted residual may be reduced, and coding efficiency can be improved.
[0009] In one implementation, the step of calculating the sample distance value for the current block sample according to the angle parameter value and ratio value is: A step of obtaining a first value according to the values of the angle parameter and the ratio, The process includes the step of calculating a sample distance value for the current block sample according to a first value.
[0010] In one implementation, the step of calculating the value of the sample distance for the sample of the current block according to the first value is including the step of calculating the value of the sample distance for the sample of the current block according to the first value and the value of the angle parameter.
[0011] In one implementation, the step of calculating the value of the sample distance for the sample of the current block according to the first value is including the step of calculating the value of the sample distance for the sample of the current block according to the first value, the value of the angle parameter, the value of the distance index (for example, the distance index of the current block), the value of the width, and the value of the height.
[0012] In one implementation, the value of the sample distance represents the horizontal distance or the vertical distance or the combined distance of vertical and horizontal of the sample to the dividing line, and the dividing line is used to divide the coding block into two sub-blocks.
[0013] In one implementation, the step of obtaining the predicted value for the sample of the current block according to the value of the sample distance is including the step of calculating two weight coefficients according to the value of the sample distance, and obtaining the predicted value for the sample of the current block according to the first predicted value, the second predicted value, and the two weight coefficients, for example, "applying the two weight coefficients to the first predicted value and the second predicted value" or "applying the first weight coefficient to the first predicted value and the second weight coefficient to the second predicted value".
[0014] In one implementation, the value of the ratio is whRatio = (W >= H)? W / H : H / W obtained by, where whRatio is the value of the ratio, W is the value of the width, and H is the value of the height.
[0015] In one implementation, the value of the angle parameter is an integer value, and the numerical range of the value of the angle parameter is from 0 to 31, including 0 and 31.
[0016] In one implementation, the value of the ratio is whRatio = (wIdx >= hIdx)? wIdx - hIdx : hIdx - wIdx obtained by, where whRatio is the value of the ratio, W is the value of the width, H is the value of the height, the value of wIdx is equal to log2(W) - 3, and the value of hIdx is equal to log2(H) - 3.
[0017] In one implementation, the value of the sample distance is sample_dist = ((2*x) - W + K)*f1(alpha) + ((2*y) - H + K))*f2(alpha) - distanceIdx*stepD*scaleStep calculated by, where sample_dist is the value of the sample distance, f1() and f2() are functions, alpha is the value of the angle parameter, stepD is the first value, the value of scaleStep is equal to either the value of the width or the value of the height, x and y are the coordinates of the sample relative to the upper left sample of the current block, and K is an integer offset value.
[0018] In one implementation, the value of the sample distance is sample_dist = ((2*x) - W + K)*f(dispIdxN) + ((2*y) - H + K))*f(dispIdxS) - distanceIdx*stepD*scaleStep It is calculated by the formula, where sample_dist is the distance value of the sample, f() is a function, dispIdxN or dispIdxS is an index value, stepD is the first value, the value of scaleStep is equal to either the width value or the height value, x and y are the coordinates of the sample relative to the top-left sample of the current block, and K is an integer offset value.
[0019] A second aspect of the present invention provides a video coding or decoding device, the device comprising: a parameter acquisition module configured to acquire an angular parameter value relating to a current block, further configured to acquire a width value and a height value of a current block; a ratio calculation module configured to calculate a ratio value between the width value and the height value; a sample distance calculation module configured to calculate a sample distance value relating to a sample of the current block according to the angular parameter value and the ratio value; and a prediction module configured to acquire a prediction value relating to a sample of the current block according to the sample distance value.
[0020] A method according to a first aspect of the present invention may be carried out by an apparatus according to a second aspect of the present invention. Further features and implementations of the above method correspond to features and implementations of the apparatus according to a second aspect of the present invention.
[0021] In embodiments, a decoder (30) or encoder (20) is disclosed, which includes processing circuitry for performing a method according to any one of the embodiments and implementations described above.
[0022] In embodiments, a computer program product is disclosed that includes program code for performing a method according to any one of the embodiments and implementations described above.
[0023] In the embodiment, One or more processors, A decoder or encoder is provided, comprising a non-temporary computer-readable storage medium coupled to a processor and storing a program for execution by the processor, wherein the program configures the decoder or encoder to perform a method according to any one of the above embodiments and implementations when executed by the processor.
[0024] In one embodiment, a non-temporary storage medium is provided, which includes an encoded bitstream decoded by an image decoding device, wherein the bitstream is generated by dividing a frame of a video signal or image signal into a plurality of blocks, and includes a plurality of syntax elements, the plurality of syntax elements including an indicator (syntax) relating to any one of the embodiments and implementations described above.
[0025] Details of one or more embodiments are described in the accompanying drawings and the following description. Other features, purposes, and advantages will become apparent from the specification, drawings, and claims.
[0026] Embodiments of the present invention will be described in more detail below with reference to the accompanying figures and drawings. [Brief explanation of the drawing]
[0027] [Figure 1A] This is a block diagram showing an example of a video coding system configured to implement an embodiment of the present invention. [Figure 1B] This is a block diagram showing another example of a video coding system configured to implement embodiments of the present invention. [Figure 2] This is a block diagram showing an example of a video encoder configured to implement an embodiment of the present invention. [Figure 3] This is a block diagram illustrating an exemplary structure of a video decoder configured to implement embodiments of the present invention. [Figure 4]This is a block diagram showing examples of encoding or decoding devices. [Figure 5] This is a block diagram showing another example of an encoding or decoding device. [Figure 6a] This diagram shows an example of blocks in the same location. [Figure 6b] This figure shows an example of spatially neighboring blocks. [Figure 7] This figure shows some examples of triangulation prediction modes. [Figure 8] This figure shows some examples of lower block prediction modes. [Figure 9] This diagram shows an example of how blocks are divided. [Figure 10] This diagram shows an example of how blocks are divided. [Figure 11] This diagram shows an example of how blocks are divided. [Figure 12] This diagram shows an example of how blocks are divided. [Figure 13] This figure shows an example implementation of a predefined lookup table for stepD. [Figure 14] This figure shows an example implementation of a predefined lookup table for f(). [Figure 15] This figure shows an example of a quantization mode related to a predefined lookup table for step D. [Figure 16] This figure shows an example of a quantization scheme in which the maximum distance ρmax is defined with respect to a given coding block. [Figure 17] This figure shows an example of a quantization scheme in which an alternative maximum distance ρmax is defined with respect to a given coding block. [Figure 18] This is a block diagram illustrating an example structure of a content supply system that enables content distribution services. [Figure 19] This is a block diagram showing the structure of an example terminal device. [Figure 20] This is a flowchart showing an embodiment of the method according to the present invention. [Figure 21] This is a block diagram showing an embodiment of the apparatus according to the present invention. [Modes for carrying out the invention]
[0028] In the following, unless otherwise specified, the same reference numeral refers to the same or at least functionally equivalent feature.
[0029] In the following description, references are made to the accompanying drawings, which form part of this disclosure and illustrate as examples certain aspects of the embodiments of the invention or certain aspects in which embodiments of the invention may be used. It is understood that embodiments of the invention may be used in other ways and may include structural or logical modifications not shown in the drawings. Accordingly, the following detailed description should not be understood to be restrictive, and the scope of the invention is defined by the appended claims.
[0030] For example, disclosures relating to a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, if one or more steps of a particular method are described, the corresponding device may include one or more units for performing the steps of the described method, e.g., functional units (e.g., one unit performing one or more steps, or multiple units each performing one or more of the steps), even if such one or more units are not explicitly described or shown in the figures. On the other hand, for example, if a particular device 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 of the functions of multiple units), even if such one or more steps are not explicitly described or shown in the figures. Furthermore, it is understood that the various exemplary embodiments and / or features of the aspects described herein may be combined with each other unless otherwise specified.
[0031] Video coding generally refers to the processing of a sequence of pictures that make up a video or video sequence. Instead of the term "picture," the terms "frame" or "image" may be used synonymously in the field of video coding. Video coding (or coding in general) consists of two parts: video encoding and video decoding. Video encoding is performed on the source side and generally involves processing the 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 on the destination side and generally involves the reverse processing compared to the encoder to reconstruct the video picture. Embodiments referring to "coding" of a video picture (or picture in general) are understood to be relating to the "encoding" or "decoding" of the video picture or each video sequence. The combination of the encoding and decoding parts is also called a codec (coding and decoding).
[0032] In lossless video coding, the original video picture can be reconstructed (assuming there is no transmission loss or other data loss during storage or transmission), meaning the reconstructed video picture will have the same quality as the original. In lossy video coding, further compression is performed, for example, by quantization, to reduce the amount of data representing the video picture, which cannot be fully reconstructed in the decoder, meaning the quality of the reconstructed video picture will be lower or worse than the quality of the original video picture.
[0033] 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 in a video sequence is generally divided into a set of non-overlapping blocks, and coding is generally performed at the block level. In other words, in an encoder, video is generally processed at the block (video block) level, i.e., encoded, by generating prediction blocks using, for example, spatial (intra-picture) and / or temporal (inter-picture) predictions, obtaining residual blocks by subtracting the prediction blocks from the current blocks (the blocks currently being processed), transforming the residual blocks, and quantizing the residual blocks in the transform domain to reduce (compress) the amount of data being transmitted. In a decoder, the reverse process compared to the encoder is applied to the encoded or compressed blocks in order to reconstruct the current blocks for representation. Furthermore, the encoder duplicates the decoder's processing loop to process subsequent blocks, i.e., to generate identical predictions (e.g., intra and inter predictions) and / or reconstructions for coding.
[0034] Embodiments of the video coding system 10, video encoder 20, and video decoder 30 are described below with reference to Figures 1 to 3.
[0035] Figure 1A is a schematic block diagram showing an exemplary coding system 10 that may utilize the technology of the present application, for example, a video coding system 10 (or short coding system 10). The video encoder 20 (or short encoder 20) and video decoder 30 (or short decoder 30) of the video coding system 10 show an example of a device that may be configured to perform the technology described in various examples in this application.
[0036] As shown in Figure 1A, the coding system 10 includes a source device 12 configured to provide encoded picture data 21 to a destination device 14, for example, in order to decode the encoded picture data 13.
[0037] The source device 12 includes an encoder 20 and may additionally, or optionally, include a picture source 16, a preprocessor (or preprocessing unit) 18, for example, a picture preprocessor 18, and a communication interface or communication unit 22.
[0038] The picture source 16 includes or may include any type of picture-taking device, e.g., a camera for taking pictures of the real world, and / or any type of picture-generating device, e.g., a computer graphics processor for generating computer-animated pictures, or any other type of device for acquiring and / or providing pictures of the real world, computer-generated pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). The picture source may also include any type of memory or storage for storing any of the pictures described above.
[0039] To distinguish it from the processing performed by the preprocessor 18 and the preprocessing unit 18, the picture or picture data 17 may also be called the raw picture or raw picture data 17.
[0040] The preprocessor 18 is configured to receive (raw) picture data 17 and perform preprocessing on the picture data 17 to obtain a preprocessed picture 19 or preprocessed picture data 19. The preprocessing performed by the preprocessor 18 may include, for example, cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or denoising. It can be understood that the preprocessing unit 18 may be an optional component.
[0041] The video encoder 20 is configured to receive pre-processed picture data 19 and provide encoded picture data 21 (further details are described below, for example, based on Figure 2).
[0042] The communication 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 communication channel 13 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction.
[0043] The destination device 14 includes a decoder 30 (for example, a video decoder 30) and may additionally, or optionally, include a communication interface or communication unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.
[0044] The communication interface 28 of the destination device 14 is configured to receive encoded picture data 21 (or any further processed version thereof) directly from the source device 12 or from any other source, such as a storage device, such as a storage device for encoded picture data, and to provide the encoded picture data 21 to the decoder 30.
[0045] Communication interfaces 22 and 28 may be configured to transmit or receive encoded picture data 21 or encoded data 13 via a direct communication link between the source device 12 and the destination device 14, for example, via a direct wired or wireless connection, or via any type of network, for example, a wired or wireless network or any combination thereof, or any type of private and public network, or any type of combination thereof.
[0046] The communication interface 22 may be configured to process the encoded picture data using any kind of transmission encoding or processing for packaging the encoded picture data 21 into an appropriate format, for example, packets, and / or for sending it over a communication link or communication network.
[0047] The communication interface 28 forming the counterpart of the communication interface 22 may be configured, for example, to receive transmitted data and process the transmitted data using any kind of corresponding decryption or processing and / or depackaging of the transmission to obtain encoded picture data 21.
[0048] Both communication interface 22 and communication interface 28 may be configured as unidirectional or bidirectional communication interfaces, as indicated by the arrows relating to communication channel 13 in Figure 1A pointing from source device 12 to destination device 14, and may be configured, for example, to set up a connection, and to send and receive messages to acknowledge and exchange any other information relating to the communication link and / or data transmission, such as the transmission of encoded picture data.
[0049] The decoder 30 is configured to receive the encoded picture data 21 and provide the decoded picture data 31 or the decoded picture 31 (further details are described below, for example, based on Figure 3 or Figure 5).
[0050] The post-processor 32 of the destination device 14 is configured to obtain post-processed picture data 33, for example, a post-processed picture 33, by post-processing the decoded picture data 31 (also called reconstructed picture data), for example, the decoded picture 31. The post-processing performed by the post-processing unit 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color correction, cropping, or resampling, or any other processing to prepare the decoded picture data 31 for display by, for example, the display device 34.
[0051] The display device 34 of the destination device 14 is configured to receive, for example, picture data 33 that has been post-processed for displaying 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, for example, a liquid crystal display (LCD), an organic light-emitting diode (OLED) display, a plasma display, a projector, a microLED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.
[0052] Figure 1A shows the source device 12 and destination device 14 as separate devices, but the device embodiments may also include both or both functions, such as the source device 12 or its corresponding function and the destination device 14 or its corresponding function. In such embodiments, the source device 12 or its corresponding function and the destination device 14 or its corresponding function may be implemented using the same hardware and / or software, or by separate hardware and / or software, or any combination thereof.
[0053] As will become apparent to those skilled in the art based on the description, the functions of different units or the presence and (strict) division of functions within the source device 12 and / or destination device 14 shown in Figure 1A may vary depending on the actual device and application.
[0054] 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 the processing circuitry shown in Figure 1B, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof dedicated to video coding. The encoder 20 may be implemented by the processing circuitry 46 to embody various modules considered in relation to the encoder 20 of Figure 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented by the processing circuitry 46 to embody various modules considered in relation to the decoder 30 of Figure 3 and / or any other decoder system or subsystem described herein. The processing circuitry may be configured to perform various operations, which will be considered later. If the technology is partially implemented in software, as shown in Figure 5, the device may store instructions for the software in a suitable non-temporary computer-readable storage medium, or execute the instructions in hardware using one or more processors to perform the technology of this disclosure. Both the video encoder 20 and the video decoder 30 may be incorporated as part of a combined encoder / decoder (codec) within a single device, for example, as shown in Figure 1B.
[0055] The source device 12 and destination device 14 may include any type of handheld or stationary device, including a wide range of devices such as notebook or laptop computers, mobile phones, smartphones, tablets or tablet computers, cameras, desktop computers, set-top boxes, televisions, display devices, digital media players, video game consoles, video streaming devices (such as content service servers or content distribution servers), broadcast receiver devices, and broadcast transmitter devices, and may or may not use an operating system. In some cases, the source device 12 and destination device 14 may be wireless communication devices. Therefore, the source device 12 and destination device 14 may be wireless communication devices.
[0056] In some cases, the video coding system 10 shown in Figure 1A is merely an example, and the techniques of this disclosure may apply to video coding situations (e.g., encoding or decoding video) that do not necessarily involve any data communication between the encoding device and the decoding device. In other examples, the data may be retrieved from local memory or streamed over a network. The video encoding device may encode the data and store it in memory, and / or the video decoding device may retrieve the 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 the data into memory and / or retrieve the data from memory and decode it.
[0057] For convenience of explanation, embodiments of the present invention are described herein by reference to, for example, reference software for next-generation video coding standards developed by the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG) Joint Collaboration Team on Video Coding (JCT-VC). Those skilled in the art will understand that embodiments of the present invention are not limited to HEVC or VVC.
[0058] Encoder and encoding method Figure 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the technology of the present application. In the example of Figure 2, the video encoder 20 includes an input 201 (or input interface 201), a residual calculation unit 204, a transformation unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transformation 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 output interface 272). The mode selection unit 260 may include an inter-prediction unit 244, an intra-prediction unit 254, and a segmentation 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 Figure 2 may also be called a hybrid video encoder or a video encoder with a hybrid video codec.
[0059] The residual calculation unit 204, the conversion processing unit 206, the quantization unit 208, and the mode selection unit 260 may be considered to form the forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse conversion processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoding picture buffer (DPB) 230, the inter-prediction unit 244, and the intra-prediction unit 254 may be considered to form the reverse signal path of the video encoder 20, and the reverse signal path of the video encoder 20 corresponds to the signal path of the decoder (see video decoder 30 in Figure 3). The inverse quantization unit 210, the inverse conversion processing unit 212, the reconstruction unit 214, the loop filter 220, the decoding picture buffer (DPB) 230, the inter-prediction unit 244, and the intra-prediction unit 254 may also be considered to form the "built-in decoder" of the video encoder 20.
[0060] Picture & Picture Separation (Picture & Block) The encoder 20 may be configured to receive, for example, a picture 17 (or picture data 17) via input 201, for example, a picture of a sequence of pictures that form a video or video sequence. The received picture or picture data may further be a pre-processed picture 19 (or pre-processed picture data 19). For simplicity, the following description will refer to picture 17. Picture 17 may also be called the current picture or the picture to be coded (in particular, in video coding, to distinguish the current picture from other pictures, for example, already coded and / or decoded pictures of the same video sequence, i.e., the video sequence that also contains the current picture).
[0061] A (digital) picture can be considered, or may be considered, a two-dimensional array or matrix of samples having intensity values. A sample in an array may also be called a pixel (short for picture element) or pel. The number of samples in the horizontal and vertical (or axis) directions of an array or picture defines the size and / or resolution of the picture. For color representation, generally three color components are used, meaning a picture may represent or contain three sample arrays. In the RGB format or color space, a picture contains corresponding red, green, and blue sample arrays. However, in video coding, each pixel is generally represented by a luminance and chrominance format or color space, for example, YCbCr, which includes a luminance component represented by Y (sometimes L is used instead) and two chrominance components represented by Cb and Cr. The luminance (or luma) component Y represents the brightness or intensity of the gray level (for example, as in a grayscale picture), while the two chrominance (or chroma) 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 to or transformed to YCbCr format, and vice versa; the process is also known as a color transformation or conversion. If the picture is monochrome, it may contain only a luminance sample array. Thus, a picture may be, for example, a luma sample array in a monochrome format, or a luma sample array and two corresponding chroma sample arrays in 4:2:0, 4:2:2, and 4:4:4 color formats.
[0062] Embodiments of the video encoder 20 may include a picture partitioning unit (not shown in Figure 2) configured to partition a picture 17 into multiple (typically non-overlapping) picture blocks 203. These blocks may also be called root blocks, macro blocks (H.264 / AVC), or coding tree blocks (CTB) or coding tree units (CTU) (H.265 / HEVC and VVC). The picture partitioning unit may use the same block size for all pictures and corresponding grids that define the block size for all pictures in the video sequence, or it may change the block size between pictures or subsets or groups of pictures to partition each picture into a corresponding block.
[0063] In a further embodiment, the video encoder may be configured to directly receive a block 203 of picture 17, for example, one, some, or all of the blocks that make up picture 17. The picture block 203 may also be called the current picture block or the coded picture block.
[0064] Similar to picture 17, picture block 203 is smaller in dimensions than picture 17, but can also be considered or may be considered a two-dimensional array or matrix of samples having intensity values (sample values). In other words, block 203 may contain, depending on the applied color format, for example, one sample array (e.g., a luma array for monochrome picture 17, or a luma or chroma array for color picture), or three sample arrays (e.g., a luma and two chroma arrays for color picture 17), or any other number and / or type of arrays. The number of samples in the horizontal and vertical (or axis) directions of block 203 defines the size of block 203. Thus, a block may be, for example, an MxN (M columns × N rows) array of samples or an MxN array of conversion coefficients.
[0065] The embodiment of the video encoder 20 shown in Figure 2 may be configured to encode the picture 17 block by block, for example, encoding and prediction may be performed for each block 203.
[0066] Calculation of residuals The residual calculation unit 204 may be configured to calculate the residual block 205 (also called residual 205) based on the picture block 203 and the prediction block 265 (further details about the prediction block 265 will be given later), for example, by subtracting the sample value of the prediction block 265 from the sample value of the picture block 203 for each sample (for each pixel) to obtain the residual block 205 in the sample region.
[0067] conversion The transformation processing unit 206 may be configured to apply a transformation, such as a discrete cosine transform (DCT) or discrete sine transform (DST), to the sample values of the residual block 205 to obtain transformation coefficients 207 in the transformation domain. The transformation coefficients 207, also called transformation residual coefficients, may represent the residual block 205 in the transformation domain.
[0068] The conversion processing unit 206 may be configured to apply an integer approximation of DCT / DST, such as the conversion specified for H.265 / HEVC. Compared to the orthogonal DCT conversion, such an integer approximation is generally scaled by a certain rate. An additional scaling factor is applied as part of the conversion process to maintain the norm of the residual blocks processed by the forward and inverse conversions. The scaling factor is generally selected based on certain constraints, such as the scaling factor being a power of 2 for the shift operation, the bit depth of the conversion coefficients, and the trade-off between accuracy and implementation cost. For example, a particular scaling factor may be specified for the inverse conversion by the inverse conversion processing unit 212 (and the corresponding inverse conversion by the inverse conversion processing unit 312 in the video decoder 30, for example), and a corresponding scaling factor for the forward conversion by the conversion processing unit 206 of the encoder 20 may be specified accordingly.
[0069] Embodiments of the video encoder 20 (each a conversion processing unit 206) may be configured to output, for example, one or more conversions of a certain kind, which are either left as they are or encoded or compressed by the entropy coding unit 270, so that the video decoder 30 may receive the conversion parameters and use them for decoding.
[0070] Quantization The quantization unit 208 may be configured to quantize the transformation coefficient 207 to obtain the quantized coefficient 209, for example, by applying scalar quantization or vector quantization. The quantized coefficient 209 may also be called the quantized transformation coefficient 209 or the quantized residual coefficient 209.
[0071] The quantization process may reduce the bit depth associated with some or all of the conversion coefficients 207. For example, n-bit conversion coefficients may be truncated to m-bit conversion coefficients during quantization, where n is greater than m. The degree of quantization may be modified by adjusting the quantization parameter (QP). For example, with respect to scalar quantization, different scaling may be applied to achieve finer or coarser quantization. Smaller quantization step sizes correspond to finer quantization, while larger quantization step sizes correspond to coarser quantization. Applicable quantization step sizes may be indicated by the quantization parameter (QP). The quantization parameter may be, for example, an index to a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to finer quantization (smaller quantization step size), a large quantization parameter may correspond to coarser quantization (larger quantization step size), or vice versa. Quantization may involve division by the quantization step size, and the corresponding and / or inverse inverse quantization by the inverse quantization unit 210 may involve multiplication by the quantization step size. Some standards, for example, embodiments by HEVC, may be configured to determine the quantization step size using quantization parameters. Generally, the quantization step size may be calculated based on the quantization parameters using a fixed-point approximation of the equations, which involves division. Additional multipliers may be introduced with respect to quantization and inverse quantization to restore the norm of the residual block, which may be modified due to the scaling used in the fixed-point approximation of the equations with respect to the quantization step size and quantization parameters. In one exemplary implementation, the scaling of the inverse transform and inverse quantization may be combined. Alternatively, a customized quantization table may be used and signaled, for example, from encoder to decoder in a bitstream. Quantization is an irreversible operation, and the loss increases as the quantization step size increases.
[0072] Embodiments of the video encoder 20 (each a quantization unit 208) may be configured to output quantization parameters (QP) that are either raw or encoded by the entropy coding unit 270, for example, so that the video decoder 30 may receive and apply the quantization parameters for decoding.
[0073] inverse quantization The inverse quantization unit 210 is configured to obtain inverse quantized coefficients 211 by applying the inverse of the quantization scheme applied by the quantization unit 208 to the quantized coefficients, for example, based on or using the same quantization step size as the quantization unit 208. The inverse quantized coefficients 211, also called inverse quantized residual coefficients 211, may correspond to the transformed coefficients 207—although they are generally not identical to the transformed coefficients due to losses due to quantization.
[0074] Inverse Transform The inverse transform processing unit 212 is configured to obtain a reconstructed residual block 213 (or the corresponding inversely quantized coefficient 213) in the sample region by applying the inverse transform of the transform applied by the transform processing unit 206, for example, the inverse discrete cosine transform (DCT) or the inverse discrete sine transform (DST) or other inverse transform. The reconstructed residual block 213 may also be called the transform block 213.
[0075] Rebuild The reconstruction unit 214 (for example, an adder or summer 214) is configured to obtain the reconstructed block 215 in the sample region by adding the transformed block 213 (i.e., the reconstructed residual block 213) to the predicted block 265 by adding the sample values of the reconstructed residual block 213 and the sample values of the predicted block 265 --sample by sample.
[0076] filtering The loop filter unit 220 (or simply "loop filter" 220) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or more generally, to filter the reconstructed sample to obtain a filtered sample. The loop filter unit is configured, for example, to smooth pixel transitions or otherwise improve the quality of the video. 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, smoothing filter, or a collaborative filter, or any combination thereof. The loop filter unit 220 is shown in Figure 2 as an in-loop filter, but in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be called the filtered reconstructed block 221.
[0077] Embodiments of the video encoder 20 (each a loop filter unit 220) may be configured to output loop filter parameters (such as sample-adaptive offset information) that are either left as they are or encoded by the entropy coding unit 270, for example, so that a decoder 30 may receive the same loop filter parameters or each respective loop filter and apply them for decoding.
[0078] Decode picture buffer The decoded picture buffer (DPB) 230 may be a memory that stores a reference picture or generally reference picture data for encoding video data by the video encoder 20. The DPB 230 may be formed by any of various 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 the same current picture or a different picture, for example, other already filtered blocks of an already reconstructed picture, for example, an already reconstructed and filtered block 221, for example, to provide 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 interpretation. The decoded picture buffer (DPB) 230 may also be configured to store, for example, one or more unfiltered reconstructed blocks 215 or generally unfiltered reconstructed samples if the reconstructed blocks 215 are not filtered by the loop filter unit 220, or to store any other further processed versions of the reconstructed blocks or samples.
[0079] 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 acquire original picture data, for example, the original block 203 (the current block 203 of the current picture 17), and reconstructed picture data, for example, filtered and / or unfiltered reconstructed samples or blocks from one or more already decoded pictures of the same (current) picture and / or from, for example, 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 predictions, for example, inter-prediction or intra-prediction, to acquire prediction blocks 265 or predictor 265.
[0080] 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 the current block (without partitioning), and to generate a corresponding prediction block 265 used for calculating the residual block 205 and reconstructing the reconstructed block 215.
[0081] Embodiments of the mode selection unit 260 may be configured to select a partitioning and prediction mode (for example, 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 (the smallest residual means better compression for transmission or storage) or the smallest signaling overhead (the smallest signaling overhead means better compression for transmission or storage), or that takes both into account or balances them. The mode selection unit 260 may also be configured to determine the partitioning and prediction mode based on rate distortion optimization (RDO), i.e., to select a prediction mode that provides the smallest rate distortion. In this context, terms such as “best,” “smallest,” and “optimal” do not necessarily refer to the overall “best,” “smallest,” and “optimal,” but may also refer to termination or selection criteria such as a value being above or below a threshold, or potentially leading to a “suboptimal choice,” but satisfying other constraints that reduce complexity and processing time.
[0082] In other words, the partitioning unit 262 may be configured to partition block 203 into smaller block partitions or subblocks (which also form a block) using, for example, quadtree partitioning (QT), binary partitioning (BT), or ternary partitioning (TT), or any combination thereof, and to perform predictions with respect to each of the block partitions or subblocks, where mode selection includes selecting the tree structure of the partitioned block 203, and prediction modes are applied to each of the block partitions or subblocks.
[0083] The following describes in more detail the sorting (by the sorting unit 260, for example) and prediction (by the inter-prediction unit 244 and intra-prediction unit 254) processes performed by the exemplary video encoder 20.
[0084] classification The partitioning unit 262 may partition (or divide) the current block 203 into smaller partitions, for example, smaller blocks of square or rectangular size. These smaller blocks (also called subblocks) may be further partitioned into even smaller partitions. This is also called tree partitioning or hierarchical tree partitioning, for example, the root block at root tree level 0 (hierarchy level 0, depth 0) may be recursively partitioned, for example, into two or more blocks at the next lowest tree level, for example, into nodes at tree level 1 (hierarchy level 1, depth 1), and these blocks may be further partitioned into two or more blocks at the next lowest level, for example, tree level 2 (hierarchy level 2, depth 2), and so on until a termination criterion is met, for example, the maximum tree depth or the minimum block size is reached and partitioning is terminated, and so on. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree that uses partitioning into two sections is called a binary tree (BT), a tree that uses partitioning into three sections is called a ternary tree (TT), and a tree that uses partitioning into four sections is called a quadary tree (QT).
[0085] As described above, the term “block” as used herein may refer to a portion of a picture, in particular a portion of a square or rectangle. For example, in relation to HEVC and VVC, a block may be a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), and 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).
[0086] For example, a coding tree unit (CTU) may be or include a CTB of a luminous sample, two corresponding CTBs of a chroma sample of a picture having three sample sequences, or a CTB of a sample of 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 constituent CTB into a CTB is a partition. A coding unit (CU) may be a coding block of a luminous sample, two corresponding coding blocks of a chroma sample of a picture having three sample sequences, or a coding block of a sample of 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 values of M and N such that the division of the CTB into a coding block is a partition.
[0087] For example, in an embodiment using 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 interpicture (time) prediction or intrapicture (spatial) prediction is made at the CU level. Each CU may be further divided into one, two, or four PUs according to the PU division type. Within a single PU, the same prediction process is applied, and relevant information is sent to the decoder based on the PU. After obtaining residual blocks by applying the prediction process based on the PU division type, the CU may be divided into transformation units (TUs) by another quadtree structure similar to a coding tree for the CU.
[0088] For example, in embodiments of the latest video coding standard currently under development, called Multipurpose Video Coding (VVC), quadtree and binary tree (QTBT) partitioning is used to partition coding blocks. In the QTBT block structure, CUs can have either a square or rectangular shape. For example, a coding tree unit (CTU) is first partitioned by a quadtree structure. The leaf nodes of the quadtree are further partitioned by a binary or ternary (or triple) tree structure. The leaf nodes of the partitioned trees are called coding units (CUs), and their segmentation is used for prediction and transformation processing without any further partitioning. This means that CUs, PUs, and TUs have the same block size in the QTBT coding block structure. In parallel, multipartitioning, such as ternary partitioning, has also been proposed for use in conjunction with the QTBT block structure.
[0089] In one example, the mode selection unit 260 of the video encoder 20 may be configured to perform any combination of the classification techniques described herein.
[0090] As described above, the video encoder 20 is configured to determine or select the best or optimal prediction mode from a set of (predetermined) prediction modes. The set of prediction modes may include, for example, an intra-prediction mode and / or an inter-prediction mode.
[0091] Intra Prediction A set of intra-prediction modes may include, for example, 35 different intra-prediction modes defined in HEVC, such as DC (or mean) mode and non-directional modes such as planar mode, or directional modes, or for example, 67 different intra-prediction modes defined for VVC, such as DC (or mean) mode and non-directional modes such as planar mode, or directional modes.
[0092] 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, based on one of the intra-prediction modes in a set of intra-prediction modes.
[0093] The intra-prediction unit 254 (or generally the mode selection unit 260) is further configured to output intra-prediction parameters (or generally information indicating a selected intra-prediction mode for a block) to the entropy coding unit 270 in the form of syntax elements 266 for inclusion in the encoded picture data 21, for example, so that the video decoder 30 may receive the prediction parameters and use them for decoding.
[0094] Interpretation A set of (or possible) interpretation modes depends on the available reference picture (i.e., a previously at least partially decoded picture stored in DBP230) and other interpretation 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, such as only the search window area around the current block, and / or whether pixel interpolation, such as half / semi-pel and / or quarter-pel interpolation, is applied.
[0095] In addition to the prediction mode described above, a skip mode and / or a direct mode may also be applied.
[0096] The interpretation unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (neither of which are shown in Figure 2). The motion estimation unit may be configured to receive or acquire, for motion estimation, a picture block 203 (the current picture block 203 of the current picture 17) and a decoded picture 231, or at least one or more already reconstructed blocks, for example, one or more reconstructed blocks of one or more other / different already decoded pictures 231. For 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 a sequence of pictures that make up the video sequence or may make up a sequence of such pictures.
[0097] The encoder 20 may be configured, for example, to select a reference block from multiple reference blocks of the same or different pictures among several other pictures, and to provide the motion estimation unit with an offset (spatial offset) between the reference picture (or reference picture index) and / or the position (x, y coordinates) of the reference block and the position of the current block as an interpretation parameter. This offset is also called the motion vector (MV).
[0098] The motion compensation unit is configured to obtain interprediction parameters, for example, receive them, and perform interprediction based on or using the interprediction parameters to obtain interprediction block 265. Motion compensation performed by the motion compensation unit may include fetching or generating prediction blocks based on motion / block vectors determined by motion estimation, possibly performing subpixel-precision interpolation. Interpolation filtering may generate additional pixel samples from known pixel samples, and thus potentially increase the number of candidate prediction blocks that may be used to code picture blocks. Upon receiving a motion vector about the current picture block's PU, the motion compensation unit may find the prediction block pointed to by the motion vector in one of the reference picture lists.
[0099] The motion compensation unit may also generate block and video slice-related syntax elements for use by the video decoder 30 when decoding the picture blocks of the video slice.
[0100] Entropy coding The entropy coding unit 270 is configured to apply, for example, an entropy coding algorithm or scheme (e.g., variable length coding (VLC), context adaptive VLC (CAVLC), arithmetic coding, binarization, context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE), or another entropy coding method or technique) or bypass (uncompressed) to quantized coefficients 209, inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements, for example, to obtain encoded picture data 21 that can be output via output 272 in the form of an encoded bitstream 21, so that the video decoder 30 may receive the parameters and use them for decoding. The encoded bitstream 21 may be sent to the video decoder 30 or stored in memory for later transmission or retrieval by the video decoder 30.
[0101] Other variations of the video encoder 20 can be used to encode a video stream. For example, a non-transformation encoder 20 may directly quantize the residual signal with respect to a particular block or frame without a transformation processing unit 206. In another implementation, the encoder 20 may have a quantization unit 208 and an inverse quantization unit 210 combined into a single unit.
[0102] Decoder and decoding method Figure 3 shows an example of a video decoder 30 configured to implement the technology of the present application. The video decoder 30 is configured to receive encoded picture data 21 (e.g., encoded bitstream 21) encoded by, for example, the encoder 20, in order to obtain a decoded picture 331. The encoded picture data or bitstream contains information for decoding the encoded picture data, for example, data representing picture blocks and associated syntax elements of an encoded video slice.
[0103] In the example in Figure 3, the decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transformation processing unit 312, a reconstruction unit 314 (e.g., an aggregater 314), a loop filter 320, a decoded picture buffer (DBP) 330, an interpretation unit 344, and an intrapretation unit 354. The interpretation unit 344 may be a motion compensation unit or include a motion compensation unit. In some examples, the video decoder 30 may perform a decoding path that is generally the reverse of the encoding path described in relation to the video encoder 100 in Figure 2.
[0104] As described in relation to encoder 20, the inverse quantization unit 210, inverse processing unit 212, reconstruction unit 214, loop filter 220, decoding picture buffer (DPB) 230, inter-prediction unit 344, and intra-prediction unit 354 can also be considered to form the “built-in decoder” of video encoder 20. Therefore, the inverse quantization unit 310 may be functionally identical to the inverse quantization unit 110, the inverse processing unit 312 may be functionally identical to the inverse processing unit 212, the reconstruction unit 314 may be functionally identical to the reconstruction unit 214, the loop filter 320 may be functionally identical to the loop filter 220, and the decoding picture buffer 330 may be functionally identical to the decoding picture buffer 230. Thus, the descriptions given for each unit and function of video encoder 20 apply mutatis mutandis to each unit and function of video decoder 30.
[0105] Entropy decoding The entropy decoding unit 304 is configured to analyze the bitstream 21 (or generally the encoded picture data 21) and, for example, perform entropy decoding on the encoded picture data 21 to obtain, for example, quantized coefficients 309 and / or decoded coding parameters (not shown in Figure 3), such as inter-prediction parameters (e.g., reference picture index and motion vector), intra-prediction parameters (e.g., intra-prediction mode or index), transformation 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 coding scheme described in relation to the entropy coding unit 270 of the encoder 20. The entropy decoding unit 304 may be further configured to provide the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to the mode selection unit 360 and other parameters to other units of the decoder 30. The video decoder 30 may receive syntax elements at the video slice level and / or video block level.
[0106] inverse quantization The inverse quantization unit 310 may be configured to receive quantization parameters (QP) (or information generally related to inverse quantization) and quantized coefficients from the encoded picture data 21 (for example, by the entropy decoding unit 304, for example, by parsing and / or decoding), and to apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameters to obtain inverse quantized coefficients 311, which may also be called transformed coefficients 311. The inverse quantization process may include using the quantization parameters determined by the video encoder 20 for each video block in the video slice to determine the degree of quantization and, similarly, the degree of inverse quantization to be applied.
[0107] Inverse Transform The inverse transformation processing unit 312 may be configured to receive inversely quantized coefficients 311, also called transformation coefficients 311, and to apply a transformation to the inversely quantized coefficients 311 in order to obtain a reconstructed residual block 213 in the sample region. The reconstructed residual block 213 may also be called a transformation block 213. The transformation may be an inverse transformation, such as an inverse DCT, inverse DST, inverse integer transformation, or a conceptually similar inverse transformation process. The inverse transformation processing unit 312 may be further configured to receive transformation parameters or corresponding information from the encoded picture data 21 (for example, by parsing and / or decoding by the entropy decoding unit 304) in order to determine the transformation to be applied to the inversely quantized coefficients 311.
[0108] Rebuild The reconstruction unit 314 (for example, an adder or summer 314) may be configured to obtain the reconstructed block 315 in the sample region by adding the reconstructed residual block 313 to the predicted block 365, for example, by adding the sample values of the reconstructed residual block 313 to the sample values of the predicted block 365.
[0109] filtering The loop filter unit 320 (either within or after the coding loop) is configured to filter the reconstructed block 315 to smooth pixel transitions or otherwise improve video quality, for example, to obtain the 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, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening, smoothing filter, or a co-filter, or any combination thereof. The loop filter unit 320 is shown in Figure 3 as an in-loop filter, but in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.
[0110] Decode picture buffer Next, the decoded video block 321 of the picture is stored in a decoded picture buffer 330, which stores the decoded picture 331 for use as a reference picture for subsequent motion compensation for other pictures and / or for output on the display, respectively.
[0111] The decoder 30 is configured to output the decoded picture 311, for example, via output 312, for presentation or viewing to the user.
[0112] prediction The inter-prediction unit 344 may be identical to the inter-prediction unit 244 (particularly the motion compensation unit), and the intra-prediction unit 354 may be functionally identical to the inter-prediction unit 254, and perform partitioning or partitioning decisions and predictions based on partitioning and / or prediction parameters or respective information received from the decoded picture data 21 (for example, by analysis and / or decoding by the entropy decoding unit 304). The mode selection unit 360 may be configured to perform block-by-block predictions (intra or inter-predictions) based on the reconstructed picture, block, or respective sample (filtered or unfiltered) in order to obtain prediction blocks 365.
[0113] When a video slice is coded as an intra-coded (I) slice, the intra-prediction unit 354 of the mode selection unit 360 is configured to generate a prediction block 365 for the 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 picture is coded as an inter-coded (i.e., B or P) slice, the inter-prediction unit 344 (e.g., motion compensation unit) of the mode selection unit 360 is configured to generate a prediction block 365 for the video block of the current video slice based on motion vectors and other syntax elements received from the entropy decoding unit 304. With respect to 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 reference frame lists, List 0 and List 1, using default construction techniques based on the reference pictures stored in the DPB 330.
[0114] The mode selection unit 360 is configured to determine prediction information about the video block of the current video slice by analyzing motion vectors and other syntax elements, and uses the prediction information to generate a prediction block about the current video block being decoded. For example, the mode selection unit 360 uses some of the received syntax elements to determine the prediction mode used to code the video block of the video slice (e.g., intra or interprediction), the slice type of interprediction (e.g., B slice, P slice, or GPB slice), construction information about one or more of the reference picture lists for the slice, motion vectors for each intercoded video block of the slice, the status of the interprediction for each intercoded video block of the slice, and other information for decoding the video block in the current video slice.
[0115] 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-transformation-based decoder 30 may directly dequantize the residual signal with respect to a particular block or frame without an inverse transformation processing unit 312. In another implementation, the video decoder 30 may have an inverse quantization unit 310 and an inverse transformation processing unit 312 combined into a single unit.
[0116] It should be understood that in encoder 20 and decoder 30, the processing result of the current step may be further processed and then output to the next step. For example, after interpolation filtering, motion vector derivation, or loop filtering, further operations such as clipping or shifting may be performed on the processing result of interpolation filtering, motion vector derivation, or loop filtering.
[0117] It should be noted that further calculations may be applied to the derived motion vectors of the current block (including, but not limited to, affine mode control point motion vectors, affine, planar, and ATMVP mode lower block motion vectors, and temporal motion vectors). For example, the value of a motion vector is constrained to a given range according to its representation bits. If the representation bits of a motion vector are bitDepth, then the range is -2^(bitDepth-1)~2^(bitDepth-1)-1, where "^" means exponentiation. For example, if bitDepth is set to be equal to 16, the range is -32768~32767, and if bitDepth is set to be equal to 18, the range is -131072~131071. Here, we provide two methods for constraining motion vectors.
[0118] Method 1: Remove the MSB (most significant bit) by using a flow operation to cause an overflow. 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)
[0119] For example, when the value of mvx is -32769, after applying equations (1) and (2), the resulting value is 32767. In a computer system, decimal numbers are stored as two's complements. The two's complement of -32769 is 1,0111,1111,1111,1111 (17 bits), and then the MSB is discarded. Thus, the resulting two's complement is 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 - 2Figure 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 embodiments disclosed as described herein. In embodiments, the video coding device 400 may be a decoder, such as the video decoder 30 in Figure 1A, or an encoder, such as the video encoder 20 in Figure 1A.
[0123] The video coding device 400 includes an incoming port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an outgoing port 450 (or output port 450) for transmitting data, and memory 460 for storing data. The video coding device 400 may also include optical-electrical (OE) components and electrical-optical (EO) components coupled to the incoming port 410, receiver unit 420, transmitter unit 440, and outgoing port 450 for transmitting or receiving optical or electrical signals.
[0124] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (for example, as a multi-core processor), FPGAs, ASICs, and DSPs. The processor 430 communicates with the incoming port 410, the receiver unit 420, the transmitter unit 440, the outgoing port 450, and the memory 460. The processor 430 includes a coding module 470. The coding module 470 implements the embodiments disclosed above. For example, the coding module 470 implements, processes, prepares, or provides various coding operations. Thus, including the coding module 470 greatly 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 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0125] Memory 460 may include one or more disks, tape drives, and solid-state drives, and may be used as an over-flow data storage device for storing such programs when selected for execution, as well as for storing instructions and data read during program execution. Memory 460 may be, for example, volatile and / or non-volatile, and may be read-only memory (ROM), random-access memory (RAM), ternary content-addressable memory (TCAM), and / or static random-access memory (SRAM).
[0126] Figure 5 is a simplified block diagram of a device 500 which may be used as either or both of the source device 12 and destination device 14 in Figure 1, according to an exemplary embodiment.
[0127] The processor 502 of the device 500 can be a central processing unit. Alternatively, the processor 502 can be one or more devices of any other type, existing or to be developed, capable of manipulating or processing information. The disclosed implementation can be carried out by a single processor, e.g., processor 502, as shown, but speed and efficiency advantages can be realized by using two or more processors.
[0128] The memory 504 of the device 500 may, in implementation, be a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may be used as memory 504. Memory 504 may include code and data 506 accessed by the processor 502 using the bus 512. Memory 504 may further include an operating system 508 and an application program 510, the application program 510 including at least one program that enables the processor 502 to perform the methods described herein. For example, the application program 510 may include applications 1 to N, further including a video coding application that performs the methods described herein.
[0129] The device 500 may also include one or more output devices, such as a display 518. The display 518 may, in one example, be a touch display that combines the display with a touch-sensing element that is operable to sense touch input. The display 518 may be coupled to the processor 502 via the bus 512.
[0130] Although shown here as a single bus, the bus 212 of device 500 may consist of multiple buses. Furthermore, the secondary storage 514 can be directly coupled to other components of device 500 or accessed via 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 can be implemented in a wide variety of configurations.
[0131] In the example of constructing a merge candidate list according to ITU-T H.265, the merge candidate list is constructed based on the following candidates: 1. Up to four spatial candidates derived from five spatially neighboring blocks, 2. One temporal candidate derived from two blocks located in the same temporal location, 3. Additional candidates, including combined bi-predictive candidates, and 4. Candidate zero motion vectors
[0132] spatial candidate The motion information of spatially neighboring blocks is first added to the merge candidate list as motion information candidates (in the example, the merge candidate list may be an empty list before the first motion vector is added to the merge candidate list). The neighboring blocks that are likely to be inserted into the merge list are shown in Figure 6b. For the interpretation block merging, up to four candidates are inserted into the merge list by examining A1, B1, B0, A0, and B2 in that order.
[0133] The motion information may include all motion data, including information on whether one or two reference picture lists are used, as well as the reference index and motion vector for each reference picture list.
[0134] In the example, after checking whether neighboring blocks are available and whether they contain motion information, several further redundancy checks are performed before considering all motion data of neighboring blocks as potential motion information candidates. These redundancy checks can be divided into two categories for two different purposes. Category 1: Avoid having candidates with redundant motion data in the list. Category 2: Prevents merging two sections that could be represented by other means, generating redundant syntax.
[0135] temporal candidate Figure 6a shows the coordinates of the block from which the temporal motion information candidate is extracted. Blocks at the same location are those that have the same -x, -y coordinates as the current block but are located in a different picture (one of the reference pictures). Temporal motion information candidates are added to the merge list if the list is not full (in the example, the merge list is not full when the number of candidates in the merge list is below a threshold, for example, the threshold may be 4, 5, or 6).
[0136] Generated candidates If the merge list is not yet full after the insertion of spatial and temporal motion information candidates, the generated candidates are added to fill the list. The list size is indicated in the sequence parameter set and is fixed throughout the entire coded video sequence.
[0137] The ITU-T H.265 and VVC merge list construction processes output a list of motion information candidates. The VVC merge list construction process is described in section "8.3.2.2 Derivation process for luma motion vectors for merge mode" of the document JVET-L1001_v2 Versatile Video Coding (Draft 3), published at http: / / phenix.it-sudparis.eu / jvet / . The term motion information refers to the motion data required to perform the motion compensation prediction process. Motion information typically refers to the following information: • Does Block apply simple prediction or biprediction? • The ID of the reference picture used in the prediction. (Two IDs if the block applies biprediction). • Motion vector (two motion vectors if the block is bipredicted) • Additional information
[0138] In VVC and H.265, the list of candidates that is the output of the merge list construction contains N candidate motion information. The number N is generally contained in the bitstream and can be a positive integer such as 5 or 6. The candidates included in the constructed merge list may contain single-prediction or bi-prediction information. This means that the candidates selected from the merge list may exhibit bi-prediction behavior.
[0139] Dual prediction A special mode of interpretation is called "dual prediction," in which two motion vectors are used to predict a block. The motion vectors can point to the same or different reference pictures, which can be indicated by a reference picture list ID and a reference picture index. For example, the first motion vector may point to the first picture in reference picture list L0, and the second motion vector may point to the first picture in reference picture list L1. Two reference picture lists (e.g., L0 and L1) may be maintained, with the picture pointed to by the first motion vector selected from list L0 and the picture pointed to by the second motion vector selected from list L1.
[0140] In the example, if the motion information indicates biprediction, then the motion information includes the following two parts: • L0 section: Motion vector and reference picture index pointing to the entry in reference picture list L0. • L1 section: Motion vector and reference picture index pointing to the entry in reference picture list L1.
[0141] Picture Order Count (POC): A variable associated with each picture uniquely identifies a relevant picture among all pictures in a CVS (Coded Video Sequence) and indicates the output order position of the relevant picture relative to the output order positions of other pictures in the same CVS that should be output from the decoded picture buffer when the relevant picture should be output from the decoded picture buffer.
[0142] Each of the reference picture lists L0 and L1 may contain one or more reference pictures identified by the POC. The association between each reference index and POC value may be signaled within the bitstream. For example, the L0 and L1 reference picture lists may contain the following reference pictures: [Table 1]
[0143] In the example above, the first entry in the reference picture list L1 (indicated by reference index 0) is a reference picture with a POC value of 13. The second entry in the reference picture list L1 (indicated by reference index 1) is a reference picture with a POC value of 14.
[0144] Triangulation prediction mode The concept of the triangular prediction mode is to introduce a triangular section for motion-compensated prediction. In the example shown in Figure 7, two triangular prediction units are used for the CU, either diagonally or inversely diagonally. Each triangular prediction unit within the CU is interpreted using the motion vector and reference frame index of the single prediction, derived from a list of single prediction candidates. An adaptive weighting process is performed on the diagonal edges after the samples associated with each triangular prediction unit have been predicted, for example, by motion compensation or intrapicture prediction. Then, transformation and quantization processes are applied to the entire CU. It should be noted that this mode is only applicable to the skip mode and merge mode.
[0145] In triangular prediction mode, a block is divided into two triangular parts (as shown in Figure 7), and each part can be predicted using one motion vector. The motion vector used to predict one triangular part (represented by PU1) can be different from the motion vector used to predict the other triangular part (represented by PU2). In the example, to reduce the complexity of implementing triangular prediction mode, it is noted that each part may be predicted using only a single motion vector (single prediction). In other words, PU1 and PU2 do not have to be predicted using a dual prediction that includes two motion vectors.
[0146] Lower block prediction mode The triangular prediction mode is a special case of subblock prediction where a block is divided into two blocks. In the example above, two block division directions are shown (a 45-degree section and a 135-degree section). It should be noted that other section angles and section ratios are also possible (example in Figure 8).
[0147] In some examples, a block is divided into two subblock parts, each of which a single prediction needs to be applied. The subblock prediction represents a generalized version of the triangular prediction.
[0148] In the example, depending on the sub-block partitioning mode used, the following steps are applied to obtain predictive samples. Step 1: Divide the coding block into two subblocks using a geometric model. This model may be obtained by dividing the block with a dividing line (for example, a straight line), as illustrated in Figures 9-12. It can be understood that the result of Step 1 may be merely conceptual. For example, after Step 1, there may be no clear concepts of "subblock 1" or "subblock 2," but rather the generation or acquisition of parameters that refer to the dividing line. Samples may belong to different subblocks depending on the parameters that refer to the dividing line. In this step, the geometric model allows us to consider a sample of a coding block as being contained within two subblocks. Subblock A or Subblock B contains a portion (but not all) of the sample of the current coding block. Subblock A or Subblock B may be represented by the code of sample_dist for each sample. sample_dist may be obtained according to the examples and embodiments of other paragraphs. Step 2: Obtain a first prediction mode for the first subblock and a second prediction mode for the second subblock. In the example, the first prediction mode is not identical to the second prediction mode. In the example, the prediction mode (first or second prediction mode) may be an interprediction mode, and the information for the interprediction mode may include a reference picture index and a motion vector. In another example, the prediction mode may be an intraprediction mode, and the information for the intraprediction mode may include an intraprediction mode index. Step 3: Obtain the first and second predicted values using the first and second prediction modes, respectively. Step 4: Obtain the combined value of the predicted samples by combining the first and second predicted values according to the splitting disclosed in Step 1. The process of obtaining the combined value of the predicted samples of a block by combining samples from the first and second predictions may include filtering, masking, or copying of samples.
[0149] In the example, in step 1, the coding block is divided into two subblocks in various ways. Figure 9 shows an example of the division of a coding block, where the dividing line 1250 divides the block into two subblocks. Two parameters are signaled to represent the line 1250, one parameter being the angle alpha 1210 and the other being the distance dist 1230.
[0150] In some embodiments, the angle is measured between the x-axis and the dividing line, as shown in Figure 9, while the distance is measured by the length of a vector perpendicular to the dividing line and passing through the center of the current block.
[0151] In another example, Figure 10 shows an alternative way of representing dividing lines, and the examples of angles and distances differ from those shown in Figure 9.
[0152] In some examples, in step 4, the split disclosed in step 1 is used for a combination of the first and second predicted values to obtain the final predicted value.
[0153] In the example, a blending operation is applied in step 4 to eliminate any artifacts (sharp or jagged appearance along the dividing line). The blending operation can be described as a filtering operation along the dividing line.
[0154] On the encoder side, the dividing line (parameters defining the line, e.g., angle and distance) is determined based on a cost function that is rate-distortion based. The determined line parameters are encoded into a bitstream. On the decoder side, the line parameters are decoded (obtained) by the bitstream. On the decoder side, the line parameters are used for a combination of a first and a second predicted value to obtain the final predicted value. Step 1 does not require the concept of two subcoding blocks, and the decoder can represent the concept of two subcoding blocks using coding blocks and line parameters.
[0155] In the example, for a 3-video channel containing a luminance component and two chrominance components, a first and second prediction are generated for each channel.
[0156] Since there are many possibilities for splitting a coding block into two subblocks, the signaling (coding) of the split (or division) requires many bits. Because angle and distance values can have many different values, and this requires too much secondary information to be signaled in the bitstream, a quantization scheme is applied to the secondary information of angle and distance to improve coding efficiency.
[0157] Embodiments of the present invention relate to signaling of partitioning parameters, such as a quantized angle parameter alphaIdx and a quantized distance parameter distanceIdx.
[0158] In the example, in the quantization scheme, the angle value and the distance value are, alphaIdx = Round(alpha / Δalpha) distanceIdx = Round(dist / Δdist) It is possible to quantize by a linear uniform quantizer according to the following equation, where the variable Δalpha represents the quantization step size with respect to the parameter division line of the angle, and Δdist represents the quantization step size with respect to the distance parameter of the division line. Thus, the angle alpha and distance dist can be quantized using the values of alphaIdx and distanceIdx obtained from the bitstream. alpha = alphaIdx*Δalpha dist = distanceIdx * Δdist It may be reconstructed as follows.
[0159] In one example, if the angle quantization step size is equal to Δalpha = 11.25°, the value of alphaIdx may take a range from 0 to 31 (including 0 and 31) to encompass the allowed angles in the Euclidean plane. In another example, the value of the angle quantization step size is equal to Δalpha = 22.5°, and thereby the value of alphaIdx may take a range from 0 to 15 (including 0 and 15).
[0160] In some embodiments, a linear uniform quantizer is used to quantize angled data; that is, a method is disclosed for quantizing distance information in relation to angled data, where the value of Δalpha is constant with respect to a given coding (decoding or encoding) block.
[0161] The objective of the disclosed quantization scheme is to evenly distribute the allowable dividing lines with respect to a given coding block, which may have different sizes and aspect ratios. The evenly distributed space of quantized angle and distance parameters improves the coding efficiency of non-rectangular components and enables a compact representation of the dividing line parameters.
[0162] In some embodiments, a method for dividing a rectangular coding block by a straight line, wherein the straight line is parameterized by a pair of parameters representing quantized angle and quantized distance values, the quantized distance values being derived by a quantization process depending on the angle value and the aspect ratio of the coding block.
[0163] In one example, the distance may be quantized such that a given numerical range of distanceIdx is satisfied, for example, a range of numbers from 0 to 3 (including 0 and 3). In another example, the distance may be quantized with respect to a given block such that the dividing lines with respect to a given pair of values of angleIdx and distanceIdx are evenly distributed and the dividing lines never go outside the area of the given coding block.
[0164] In the first step, the maximum distance ρ max However, the distance value 0 < dist < ρ max All dividing lines having a certain property can be derived angle by angle such that they are restricted to coding blocks (for example, they intersect the boundaries of coding blocks). This is illustrated in Figure 15 for coding blocks of size 16x4 luminance samples.
[0165] In the example, the maximum distance ρ max teeth,
number
[0166] In another example, the value of the quantization step size for distance that depends on the angle is: Δdist(alphaR,w,h) = (ρ max (alphaR,w,h) -ρ th ) / N It can be derived as follows, in the formula, ρ th ρ is a parameter used to adjust the spacing between dividing lines for coding blocks. In the example, ρ th The value of is ρ th It is set to = 1.5.
[0167] In another example, the maximum distance ρ max teeth,
number
[0168] In the example, the value of Δdist, which depends on the values of the parameter representing angle, the parameter representing width, and the parameter representing height, may be stored in a pre-calculated lookup table to avoid repeated calculations of Δdist during the encoding or decoding process.
[0169] In this embodiment, the value of Δdist is stepD = Round(Δdist*2 prec ) It is possible to scale and round for the purpose of using integer calculations according to the formula, where stepD represents the step size of the linearly scaled distance, and prec is a variable used to adjust the precision of the scaling process. In the example, the value of prec is set to prec = 7.
[0170] In the example, a pre-calculated value of stepD based on the aspect ratio, expressed as whRatio, is also stored, where the aspect ratio value depends on the width and height of the coding block. Furthermore, a pre-calculated value of stepD based on the (normalized) angle value angleN (e.g., 0 ≤ angleN * Δalpha ≤ 90°), which is an index value related to the angle in the first quadrant of the Euclidean plane, is also stored. An example of such a lookup table with the above simplification applied can be seen in Figure 13.
[0171] In one embodiment, the following steps are applied to obtain a predictive value for a sample coding block.
[0172] Step 1: For the samples in the current block (decoded block or encoded block), the sample distance (sample_dist) is calculated.
[0173] In some examples, the sample distance may represent the horizontal distance, vertical distance, or combined vertical and horizontal distance of the sample to a dividing line, and the dividing line is used to divide a coding block into two subblocks. The sample is represented by the coordinates (x, y) relative to the top-left sample of the coding block. The coordinates of the sample, sample(x, y) and sample_dist, are illustrated in Figures 11 and 12. The subblocks are not necessarily rectangles; they may be triangles or trapezoids.
[0174] In the example, the first parameter represents the quantized angle value (angleIdx), and the second parameter represents the quantized distance value (distanceIdx). The two parameters represent the equation of a straight line. In the example, the distance 1230 can be obtained according to distanceIdx (the second parameter), and the angle alpha 1210 can be obtained according to angleIdx (the first parameter). The distance 1230 can be the distance of the dividing line to the center of the coding block, and the angle can be the angle between the dividing line and a horizontal (or equivalently vertical) line passing through the center point of the coding block.
[0175] In certain examples, the values of angleIdx and distanceIdx are obtained based on the shape of the partition in the geometric partitioning merge mode (indicated by merge_gpm_partition_idx). For example, the relationship between these values is shown in Table 1. It is understandable that in implementations, this relationship may be implemented according to Table 1 or by a function. [Table 2]
[0176] In the example, in step 1, the coding block is divided into two subblocks in various ways. Figure 9 shows an example of the division of a coding block, where the dividing line 1250 divides the block into two subblocks. To indicate line 1250, one angle parameter alpha 1210 is signaled in the bitstream.
[0177] In some embodiments, the angle is measured between the x-axis and the dividing line, as shown in Figure 9, while the distance is measured by the length of a vector perpendicular to the dividing line and passing through the center of the current block.
[0178] In another example, Figure 10 shows an alternative way of representing dividing lines, and the examples of angles and distances differ from those shown in Figure 9.
[0179] Step 2: The calculated sample_dist is used to calculate the weight coefficients, which are used for the combination of the first and second predicted values corresponding to the sample. In the example, the weight coefficients are represented as sampleWeight1 and sampleWeight2, referring to the weights corresponding to the first predicted value and the weights corresponding to the second predicted value.
[0180] In one example, the weight coefficient is the following function: weightIdxL = partFlip ? 32 + sample_dist : 32 - sample_dist wValue = Clip3( 0, 8, ( weightIdxL + 4 ) >> 3 ) It is calculated by [this method].
[0181] In this example, wValue is sampleWeight1, and 8 - wValue is sampleWeight2. The variable partFlip is determined according to the value of angleIdx. In this example, partFlip = ( angleIdx >= 13 && angleIdx <= 27 ) ? 0 : 1, or partFlip = ( angleIdx >= 13 && angleIdx <= 27 ) ? 1 : 0.
[0182] Step 3: The combined value of the predicted sample for the sample coordinate (x,y) is calculated based on the first predicted value for the coordinate (x,y), the second predicted value for the coordinate (x,y), sampleWeight1, and sampleWeight2.
[0183] In the example, the predicted sample values are derived as follows: pbSamples[ x ][ y ] = Clip3( 0, ( 1 << BitDepth ) - 1, ( predSamplesLA[ x ][ y ] * wValue + predSamplesLB[ x ][ y ] * ( 8 - wValue ) + offset1 ) >> shift1 )
[0184] In the formula, bitDepth represents the bit depth of the sample, the variable shift1 is obtained according to bitDepth, in the example shift1 = Max( 5, 17 - BitDepth ), the variable offset1 is obtained according to shift1, in the example offset1 = 1 << ( shift1 - 1 ), and predSamplesLA and predSamplesLB are two (nCbW)x(nCbH) arrays.
[0185] In some embodiments, step 1 of the above embodiment may include the following steps.
[0186] Step 1.1: Obtain the index value of the angle parameter (alphaN or angleIdx) for the current block, the width value (W) of the current block, and the height value (H) of the current block. W and H are the width and height of the current block expressed in terms of the number of samples. For example, a coding block with both a width and height of 8 is a square block containing 64 samples. In another example, W and H are the width and height of the current block expressed in terms of the number of samples. The index value of the angle parameter may be obtained as described above, referring to Table 1.
[0187] Step 1.2: Obtain the value of the ratio whRatio according to the values of W and H, where the value of whRatio represents the ratio of the width to the height of the current coding block.
[0188] In the example, whRatio = H / W or whRatio = W / H.
[0189] In another example, the two variables nCbW and nCbH specify the width and height of the current coding block, and the variable cIdx specifies the color component index.
[0190] The variables nW, nH, and whRatio are derived as follows: nW = ( cIdx == 0 ) ? nCbW : nCbW * SubWidthC nH = ( cIdx == 0 ) ? nCbH : nCbH * SubHeightC whRatio = nH / nW
[0191] In the example, the variables SubWidthC and SubHeightC are defined in Table 2 according to the sampling structure of the chroma format specified by chroma_format_idc (chroma_format_idc specifies chroma sampling in relation to chroma sampling) and separate_colour_plane_flag (separate_colour_plane_flag equal to 1 specifies that the three color components of the 4:4:4 chroma format are coded separately. separate_colour_plane_flag equal to 0 specifies that the color components are not coded separately. When separate_colour_plane_flag is not present, it is inferred that separate_colour_plane_flag is 0. When separate_colour_plane_flag is equal to 1, the coded picture consists of three separate components, each of which consists of a coded sample of one color plane (Y, Cb, or Cr) using the monochrome coding syntax. In this case, each color plane is associated with a specific colour_plane_id value). Other values for chroma_format_idc, SubWidthC, and SubHeightC may be specified in the future by ITU T | ISO / IEC.
[0192] [Table 3]
[0193] In monochromatic sampling, there is only one sample sequence, which is nominally considered to be a luma sequence. In 4:2:0 sampling, each of the two chroma sequences has half the height and half the width of the luma sequence. In 4:2:2 sampling, each of the two chroma sequences has the same height and half the width as the luma sequence. In 4:4:4 sampling, the following applies depending on the value of separate_colour_plane_flag: - If separate_colour_plane_flag is equal to 0, each of the two chroma sequences has the same height and width as the luma sequence. - If not (separate_colour_plane_flag is equal to 1), the three color planes are processed separately as monochrome sampled pictures.
[0194] Step 1.3: Obtain the value of stepD based on the lookup table, the value of alpha, and the value of whRatio. In the example, as shown in Figure 13, the values of alpha(alphaN or angleIdx) and whRatio are used as index values in the lookup table. The value of stepD can also be obtained according to a function, where the values of alpha(alphaN or angleIdx) and whRatio are inputs to the function, and the value of stepD is the output of the function. In the example, the result of the function is similar to or the same as the lookup table. In the example, the value of stepD represents the quantization step size for the sample distance calculation process.
[0195] In another example, the function may be expressed as stepD = ( angleIdx % 16 == 8 || ( angleIdx % 16 != 0 && whRatio > 0 ) ) ? 0 : 1.
[0196] Step 1.4: The value of sample_dist is calculated according to the value of stepD.
[0197] In this example, to calculate the sample distance (sample_dist), the variables offsetX and offsetY are first derived as follows. If stepD is equal to 0, the following applies: offsetX = ( -nW ) >> 1, offsetY = ( ( -nH ) >> 1 ) + ( angleIdx < 16 ? ( distanceIdx * nH ) >> 3 : -( ( distanceIdx * nH ) >> 3 ) ) Otherwise (stepD is equal to 1), the following applies: offsetX = ( ( -nW ) >> 1 ) + ( angleIdx < 16 ? ( distanceIdx * nW ) >> 3 : -( ( distanceIdx * nW ) >> 3 ) ) offsetY = ( -nH ) >> 1 - The variables xL and yL are derived as follows: xL = ( cIdx == 0 ) ? x : x * SubWidthC yL = ( cIdx == 0 ) ? y : y * SubHeightC sample_dist = ( ( ( xL + offsetX ) << 1 ) + 1 ) * disLut[ displacementX ] + ( ( ( yL + offsetY ) << 1 ) + 1 ) ) * disLut[ displacementY ] The variables displacementX and displacementY are derived as follows: hwRatio = cbHeight / cbWidth TDX = angleIdx displacementY = (angleIdx + 8) % 32
[0198] The array disLut is defined in Table 3 as follows. [Table 4]
[0199] In another embodiment, step 1 of the above embodiment may include the following steps:
[0200] Step 1.1: Obtain the angle parameter value (alphaN or angleIdx), the distance index value (distanceIdx), the width value (W), and the height value (H) of the current block. W and H are the width and height of the current block, expressed in terms of the number of samples. For example, a coding block with both a width and height of 8 is a square block containing 64 samples. In another example, W and H are the width and height of the current block, expressed in terms of the number of samples. The index value of the angle parameter may be obtained as described above, referring to Table 1.
[0201] Step 1.2: Obtain the value of the ratio whRatio according to the values of W and H, where the value of whRatio represents the ratio of the width to the height of the current coding block.
[0202] In the example, whRatio = H / W or whRatio = W / H.
[0203] In another example, the two variables nCbW and nCbH specify the width and height of the current coding block, and the variable cIdx specifies the color component index.
[0204] The variables nW, nH, and whRatio are derived as follows: nW = ( cIdx == 0 ) ? nCbW : nCbW * SubWidthC nH = ( cIdx == 0 ) ? nCbH : nCbH * SubHeightC whRatio = nH / nW
[0205] Step 1.3: Obtain the value of stepD according to the lookup table, the value of alpha, and the value of whRatio. In the example, as shown in Figure 13, the values of alphaN and whRatio are used as index values in the lookup table. In the example, the value of stepD represents the quantization step size for the sample distance calculation process. It is also possible that the value of stepD is obtained according to a function, where the values of alpha(alphaN or angleIdx) and whRatio are input to the function, and the value of stepD is the output of the function. In the example, the result of the function is similar to or the same as the lookup table. In the example, the value of stepD represents the quantization step size for the sample distance calculation process.
[0206] In another example, the function may be expressed as stepD = ( angleIdx % 16 == 8 || ( angleIdx % 16 != 0 && whRatio > 0 ) ) ? 0 : 1.
[0207] Step 1.4: The value of sample_dist is calculated according to the value of stepD, the value of distanceIdx, the value of angle (alphaN or angleIdx), the value of W, and the value of H.
[0208] In this example, to calculate the sample distance (sample_dist), the variables offsetX and offsetY are first derived as follows. If stepD is equal to 0, the following applies: offsetX = ( -nW ) >> 1, offsetY = ( ( -nH ) >> 1 ) + ( angleIdx < 16 ? ( distanceIdx * nH ) >> 3 : -( ( distanceIdx * nH ) >> 3 ) ) Otherwise (stepD is equal to 1), the following applies: offsetX = ( ( -nW ) >> 1 ) + ( angleIdx < 16 ? ( distanceIdx * nW ) >> 3 : -( ( distanceIdx * nW ) >> 3 ) ) offsetY = ( -nH ) >> 1 - The variables xL and yL are derived as follows: xL = ( cIdx == 0 ) ? x : x * SubWidthC yL = ( cIdx == 0 ) ? y : y * SubHeightC sample_dist = ( ( ( xL + offsetX ) << 1 ) + 1 ) * disLut[ displacementX ] + ( ( ( yL + offsetY ) << 1 ) + 1 ) ) * disLut[ displacementY ]
[0209] The variables displacementX and displacementY are derived as follows: hwRatio = cbHeight / cbWidth TDX = angleIdx displacementY = (angleIdx + 8) % 32
[0210] The array disLut is defined in Table 3 above.
[0211] In one example, the value of whRatio is given by the formula whRatio = (wIdx >= hIdx) ? wIdx - hIdx : hIdx - wIdx Obtained using the formula, where the value of wIdx is equal to log2(W) - 3 and the value of hIdx is equal to log2(H) - 3.
[0212] In another example, the value of whRatio is calculated as whRatio = (W >= H) ? W / H : H / W.
[0213] In an embodiment of the present invention, the value of angle alpha can be obtained from the bitstream (in the decoder). In one example, the numerical range of the angle is a quantized numerical range from 0 to 31 represented by angleIdx (including 0 and 31). In one example, the quantized angle value takes only 32 different distinct values (therefore, the values from 0 to 31 are sufficient to represent which angle value is selected). In another example, the numerical range of the angle value may be 0 to 15, that is, 16 different quantized angle values can be selected. It is noted that generally, the angle value may be an integer value greater than 0.
[0214] In one example, the value of alphaN is an index value obtained from the bitstream, or the value of alpha is calculated based on the value of an indicator obtained from the bitstream. For example, the value of alphaN may be calculated by the formula, alphaN = angleIdx when angleIdx >= 0 && angleIdx <= Lim, or alphaN = 2*Lim - angleIdx when angleIdx > Lim && angleIdx <= 2*Lim, or alphaN = angleIdx - 2*Lim when angleIdx > 2*Lim && angleIdx <= 3*Lim, or alphaN = 4*Lim - angleIdx otherwise where angleIdx is the value of an indicator obtained from the bitstream. The value of angleIdx may be an integer value, and the numerical range of angleIdx is 0 to 31 (including 0 and 31).
[0215] In another example, the value of alphaN can be calculated according to one of the following formulas. alphaN = angleIdx, or alphaN = 2*Lim - angleIdx, or alphaN = angleIdx - 2*Lim, or alpha N = 4*Lim - angleIdx
[0216] In the above equation, Lim is a predefined constant value related to the number of quantized angle values. For example, if there are 32 different quantized angle values, Lim may be equal to 8 (4 * Lim equals 32). In another example, Lim could be 4, corresponding to a total of 16 different quantized angle values.
[0217] In one embodiment, the value of sample_dist is given by the expression, sample_dist = ((2*x) - W + K)*f1(alpha) + ((2*y) - H + K))*f2(alpha) - distanceIdx*stepD*scaleStep Obtained by, in the formula, f1() and f2() are functions, and alpha is the input to the functions. In the example, f1() and f2() are implemented as lookup tables, and the value of alpha is the index value on the lookup table. The value of scaleStep is equal to either the width of the coding (decoding or encoding) block or the height of the coding block. x and y are the coordinates of the sample relative to the top-left sample of the coding block. • K is an integer offset value. In the example, the value of K is 1.
[0218] In one embodiment, the functions f1() and f2() are implemented as lookup tables. In the example, the functions f1() and f2() represent the gradually cumulative change of the value of sample_dist with respect to changing x and y values. In some examples, f1(index) represents the value of sample_dist that is changed by a one-unit increase in the value of x (the unit may be an increase equal to 1), while f2(index) represents the value of sample_dist that is changed by a one-unit increase in the value of y. The value of index can be obtained from the value of an indicator in the bitstream.
[0219] In another embodiment, the value of sample_dist is given by the expression, sample_dist = ((2*x) - W + K)*f(dispIdxN) + ((2*y) - H + K))*f(dispIdxS) - distanceIdx*stepD*scaleStep Obtained by, in the formula, f() is a function, and in this example, the function f() is implemented as a lookup table. • dispIdxN or dispIdxS is an index value obtained from the bitstream or calculated based on the indicator values within the bitstream. The value of scaleStep is equal to either the width of the coding (decoding or encoding) block or the height of the coding block. x and y are the coordinates of the sample relative to the top-left sample of the coding block. • K is an integer offset value. In the example, the value of K is 1.
[0220] In an embodiment, the function f() is implemented as a lookup table. The function f() represents the gradually cumulative change of the value of sample_dist with respect to changing x and y values. In the example, f(index1) represents the value of sample_dist that is changed by a one-unit increase in the value of x, while f(index2) represents the value of sample_dist that is changed by a one-unit increase in the value of y. The values of index1 and index2 are indexes in a table (having non-negative integer values) that can be retrieved according to the values of indicators in the bitstream.
[0221] In the example, the implementation of the function f() is shown in Figure 14. In this example, the value of idx is an input parameter (which may be index1 or index2), and the output of the function is shown as f(idx). In the example, f() is an implementation of the cosine function using integer arithmetic, and idx (the input index value) represents the quantized angle value.
[0222] In one embodiment, the value of stepD represents the quantized distance value for sample distance calculation.
[0223] In one embodiment, as shown in Figure 13, the value of stepD is obtained according to the whRatio value and the angle value (alpha). In the example, the value of stepD is It can be obtained as stepD = lookupTable[alphaN][whRatio], where the value of alphaN is an index value obtained from the bitstream, or the value of alphaN is calculated based on the indicator value obtained from the bitstream. For example, alpha is in the expression, alphaN = angleIdx, if angleIdx >= 0 && angleIdx <= 8, or alphaN = 16 - angleIdx If angleIdx > 8 && angleIdx <= 16, or When alphaN = angleIdx - 16 for angleIdx > 16 && angleIdx <= 24, or alphaN = 32 - angleIdx otherwise can be calculated, where angleIdx is an index value obtained according to the bit stream.
[0224] In another example, alphaN = angleIdx when angleIdx >= 0 && angleIdx <= Lim, or alphaN = 2 * Lim - angleIdx when angleIdx > Lim && angleIdx <= 2 * Lim, or alphaN = angleIdx - 2 * Lim when angleIdx > 2 * Lim && angleIdx <= 3 * Lim, or alphaN = 4 * Lim - angleIdx otherwise That is.
[0225] Alternatively, in another example,<www>alphaN = angleIdx, or alphaN = 2 * Lim - angleIdx, or alphaN = angleIdx - 2 * Lim, or alphaN = 4 * Lim - angleIdx That is.
[0226] In the above formula, Lim is a predefined constant value related to the number of quantized angle values. For example, if there are 32 different quantized angle values, then the number Lim may be equal to 8 (4 * Lim is equal to 32). In another example, Lim can be 4 corresponding to a total of 16 different quantized angle values.
[0227] <www>In one example, the value of sample_dist is obtained by distanceIdx*stepD*scaleStep, where distanceIdx is the index value obtained according to the bitstream, and the value of scaleStep is obtained depending on whether it is the width or height of the block. The result of the multiplication represents the distance of the dividing line to the center point of the coding block (with coordinates x=W / 2 and y=H / 2).
[0228] In this example, the lookup table is a predefined table. Predefined tables have the following advantages: ● Obtaining the distance of a sample to a dividing line is typically complex and requires solving trigonometric equations, which is unacceptable when implementing video coding standards for mass-produced consumer products.
[0229] In some embodiments, the sample distance is obtained according to a lookup table (which may be predefined) that includes pre-calculated intermediate results depending on whRatio and alpha, which have already been calculated by integer calculation (so in the example, all stepD values are integers). The intermediate results obtained using the lookup table are carefully selected for the following reasons: ● The lookup table includes intermediate calculation results for complex operations (trigonometric function calculations), thus reducing implementation complexity. ● The size of tables (which require memory) is kept small.
[0230] In another example, the value of sample_dist is obtained by distanceIdx*(stepD + T)*scaleStep, where T is an offset value with an integer value. In this example, the value of T is 32.
[0231] As shown in Figure 20, a coding method performed by a decoding device or encoding device is disclosed, the method including the following:
[0232] S2001: Retrieves the angle parameter value for the current block.
[0233] In the example, the value of the angle parameter may be obtained by parsing an index value coded in the video bitstream, or the value of the angle parameter may be determined according to a syntax value parsed from the video bitstream.
[0234] The bitstream may be obtained via a wireless or wired network. The bitstream may be 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, microwave, Wi-Fi, Bluetooth, LTE, or 5G.
[0235] In the embodiment, the bitstream is, for example, a sequence of bits in the form of a network abstraction layer (NAL) unit stream or byte stream that forms a representation of a sequence of access units (AUs) that form one or more coded video sequences (CVS).
[0236] In some embodiments, with regard to the decoding process, the decoder side reads the bitstream and derives the decoded picture from the bitstream, and with regard to encoding, the encoder side generates the bitstream.
[0237] Typically, a bitstream contains syntactic elements formed by a syntactic structure. Syntax elements: Elements of data represented within a bitstream. Syntax structure: Zero or more syntax elements that exist together in a bitstream in a specified order.
[0238] In a particular case, the bitstream format defines the relationship between a network abstraction layer (NAL) unit stream and a byte stream, and either the network abstraction layer (NAL) unit stream or the byte stream is called a bitstream.
[0239] A bitstream can be, for example, one of two formats: a NAL unit stream format or a byte stream format. The NAL unit stream format is conceptually a more "basic" type. It contains a sequence of syntactic structures called NAL units, which are ordered in the order of decoding. There are constraints imposed on the decoding order (and content) of the NAL units in a NAL unit stream.
[0240] The byte stream format can be constructed from the NAL unit stream format by ordering the NAL units in the order of decoding and prefixing each NAL unit with a start code prefix and zero or more zero-value bytes to form a stream of bytes. The NAL unit stream format can be extracted from the byte stream format by searching for the position of a unique start code prefix pattern within this stream of bytes.
[0241] This section clarifies embodiments of the relationship between the source provided by the bitstream and the decoded picture.
[0242] A video source represented by a bitstream is a sequence of pictures in the order they are decoded.
[0243] In the example, the indicator value for the current block is obtained according to the bitstream. The indicator value is then used to obtain the value of the angle parameter.
[0244] In an embodiment, the indicator value is used to specify the shape of the partition in the geometric partition merge mode. For example, the indicator may be merge_gpm_partition_idx[ x0 ][ y0 ], where merge_gpm_partition_idx[ x0 ][ y0 ] specifies the shape of the partition in the geometric partition merge mode. The array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the coding block to be considered relative to the top-left luma sample of the picture.
[0245] Typically, the value of merge_gpm_partition_idx[ x0 ][ y0 ] is decoded from the bitstream. In the example, the numerical range of merge_gpm_partition_idx[ ][ ] is from 0 to 63, including 0 and 63. In the example, the decoding process for merge_gpm_partition_idx[ ][ ] is "bypassed".
[0246] If merge_gpm_partition_idx[ x0 ][ y0 ] does not exist, it is inferred that merge_gpm_partition_idx[ x0 ][ y0 ] is equal to 0.
[0247] The angle parameter value for the current block is obtained according to the indicator value and a predefined lookup table.
[0248] In the embodiment, the angle variable angleIdx (angle parameter) and distance variable distanceIdx of the partition in geometric partitioning mode are set according to the values of merge_gpm_partition_idx[ xCb ][ yCb ] (indicators) as defined in the table below. In the implementation, this relationship may be implemented according to Table 1 or by a function.
[0249] [Table 5]
[0250] S2002: Gets the width and height values of the current block.
[0251] In the example, W and H are the width and height of the current block, expressed in terms of the number of samples, and W and H are parsed from the bitstream. In the example, a coding block with both a width and height equal to 8 is a square block containing 64 samples. In another example, W and H are the width and height of the current block, expressed in terms of the number of samples.
[0252] S2003: Calculate the ratio between the width value and the height value.
[0253] In this embodiment, the value of whRatio represents the ratio between the width and height of the current coding block.
[0254] In the example, whRatio = H / W or whRatio = W / H.
[0255] In another example, the two variables nCbW and nCbH specify the width and height of the current coding block, and the variable cIdx specifies the color component index.
[0256] The variables nW, nH, and whRatio are derived as follows: nW = ( cIdx == 0 ) ? nCbW : nCbW * SubWidthC nH = ( cIdx == 0 ) ? nCbH : nCbH * SubHeightC whRatio = nH / nW
[0257] In the example, the variables SubWidthC and SubHeightC are defined in Table 2, depending on the sampling structure of the chroma format specified by sps_chroma_format_idc and sps_separate_colour_plane_flag.
[0258] [Table 6]
[0259] In monochromatic sampling, there is only one sample sequence, which is nominally considered to be a luma sequence. In 4:2:0 sampling, each of the two chroma sequences has half the height and half the width of the luma sequence. In 4:2:2 sampling, each of the two chroma sequences has the same height and half the width as the luma sequence. In 4:4:4 sampling, the following applies depending on the value of sps_separate_colour_plane_flag: - If sps_separate_colour_plane_flag is equal to 0, each of the two chroma sequences has the same height and width as the luma sequence. - Otherwise (sps_separate_colour_plane_flag is equal to 1), the three color planes are processed separately as monochrome sampled pictures.
[0260] S2004: Calculate the sample distance value for the current block sample according to the angle parameter value and ratio value.
[0261] In this embodiment, step S2004 includes the following:
[0262] Step 1: Obtain the value of shiftHor according to the lookup table, the value of alpha, and the value of whRatio.
[0263] In the example, the values of alpha(alphaN or angleIdx) and whRatio are used as index values in the lookup table. The value of shiftHor can also be obtained according to a function, where the values of alpha(alphaN or angleIdx) and whRatio are inputs to the function, and the value of shiftHor is the output of the function. In the example, the result of the function is similar to or identical to the lookup table. In the example, the value of shiftHor represents the quantization step size for the sample distance calculation process.
[0264] In another example, the function may be expressed as shiftHor = ( angleIdx % 16 == 8 || ( angleIdx % 16 != 0 && whRatio > 0 ) ) ? 0 : 1.
[0265] Step 2: The value of sample_dist is calculated according to the value of shiftHor.
[0266] In this example, to calculate the sample distance (sample_dist), the variables offsetX and offsetY are first derived as follows. If shiftHor is equal to 0, the following applies: offsetX = ( -nW ) >> 1, offsetY = ( ( =nH ) >> 1 ) + ( angleIdx < 16 ? ( distanceIdx * nH ) >> 3 : -( ( distanceIdx * nH ) >> 3 ) ) Otherwise (if shiftHor is equal to 1), the following applies: offsetX = ( ( -nW ) >> 1 ) + ( angleIdx < 16 ? ( distanceIdx * nW ) >> 3 : -( ( distanceIdx * nW ) >> 3 ) ) offsetY = ( -nH ) >> 1 - The variables xL and yL are derived as follows: xL = ( cIdx == 0 ) ? x : x * SubWidthC yL = ( cIdx == 0 ) ? y : y * SubHeightC sample_dist = ( ( ( xL + offsetX ) << 1 ) + 1 ) * disLut[ displacementX ] + ( ( ( yL + offsetY ) << 1 ) + 1 ) ) * disLut[ displacementY ]
[0267] The variables displacementX and displacementY are derived as follows: hwRatio = cbHeight / cbWidth TDX = angleIdx displacementY = (angleIdx + 8) % 32
[0268] The array disLut is defined in Table 3.
[0269] In some embodiments, the geometric model considers that a sample of a coding block is contained within two subblocks. Subblock A or subblock B may contain a portion (but not all) of the sample of the current coding block. Subblock A or subblock B may be represented by the code of sample_dist for each sample. sample_dist may be obtained according to the examples and embodiments of other paragraphs.
[0270] S2005: Obtain a predicted value for the sample in the current block based on the sample distance value.
[0271] In one implementation, obtaining a predicted value for a sample based on the distance value of the sample to the sample is possible. Calculate two weighting coefficients according to the sample distance value, This includes obtaining a first predicted value, a second predicted value, and a predicted value for the sample according to two weighting coefficients.
[0272] In one implementation, the sample distance value represents the horizontal distance, vertical distance, or combined vertical and horizontal distance of the sample to the dividing line, and the dividing line is used to divide a coding block into two subblocks.
[0273] In one example, the calculated sample_dist is used to calculate the weight coefficients, which are used for the combination of a first and second predicted value corresponding to the sample. In the example, the weight coefficients are represented as sampleWeight1 and sampleWeight2, referring to the weights corresponding to the first and second predicted values, respectively.
[0274] In one example, the weight coefficient is the following function: weightIdxL = partFlip ? 32 + sample_dist : 32 - sample_dist wValue = Clip3( 0, 8, ( weightIdxL + 4 ) >> 3 ) It is calculated by [this method].
[0275] In this example, wValue is sampleWeight1, and 8 - wValue is sampleWeight2. The variable partFlip is determined according to the value of angleIdx. In this example, partFlip = ( angleIdx >= 13 && angleIdx <= 27 ) ? 0 : 1, or partFlip = ( angleIdx >= 13 && angleIdx <= 27 ) ? 1 : 0.
[0276] In one example, the combined value of the predicted samples for the sample coordinates (x,y) is calculated according to the first predicted value of the coordinates (x,y), the second predicted value of the coordinates (x,y), sampleWeight1, and sampleWeight2.
[0277] In the example, the predicted sample values are derived as follows: pbSamples[ x ][ y ] = Clip3( 0, ( 1 << BitDepth ) - 1, ( predSamplesLA[ x ][ y ] * wValue + predSamplesLB[ x ][ y ] * ( 8 - wValue ) + offset1 ) >> shift1 )
[0278] In the formula, bitDepth represents the bit depth of the sample, the variable shift1 is obtained according to bitDepth, in the example shift1 = Max( 5, 17 - BitDepth ), the variable offset1 is obtained according to shift1, in the example offset1 = 1 << ( shift1 - 1 ), and predSamplesLA and predSamplesLB are two (nCbW)x(nCbH) arrays.
[0279] Apparatus 2100 is disclosed as shown in Figure 21. Apparatus 2100 includes a parameter acquisition module 2101 configured to acquire an angular parameter value relating to a current block, further configured to acquire a width value and a height value of a current block; a ratio calculation module 2102 configured to calculate a ratio value between the width value and the height value; a sample distance calculation module 2103 configured to calculate a sample distance value relating to a sample of the current block according to the angular parameter value and the ratio value; and a prediction module 2104 configured to acquire a prediction value relating to a sample of the current block according to the sample distance value.
[0280] Methods according to embodiments of the present invention can be performed by apparatus 2100. Further features and implementations of the above method correspond to features and implementations of apparatus 2100.
[0281] Example 1. A coding method performed by a decoding device or encoding device, The steps include obtaining the value of the angle parameter for the current block, Steps include obtaining the current block width and current block height, The steps include calculating the ratio between the width value and the height value, A step of obtaining a first value according to the values of the angle parameter and the ratio, A step of calculating the sample distance value for the sample of the current block according to the first value, A method comprising the step of obtaining a predicted value for the sample in the current block based on the distance value of the sample.
[0282] Example 2. The method of Example 1, wherein the first value is obtained according to a predefined lookup table, and the angle parameter value and ratio value are used as index values for the predefined lookup table.
[0283] Example 3: The method from Example 2, but with a predefined lookup table containing nine different angle values (from 0 to 8).
[0284] Example 4. The method from Example 2, but with a predefined lookup table containing five different angle values (from 0 to 4).
[0285] Example 5. A predefined lookup table containing four different ratio values (from 0 to 3), using one of the methods in Examples 2 through 4.
[0286] Example 6. A predefined lookup table containing five different ratio values (from 0 to 4), using one of the methods from Examples 2 to 4.
[0287] Example 7. A predefined lookup table containing three different ratio values (from 0 to 2), using one of the methods from Examples 2 to 4.
[0288] Example 8. One of the methods from Examples 2 to 7, wherein a predefined lookup table contains a first value corresponding to each combination of angle value and ratio value.
[0289] Example 9. The step of calculating the sample distance value for the sample of the current block according to the first value is: One of the methods from Examples 1 to 8, which involves calculating the sample distance value with respect to the current block sample according to the values of the first value and angle parameter.
[0290] Example 10. The value of the ratio is whRatio = (wIdx >= hIdx) ? wIdx - hIdx : hIdx - wIdx Obtained by any one of the methods from Examples 1 to 9, where whRatio is the ratio value, W is the width value, H is the height value, the value of wIdx is equal to log2(W) - 3, and the value of hIdx is equal to log2(H) - 3.
[0291] Example 11. The value of the ratio is whRatio = (W >= H) ? W / H : H / W Obtained by any one of the methods from Examples 1 to 9, where whRatio is the ratio value, W is the width value, and H is the height value.
[0292] Example 12. The sample distance values are sample_dist = ((2*x) - W + K)*f1(alpha) + ((2*y) - H + K))*f2(alpha) - distanceIdx*stepD*scaleStep Calculated by any one of the methods in Examples 1 through 11, where sample_dist is the distance value of the sample, f1() and f2() are functions, alpha is a parameter of the angle (in the example, f1() and f2() are implemented as lookup tables, and the value of alpha is the index value on the lookup table), the value of scaleStep is equal to either the width value or the height value, x and y are the coordinates of the sample relative to the top-left sample of the current block, and K is an integer offset value.
[0293] Example 13. The sample distance value is sample_dist = ((2*x) - W + K)*f(dispIdxN) + ((2*y) - H + K))*f(dispIdxS) - distanceIdx*stepD*scaleStep The formula is calculated by, where sample_dist is the distance value of the sample, f() is a function (in the example, the function f() is implemented as a lookup table), dispIdxN or dispIdxS is an index value (in the example, dispIdxN or dispIdxS is obtained from the bitstream or calculated based on the indicator value in the bitstream), the value of scaleStep is equal to either the width value or the height value, x and y are the coordinates of the sample relative to the top-left sample of the current block, and K is an integer offset value (in the example, the value of K is 1), in one of the methods from Example 1 to 11.
[0294] Example 14. A decoder (30) or encoder including a processing circuit for performing any one of the methods relating to Examples 1 to 13.
[0295] Example 15. A computer program product comprising program code for performing any one of the methods relating to Examples 1 through 13.
[0296] Example 16. A decoder or encoder, One or more processors, A non-temporary computer-readable storage medium coupled to a processor and storing a program to be executed by the processor, wherein the program configures a decoder to perform a method relating to any one of Examples 1 to 13 when the program is executed by the processor. A decoder or encoder that includes this.
[0297] The following describes applications of the encoding and decoding methods shown in the embodiments described above, as well as systems that use them.
[0298] Figure 18 is a block diagram showing a content supply system 3100 for realizing a content distribution service. This content supply system 3100 includes a capture device 3102, a terminal device 3106, and optionally a display 3126. The capture device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, Wi-Fi, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any combination thereof.
[0299] The capture device 3102 may generate data and encode the data using the encoding method shown in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown), which encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone or smartpad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 may include the source device 12 described above. When the data includes video, the video encoder 20 included in the capture device 3102 may actually perform the video encoding process. When the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform the audio encoding process. In some practical scenarios, the capture device 3102 delivers the encoded video and audio data by multiplexing them together. In other practical scenarios, for example in a video conferencing system, the encoded audio data and encoded video data are not multiplexed. The capture device 3102 distributes the encoded audio data and encoded video data separately to the terminal device 3106.
[0300] In the content supply system 3100, the terminal device 310 receives and plays back encoded data. The terminal device 3106 can be any device capable of receiving and recovering data, such as a smartphone or smartpad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination thereof, that can decode the encoded data described above. For example, the terminal device 3106 may include the destination device 14 described above. When the encoded data includes video, the video decoder 30 included in the terminal device is preferred for performing video decoding. When the encoded data includes audio, the audio decoder included in the terminal device is preferred for performing audio decoding.
[0301] For terminal devices with a display, such as a smartphone or smartpad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA), or an in-vehicle device 3124, the terminal device can supply the decoded data to its display. For terminal devices without a display, such as an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, the decoded data is received and displayed on an external display 3126.
[0302] When each device in this system performs encoding or decoding, the picture encoding device or picture decoding device shown in the above embodiment may be used.
[0303] Figure 19 shows the structure of an example terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol progression unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real-Time Streaming Protocol (RTSP), Hypertext Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real-Time Transport Protocol (RTP), Real-Time Messaging Protocol (RTMP), or any combination of these.
[0304] After the protocol processing unit 3202 processes the stream, a stream file is generated. The file is output to the multiplexing / decompression unit 3204. The multiplexing / decompression unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As described above, in some practical scenarios, for example in a video conferencing system, the encoded audio data and encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and audio decoder 3208 without passing through the multiplexing / decompression unit 3204.
[0305] Multiplexing processes generate a video elementary stream (ES), an audio ES, and optionally subtitles. A video decoder 3206, including the video decoder 30 described in the above embodiment, decodes the video ES using the decoding method shown in the above embodiment to generate video frames and supplies this data to the synchronization unit 3212. An audio decoder 3208 decodes the audio ES to generate audio frames and supplies this data to the synchronization unit 3212. Alternatively, video frames may be stored in a buffer (not shown in Figure 19) before supplying them to the synchronization unit 3212. Similarly, audio frames may be stored in a buffer (not shown in Figure 19) before supplying them to the synchronization unit 3212.
[0306] The synchronization unit 3212 synchronizes video frames and audio frames and supplies video / audio to the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information. The information may be coded in a syntax that uses timestamps for the presentation of coded audio and visual data, as well as timestamps for the delivery of the data stream itself.
[0307] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes them with the video and audio frames, and supplies the video / audio / subtitles to the video / audio / subtitle display 3216.
[0308] The present invention is not limited to the systems described above, and either the picture encoding device or the picture decoding device of the embodiments described above can be incorporated into other systems, such as automotive systems.
[0309] 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 strictly defined, and additional operations such as exponentiation and real-valued division are defined. The numbering and counting rules generally start from 0, for example, "1st" is equivalent to 0, "2nd" is equivalent to 1, and so on.
[0310] Arithmetic operators The following arithmetic operators are defined as follows: + Addition - Subtraction (as a two-argument operator) or negation (as a unary prefix operator) * Multiplication including matrix multiplication x y Exponentiation. Defines x to the power of y. In other contexts, such notation is used for superscript writing that is not intended to be interpreted as an exponentiation. The / operator performs integer division, truncating the result to zero. For example, 7 / 4 and -7 / -4 are truncated to 1, while -7 / 4 and 7 / -4 are truncated to -1. The division symbol (÷) is used to represent division in mathematical equations where truncation or rounding is not intended.
number
number
[0311] Logical operators The following logical operators are defined as follows: x && y: Boolean "product" of x and y x || y Boolean "union" of x and y ! Boolean logic "negation" x ? y : If x is true or not equal to 0, it evaluates to the value y; otherwise, it evaluates to the value z.
[0312] Relational operators The following relational operators are defined as follows: > larger >= Above < Less than <= Below == equal != Not equal
[0313] When a relational operator is assigned the value "na" (not applicable) and applied to a syntax element or variable, the value "na" is treated as a different value for that syntax element or variable. The value "na" is considered not to be equal to any other value.
[0314] Bitwise operators The following bitwise operators are defined as follows: The AND operator performs a bitwise "logical AND". When used with integer arguments, it operates on the two's complement representation of the integer value. When used with binary arguments containing fewer bits than the other argument, the shorter argument is extended by adding higher-order bits equal to zero. | Bitwise "logical OR". When performed on integer arguments, it operates on the two's complement representation of the integer value. When performed on binary arguments containing fewer bits than another argument, the shorter argument is extended by adding higher-order bits equal to 0. ^ Bitwise "exclusive OR". When performed on integer arguments, it operates on the two's complement representation of the integer value. When performed on binary arguments containing fewer bits than another argument, the shorter argument is extended by adding higher-order bits equal to 0. x >> y Arithmetic right shift of the two's complement representation of an integer by y bits in binary. This function is defined only for non-negative integer values of y. The bit shifted into the most significant bit (MSB) as a result of the right shift has a value equal to the MSB of x before the shift operation. x << y Arithmetic left shift of the two's complement representation of an integer by y bits in binary. 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.
[0315] 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 as an array index, it is evaluated as the value of the variable before the increment operation. -- Decrement, i.e., x-- is equivalent to x = x - 1, and when used as an array index, it is evaluated as the value of the variable before the decrement operation. += Increment by the specified amount, i.e., x += 3 is equivalent to x = x + 3, and x += (-3) is equivalent to x = x + (-3). -= Decrement by the specified amount, i.e., x -= 3 is equivalent to x = x - 3, and x -= (-3) is equivalent to x = x - (-3).
[0316] Range notation The following notations are used to specify a range of values. x = y..z x takes integer values from y to z, including y and z, provided that x, y, and z are integer values and z is greater than y.
[0317] Mathematical functions The following mathematical functions are defined.
Number
number
number
number
number
number
number
number
[0318] Order of operations When precedence in an expression is not explicitly indicated using parentheses, the following rules apply: - Higher-priority operations are evaluated before any lower-priority operations. - Operations with the same priority are evaluated from left to right.
[0319] The table below clearly shows the order of operations from highest to lowest, with higher positions in the table indicating higher priority.
[0320] With respect to operators also used in the C programming language, the precedence used herein is the same as that used in the C programming language.
[0321] [Table 7]
[0322] Text description of logical operations In the text, in the following form, namely, if (condition 0) Statement 0 else if (condition 1) Statement 1 ... else / * Comment providing information about the remaining conditions * / statement n A statement of a logical operation, mathematically described in the form of , may also be written as follows: The following applies: - If condition 0, statement 0 - Instead, if condition 1 is true, then statement 1 - ... - Otherwise (comments providing information about the remaining conditions), statement n
[0323] Each "If..., ..., otherwise..., ..., ..." statement in the text is introduced by "If..., ..." immediately followed by "The following applies..." or "The following applies...". The final condition of "If..., ..., otherwise..., ..., ..., ..., ..." is always "The following applies...". Alternating "If..., ..., otherwise..., ..., ..., ..., ..." statements can be identified by matching "The following applies..." or "The following applies..." with the final "The following applies...".
[0324] In the text, in the following form, namely, if( condition 0a && condition 0b ) Statement 0 else if( condition 1a || condition 1b ) Statement 1 ... else statement n A statement of a logical operation, mathematically described in the form of , may also be written as follows: The following applies: - If all of the following conditions are true, then statement 0 - 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
[0325] In the text, in the following form, namely, if (condition 0) Statement 0 if (Condition 1) Statement 1 A statement of a logical operation, mathematically described in the form of , may also be written as follows: When condition 0, statement 0 When condition 1 is met, statement 1
[0326] Although embodiments of the present invention have been described primarily in relation to video coding, it should be noted that embodiments of the coding system 10, encoder 20, and decoder 30 (and correspondingly system 10), as well as other embodiments described herein, may further be configured for processing or coding still pictures, i.e., for processing or coding individual pictures independently of any preceding or consecutive pictures, similar to video coding. Generally, when the processing and coding of a picture is limited to a single picture 17, only the interpretation units 244 (encoder) and 344 (decoder) may not be available. All other functions (also called tools or technologies) of the video encoder 20 and video decoder 30, such as residual calculation 204 / 304, transformation 206, quantization 208, inverse quantization 210 / 310, (inverse) transformation 212 / 312, partitioning 262 / 362, intra prediction 254 / 354, and / or loop filters 220, 320, and entropy coding 270, and entropy decoding 304, may be used equally for processing still pictures.
[0327] For example, the encoder 20 and decoder 30, and embodiments of the functions described herein in relation to the encoder 20 and decoder 30, for example, may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted over a communication medium 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 computer programs from one place to another by a communication protocol, for example. Thus, generally speaking, the computer-readable medium may correspond to (1) a non-transient tangible computer-readable storage medium 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, codes, and / or data structures for implementation of the technology described herein. The computer program product may include a computer-readable medium.
[0328] As an example, and not an 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 media 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 appropriately called computer-readable media. For example, if instructions are transmitted from a website, server or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio waves, and microwaves, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio waves, and microwaves are included in the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals, or other temporary media, but instead refer to non-temporary, tangible storage media. As used herein, "disk" and "disc" include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where a disk typically reproduces data magnetically, while a disc reproduces data optically using a laser. Combinations of the above should also be included in the scope of computer-readable media.
[0329] 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, when used herein, the term “processor” may refer to either the above-described structures or any other structure suitable for implementing the techniques described herein. In addition, in some embodiments, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Furthermore, the techniques may all be implemented in one or more circuits or logic elements.
[0330] The technology of this disclosure may be implemented in a wide variety of devices or apparatus, including wireless handsets, integrated circuits (ICs), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to highlight the modes of function of a device configured to perform the disclosed technology, but implementation by different hardware units is not necessarily required. Rather, as described above, various units may be combined in a codec hardware unit or provided by a set of interoperable hardware units including one or more processors as described above, in conjunction with suitable software and / or firmware. [Explanation of Symbols]
[0331] 10 Video coding system, coding system 12. Source device 13 Encoded picture data, communication channel 14 Destination device 16 Picture Sources 17. Picture, picture data, raw picture, raw picture data, monochrome picture, color picture, current picture 18 Preprocessors, pre-processing units, picture preprocessors 19 Pre-processed pictures, pre-processed picture data 20 video encoders, encoders 21 Encoded picture data, encoded bitstream 22 Communication interface, communication unit 28 Communication interface, communication unit 30 decoders, video decoders 31 Decrypted picture data, decrypted picture 32 Post-processors, Post-processing Units 33 Post-processed picture data, post-processed picture 34 Display Devices 46 Processing Circuit 100 video encoders 201 Input, Input Interface 203 Picture Block, Original Block, Current Block, Divided Block, Current Picture Block 204 Residual Calculation Unit, Residual Calculation 205 Residual block, residual 206 Conversion processing unit, conversion 207 Conversion coefficient 208 Quantization Unit, Quantization 209 Quantized coefficients, quantized transformation coefficients, quantized residual coefficients 210 Inverse Quantization Unit, Inverse Quantization 211 Inverse quantized coefficients, inverse quantized residual coefficients 212 Inverse transformation processing unit, (inverse) transformation 213 Reconstructed residual blocks, inversely quantized coefficients, transform blocks 214 Reconstruction Unit, Adder, Combiner 215 Reconstructed Blocks 216 buffers 220 Loop Filter Unit, Loop Filter 221 Filtered blocks, filtered and reconstructed blocks 230 Decoded Picture Buffer (DPB) 231 Decrypted picture 244 Interpretation Units 254 Intra Prediction Unit, Inter Prediction Unit, Intra Prediction 260 Mode Selection Unit 262 division units, division 265 prediction blocks, predictors 266 Syntax Elements 270 Entropy coding unit, entropy coding 272 outputs, output interface 304 Entropy decoding unit, residual calculation, entropy decoding 309 Quantized coefficients 310 Inverse Quantization Unit, Inverse Quantization 311 Inverse quantized coefficients, transformation coefficients 312 Inverse conversion processing unit, (inverse) conversion, output 313 Reconstructed residual block 314 Reconstruction Unit, Combiner, Adder 315 Reconstructed Blocks 320 Loop Filters, Loop Filter Units, Loop Filtering Units 321 Filtered blocks, decoded video blocks 330 Decoded Picture Buffer (DPB) 331 Decrypted picture 344 Interpretation Units 354 Intra Prediction Unit, Intra Prediction 360 Mode Selection Unit 362 divisions 365 Prediction Block 400 video coding devices 410 Incoming port, input port 420 Receiver Unit (Rx) 430 processors, logical units, central processing units (CPUs) 440 Transmitter Unit (Tx) 450 outgoing ports, output ports 460 memory 470 Coding Modules 500 devices 502 Processors 504 memory 506 data 508 Operating Systems 510 Application Programs 512 Bus 514 Secondary Storage 518 displays 1210 Angle alpha, angle parameter alpha 1230 Distance 1250 dividing line 2100 equipment 2101 Parameter Acquisition Module 2102 Ratio Calculation Module 2103 Sample Distance Calculation Module 2104 Prediction Module 3100 Content Supply System 3102 Capture Device 3104 Communication Link 3106 Terminal device 3108 Smartphones, Smartpads 3110 Computers, Laptops 3112 Network Video Recorder (NVR) / Digital Video Recorder (DVR) 3114 TV 3116 Set-top box (STB) 3118 Video conferencing system 3120 Video Surveillance System 3122 Personal Digital Assistant (PDA) 3124 In-vehicle devices 3126 Display 3202 Protocol Progress Unit 3204 Multiple Separation Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronization Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display
Claims
1. A coding method performed by a decoding device or encoding device, The steps include obtaining the value of the angle parameter for the current block, The steps include obtaining the current block width value and the current block height value, A step of calculating the ratio between the aforementioned value of width and the aforementioned value of height, A step of calculating the sample distance value for the current block sample according to the value of the angle parameter and the ratio value, A step of obtaining a predicted value for the sample in the current block according to the distance value of the sample. Methods that include...
2. The step of calculating the sample distance value for the current block sample according to the value of the angle parameter and the ratio value is: A step of obtaining a first value according to the aforementioned value of the angle parameter and the aforementioned ratio value, A step of calculating the distance value of the sample with respect to the sample of the current block according to the first value, The method according to claim 1, including the method described in claim 1.
3. The step of calculating the sample distance value for the current block of the sample according to the first value is, The method according to claim 2, comprising the step of calculating a value for the distance of the sample with respect to the sample of the current block according to the first value and the value of the angle parameter.
4. The step of calculating the sample distance value for the current block of the sample according to the first value is, The method of claim 2, comprising the step of calculating a sample distance value with respect to the sample of the current block according to the first value, the value of the angle parameter, the value of the distance index, the value of the width, and the value of the height.
5. The method according to any one of claims 1 to 4, wherein the value of the sample distance represents the horizontal distance or vertical distance or a combination of vertical and horizontal distance of the sample to the dividing line, and the dividing line is used to divide a coding block into two subblocks.
6. The step of obtaining a predicted value for the sample in the current block according to the distance value of the sample, The steps include: calculating two weighting coefficients according to the distance values of the samples; A step of obtaining a first predicted value, a second predicted value, and the predicted value for the sample of the current block according to the two weight coefficients. The method according to any one of claims 1 to 5, including the method described in any one of claims 1 to 5.
7. The value of the aforementioned ratio is whRatio = (W >= H) ? W / H : H / W The method according to any one of claims 1 to 6, wherein whRatio is the value of the ratio, W is the value of the width, and H is the value of the height.
8. The method according to any one of claims 1 to 7, wherein the value of the angle parameter is an integer value, and the numerical range of the value of the angle parameter is from 0 to 31, including 0 and 31.
9. The value of the aforementioned ratio is whRatio = (wIdx >= hIdx) ? wIdx - hIdx : hIdx - wIdx The method according to any one of claims 1 to 6 and 8, obtained by the formula, wherein whRatio is the value of the ratio, W is the value of the width, H is the value of the height, the value of wIdx is equal to log2(W) - 3, and the value of hIdx is equal to log2(H) - 3.
10. The distance value of the aforementioned sample is sample_dist = ((2*x) - W + K)*f1(alpha) + ((2*y) - H + K))*f2(alpha) - distanceIdx*stepD*scaleStep The method according to any one of claims 2 to 9, wherein the formula is calculated by, where sample_dist is the distance value of the sample, f1() and f2() are functions, alpha is the value of the angle parameter, stepD is the first value, the value of scaleStep is equal to either the value of the width W or the value of the height H, x and y are the coordinates of the sample with respect to the top-left sample of the current block, and K is an integer offset value.
11. The distance value of the aforementioned sample is sample_dist = ((2*x) - W + K)*f(dispIdxN) + ((2*y) - H + K))*f(dispIdxS) - distanceIdx*stepD*scaleStep The method according to any one of claims 2 to 9, wherein the formula is calculated by, where sample_dist is the distance value of the sample, f() is a function, dispIdxN or dispIdxS is an index value, stepD is the first value, the value of scaleStep is equal to either the value of the width W or the value of the height H, x and y are the coordinates of the sample with respect to the top-left sample of the current block, and K is an integer offset value.
12. A decoder (30) or encoder comprising a processing circuit for performing the method according to any one of claims 1 to 11.
13. A computer program product comprising program code for performing the method described in any one of claims 1 to 11.
14. A decoder or encoder, One or more processors, A non-temporary computer-readable storage medium coupled to the processor and storing a program to be executed by the processor, wherein the program configures the decoder to perform the method according to any one of claims 1 to 11 when the processor executes it. A decoder or encoder that includes this.