Method and apparatus for motion information preservation - Patents.com
The method of separating video blocks into sub-blocks with threshold-based motion information preservation enhances compression efficiency and maintains picture quality in video encoding and decoding, addressing the challenge of high compression ratios in limited resource scenarios.
Patent Information
- Application Number
- JP2023191269
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-11-09
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2039-08-26
AI Technical Summary
Existing video coding technologies face challenges in achieving high compression ratios with minimal loss in picture quality, particularly in streaming and storage scenarios with limited network resources.
A method for video encoding and decoding that involves separating a current block into sub-blocks with different motion information and determining motion information preservation based on a distance threshold, using geometric relationships and angle parameters to optimize motion information storage.
Enhances compression efficiency while maintaining picture quality by selectively storing motion information, thus improving data representation without significant quality degradation.
Smart Images

Figure 0007680129000017 
Figure 0007680129000018 
Figure 0007680129000019
Abstract
Description
[Technical field]
[0001] TECHNICAL FIELD Embodiments of the present application relate generally to the field of video coding, and more specifically, to inter prediction. [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, video chat, video conferencing, real-time conversation applications such as DVDs and Blu-ray Discs, video content acquisition and editing systems, and camcorders in security applications.
[0003] The amount of video data required even to render a relatively short video can be significant, which can result in difficulties when the data is to be streamed or otherwise communicated over a communication network with limited bandwidth capacity. Thus, video data is typically compressed before being communicated over modern telecommunication networks. The size of the video can also be an issue when the video is stored on a storage device, since memory resources can be limited. Video compression devices often use software and / or hardware at the source to code the video data before transmission or storage, thereby reducing the amount of data required to represent a digital video image. The compressed data is then received at the destination by a video decompression device that decodes the video data. In view of limited network resources and an ever-increasing demand for higher video quality, improved compression and decompression techniques are desired that improve compression ratios with little or no sacrifice in picture quality. Summary of the Invention
[0004] Embodiments of the present application provide apparatus and methods for encoding and decoding as set forth in the independent claims.
[0005] These and other objects are achieved by the subject matter of the independent claims. Further implementations become apparent from the dependent claims, the description and the drawings.
[0006] According to a first aspect of the present application, a motion information preservation method is disclosed, wherein a current block consists of a first sub-block and a second sub-block, the first sub-block and the second sub-block are separated by a common boundary, the first sub-block corresponds to first motion information and the second sub-block corresponds to second motion information, the method comprising: determining a distance between a sample set in the current block and the common boundary; and comparing the distance with a threshold to determine whether third motion information is to be stored with respect to the sample set, the third motion information being derived from the first motion information and the second motion information.
[0007] In a possible implementation, the step of comparing the distance with a threshold to determine whether the third motion information is to be stored with respect to the sample set includes a step of determining that the third motion information is to be stored with respect to the sample set if the absolute value of the distance is less than or equal to the threshold.
[0008] In a possible implementation, if the absolute value of the distance is greater than the threshold, the method further comprises a step of determining that the first motion information is preserved with respect to the sample set if the distance is positive, or determining that the second motion information is preserved with respect to the sample set if the distance is negative.
[0009] In a possible implementation, the threshold value is predefined.
[0010] In a possible implementation, the threshold is based on a geometric relationship between the common boundary and a horizontal or vertical direction.
[0011] In a possible implementation, the threshold is based on the angle between the orthogonal direction of the common boundary and the horizontal or vertical direction.
[0012] In a possible implementation, the threshold is based on the width and / or height of the current block.
[0013] In a possible implementation, the common boundary is determined by an angle parameter and a distance parameter, and before determining the distance between the sample set in the current block and the common boundary, the method further comprises a step of determining the angle parameter and the distance parameter.
[0014] In a possible implementation, in a decoder, the step of determining the angle parameters and the distance parameters comprises parsing the angle parameters and the distance parameters from a bitstream, or parsing an indicator from the bitstream and obtaining the angle parameters and the distance parameters based on the indicator.
[0015] In a possible implementation, after the step of determining the angle parameter and the distance parameter, the method further comprises the steps of determining a first calculation parameter based on the angle parameter, calculating a temp angle parameter based on the angle parameter, determining a second calculation parameter based on the temp angle parameter, and calculating a third calculation parameter based on the angle parameter and the distance parameter.
[0016] In a possible implementation, the first calculation parameter is determined by checking a pre-set lookup table according to the angle parameter, and the second calculation parameter is determined by checking a lookup table according to the temp angle parameter, and the first calculation parameter and the second calculation parameter are respectively the cosine value and the sine value of the same angle.
[0017] In a possible implementation, the distance is calculated by: distFromLine=(x+K)*P1+(y+K)*P2-P3 P1, P2, and P3 are the first calculation parameter, the second calculation parameter, and the third calculation parameter, respectively, distFromLine represents the distance, K is a non-negative integer, x represents the horizontal coordinate of the target position in the sample set, y represents the vertical coordinate of the target position in a rectangular coordinate system, the position of the top-left sample of the current block is set as the coordinate origin, the right direction is set as the positive horizontal direction, and the down direction is set as the positive vertical direction.
[0018] In a possible implementation, K is equal to 1.
[0019] In a possible implementation, the target locations are predefined in the sample set.
[0020] In a possible implementation, the predetermined position is the top left position of the sample set or the center position of the sample set.
[0021] In a possible implementation, the distance has a sample precision of more than an integer number of samples, Correspondingly, the distance is calculated by: distFromLine=((x< <N)+K)*P1+((y<<N)+K)*P2-P3 2N represents the inverse of the sample precision of the distance.
[0022] In a possible implementation, N is equal to 1.
[0023] In a possible implementation, the sample set is the luma sample set of the current block.
[0024] In a possible implementation, before determining the distance between the sample set in the current block and the common boundary, the method further comprises a step of dividing the current block into a plurality of sample sets, each of the plurality of sample sets having the same size as the sample set, or a step of setting the current block as the sample set.
[0025] In a possible implementation, the sample set is a 4x4 sample array.
[0026] In a possible implementation, each of the multiple sample sets corresponds to a respective motion information storage unit, and the motion information storage unit is used to store one of the first motion information, the second motion information, and the third motion information.
[0027] In a possible implementation, the first sub-block and the second sub-block are triangular sections, trapezoidal sections, or asymmetric rectangular sections.
[0028] In a possible implementation, the first motion information includes motion information based on a first reference picture list, the second motion information includes motion information based on a second reference picture list, and the third motion information includes the first motion information and the second motion information.
[0029] According to a second aspect of the present application, there is disclosed an apparatus for decoding a video stream, comprising a processor and a memory storing instructions for causing the processor to perform the method according to the first aspect.
[0030] According to a third aspect of the present application, there is disclosed an apparatus for encoding a video stream, comprising a processor and a memory storing instructions for causing the processor to perform a method according to the first aspect.
[0031] According to a fourth aspect, a computer-readable storage medium is proposed having stored thereon instructions configured, when executed, to cause one or more processors to code video data, the instructions causing the one or more processors to perform a method according to the first aspect.
[0032] According to a fifth aspect, a computer program comprising program code which, when executed on a computer, performs the method according to the first aspect.
[0033] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims. [Brief description of the drawings]
[0034] Hereinafter, embodiments of the present application will be described in more detail with reference to the accompanying figures and drawings. [Figure 1A] FIG. 1 is a block diagram illustrating an example of a video coding system configured to implement embodiments of the present application. [Figure 1B] 2 is a block diagram illustrating another example of a video coding system configured to implement embodiments of the present application. [Diagram 2] FIG. 2 is a block diagram illustrating an example of a video encoder configured to implement embodiments of the present application. [Diagram 3] 2 is a block diagram illustrating an example structure of a video decoder configured to implement embodiments of the present application. [Figure 4] 1 is a block diagram showing an example of an encoding device or a decoding device. [Diagram 5] FIG. 2 is a block diagram showing another example of an encoding device or a decoding device. [Figure 6] FIG. 13 is a diagram illustrating an example of the positions of spatial merge candidates. [Figure 7] FIG. 13 illustrates an example of a candidate pair considered for redundancy checking of spatial merge candidates. [Figure 8] FIG. 13 illustrates an example of motion vector scaling for temporal merge candidates. [Figure 9] FIG. 2 illustrates an example of motion vector storage for a prediction block of luma samples of size 8×8. [Figure 10] FIG. 1 is a diagram showing an example of triangle partition-based inter prediction. [Figure 11] FIG. 13 is a diagram illustrating an example of uni-predictive MV selection for triangular partition mode. [Figure 12] FIG. 13 is a diagram illustrating an example of weights used in a blending process. [Figure 13] FIG. 13 illustrates an example of motion vector preservation for triangular partition mode. [Figure 14] FIG. 1 illustrates an example of different geometric divisions. [Figure 15] FIG. 1 illustrates an example of GEO segmentation parameters. [Figure 16] FIG. 13 is a diagram illustrating an example of a blending operation. [Figure 17] FIG. 13 illustrates an example of a lookup table for a blending operation. [Figure 18] FIG. 13 illustrates an example of a 4x4 motion preservation example with integer and half-pel positions. [Figure 19] FIG. 1 illustrates an example of a motion preservation method. [Figure 20] FIG. 13 is a block diagram illustrating an example of a motion information preservation method. [Figure 21] FIG. 2 is a block diagram illustrating an example of a motion information storage device. [Figure 22] 31 is a block diagram showing an exemplary structure of a content delivery system 3100 for implementing a content distribution service. [Figure 23] FIG. 2 is a block diagram illustrating the structure of an example of a terminal device.
[0035] Hereinafter, unless expressly specified otherwise, identical reference signs refer to identical or at least functionally equivalent features. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0036] In the following description, reference is made to the accompanying drawings, which form a part of this disclosure and which show, by way of example, specific aspects of the embodiments of the present application or specific aspects in which the embodiments of the present application may be used. It is understood that the embodiments of the present application may be used in other ways and may include structural or logical changes not shown in the drawings. Therefore, the following detailed description is not to be taken in a limiting sense, and the scope of the present application is defined by the appended claims.
[0037] For example, it is understood that disclosure related to a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more of a particular method step is described, the corresponding device may include one or more units, e.g., functional units, to perform the described one or more method steps (e.g., one unit performing the one or more steps, or multiple units performing one or more of the steps, respectively), even if such one or more units are not explicitly described or shown in the drawings. On the other hand, for example, when a particular apparatus is described based on one or more units, e.g., functional units, the corresponding method may include one or more steps (e.g., one step performing the function of one or more units, or multiple steps performing the function of one or more of the units, respectively), to perform the function of the one or more units, even if such one or more steps are not explicitly described or shown in the drawings. Furthermore, it is understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless otherwise specifically noted.
[0038] Video coding typically refers to the processing of a series of pictures forming a video or a video sequence. Instead of the term "picture", the terms "frame" or "image" may be used as synonyms in the field of video coding. Video coding (or coding in general) includes two parts: video encoding and video decoding. Video encoding is performed on the source side and typically involves processing (e.g., by compression) an original video picture 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 typically involves the reverse process compared to the encoder to reconstruct the video picture. The embodiments referring to "coding" of a video picture (or pictures in general) shall be understood to relate to "encoding" or "decoding" of the video picture or the respective video sequence. The combination of the encoding and decoding parts is also referred to as a codec (coding and decoding).
[0039] In the case of lossless video coding, the original video picture can be reconstructed, i.e. the reconstructed video picture is of the same quality as the original video picture (assuming there is no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression, e.g. by quantization, is performed to reduce the amount of data representing the video picture, which cannot be fully reconstructed at the decoder, i.e. the quality of the reconstructed video picture is reduced or degraded compared to the quality of the original video picture.
[0040] Some video coding standards belong to the group of "lossy hybrid video codecs" (i.e., they combine spatial and temporal prediction in the sample domain with 2D transform coding to apply quantization in the transform domain). Each picture of a video sequence is typically partitioned into a set of non-overlapping blocks, and coding is typically performed at the block level. In other words, at the encoder, the video is typically processed, i.e., encoded, at the block (video block) level, for example, by generating a predictive block using spatial (intra-picture) prediction and / or temporal (inter-picture) prediction, subtracting the predictive block from a current block (the block currently being / to be processed) to obtain a residual block, transforming the residual block and quantizing the residual block in the transform domain to reduce (compress) the amount of data to be transmitted, while at the decoder, in order to reconstruct the current block for representation, the reverse processing is applied to the encoded or compressed block compared to the encoder. Furthermore, the encoder repeats the decoder processing loop, resulting in both generating the same predictions (e.g., intra- and inter-predictions) and / or reconstructions for processing, i.e., coding, of subsequent blocks.
[0041] Hereinafter, embodiments of a video coding system 10, a video encoder 20, and a video decoder 30 will be described with reference to FIGS. 1A to 3. FIG.
[0042] 1A is a schematic block diagram illustrating an example coding system 10 that may use techniques of the present application, such as video coding system 10 (or coding system 10 for short). A video encoder 20 (or encoder 20 for short) and a video decoder 30 (or decoder 30 for short) of video coding system 10 represent examples of devices that may be configured to perform techniques in accordance with various examples described herein.
[0043] As shown in FIG. 1A, coding system 10 includes a source device 12 configured to provide encoded picture data 21 to a destination device 14, for example, for decoding the encoded picture data 13.
[0044] The source device 12 comprises an encoder 20, and may additionally, i.e. optionally, comprise a picture source 16, a pre-processor (or pre-processing unit) 18, for example a picture pre-processor 18, and a communication interface or unit 22.
[0045] Picture source 16 may include or be any kind of picture capture device, e.g., a camera that captures pictures of the real world, and / or any kind of picture generation device, e.g., a computer graphics processor that generates computer-animated pictures, or any kind of other device that acquires and / or provides real-world pictures, computer-generated pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). Picture source may be any kind of memory or storage that stores any of the above mentioned pictures.
[0046] To distinguish between the pre-processor 18 and the processing performed by the pre-processing unit 18 , the pictures or picture data 17 may also be referred to as raw pictures or raw picture data 17 .
[0047] The pre-processor 18 is configured to receive the (raw) picture data 17 and to perform pre-processing on the picture data 17 to obtain a pre-processed picture 19 or pre-processed picture data 19. The pre-processing performed by the pre-processor 18 may include, for example, cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or noise removal. It may be understood that the pre-processing unit 18 may be an optional component.
[0048] A video encoder 20 is configured to receive pre-processed picture data 19 and to provide encoded picture data 21 (further details are described below, eg with reference to FIG. 2).
[0049] The communications interface 22 of the source device 12 may be configured to receive the encoded picture data 21 via the communications channel 13 and to transmit the encoded picture data 21 (or any further processed version thereof) to another device, such as a destination device 14 or any other device, for storage or direct reconstruction.
[0050] The destination device 14 comprises a decoder 30 (eg, a video decoder 30), and may additionally, i.e. optionally, comprise a communications interface or unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.
[0051] The communications interface 28 of the destination device 14 is configured to receive encoded picture data 21 (or any further processed version thereof), for example directly from the source device 12 or from any other source, for example a storage device, for example an encoded picture data storage device, and to provide the encoded picture data 21 to a decoder 30.
[0052] The communications interface 22 and the communications interface 28 may be configured to transmit or receive the encoded picture data 21 or the encoded data 13 between the source device 12 and the destination device 14 via a direct communications link, e.g., a direct wired or wireless connection, or via any type of network, e.g., a wired or wireless network or any combination thereof, or any type of private and public network or any combination thereof.
[0053] The communications interface 22 may be configured, for example, to package the encoded picture data 21 into a suitable format, for example into packets, and / or to process the encoded picture data using any type of transmission encoding or processing for transmission over a communications link or network.
[0054] The communications interface 28, which is the counterpart of the communications interface 22, may be configured, for example, to receive the transmitted data and process the transmitted data using any type of corresponding transmission decoding or processing and / or depackaging to obtain the encoded picture data 21.
[0055] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrow of communication channel 13 pointing from source device 12 to destination device 14 in FIG. 1A, or as bidirectional communication interfaces, e.g., configured to send and receive messages, e.g., set up connections, and confirm and exchange communications links and / or any other information related to data transmission, e.g., encoded picture data transmission.
[0056] The decoder 30 is configured to receive the encoded picture data 21 and provide decoded picture data 31 or decoded pictures 31 (further details are described below, e.g. with reference to Figure 3 or Figure 5).
[0057] The post-processor 32 of the destination device 14 is configured to post-process the decoded picture data 31 (also called reconstructed picture data), e.g. the decoded picture 31, to obtain post-processed picture data 33, e.g. the post-processed picture 33. The post-processing performed by the post-processing unit 32 may include, e.g. color format conversion (e.g. from YCbCr to RGB), color correction, cropping or resampling, or any other processing, for example with the purpose of preparing the decoded picture data 31 for, e.g., display by a display device 34.
[0058] A display device 34 of the destination device 14 is configured to receive the post-processed picture data 33 for displaying the picture, e.g., to a user or viewer. The display device 34 may be or include any type of display for presenting the reconstructed picture, e.g., 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 micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any type of other display.
[0059] 1A illustrates source device 12 and destination device 14 as separate devices, an embodiment of the device may include both or both of their functionality, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such an embodiment, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof.
[0060] As will be clear to those skilled in the art based on this description, the presence and (exact) division of functions of different units or functions within source device 12 and / or destination device 14, as shown in FIG. 1A, may vary depending on the actual device and application.
[0061] 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 via processing circuitry as shown in FIG. 1B, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, hardware, dedicated to video coding, or any combination thereof. The encoder 20 may be implemented via processing circuitry 46 to embody various modules described in connection with the encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented via processing circuitry 46 to embody various modules described in connection with the decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. The processing circuitry may be configured to perform various operations as described below. As shown in FIG. 5, if the technology is implemented partially in software, the device may store instructions for the software on a suitable non-transitory computer-readable storage medium and execute the instructions using one or more processors in hardware to realize the technology of the present disclosure. Either video encoder 20 and video decoder 30 may be integrated as part of a combined encoder / decoder (codec) within a single device, for example, as shown in FIG. 1B.
[0062] Source device 12 and destination device 14 may comprise any of a wide range of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, a mobile phone, a smart phone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video gaming console, a video streaming device (such as a content service server or a content delivery server), a broadcast receiver device, a broadcast transmitter device, etc., and may use no operating system or any type of operating system. In some cases, source device 12 and destination device 14 may be enabled for wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.
[0063] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the techniques of the present application may be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between an encoding device and a decoding device. In other examples, data may be retrieved from local memory, streamed over a network, etc. A video encoding device may encode and store data in memory, and / or a video decoding device may retrieve data from memory and decode it. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but simply encode data to memory and / or retrieve data from memory and decode it.
[0064] For ease of explanation, embodiments of the present application are described herein with reference to, for example, reference software for High Efficiency Video Coding (HEVC) or Versatile Video Coding (VVC), which are next-generation video coding standards developed by the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG) Joint Working Group on Video Coding (JCT-VC). Those skilled in the art will appreciate that embodiments of the present application are not limited to HEVC or VVC.
[0065] [Encoder and encoding method] FIG. 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the techniques of the present application. In the example of FIG. 2, the video encoder 20 includes an input 201 (or an input interface 201), a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, an entropy encoding unit 270, and an output 272 (or an output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a partitioning unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 shown in FIG. 2 may also be referred to as a hybrid video encoder, or a video encoder according to a hybrid video codec.
[0066] The residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 may be referred to as forming a forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may be referred to as forming a backward signal path of the video encoder 20. The backward signal path of the video encoder 20 corresponds to the signal path of the decoder (see the video decoder 30 of FIG. 3). The inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may also be referred to as forming a "built-in decoder" of the video encoder 20.
[0067] [Pictures and Picture Segmentation (Pictures and Blocks)] The encoder 20 may for example be configured to receive, via an input 201, a picture 17 (or picture data 17), for example a picture of a sequence of pictures forming a video or a video sequence. The received picture or picture data may be a preprocessed picture 19 (or preprocessed picture data 19). For the sake of brevity, reference is made in the following description to the picture 17. The picture 17 may also be referred to as the current picture or the picture to be coded (particularly in video coding, to distinguish the current picture from other pictures, for example previously encoded and / or decoded pictures of the same video sequence, i.e. a video sequence that also includes the current picture).
[0068] A (digital) picture is or can be considered as a two-dimensional array or matrix of samples with intensity values. The samples in the array can also be called picture elements (short for picture elements) or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. To represent color, typically three color components are used, i.e. a picture may be represented by or contain three sample arrays. In an RBG format or color space, a picture contains corresponding red, green, and blue sample arrays. However, in video coding, each pixel is typically represented in a luminance and chrominance format or color space, for example YCbCr, which includes a luminance component denoted Y (sometimes L is used instead) and two chrominance components denoted Cb and Cr. The luminance (or luma for short) component Y represents the brightness or intensity of a gray level (e.g., as in a grayscale picture), and the two chrominance (or chroma for short) components Cb and Cr represent the chromaticity or color information components. Thus, a picture in YCbCr format includes a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). A picture in RGB format may be converted or transformed into YCbCr format and vice versa, a process also known as color conversion or transformation. If the picture is monochrome, the picture may include only a luminance sample array. Thus, a picture may be, for example, an array of luma samples in monochrome format, or an array of luma samples and two corresponding arrays of chroma samples in 4:2:0, 4:2:2, and 4:4:4 color formats.
[0069] An embodiment of the video encoder 20 may comprise a picture partitioning unit (not shown in FIG. 2 ) configured to partition a picture 17 into multiple (typically non-overlapping) picture blocks 203. These blocks may also be referred to as root blocks, macroblocks (H.264 / AVC) or coding tree blocks (CTBs) or coding tree units (CTUs) (H.265 / HEVC and VVC). The picture partitioning unit may be configured to partition each picture into corresponding blocks using the same block size for all pictures of a video sequence and the corresponding grid defining the block size, or to vary the block size among pictures or subsets or groups of pictures.
[0070] In a further embodiment, the video encoder may be configured to directly receive block 203 of picture 17, e.g., one, some, or all of the blocks forming picture 17. Picture block 203 may also be referred to as a current picture block or a picture block to be coded.
[0071] Similar to the picture 17, here too the picture block 203 is or can be considered as a two-dimensional array or matrix of samples with intensity values (sample values), although with smaller dimensions than the picture 17. In other words, the block 203 may comprise, for example, one sample array (for example a luma array for a monochrome picture 17, or a luma or chroma array for a color picture), or three sample arrays (for example a luma and two chroma arrays for a color picture 17), or any other number and / or type of arrays depending on the applied color format. The number of samples in the horizontal and vertical directions (or axes) of the block 203 defines the size of the block 203. The block may thus be, for example, an M×N (M columns×N rows) array of samples, or an M×N array of transform coefficients.
[0072] The embodiment of video encoder 20 shown in FIG. 2 may be configured to encode picture 17 block-by-block, eg, encoding and prediction is performed for each block 203.
[0073] The embodiment of video encoder 20 shown in FIG. 2 may be further configured to partition and / or encode pictures by using slices (also referred to as video slices), where a picture may be partitioned or encoded using one or more slices (typically non-overlapping), each of which may include one or more blocks (e.g., CTUs) or one or more groups of blocks (e.g., tiles (H.265 / HEVC and VVC) or bricks (VVC).
[0074] The embodiment of video encoder 20 shown in FIG. 2 may be further configured to partition and / or encode a picture by using slice / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned or encoded using one or more slice / tile groups (typically non-overlapping), where each slice / tile group may, for example, include one or more blocks (e.g., CTUs) or one or more tiles, where each tile may, for example, be rectangular and include one or more blocks (e.g., CTUs), e.g., full or partial blocks.
[0075] [Residual calculation] The residual calculation unit 204 may be configured to calculate a residual block 205 (also referred to as residual 205) based on the picture block 203 and the prediction block 265 (further details regarding the prediction block 265 are provided later), for example, by subtracting sample values of the prediction block 265 from sample values of the picture block 203 on a sample-by-sample (pixel-by-pixel) basis to obtain the residual block 205 in the sample domain.
[0076] [conversion] The transform processing unit 206 may be configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in a transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and represent the residual block 205 in the transform domain.
[0077] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified for H.265 / HEVC. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by a certain factor. In order to preserve the norm of the residual block processed by the forward transform and the inverse transform, an additional scaling factor is applied as part of the transform process. The scaling factor is typically selected based on certain constraints, such as a scaling factor that is a power of two with respect to shift operations, a bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. For example, a certain scaling factor may be specified for the inverse transform, e.g., by the inverse transform processing unit 212 (and a corresponding inverse transform, e.g., by the inverse transform processing unit 312 in the video decoder 30), and a corresponding scaling factor for the forward transform, e.g., by the transform processing unit 206 in the encoder 20, may be specified accordingly.
[0078] An embodiment of video encoder 20 (respectively transformation processing unit 206) may be configured to encode or compress and then output transformation parameters, e.g., one or more types of transformation, e.g., directly or via entropy encoding unit 270, so that, for example, video decoder 30 may receive and use the transformation parameters for decoding.
[0079] [Quantization] The quantization unit 208 may be configured to quantize the transform coefficients 207, for example by applying scalar quantization or vector quantization, to obtain quantized coefficients 209. The quantized coefficients 209 may also be referred to as quantized transform coefficients 209 or quantized residual coefficients 209.
[0080] The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be rounded to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be changed by adjusting a quantization parameter (QP). For example, in the case of scalar quantization, different scaling may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The applicable quantization step sizes may be indicated by a quantization parameter (QP). The quantization parameter may be, for example, an index into a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to fine quantization (small quantization step size) and a large quantization parameter may correspond to coarse quantization (large quantization step size), or vice versa. Quantization may include a division by a quantization step size, and corresponding and / or dequantization by, for example, the inverse quantization unit 210 may include a multiplication by the quantization step size. An embodiment according to some standards, for example HEVC, may be configured to use a quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of an equation that includes a division. To restore the norm of the residual block, an additional scaling factor may be introduced in the quantization and dequantization, which may change due to the scaling used in the fixed-point approximation of the quantization step size and quantization parameter equations. In one exemplary implementation, the scaling of the inverse transform and dequantization may be combined. Alternatively, a customized quantization table may be used and signaled, for example, in the bitstream, from the encoder to the decoder. Quantization is a lossy operation, and the loss increases with increasing quantization step size.
[0081] An embodiment of video encoder 20 (respectively quantization unit 208) may be configured to encode and then output a quantization parameter (QP), e.g., directly or via entropy encoding unit 270, such that, for example, video decoder 30 may receive and apply the quantization parameter for decoding.
[0082] [Dequantization] Inverse quantization unit 210 is configured to apply the inverse quantization of quantization unit 208 to the quantized coefficients, e.g., by applying the inverse of the quantization scheme applied by quantization unit 208 based on or using the same quantization step size as quantization unit 208, to obtain dequantized coefficients 211. The dequantized coefficients 211, which may also be referred to as dequantized residual coefficients 211, correspond to the transform coefficients 207, although they are typically not identical to the transform coefficients due to losses due to quantization.
[0083] [Inverse Transformation] The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) or other inverse transform, to obtain a reconstructed residual block 213 (or corresponding dequantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 213.
[0084] [Rebuild] The reconstruction unit 214 (e.g., an adder or summator 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, for example, by adding, sample by sample, sample values of the reconstructed residual block 213 and sample values of the prediction block 265 to obtain a reconstructed block 215 in the sample domain.
[0085] [filtering] The loop filter unit 220 (or "loop filter" 220 for short) is configured to filter the reconstruction block 215 to obtain a filtered block 221, or in general, to filter the reconstruction samples to obtain filtered sample values. The loop filter unit is configured to, for example, smooth pixel transitions or otherwise improve video quality. The loop filter unit 220 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, such as an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In one example, the loop filter unit 220 may include a deblocking filter, an SAO filter, and an ALF filter. The order of the filtering process may be deblocking filter, SAO, and ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., adaptive in-loop reshaper) is added. This process is performed before deblocking. In another example, deblocking filtering may also be applied to interior sub-block edges, such as affine sub-block edges, ATMVP sub-block edges, sub-block transform (SBT) edges, and intra-sub-partition (ISP) edges. Although loop filter unit 220 is illustrated in FIG. 2 as being an in-loop filter, in other configurations, loop filter unit 220 may be implemented as a post-loop filter. Filtered block 221 may also be referred to as filtered reconstruction block 221.
[0086] An embodiment of video encoder 20 (respectively loop filter unit 220) may be configured to encode and then output loop filter parameters (such as SAO filter parameters or ALF filter parameters or LMCS parameters), e.g., directly or via entropy encoding unit 270, so that, for example, decoder 30 may receive and apply the same loop filter parameters or the respective loop filters for decoding.
[0087] [Decoded picture buffer] The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures, or reference picture data in general, for encoding video data by the video encoder 20. The DPB 230 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous dynamic random access memory (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may be further configured to store other previously filtered blocks, e.g., previously reconstructed and filtered blocks 221, of the same current picture or different pictures, e.g., previously reconstructed pictures, and / or may provide a previously reconstructed, i.e., decoded, complete picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples), e.g., for inter prediction. The decoded picture buffer (DPB) 230 may be configured to store, for example, one or more unfiltered reconstructed blocks 215 if the reconstructed blocks 215 have not been filtered by the loop filter unit 220, or in general, unfiltered reconstructed samples, or any other further processed version of the reconstructed blocks or samples.
[0088] [Mode Selection (Segmentation and Prediction)] The mode selection unit 260 comprises a partitioning unit 262, an inter prediction unit 244 and an intra prediction unit 254, and is configured to receive or obtain original picture data, e.g., original block 203 (current block 203 of current picture 17), and reconstructed picture data, e.g., filtered and / or unfiltered reconstructed samples or blocks of the same (current) picture and / or from one or more previously decoded pictures, e.g., from the decoded picture buffer 230 or other buffers (e.g., line buffers, not shown). The reconstructed picture data is used as reference picture data for prediction, e.g., inter prediction or intra prediction, to obtain a prediction block 265 or predictor 265.
[0089] 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 a current block prediction mode (not including partitioning) and generate a corresponding prediction block 265, which is used for the calculation of the residual block 205 and for the reconstruction of the reconstruction block 215.
[0090] An embodiment of the mode selection unit 260 may be configured to select a partitioning and prediction mode (e.g., from those supported by or available to the mode selection unit 260) that provides the best match, or in other words, the smallest residual (smallest residual means better compression rate for transmission or storage), or the smallest signaling overhead (smallest signaling overhead means better compression rate for transmission or storage), or a consideration or balance of both. The mode selection unit 260 may be configured to determine the partitioning and prediction mode based on rate-distortion optimization (RDO), i.e., to select the prediction mode that provides the smallest rate-distortion. Terms such as "best", "minimum", "optimum", etc. in this context do not necessarily refer to the overall "best", "minimum", "optimum", etc., but may refer to the achievement of a termination or selection criterion, such as a value that exceeds or falls below a threshold or other constraint, potentially leading to a "suboptimal selection", but reducing complexity and processing time.
[0091] In other words, the partitioning unit 262 may be configured to partition a picture from a video sequence into a series of coding tree units (CTUs), which may be further partitioned into smaller block partitions or sub-blocks (which also form blocks), e.g., using quad-tree partitioning (QT), binary partitioning (BT), or triple-tree partitioning (TT), or any combination thereof, and may be configured to perform prediction for each of the block partitions or sub-blocks, e.g., where mode selection includes selecting a tree structure of the partitioned block 203, and a prediction mode is applied to each of the block partitions or sub-blocks.
[0092] The partitioning (eg, by partitioning unit 260) and prediction processes (by inter prediction unit 244 and intra prediction unit 254) performed by exemplary video encoder 20 are described in more detail below.
[0093] [Differentiation] The partitioning unit 262 may be configured to partition a picture from a video sequence into a series of coding tree units (CTUs), and the partitioning unit 262 may partition (or split) the coding tree units (CTUs) 203 into smaller partitions, e.g., smaller blocks of square or rectangular size. For a picture with three sample arrays, a CTU consists of an N×N block of luma samples along with two corresponding blocks of chroma samples. The maximum allowed size of a luma block in a CTU is specified as 128×128 in the developing Versatile Video Coding (VVC), but may be specified as a value other than 128×128, e.g., 256×256 in the future. The CTUs of a picture may be clustered / grouped as slice / tile groups, tiles, or bricks. A tile covers a rectangular area of a picture, and a tile can be divided into one or more bricks. A brick consists of a number of CTU rows within a tile. A tile that is not partitioned into multiple bricks can be referred to as a brick. However, a brick is a true subset of a tile and is not referred to as a tile. There are two modes of tile groups supported in VVC: raster scan slice / tile group mode and rectangular slice mode. In raster scan tile group mode, a slice / tile group contains a set of tiles in a tile raster scan of a picture. In rectangular slice mode, a slice contains a number of bricks of a picture that together form a rectangular region of the picture. The bricks within a rectangular slice are in the order of the brick raster scan of the slice. These smaller blocks (which may also be referred to as sub-blocks) may be further partitioned into even smaller partitions.This is also referred to as tree partitioning or hierarchical tree partitioning, where a root block, for example at root tree level 0 (hierarchical level 0, depth 0), may be recursively partitioned, for example, into two or more blocks at the next lower tree level, for example, into nodes at tree level 1 (hierarchical level 1, depth 1), which may be partitioned again into two or more blocks at the next lower level, for example, tree level 2 (hierarchical level 2, depth 2), and so on, until the partitioning is terminated, for example, because a termination criterion is reached, for example, because a maximum tree depth or a minimum block size is reached. Blocks that are not further partitioned are also referred to as leaf blocks or leaf nodes of the tree. A tree using a partitioning into two partitions is referred to as a binary tree (BT), a tree using a partitioning into three partitions is referred to as a ternary tree (TT), and a tree using a partitioning into four partitions is referred to as a quad tree (QT).
[0094] For example, a coding tree unit (CTU) may be or include a CTB of luma samples of a picture having three sample arrays, two corresponding CTBs of chroma samples, or a CTB of a monochrome picture or a picture coded with three separate color planes and syntax structures used to code the samples. Correspondingly, a coding tree block (CTB) may be an N×N block of samples for some value of N such that the division of components into CTBs is partitioning. A coding unit (CU) may be or include a coding block of luma samples, two corresponding coding blocks of chroma samples of a picture having three sample arrays, or a coding block of samples of a monochrome picture or a picture coded with three separate color planes and syntax structures used to code the samples. Correspondingly, a coding block (CB) may be an M×N block of samples for some value of M and N such that the division of a CTB into coding blocks is partitioning.
[0095] For example, in an embodiment according to HEVC, a coding tree unit (CTU) may be divided into CUs by using a quad-tree structure, denoted as a coding tree. The decision of whether to code a picture area using inter-picture (temporal) prediction or intra-picture (spatial) prediction is made at the leaf CU level. Each leaf CU may be further divided into one, two, or four PUs according to the partition type of the PU. Inside one PU, the same prediction process is applied, and related information is sent to the decoder on a PU basis. After obtaining the residual block by applying the prediction process based on the partition type of the PU, the leaf CU may be partitioned into transform units (TUs) according to another quad-tree structure similar to the coding tree for CUs.
[0096] In an embodiment, for example, according to the latest video coding standard currently under development, called Versatile Video Coding (VVC), a combined quad tree nested multi-type tree, for example, using binary and ternary split segmentation structure used to partition the coding tree unit. In the coding tree structure in the coding tree unit, the CU can be either square or rectangular. For example, the coding tree unit (CTU) is first partitioned by a quaternary tree. Then, the quaternary tree leaf node can be further partitioned by a multi-type tree structure. There are four partition types in the multi-type tree structure, namely, vertical binary split (SPLIT_BT_VER), horizontal binary split (SPLIT_BT_HOR), vertical ternary split (SPLIT_TT_VER) and horizontal ternary split (SPLIT_TT_HOR). The multi-type tree leaf node is called a coding unit (CU), and this segmentation is used for prediction and transformation process without any further partitioning, as long as the CU is not too large for the maximum transform length. This means that in most cases, CU, PU, and TU have the same block size in the quad-tree with nested multi-type tree coding block structure. An exception occurs when the maximum supported transform length is smaller than the width or height of the color components of the CU. VVC deploys its own signaling mechanism for partition division information in the quad-tree with nested multi-type tree coding tree structure. In the signaling mechanism, the coding tree unit (CTU) is treated as the root of the quaternary tree and is first partitioned by the quaternary tree structure. Then, each quaternary tree leaf node is further partitioned by the multi-type tree structure (when it is large enough to allow it).In the multi-type tree structure, a first flag (mtt_split_cu_flag) is signaled to indicate whether a node is further partitioned, and when the node is further partitioned, a second flag (mtt_split_cu_vertical_flag) is signaled to indicate the split direction, and then a third flag (mtt_split_cu_binary_flag) is signaled to indicate whether the split is binary or ternary. Based on the values of mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, the multi-type tree split mode (MttSplitMode) of the CU can be derived by the decoder based on a predefined rule or table. It should be noted that in a particular design, for example, a 64×64 luma block and 32×32 chroma pipeline design in a VVC hardware decoder, TT split is prohibited when either the width or height of the luma coding block is greater than 64, as shown in FIG. 6. TT splitting is also prohibited when either the width or height of a chroma coding block is greater than 32. The pipeline design splits a picture into Virtual Pipeline Data Units (VPDUs), which are defined as non-overlapping units in a picture. In a hardware decoder, consecutive VPDUs are processed simultaneously by multiple pipeline stages. It is important to keep the VPDU size small, since the VPDU size is roughly proportional to the buffer size in most pipeline stages. In most hardware decoders, the VPDU size may be set to the maximum transform block (TB) size. However, in VVC, ternary tree (TT) and binary tree (BT) partitioning may lead to an increase in the VPDU size. In addition, it should be noted that if any part of a tree node block exceeds the bottom or right picture boundary, the tree node block is forced to be split until all samples of every coded CU are located within the picture boundary.
[0097] As an example, an intra sub-partitioning (ISP) tool may divide a luma intra prediction block vertically or horizontally into two or four sub-partitions, depending on the block size.
[0098] In one example, mode selection unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.
[0099] As described above, video encoder 20 may be configured to determine or select a best or optimal prediction mode from a (e.g., pre-determined) set of prediction modes, which may include, for example, intra-prediction modes and / or inter-prediction modes.
[0100] [Intra prediction] The set of intra prediction modes may include 35 different intra prediction modes, such as non-directional modes such as DC (or mean) mode and planar mode, or directional modes, such as defined in HEVC, or 67 different intra prediction modes, such as non-directional modes such as DC (or mean) mode and planar mode, or directional modes, such as defined in VVC. As an example, some conventional angle intra prediction modes are adaptively replaced with wide angle intra prediction modes for non-square blocks, such as defined in VVC. As another example, to avoid division operations for DC prediction, only the long side is used to calculate the average for non-square blocks. And the result of intra prediction of planar mode may be further modified by position-dependent intra prediction combining (PDPC) method.
[0101] The intra prediction unit 254 is configured to generate an intra prediction block 265 according to an intra prediction mode from a set of intra prediction modes using reconstructed samples of neighboring blocks of the same current picture.
[0102] The intra prediction unit 254 (or generally, the mode selection unit 260) is further configured to output intra prediction parameters (or generally, information indicating the selected intra prediction mode for the block) to the entropy encoding unit 270 in the form of a syntax element 266 to be included in the encoded picture data 21, so that, for example, the video decoder 30 may receive and use the prediction parameters for decoding.
[0103] [Inter prediction] The set of inter prediction modes (or possible inter prediction modes) depends on the available reference pictures (i.e., previous, at least partially decoded pictures, e.g., stored in DBP 230) and other inter prediction parameters, such as whether the entire reference picture or only a portion of the reference picture, e.g., a search window area around the area of the current block, was used to search for the best matching reference block, and / or whether pixel interpolation, e.g., half / semi-pel, quarter-pel and / or 1 / 16-pel interpolation, was applied.
[0104] In addition to the above prediction modes, a skip mode and a direct mode may be applied.
[0105] The inter prediction unit 244 may comprise a motion estimation (ME) unit and a motion compensation (MC) unit (both not shown in FIG. 2). The motion estimation unit may be configured to receive or obtain a picture block 203 (current picture block 203 of current picture 17) and a decoded picture 231, or at least one or more previously reconstructed blocks, such as reconstructed blocks of one or more other / different previously decoded pictures 231, for motion estimation. For example, a video sequence may include the current picture and the previously decoded picture 231, or in other words, the current picture and the previously decoded picture 231 may be part of or form a series of pictures forming a video sequence.
[0106] The encoder 20 may be configured to, for example, select a reference block from multiple reference blocks of the same or different pictures among multiple other pictures, and provide the reference picture (or reference picture index) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current block as an inter prediction parameter to the motion estimation unit, which offset is also called a motion vector (MV).
[0107] The motion compensation unit is configured to obtain, e.g., receive, inter prediction parameters, and perform inter prediction based on or using the inter prediction parameters to obtain an inter prediction block 265. The motion compensation performed by the motion compensation unit may involve fetching or generating a prediction block based on a motion / block vector determined by motion estimation, possibly performing interpolation up to sub-pixel accuracy. Interpolation filtering may generate additional pixel samples from known pixel samples, thus potentially increasing the number of candidate prediction blocks that can be used to code the picture block. Upon receiving a motion vector for the PU of the current picture block, the motion compensation unit may locate the prediction block to which the motion vector points in one of the reference picture lists.
[0108] The motion compensation unit may generate syntax elements associated with blocks and video slices for use by video decoder 30 in decoding picture blocks of the video slices. In addition to, or as an alternative to, slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be generated or used.
[0109] [Entropy coding] The entropy encoding unit 270 is configured to, for example, apply an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context-adaptive VLC scheme (CAVLC), an arithmetic coding scheme, binarization, context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy encoding method or technique), or bypass (no compression), to the quantization coefficients 209, the inter-prediction parameters, the intra-prediction parameters, the loop filter parameters, and / or other syntax elements to obtain encoded picture data 21 that can be output via output 272, for example in the form of an encoded bitstream 21, so that, for example, the video decoder 30 may receive and use the parameters for decoding. The encoded bitstream 21 may be transmitted to the video decoder 30 or stored in a memory for later transmission or retrieval by the video decoder 30.
[0110] Other structural variations of the video encoder 20 may be used to encode the video stream. For example, a non-transform-based encoder 20 may quantize the residual signal directly without using the transform processing unit 206 for a particular block or frame. In another implementation, the encoder 20 may have the quantization unit 208 and the inverse quantization unit 210 combined into a single unit.
[0111] [Decoder and decoding method] 3 illustrates an example of a video decoder 30 configured to implement the techniques of the present application. The video decoder 30 is configured to receive encoded picture data 21 (e.g., encoded bitstream 21), e.g., encoded by encoder 20, to obtain a decoded picture 331. The encoded picture data or bitstream includes information for decoding the encoded picture data, e.g., data representing picture blocks and associated syntax elements of an encoded video slice (and / or tile group or tile).
[0112] 3, the decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., summer 314), a loop filter 320, a decoded picture buffer (DBP) 330, a mode application unit 360, an inter prediction unit 344, and an intra prediction unit 354. The inter prediction unit 344 may be or include a motion compensation unit. The video decoder 30 may, in some examples, perform a generally inverse decoding path relative to the encoding path described with respect to the video encoder 100 of FIG. 2.
[0113] As described with respect to the encoder 20, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 344, and the intra prediction unit 354 are also referred to as forming a "built-in decoder" of the video encoder 20. Thus, the inverse quantization unit 310 may be functionally identical to the inverse quantization unit 110, the inverse transform processing unit 312 may be functionally identical to the inverse transform 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 decoded picture buffer 330 may be functionally identical to the decoded picture buffer 230. Thus, the descriptions provided for the respective units and functions of the video encoder 20 correspondingly apply to the respective units and functions of the video decoder 30.
[0114] [Entropy Decoding] The entropy decoding unit 304 is configured to parse the bitstream 21 (or the encoded picture data 21 in general) and, for example, perform entropy decoding on the encoded picture data 21 to obtain, for example, quantization coefficients 309 and / or decoded coding parameters (not shown in FIG. 3), for example, any or all of inter prediction parameters (e.g., reference picture indexes and motion vectors), intra prediction parameters (e.g., intra prediction modes or indices), transform parameters, quantization parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to the encoding schemes described with respect to the entropy encoding unit 270 of the encoder 20. The entropy decoding unit 304 may further be configured to provide the inter prediction parameters, intra prediction parameters, and / or other syntax elements to the mode application unit 360 and other parameters to other units of the decoder 30. Video decoder 30 may receive syntax elements at a video slice level and / or at a video block level. In addition to or in the alternative to slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be received and / or used.
[0115] [Dequantization] Inverse quantization unit 310 may be configured to receive (e.g., by parsing and / or decoding, e.g., by entropy decoding unit 304) a quantization parameter (QP) (or information related to inverse quantization in general) and quantized coefficients from encoded picture data 21, and to apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameter to obtain dequantized coefficients 311, which may also be referred to as transform coefficients 311. The inverse quantization process may involve use of a quantization parameter determined by video encoder 20 for each video block within a video slice (or tile or group of tiles) to determine the degree of quantization, and thus the degree of inverse quantization, to be applied.
[0116] [Inverse Transformation] The inverse transform processing unit 312 may be configured to receive the dequantized coefficients 311, also referred to as transform coefficients 311, and to apply a transform to the dequantized coefficients 311 to obtain the reconstructed residual block 213 in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 313. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may be further configured to receive transform parameters or corresponding information from the encoded picture data 21 (e.g., by parsing and / or decoding, e.g., by the entropy decoding unit 304) and determine a transform to be applied to the dequantized coefficients 311.
[0117] [Rebuild] The reconstruction unit 314 (e.g., an adder or summator 314) may be configured to add the reconstructed residual block 313 to the prediction block 365, for example by adding sample values of the reconstructed residual block 313 and sample values of the prediction block 365, to obtain a reconstructed block 315 in the sample domain.
[0118] [filtering] The loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter the reconstruction block 315 to obtain a filtered block 321, for example, to smooth pixel transitions or otherwise improve video quality. The loop filter unit 320 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, for example, an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In one example, the loop filter unit 220 may include a deblocking filter, an SAO filter, and an ALF filter. The order of the filtering process may be a deblocking filter, an SAO, and an ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., adaptive in-loop reshaper) is added. This process is performed before deblocking. In another example, deblocking filtering may also be applied to interior sub-block edges, such as affine sub-block edges, ATMVP sub-block edges, sub-block transform (SBT) edges, and intra-sub-partition (ISP) edges. Although loop filter unit 320 is illustrated in FIG. 3 as being an in-loop filter, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.
[0119] [Decoded picture buffer] The decoded video blocks 321 of the picture are then stored in a decoded picture buffer 330, which stores the decoded picture 331 as a reference picture for subsequent motion compensation of other pictures and / or for output display, respectively.
[0120] The decoder 30 is arranged to output the decoded pictures 311 for presentation or viewing to a user, for example via an output 312.
[0121] [prediction] The inter prediction unit 344 may be identical to the inter prediction unit 244 (in particular the motion compensation unit), and the intra prediction unit 354 may be functionally identical to the inter prediction unit 254, performing the partitioning or partitioning decision and prediction based on partitioning and / or prediction parameters or respective information received (e.g. by parsing and / or decoding, e.g. by the entropy decoding unit 304) from the encoded picture data 21. The mode application unit 360 may be configured to perform prediction (intra or inter prediction) for each block based on the reconstructed picture, block, or respective samples (filtered or unfiltered) to obtain a prediction block 365.
[0122] If the video slice is coded as an intra-coded (I) slice, the intra prediction unit 354 of the mode application unit 360 is configured to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra prediction mode and data from a previously decoded block of the current picture. If the video picture is coded as an inter-coded (i.e., B or P) slice, the inter prediction unit 344 (e.g., a motion compensation unit) of the mode application unit 360 is configured to generate a prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from the entropy decoding unit 304. In inter prediction, the prediction block may be generated from one of the reference pictures included in one of the reference picture lists. The video decoder 30 may construct the reference frame lists, List0 and List1, based on the reference pictures stored in the DPB 330 using a default construction technique. The same or similar may apply to or with embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices). For example, video may be coded using I, P, or B tile groups and / or tiles.
[0123] Mode application unit 360 is configured to determine prediction information for video blocks of the current video slice by parsing motion vectors or related information and other syntax elements, and uses the prediction information to generate predictive blocks for the current video block being decoded. For example, mode application unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to code the video blocks of the video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), construction information regarding one or more of the reference picture lists for the slice, a motion vector for each inter encoded video block of the slice, an inter prediction status for each inter coded video block of the slice, and other information for decoding video blocks in the current video slice. The same or similar may apply for or with embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices). For example, video may be coded using I, P, or B tile groups and / or tiles.
[0124] The embodiment of video decoder 30 shown in FIG. 3 may be configured to partition and / or decode pictures by using slices (also referred to as video slices), where a picture may be partitioned or decoded using one or more slices (typically non-overlapping), each of which may include one or more blocks (e.g., CTUs) or one or more groups of blocks (e.g., tiles (H.265 / HEVC and VVC) or bricks (VVC)).
[0125] The embodiment of video decoder 30 shown in FIG. 3 may be configured to partition and / or decode a picture by using slice / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned or decoded using one or more slice / tile groups (typically non-overlapping), where each slice / tile group may include, for example, one or more blocks (e.g., CTUs) or one or more tiles, where each tile may be, for example, rectangular in shape and may include one or more blocks (e.g., CTUs), e.g., full or partial blocks.
[0126] Other variations of the video decoder 30 may be used to decode the encoded picture data 21. For example, the decoder 30 may generate the output video stream without using a loop filtering unit 320. For example, a non-transform-based decoder 30 may directly inverse quantize the residual signal without using an inverse transform processing unit 312 for a particular block or frame. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.
[0127] It should be understood that in the encoder 20 and the decoder 30, the processing result of the current step may be further processed and then output to the next step. For example, after the interpolation filtering, the motion vector derivation or the loop filtering, further operations such as clipping or shifting may be performed on the processing result of the interpolation filtering, the motion vector derivation or the loop filtering.
[0128] It should be noted that further operations may be applied to the derived motion vector of the current block (including but not limited to control point motion vectors in affine mode, sub-block motion vectors in affine, planar, ATMVP modes, temporal motion vectors, etc.). For example, the value of the motion vector is restricted to a predefined range according to its representation bit. If the representation bit of the motion vector is bitDepth, its range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponentiation. For example, if bitDepth is set equal to 16, its range is -32768 to 32767, and if bitDepth is set equal to 18, its range is -131072 to 131071. For example, the value of the derived motion vector (e.g., MVs of four 4x4 sub-blocks in one 8x8 block) is restricted such that the maximum difference between the integer parts of the four 4x4 sub-block MVs is equal to or less than N pixels, such as equal to or less than 1 pixel. Below, we provide two methods to constrain motion vectors according to bitDepth.
[0129] 4 is a schematic diagram of a video coding device 400 according to one embodiment of the present disclosure. The video coding device 400 is suitable for implementing the disclosed embodiments described herein. In one embodiment, the video coding device 400 may be a decoder, such as the video decoder 30 of FIG. 1A, or an encoder, such as the video encoder 20 of FIG. 1A.
[0130] Video coding device 400 comprises an ingress port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an egress port 450 (or output port 450) for transmitting data, and a memory 460 for storing data. Video coding device 400 may comprise optical / electrical (OE) and electrical / optical (EO) components coupled to the ingress port 410, the receiver unit 420, the transmitter unit 440, and the egress port 450 for the entry and exit of optical or electrical signals.
[0131] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGA, ASIC, and DSP. The processor 430 communicates with the ingress port 410, the receiver unit 420, the transmitter unit 440, the egress port 450, and the memory 460. The processor 430 comprises a coding module 470. The coding module 470 implements the disclosed embodiments described above. For example, the coding module 470 implements, processes, prepares, or provides various coding operations. Thus, the inclusion of the coding module 470 provides a significant improvement in the functionality of the video coding device 400 and results in the transformation of the video coding device 400 into different states. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0132] Memory 460 may comprise one or more disks, tape drives, and solid state drives, and may be used as an overflow data storage device to store programs when such programs are selected for execution and to store 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).
[0133] FIG. 5 is a simplified block diagram of an apparatus 500 that may be used as either or both of the source device 12 and the destination device 14 from FIG. 1A in accordance with an example embodiment.
[0134] The processor 502 in the device 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of device, or multiple devices, now existing or later developed, capable of manipulating or processing information. Although the disclosed implementations may be implemented with a single processor as shown, such as the processor 502, benefits of speed and efficiency may be realized using more than one processor.
[0135] The memory 504 in the apparatus 500 may be, in one implementation, a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may be used as the memory 504. The memory 504 may comprise code and data 506 that is accessed by the processor 502 using a bus 512. The memory 504 may further comprise an operating system 508 and application programs 510, which include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1-N, which further include a video coding application that performs the methods described herein.
[0136] The apparatus 500 may also include one or more output devices, such as a display 518. The display 518, in one example, may be a touch-sensitive display that combines a display with a touch-sensitive element operable to detect touch input. The display 518 may be coupled to the processor 502 via the bus 512.
[0137] Although shown herein as a single bus, bus 512 of device 500 may be comprised of multiple buses. Additionally, secondary storage 514 may be directly coupled to other components of device 500 or may be accessible over a network, and may include a single integrated unit, such as a memory card, or multiple units, such as multiple memory cards. Thus, device 500 may be implemented in a wide variety of configurations.
[0138] Some relevant examples are below, please note that JVET meeting document JVET-N1002 is used as reference.
[0139] [I. Merge Prediction] The merge candidate list is constructed by including, in order, the following five types of candidates: 1) Spatial MVP from spatially neighboring CUs 2) Temporal MVP from co-located CU 3) History-based MVP from a FIFO table 4) Pairwise average MVP 5) Zero MV.
[0140] The size of the merge list is signaled in the slice header, and the maximum allowed size of the merge list is an integer, e.g., the number may be 6. For each CU code in the merge mode, the index of the best merge candidate is encoded. The generation process for each category of merge candidates is provided in this session.
[0141] [(1) Spatial candidate derivation] As an example, up to four merge candidates are selected from the candidates located at the positions shown in Fig. 6. The order of derivation is A0, B0, B1, A1 and B2. Position B2 is considered only if any CU at positions A0, B0, B1, A1 is unavailable (e.g., because it belongs to another slice or tile) or is intra-coded. After the candidate at position A1 is added, the addition of the remaining candidates is subjected to a redundancy check. This ensures that candidates with the same motion information are removed from the list. In a possible implementation, only the pairs linked by arrows in Fig. 7 are considered, and a candidate is only added to the list if the corresponding candidate used for the redundancy check does not have the same motion information.
[0142] [(2) Deriving time candidates] As an example, only one candidate is added to the list. In particular, in the derivation of this temporal merge candidate, a scaled motion vector is derived based on the co-located CU belonging to the co-located reference picture. The reference picture list to be used for the derivation of the co-located CU is explicitly signaled in the slice header. The scaled motion vector for the temporal merge candidate is obtained as shown by the dotted line in Figure 8, and is scaled from the motion vector of the co-located CU using POC distances tb and td, where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td is defined as the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merge candidate is set equal to zero.
[0143] It should be noted that POC (Picture Order Count) refers to a variable associated with each picture, which uniquely identifies the associated picture among all pictures in a CVS (Coded Video Sequence) and indicates the position of the associated picture in output order relative to the output order positions of other pictures in the same CVS that will be output from the decoded picture buffer, if the associated picture is to be output from the decoded picture buffer.
[0144] [(3) History-based merge candidate derivation] History-based MVP (HMVP) merge candidates are added to the merge list after spatial MVP and TMVP. The motion information of the previously coded block is saved in a table and used as the MVP for the current CU. The table with the HMVP candidates is maintained during the encoding / decoding process. The table is reset when a new CTU row is encountered. Whenever there is a non-subblock inter-coded CU, the associated motion information is added as a new HMVP candidate to the last entry in the table. The latest HMVP candidates in the table are checked in order and inserted into the candidate list after the TMVP candidate. A redundancy check is applied from the HMVP candidates to the spatial or temporal merge candidates.
[0145] [(4) Pairwise average merging candidate derivation] The pairwise average candidate is generated by averaging predefined pairs of candidates in the existing merge candidate list, where the predefined pairs are defined as {(0,1),(0,2),(1,2),(0,3),(1,3),(2,3)}, for example, the numbers indicate the merge index into the merge candidate list. The averaged motion vector is calculated separately for each reference list. If both motion vectors are available in one list, these two motion vectors are averaged even when they point to different reference pictures. If only one motion vector is available, use it directly. If no motion vector is available, keep this list invalid.
[0146] (5) If the merge list is not full after the pairwise average merge candidates are added, MVPs with zeros are inserted at the end until the maximum number of merge candidates is encountered.
[0147] [II. Bi-prediction] Inter-picture prediction exploits the temporal correlation between pictures to derive a motion compensated prediction (MCP) for a block of image samples. For each block, a corresponding block in a previously decoded picture can be found, which serves as a predictor. The position of the block in the previously decoded picture is indicated by a motion vector (Δx, Δy), where Δx specifies the horizontal displacement and Δy specifies the vertical displacement relative to the position of the current block. The motion vector (Δx, Δy) can be of fractional sample accuracy to capture the motion of the underlying object more accurately. If the corresponding motion vector has fractional sample accuracy, an interpolation is applied to the reference picture to derive a prediction signal. The previously decoded picture is called the reference picture and is indicated by a reference index Δt into the reference picture list.
[0148] In the case of bi-prediction (compared to uni-prediction using one set of motion data), two sets of motion data (Δx0, Δy0, Δt0 and Δx1, Δy1, Δt1) are used to generate two MCPs (which can be from different pictures or the same picture), which are then combined to obtain the final MCP. Generally, this is derived by averaging. In the case of weighted prediction, different weights can be applied to each MCP. The reference pictures that can be used for bi-prediction are stored in two separate lists, namely list0 and list1.
[0149] [III. Motion Information Preservation] After motion compensation is performed, the (uni- or bi-predictive) motion information associated with the prediction block is stored in memory, which is used as reference information for future blocks (CU / PU) by spatial or temporal motion vector prediction, etc.
[0150] In some examples, the motion information storage is performed using a two-dimensional array of motion information sub-blocks or motion information storage units. The spatial resolution of the two-dimensional array may be different from the spatial resolution of the image to be coded. In one example, a lower resolution motion information storage unit is used to save memory space. For example, a 16×16 luma sample corresponds to a single motion information storage unit, which means that each sample in the 16×16 luma sample has the same motion information, and the same motion information is stored in the single motion information storage unit corresponding to the 16×16 luma sample. In other words, the motion information storage unit includes inter-picture prediction information of the associated prediction block, which is made of 16×16 luma samples.
[0151] Also, note that 16x16 luma samples refers to a set of luma samples that is a two-dimensional sample array, and both the width and height of the two-dimensional sample array are 16. A single motion information storage unit may correspond to 8x8 luma samples, 4x4 luma samples, or other NxM luma or chroma samples, where N and M are positive integers. It can also be understood that a smaller size of the motion information storage unit allows better motion vector prediction, but requires more memory space. A motion vector storage for a prediction block of luma samples with a size of 8x8 is illustrated in Figure 9. The motion information of the prediction block labeled Mv0 is stored in each 2x2 motion vector storage unit.
[0152] [III. Triangle Partitioning for Inter Prediction] As an example, the triangular partitioning mode is only applied to CUs that are 8×8 or larger and coded in skip or merge mode. An ACU level flag is signaled to indicate whether the triangular partitioning mode is applied or not.
[0153] A CU in triangular partition mode is divided equally into two triangular partitions using either diagonal or anti-diagonal partitions (FIG. 10). Each triangular partition in a CU is inter-predicted using its own motion. Only uni-prediction is allowed for each partition. That is, each partition has one motion vector and one reference index. The uni-prediction motion constraint is applied to ensure that only two motion compensation predictions are needed for each CU, just like in traditional bi-prediction. The uni-prediction motion for each partition is directly derived from the merge candidate list constructed for merge prediction described above, and the selection of the uni-prediction motion from a given merge candidate in the list follows the procedure of "uni-prediction candidate list construction". After predicting each of the triangular partitions, the sample values along the diagonal or anti-diagonal edges are adjusted using a blending process with adaptive weights. Finally, the motion field of the CU predicted using the triangular partition mode is saved.
[0154] [(1) Constructing a list of candidates for one-sided prediction] As an example in Figure 11, given a merge candidate index, a uni-predictive motion vector is derived from the merge candidate list constructed for merge prediction described above. For a candidate in the list, its LX motion vector (X is equal to the parity of the merge candidate index value) is used as the uni-predictive motion vector for the triangular partition mode. These motion vectors are indicated by "x" in Figure 11. If there is no corresponding LX motion vector, the L(1-X) motion vector of the same candidate in the merge prediction candidate list is used as the uni-predictive motion vector for the triangular partition mode.
[0155] [(2) Blending along triangulation edges] After predicting each triangle partition using its own motion, blending is applied to the two prediction signals to derive samples around the diagonal or anti-diagonal edges. As shown in Figure 12, the following weights are used in the blending process: {7 / 8, 6 / 8, 5 / 8, 4 / 8, 3 / 8, 2 / 8, 1 / 8} for luma and {6 / 8, 4 / 8, 2 / 8} for chroma.
[0156] [(3) Motion field preservation] As an example, the motion vector of a CU coded in triangular partition mode is stored in a 4x4 unit. Depending on the position of each 4x4 unit, either uni-predictive or bi-predictive motion vectors are stored. Mv1 and Mv2 are shown as uni-predictive motion vectors for partition 1 and partition 2, respectively. If a 4x4 unit is located in a non-weighted area shown in the example of Figure 12, either Mv1 or Mv2 is stored for that 4x4 unit. Otherwise (if the 4x4 unit is located in a weighted area), a bi-predictive motion vector is stored. The bi-predictive motion vector is derived from Mv1 and Mv2 according to the following process. 1) If Mv1 and Mv2 are from different reference picture lists (one from L0 and the other from L1), then Mv1 and Mv2 are simply combined to form a bi-predictive motion vector. 2) Otherwise, if Mv1 and Mv2 are from the same list, then without loss of generality, they are assumed to both be from L0. In this case, If any reference picture of Mv2 (or Mv1) appears in L1, Mv2 (or Mv1) is converted to an L1 motion vector using that reference picture in L1. Then, the two motion vectors are combined to form a bi-predictive motion vector. Otherwise, only the uni-predictive motion Mv1 is preserved instead of the bi-predictive motion.
[0157] As another example, motion vector preservation for triangulation mode is illustrated in FIG.
[0158] [IV. Geometric Partitioning for Interblocks] For the triangular partition mode, two sub-blocks are divided by a partition line, and the direction of the partition line is 45 degrees or 135 degrees. Other partition angles and partition ratios are also possible, as shown in Fig. 14, for example, which are referred to as GEO (geometric partition) modes in this application.
[0159] In one example, the total number of GEO partitions can be 140. This number has been found to be optimal in terms of the balance between flexibility and bit cost. Additional signaling for GEO requires signaling for the angle α and the offset ρ of the separation line with respect to the center of the block. α represents a quantized angle between 0 and 360 degrees with a separation of 11.25 degrees, and ρ represents a distance with five different values. The meaning of α and ρ is illustrated in FIG. 15.
[0160] It can be understood that in the technical field of video coding, generally, the prediction process performed at the encoder side is similar to the prediction process performed at the decoder side, except that at the decoder side, side information is parsed from the bitstream, and the side information is determined by a pre-set rule, similar to the rate-distortion optimization (RDO) method. As an example, to obtain a prediction sample in GEO mode at the decoder side, the following steps are applied:
[0161] S101: Determine the partition ratio for the current block.
[0162] The element syntax geo_partition_idx is parsed from the bitstream and is used as an index into a lookup table that stores the α and ρ pairs. In one example, α and ρ are represented by angle and distance indices, respectively.
[0163] S102: Obtain a first prediction mode for a first sub-block and a second prediction mode for a second sub-block.
[0164] In general, the same merge list derivation process used for the triangular partition mode is used to derive motion vectors for each partition (sub-block) of a GEO block. Each partition is predicted by only one prediction. Two element syntaxes geo_merge_idx0 and geo_merge_idx1 are parsed from the bitstream to indicate the prediction modes of the two sub-blocks, respectively.
[0165] In one example, the first prediction mode is not the same as the second prediction mode. In one example, the prediction mode (the first prediction mode or the second prediction mode) may be an inter prediction mode, and the information for the inter prediction mode may include a reference picture index and a motion vector. In another example, the prediction mode may be an intra prediction mode, and the information for the intra prediction mode may include an intra prediction mode index.
[0166] S103: Generate a first predicted value for the first sub-block and a second predicted value for the second sub-block using the first prediction mode and the second prediction mode, respectively.
[0167] S104: Obtain a combination value of a predicted sample by combining the first predicted value and the second predicted value according to the division disclosed in S101.
[0168] As an example, more specifically, step S104 includes: S104-1: For luma samples in the current block, a sample distance (sample_dist) is calculated, where the sample distance represents the distance of the luma sample to the separation line of the current block determined in S101.
[0169] In one example, the sample distance sample_dist is calculated according to the following formula: sample_dist=((x<<1)+1)*Dis[angleIdx1]+((y<<1)+1))*Dis[angleIdx2]-offset(distanceIdx). ●angleIdx1 and angleIdx2 are obtained from the bitstream as angle indices in step S101, or derived based on other information obtained from the bitstream, for example derived based on the element syntax geo_partition_idx, and angleIdx1 and angleIdx2 represent the quantized triangular parameters of the separation line. ●x and y are the horizontal and vertical distances of the sample relative to the top-left sample of the current block. ●offset(distanceIdx) is a function of the index value (distanceIdx), which is obtained from the bitstream as a distance index in step S101, or is derived based on other information obtained from the bitstream, for example based on the element syntax geo_partition_idx. ●Dis[] is a predefined lookup table.
[0170] In another example, sample_dist and sampleWeight1 can be obtained according to the following formula: - nCbR=(W>H)?(W / H):(H / W) - sample_dist=(W>H)?(Clip3(0,8,(x / nCbR-y)+4)):(Clip3(0,8,(xy / nCbR)+4)), Or, sample_dist=(W>H)?(Clip3(0,8,(H-1-x / nCbR-y)+4)):(Clip3(0,8,(W-1-xy / nCbR)+4)). W is the width of the current block, and H is the height of the current block.
[0171] It should be noted that the above two examples show two calculation methods that follow integer arithmetic, and the embodiments of the present invention are not limited to these examples of calculating sample_dist.
[0172] In one example, sample_dist can be the orthogonal distance between the sample located at (x,y) and the separation line. In another example, create a horizontal or vertical line through the sample located at (x,y). The horizontal or vertical line has an intersection with the separation line. Sample_dist can be the distance between the sample located at (x,y) and the intersection.
[0173] S104-2: The blending operation is implemented as a function that takes sample_dist as input and takes sampleWeight1 or sampleWeight2 as output.
[0174] The sample_dist is used to calculate a weighting factor, which is used for a combined predicted value derived by combining the first predicted value and the second predicted value corresponding to the first sub-block and the second sub-block, respectively. In one example, the weighting factor is denoted as sampleWeight1 and sampleWeight2, referring to the weighting values corresponding to the first predicted value and the second predicted value, respectively. In one example, sampleWeight1 is calculated according to sample_dist, and sampleWeight2 is calculated according to the formula sampleWeight2=T-sampleWeight1, where T is a predefined constant. In one example, the predefined constant T is equal to 8, which means that sampleWeight1 and sampleWeight2 can have values within a value range of 0 to 8, inclusive. In another example, the predefined constant T is equal to 16.
[0175] According to one example, the first weighting factor sampleWeight1 is obtained according to sample_dist and a lookup table. In one example, the lookup table is used to store the filter coefficients. In other words, the blending operation is implemented according to the lookup table. In such an example, a function of sample_dist can be used as an index value for the lookup table. The function can be an implementation of division or multiplication with a constant operation, right shift with a quantitative operation, absolute value or clipping operation, or a combination thereof.
[0176] The blending operation is applied to the samples according to the value of the indication in the bitstream or to the samples according to the value of the indication in the bitstream.
[0177] In one example, sampleWeight1=Clip3(0,8,f(sample_dist)). The function f() can be an implementation of division / addition / multiplication with a constant operation, right shift with a quantitative operation, absolute value operation or clipping operation or a combination thereof.
[0178] In one example, sampleWeight1 (or sampleWeight2)=Clip3(0,8,sample_dist). In one example, sampleWeight1 (or sampleWeight2)=Clip3(0,8,sample_dist+4). In one example, sampleWeight1 (or sampleWeight2)=sample_dist==4?4:sample_dist<4?0:8. In one example, sampleWeight1 (or sampleWeight2)=Clip3(0,8,(sample_dist-4)*K+sample_dist). In one example, sampleWeight1 (or sampleWeight2)=sample_dist==0?4:sample_dist<0?0:8. In one example, sampleWeight1 (or sampleWeight2)=Clip3(0,8,sample_dist*K+Clip3(0,8,sample_dist+4)), where K is an integer greater than 0. Note that the blending operations become shorter (and therefore sharper) as K increases. For example, if K=4, then the second blending operation is the same as "sampleWeight=sample_dist==0?4:sample_dist<0?0:8" illustrated in FIG. 16. According to one example, the value of an indicator in the bitstream indicates the value of K.
[0179] In one example, the blending operation can be implemented as a lookup table, such as the table illustrated in Figure 17. In one example, sampleWeight can be obtained as geoFilter[idx], where idx is obtained as a function of sampleDist, and geoFilter is a one-dimensional linear array of filter weights. As an example, idx = min((abs(sample_dist) + 8) >> 4, maxIdx), where maxIdx is the maximum value that idx can take.
[0180] S105: According to the division disclosed in step S101 and according to the combining method disclosed in step S104, preserve prediction mode information of the current block (eg, motion information including motion vectors or intra prediction information).
[0181] Specifically, in a first embodiment of the decoding process for the GEO prediction mode, This process is invoked when decoding a coding unit with MergeTriangleFlag[xCb][yCb] equal to 1 or with geo_flag[xCb][yCb] equal to 1.
[0182] The inputs to this process are: - a luma position (xCb, yCb) that specifies the top-left sample of the current coding block relative to the top-left luma sample of the current picture; - the variable cbWidth, which specifies the width of the current coding block in luma samples; - a variable cbHeight that specifies the height of the current coding block in luma samples, - luma motion vectors mvA and mvB at 1 / 16 fractional sample accuracy, - chroma motion vectors mvCA and mvCB, - reference indices refIdxA and refIdxB, - Prediction list flags predListFlagA and predListFlagB.
[0183] The output of this process is: - predSamples, a (cbWidth) by (cbHeight) array of luma prediction samples L , - predSamples, a (cbWidth / 2) by (cbHeight / 2) array of chroma prediction samples for component Cb Cb , - predSamples, a (cbWidth / 2) by (cbHeight / 2) array of chroma prediction samples for component Cr Cr .
[0184] predSamplesLA L and predSamplesLB L Let predSamplesLA be a (cbWidth) × (cbHeight) array of predicted luma sample values. Cb , predSamplesLB Cb ,predSamplesLA Cr , and predSamplesLB Cr Let be a (cbWidth / 2) x (cbHeight / 2) array of predicted chroma sample values.
[0185] predSamples L , predSamples Cb , and predSamples Cr is derived by the following ordered steps:
[0186] 1. If N is each of A and B, then the following applies: - refPicLN, an ordered two-dimensional array of luma samples L and two ordered two-dimensional arrays of chroma samples, refPicLN Cb and refPicLN Cr A reference picture consisting of is derived with X set equal to predListFlagN and refIdxX set equal to refIdxN as input. - Array predSamplesLN L is the luma position (xCb, yCb), the luma coding block width sbWidth set equal to cbWidth, the luma coding block height sbHeight set equal to cbHeight, the motion vector offset mvOffset set equal to (0,0), the motion vector mvLX set equal to mvN, and refPicLN L The reference array refPicLX set equal to L , the variable bdofFlag which is set equal to FALSE, and the variable cIdx which is set equal to 0. - Array predSamplesLN Cb is the luma position (xCb, yCb), the coding block width sbWidth set equal to cbWidth / 2, the coding block height sbHeight set equal to cbHeight / 2, the motion vector offset mvOffset set equal to (0,0), the motion vector mvLX set equal to mvCN, and refPicLN Cb The reference array refPicLX set equal to Cb, the variable bdofFlag which is set equal to FALSE, and the variable cIdx which is set equal to 1 as input. - Array predSamplesLN Cr is the luma position (xCb, yCb), the coding block width sbWidth set equal to cbWidth / 2, the coding block height sbHeight set equal to cbHeight / 2, the motion vector offset mvOffset set equal to (0,0), the motion vector mvLX set equal to mvCN, and refPicLN Cr The reference array refPicLX set equal to Cr , the variable bdofFlag which is set equal to FALSE, and the variable cIdx which is set equal to 2 as input. 2. If geo_flag[xCb][yCb] is equal to 1, then the geometric partitioning related variables angleIdx and distanceIdx are set according to the value of geo_partitioning_idx[xCb][yCb] as specified in Table 1. The sample weight derivation process for geometric partitioning merge mode is called. The inputs to this process are three ordered arrays, sampleWeightL, sampleWeightC, and motionWeight, of sizes (cbWidth)×(cbHeight), (cbWidth / 2)×(cbHeight / 2), and (cbWidth / 4)×(cbHeight / 4), respectively, and the variables angleIdx, distanceIdx, cbWidth, and cbHeight. b. The predicted samples in the current luma coding block, i.e., predSamplesL[xL][yL], where xL=0..cbWidth-1 and yL=0..cbHeight-1, are derived by invoking the weighted sample prediction process for the geometric partitioning merge mode with inputs the coding block width nCbW set equal to cbWidth, the coding block height nCbH set equal to cbHeight, sample arrays predSamplesLAL, predSamplesLBL, predWeightL, and cIdx equal to 0. c. The predicted samples in the current chroma component Cb coding block, i.e., predSamplesCb[xC][yC], where xC=0..cbWidth / 2-1 and yC=0..cbHeight / 2-1, are derived by invoking the weighted sample prediction process for the geometric partitioning merge mode with inputs the coding block width nCbW set equal to cbWidth / 2, the coding block height nCbH set equal to cbHeight / 2, sample arrays predSamplesLACb, predSamplesLBCb, predWeightC, and cIdx equal to 1. d. The predicted samples in the current chroma component Cr coding block, i.e., predSamplesCr[xC][yC], where xC=0..cbWidth / 2-1 and yC=0..cbHeight / 2-1, are derived by invoking the weighted sample prediction process for the geometric partitioning merge mode with inputs the coding block width nCbW set equal to cbWidth / 2, the coding block height nCbH set equal to cbHeight / 2, the sample arrays predSamplesLACr, predSamplesLBCr, predWeightC, and cIdx equal to 2. e. The motion vector preservation process for geometric merge mode is called with inputs luma coding block position (xCb, yCb), luma coding block width cbWidth, luma coding block height cbHeight, sample array motionWeight, luma motion vectors mvA and mvB, reference indices refIdxA and refIdxB, and prediction list flags predListFlagA and predListFlagB.
[0187] [Reference Picture Mapping Process for Triangle Merge Mode] The inputs to this process are: a variable X whose reference list represents equal to 0 or 1; - Reference index refIdxN. The output of this process is: - The reference index refIdxTemp.
[0188] The variable refPicPoc is derived as follows. refPicPoc=(X==0) ? RefPicList[0][refIdxN] : RefPicList[1][refIdxN] (8-878)
[0189] The reference picture list refPicListTemp is derived as follows. refPicListTemp=(X==0) ? RefPicList[1] : RefPicList[0] (8-879)
[0190] The variable refIdxTemp is derived as follows: - The variable mapStop is set equal to FALSE. - variable refIdx, where m=0..NumRefIdxActive[1]-1 m For mapStop equal to FALSE, the following applies: refIdxTemp=(refPicListTemp[refIdxm ]==refPicPoc) ? refIdx m : -1 (8-880) mapStop=(refIdxTemp!=-1) ? TRUE : FALSE (8-881)
[0191] [Sample weight derivation process for geometric partitioning merging mode] The inputs to this process are: - two variables nCbW and nCbH that specify the width and height of the current coding block, - two variables angleIdx and distanceIdx that specify the angle and distance lookup values for the current geometric segmentation mode, - (nCbW) x (nCbH) array sampleWeight L , - (nCbW / 2) x (nCbH / 2) array sampleWeight C , - (nCbW / 4) x (nCbH / 4) array motionWeight.
[0192] The output of this process is three identical arrays of weight values per sample, sampleWeight, with range 0...8. L , sampleWeight C , and motionWeight. 1. sampleWeight for the current geometric partitioning mode L The luma blending weights stored in are derived as follows:
[0193] The values of the following variables are set: - wIdx is set to log2(nCbW)-3, - hIdx is set to log2(nCbH)-3, - stepOffset is set to 64, - The following variables are set according to the comparison (wIdx>=hIdx), - whRratio=(wIdx>=hIdx) ? wIdx-hIdx:hIdx-wIdx (8-882) - wIsLargerH=(wIdx>=hIdx)?true:false (8-883) - scaleStep=(wIdx>=hIdx) ? (1< <hIdx):(1<<wIdx) (8-884) - displacementX is set to angleIdx, - displacementY is set to (displacementX+8)%32, - angleN is angleN=angleIdx if angleIdx>=0&&angleIdx<=8, angleN=16-angleIdx if angleIdx>8&&angleIdx<=16, angleN=angleIdx-16 if angleIdx>16&&angleIdx<=24, angleN=32-angleIdx otherwise, is set to - furthermore, angleN is set to the following value depending on wIsLargerH: angleN=(wIsLargerH)?8-angleN:angleN stepDis is set according to the values of whRatio and angleN as specified in Table 2, and is: stepSize=stepDis+stepOffset rho is set to the following value using a look-up table designated Dis as specified in Table 3: - rho=distanceIdx*stepSize*scaleStep+nCbW*Dis[displacementX]+nCbH*Dis[displacementY]. (8-885). For each sample position x=0...nCbW-1 and y=0...nCbH-1, sampleWeightL The values of [x][y] are derived as follows: The distance distFromLine is calculated using a lookup table denoted as Dis specified in Table 3 as follows: - distFromLine=((x<<1)+1)*Dis[displacementX]+((y<<1)+1))*Dis[displacementY]-rho. (8-886) The scaled distance distScaled is derived as: - distScaled=min((abs(distFromLine)+8)>>4,14) (8-887)
[0194] sampleWeight L The values of [x][y] are set according to a filter weight lookup table, shown as GeoFilter, specified in Table 4 as follows: sampleWeight L [x][y]=GeoFilter[distScaled] if distFromLine<=0 sampleWeight L [x][y]=8-GeoFilter[distScaled] if distFromLine>0
[0195] 2. sampleWeight for the current geometric partitioning mode C The chroma weights stored in are derived as follows: For each sample position x=0...(nCbW / 2)-1 and y=0...(nCbH / 2)-1, sampleWeight C The values of [x][y] are derived as follows: sampleWeight C [x][y]=sampleWeight L [(x<<1)][(y<<1)]
[0196] 3. The motion weights stored in the array motionWeight for the current geometric partitioning mode are derived as follows: - The following variables are set: threshScaler=((log2(nCbW)+log2(nCbH))>>1)-1 threshLower=32>>threshScaler threshUpper=32-threshLower For each sample position x=0...(nCbW / 4)-1 and y=0...(nCbH / 4)-1, the value of motionWeight[x][y] is derived as follows: Cnt=sampleWeight L [(x<<2)][(y<<2)] +sampleWeight L [(x<<2)+3][(y<<2)] +sampleWeight L [(x<<2)][(y<<2)+3] +sampleWeight L [(x<<2)+3][(y<<2)+3]
[0197] The values of motionWeight[x][y] are set as follows: motionWeight[x][y]=0, if Cnt<=threshLower motionWeight[x][y]=1, if Cnt>=threshUpper motionWeight[x][y]=2, otherwise
[0198] [Weighted sample prediction process for geometric partitioning merge mode] The inputs to this process are: - two variables nCbW and nCbH that specify the width and height of the current coding block, - two (nCbW) x (nCbH) arrays predSamplesLA and predSamplesLB, - a (nCbW) by (nCbH) array sampleWeight, - A variable cIdx that specifies the color component index.
[0199] The output of this process is a (nCbW) by (nCbH) array of predicted sample values, pbSamples.
[0200] The variable bitDepth is derived as follows: - If cIdx is equal to 0, then bitDepth is Y is set equal to - Otherwise, bitDepth is BitDepth C is set equal to
[0201] The variables shift1 and offset1 are derived as follows: - The variable shift1 is set equal to Max(5,17-bitDepth). - The variable offset1 is set equal to 1<<(shift1-1).
[0202] The predicted sample values are derived as follows. pbSamples[x][y] = Clip3(0,(1< <bitDepth)-1, (predSamplesLA[x][y]*sampleWeight[x][y] +predSamplesLB[x][y]*(8-sampleWeight[x][y])+offset1)>>shift1)
[0203] [Motion Vector Preservation for Geometric Segmentation Merge Mode] This process is called when decoding a coding unit with geo_flag[xCb][yCb] equal to 1.
[0204] The inputs to this process are: - a luma position (xCb, yCb) that specifies the top-left sample of the current coding block relative to the top-left luma sample of the current picture; - the variable cbWidth, which specifies the width of the current coding block in luma samples; - a variable cbHeight that specifies the height of the current coding block in luma samples, - An array motionWeight of size (cbWidth / 4) x (cbHeight / 4) containing motion assignment indices. - luma motion vectors mvA and mvB with 1 / 16 fractional sample accuracy, - reference indices refIdxA and refIdxB, - Prediction list flags predListFlagA and predListFlagB.
[0205] The variables numSbX and numSbY, which specify the number of 4x4 blocks in the current coding block in the horizontal and vertical directions, are set equal to numSbX=cbWidth>>2 and numSbY=cbHeight>>2.
[0206] The variable minSb is set equal to min(numSbX, numSbY).
[0207] The variable refIdxTempA is derived by invoking the reference picture mapping process for triangle merge mode with inputs X set equal to predListFlagA, and refIdxN set equal to refIdxA.
[0208] The variable refIdxTempB is derived by invoking the reference picture mapping process for triangle merge mode with inputs X set equal to predListFlagB, and refIdxN set equal to refIdxB.
[0209] For each 4x4 sub-block at sub-block index (xSbIdx, ySbIdx), where xSbIdx=0..numSbX-1 and ySbIdx=0..numSbY-1, the following applies: - if motionWeight[xSbIdx][ySbIdx] is equal to 0, the following applies: predFlagL0=(predListFlagA==0) ? 1 : 0 (8-888) predFlagL1=(predListFlagA==0) ? 0 : 1 (8-889) refIdxL0=(predListFlagA==0) ? refIdxA : -1 (8-890) refIdxL1=(predListFlagA==0) ? -1 : refIdxA (8-891) mvL0[0]=(predListFlagA==0) ? mvA[0] : 0 (8-892) mvL0[1]=(predListFlagA==0) ? mvA[1] : 0 (8-893) mvL1[0]=(predListFlagA==0) ? 0 : mvA[0] (8-894) mvL1[1]=(predListFlagA==0) ? 0 : mvA[1] (8-895) - Else, if motionWeight[xSbIdx][ySbIdx] is equal to 1, the following applies: predFlagL0=(predListFlagB==0) ? 1 : 0 (8-896) predFlagL1=(predListFlagB==0) ? 0 : 1 (8-897) refIdxL0=(predListFlagB==0) ? refIdxB : -1 (8-898) refIdxL1=(predListFlagB==0) ? -1 : refIdxB (8-899) mvL0[0]=(predListFlagB==0) ? mvB[0] : 0 (8-900) mvL0[1]=(predListFlagB==0) ? mvB[1] : 0 (8-901) mvL1[0]=(predListFlagB==0) ? 0 : mvB[0] (8-902) mvL1[1]=(predListFlagB==0) ? 0 : mvB[1] (8-903) - Otherwise (motionWeight[xSbIdx][ySbIdx] is equal to 2), the following applies: - if predListFlagA+predListFlagB is equal to 1, predFlagL0=1 (8-904) predFlagL1=1 (8-905) refIdxL0=(predListFlagA==0) ? refIdxA : refIdxB (8-906) refIdxL1=(predListFlagA==0) ? refIdxB : refIdxA (8-907) mvL0[0]=(predListFlagA==0) ? mvA[0] : mvB[0] (8-908) mvL0[1]=(predListFlagA==0) ? mvA[1] : mvB[1] (8-909) mvL1[0]=(predListFlagA==0) ? mvB[0] : mvA[0] (8-910) mvL1[1]=(predListFlagA==0) ? mvB[1] : mvA[1] (8-911) - if predListFlagA+predListFlagB is equal to 0, the following applies: predFlagL0=1 (8-912) predFlagL1=(refIdxTempA==-1&&refIdxTempB==-1) ? 0 : 1 (8-913) refIdxL0=(refIdxTempB!=-1) ? refIdxA : (8-914) ((refIdxTempA!=-1) ? refIdxB : refIdxA) refIdxL1=(refIdxTempB!=-1) ? refIdxTempB : (8-915) ((refIdxTempA!=-1) ? refIdxTempA : -1) mvL0[0]=(refIdxTempB!=-1) ? mvA[0] : (8-916) ((refIdxTempA!=-1) ? mvB[0] : mvA[0]) mvL0[1]=(refIdxTempB!=-1) ? mvA[1] : (8-917) ((refIdxTempA!=-1) ? mvB[1] : mvA[1]) mvL1[0]=(refIdxTempB!=-1) ? mvB[0] : (8-918) ((refIdxTempA!=-1) ? mvA[0] : 0) mvL1[1]=(refIdxTempB!=-1) ? mvB[1] : (8-919) ((refIdxTempA!=-1) ? mvA[1] : 0) - if predListFlagA+predListFlagB is equal to 2, the following applies: predFlagL0=(refIdxTempA==-1 && refIdxTempB==-1) ? 0 : 1 (8-920) predFlagL1=1 (8-921) refIdxL0=(refIdxTempB!=-1) ? refIdxTempB : (8-922) ((refIdxTempA!=-1) ? refIdxTempA : -1) refIdxL1=(refIdxTempB!=-1) ? refIdxA : (8-923) ((refIdxTempA!=-1) ? refIdxB : refIdxA) mvL0[0]=(refIdxTempB!=-1) ? mvB[0] : (8-924) ((refIdxTempA!=-1) ? mvA[0] : 0) mvL0[1]=(refIdxTempB!=-1) ? mvB[1] : (8-925) ((refIdxTempA!=-1) ? mvA[1] : 0) mvL1[0]=(refIdxTempB!=-1) ? mvA[0] : (8-926) ((refIdxTempA!=-1) ? mvB[0] : mvA[0]) mvL1[1]=(refIdxTempB!=-1) ? mvA[1] : (8-927) ((refIdxTempA!=-1) ? mvB[1] : mvA[1]) - For x=0..3 and y=0..3, the following assignments are made: MvL0[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=mvL0(8-928) MvL1[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=mvL1(8-929) RefIdxL0[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=refIdxL0(8-930) RedIdxL1[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=refIdxL1(8-931) PredFlagL0[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=predFlagL0(8-932) PredFlagL1[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=predFlagL1(8-933) [Table 1] TIFF0007680129000002.tif18897 [Table 2] [Table 3] [Table 4]
[0210] In a second embodiment of the decoding process for the GEO prediction mode, the motion information preservation process is as follows.
[0211] Subdivide the coding block into K motion save units. In one example, the size of the coding block is M×N luma samples, and each motion save unit has the same size of luma samples of (M / K)×(N / K). In one example, the value of K is 4, the value of M is 16, and the value of N is 16, and in this example, each motion save unit is associated with a luma sub-block of size 4×4. The top left luma position (x,y) of the coding block is associated with the top left position (x / K,y / K) of the motion save block.
[0212] For the motion save unit, determine whether the first uni-predictive motion information is saved, the second uni-predictive motion information is saved, or the bi-predictive motion information is saved according to the first sample weight or the second sample weight. In one example, the decision is according to the distance of the samples in the motion save unit to the partition boundary. The samples can be integer samples or fractional samples. The separation line is defined as the partition line of the geometric partition mode. According to one example, K is equal to 4 (the width and height of the motion save unit in terms of luma samples). An example of partitioning a coding block into motion save units is shown in FIG. 13.
[0213] According to one example, the distance between a sample and a split boundary can be calculated as follows: For a luma sample within a block, a sample distance (sample_dist) is calculated, which represents the distance of the luma sample to the separation line of the block.
[0214] In one example, the sample distance sample_dist is calculated according to the following formula: sample_dist=((x<<1)+1)*Dis[angleIdx1]+((y<<1)+1))*Dis[angleIdx2]-offset(distanceIdx) The values of angleIdx1 and angleIdx2 are obtained from the bitstream or derived / calculated based on other information obtained from the bitstream, and angleIdx1 and angleIdx2 represent the quantized triangular parameters of the separation line, where the type of the first triangular parameter is cosine and the type of the second triangular parameter is sine. x and y are the -x and -y coordinates of the sample relative to the top-left sample of the coding block. ● offset(distanceIdx) is an offset value that is a function of the index value (distanceIdx), where the index value is obtained from the bitstream or derived / calculated based on other information obtained from the bitstream. ● Dis[] is a lookup table. Dis[angleIdx1] represents the change in sample distance (sample_dist) for unit increments (an increase of value 1) in the -x coordinate of the sample. Dis[angleIdx2] represents the change in sample distance (sample_dist) for unit increments (an increase of value 1) in the -y coordinate of the sample.
[0215] Note that the coordinator in the above example does not follow the top-left position of , but the top-left position of the current coding block. Note that the above example shows a method of calculation according to integer arithmetic. The embodiments of the present invention are not limited to these examples of calculation of sample_dist.
[0216] Note that according to the above example, the sample coordinator is left shifted by 1 bit ((x<<1), (y<<1)). In this example, the distance calculation can be performed up to 1 / 2 sample precision for integer arithmetic, e.g., the sample position at (0.5,0.5) can be calculated.
[0217] FIG. 18 shows a 4×4 motion preservation example with integer and half-pel positions, fractional positions, split boundaries, and distance between samples and split boundaries (sample_dist).
[0218] In one example, the decision refers to whether to save a first uni-predictive motion information labeled Mv0, a second uni-predictive motion information labeled Mv1, or a combined motion information such as bi-predictive motion information labeled Mv2, and is performed according to the following steps: In one example, the decision is performed for one motion save unit, and in another example, the decision is performed for at least two (or all) motion save units included in the coding block. The top-left coordinate of the motion save unit is given by (x / K, y / K), and the width and height of the motion save unit are given by K in terms of luma samples.
[0219] If the calculated distance sample_dist is less than and / or equal to the threshold, the combined motion information (Mv2) is saved for the motion preservation unit. The threshold can be a constant or can be adaptively derived based on the angle of the division line, the aspect racial of the current coding block, or other parameters. Otherwise (if the distance sample_dist is greater than and / or equal to the threshold), the sign of sample_dist is checked.
[0220] If sample_dist is negative (or positive), MV0 (or MV1) is preserved with respect to the current motion save unit. Otherwise (sample_dist is positive (or negative)), MV1 (or MV0) is preserved with respect to the current motion preserved unit.
[0221] FIG. 19 shows an example of motion preservation based on the mentioned method.
[0222] Compared with other motion preservation methods, this method only needs to calculate one sample distance per motion preservation unit, which reduces the computational complexity.
[0223] As shown in FIG. 20, in the third embodiment of the decoding process for the GEO prediction mode, the following is performed.
[0224] For video coding techniques that allow bi-prediction, two reference frame lists are used, for example List0 and List1, or a forward reference frame list and a backward reference frame list. (1) Prediction flag L0 (PFL0) and prediction flag L1 (PFL1). When the prediction flag L0 is true, List0 is used in inter prediction, otherwise (when the prediction flag L0 is false), List0 is not used. The same applies to the prediction flag L1. (2) Reference index L0 (RIL0) and reference index L1 (RIL1). Reference index L0 is used to indicate which reference frame (candidate) from List0 is used as the current reference frame. Similarly, reference index L1. Also, in a possible implementation, reference index L0 equal to -1 means that no reference frame from List0 is used. (3) Motion vector L0 (MVL0) and motion vector L1 (MVL1) correspond to List0 and List1, respectively, and both of them have horizontal and vertical components.
[0225] After the motion information for the current block has been determined, in a possible implementation, the motion information may be stored and used as reference information for prediction processes of future coding blocks, for example as predictive motion information of neighboring blocks in spatial prediction or temporal prediction.
[0226] The motion information is stored in a memory, more specifically, in this embodiment, in a motion information storage unit.
[0227] The current block may be divided into a plurality of sample sets, each of which has the same size as the sample set, or the current block is set as the sample set. For example, the sample set may be a 4×4 sample array. The size of the sample set may be 8×8, 16×16, 8×16, etc., but is not limited thereto. Each of the plurality of sample sets corresponds to a respective motion information storage unit, and thus the motion information of the sample set is stored in the corresponding motion information storage unit. It should be noted that there are two cases regarding the "motion information of the sample set". Case 1: The motion information is used to determine the prediction value of the sample set. Case 2: The motion information is assigned to the sample set for storage.
[0228] Also, in this embodiment, the sample set is a luma sample set, while in other embodiments, the sample set may be a chroma sample set.
[0229] GEO prediction mode is introduced in the above section. In general, in GEO prediction, a current block is composed of a first sub-block and a second sub-block, the first sub-block and the second sub-block are separated by a common boundary, the first sub-block corresponds to a first motion information, and the second sub-block corresponds to a second motion information. The first sub-block and the second sub-block may be, but are not limited to, a triangular partition, a trapezoidal partition, or an asymmetric rectangular partition, etc. Also, for example, in a triangular partition, it can be understood that each sub-block is a triangular block.
[0230] As an example, in this embodiment, both the first motion information and the second motion information are from single prediction. The first motion information may only include RIL0, MVL0, which means PFL0=1, PFL1=0, or may only include RIL1, MVL1, which means PFL0=0, PFL1=1; similarly, the second motion information may only include RIL0, MVL0, which means PFL0=1, PFL1=0, or may only include RIL1, MVL1, which means PFL0=0, PFL1=1.
[0231] S201: Angle parameters and distance parameters are determined.
[0232] The common boundary is determined by an angle parameter and a distance parameter.
[0233] (1) In the decoder, In a possible implementation, we parse the angle and distance parameters directly from the bitstream.
[0234] In another possible implementation, an indicator is parsed from the bitstream and the angle and distance parameters are obtained based on the indicator. The indicator can be an index and the angle and distance parameters can be determined by checking a lookup table using such index. Or, the angle and distance parameters can be calculated by a function and the indicator is an input of the function.
[0235] In another possible implementation, two indicators are parsed from the bitstream and the angle parameter is obtained from one of the two indicators and the distance parameter is obtained from the other of the two indicators.
[0236] In this embodiment, the syntax element "geo_partition_idx" is parsed from the bitstream. The angle parameter "angleIdx" and the distance parameter "distanceIdx" are obtained by searching a lookup table that defines the relationship between "geo_partition_idx" and pairs of "angleIdx" and "distanceIdx". The lookup table may be, for example, Table 1.
[0237] S202: Determine a first calculation parameter based on the angle parameter, calculate a temp angle parameter based on the angle parameter, determine a second calculation parameter based on the temp angle parameter, and calculate a third calculation parameter based on the angle parameter and the distance parameter.
[0238] The first calculation parameter is determined by checking a pre-set lookup table according to the angle parameter, and the second calculation parameter is determined by checking a lookup table according to the temp angle parameter, and the first calculation parameter and the second calculation parameter are respectively the cosine value and the sine value of the same angle. It can be understood that the cosine and sine calculation can be simulated and replaced by the lookup table method, and the computation complexity is reduced.
[0239] In this embodiment, In a possible implementation, the first calculation parameter is set to Dis[angleIdx], where Dis[] is a lookup table, for example, Table 3.
[0240] The temp angle parameter is set to (angleIdx+8)%32, assuming TempIdx.
[0241] The second calculation parameter is set to Dis[TempIdx].
[0242] Note that, in theory, Dis[angleIdx] and Dis[TempIdx] are the approximate cosine and sine values of the same angle, where the angle represents the geometric relationship between the common boundary and the current block.
[0243] In another possible implementation, the first calculation parameter is set to Dis1[angleIdx], where Dis1[] is a lookup table, for example, Table 3.
[0244] The second calculation parameter is set to Dis2[angleIdx], where Dis2[] is another lookup table.
[0245] Note that Dis1[angleIdx] and Dis2[angleIdx] are the approximate cosine and sine values of the same angle, where the angle represents the geometric relationship between the common boundary and the current block.
[0246] The third calculation parameter is obtained as follows. wIdx is set to log2(nCbW)-3, where nCbW is the width of the current block, hIdx is set to log2(nCbH)-3, where nCbH is the height of the current block, The stepOffset is set to a positive integer, for example 64.
[0247] Compare wIdx and hIdx. whRratio=(wIdx>=hIdx)?wIdx-hIdx:hIdx-wIdx wIsLargerH=(wIdx>=hIdx)?true:false scaleStep=(wIdx>=hIdx)?(1< <hIdx):(1<<wIdx)
[0248] In another possible implementation, the following can be seen. whRratio=(wIdx>hIdx)?wIdx-hIdx:hIdx-wIdx wIsLargerH=(wIdx>hIdx)?true:false scaleStep=(wIdx>hIdx)?(1< <hIdx):(1<<wIdx) angleN is set to: angleN=angleIdx if angleIdx>=0&&angleIdx<=8, angleN=16-angleIdx if angleIdx>8&&angleIdx<=16, angleN=angleIdx-16 if angleIdx>16&&angleIdx<=24, angleN=32-angleIdx otherwise.
[0249] Note that in different implementations, the endpoints angleIdx0, 8, 16, 24 may, for example, belong to different subsections.
[0250] In another possible implementation, angleN is set to: angleN=angleIdx if angleIdx>0&&angleIdx<8, angleN=16-angleIdx if angleIdx>=8&&angleIdx<16, angleN=angleIdx-16 if angleIdx>=16&&angleIdx<24, angleN=32-angleIdx otherwise.
[0251] In addition, angleN is set to the following value: angleN=(wIsLargerH)?8-angleN:angleN stepDis is set according to the values of whRatio and angleN as specified in a lookup table, for example, Table 2. stepSize=stepDis+stepOffset
[0252] A third calculation parameter rho is set to the following value using a look-up table, for example Table 3, shown as Dis: rho=distanceIdx*stepSize*scaleStep+nCbW*Dis[angleIdx]+nCbH*Dis[TempIdx].
[0253] Correspondingly, in another possible implementation, the third calculation parameter rho may be set as follows: rho=distanceIdx*stepSize*scaleStep+nCbW*Dis1[angleIdx]+nCbH*Dis2[angleIdx].
[0254] It should be noted that the first, second and third calculation parameters can be determined after the angle parameter and the distance parameter are determined. In possible implementation, the first, second and third calculation parameters are calculated only once as parameters for all samples in the current block. Also, if the first, second and third calculation parameters of the current block have already been determined, steps S201 and S202 can be skipped in the motion information preservation process.
[0255] S203: Determine the distance between the sample set in the current block and the common boundary.
[0256] The distance is calculated as follows: distFromLine=(x+K)*P1+(y+K)*P2-P3 P1, P2, and P3 are the first calculation parameter, the second calculation parameter, and the third calculation parameter, respectively, distFromLine represents the distance, K is a non-negative integer, x represents the horizontal coordinate of the target position in the sample set, y represents the vertical coordinate of the target position in the rectangular coordinate system, the position of the top-left sample of the current block is set as the coordinate origin, the right direction is set as the positive horizontal direction, and the down direction is set as the positive vertical direction.
[0257] In a possible implementation, K is equal to 1. distFromLine=(x+1)*P1+(y+1)*P2-P3.
[0258] It should be noted that the distance between the sample set in the current block and the common boundary is generally the distance between the target position in the sample set and the common boundary.
[0259] The target position in the sample set is predefined, for example the predefined position may be the top left position of the sample set, or the center position of the sample set, or any other position of the sample set.
[0260] It should be noted that the target position may be the position of an integer sample position in the sample set, and the target position may also be the position of a fractional sample position. For example, the target position may be the position of the centroid of the current block. More specifically, if the current block is a 4x4 sample array, the target position may be the position of coordinates (1.5,1.5) in the rectangular coordinate system of this embodiment.
[0261] In a possible implementation, the sample precision of the distance is higher than an integer sample. Correspondingly, the distance is calculated by: distFromLine=((x< <N)+K)*P1+((y<<N)+K)*P2-P3 2 N represents the inverse of the sampling precision of the distance. For example, if the sampling precision of the distance is half-pixel precision, N is equal to 1, and if the sampling precision of the distance is quarter-pixel precision, N is equal to 2.
[0262] As an example, the distance is calculated by: distFromLine=((x<<1)+1)*Dis[angleIdx]+((y<<1)+1)*Dis[TempIdx]-rho
[0263] S204: Compare the distance to a threshold to determine whether the third motion information is preserved for the sample set.
[0264] The third motion information is derived by the first motion information and the second information. In a possible implementation, the third motion information is a combination of the first motion information and the second motion information, similar to the motion information for bi-prediction. More specifically, if the first motion information includes RILX_first, MVLX_first, the second motion information includes RILY_second, MVLY_second, where X can be 0 or 1, and Y can be 0 or 1, the third motion information can include all of RILX_first, MVLX_first, RILY_second, and MVLY_second, which means PFL0=1, PFL1=1.
[0265] In another possible implementation, if both the first motion information and the second motion information correspond to the same list (List0 or List1), the third motion information may be equal to one of the first motion information or the second motion information. For example, if PFL0 is equal to 1 and PFL1 is equal to 0 for both the first and second motion information, the third motion information may be set equal to the first motion information (or the second motion information according to a different implementation). Similarly, if PFL0 is equal to 0 and PFL1 is equal to 1 for both the first and second motion information, the third motion information may be set equal to the first motion information (or the second motion information according to a different implementation).
[0266] In a possible implementation, the threshold may be a predefined value.
[0267] In another possible implementation, the threshold is based on a geometric relationship between the common boundary and the horizontal direction, or based on a geometric relationship between the common boundary and the vertical direction. More specifically, the threshold is based on an angle between the orthogonal direction of the common boundary and the horizontal direction or the vertical direction. Also, in other implementations, the geometric relationship may include a length relationship between the common boundary and a block boundary of the current block or a sub-block of the current block. In this embodiment, the threshold may be obtained by a look-up table, for example Table 5, according to the angle calculated above. Threshold = RhoMax[angleN].
[0268] Note that since angleN can be determined before step S204, the threshold for the current block can be determined before step S204.
[0269] The threshold may be as follows. threshLower = -RhoMax[angleN] threshUpper = RhoMax[angleN].
Table 5
[0270] In another possible implementation, the threshold may be as follows. threshLower = -K threshUpper = K. K is a predetermined positive number. For example, the value of K may be 1. In one example, K can be obtained according to an indicator in the bit stream.
[0271] In another possible implementation, the threshold is based on the width and / or height of the current block.
[0272] Note that the threshold may be determined by two or more of the above conditions. For example, the width and / or height of the current block may determine a ratio, i.e., ratio = 1 << abs(log2(width) - log2(height)), and then this ratio is used to scale the threshold determined by the angle. Also, the scaled threshold is set as the final threshold.
[0273] A comparison between the threshold and the distance is performed.
[0274] S204-1: If the absolute value of the distance is less than or equal to the threshold, it is determined that the third motion information is saved for the sample set. S204-2: If the absolute value of the distance is greater than the threshold, If the distance is positive (or negative), then determining that the first motion information is to be preserved for the sample set; or If the distance is negative (or positive, following the above branch), it is determined that the second motion information is preserved for the sample set.
[0275] It can be understood that according to different implementations, the condition in step S204-1 may be that the absolute value of the distance is smaller than a threshold, and therefore the condition in step S204-2 may be that the absolute value of the distance is greater than or equal to a threshold.
[0276] In another possible implementation, the absolute value calculation is replaced by more subsections.
[0277] In this embodiment, if the distance is smaller than threshLower, the first motion information is saved for the sample set, if the distance is greater than threshUpper, the second motion information is saved for the sample set, and otherwise, the third motion information is saved for the sample set.
[0278] It can also be understood that one of the first motion information, the second motion information, and the third motion information is stored in a motion information storage unit corresponding to the sample set.
[0279] Please note that the current block may be divided into multiple sample sets, and in a possible implementation, the above steps in this embodiment are used for all sample sets. In another possible implementation, the above steps in this embodiment are used for only one sample set. In another possible implementation, the above steps in this embodiment are used for at least two sample sets. For sample sets that are not implemented with the above steps, in a possible implementation, default motion information or motion information estimated according to a predetermined condition is saved.
[0280] It should be noted that to determine the preservation of motion information for GEO partitioning, only the distance value needs to be calculated based on a predefined GEO partitioning module (function), and the module parameters can be determined at the CU level, which limits the computational complexity.
[0281] In a fourth embodiment of the decoding process for the GEO prediction mode, This process is invoked when decoding a coding unit with MergeTriangleFlag[xCb][yCb] equal to 1 or with geo_flag[xCb][yCb] equal to 1.
[0282] The inputs to this process are: - a luma position (xCb, yCb) that specifies the top-left sample of the current coding block relative to the top-left luma sample of the current picture; - the variable cbWidth, which specifies the width of the current coding block in luma samples; - a variable cbHeight that specifies the height of the current coding block in luma samples, - luma motion vectors mvA and mvB with 1 / 16 fractional sample accuracy, - chroma motion vectors mvCA and mvCB, - reference indices refIdxA and refIdxB, - Prediction list flags predListFlagA and predListFlagB.
[0283] The output of this process is: - predSamples, a (cbWidth) by (cbHeight) array of luma prediction samples L , - predSamples, a (cbWidth / 2) by (cbHeight / 2) array of chroma prediction samples for component Cb Cb , - predSamples, a (cbWidth / 2) by (cbHeight / 2) array of chroma prediction samples for component Cr Cr .
[0284] predSamplesLA L and predSamplesLB L Let predSamplesLA be the predicted luma sample value (cbWidth) × (cbHeight) array. Cb , predSamplesLB Cb ,predSamplesLA Cr , and predSamplesLB Cr Let be a (cbWidth / 2) x (cbHeight / 2) array of predicted chroma sample values.
[0285] predSamples L , predSamples Cb , and predSamples Cr is derived by the following ordered steps: 3. If N is each of A and B, the following applies: - refPicLN, an ordered two-dimensional array of luma samples L and two ordered two-dimensional arrays of chroma samples, refPicLN Cb and refPicLN Cr A reference picture consisting of is derived with X set equal to predListFlagN and refIdxX set equal to refIdxN as input. - Array predSamplesLN L is the luma position (xCb, yCb), the luma coding block width sbWidth set equal to cbWidth, the luma coding block height sbHeight set equal to cbHeight, the motion vector offset mvOffset set equal to (0,0), the motion vector mvLX set equal to mvN, and refPicLN L The reference array refPicLX set equal to L, the variable bdofFlag set equal to FALSE, and the variable cIdx set equal to 0, by invoking the fractional sample interpolation process. - Array predSamplesLN Cb is the luma position (xCb, yCb), the coding block width sbWidth set equal to cbWidth / 2, the coding block height sbHeight set equal to cbHeight / 2, the motion vector offset mvOffset set equal to (0,0), the motion vector mvLX set equal to mvCN, and refPicLN Cb The reference array refPicLX set equal to Cb , the variable bdofFlag set equal to FALSE, and the variable cIdx set equal to 1, by invoking the fractional sample interpolation process. - Array predSamplesLN Cr is the luma position (xCb, yCb), the coding block width sbWidth set equal to cbWidth / 2, the coding block height sbHeight set equal to cbHeight / 2, the motion vector offset mvOffset set equal to (0,0), the motion vector mvLX set equal to mvCN, and refPicLN Cr The reference array refPicLX set equal to Cr , the variable bdofFlag set equal to FALSE, and the variable cIdx set equal to 2, as inputs. 4. If MergeTriangleFlag[xCb][yCb] is equal to 1, then the merge triangle mode variable split direction triangleDir is set equal to merge_triangle_split_dir[xCb][yCb]. a. A predicted sample in the current luma coding block, i.e., x L = 0..cbWidth-1, and y L predSamples = 0..cbHeight-1 L [xL ][y L ] is a set of the coding block width nCbW set equal to cbWidth, the coding block height nCbH set equal to cbHeight, and the sample array predSamplesLA L and predSamplesLB L , and the variables triangleDir, and cIdx equal to 0, by invoking the weighted sample prediction process for triangle merge mode. b. The predicted sample in the current chrominance component Cb coding block, i.e., x C = 0..cbWidth / 2-1, and y C predSamples = 0..cbHeight / 2-1 Cb [x C ][y C ] is a coding block width nCbW set equal to cbWidth / 2, a coding block height nCbH set equal to cbHeight / 2, a sample array predSamplesLA Cb and predSamplesLB Cb , and the variables triangleDir, and cIdx equal to 1, by invoking the weighted sample prediction process for triangle merge mode. c. A predicted sample in the current chroma component Cr coding block, i.e., x C = 0..cbWidth / 2-1, and y C predSamples = 0..cbHeight / 2-1 Cr [x C ][y C ] is a coding block width nCbW set equal to cbWidth / 2, a coding block height nCbH set equal to cbHeight / 2, a sample array predSamplesLA Cr and predSamplesLB Cr, and the variables triangleDir, and cIdx equal to 2, by invoking the weighted sample prediction process for triangle merge mode. d. The motion vector preservation process for merge triangle mode is called with inputs luma coding block position (xCb, yCb), luma coding block width cbWidth, luma coding block height cbHeight, partition direction triangleDir, luma motion vectors mvA and mvB, reference indices refIdxA and refIdxB, and prediction list flags predListFlagA and predListFlagB. 5. If geo_flag[xCb][yCb] is equal to 1, then the geometric partitioning related variables angleIdx and distanceIdx are set according to the value of geo_partitioning_idx[xCb][yCb] as specified in Table 1. The sample weight derivation process for geometric partitioning merge mode is called. The inputs to this process are three ordered arrays, sampleWeightL, sampleWeightC, and motionWeight, of sizes (cbWidth)×(cbHeight), (cbWidth / 2)×(cbHeight / 2), and (cbWidth / 4)×(cbHeight / 4), respectively, and the variables angleIdx, distanceIdx, cbWidth, and cbHeight. b. The predicted samples in the current luma coding block, i.e., predSamplesL[xL][yL], where xL=0..cbWidth-1 and yL=0..cbHeight-1, are derived by invoking the weighted sample prediction process for the geometric partitioning merge mode with inputs the coding block width nCbW set equal to cbWidth, the coding block height nCbH set equal to cbHeight, sample arrays predSamplesLAL, predSamplesLBL, predWeightL, and cIdx equal to 0. c. The predicted samples in the current chroma component Cb coding block, i.e., predSamplesCb[xC][yC], where xC=0..cbWidth / 2-1 and yC=0..cbHeight / 2-1, are derived by invoking the weighted sample prediction process for the geometric partitioning merge mode with inputs the coding block width nCbW set equal to cbWidth / 2, the coding block height nCbH set equal to cbHeight / 2, sample arrays predSamplesLACb, predSamplesLBCb, predWeightC, and cIdx equal to 1. d. The predicted samples in the current chroma component Cr coding block, i.e., predSamplesCr[xC][yC], where xC=0..cbWidth / 2-1 and yC=0..cbHeight / 2-1, are derived by invoking the weighted sample prediction process for the geometric partitioning merge mode specified in Section 8.5.8.3 with inputs the coding block width nCbW set equal to cbWidth / 2, the coding block height nCbH set equal to cbHeight / 2, the sample arrays predSamplesLACr, predSamplesLBCr, predWeightC, and cIdx equal to 2. e. The motion vector preservation process for geometric merge mode is called with inputs luma coding block position (xCb, yCb), luma coding block width cbWidth, luma coding block height cbHeight, sample array motionWeight, luma motion vectors mvA and mvB, reference indices refIdxA and refIdxB, and prediction list flags predListFlagA and predListFlagB.
[0286] [Reference Picture Mapping Process for Triangle Merge Mode] The inputs to this process are: a variable X whose reference list represents equal to 0 or 1; - Reference index refIdxN.
[0287] The output of this process is: - The reference index refIdxTemp.
[0288] The variable refPicPoc is derived as follows. refPicPoc=(X==0) ? RefPicList[0][refIdxN] : RefPicList[1][refIdxN] (8-878) The reference picture list refPicListTemp is derived as follows. refPicListTemp=(X==0) ? RefPicList[1] : RefPicList[0] (8-879) The variable refIdxTemp is derived as follows: - the variable mapStop is set equal to FALSE, - variable refIdx, where m=0..NumRefIdxActive[1]-1 m until mapStop is equal to FALSE, the following applies: refIdxTemp=(refPicListTemp[refIdx m ]==refPicPoc) ? refIdx m : -1 (8-880) mapStop=(refIdxTemp!=-1) ? TRUE : FALSE (8-881)
[0289] [Sample weight derivation process for geometric partitioning merging mode] The inputs to this process are: - two variables nCbW and nCbH that specify the width and height of the current coding block, - two variables angleIdx and distanceIdx that specify the angle and distance lookup values for the current geometric segmentation mode, - (nCbW) x (nCbH) array sampleWeightL , - (nCbW / 2) x (nCbH / 2) array sampleWeight C , - (nCbW / 4) x (nCbH / 4) array motionWeight.
[0290] The output of this process is three identical arrays of weight values per sample, sampleWeight, with range 0...8. L , sampleWeight C , and motionWeight. 4. sampleWeight for the current geometric partitioning mode L The luma blending weights stored in are derived as follows: The values of the following variables are set: - wIdx is set to log2(nCbW)-3, - hIdx is set to log2(nCbH)-3, - stepOffset is set to 64, - The following variables are set according to the comparison (wIdx>=hIdx), - whRratio=(wIdx>=hIdx)?wIdx-hIdx:hIdx-wIdx (8-882) - wIsLargerH=(wIdx>=hIdx)?true:false (8-883) - scaleStep=(wIdx>=hIdx)?(1< <hIdx):(1<<wIdx) (8-884) - displacementX is set to angleIdx, - displacementY is set to (displacementX+8)%32, - angleN is set to angleN=angleIdx if angleIdx>=0&&angleIdx<=8, angleN=16-angleIdx if angleIdx>8&&angleIdx<=16, angleN=angleIdx-16 if angleIdx>16&&angleIdx<=24, angleN=32-angleIdx otherwise, - furthermore, depending on wIsLargerH, angleN is set to the following value: angleN=(wIsLargerH)?8-angleN:angleN - stepDis is set according to the values of whRatio and angleN as specified in Table 2, and further: stepSize=stepDis+stepOffset rho is set to the following value using a look-up table, denoted as Dis, specified in Table 3: - rho=distanceIdx*stepSize*scaleStep+nCbW*Dis[displacementX]+nCbH*Dis[displacementY]. (8-885) For each sample position x=0...nCbW-1 and y=0...nCbH-1, sampleWeight L The values of [x][y] are derived as follows: The distance distFromLine[x][y] is calculated using a lookup table denoted as Dis specified in Table 3 as follows: - distFromLine[x][y]=((x<<1)+1)*Dis[displacementX]+((y<<1)+1))*Dis[displacementY]-rho (8-886) - The scaled distance distScaled is derived as follows: - distScaled=min((abs(distFromLine[x][y])+8)>>4,14). (8-887) sampleWeight LThe values of [x][y] are set according to a filter weight lookup table, designated as geoFilter, specified in Table 4 as follows: sampleWeight L [x][y]=GeoFilter[distScaled] if distFromLine<=0 sampleWeight L [x][y]=8-GeoFilter[distScaled] if distFromLine>0 5. sampleWeight for the current geometric partitioning mode C The chroma weights stored in are derived as follows: For each sample position x=0...(nCbW / 2)-1 and y=0...(nCbH / 2)-1, sampleWeight C The values of [x][y] are derived as follows: sampleWeight C [x][y]=sampleWeight L [(x<<1)][(y<<1)] 6. The motion weights stored in the array motionWeight for the current geometric partitioning mode are derived as follows: - The following variables are set according to Table 5: threshLower=-RhoMax[angleN] threshUpper=RhoMax[angleN] For each sample position x=0...(nCbW / 4)-1 and y=0...(nCbH / 4)-1, the value of motionWeight[x][y] is derived as follows: Cnt=distFromLine[x*4+1][y*4+1] The values of motionWeight[x][y] are set as follows: motionWeight[x][y]=0 if Cnt<=threshLower motionWeight[x][y]=1 if Cnt>=threshUpper motionWeight[x][y]=2 otherwise
[0291] [Weighted sample prediction process for geometric partitioning merge mode] The inputs to this process are: - two variables nCbW and nCbH that specify the width and height of the current coding block, - two (nCbW) x (nCbH) arrays predSamplesLA and predSamplesLB, - a (nCbW) by (nCbH) array sampleWeight, - A variable cIdx that specifies the color component index.
[0292] The output of this process is a (nCbW) by (nCbH) array of predicted sample values, pbSamples.
[0293] The variable bitDepth is derived as follows: - If cIdx is equal to 0, then bitDepth is Y is set equal to - Otherwise, bitDepth is BitDepth C is set equal to
[0294] The variables shift1 and offset1 are derived as follows: - The variable shift1 is set equal to Max(5,17-bitDepth). - The variable offset1 is set equal to 1<<(shift1-1).
[0295] The predicted sample values are derived as follows. pbSamples[x][y] = Clip3(0,(1< <bitDepth)-1, (predSamplesLA[x][y]*sampleWeight[x][y] +predSamplesLB[x][y]*(8-sampleWeight[x][y])+offset1)>>shift1)
[0296] [Motion Vector Preservation for Geometric Segmentation Merge Mode] This process is called when decoding a coding unit with geo_flag[xCb][yCb] equal to 1.
[0297] The inputs to this process are: - a luma position (xCb, yCb) that specifies the top-left sample of the current coding block relative to the top-left luma sample of the current picture; - the variable cbWidth, which specifies the width of the current coding block in luma samples; - a variable cbHeight that specifies the height of the current coding block in luma samples, - an array motionWeight of size (cbWidth / 4) x (cbHeight / 4) containing motion assignment indices, - luma motion vectors mvA and mvB with 1 / 16 sample accuracy, - reference indices refIdxA and refIdxB, - Prediction list flags predListFlagA and predListFlagB
[0298] The variables numSbX and numSbY, which specify the number of 4x4 blocks in the current coding block in the horizontal and vertical directions, are set equal to numSbX=cbWidth>>2 and numSbY=cbHeight>>2.
[0299] The variable minSb is set equal to min(numSbX, numSbY).
[0300] The variable refIdxTempA is derived by invoking the reference picture mapping process for triangle merge mode specified in Section 8.5.7.4 with input X set equal to predListFlagA, and refIdxN set equal to refIdxA.
[0301] The variable refIdxTempB is derived by invoking the reference picture mapping process for triangle merge mode specified in Section 8.5.7.4 with inputs X set equal to predListFlagB, and refIdxN set equal to refIdxB.
[0302] For each 4x4 sub-block at sub-block index (xSbIdx, ySbIdx), where xSbIdx=0..numSbX-1 and ySbIdx=0..numSbY-1, the following applies: - if motionWeight[xSbIdx][ySbIdx] is equal to 0, the following applies: predFlagL0=(predListFlagA==0) ? 1 : 0 (8-888) predFlagL1=(predListFlagA==0) ? 0:1 (8-889) refIdxL0=(predListFlagA==0) ? refIdxA : -1 (8-890) refIdxL1=(predListFlagA==0) ? -1 : refIdxA (8-891) mvL0[0]=(predListFlagA==0) ? mvA[0] : 0 (8-892) mvL0[1]=(predListFlagA==0) ? mvA[1] : 0 (8-893) mvL1[0]=(predListFlagA==0) ? 0 : mvA[0] (8-894) mvL1[1]=(predListFlagA==0) ? 0 : mvA[1] (8-895) - Else, if motionWeight[xSbIdx][ySbIdx] is equal to 1, the following applies: predFlagL0=(predListFlagB==0) ? 1 : 0 (8-896) predFlagL1=(predListFlagB==0) ? 0 : 1 (8-897) refIdxL0=(predListFlagB==0) ? refIdxB : -1 (8-898) refIdxL1=(predListFlagB==0) ? -1 : refIdxB (8-899) mvL0[0]=(predListFlagB==0) ? mvB[0] : 0 (8-900) mvL0[1]=(predListFlagB==0) ? mvB[1] : 0 (8-901) mvL1[0]=(predListFlagB==0) ? 0 : mvB[0] (8-902) mvL1[1]=(predListFlagB==0) ? 0 : mvB[1] (8-903) - Otherwise (motionWeight[xSbIdx][ySbIdx] is equal to 2), the following applies: - if predListFlagA+predListFlagB is equal to 1, predFlagL0=1 (8-904) predFlagL1=1 (8-905) refIdxL0=(predListFlagA==0)?refIdxA : refIdxB (8-906) refIdxL1=(predListFlagA==0)?refIdxB : refIdxA (8-907) mvL0[0]=(predListFlagA==0)?mvA[0] : mvB[0] (8-908) mvL0[1]=(predListFlagA==0)?mvA[1] : mvB[1] (8-909) mvL1[0]=(predListFlagA==0)?mvB[0] : mvA[0] (8-910) mvL1[1]=(predListFlagA==0)?mvB[1] : mvA[1] (8-911) - if predListFlagA+predListFlagB is equal to 0, the following applies: predFlagL0=1 (8-912) predFlagL1=(refIdxTempA==-1&&refIdxTempB==-1) ? 0 : 1 (8-913) refIdxL0=(refIdxTempB!=-1)?refIdxA : (8-914) ((refIdxTempA!=-1)?refIdxB : refIdxA) refIdxL1=(refIdxTempB!=-1)?refIdxTempB : (8-915) ((refIdxTempA!=-1)?refIdxTempA : -1) mvL0[0]=(refIdxTempB!=-1)?mvA[0] : (8-916) ((refIdxTempA!=-1)?mvB[0] : mvA[0]) mvL0[1]=(refIdxTempB!=-1)?mvA[1] : (8-917) ((refIdxTempA!=-1)?mvB[1] : mvA[1]) mvL1[0]=(refIdxTempB!=-1)?mvB[0]: (8-918) ((refIdxTempA!=-1)?mvA[0] : 0) mvL1[1]=(refIdxTempB!=-1)?mvB[1]: (8-919) ((refIdxTempA!=-1)?mvA[1] : 0) - if predListFlagA+predListFlagB is equal to 2, the following applies: predFlagL0=(refIdxTempA==-1&&refIdxTempB==-1)?0 : 1 (8-920) predFlagL1=1 (8-921) refIdxL0=(refIdxTempB!=-1)?refIdxTempB : (8-922) ((refIdxTempA!=-1)?refIdxTempA : -1) refIdxL1=(refIdxTempB!=-1)?refIdxA : (8-923) ((refIdxTempA!=-1)?refIdxB : refIdxA) mvL0[0]=(refIdxTempB!=-1)?mvB[0] : (8-924) ((refIdxTempA!=-1)?mvA[0] : 0) mvL0[1]=(refIdxTempB!=-1)?mvB[1] : (8-925) ((refIdxTempA!=-1)?mvA[1] : 0) mvL1[0]=(refIdxTempB!=-1)?mvA[0] : (8-926) ((refIdxTempA!=-1)?mvB[0] : mvA[0]) mvL1[1]=(refIdxTempB!=-1)?mvA[1] : (8-927) ((refIdxTempA!=-1)?mvB[1] : mvA[1]) - For x=0..3 and y=0..3, the following assignments are made: MvL0[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=mvL0 (8-928) MvL1[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=mvL1 (8-929) RefIdxL0[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=refIdxL0 (8-930) RedIdxL1[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=refIdxL1 (8-931) PredFlagL0[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=predFlagL0 (8-932) PredFlagL1[(xSbIdx<<2)+x][(ySbIdx<<2)+y]=predFlagL1 (8-933)
[0303] In an alternative implementation, step 6 of the “Sample Weight Derivation Process for Geometric Partitioning Merge Mode” can be implemented as follows: 6. The motion weights stored in the array motionWeight for the current geometric partitioning mode are derived as follows: - The following variables are set according to Table 5: threshLower=-RhoMax[angleN] threshUpper=RhoMax[angleN]
[0304] For each sample position x=0...(nCbW / 4)-1 and y=0...(nCbH / 4)-1, the value of motionWeight[x][y] is derived as follows: Cnt=((x<<4)+3)*Dis[displacementX]+((y<<4)+3))*Dis[displacementY]-rho<<1 The values of motionWeight[x][y] are set as follows: motionWeight[x][y]=0 if Cnt<=threshLower motionWeight[x][y]=1 if Cnt>=threshUpper motionWeight[x][y]=2 otherwise
[0305] In the above example implementation of step 6 of the "Sample Weight Derivation Process for Geometric Partitioning Merge Mode", the formula "Cnt=((x<<4)+3)*Dis[displacementX]+((y<<4)+3))*Dis[displacementY]-rho<<1" corresponds to the calculation of the distance between the centroid of the set of samples and the line. The set of samples in this example includes 16 samples with the following coordinates: (x*4,y*4),(x*4+1,y*4),(x*4+2,y*4),(x*4+3,y*4),(x*4,y*4+1),(x*4+1,y*4+1),(x*4+2,y*4+1),(x*4+3,y*4+1),(x*4 ,y*4+2),(x*4+1,y*4+2),(x*4+2,y*4+2),(x*4+3,y*4+2),(x*4,y*4+3),(x*4+1,y*4+3),(x*4+2,y*4+3),(x*4+3,y*4+3).
[0306] The coordinates of the center of gravity are (x*4+1.5,y*4+1.5). Since integer arithmetic is the preferred implementation feature, in the above formula, all of the additional terms in the formula are multiplied by 2 to make the coordinate offset 1.5 an integer (hence 3 in this example).
[0307] In the fifth embodiment, as shown in FIG. 21, the device for storing the motion information is as follows.
[0308] A motion information storage device (3000), wherein a current block consists of a first sub-block and a second sub-block, the first sub-block and the second sub-block being separated by a common boundary, the first sub-block corresponding to first motion information, and the second sub-block corresponding to second motion information, the device (3000) comprising: a calculation module (3001) configured to determine a distance between a sample set in the current block and the common boundary; and a comparison module (3002) configured to compare the distance with a threshold to determine whether third motion information is to be stored for the sample set, the third motion information being derived from the first motion information and the second motion information.
[0309] In a possible implementation, the comparison module (3002) is configured to determine that the third motion information is preserved with respect to the sample set if the absolute value of the distance is less than or equal to the threshold value.
[0310] In a possible implementation, if the absolute value of the distance is greater than the threshold, the comparison module (3002) is further configured to determine that the first motion information is to be stored with respect to the sample set if the distance is positive, or to determine that the second motion information is to be stored with respect to the sample set if the distance is negative.
[0311] In a possible implementation, the threshold value is predefined.
[0312] In a possible implementation, the threshold is based on a geometric relationship between the common boundary and a horizontal or vertical direction.
[0313] In a possible implementation, the threshold is based on the angle between the orthogonal direction of the common boundary and the horizontal or vertical direction.
[0314] In a possible implementation, the threshold is based on the width and / or height of the current block.
[0315] In a possible implementation, the common boundary is determined by an angle parameter and a distance parameter, and the calculation module (3001) is further configured to determine the angle parameter and the distance parameter.
[0316] In a possible implementation, in the decoder, the calculation module (3001) is further configured to parse the angle parameters and the distance parameters from the bitstream, or to parse an indicator from the bitstream and obtain the angle parameters and the distance parameters based on the indicator.
[0317] In a possible implementation, the calculation module (3001) is further configured to determine a first calculation parameter based on the angle parameter, calculate a temp angle parameter based on the angle parameter, determine a second calculation parameter based on the temp angle parameter, and calculate a third calculation parameter based on the angle parameter and the distance parameter.
[0318] In a possible implementation, the first calculation parameter is determined by checking a pre-set lookup table according to the angle parameter, and the second calculation parameter is determined by checking the lookup table according to the temp angle parameter, and the first calculation parameter and the second calculation parameter are respectively the cosine value and the sine value of the same angle.
[0319] In a possible implementation, the distance is calculated by: distFromLine=(x+K)*P1+(y+K)*P2-P3 P1, P2, and P3 are the first calculation parameter, the second calculation parameter, and the third calculation parameter, respectively, distFromLine represents the distance, K is a non-negative integer, x represents the horizontal coordinate of the target position in the sample set, y represents the vertical coordinate of the target position in a rectangular coordinate system, the position of the top-left sample of the current block is set as the coordinate origin, the right direction is set as the positive horizontal direction, and the down direction is set as the positive vertical direction.
[0320] In a possible implementation, K is equal to 1.
[0321] In a possible implementation, the target locations are predefined in the sample set.
[0322] In a possible implementation, the predetermined position is the top left position of the sample set or is the center position of the sample set.
[0323] In a possible implementation, the distance has a sample precision of more than an integer number of samples, Correspondingly, the distance is calculated by: distFromLine=((x< <N)+K)*P1+((y<<N)+K)*P2-P3 2N represents the inverse of the sample precision of the distance.
[0324] In a possible implementation, N is equal to 1.
[0325] In a possible implementation, the sample set is the luma sample set of the current block.
[0326] In a possible implementation, the apparatus (3000) further comprises a division module (3003) configured to divide the current block into a plurality of sample sets, each of the plurality of sample sets having the same size as the sample set, or to set the current block as the sample set.
[0327] In a possible implementation, the sample set is a 4x4 sample array.
[0328] In a possible implementation, each of the multiple sample sets corresponds to a respective motion information storage unit, and the motion information storage unit is used to store one of the first motion information, the second motion information, and the third motion information.
[0329] In a possible implementation, the first sub-block and the second sub-block are triangular sections, asymmetric rectangular sections, or trapezoidal sections.
[0330] In a possible implementation, the first motion information includes motion information based on a first reference picture list, the second motion information includes motion information based on a second reference picture list, and the third motion information includes the first motion information and the second motion information.
[0331] In a sixth embodiment, an apparatus for decoding a video stream comprises a processor and a memory, the memory storing instructions for causing the processor to perform a method according to any implementation of the third embodiment.
[0332] In a seventh embodiment, an apparatus for encoding a video stream comprises a processor and a memory, the memory storing instructions for causing the processor to perform a method according to any implementation of the third embodiment.
[0333] In an eighth embodiment, a computer-readable storage medium storing instructions that, when executed, cause one or more processors to be configured to code video data, the instructions causing the one or more processors to perform a method according to any implementation of the third embodiment.
[0334] In a ninth embodiment, a computer program comprising a program code which, when executed on a computer, performs a method according to any implementation of the third embodiment.
[0335] The following is a description of the application of the encoding and decoding methods as shown in the above embodiments and the systems using them.
[0336] 22 is a block diagram showing a content supply system 3100 for realizing a content distribution service. The content supply system 3100 includes a photographing device 3102 and a terminal device 3106, and optionally includes a display 3126. The photographing device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any kind of combination thereof, etc.
[0337] The photographing device 3102 may generate data and encode the data by the encoding method as shown in the above embodiment. Alternatively, the photographing device 3102 may distribute the data to a streaming server (not shown in the figure), which encodes the data and transmits the encoded data to the terminal device 3106. The photographing device 3102 includes, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, as described above, the photographing device 3102 may include the source device 12. If the data includes video, the video encoder 20 included in the photographing device 3102 may actually perform the video encoding process. If the data includes audio (i.e., voice), the audio encoder included in the photographing device 3102 may actually perform the audio encoding process. For some practical scenarios, the photographing device 3102 distributes the encoded video and audio data by multiplexing them together. For other practical scenarios, for example in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed, and the shooting device 3102 delivers the encoded audio data and the encoded video data to the terminal device 3106 separately.
[0338] In the content supply system 3100, the terminal device 310 receives and reproduces the encoded data. The terminal device 3106 can be a device having a data receiving and restoring function, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination thereof, capable of decoding the encoded data described above. For example, as described above, the terminal device 3106 may include the destination device 14. If the encoded data includes video, the video decoder 30 included in the terminal device prioritizes performing video decoding. If the encoded data includes audio, the audio decoder included in the terminal device prioritizes performing audio decoding processing.
[0339] For a terminal device with a display, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or an in-vehicle device 3124, the terminal device can send the decoded data to its display. For a terminal device without a display, such as a STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 is contacted internally to receive and show the decoded data.
[0340] When each device in the system performs encoding or decoding, it can use the picture encoding device or picture decoding device as shown in the above embodiments.
[0341] 23 is a diagram showing an example of the structure of the terminal device 3106. After the terminal device 3106 receives the stream from the shooting device 3102, the protocol processing unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), HyperText Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real Time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof, etc.
[0342] After the protocol processing unit 3202 processes the stream, a stream file is generated. The file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As mentioned above, for some practical scenarios, for example, in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.
[0343] Through the demultiplexing process, a video elementary stream (ES), an audio ES, and optionally subtitles are generated. As described in the above embodiment, the video decoder 3206 including the video decoder 30 decodes the video ES by the decoding method as shown in the above embodiment to generate video frames, and sends this data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames, and sends this data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in FIG. 23) before sending them to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in FIG. 23) before sending them to the synchronization unit 3212.
[0344] The synchronization unit 3212 synchronizes the video and audio frames and provides the video / audio to the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information, which may be coded in a syntax with timestamps for the presentation of the coded audio and visual data and timestamps for the delivery of the data stream itself.
[0345] If the stream contains subtitles, the subtitle decoder 3210 decodes the subtitles, synchronizes them with the video and audio frames, and provides the video / audio / subtitles to a video / audio / subtitle display 3216 .
[0346] The present application is not limited to the above-mentioned system, and either the picture encoding device or the picture decoding device in the above-mentioned embodiments can be incorporated into other systems, for example a car system.
[0347] [Mathematical Operators] The mathematical operators used in this application are similar to those used in the C programming language. However, the results of integer division and arithmetic shift operations are more precisely defined, and additional operations such as exponentiation and real-valued division are defined. Numbering and counting conventions generally start at zero, e.g., "first" is equivalent to number 0, "second" is equivalent to number 1, and so on.
[0348] [Arithmetic operators] The following arithmetic operators are defined as follows: [Table 6]
[0349] [Logical Operators] The following logical operators are defined as follows: x&&y The Boolean logic "and" of x and y x||y The Boolean "or" of x and y ! Boolean logic "not" x?y:zIf x is true or not equal to 0, evaluates to the value of y, else evaluates to the value of z.
[0350] [Relational Operator] The following relational operators are defined as follows: > Greater than >= Greater than or equal to < Less than <= Less than or equal == equal to != not equal When a relational operator is applied to a syntax element or variable that has been assigned the value "na" (not applicable), the value "na" is treated as the distinct value of that syntax element or variable. The value "na" is considered not equal to any other value.
[0351] [Bitwise Operators] The following bitwise operators are defined as follows: & Bitwise "and". When acting on integer arguments, it acts on the two's complement representation of the integer value. When acting on a binary argument that contains fewer bits than another argument, the shorter argument is extended by adding higher-order bits equal to 0. | Bitwise "or". When acting on integer arguments, it acts on the two's complement representation of the integer value. When acting on a binary argument that contains fewer bits than another argument, the shorter argument is extended by adding higher-order bits equal to 0. ^ Bitwise "exclusive or". When acting on integer arguments, it acts on the two's complement representation of the integer value. When acting on a binary argument that contains 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 integer representation of x by the number of bits in y. This function is defined only for non-negative integer values of y. The bits shifted into the most significant bit (MSB) as a result of the right shift have the same value as the MSB of x before the shift operation. x<<y Arithmetic left shift of the two's complement integer representation of x by the number of bits in y. This function is defined only for non-negative integer values of y. The bits shifted into the least significant bit (LSB) as a result of the left shift have a value equal to 0.
[0352] [Assignment operator] The following arithmetic operators are defined as follows. = Assignment operator ++ Increment, i.e., x++ is equivalent to x=x+1 and, when used in an array index, 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 in an array index, 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, x-=(-3) is equivalent to x=x-(-3).
[0353] [Range notation] The following notation is used to specify ranges of values: x=y..zx runs from y to z (inclusive), where x, y, and z are integers and z is greater than y.
[0354] [Mathematical Functions] The following mathematical functions are defined:
number
number
number
number
number
number
number
number
[0355] [Order of operation precedence] When the order of precedence in a mathematical expression is not explicitly indicated by the use of parentheses, the following rules apply:
[0356] - An operation with higher precedence is evaluated before any operation with lower precedence.
[0357] - Operations of equal precedence are evaluated in order from left to right.
[0358] The table below specifies the priority of operations from highest to lowest, with a higher position in the table indicating a higher priority.
[0359] For operators that are also used in the C programming language, the order of precedence used herein is the same as that used in the C programming language. Table: Operation precedence from highest (top of table) to lowest (bottom of table) [Table 7]
[0360] [Textual explanation of logical operations] In the text, logical statements are written mathematically in the following form: if(condition 0) statement 0 else if(condition 1) statement 1 ... else / *Notes about remaining conditions* / statement n can be written as follows: ...as follows / ...the following applies: - If condition 0, statement 0 - Otherwise, if condition 1, statement 1 - ... - Otherwise (reference notes for remaining conditions), statement n
[0361] Each "If...Otherwise, if...Otherwise,..." statement in the text is introduced with "...as follows" or "...the following applies" immediately followed by "If...". The last condition in an "If...Otherwise, if...Otherwise,..." is always "Otherwise,...". Interleaved "If...Otherwise, if...Otherwise,..." statements can be identified by matching the "...as follows" or "...the following applies" with the trailing "Otherwise,...".
[0362] In the text, logical statements are written mathematically in the following form: if(condition 0a && condition 0b) statement 0 else if(condition 1a || condition 1b) statement 1 ... else statement n can be written as follows: ...as follows / ...the following applies: - statement 0, if all of the following conditions are true: - condition 0a - condition 0b - Otherwise, if one or more of the following conditions are true, statement 1: - condition 1a - condition 1b - ... - Otherwise, statement n
[0363] In the text, logical statements are written mathematically in the following form: if(condition 0) statement 0 if(condition 1) statement 1 can be written as follows: When condition 0, statement 0 When condition 1, statement 1.
[0364] The embodiments of, e.g., the encoder 20 and the decoder 30, and the functions described herein with reference to, e.g., the encoder 20 and the decoder 30, may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on a computer-readable medium or transmitted over a communication medium as one or more instructions or code and executed by a hardware-based processing unit. A 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 transfer of a computer program from one place to another, e.g., according to a communication protocol. Thus, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0365] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is referred to as a computer-readable medium, as appropriate. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead refer to non-transitory, tangible storage media. Disk and disc as used herein include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where typically a disk is one that reproduces data magnetically and a disc is one that reproduces data optically by a laser. Combinations of the above should also be included within the scope of computer readable media.
[0366] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, the term "processor" as used herein may refer to any of the foregoing structures, or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Additionally, the techniques may be implemented entirely in one or more circuits or logic elements.
[0367] The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a set of ICs (e.g., a chipset). Although various components, modules, or units are described in this disclosure to highlight functional aspects of devices configured to perform the disclosed techniques, realization by different hardware units is not necessarily required. Rather, the various units may be combined into a codec hardware unit in conjunction with suitable software and / or firmware, as described above, or may be provided by a collection of interoperable hardware units including one or more processors, as described above. (Item 1) A motion information preservation method, wherein a current block is composed of a first sub-block and a second sub-block, the first sub-block and the second sub-block are separated by a common boundary, the first sub-block corresponds to first motion information, and the second sub-block corresponds to second motion information, the method comprising: determining a distance between a set of samples in the current block and the common boundary; comparing the distance to a threshold to determine whether third motion information is saved for the sample set, the third motion information being derived from the first motion information and the second motion information; The motion information storage method comprises: (Item 2) comparing the distance to a threshold to determine whether the third motion information is to be saved for the sample set, comprising: determining that the third motion information is stored for the sample set if the absolute value of the distance is less than or equal to the threshold; The method according to item 1, comprising: (Item 3) If the absolute value of the distance is greater than the threshold, the method further comprises: determining that the first motion information is preserved for the sample set if the distance is positive; or determining that the second motion information is preserved for the sample set if the distance is negative; The method of claim 2, further comprising: (Item 4) 4. The method according to any one of items 1 to 3, wherein the threshold value is determined in advance. (Item 5) 5. The method according to any one of claims 1 to 4, wherein the threshold is based on a geometric relationship between the common boundary and a horizontal or vertical direction. (Item 6) 6. The method of claim 5, wherein the threshold is based on an angle between an orthogonal direction of the common boundary and the horizontal or vertical direction. (Item 7) 7. The method according to any one of claims 1 to 6, wherein the threshold is based on a width and / or a height of the current block. (Item 8) The common boundary is determined by an angle parameter and a distance parameter, and before determining the distance between the set of samples in the current block and the common boundary, the method comprises: determining said angle parameters and said distance parameters; The method according to any one of items 1 to 7, further comprising: (Item 9) In a decoder, the step of determining said angle parameters and said distance parameters comprises: parsing said angle parameters and said distance parameters from a bitstream; or parsing an indicator from the bitstream; obtaining the angle parameter and the distance parameter based on the indicator; The method according to item 8, comprising: (Item 10) After the steps of determining the angle parameter and the distance parameter, the method further comprises: determining a first calculation parameter based on the angle parameter; calculating a temp angle parameter based on the angle parameter; determining a second calculation parameter based on the temp angle parameter; calculating a third calculation parameter based on the angle parameter and the distance parameter; 10. The method according to item 8 or 9, further comprising: (Item 11) 11. The method according to claim 10, wherein the first calculation parameter is determined by checking a pre-set lookup table according to the angle parameter, and the second calculation parameter is determined by checking the lookup table according to the temp angle parameter, and the first calculation parameter and the second calculation parameter are respectively a cosine value and a sine value of the same angle. (Item 12) The distance is calculated as follows: distFromLine=(x+K)*P1+(y+K)*P2-P3 12. The method according to item 10 or 11, wherein P1, P2, and P3 are the first calculation parameter, the second calculation parameter, and the third calculation parameter, respectively, distFromLine represents the distance, K is a non-negative integer, x represents the horizontal coordinate of a target position in the sample set, y represents the vertical coordinate of the target position in a rectangular coordinate system, the position of the top-left sample of the current block is set as the coordinate origin, the right direction is set as the positive horizontal direction, and the downward direction is set as the positive vertical direction. (Item 13) 13. The method according to item 12, wherein K is equal to 1. (Item 14) 14. The method according to claim 12 or 13, wherein the target locations are predetermined in the sample set. (Item 15) Item 15. The method according to item 14, wherein the predetermined position is the upper left position of the sample set or the center position of the sample set. (Item 16) The sample precision of the above distances is higher than integer samples, Correspondingly, the distance is calculated by: distFromLine=((x< <N)+K)*P1+((y<<N)+K)*P2-P3 2 N 16. The method according to any one of items 12 to 15, wherein represents the reciprocal of the sample precision of the distance. (Item 17) 14. The method according to item 13, wherein N is equal to 1. (Item 18) 18. The method according to any one of items 1 to 17, wherein the sample set is a luma sample set of the current block. (Item 19) Prior to determining the distance between the set of samples in the current block and the common boundary, the method further comprises: Dividing the current block into a plurality of sample sets, each of the plurality of sample sets having the same size as the current block; or setting the current block as the sample set; 19. The method according to any one of items 1 to 18, further comprising: (Item 20) 20. The method according to any one of items 1 to 19, wherein the sample set is a 4x4 sample array. (Item 21) 20. The method of claim 18 or 19, wherein each of the plurality of sample sets corresponds to a respective motion information storage unit, and the motion information storage unit is used to store one of the first motion information, the second motion information, and the third motion information. (Item 22) 22. The method according to any one of items 1 to 21, wherein the first sub-block and the second sub-block are triangular sections, trapezoidal sections, or asymmetric rectangular sections. (Item 23) A method according to any one of items 1 to 22, wherein the first motion information includes motion information based on a first reference picture list, the second motion information includes motion information based on a second reference picture list, and the third motion information includes the first motion information and the second motion information. (Item 24) A motion information storage device, wherein a current block is composed of a first sub-block and a second sub-block, the first sub-block and the second sub-block are separated by a common boundary, the first sub-block corresponds to first motion information, and the second sub-block corresponds to second motion information, the device comprising: a calculation module configured to determine a distance between a set of samples in the current block and the common boundary; a comparison module configured to compare the distance to a threshold to determine whether third motion information is saved for the sample set, the third motion information being derived from the first motion information and the second motion information; and A motion information storage device comprising: (Item 25) The comparison module is: determining that the third motion information is stored with respect to the sample set if the absolute value of the distance is less than or equal to the threshold; 25. The apparatus according to item 24, configured as follows. (Item 26) If the absolute value of the distance is greater than the threshold, the comparison module: If the distance is positive, determining that the first motion information is preserved for the sample set; or determining that the second motion information is preserved with respect to the sample set if the distance is negative; 26. The apparatus of item 25, further configured as follows: (Item 27) 27. The device according to any one of items 24 to 26, wherein the threshold value is determined in advance. (Item 28) 28. The apparatus of any one of claims 24 to 27, wherein the threshold is based on a geometric relationship between the common boundary and a horizontal or vertical direction. (Item 29) 29. The apparatus of claim 28, wherein the threshold is based on an angle between an orthogonal direction of the common boundary and the horizontal or vertical direction. (Item 30) 30. The apparatus of any one of items 24 to 29, wherein the threshold is based on a width and / or height of the current block. (Item 31) The common boundary is determined by an angle parameter and a distance parameter, and the calculation module: determining said angle parameter and said distance parameter; The device according to any one of items 24 to 30, further configured as follows. (Item 32) In the decoder, the calculation module Parsing said angle parameters and said distance parameters from a bitstream; or Parse the indicator from the bitstream, obtaining the angle parameter and the distance parameter based on the indicator; 32. The apparatus of claim 31, further configured as follows: (Item 33) The calculation module is determining a first calculation parameter based on the angle parameter; Calculate the temp angle parameter based on the above angle parameters; determining a second calculation parameter based on the temp angle parameter; Calculating a third calculation parameter based on the angle parameter and the distance parameter. 33. The apparatus according to item 31 or 32, further comprising: (Item 34) Item 34. The apparatus of item 33, wherein the first calculation parameter is determined by checking a pre-set lookup table according to the angle parameter, and the second calculation parameter is determined by checking the lookup table according to the temp angle parameter, and the first calculation parameter and the second calculation parameter are respectively a cosine value and a sine value of the same angle. (Item 35) The distance is calculated as follows: distFromLine=(x+K)*P1+(y+K)*P2-P3 35. The apparatus of claim 33 or 34, wherein P1, P2, and P3 are the first calculation parameter, the second calculation parameter, and the third calculation parameter, respectively, distFromLine represents the distance, K is a non-negative integer, x represents the horizontal coordinate of a target position in the sample set, y represents the vertical coordinate of the target position in a rectangular coordinate system, the position of the top-left sample of the current block is set as the coordinate origin, the right direction is set as the positive horizontal direction, and the downward direction is set as the positive vertical direction. (Item 36) 36. The apparatus according to item 35, wherein K is equal to 1. (Item 37) 37. The apparatus of claim 35 or 36, wherein the target locations are predetermined in the sample set. (Item 38) Item 38. The apparatus of item 37, wherein the predetermined position is the top left position of the sample set or the center position of the sample set. (Item 39) The sample precision of the above distances is higher than integer samples, Correspondingly, the distance is calculated by: distFromLine=((x< <N)+K)*P1+((y<<N)+K)*P2-P3 2 N represents the reciprocal of the sample precision of the distance. (Item 40) 37. The apparatus according to item 36, wherein N is equal to 1. (Item 41) 41. The apparatus of any one of claims 24 to 40, wherein the sample set is a luma sample set of the current block. (Item 42) The device comprises: Dividing the current block into a plurality of sample sets, each of the plurality of sample sets having the same size as the sample set; or Set the current block as the sample set; 42. The apparatus according to any one of items 24 to 41, further comprising a division module configured as follows: (Item 43) 43. The apparatus of any one of items 24 to 42, wherein the sample set is a 4x4 sample array. (Item 44) Item 44. The apparatus of item 42 or 43, wherein each of the plurality of sample sets corresponds to a respective motion information storage unit, and the motion information storage unit is used to store one of the first motion information, the second motion information, and the third motion information. (Item 45) 45. The device according to any one of items 24 to 44, wherein the first sub-block and the second sub-block are triangular sections, asymmetric rectangular sections, or trapezoidal sections. (Item 46) An apparatus described in any one of items 24 to 45, wherein the first motion information includes motion information based on a first reference picture list, the second motion information includes motion information based on a second reference picture list, and the third motion information includes the first motion information and the second motion information. (Item 47) An apparatus for decoding a video stream comprising a processor and a memory, the memory storing instructions for causing the processor to perform a method according to any one of items 1 to 23. (Item 48) An apparatus for encoding a video stream comprising a processor and a memory, the memory storing instructions for causing the processor to perform a method according to any one of items 1 to 23. (Item 49) A computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to be configured to code video data, the instructions causing the one or more processors to perform a method according to any one of items 1 to 23. (Item 50) 24. A computer program comprising a program code for performing the method according to any one of items 1 to 23, when the computer program is executed on a computer. (Item 51) A computer-readable medium comprising a bitstream encoded / decoded by the method according to any one of items 1 to 23.
Claims
1. receiving a bitstream, the bitstream including coded data and an indicator of a current block, the current block being separated into a first sub-block and a second sub-block by a common boundary, the first sub-block corresponding to a first predicted value and the second sub-block corresponding to a second predicted value, the common boundary being a dividing line in a geometric partitioning mode; parsing the indicator from the bitstream; obtaining an angle parameter and a distance parameter based on the indicator, the angle parameter specifying an angle index of the geometric partitioning mode and the distance parameter specifying a distance index of the geometric partitioning mode; determining a distance between a sample set in the current block and the common boundary based on the angle parameter and the distance parameter by checking a predefined lookup table; obtaining a first weighting factor according to the distance; obtaining a second weighting factor according to the first weighting factor; obtaining a combined predicted value for the current block by using the first predicted value, the second predicted value, the first weighting factor, and the second weighting factor; Equipped with The first weighting factor is calculated by using the following formula: sampleWeight1=Clip3(0,8,f(sample_dist)) A decoding method, wherein the sampleWeight1 represents the first weighting coefficient, the sample_dist represents the distance, and f(sample_dist) represents a function having sample_dist as an input.
2. the angle parameter is angleIdx, the distance parameter is distanceIdx, determining the distance based on the angle parameter and the distance parameter by checking a predefined lookup table, calculating said distance by using the formula: distFromLine=((x<<N)+K)*P1+((y<<N)+K)*P2-P3 2. The decoding method of claim 1, wherein distFroM Line represents the distance, K is a non-negative integer, N=1, P1, P2, and P3 are a first calculation parameter, a second calculation parameter, and a third calculation parameter, respectively, wherein the first calculation parameter is determined by checking the pre-set lookup table according to the angleIdx, the second calculation parameter is determined by checking the lookup table according to (angleIdx+8)%32, and the third calculation parameter is determined based on the angleIdx and the distanceIdx.
3. The decoding method of claim 1 or 2, further comprising a step of comparing the distance with a threshold to determine whether to save third motion information for the sample set, wherein the first sub-block corresponds to first motion information, the second sub-block corresponds to second motion information, and the third motion information is derived from the first motion information and the second motion information.
4. The decoding method of claim 3, wherein the step of comparing the distance with the threshold to determine whether to store the third motion information for the sample set includes the step of determining to store the third motion information for the sample set if the absolute value of the distance is less than or equal to the threshold.
5. If the absolute value of the distance is greater than the threshold, the decoding method comprises: determining that the first motion information is preserved for the sample set if the distance is positive; or determining that the second motion information is preserved for the sample set if the distance is negative; The decoding method according to claim 3 or 4, further comprising:
6. The decoding method according to any one of claims 3 to 5, wherein the threshold value is predetermined.
7. The step of obtaining the second weighting factor according to the first weighting factor includes: calculating the second weighting factor according to the following formula: sampleWeight2=T-sampleWeight1 7. The decoding method according to claim 1, wherein the sampleWeight1 represents the first weighting factor, the sampleWeight2 represents the second weighting factor, and T is a predefined constant.
8. 8. The decoding method of claim 7, wherein T is equal to 8.
9. a receiving module configured to receive a bitstream, the bitstream including coded data and an indicator of a current block, the current block being separated into a first sub-block and a second sub-block by a common boundary, the first sub-block corresponding to a first predicted value and the second sub-block corresponding to a second predicted value, the common boundary being a dividing line of a geometric partitioning mode; a parsing module configured to parse the indicator from the bitstream; an acquisition module configured to acquire an angle parameter and a distance parameter based on the indicator, the angle parameter specifying an angle index of the geometric partitioning mode and the distance parameter specifying a distance index of the geometric partitioning mode; and a calculation module configured to determine a distance between a sample set in the current block and the common boundary based on the angle parameter and the distance parameter by checking a pre-configured lookup table; The acquisition module further comprises: Obtaining a first weighting factor according to the distance; Obtaining a second weighting factor according to the first weighting factor; Obtain a combined predicted value for the current block by using the first predicted value, the second predicted value, the first weighting factor, and the second weighting factor. It is configured as follows: The first weighting factor is calculated by using the following formula: sampleWeight1=Clip3(0,8,f(sample_dist)) A decoding device, wherein the sampleWeight1 represents the first weighting coefficient, the sample_dist represents the distance, and f(sample_dist) represents a function having sample_dist as an input.
10. the angle parameter is angleIdx, the distance parameter is distanceIdx, The computing module further comprises: configured to calculate the distance by using the following formula: distFromLine=((x<<N)+K)*P1+((y<<N)+K)*P2-P3 10. The decoding device of claim 9, wherein distFroM Line represents the distance, K is a non-negative integer, N=1, P1, P2, and P3 are a first calculation parameter, a second calculation parameter, and a third calculation parameter, respectively, wherein the first calculation parameter is determined by checking the pre-set lookup table according to the angleIdx, the second calculation parameter is determined by checking the lookup table according to (angleIdx+8)%32, and the third calculation parameter is determined based on the angleIdx and the distanceIdx.
11. The decoding device of claim 9 or 10, further comprising a comparison module configured to compare the distance with a threshold to determine whether to store third motion information for the sample set, wherein the first sub-block corresponds to first motion information, the second sub-block corresponds to second motion information, and the third motion information is derived by the first motion information and the second motion information.
12. The decoding device according to claim 11, wherein the comparison module is configured to decide to store the third motion information with respect to the sample set if the absolute value of the distance is less than or equal to the threshold.
13. If the absolute value of the distance is greater than the threshold, the decoding apparatus further determining that the first motion information is preserved for the sample set if the distance is positive; or determining that the second motion information is preserved for the sample set if the distance is negative; A decoding device according to claim 11 or 12, configured so as to
14. The acquisition module further comprises: configured to calculate the second weighting factor according to the following formula: sampleWeight2=T-sampleWeight1 The decoding device according to any one of claims 9 to 13, wherein the sampleWeight1 represents the first weighting factor, the sampleWeight2 represents the second weighting factor, and T is a predefined constant.
15. 15. A decoding device according to claim 14, wherein T is equal to 8.
16. encoding the current block and an indicator into a bitstream, the current block being separated into a first sub-block and a second sub-block by a common boundary, the first sub-block corresponding to a first predicted value and the second sub-block corresponding to a second predicted value, the common boundary being a division line of a geometric partitioning mode, the indicator being used to obtain an angle parameter and a distance parameter, the angle parameter specifying an angle index of the geometric partitioning mode and the distance parameter specifying a distance index of the geometric partitioning mode; determining a distance between a sample set in the current block and the common boundary based on the angle parameter and the distance parameter by checking a predefined lookup table; obtaining a first weighting factor according to the distance; obtaining a second weighting factor according to the first weighting factor; obtaining a combined predicted value for the current block by using the first predicted value, the second predicted value, the first weighting factor, and the second weighting factor; Equipped with The first weighting factor is calculated by using the following formula: sampleWeight1=Clip3(0,8,f(sample_dist)) An encoding method, wherein the sampleWeight1 represents the first weighting coefficient, the sample_dist represents the distance, and f(sample_dist) represents a function that takes sample_dist as an input.
17. The step of obtaining the second weighting factor according to the first weighting factor includes: calculating the second weighting factor according to the following formula: sampleWeight2=T-sampleWeight1 17. The encoding method of claim 16, wherein sampleWeight1 represents the first weighting factor, sampleWeight2 represents the second weighting factor, and T is a predefined constant.
18. 20. The method of claim 17, wherein T is equal to eight.
19. the angle parameter is angleIdx, the distance parameter is distanceIdx, determining the distance based on the angle parameter and the distance parameter by checking a predefined lookup table, calculating said distance by using the formula: distFromLine=((x<<N)+K)*P1+((y<<N)+K)*P2-P3 19. The encoding method according to claim 16, wherein distFroM Line represents the distance, K is a non-negative integer, N=1, P1, P2, and P3 are a first calculation parameter, a second calculation parameter, and a third calculation parameter, respectively, wherein the first calculation parameter is determined by checking the pre-set lookup table according to the angleIdx, the second calculation parameter is determined by checking the lookup table according to (angleIdx+8)%32, and the third calculation parameter is determined based on the angleIdx and the distanceIdx.
20. 20. The encoding method of claim 16, further comprising a step of comparing the distance with a threshold to determine whether to save third motion information for the sample set, the first sub-block corresponding to first motion information, the second sub-block corresponding to second motion information, and the third motion information being derived by the first motion information and the second motion information.
21. An apparatus for encoding a video bitstream comprising a processor and a memory, said memory storing instructions causing said processor to perform the encoding method of any one of claims 16 to 20.
22. 1. A method for storing a bitstream, comprising: receiving one or more bitstreams via at least one receiver; storing the one or more bitstreams in at least one memory, the bitstream including coded data and an indicator of a current block; the current block is separated into a first sub-block and a second sub-block by a common boundary, the first sub-block corresponds to a first predicted value and the second sub-block corresponds to a second predicted value, the common boundary is a dividing line of a geometric partitioning mode, the indicator is used to obtain an angle parameter and a distance parameter, the angle parameter specifies an angle index of the geometric partitioning mode, and the distance parameter specifies a distance index of the geometric partitioning mode; the angle parameter and the distance parameter are used to determine a distance between a sample set in the current block and the common boundary by checking a pre-configured lookup table, the distance is used to obtain a first weighting factor, the first weighting factor is used to obtain a second weighting factor, and the first predicted value, the second predicted value, the first weighting factor, and the second weighting factor are used to obtain a combined predicted value for the current block; The first weighting factor is calculated by using the following formula: sampleWeight1=Clip3(0,8,f(sample_dist)) The sampleWeight1 represents the first weighting coefficient, the sample_dist represents the distance, and f(sample_dist) represents a function that takes sample_dist as an input. method.
Citation Information
Patent Citations
High dynamic range image processing
JP2018088691A
Block partitioning methods for video coding
WO2021030019A1