Encoder, decoder and corresponding method for signaling high level syntax
The method of conditionally signaling deblocking control parameters for chroma components in video coding addresses inefficiencies in existing technologies, enhancing decoding efficiency and bitstream utilization while maintaining picture quality.
Patent Information
- Application Number
- JP2025042443
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-03-31
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-01-15
AI Technical Summary
Existing video coding technologies face challenges in efficiently compressing and decompressing video data without sacrificing picture quality, particularly in scenarios with limited network bandwidth or storage resources, necessitating improved compression techniques for chroma components.
A method and apparatus for conditionally signaling deblocking control parameters for chroma components in video coding, utilizing syntax elements to determine parameter values from bitstreams, and applying preset values when specific conditions are met, such as when the chroma format is (4:0:0 or 4:4:4 with separate color plane coding modes, thereby optimizing bitstream utilization and decoding efficiency.
Enhances decoding efficiency by reducing unnecessary signaling of deblocking control parameters for chroma components, improving the utilization of bitstreams, and maintaining picture quality during compression and decompression processes.
Smart Images

Figure 2025106286000001_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application (disclosure) generally relate to the field of picture processing, and more particularly, to syntax signaling.
Background Art
[0002] Video coding (video encoding and decoding) is used in a wide range of digital video applications, such as broadcast digital TV, video transmission over the Internet and mobile networks, real-time conversation applications such as video chat, videoconferencing, DVDs and Blu-ray discs, video content acquisition and editing systems, and camcorders for security applications.
[0003] The amount of video data required to depict even relatively short videos can be quite large, which can pose difficulties when the data is to be streamed or otherwise transmitted over a communication network with limited bandwidth capacity. Therefore, video data is generally compressed before being transmitted over modern communication networks. The size of the video can also be a problem when the video is stored on a storage device, as the memory resources may be limited. In many cases, video compression devices 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 the digital video image. Then, the compressed data is received at the destination by a video decompression device that decodes the video data. Due to limited network resources and the ever-increasing demand for higher video quality, improved compression and decompression techniques that increase the compression ratio with little or no sacrifice in picture quality are desirable.
Summary of the Invention
Means for Solving the Problems
[0004] Embodiments of the present application provide an apparatus and method for encoding and decoding according to the independent claims.
[0005] The above and other objects are achieved by the subject matter of the independent claims. Further implementation forms are apparent from the dependent claims, the description, and the drawings.
[0006] Specific embodiments are outlined in the appended independent claims, and other embodiments are shown in the dependent claims.
[0007] A first aspect of the present invention is a coding method implemented by a decoding device, the method including: obtaining a value of a syntax element from a bitstream, where the value of the syntax element is related to a deblocking control parameter for a chroma component of a slice of a coded picture; and when the value of the syntax element is equal to a preset value, parsing a value of the deblocking control parameter for the chroma component of the slice from the bitstream, where the preset value is an integer value. In an example, the preset value is not equal to 0. In an example, the preset value is 1.
[0008] In one implementation, the method further includes executing a deblocking process on blocks within the slice according to the value of the deblocking control parameter.
[0009] According to an embodiment of the present invention, a signaling method for deblocking control parameters is disclosed, and the deblocking control parameters for the chroma component are conditionally signaled. When the chroma format is (4:0:0 or (4:4:4 and a separate color plane coding mode is used)), the deblocking control parameters for the chroma component are not signaled in the bitstream. Therefore, the utilization of the bitstream and the decoding efficiency are improved.
[0010] In one implementation, the value of the syntax element is obtained from the picture parameter set PPS.
[0011] In one implementation, the value of the deblocking control parameter is obtained from the PPS.
[0012] In one implementation, the value of the deblocking control parameter is obtained from the picture header PH.
[0013] In one implementation, the value of the deblocking control parameter is obtained from the slice header SH.
[0014] In one implementation, when there is no color component in the video sequence, the value of the syntax element is equal to 0.
[0015] In one implementation, the deblocking control parameter is signaled only when the video sequence has a color component.
[0016] In one implementation, the value of the syntax element is used to determine whether the deblocking control parameter for the luma component of the slice is the same as the deblocking control parameter for the chroma component of the slice.
[0017] In one implementation, the method further includes the step of setting the value of the deblocking control parameter for the chroma component of the slice to be equal to the value of the deblocking control parameter for the luma component of the slice when the value of the syntax element is not equal to a preset value.
[0018] In one implementation, the value of the deblocking control parameter is a preset deblocking parameter offset applied to the joint Cb-Cr component of the slice.
[0019] A second aspect of the present invention provides a video decoding apparatus, the apparatus comprising an analysis module configured to obtain a value of a syntax element from a bitstream, the value of the syntax element being related to a deblocking control parameter for a chroma component of a slice of a coded picture, the analysis module being configured to obtain a value of the deblocking control parameter for the chroma component of the slice from the bitstream when the value of the syntax element is equal to a preset value, the preset value being an integer value.
[0020] In one implementation, the decoding apparatus further comprises a receiving module configured to obtain a bitstream.
[0021] In one implementation, the decoding apparatus further comprises a deblocking module configured to perform a deblocking process on blocks within a slice according to a value of the deblocking control parameter.
[0022] According to an embodiment of the present invention, a signaling method for a deblocking control parameter is disclosed, and the deblocking control parameter for a chroma component is conditionally signaled. When the chroma format is (4:0:0 or (4:4:4 and separate color plane coding modes are used)), the deblocking control parameter for the chroma component is not signaled within the bitstream. Therefore, the utilization of the bitstream and the decoding efficiency are improved.
[0023] In one implementation, the value of the syntax element is obtained from a picture parameter set PPS.
[0024] In one implementation, the value of the deblocking control parameter is obtained from PPS.
[0025] In one implementation, the value of the deblocking control parameter is obtained from a picture header PH.
[0026] In one implementation, the value of the deblocking control parameter is obtained from the slice header SH.
[0027] In one implementation, when there is no color component in the video sequence, the value of the syntax element is equal to 0.
[0028] In one implementation, the deblocking control parameter is signaled only when the video sequence has a color component.
[0029] In one implementation, the value of the syntax element is used to determine whether the deblocking control parameter for the luma component of the slice is the same as the deblocking control parameter for the chroma component of the slice.
[0030] In one implementation, the analysis module is further configured to set the value of the deblocking control parameter for the chroma component of the slice to be equal to the value of the deblocking control parameter for the luma component of the slice when the value of the syntax element is not equal to a preset value.
[0031] In one implementation, the value of the deblocking control parameter is a preset deblocking parameter offset applied to the slice's parity Cb - Cr component.
[0032] A third aspect of the present invention is a coding method implemented by an encoding device, A step of determining a value of a syntax element related to a slice of a coded picture, the step comprising: when the value of the syntax element is related to a deblocking control parameter for a chroma component of the slice; and a step of encoding a value of a deblocking control parameter for a chroma component of a coding block into a bitstream when it is determined that the value of the syntax element is equal to a preset value, the preset value being an integer value. In an example, the preset value is not equal to 0. In an example, the preset value is 1.
[0033] According to an embodiment of the present invention, a signaling method of a deblocking control parameter is disclosed, and the deblocking control parameter for a chroma component is conditionally signaled. When the chroma format is (4:0:0 or (4:4:4 and a separate color plane coding mode is used)), the deblocking control parameter for the chroma component is not signaled in the bitstream. Therefore, the utilization and decoding efficiency of the bitstream are improved.
[0034] In one implementation, the value of the syntax element is signaled in the PPS.
[0035] In one implementation, the value of the deblocking control parameter is signaled in the PPS.
[0036] In one implementation, the value of the deblocking control parameter is signaled in the picture header PH.
[0037] In one implementation, the value of the deblocking control parameter is signaled in the slice header SH.
[0038] In one implementation, when there is no color component in the video sequence, the value of the syntax element is determined to be equal to 0.
[0039] In one implementation, the deblocking control parameter is signaled only when the video sequence has color components.
[0040] In one implementation, the value of the syntax element is used to determine whether the deblocking control parameter for the luma component of the slice is the same as the deblocking control parameter for the chroma component of the slice.
[0041] In one implementation, the value of the deblocking control parameter is a preset deblocking parameter offset applied to the slice's parity Cb-Cr component.
[0042] A fourth aspect of the present invention provides a video encoding device, the video encoding device being a determination module configured to determine the value of a syntax element related to a slice of a coded picture, the determination module being such that the value of the syntax element is related to the deblocking control parameter for the chroma component of the slice, and a processing module configured to encode the value of the deblocking control parameter for the chroma component of the slice into a bitstream when it is determined that the value of the syntax element is equal to a preset value, the preset value being an integer value. In an example, the preset value is not equal to 0. In an example, the preset value is 1.
[0043] According to an embodiment of the present invention, a signaling method for the deblocking control parameter is disclosed, and the deblocking control parameter for the chroma component is signaled conditionally. When the chroma format is (4:0:0 or (4:4:4 and separate color plane coding mode is used)), the deblocking control parameter for the chroma component is not signaled in the bitstream. Therefore, the utilization of the bitstream and the decoding efficiency are improved.
[0044] In one implementation, the value of the syntax element is signaled within the PPS.
[0045] In one implementation, the value of the deblocking control parameter is signaled within the PPS.
[0046] In one implementation, the value of the deblocking control parameter is signaled within the picture header PH.
[0047] In one implementation, the value of the deblocking control parameter is signaled within the slice header SH.
[0048] In one implementation, when there is no color component in the video sequence, the value of the syntax element is determined to be equal to 0.
[0049] In one implementation, the deblocking control parameter is signaled only when the video sequence has a color component.
[0050] In one implementation, the value of the syntax element is used to determine whether the deblocking control parameter for the luma component of the slice is the same as the deblocking control parameter for the chroma component of the slice.
[0051] In one implementation, the value of the deblocking control parameter is a preset deblocking parameter offset applied to the slice's uniform Cb - Cr component.
[0052] The fifth aspect of the present invention provides a decoder including a processing circuit for executing the method according to any one of the first aspect and the implementations of the first aspect.
[0053] The sixth aspect of the present invention provides a computer program product including program code for executing the method according to any one of the first aspect, the third aspect, and the implementations of the first aspect and the third aspect when executed on a computer or a processor.
[0054] A seventh aspect of the present invention provides a decoder including one or more processors and a non-transitory computer-readable storage medium coupled to the processors and storing programming for execution by the processors, the programming configuring the decoder to execute a method according to any one of the first aspect and the third aspect and any one of the implementations of the first aspect and the third aspect when executed by the processors.
[0055] An eighth aspect of the present invention provides a non-transitory computer-readable medium carrying program code that causes a computer device to execute a method according to any one of the first aspect and the third aspect and any one of the implementations of the first aspect and the third aspect when executed by the computer device.
[0056] A ninth aspect of the present invention provides an encoder including a processing circuit for executing a method according to any one of the third aspect and the implementations of the third aspect.
[0057] A tenth aspect of the present invention provides an encoder including one or more processors and a non-transitory computer-readable storage medium coupled to the processors and storing programming for execution by the processors, the programming configuring the decoder to execute a method according to any one of the third aspect and any one of the implementations of the third aspect when executed by the processors.
[0058] An eleventh aspect of the present invention provides a non-transitory storage medium including a bitstream encoded / decoded by the method of any one of the above-described embodiments.
[0059] A twelfth aspect of the present invention provides an encoded bitstream of a video signal by including a plurality of syntax elements, the plurality of syntax elements including at least deblocking control parameters for a chroma component that are conditionally signaled based on the value of the syntax element, the value of the syntax element being related to the deblocking control parameters for the chroma component of a slice of a coded picture.
[0060] A thirteenth aspect of the present invention provides a non-transitory storage medium including an encoded bitstream decoded by an image decoding device, the bitstream being generated by dividing a frame of a video signal or an image signal into a plurality of blocks, the bitstream including a plurality of syntax elements, the plurality of syntax elements including at least deblocking control parameters for a chroma component that are conditionally signaled based on the value of the syntax element, the value of the syntax element being related to the deblocking control parameters for the chroma component of a slice of a coded picture.
[0061] The method according to the first aspect of the present invention can be executed by the apparatus according to the second aspect of the present invention. Further features and implementation forms of the method according to the first aspect of the present invention correspond to the features and implementation forms of the apparatus according to the second aspect of the present invention.
[0062] Details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the specification, drawings, and claims.
[0063] Embodiments of the present invention will be described in more detail below with reference to the accompanying figures and drawings.
Brief Description of the Drawings
[0064]
Figure 1A
Figure 1B
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Embodiments for Carrying Out the Invention
[0065] Hereinafter, the same reference numerals refer to the same or at least functionally equivalent features unless otherwise specified.
[0066] In the following description, reference is made to the accompanying drawings which form a part hereof and which illustrate specific aspects of embodiments of the present invention or specific aspects in which embodiments of the present invention may be used. It is understood that embodiments of the present invention may be used in other aspects and may include structural or logical changes not shown in the drawings. Accordingly, the following detailed description should not be construed in a limiting sense, and the scope of the present invention is defined by the appended claims.
[0067] For example, it is understood that the disclosure related to the described method may apply to the corresponding device or system configured to perform the method, and vice versa. For example, if one or more steps of a particular method are described, the corresponding device may include one or more units for performing the one or more steps of the described method, e.g., functional units (e.g., one unit for performing one or more steps, or multiple units each performing one or more of the multiple steps), even if such one or more units are not explicitly described or shown in the figures. On the other hand, for example, if a particular device is described based on one or more units, e.g., functional units, the corresponding method may include one step for performing the functions of the one or more units (e.g., one step for performing the functions of one or more units, or multiple steps each performing one or more of the functions of the multiple units), even if such one or more steps are not explicitly described or shown in the figures. Further, it is understood that the features of the various exemplary embodiments and / or aspects described herein may be combined with each other unless otherwise specified.
[0068] Video coding generally refers to the processing of a sequence of pictures that form a video or video sequence. Instead of the term "picture", the terms "frame" or "image" may be used as synonyms in the field of video coding. Video coding (or generally coding) includes two parts, video encoding and video decoding. Video encoding is performed on the source side and generally includes processing the original video pictures (e.g., by compression) to reduce the amount of data required to represent the video pictures (for more efficient storage and / or transmission). Video decoding is performed on the destination side and generally includes the reverse process compared to the encoder to reconstruct the video pictures. Embodiments referring to the "coding" of video pictures (or generally pictures) are understood to relate to the "encoding" or "decoding" of video pictures or respective video sequences. The combination of the encoding part and the decoding part is also called a codec (coding and decoding).
[0069] In the case of reversible video coding, the original video pictures can be reconstructed (assuming no transmission loss or other data loss during storage or transmission), i.e., the reconstructed video pictures have the same quality as the original video pictures. In the case of irreversible video coding, further compression, e.g., by quantization, is performed to reduce the amount of data representing the video pictures, which cannot be fully reconstructed at the decoder, i.e., the quality of the reconstructed video pictures is lower or worse compared to the quality of the original video pictures.
[0070] Some video coding standards belong to the group of "irreversible hybrid video codecs" (i.e., combining spatial and temporal prediction in the sample domain and 2D transform coding for applying quantization in the transform domain). Each picture of a video sequence is generally partitioned into a set of non-overlapping blocks, and coding is generally performed at the block level. In other words, in the encoder, the video generally generates a prediction block using, for example, spatial (intra-picture) prediction and / or temporal (inter-picture) prediction, subtracts the prediction block from the current block (the block being currently processed / processed), obtains a residual block, transforms the residual block, and quantizes the residual block in the transform domain to reduce the amount of data to be transmitted (compressed), i.e., coded, at the block (video block) level, while in the decoder, the reverse process compared to the encoder is applied to the coded or compressed block to reconstruct the current block for presentation. Further, the encoder duplicates the decoder's processing loop so that both generate the same prediction (e.g., intra and inter prediction) and / or reconstruction for processing, i.e., coding, subsequent blocks.
[0071] Embodiments of a video coding system 10, a video encoder 20, and a video decoder 30 are described below with reference to FIGS. 1 through 3.
[0072] FIG. 1A is a schematic block diagram showing an exemplary coding system 10 that may utilize the technology of the present application, e.g., a video coding system 10 (or simply coding system 10). The video encoder 20 (or simply encoder 20) and the video decoder 30 (or simply decoder 30) of the video coding system 10 show examples of devices that may be configured to perform the techniques according to the various examples described in the present application.
[0073] As shown in FIG. 1A, the coding system 10 includes a source device 12 configured to provide, for example, encoded picture data 21 to a destination device 14 in order to decode the encoded picture data 13.
[0074] The source device 12 includes an encoder 20 and additionally, i.e., optionally, may include a picture source 16, a pre-processor (or pre-processing unit) 18, for example, a picture pre-processor 18, and a communication interface or communication unit 22.
[0075] The picture source 16 may include or be any kind of picture taking device, for example, a camera for taking pictures of the real world, and / or any kind of picture generating device, for example, a computer graphics processor for generating pictures animated by a computer, or any kind of other device for acquiring and / or providing real world pictures, pictures generated by a computer (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). The picture source may be or may be any kind of memory or storage for storing any of the above-described pictures.
[0076] Distinguished from the processing performed by the pre-processor 18 and the pre-processing unit 18, the picture or picture data 17 may also be referred to as raw picture or raw picture data 17.
[0077] The preprocessor 18 is configured to receive the (raw) picture data 17 and perform preprocessing on the picture data 17 to obtain preprocessed picture 19 or preprocessed picture data 19. The preprocessing executed by the preprocessor 18 may include, for example, trimming, color format conversion (e.g., from RGB to YCbCr), color correction, or noise removal. It can be understood that the preprocessing unit 18 may be an arbitrary component.
[0078] The video encoder 20 is configured to receive the preprocessed picture data 19 and provide encoded picture data 21 (further details will be described below, for example, based on FIG. 2).
[0079] The communication interface 22 of the source device 12 is configured to receive the encoded picture data 21 and transmit the encoded picture data 21 (or any further processed version thereof) via the communication channel 13 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction.
[0080] The destination device 14 includes a decoder 30 (e.g., a video decoder 30) and may additionally, i.e., optionally, include a communication interface or communication unit 28, a postprocessor 32 (or postprocessing unit 32), and a display device 34.
[0081] The communication interface 28 of the destination device 14 is configured to receive the encoded picture data 21 (or any further processed version thereof) from, for example, directly from the source device 12 or any other source, such as a storage device, e.g., a storage device of the encoded picture data, and provide the encoded picture data 21 to the decoder 30.
[0082] Communication interfaces 22 and 28 may be configured to transmit or receive encoded picture data 21 or encoded data 13 between the source device 12 and the destination device 14 via a direct communication link, such as a direct wired or wireless connection, or via any type of network, such as a wired or wireless network or any combination thereof, or any type of private and public network, or any combination of any type thereof.
[0083] Communication interface 22 may be configured to process encoded picture data, for example, by packaging the encoded picture data 21 into a suitable format, such as a packet, and / or using any type of encoding or processing of the transmission for transmission via a communication link or communication network.
[0084] Communication interface 28, which forms the counterpart of communication interface 22, may be configured to receive the transmitted data and process the transmitted data using any type of corresponding decoding or processing of the transmission and / or unpacking of the packaging to obtain the encoded picture data 21.
[0085] Both communication interface 22 and communication interface 28 may be configured as a unidirectional communication interface or a bidirectional communication interface indicated by an arrow regarding communication channel 13 of FIG. 1A pointing from the source device 12 towards the destination device 14, and may be configured, for example, to set up a connection, check and exchange any other information related to the communication link and / or data transmission, such as the transmission of encoded picture data, for example, by sending and receiving messages.
[0086] Decoder 30 is configured to receive the encoded picture data 21 and provide the decoded picture data 31 or the decoded picture 31 (further details are described below, for example, based on FIG. 3 or FIG. 5).
[0087] The post-processor 32 of the destination device 14 is configured to post-process the decoded picture data 31 (also referred to as the reconstructed picture data), for example, the decoded picture 31, to obtain the post-processed picture data 33, for example, the post-processed picture 33. The post-processing executed by the post-processing unit 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color correction, trimming, or resampling, or any other processing for preparing the decoded picture data 31, for example, for display by the display device 34.
[0088] The display device 34 of the destination device 14 is configured to receive the post-processed picture data 33, for example, to display a picture to a user or viewer. The display device 34 may be any type of display for showing the reconstructed picture, for example, an integrated or external display or monitor or may include such a 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 other type of display.
[0089] FIG. 1A shows the source device 12 and the destination device 14 as separate devices, but embodiments of the device may also include both or both functions, the source device 12 or corresponding functions and the destination device 14 or corresponding functions. In such embodiments, the source device 12 or corresponding functions and the destination device 14 or corresponding functions may be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof.
[0090] As will be apparent to those skilled in the art based on the description, the functions of the different units or the presence and (exact) partitioning of the functions within the source device 12 and / or the destination device 14 shown in FIG. 1A may vary depending on the actual device and application.
[0091] The encoder 20 (e.g., video encoder 20), decoder 30 (e.g., video decoder 30), or both the encoder 20 and decoder 30 may be implemented by a processing circuit 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, or any combination thereof dedicated to or for video coding. The encoder 20 may be implemented by the processing circuit 46 to embody various modules considered in relation to the encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented by the processing circuit 46 to embody various modules considered in relation to the decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. The processing circuit may be configured to perform various operations considered later. As shown in FIG. 5, when the technology is implemented partially in software, the device may store instructions for the software in a suitable non-transitory computer-readable storage medium and may execute the instructions in hardware using one or more processors to perform the technology of the present disclosure. Either the video encoder 20 or the video decoder 30 may be incorporated, for example, as part of a combined encoder / decoder (codec) within a single device as shown in FIG. 1B.
[0092] The source device 12 and the destination device 14 can include any of a wide range of devices, such as any type of handheld or fixed device, for example, a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming device (such as a content service server or a content delivery server), a broadcast receiver device, a broadcast transmitter device, etc., and may or may not use an operating system or may use any type of operating system. In some cases, the source device 12 and the destination device 14 may support wireless communication. Thus, the source device 12 and the destination device 14 can be wireless communication devices.
[0093] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the technology of the present disclosure may be applicable to video coding situations (such as video encoding or video decoding) that do not necessarily include any data communication between the encoding device and the decoding device. In other examples, data is retrieved from local memory or streamed over a network, etc. A video encoding device may encode data and store it in memory, and / or a video decoding device may retrieve data from memory and decode it. In some examples, encoding and decoding are performed by devices that do not communicate with each other and simply encode data in memory and / or retrieve and decode data from memory.
[0094] For the sake of convenience in explanation, embodiments of the present invention are described herein by referring to, for example, the reference software of the next-generation video coding standard developed by the Joint Collaboration Team on Video Coding (JCT-VC) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG), such as High-Efficiency Video Coding (HEVC) or Versatile Video Coding (VVC). Those skilled in the art will understand that the embodiments of the present invention are not limited to HEVC or VVC.
[0095] Encoder and Encoding Method FIG. 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the technology of the present application. In the example of FIG. 2, the video encoder 20 includes an input 201 (or input interface 201), a residual calculation unit 204, a transformation processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transformation 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 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 by a hybrid video codec.
[0096] The residual calculation unit 204, the transformation processing unit 206, the quantization unit 208, and the mode selection unit 260 may be regarded as forming the forward signal path of the encoder 20. On the other hand, the inverse quantization unit 210, the inverse transformation 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 regarded as forming the inverse signal path of the video encoder 20. The inverse signal path of the video encoder 20 corresponds to the signal path of the decoder (see the video decoder 30 in FIG. 3). The inverse quantization unit 210, the inverse transformation processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 are also regarded as forming the "built-in decoder" of the video encoder 20.
[0097] Picture & Picture Division (Picture & Block) The encoder 20 may be configured to receive, for example, picture 17 (or picture data 17) via the input 201, such as a sequence of pictures forming a video or a video sequence. The received picture or picture data may also be the preprocessed picture 19 (or preprocessed picture data 19). For simplicity, the following description refers to picture 17. Picture 17 may also be called the current picture or the picture to be coded (especially in video coding, to distinguish the current picture from other pictures, such as the already encoded and / or decoded pictures of the same video sequence, i.e., the video sequence including the current picture).
[0098] (Digital) pictures can be considered or can be regarded as two-dimensional arrays or matrices of samples having intensity values. Samples of the array can also be called pixels (abbreviation of 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. For color representation, generally three color components are used, that is, the picture can be represented or can contain three sample arrays. In the RGB format or color space, the picture contains corresponding sample arrays of red, green, and blue. However, in video coding, each pixel generally contains a luminance component represented by Y (L may also be used instead) and two chrominance components represented by Cb and Cr, and is represented in YCbCr. The luminance (or short luma) component Y represents brightness or intensity of gray levels (similar to, for example, a grayscale picture), while the two chrominance (or short chroma) components Cb and Cr represent chrominance or color information components. Therefore, a picture in the YCbCr format contains a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). A picture in the RGB format can be converted or transformed to the YCbCr format, and vice versa, and the process is also known as color transformation or conversion. If the picture is monochrome, the picture can contain only a luminance sample array. Therefore, the picture can be, for example, an array of luma samples in the monochrome format, or an array of luma samples and two corresponding arrays of chroma samples in the 4:2:0, 4:2:2, and 4:4:4 color formats.
[0099] An embodiment of the video encoder 20 may include a picture partitioning unit (not shown in FIG. 2) configured to partition picture 17 into a plurality of (usually non-overlapping) picture blocks 203. These blocks may also be referred to as root blocks, macroblocks (H.264 / AVC), or coding tree blocks (CTB) or coding tree units (CTU) (H.265 / HEVC and VVC). The picture partitioning unit may use the same block size with respect to a corresponding grid that defines all pictures and block sizes of the video sequence, or may vary the block size between pictures or subsets or groups of pictures and be configured to partition each picture into corresponding blocks.
[0100] In a further embodiment, the video encoder may be configured to directly receive blocks 203 of picture 17, for example, one, some, or all of the blocks that form picture 17. The picture blocks 203 may also be referred to as current picture blocks or picture blocks to be coded.
[0101] Similar to Picture 17, Picture Block 203 is also or can be regarded as a two-dimensional array or matrix of samples that is smaller in size than Picture 17 but has intensity values (sample values). In other words, Block 203 can contain, depending on the applied color format, for example, one sample array (e.g., the luma array in the case of a monochrome picture like Picture 17, or the luma or chroma arrays in the case of a color picture), or three sample arrays (e.g., the luma and two chroma arrays in the case of Color Picture 17), or any other number and / or type of arrays. The number of samples in the horizontal and vertical directions (or axes) of Block 203 defines the size of Block 203. Thus, the block can be, for example, an MxN (M columns × N rows) array of samples or an MxN array of transform coefficients.
[0102] The embodiment of video encoder 20 shown in FIG. 2 can be configured to encode Picture 17 block by block, for example, encoding and prediction are performed for each Block 203.
[0103] The embodiment of video encoder 20 shown in FIG. 2 can be further configured to partition and / or encode a picture by using slices (also called video slices), where the picture can be partitioned into one or more (generally non-overlapping) slices or encoded using one or more (generally non-overlapping) slices, and each slice can contain 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)).
[0104] The embodiment of the video encoder 20 shown in FIG. 2 may be further configured to partition and / or encode a picture by using slices / tile groups (also called video tile groups) and / or tiles (also called video tiles), where a picture may be partitioned into one or more (generally non-overlapping) slices / tile groups or encoded using one or more (generally non-overlapping) slices / tile groups, each slice / tile group may include, for example, one or more blocks (e.g., CTUs) or one or more tiles, each tile may be, for example, rectangular in shape and may include one or more blocks (e.g., CTUs), e.g., complete or partial blocks.
[0105] Calculation of Residual The residual calculation unit 204 may be configured to calculate a residual block 205 (also called residual 205) based on a picture block 203 and a prediction block 265 (further details about the prediction block 265 will be given later) by, for example, subtracting the sample values of the prediction block 265 from the sample values of the picture block 203 sample-by-sample (pixel-by-pixel) to obtain the residual block 205 in the sample region.
[0106] Transformation The transformation processing unit 206 may be configured to apply a transformation, e.g., a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transformation coefficients 207 in the transform domain. The transformation coefficients 207, also called transform residual coefficients, may represent the residual block 205 in the transform domain.
[0107] The conversion processing unit 206 may be configured to apply integer approximations of DCT / DST such as the conversion defined for H.265 / HEVC. Compared to the orthogonal DCT transform, such integer approximations are generally scaled at a specific rate. To maintain the norm of the residual blocks processed by the forward and inverse transforms, an additional scaling factor is applied as part of the conversion process. The scaling factor is generally selected based on specific constraints such as the scaling factor being a power of two for shift operations, the bit depth of the conversion coefficients, and the trade-off between accuracy and implementation cost. For example, a specific scaling factor may be specified for the inverse transform by the inverse transform processing unit 212 (and for example, the corresponding inverse transform by the inverse transform processing unit 312 in the video decoder 30), and for example, the corresponding scaling factor for the forward transform by the conversion processing unit 206 of the encoder 20 may be specified accordingly.
[0108] Embodiments of the video encoder 20 (respectively, the conversion processing unit 206) may, for example, be such that the video decoder 30 may receive the conversion parameters and use them for decoding, for example, the conversion parameters that may be left as is or encoded or compressed by the entropy encoding unit 270, for example, configured to output certain one or more conversions.
[0109] Quantization The quantization unit 208 may be configured to obtain the quantized coefficients 209 by quantizing the conversion coefficients 207, for example, by applying scalar quantization or vector quantization. The quantized coefficients 209 may also be referred to as quantized conversion coefficients 209 or quantized residual coefficients 209.
[0110] The quantization process may reduce the bit depth associated with some or all of the conversion coefficients 207. For example, an n-bit conversion coefficient may be truncated to an m-bit conversion coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting the quantization parameter (QP). For example, for scalar quantization, different scalings may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The applicable quantization step size may be indicated by the quantization parameter (QP). The quantization parameter may be, for example, an index to a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to fine quantization (small quantization step size), a large quantization parameter may correspond to coarse quantization (large quantization step size), or vice versa. Quantization may include division by the quantization step size, and for example, the corresponding and / or inverse dequantization by the inverse quantization unit 210 may include multiplication by the quantization step size. Some standards, such as embodiments according to HEVC, may be configured to determine the quantization step size using the quantization parameter. Generally, the quantization step size may be calculated based on the quantization parameter using a fixed point approximation of an equation that includes division. An additional scaling factor may be introduced for quantization and inverse dequantization to restore the norm of the residual block that may be modified due to the scaling used in the fixed point approximation of the equation for the quantization step size and the quantization parameter. In one exemplary implementation, the scaling of the inverse transform and inverse dequantization may be combined. Alternatively, a customized quantization table may be used, for example, signaled from the encoder to the decoder within the bitstream.Quantization is an irreversible operation, and the loss increases as the quantization step size increases.
[0111] Embodiments of the video encoder 20 (each quantization unit 208) may be configured to output, for example, quantization parameters (QPs) that are, for example, left as is or encoded by the entropy encoding unit 270, such that the video decoder 30 may receive and apply the quantization parameters for decoding.
[0112] Inverse quantization The inverse quantization unit 210 is configured to apply the inverse of the quantization method applied by the quantization unit 208 to the quantized coefficients, based on or using the same quantization step size as the quantization unit 208, to obtain dequantized coefficients 211. The dequantized coefficients 211, also referred to as dequantized residual coefficients 211, may correspond to the transform coefficients 207, although they are generally not the same as the transform coefficients due to losses caused by quantization.
[0113] Inverse transform The inverse transform processing unit 212 is configured to apply the inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or 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.
[0114] Reconstruction The reconstruction unit 214 (e.g., an adder or summer 214) is configured to add the reconstructed residual block 213 to the prediction block 265 (i.e., the reconstructed residual block 213) in the sample domain by adding, for example, the sample values of the reconstructed residual block 213 and the sample values of the prediction block 265 on a sample-by-sample basis to obtain the reconstructed block 215 in the sample domain.
[0115] Filtering The loop filter unit 220 (or simply "loop filter" 220) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or generally, to filter the reconstructed samples to obtain filtered sample values. The loop filter unit is configured to, for example, smooth pixel transitions or otherwise improve the quality of the video. The loop filter unit 220 may include 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 an 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, SAO, and ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., an adaptive in-loop reshaper) with chroma scaling is added. This process is performed before deblocking. In another example, the deblocking filter process may also be applied to the edges of internal sub-blocks, such as the edges of affine sub-blocks, the edges of ATMVP sub-blocks, the edges of sub-block transforms (SBTs), and the edges of intra sub-partitions (ISPs).
[0116] To effectively remove blocking artifacts that occur for large "blocks", VVC uses deblocking filters with longer taps. Here, the term "block" is used very inclusively and may refer to "transform block (TB), prediction block (PB), or coding unit block (CU)". The longer-tap filters are applied to both the luma and chroma components. The longer-tap filter for the luma component corrects up to 7 samples for each line of samples perpendicular and adjacent to the edge, and is applied to blocks whose size is 32 samples or more in the deblocking direction, that is, for a vertical edge, the width of the block should be 32 samples or more, and for a horizontal edge, the height of the block should be 32 samples or more.
[0117] The longer-tap filter for chroma is applied to chroma blocks when the size of both blocks adjacent to a given edge is 8 samples or more, and corrects up to 3 samples on both sides of the edge. Therefore, for a vertical edge, the width of both blocks adjacent to the edge should be 8 samples or more, and for a horizontal edge, the height of both blocks adjacent to the edge should be 8 samples or more. The loop filter unit 220 is shown as an in-loop filter in FIG. 2, but in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as the filtered reconstructed block 221.
[0118] Embodiments of the video encoder 20 (each, loop filter unit 220) may be configured to output loop filter parameters (such as SAO filter parameters, or ALF filter parameters, or LMCS parameters, etc.) such that, for example, the decoder 30 may receive the same loop filter parameters or respective loop filter and apply them for decoding, for example, as is or encoded by the entropy coding unit 270.
[0119] Decoded picture buffer The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures or generally reference picture data for encoding video data by the video encoder 20. The DPB 230 may be formed by any of various memory devices such as dynamic random access memory (DRAM) including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may be further configured to store the same current picture or different pictures, e.g., other already filtered blocks of already reconstructed pictures, e.g., already reconstructed and filtered blocks 221, and may provide, for example, for inter prediction, a fully already reconstructed, i.e., decoded, picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples). The decoded picture buffer (DPB) 230 may also be configured to store one or more unfiltered reconstructed blocks 215 or generally unfiltered reconstructed samples, or any other further processed version of the reconstructed blocks or samples, if, for example, the reconstructed block 215 is not filtered by the loop filter unit 220.
[0120] Mode Selection (Partitioning & Prediction) The mode selection unit 260 includes a classification unit 262, an inter prediction unit 244, and an intra prediction unit 254, and is configured to receive or obtain original picture data, for example, the original block 203 (the current block 203 of the current picture 17), and reconstructed picture data, for example, from the same (current) picture and / or one or more already decoded pictures from, for example, the decoded picture buffer 230 or other buffer (for example, a line buffer not shown), filtered and / or unfiltered reconstructed samples or blocks. The reconstructed picture data is used as reference picture data for prediction, for example, inter prediction or intra prediction, to obtain the prediction block 265 or predictor 265.
[0121] The mode selection unit 260 may be configured to determine or select a classification and a prediction mode (for example, an intra or inter prediction mode) for the prediction mode of the current block (without classification) and generate a corresponding prediction block 265 used for the calculation of the residual block 205 and the reconstruction of the reconstructed block 215.
[0122] An embodiment of the mode selection unit 260 may be configured to select a partitioning and prediction mode that provides the best match or, in other words, the minimum residual (the minimum residual means better compression for transmission or storage) or the minimum signaling overhead (the minimum signaling overhead means better compression for transmission or storage), or to consider or balance both, from, for example, the partitioning and prediction modes supported by the mode selection unit 260 or available to the mode selection unit 260. The mode selection unit 260 may be configured to determine the partitioning and prediction modes based on rate distortion optimization (RDO), i.e., to select a prediction mode that provides the minimum rate distortion. Terms such as "best," "minimum," "optimal," etc. in this context do not necessarily refer to the overall "best," "minimum," "optimal," etc., but may also refer to criteria for termination or selection such that a value exceeds or falls below a threshold, or potentially a "near-optimal selection" that meets other constraints that reduce complexity and processing time.
[0123] In other words, the partitioning unit 262 may be configured to partition the pictures of a video sequence into a sequence of coding tree units (CTUs), and the CTU 203 may be further partitioned into smaller block partitions or sub-blocks (which form blocks again) by repeatedly using, for example, quadtree partitioning (QT), binary tree partitioning (BT), or ternary tree partitioning (TT), or any combination thereof, and the partitioning unit 262 may be configured to perform prediction for each of the block partitions or sub-blocks, for example, and the mode selection includes the selection of the tree structure of the partitioned blocks 203, and the prediction mode is applied to each of the block partitions or sub-blocks.
[0124] The segmentation performed by exemplary video encoder 20 (e.g., by segmentation unit 260) and the prediction processing (by inter prediction unit 244 and intra prediction unit 254) are described in more detail below.
[0125] Segmentation The partitioning unit 262 may be configured to partition the pictures of the video sequence into a sequence of coding tree units (CTUs), and the partitioning unit 262 may partition (or split) the coding tree unit (CTU) 203 into smaller partitions, for example, smaller blocks of square or rectangular size. For a picture having three sample arrays, a CTU consists of an N×N block of luma samples and two corresponding blocks of chroma samples. The maximum allowed size of the luma block of a CTU is defined to be 128×128 in the multi-purpose video coding (VVC) under development, but may be defined to be a value larger than 128×128 in the future, for example, 256×256. The CTUs of a picture may be clustered / grouped as slices / tile groups, tiles, or bricks. A tile encompasses a rectangular region of the picture, and a tile may be divided into one or more bricks. A brick consists of several rows of CTUs within a tile. A tile that is not divided into multiple bricks may be called a brick. However, a brick is a pure subset of a tile and is not called a tile. There are two modes of tile groups supported in VVC, namely, the raster scan slice / tile group mode and the rectangular slice mode. In the raster scan tile group mode, a slice / tile group contains a sequence of tiles in the raster scan of the tiles of the picture. In the rectangular slice mode, a slice contains several bricks of the picture that collectively form a rectangular region of the picture. The bricks within a rectangular slice are in the raster scan order of the bricks of the slice. These smaller blocks (which may also be called sub-blocks) may be further partitioned into even smaller partitions.This is also called tree partitioning or hierarchical tree partitioning. For example, a root block at root tree level 0 (hierarchical level 0, depth 0) is recursively partitioned, for example, into two or more blocks at the next lower tree level, for example, nodes at tree level 1 (hierarchical level 1, depth 1), and these blocks can be further partitioned into two or more blocks at the next lower level, for example, tree level 2 (hierarchical level 2, depth 2), and so on until a termination criterion is met, for example, the maximum tree depth or the minimum block size is reached and the partitioning ends. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree using partitioning into two compartments is called a binary tree (BT), a tree using partitioning into three compartments is called a ternary tree (TT), and a tree using partitioning into four compartments is called a quadtree (QT).
[0126] For example, a coding tree unit (CTU) may be or may include the CTB of luma samples, two corresponding CTBs of chroma samples of a picture having three sample arrays, or the CTB of samples of a picture coded using three separate colour planes and syntax structures for coding monochrome pictures or 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 the component into CTBs is a partition. A coding unit (CU) may be or may include the coding block of luma samples, two corresponding coding blocks of chroma samples of a picture having three sample arrays, or the coding block of samples of a picture coded using three separate colour planes and syntax structures for coding monochrome pictures or samples. Correspondingly, a coding block (CB) may be an M×N block of samples for some values of M and N such that the division of the CTB into coding blocks is a partition.
[0127] For example, in an embodiment according to HEVC, a coding tree unit (CTU) may be divided into CUs by using a quadtree structure represented as a coding tree. The decision of whether to code a picture area using inter-picture (temporal) prediction or to code a picture area using 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 PU partition type. Within one PU, the same prediction process is applied and the relevant information is sent to the decoder based on the PU. After obtaining the residual block by applying the prediction process based on the PU partition type, the leaf CU may be partitioned into transform units (TUs) by another quadtree structure similar to the coding tree for the CU.
[0128] For example, in an embodiment according to the currently developed latest video coding standard called Versatile Video Coding (VVC), a multi-type tree nested in a combined quad-tree using a two-partition and three-partition segmentation structure, for example, is used to divide coding tree units. In the coding tree structure within a coding tree unit, a CU can have a shape that is either square or rectangular. For example, a coding tree unit (CTU) is first divided by a quad-tree. Then, the leaf nodes of the quad-tree can be further divided by a multi-type tree structure. There are four split 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 leaf node of the multi-type tree is called a coding unit (CU), and this segmentation is used for prediction and transformation processing without any further division as long as the CU is not too long with respect to the maximum transform length. This means that, in most cases, the CU, PU, and TU have the same block size within a quad-tree having a multi-type tree coding block structure with nested CU, PU, and TU. An exception occurs when the maximum supported transform length is smaller than the width or height of the color component of the CU. VVC develops a unique signaling mechanism for partition information within a quad-tree having a nested multi-type tree coding tree structure. In the signaling mechanism, a coding tree unit (CTU) is treated as the root of the quad-tree and is first divided by the quad-tree structure. Each leaf node of the quad-tree (when large enough to allow it) is further divided by the multi-type tree structure.In a multi-type tree structure, a first flag (mtt_split_cu_flag) is signaled to indicate whether a node is further partitioned. When a node is further partitioned, a second flag (mtt_split_cu_vertical_flag) is signaled to indicate the partitioning direction, and then a third flag (mtt_split_cu_binary_flag) is signaled to indicate whether the partition is binary or ternary. Based on the values of mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, a multi-type tree partitioning mode (MttSplitMode) of a CU can be derived by a decoder based on predefined rules or tables. For a specific design, e.g., a 64×64 luma block and 32×32 chroma pipeline design of a VVC hardware decoder, as shown in FIG. 6, it should be noted that TT partitioning is prohibited when either the width or height of a luma coding block is greater than 64. TT partitioning is also prohibited when either the width or height of a chroma coding block is greater than 32. The pipeline design divides a picture into virtual pipeline data units (VPDUs) defined as non-overlapping units within the picture. In a hardware decoder, consecutive VPDUs are processed simultaneously by multiple pipeline stages. The size of a VPDU is approximately proportional to the buffer size of most pipeline stages, and thus it is important to keep the size of the VPDU small. In most hardware decoders, the size of a VPDU can 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 size of the VPDU.
[0129] Furthermore, when a part of a tree node block crosses the boundary of the lower or right picture, the tree node block is forced to be partitioned until all samples of all coded CUs are within the picture boundary.
[0130] As an example, the intra-slice partition (ISP) tool may split the predicted luma block of the slice vertically or horizontally into two or four sub-partitions according to the block size.
[0131] In one example, the mode selection unit 260 of the video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.
[0132] As described above, the video encoder 20 is configured to determine or select the best or optimal prediction mode from a set of (e.g., predetermined) prediction modes. The set of prediction modes may include, for example, an intra prediction mode and / or an inter prediction mode.
[0133] Intra prediction A set of intra prediction modes may include, for example, 35 different intra prediction modes defined in HEVC, such as non-directional modes like the DC (or average) mode and the planar mode, or directional modes, or alternatively, for example, 67 different intra prediction modes defined for VVC, such as non-directional modes like the DC (or average) mode and the planar mode, or directional modes. As an example, some normal angular intra prediction modes are adaptively replaced by, for example, the wide-angle intra prediction mode for non-square blocks defined in VVC. As another example, to avoid the splitting operation for DC prediction, only the long side is used to calculate the average for non-square blocks. Also, the result of intra prediction in the planar mode may be further modified by the method of position dependent intra prediction combination (PDPC).
[0134] The intra prediction unit 254 is configured to generate an intra prediction block 265 using the reconstructed samples of neighboring blocks of the same current picture according to an intra prediction mode among a set of intra prediction modes.
[0135] The intra prediction unit 254 (or generally the mode selection unit 260) is further configured to output an intra prediction parameter (or generally information indicating the selected intra prediction mode for a block) to the entropy coding unit 270 in the form of a syntax element 266 for inclusion in the encoded picture data 21, for example, so that the video decoder 30 can receive the prediction parameter and potentially use it for decoding.
[0136] Inter prediction A set of (or possible) inter prediction modes depends on available reference pictures (i.e., for example, at least the previously partially decoded pictures stored in the DBP 230) and other inter prediction parameters, for example, whether the entire reference picture is used to search for the most matching reference block or only a part of the reference picture, for example, only the search window area around the area of the current block is used, and / or for example, whether pixel interpolation, for example, half / semi-pel, quarter-pel, and / or 1 / 16-pel interpolation is applied.
[0137] In addition to the above prediction modes, skip mode, direct mode, and / or other inter prediction modes may be applied.
[0138] For example, in extended merge prediction, the merge candidate list for such a mode is constructed by including in order the following five types of candidates, namely, spatial MVP from spatially neighboring CUs, temporal MVP from CUs at the same location, history-based MVP from the FIFO table, average MVP of pairs, and zero MV. Also, decoder side motion vector refinement (DMVR) based on bidirectional matching may be applied to improve the accuracy of the MV in the merge mode. The merge mode with MVD (MMVD) is derived from the merge mode that uses the difference of motion vectors. The MMVD flag is signaled immediately after the skip flag and the merge flag are transmitted to specify whether the MMVD mode is used for the CU. Also, the adaptive motion vector resolution (AMVR) method at the CU level may be applied. AMVR enables the MVD of the CU to be coded with different precisions. Depending on the prediction mode for the current CU, the MVD of the current CU can be adaptively selected. When the CU is coded in the merge mode, the combined inter / intra prediction (CIIP) mode may be applied to the current CU. A weighted average of the inter and intra prediction signals is performed to obtain the CIIP prediction. In affine motion compensation prediction, the affine motion field of the block is described by the motion information of two control points (4 parameters) or three control point motion vectors (6 parameters). Subblock-based temporal motion vector prediction (SbTMVP) is similar to the temporal motion vector prediction (TMVP) of HEVC, but predicts the motion vectors of the sub-CUs within the current CU.The bi-directional optical flow (BDOF), previously called BIO, is a simpler version that requires much less computation, especially in terms of the number of multiplications and the size of the multiplier. Regarding the triangular partitioning mode, in such a mode, the CU is evenly divided into two triangular partitions using either a diagonal split or an anti-diagonal split. Further, the bi-prediction mode is extended from simple averaging to enable the weighted average of two prediction signals.
[0139] The inter-prediction unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (neither shown in FIG. 2). The motion estimation unit is configured to receive or obtain, for motion estimation, the picture block 203 (the current picture block 203 of the current picture 17) and the decoded picture 231, or at least one or a plurality of already reconstructed blocks, for example, the reconstructed blocks of one or a plurality of other / different already decoded pictures 231. For example, the video sequence may include the current picture and the already decoded picture 231, or in other words, the current picture and the already decoded picture 231 may be part of or may form a sequence of pictures forming the video sequence.
[0140] The encoder 20 may be configured to select a reference block from a plurality of reference blocks of the same or different pictures among a plurality of other pictures, for example, and provide the motion estimation unit with the reference picture (or reference picture index) and / or the offset (spatial offset) between the position of the reference block (x, y coordinates) and the position of the current block as an inter-prediction parameter. This offset is also called a motion vector (MV).
[0141] The motion compensation unit is configured to obtain, for example receive, an inter prediction parameter and perform an inter prediction based on or using the inter prediction parameter to obtain an inter prediction block 265. The motion compensation performed by the motion compensation unit may include fetching or generating a prediction block based on a motion / block vector determined by motion estimation that perhaps performs interpolation with sub-pixel accuracy. Interpolation filtering may generate additional pixel samples from known pixel samples and thus potentially increase the number of candidate prediction blocks that may be used to code a picture block. When receiving a motion vector for a PU of the current picture block, the motion compensation unit may find a prediction block pointed to by the motion vector in one of the reference picture lists.
[0142] The motion compensation unit may also generate blocks and syntax elements related to the video slice for use by the video decoder 30 when decoding a picture block of the video slice. In addition to or as an alternative to the slice and its respective syntax elements, tile groups and / or tiles and their respective syntax elements may be generated or used.
[0143] Entropy coding The entropy encoding unit 270 can obtain, for example, encoded picture data 21 which can be output via output 272, for example, in the form of an encoded bitstream 21, so that, for example, the video decoder 30 can receive the parameters and may use them for decoding. To this end, for the quantized coefficients 209, inter prediction parameters, intra prediction parameters, loop filter parameters, and / or other syntax elements, for example, an entropy encoding algorithm or method (for example, variable length coding (VLC) method, context adaptive VLC (CAVLC) method, arithmetic coding method, 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 (non-compression) is applied. The encoded bitstream 21 may be transmitted to the video decoder 30 or stored in memory for later transmission or retrieval by the video decoder 30.
[0144] Variations of the video encoder 20 and other structures can be used to encode a video stream. For example, a non-transform-based encoder 20 can directly quantize the residual signal without the transform processing unit 206 for a particular block or frame. In another implementation, the encoder 20 can have a quantization unit 208 and an inverse quantization unit 210 combined in a single unit.
[0145] Decoder and Decoding Method FIG. 3 shows an example of a video decoder 30 configured to implement the technology of the present application. The video decoder 30 is configured to receive, for example, encoded picture data 21 (e.g., an encoded bitstream 21) encoded by an encoder 20 in order to obtain a decoded picture 331. The encoded picture data or bitstream includes information for decoding data representing an encoded picture, for example, a picture block of an encoded video slice (and / or a tile group or tile) and associated syntax elements.
[0146] In the example of FIG. 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., an adder 314), a loop filter 320, a decoded picture buffer (DBP) 330, a mode application unit 360, an inter prediction unit 344, and an intra prediction unit 354. The inter prediction unit 344 may be a motion compensation unit or may include a motion compensation unit. The video decoder 30 may, in some examples, execute a decoding path that is generally inverse to the encoding path described in relation to the video encoder 100 of FIG. 2.
[0147] As described in connection with 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 considered to form the "built-in decoder" of the video encoder 20. Therefore, 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. Accordingly, the descriptions given for each unit and function of the video 20 encoder are applied mutatis mutandis to each unit and function of the video decoder 30.
[0148] Entropy decoding The entropy decoding unit 304 analyzes the bitstream 21 (or generally the encoded picture data 21), for example, performs entropy decoding on the encoded picture data 21 to obtain, for example, the quantized coefficients 309 and / or the decoded coding parameters (not shown in FIG. 3), such as the inter prediction parameters (e.g., reference picture index and motion vector), intra prediction parameters (e.g., intra prediction mode or index), transform parameters, quantization parameters, loop filter parameters, and / or any or all of other syntax elements. The entropy decoding unit 304 may be configured to apply a decoding algorithm or method corresponding to the encoding method described in relation to the entropy encoding unit 270 of the encoder 20. The entropy decoding unit 304 may be further configured to provide the inter prediction parameters, intra prediction parameters, and / or other syntax elements to the mode application unit 360 and provide the other parameters to other units of the decoder 30. The video decoder 30 may receive syntax elements at the level of the video slice and / or at the level of the video block. In addition to or in place of the slice and its respective syntax elements, tile groups and / or tiles and their respective syntax elements may be received and / or used.
[0149] Inverse quantization The inverse quantization unit 310 receives the quantization parameter (QP) (or generally information related to inverse quantization) and the quantized coefficients from the encoded picture data 21 (e.g., by the entropy decoding unit 304, e.g., by parsing and / or decoding), and is configured to apply inverse quantization based on the quantization parameter to the decoded quantized coefficients 309 to obtain the dequantized coefficients 311, which may also be referred to as transform coefficients 311. The inverse quantization process may include using the quantization parameter determined by the video encoder 20 for each video block within a video slice (or tile or tile group) to determine the degree of quantization and, similarly, the degree of inverse quantization to be applied.
[0150] Inverse transform The inverse transform processing unit 312 receives the dequantized coefficients 311, which may also be referred to as transform coefficients 311, and is configured to apply a transform to the dequantized coefficients 311 to obtain the reconstructed residual block 213 in the sample region. The reconstructed residual block 213 may also be referred to as the transform block 213. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may be further configured to receive transform parameters or corresponding information from the encoded picture data 21 (e.g., by the entropy decoding unit 304, e.g., by parsing and / or decoding) to determine the transform to be applied to the dequantized coefficients 311.
[0151] Reconstruction The reconstruction unit 314 (e.g., adder or summer 314) may be configured to add the reconstructed residual block 313 to the prediction block 365, e.g., by adding the sample values of the reconstructed residual block 313 and the sample values of the prediction block 365 in the sample region to obtain the reconstructed block 315 in the sample region.
[0152] Filtering (Either within or after the coding loop) The loop filter unit 320 is configured to filter the reconstructed block 315 to obtain a filtered block 321, for example, to smooth pixel transitions or otherwise improve the quality of the video. The loop filter unit 320 may include a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, for example, one or more loop filters such as an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In an 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, SAO, and ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., an adaptive in-loop reshaper) is added. This process is performed before deblocking. In another example, the deblocking filter process may also be applied to the edges of internal sub-blocks, for example, the edges of affine sub-blocks, the edges of ATMVP sub-blocks, the edges of sub-block transform (SBT), and the edges of intra sub-partitions (ISP). The loop filter unit 320 is shown as an in-loop filter in FIG. 3, but in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.
[0153] Decoded Picture Buffer Then, the decoded video block 321 of the picture is stored in a decoded picture buffer 330 that stores the decoded picture 331 for subsequent motion compensation with respect to other pictures and / or for outputting respectively on a display.
[0154] The decoder 30 is configured to output the decoded picture 311 for presentation or viewing to the user, for example, via the output 312.
[0155] Prediction The inter prediction unit 344 may be the same as the inter prediction unit 244 (especially the motion compensation unit), and the intra prediction unit 354 may be functionally the same as the inter prediction unit 254, and performs division or segmentation determination and prediction based on the classification and / or prediction parameters or respective information received from the encoded picture data 21 (for example, by the entropy decoder unit 304, for example, by analysis and / or decoding). 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).
[0156] When 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 already decoded blocks of the current picture. When the video picture is coded as an inter-coded (i.e., B or P) slice, the inter prediction unit 344 (e.g., motion compensation unit) of the mode application unit 360 is configured to generate a prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from the entropy decoding unit 304. For inter prediction, the prediction block may be generated from one of the reference pictures in one of the reference picture lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using a preset construction technique based on the reference pictures stored in the DPB 330. The same or similar may apply for embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or as an alternative to slices (e.g., video slices), e.g., the video may be coded using I, P, or B tile groups and / or tiles.
[0157] The mode application unit 360 is configured to determine prediction information regarding a video block of a current video slice by analyzing a motion vector or related information and other syntax elements, and use the prediction information to generate a prediction block regarding the current decoded video block. For example, the mode application unit 360 uses a part of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to code a video block of a video slice, a slice type of inter prediction (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 regarding each inter-coded video block of the slice, a status of inter prediction regarding each inter-coded video block of the slice, and other information for decoding a video block within the current video slice. The same or similar applies to 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, a video may be coded using I, P, or B tile groups and / or tiles.
[0158] An embodiment of the video decoder 30 shown in FIG. 3 may be configured to partition and / or decode a picture by using slices (also referred to as video slices), where the picture may be partitioned into one or more (generally non-overlapping) slices or decoded using one or more (generally non-overlapping) slices, and each slice 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)).
[0159] The embodiment of video decoder 30 shown in FIG. 3 may be configured to partition and / or decode a picture by using slices / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where the picture may be partitioned into one or more (generally non-overlapping) slices / tile groups or decoded using one or more (generally non-overlapping) slices / tile groups, each slice / tile group may include, for example, one or more blocks (e.g., CTUs) or one or more tiles, each tile may be, for example, rectangular in shape and may include one or more blocks (e.g., CTUs), e.g., complete or partial blocks.
[0160] Other variations of video decoder 30 may be used to decode the encoded picture data 21. For example, decoder 30 may generate an output video stream without loop filtering unit 320. For example, a transform-free decoder 30 may directly inverse quantize the residual signal without inverse transform processing unit 312 for a particular block or frame. In another implementation, video decoder 30 may have an inverse quantization unit 310 and an inverse transform processing unit 312 combined in a single unit.
[0161] It should be understood that in encoder 20 and decoder 30, the processing result of the current step may be further processed and then output to the next step. For example, after interpolation filtering, motion vector derivation, or loop filtering, further operations such as Clip or Shift may be performed on the processing result of interpolation filtering, motion vector derivation, or loop filtering.
[0162] Note that further operations may be applied to the derived motion vectors of the current block (including, but not limited to, the control point motion vector in affine mode, affine, plane, sub-block motion vectors in ATMVP mode, temporal motion vector, etc.). For example, the value of the motion vector is constrained to a predetermined range according to its representation bits. When the representation bits of the motion vector are bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponentiation. For example, when bitDepth is set to be equal to 16, the range is -32768 to 32767, and when bitDepth is set to be equal to 18, the range is -131072 to 131071. For example, the value of the derived motion vector (e.g., the MV of 4 four-by-four sub-blocks within one eight-by-eight block) is constrained such that the maximum difference between the integer parts of the MVs of the 4 four-by-four sub-blocks is N pixels or less, such as 1 pixel or less. Here, two methods for constraining the motion vector according to bitDepth are provided.
[0163] FIG. 4 is a schematic diagram of a video coding device 400 according to an embodiment of the present disclosure. The video coding device 400 is suitable for implementing the disclosed embodiments as described herein. In an embodiment, the video coding device 400 may be a decoder such as the video decoder 30 of FIG. 1A or an encoder such as the video encoder 20 of FIG. 1A.
[0164] The video coding device 400 includes an incoming port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an outgoing port 450 (or output port 450) for transmitting data, and a memory 460 for storing data. The video coding device 400 may also include optical - electrical (OE) components and electro - optical (EO) components coupled to the incoming port 410, receiver unit 420, transmitter unit 440, and outgoing port 450 for the transmission or reception of optical or electrical signals.
[0165] 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), FPGAs, ASICs, and DSPs. The processor 430 communicates with the incoming port 410, receiver unit 420, transmitter unit 440, outgoing port 450, and memory 460. The processor 430 includes a coding module 470. The coding module 470 implements the disclosed embodiments described above. For example, the coding module 470 implements, processes, prepares, or provides various coding operations. Thus, including the coding module 470 significantly improves the functionality of the video coding device 400 and results in a transition of the video coding device 400 to different states. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0166] Memory 460 may include one or more disks, tape drives, and solid state drives, and may be used as an over-flow data storage device for storing such programs when selected for execution by a program and for storing instructions and data read during program execution. Memory 460 may be, for example, volatile and / or non-volatile, and may be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random access memory (SRAM).
[0167] 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 of FIG. 1 according to an exemplary embodiment.
[0168] Processor 502 of apparatus 500 can be a central processing unit. Alternatively, processor 502 can be any other type of one or more devices, existing or to be developed in the future, capable of manipulating or processing information. The disclosed implementation can be implemented by a single processor, such as processor 502, as shown, but speed and efficiency advantages can be realized by using two or more processors.
[0169] In an implementation, the memory 504 of the apparatus 500 can be a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device can be used as the memory 504. The memory 504 can include code and data 506 that are accessed by the processor 502 using the bus 512. The memory 504 can further include an operating system 508 and an application program 510, and the application program 510 includes at least one program that enables the processor 502 to execute the methods described herein. For example, the application program 510 can include applications 1 through N that further include a video coding application that executes the methods described herein.
[0170] The apparatus 500 can also include one or more output devices, such as a display 518. In one example, the display 518 can be a touch display that is combined with a touch sensing element operable to sense touch input on the display. The display 518 can be coupled to the processor 502 via the bus 512.
[0171] Although shown here as a single bus, the bus 512 of the apparatus 500 can be composed of multiple buses. Further, the secondary storage 514 can be directly coupled to other components of the apparatus 500 or can be accessed via a network and can include a single integrated unit such as a memory card or multiple units such as multiple memory cards. Thus, the apparatus 500 can be implemented in a wide variety of configurations.
[0172] Regarding the deblocking filter process disclosed in HEVC, two high-level control parameters, beta_offset_div2 and tc_offset_div2, were introduced to control the strength of deblocking. These parameters can be signaled at the picture parameter set (PPS) level or overwritten at the slice header level.
[0173] In an example, separate deblocking filter control parameters for the Cb and Cr components were introduced to provide higher deblocking flexibility. These deblocking control parameters can be signaled within the PPS or picture header (PH) or slice header (SH).
[0174] The syntax for deblocking control parameters is as follows.
[0175]
Table 1A
Table 1B
[0176]
Table 2
[0177]
Table 3
[0178] The semantics of deblocking control syntax elements are as follows.
[0179] The pps_chroma_tool_offsets_present_flag equal to 1 specifies that syntax elements related to chroma tool offset are present within the PPS RBSP syntax structure.
[0180] The pps_chroma_tool_offsets_present_flag equal to 0 specifies that the syntax elements related to chroma tool offsets do not exist within the PPS RBSP syntax structure. When ChromaArrayType is equal to 0, the value of pps_chroma_tool_offsets_present_flag is equal to 0.
[0181] pps_beta_offset_div2 and pps_tc_offset_div2 specify the default deblocking parameter offsets for β and tC (divided by 2) applied to the luma component of a slice that refers to the PPS, unless the default deblocking parameter offsets are overridden by the deblocking parameter offsets present in the picture header or slice header of the slice that refers to the PPS. The values of pps_beta_offset_div2 and pps_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of pps_beta_offset_div2 and pps_tc_offset_div2 are both assumed to be equal to 0.
[0182] pps_cb_beta_offset_div2 and pps_cb_tc_offset_div2 specify the default deblocking parameter offsets for β and tC (divided by 2) applied to the Cb component of slices that reference the PPS, unless the default deblocking parameter offsets present in the picture header or slice header of the slice that references the PPS override them. The values of pps_cb_beta_offset_div2 and pps_cb_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of pps_cb_beta_offset_div2 and pps_cb_tc_offset_div2 are both assumed to be equal to 0.
[0183] pps_cr_beta_offset_div2 and pps_cr_tc_offset_div2 specify the default deblocking parameter offsets for β and tC (divided by 2) applied to the Cr component of slices that reference the PPS, unless the default deblocking parameter offsets present in the picture header or slice header of the slice that references the PPS override them. The values of pps_cr_beta_offset_div2 and pps_cr_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of pps_cr_beta_offset_div2 and pps_cr_tc_offset_div2 are both assumed to be equal to 0.
[0184] ph_beta_offset_div2 and ph_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the luma component of slices related to PH. The values of ph_beta_offset_div2 and ph_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When they do not exist, the values of ph_beta_offset_div2 and ph_tc_offset_div2 are assumed to be equal to pps_beta_offset_div2 and pps_tc_offset_div2, respectively.
[0185] ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cb component of slices related to PH. The values of ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When they do not exist, the values of ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2 are assumed to be equal to pps_cb_beta_offset_div2 and pps_cb_tc_offset_div2, respectively.
[0186] ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cr component of slices related to PH. The values of ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When they do not exist, the values of ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2 are assumed to be equal to pps_cr_beta_offset_div2 and pps_cr_tc_offset_div2, respectively.
[0187] slice_beta_offset_div2 and slice_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the luma component of the current slice. The values of slice_beta_offset_div2 and slice_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of slice_beta_offset_div2 and slice_tc_offset_div2 are assumed to be equal to ph_beta_offset_div2 and ph_tc_offset_div2, respectively.
[0188] slice_cb_beta_offset_div2 and slice_cb_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cb component of the current slice. The values of slice_cb_beta_offset_div2 and slice_cb_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of slice_cb_beta_offset_div2 and slice_cb_tc_offset_div2 are assumed to be equal to ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2, respectively.
[0189] slice_cb_beta_offset_div2 and slice_cb_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cr component of the current slice. The values of slice_cr_beta_offset_div2 and slice_cr_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of slice_cr_beta_offset_div2 and slice_cr_tc_offset_div2 are assumed to be equal to ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2, respectively.
[0190] Versatile Video Coding (VVC) uses a tool called Joint Chroma residual coding (JCCR), which is signaled in the bitstream using the syntax "tu_joint_cbcr_residual_flag". This tool specifies whether the residual samples of both chroma components Cb and Cr are coded as a single transform block. A value of "tu_joint_cbcr_residual_flag" equal to 1 specifies that the syntax of the transform unit includes the transform coefficient levels of a single transform block from which the residual samples of both Cb and Cr are derived. The JCCR tool exploits the fact that the residuals of Cb and Cr both appear to be approximately anti-correlated with each other.
[0191] Depending on tu_joint_cbcr_residual_flag, tu_cbf_cb, and tu_cbf_cr, the variable TuCResMode is derived as follows, where tu_cbf_cb specifies the coded block flag of the Cb component and tu_cbf_cr is the coded block flag of the Cr component. Also, TuCResMode indicates the JCCR mode. - If tu_joint_cbcr_residual_flag is equal to 0, the variable TuCResMode is set to be equal to 0. - Otherwise, if tu_cbf_cb is equal to 1 and tu_cbf_cr is equal to 0, the variable TuCResMode is set to be equal to 1. - Otherwise, if tu_cbf_cb is equal to 1, the variable TuCResMode is set to be equal to 2. - In other cases, the variable TuCResMode is set to be equal to 3.
[0192] The relationship between "Reconstruction of the Cb residual and Cr residual" based on the variables tu_cbf_cb and tu_cbf_cr and the variable TuCResMode is as shown in the following table.
[0193]
Table 4
[0194] The variable CSgin is a sign value (+1 or -1), which is signaled within the slice header.
[0195] resJointC[x][y] is the actually transmitted residual in the bitstream.
[0196] resCb[x][y] indicates the derived residual sample of the chroma component Cb.
[0197] resCr[x][y] indicates the derived residual sample of the chroma component Cr.
[0198] Furthermore, VVC 6.0 may use separate Chroma QP mapping tables for each of the chroma components Cb and Cr, and a different mapping table for the joint Cb-Cr residual. When the value of the syntax element "same_qp_table_for_chroma" is equal to 1, it specifies that only one chroma QP table is signaled and this table is applied to Cb, Cr, and the joint Cb-Cr residual. When the value of "same_qp_table_for_chroma" is equal to 0, it indicates that three chroma QP mapping tables are signaled within the SPS.
[0199] The syntax elements num_points_in_qp_table_minus1[ i ], delta_qp_in_val_minus1[ i ][ j ], delta_qp_out_val[ i ][ j ] are further used to derive the chroma QP mapping tables. The semantics of these syntax elements and the procedure for deriving the chroma QP mapping tables are as shown below.
[0200] Adding 1 to num_points_in_qp_table_minus1[ i ] specifies the number of points used to describe the i-th chroma QP mapping table. The value of num_points_in_qp_table_minus1[ i ] is in the range from 0 to 63 + QpBdOffset C inclusive of 0 and 63 + QpBdOffset C up to 63 + QpBdOffset. When num_points_in_qp_table_minus1
[0000] does not exist in the bitstream, the value of num_points_in_qp_table_minus1
[0000] is assumed to be equal to 0.
[0201] delta_qp_in_val_minus1[ i ][ j ] specifies the delta value used to derive the input coordinates of the j-th pivot point in the i-th chroma QP mapping table. When delta_qp_in_val_minus1
[0000] [ j ] does not exist in the bitstream, the value of delta_qp_in_val_minus1
[0000] [ j ] is assumed to be equal to 0.
[0202] delta_qp_out_val[ i ][ j ] specifies the delta value used to derive the output coordinates of the j-th pivot point in the i-th chroma QP mapping table. When delta_qp_out_val
[0000] [ j ] does not exist in the bitstream, the value of delta_qp_out_val
[0000] [ j ] is assumed to be equal to 0.
[0203] The i-th chroma QP mapping table ChromaQpTable[ i ] for i = 0..same_qp_table_for_chroma? 0 : 2 is derived as follows. qpInVal[ i ]
[0000] = -QpBdOffset C + delta_qp_in_val_minus1[ i ]
[0000] qpOutVal[ i ]
[0000] = -QpBdOffset C + delta_qp_out_val[ i ]
[0000] for( j = 1; j <= num_points_in_qp_table_minus1[ i ]; j++ ) { qpInVal[ i ][ j ] = qpInVal[ i ][ j - 1 ] + delta_qp_in_val_minus1[ i ][ j ]+1 qpOutVal[ i ][ j ] = qpOutVal[ i ][ j - 1 ] + delta_qp_out_val[ i ][ j ] } ChromaQpTable[ i ][ qpInVal[ i ][0] ] = qpOutVal[ i ][0] for( k = qpInVal[ i ][0] - 1; k >= -QpBdOffset C ; k-- ) ChromaQpTable[ i ][ k ] = Clip3( -QpBdOffset C , 63, ChromaQpTable[ i ][ k + 1 ] - 1 ) (7-31) for( j = 0; j < num_points_in_qp_table_minus1[ i ]; j++ ) { sh = ( delta_qp_in_val_minus1[ i ][j + 1 ] + 2 ) >> 1 for( k = qpInVal[ i ][ j ] + 1, m = 1; k <= qpInval[ i ][ j + 1 ]; k++, m++) ChromaQpTable[ i ][ k ] = ChromaQpTable[ i ][ qpInVal[ i ][ j ] ] + ( delta_qp_out_val[ i ][j + 1] * m + sh ) / ( delta_qp_in_val_minus1[ i ][j + 1] + 1 ) } for( k = qpInVal[ i ][ num_points_in_qp_table_minus1[ i ] ] + 1; k <= 63; k++ ) ChromaQpTable[ i ][ k ] = Clip3( -QpBdOffset C , 63, ChromaQpTable[ i ][ k - 1 ] + 1 )
[0204] When same_qp_table_for_chroma is equal to 1, k = -QpBdOffset CFor k from 0 to 63, ChromaQpTable
[0001] [ k ] and ChromaQpTable
[0002] [ k ] are set to be equal to ChromaQpTable
[0000] [ k ].
[0205] For i = 0 to same_qp_table_for_chroma? 0 : 2 and j = 0 to num_points_in_qp_table_minus1[ i ], the values of qpInVal[ i ][ j ] and qpOutVal[ i ][ j ] are -QpBdOffset C and including 63 to -QpBdOffset C and within the range from 63 to -QpBdOffset is a requirement for bitstream conformance.
[0206] The ChormaQPmapping table takes the luma QP value (QP i ) and the color component value (cIdx) as inputs, and it should be noted that it can also be expressed using a simple formula that outputs the corresponding chroma QP value (QP c ). The formula may depict a linear relationship between the luma QP and the chroma QP. For example, the formula can be as follows. QP c = QP i - x. Here, x is a constant that depends on the color component value (cIdx), and x can take different values for different color component indices including the co-located Cb - Cr components.
[0207] 8.8.3 Deblocking Filter Process 8.8.3.1 Overview The input to this process is the reconstructed picture before deblocking, i.e., the array recPicture L , and when ChromaArrayType is not equal to 0, the arrays recPicture Cb and recPicture Cr .
[0208] The output of this process is the modified and reconstructed picture after deblocking, i.e., the array recPicture L , and, when ChromaArrayType is not equal to 0, the arrays recPicture Cb and recPicture Cr .
[0209] Vertical edges within a picture are first filtered. Then, using the samples modified by the vertical edge filtering process as input, horizontal edges within the picture are filtered. The vertical and horizontal edges within each CTB of a CTU are processed separately on a coding unit basis. The vertical edges of coding blocks within a coding unit are filtered starting from the left edge of the coding block and proceeding in their geometrical order towards the right edge of the coding block. The horizontal edges of coding blocks within a coding unit are filtered starting from the upper edge of the coding block and proceeding in their geometrical order towards the lower edge of the coding block. Note - Although the filtering process is defined on a picture basis in this specification, the filtering process can be performed on a coding unit basis while obtaining equivalent results if the decoder appropriately considers the order of processing dependencies to generate the same output values.
[0210] The deblocking filter process is applied to the edges of all coding subblocks of a picture and the edges of transform blocks, excluding the following types of edges. - Edges at the boundaries of the picture - Edges that coincide with the boundaries of subpictures having a subpicture index subpicIdx and for which loop_filter_across_subpic_enabled_flag[ subpicIdx ] is equal to 0 - When VirtualBoundariesPresentFlag is equal to 1, the edges that coincide with the virtual boundary of the picture - When loop_filter_across_tiles_enabled_flag is equal to 0, the edges that coincide with the tile boundary - When loop_filter_across_slices_enabled_flag is equal to 0, the edges that coincide with the slice boundary - The edges that coincide with the upper or left boundary of a slice where slice_deblocking_filter_disabled_flag is equal to 1. - The edges within a slice where slice_deblocking_filter_disabled_flag is equal to 1 - Edges that do not correspond to the boundaries of the 4×4 sample grid of the luma component - Edges that do not correspond to the boundaries of the 8×8 sample grid of the chroma component - Edges within the luma component that have intra_bdpcm_luma_flag equal to 1 on both sides of the edge - Edges within the chroma component that have intra_bdpcm_chroma_flag equal to 1 on both sides of the edge - Edges of chroma sub-blocks that are not edges of the related transform unit
[0211] The type of edge, vertical or horizontal, is represented by the variable edgeType defined in Table 42.
[0212]
Table 5
[0213] When the slice_deblocking_filter_disabled_flag of the current slice is equal to 0, the following applies. - The variable treeType is set to be equal to DUAL_TREE_LUMA. - The variable treeType, the reconstructed picture before deblocking, i.e., the array recPicture L , and the variable edgeType set to be equal to EDGE_VER as input, and the modified reconstructed picture after deblocking, i.e., the array recPicture L as output, by calling the one-directional deblocking filter process defined in Section 8.8.3.2, the vertical edges are filtered. - The variable treeType, the modified reconstructed picture after deblocking, i.e., the array recPicture L , and the variable edgeType set to be equal to EDGE_HOR as input, and the modified reconstructed picture after deblocking, i.e., the array recPicture L as output, by calling the one-directional deblocking filter process defined in Section 8.8.3.2, the horizontal edges are filtered. - When ChromaArrayType is not equal to 0, the following applies. - The variable treeType is set to be equal to DUAL_TREE_CHROMA. - The variable treeType, the reconstructed picture before deblocking, i.e., the array recPicture Cb and the array recPicture Cr , and the variable edgeType set to be equal to EDGE_VER as input, and the modified reconstructed pictures after deblocking, i.e., the arrays recPicture Cb and recPicture Cr as output, by calling the one-directional deblocking filter process defined in Section 8.8.3.2, the vertical edges are filtered. - The variable treeType, the modified reconstructed pictures after deblocking, i.e., the arrays recPicture Cb and recPicture Crand the variable edgeType set to be equal to EDGE_HOR as input, and the modified and reconstructed picture after deblocking, i.e., the array recPicture Cb and recPicture Cr as output, by calling the one-way deblocking filter process defined in clause 8.8.3.2, horizontal edges are filtered.
[0214] 8.8.3.2 One-way Deblocking Filter Process The inputs to this process are as follows. - The variable treeType that specifies whether the luma component (DUAL_TREE_LUMA) is currently being processed or the chroma component (DUAL_TREE_CHROMA) is currently being processed - When treeType is equal to DUAL_TREE_LUMA, the reconstructed picture before deblocking, i.e., the array recPicture L - When ChromaArrayType is not equal to 0 and treeType is equal to DUAL_TREE_CHROMA, the arrays recPicture Cb and recPicture Cr - The variable edgeType that specifies whether vertical (EDGE_VER) edges are to be filtered or horizontal (EDGE_HOR) edges are to be filtered
[0215] The output of this process is the modified and reconstructed picture after deblocking, i.e., - When treeType is equal to DUAL_TREE_LUMA, the array recPicture L - When ChromaArrayType is not equal to 0 and treeType is equal to DUAL_TREE_CHROMA, the arrays recPicture Cb and recPicture Cr
[0216] The variables firstCompIdx and lastCompIdx are derived as follows. firstCompIdx = (treeType == DUAL_TREE_CHROMA)? 1 : 0 (1244) lastCompIdx = (treeType == DUAL_TREE_LUMA || ChromaArrayType == 0)? 0 : 2 (1245)
[0217] For each coding unit and each coding block for each color component of the coding unit indicated by the color component index cIdx in the range from firstCompIdx to lastCompIdx including firstCompIdx and lastCompIdx, with respect to the width nCbW of the coding block, the height nCbH of the coding block, and the position (xCb, yCb) of the top-left sample of the coding block, when cIdx is equal to 0, or when cIdx is not equal to 0, edgeType is equal to EDGE_VER, and xCb % 8 is equal to 0, or when cIdx is not equal to 0, edgeType is equal to EDGE_HOR, and yCb % 8 is equal to 0, the edge is filtered by the following ordered steps.
[0218] The variable filterEdgeFlag is derived as follows. - When edgeType is equal to EDGE_VER and one or more of the following conditions are true, filterEdgeFlag is set to be equal to 0. - The left boundary of the current coding block is the left boundary of the picture. - The left boundary of the current coding block coincides with the left boundary of the current subpicture, and loop_filter_across_subpic_enabled_flag[CurrSubpicIdx] or loop_filter_across_subpic_enabled_flag[subpicIdx] is equal to 0, where subpicIdx is the subpicture index of the subpicture whose left boundary of the current coding block coincides with the right subpicture boundary of that subpicture. - The left boundary of the current coding block is the left boundary of the tile, and loop_filter_across_tiles_enabled_flag is equal to 0. - The left boundary of the current coding block is the left boundary of the slice, and loop_filter_across_slices_enabled_flag is equal to 0. - The left boundary of the current coding block is one of the vertical virtual boundaries of the picture, and VirtualBoundariesPresentFlag is equal to 1. - Otherwise, when edgeType is equal to EDGE_HOR and one or more of the following conditions are true, the variable filterEdgeFlag is set to be equal to 0. - The upper boundary of the current luma coding block is the upper boundary of the picture. - The upper boundary of the current coding block coincides with the upper boundary of the current subpicture, and loop_filter_across_subpic_enabled_flag[CurrSubpicIdx] or loop_filter_across_subpic_enabled_flag[subpicIdx] is equal to 0, where subpicIdx is the subpicture index of the subpicture whose upper boundary of the current coding block coincides with the lower subpicture boundary of that subpicture. - The upper boundary of the current coding block is the upper boundary of the tile, and loop_filter_across_tiles_enabled_flag is equal to 0. - The upper boundary of the current coding block is the upper boundary of the slice, and loop_filter_across_slices_enabled_flag is equal to 0. - The upper boundary of the current coding block is one of the horizontal virtual boundaries of the picture, and VirtualBoundariesPresentFlag is equal to 1. - Otherwise, filterEdgeFlag is set to be equal to 1.
[0219] All elements of the two-dimensional arrays edgeFlags, maxFilterLengthQs, and maxFilterlengthPs of (nCbW)x(nCbH) are initialized to be equal to 0.
[0220] The process for deriving the boundaries of the transform block defined in clause 8.8.3.3 is called with the position (xCb, yCb), the width nCbW of the coding block, the height nCbH of the coding block, the variable cIdx, the variable filterEdgeFlag, the array edgeFlags, the maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs, and the variable edgeType as inputs, and the modified array edgeFlags, the modified maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs as outputs.
[0221] When cIdx is equal to 0, the process for deriving the coding block boundary as defined in Section 8.8.3.4 is called with the position (xCb, yCb), the width nCbW of the coding block, the height nCbH of the coding block, the array edgeFlags, the arrays maxFilterLengthPs and maxFilterLengthQs of the maximum filter lengths, and the variable edgeType as inputs, and outputs the modified array edgeFlags, the modified arrays maxFilterLengthPs and maxFilterLengthQs.
[0222] The picture sample array recPicture is derived as follows. - When cIdx is equal to 0, recPicture is set to be equal to the reconstructed luma picture sample array recPicture before deblocking L . - Otherwise, when cIdx is equal to 1, recPicture is set to be equal to the reconstructed chroma picture sample array recPicture before deblocking Cb . - In other cases (when cIdx is equal to 2), recPicture is set to be equal to the reconstructed chroma picture sample array recPicture before deblocking Cr .
[0223] The process for deriving the boundary filtering strength as defined in Section 8.8.3.5 is called with the picture sample array recPicture, the luma position (xCb, yCb), the width nCbW of the coding block, the height nCbH of the coding block, the variable edgeType, the variable cIdx, and the array edgeFlags as inputs, and outputs the (nCbW)x(nCbH) array bS.
[0224] An edge filtering process for one direction takes as input the variables edgeType, cIdx, the reconstructed picture recPicture before deblocking, the position (xCb, yCb), the width nCbW of the coding block, the height nCbH of the coding block, and the arrays bS, maxFilterLengthPs, and maxFilterLengthQs, and outputs the modified reconstructed picture recPicture, and is called for the coding block as specified in clause 8.8.3.6.
[0225] 8.8.3.3 Process for Deriving the Boundary of the Transform Block The inputs to this process are as follows. - The position (xCb, yCb) that specifies the top-left sample of the current coding block with respect to the top-left sample of the current picture - The variable nCbW that specifies the width of the current coding block - The variable nCbH that specifies the height of the current coding block - The variable cIdx that specifies the color component of the current coding block - The variable filterEdgeFlag - The 2D array edgeFlags of (nCbW) x (nCbH) - The 2D arrays maxFilterLengthQs and maxFilterLengthPs of (nCbW) x (nCbH) - The variable edgeType that specifies whether a vertical (EDGE_VER) edge or a horizontal (EDGE_HOR) edge is to be filtered
[0226] The outputs of this process are as follows. - The modified 2D array edgeFlags of (nCbW) x (nCbH) - The modified 2D arrays maxFilterLengthQs, maxFilterLengthPs of (nCbW) x (nCbH)
[0227] Depending on the edgeType, the arrays edgeFlags, maxFilterLengthPs, and maxFilterLengthQs are derived as follows. - The variable gridSize is set as follows. gridSize = cIdx == 0? 4 : 8 (1246) - When edgeType is equal to EDGE_VER, the following applies. - The variable numEdges is set to be equal to Max( 1, nCbW / gridSize ). - For xEdge = 0..numEdges - 1 and y = 0..nCbH - 1, the following applies. - The horizontal position x within the current coding block is set to be equal to xEdge * gridSize. - The value of edgeFlags[ x ][ y ] is derived as follows. - If VirtualBoundariesPresentFlag is equal to 1 and ( xCb + x ) is equal to VirtualBoundariesPosX[ n ] for any n = 0..NumVerVirtualBoundaries - 1, edgeFlags[ x ][ y ] is set to be equal to 0. - Otherwise, if x is equal to 0, edgeFlags[ x ][ y ] is set to be equal to filterEdgeFlag. - Otherwise, if the position ( xCb + x, yCb + y ) is at the edge of the transform block, edgeFlags[ x ][ y ] is set to be equal to 1. - When edgeFlags[ x ][ y ] is equal to 1, the following applies. - When cIdx is equal to 0, the following applies. - The value of maxFilterLengthQs[ x ][ y ] is derived as follows. - If the width represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y) is 4 or less, or if the width represented by the number of luma samples of the transform block at the luma position (xCb + x - 1, yCb + y) is 4 or less, then maxFilterLengthQs[x][y] is set to be equal to 1. - Otherwise, if the width represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y) is 32 or more, then maxFilterLengthQs[x][y] is set to be equal to 7. - In other cases, maxFilterLengthQs[x][y] is set to be equal to 3. - The value of maxFilterLengthPs[x][y] is derived as follows. - If the width represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y) is 4 or less, or if the width represented by the number of luma samples of the transform block at the luma position (xCb + x - 1, yCb + y) is 4 or less, then maxFilterLengthPs[x][y] is set to be equal to 1. - Otherwise, if the width represented by the number of luma samples of the transform block at the luma position (xCb + x - 1, yCb + y) is 32 or more, then maxFilterLengthPs[x][y] is set to be equal to 7. - In other cases, maxFilterLengthPs[x][y] is set to be equal to 3. - In other cases (when cIdx is not equal to 0), the values of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are derived as follows. - If both the width represented by the number of chroma samples of the conversion block at the chroma position (xCb + x, yCb + y) and the width at the chroma position (xCb + x - 1, yCb + y) are 8 or more, maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set to be equal to 3. - Otherwise, maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set to be equal to 1. - In other cases (when edgeType is equal to EDGE_HOR), the following applies. - The variable numEdges is set to be equal to Max(1, nCbH / gridSize). - For yEdge = 0..numEdges - 1 and x = 0..nCbW - 1, the following applies. - The vertical position y within the current coding block is set to be equal to yEdge * gridSize. - The value of edgeFlags[x][y] is derived as follows. - If VirtualBoundariesPresentFlag is equal to 1 and (yCb + y) is equal to any VirtualBoundariesPosY[n] for n = 0..NumHorVirtualBoundaries - 1, edgeFlags[x][y] is set to be equal to 0. - Otherwise, if y is equal to 0, edgeFlags[x][y] is set to be equal to filterEdgeFlag. - Otherwise, if the position (xCb + x, yCb + y) is at the edge of the conversion block, edgeFlags[x][y] is set to be equal to 1. - When edgeFlags[x][y] is equal to 1, the following applies. - When cIdx is equal to 0, the following applies. - The value of maxFilterLengthQs[x][y] is derived as follows. - If the height represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y) is 4 or less, or if the height represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y - 1) is 4 or less, maxFilterLengthQs[x][y] is set to be equal to 1. - Otherwise, if the height represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y) is 32 or more, maxFilterLengthQs[x][y] is set to be equal to 7. - In other cases, maxFilterLengthQs[x][y] is set to be equal to 3. - The value of maxFilterLengthPs[x][y] is derived as follows. - If the height represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y) is 4 or less, or if the height represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y - 1) is 4 or less, maxFilterLengthPs[x][y] is set to be equal to 1. - Otherwise, if the height represented by the number of luma samples of the transform block at the luma position (xCb + x, yCb + y - 1) is 32 or more, maxFilterLengthPs[x][y] is set to be equal to 7. - In other cases, maxFilterLengthPs[x][y] is set to be equal to 3. - In other cases (when cIdx is not equal to 0), the values of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are derived as follows. - If both the height represented by the number of chroma samples of the transform block at chroma position (xCb + x, yCb + y) and the height represented by the number of chroma samples of the transform block at chroma position (xCb + x, yCb + y - 1) are 8 or more, the following applies. - If (yCb + y) % CtbHeightC is greater than 0, i.e., the horizontal edge does not overlap the upper boundary of the chroma CTB, both maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set to be equal to 3. - Otherwise ((yCb + y) % CtbHeightC is equal to 0, i.e., the horizontal edge overlaps the upper boundary of the chroma CTB), maxFilterLengthPs[x][y] is set to be equal to 1 and maxFilterLengthQs[x][y] is set to be equal to 3. - Otherwise, maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set to be equal to 1.
[0228] 8.8.3.4 Derivation Process of Coding Sub - block Boundaries The inputs to this process are as follows. - The position (xCb, yCb) that specifies the top - left sample of the current coding block with reference to the top - left sample of the current picture - The variable nCbW that specifies the width of the current coding block - The variable nCbH that specifies the height of the current coding block - The 2 - D array edgeFlags of (nCbW)x(nCbH) - The 2 - D arrays maxFilterLengthQs and maxFilterLengthPs of (nCbW)x(nCbH) - A variable edgeType that specifies whether vertical (EDGE_VER) edges or horizontal (EDGE_HOR) edges are to be filtered
[0229] The output of this process is as follows. - A modified 2D array edgeFlags of (nCbW) x (nCbH) - Modified 2D arrays maxFilterLengthQs and maxFilterLengthPs of (nCbW) x (nCbH)
[0230] The number of horizontal coding sub - blocks numSbX and the number of vertical coding sub - blocks numSbY are derived as follows. - If inter_affine_flag[xCb][yCb] is equal to 1 or merge_subblock_flag[xCb][yCb] is equal to 1, numSbX and numSbY are set to be equal to NumSbX[xCb][yCb] and NumSbY[xCb][yCb] respectively. - Otherwise, numSbX and numSbY are both set to be equal to 1.
[0231] Depending on the value of edgeType, the following applies. - If edgeType is equal to EDGE_VER, the following applies. - The variable sbW is set to be equal to Max(8, nCbW / numSbX). - The array edgeTbFlags is set to be equal to edgeFlags. - For xEdge = 0..min((nCbW / 8) - 1, numSbX - 1), y = 0..nCbH - 1 - The horizontal position x within the current coding block is set to be equal to xEdge * sbW. - The value of edgeFlags[x][y] is derived as follows. - When VirtualBoundariesPresentFlag is equal to 1 and x is equal to any VirtualBoundariesPosX[n] for n = 0..NumVerVirtualBoundaries - 1, the following applies. edgeFlags[x][y] = 0 (1247) - Otherwise, the following applies. edgeFlags[x][y] = 2 (1248) - When edgeFlags[x][y] is equal to 1 or 2, the values of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows. - When x is equal to 0, the following applies. - When numSbX is greater than 1, the following applies. maxFilterLengthQs[x][y] = Min(5, maxFilterLengthQs[x][y]) (1249) - When inter_affine_flag[xCb - 1][yCb + y] is equal to 1 or merge_subblock_flag[xCb - 1][yCb + y] is equal to 1, the following applies. maxFilterLengthPs[x][y] = Min(5, maxFilterLengthPs[x][y]) (1250) - Otherwise, when edgeTbFlags[x][y] is equal to 1, the following applies. maxFilterLengthPs[x][y] = Min(5, maxFilterLengthPs[x][y]) (1251) maxFilterLengthQs[x][y] = Min(5, maxFilterLengthQs[x][y]) (1252) - Otherwise, if one or more of the following conditions are true - (x + 4) is greater than or equal to nCbW - edgeTbFlags[x - 4][y] is equal to 1 - edgeTbFlags[x + 4][y] is equal to 1 The following applies maxFilterLengthPs[x][y] = 1 (1253) maxFilterLengthQs[x][y] = 1 (1254) - Otherwise, if one or more of the following conditions are true - xEdge is equal to 1 - xEdge is equal to (nCbW / 8) - 1 - edgeTbFlags[x - sbW][y] is equal to 1 - edgeTbFlags[x + sbW][y] is equal to 1 The following applies maxFilterLengthPs[x][y] = 2 (1255) maxFilterLengthQs[x][y] = 2 (1256) - Otherwise, the following applies maxFilterLengthPs[x][y] = 3 (1257) maxFilterLengthQs[x][y] = 3 (1258) - Otherwise, if edgeType is equal to EDGE_HOR, the following applies - The variable sbH is set to be equal to Max(8, nCbH / numSbY). - The array edgeTbFlags is set to be equal to edgeFlags. - For yEdge = 0..min( ( nCbH / 8 ) - 1, numSbY - 1 ) and x = 0...nCbW - 1, - The vertical position y within the current coding block is set to be equal to yEdge * sbH. - The value of edgeFlags[ x ][ y ] is derived as follows. - When VirtualBoundariesPresentFlag is equal to 1 and y is equal to any VirtualBoundariesPosY[ n ] for n = 0..NumHorVirtualBoundaries - 1, the following applies. edgeFlags[ x ][ y ] = 0 (1259) - Otherwise, the following applies. edgeFlags[ x ][ y ] = 2 (1260) - When edgeFlags[ x ][ y ] is equal to 1 or 2, the values of maxFilterLengthPs[ x][ y ] and maxFilterLengthQs[ x ][ y ] are modified as follows. - When y is equal to 0, the following applies. - When numSbY is greater than 1, the following applies. maxFilterLengthQs[ x ][ y ] = Min( 5, maxFilterLengthQs[ x ][ y ] ) (1261) - When inter_affine_flag[ xCb + x ][ yCb - 1 ] is equal to 1 or merge_subblock_flag[ xCb + x ][ yCb - 1 ] is equal to 1, the following applies. maxFilterLengthPs[ x ][ y ] = Min( 5, maxFilterLengthPs[ x ][ y ] ) (1262) - Otherwise, when edgeTbFlags[x][y] is equal to 1, the following applies. maxFilterLengthPs[x][y] = Min(5, maxFilterLengthPs[x][y]) (1263) maxFilterLengthQs[x][y] = Min(5, maxFilterLengthQs[x][y]) (1264) - Otherwise, if one or more of the following conditions are true, - (y + 4) is greater than or equal to nCbH - edgeTbFlags[x][y - 4] is equal to 1 - edgeTbFlags[x][y + 4] is equal to 1 the following applies. maxFilterLengthPs[x][y] = 1 (1265) maxFilterLengthQs[x][y] = 1 (1266) - Otherwise, if one or more of the following conditions are true, - yEdge is equal to 1 - yEdge is equal to (nCbH / 8) - 1 - edgeTbFlags[x][y - sbH] is equal to 1 - edgeTbFlags[x][y + sbH] is equal to 1 the following applies. maxFilterLengthPs[x][y] = 2 (1267) maxFilterLengthQs[x][y] = 2 (1268) - Otherwise, the following applies. maxFilterLengthPs[x][y] = 3 (1269) maxFilterLengthQs[x][y] = 3 (1270)
[0232] 8.8.3.5 Derivation Process of Boundary Filtering Strength The inputs to this process are as follows. - Picture sample array recPicture - Position (xCb, yCb) specifying the top - left sample of the current coding block with respect to the top - left sample of the current picture - Variable nCbW specifying the width of the current coding block - Variable nCbH specifying the height of the current coding block - Variable edgeType specifying whether a vertical (EDGE_VER) edge or a horizontal (EDGE_HOR) edge is to be filtered - Variable cIdx specifying the color component of the current coding block - 2D array edgeFlags of (nCbW) x (nCbH)
[0233] The output of this process is a 2D array bS of (nCbW) x (nCbH) specifying the boundary filtering strength.
[0234] Variable xD i 、yD j 、xN, and yN are derived as follows. - Variable gridSize is set as follows. gridSize = cIdx == 0? 4 : 8 (1271) - When edgeType is equal to EDGE_VER, xD i = (i * gridSize) (1272) yD j = cIdx == 0? (j << 2) : (j << 1) (1273) xN is set to be equal to Max(0, (nCbW / gridSize) - 1) (1274) yN = cIdx == 0? (nCbH / 4) - 1 : (nCbH / 2) - 1 (1275) - In other cases (when edgeType is equal to EDGE_HOR), xD i = cIdx == 0? (i << 2) : (i << 1) (1276) yD j = j * gridSize (1277) xN = cIdx == 0? (nCbW / 4) - 1 : (nCbW / 2) - 1 (1278) yN = Max(0, (nCbH / gridSize) - 1) (1279)
[0235] For xD where i = 0..xN i and yD where j = 0..yN j the following applies. - When edgeFlags[xD i [yD j is equal to 0, variable bS[xD i [yD j is set to be equal to 0. - In other cases, the following applies. - Sample values p0 and q0 are derived as follows. - When edgeType is equal to EDGE_VER, p0 is set to be equal to recPicture[xCb + xD i - 1][yCb + yD j , and q0 is set to be equal to recPicture[xCb + xD i [yCb + yD j . - In other cases (when edgeType is equal to EDGE_HOR), p0 is recPicture[xCb + xD i [yCb + yD j- Set to be equal to [-1], and q0 is recPicture[xCb + xD i [yCb + yD j and set to be equal. - The variable bS[xD i [yD j is derived as follows. - When cIdx is equal to 0 and both samples p0 and q0 are within a coding block where intra_bdpcm_luma_flag is equal to 1, bS[xD i [yD j is set to be equal to 0. - Otherwise, when cIdx is greater than 0 and both samples p0 and q0 are within a coding block where intra_bdpcm_chroma_flag is equal to 1, bS[xD i [yD j is set to be equal to 0. - Otherwise, when sample p0 or q0 is within a coding block of a coding unit coded in an intra prediction mode, bS[xD i [yD j is set to be equal to 2. - Otherwise, when the edge of the block is also the edge of the coding block and sample p0 or q0 is within a coding block where ciip_flag is equal to 1, bS[xD i [yD j is set to be equal to 2. - Otherwise, when the edge of the block is also the edge of the transform block and sample p0 or q0 is within a transform block containing one or more non-zero transform coefficient levels, bS[xD i [yD j is set to be equal to 1. - Otherwise, if the prediction mode of the coding sub-block containing sample p0 is different from the prediction mode of the coding sub-block containing sample q0 (i.e., one of the coding sub-blocks is coded in the IBC prediction mode and the other is coded in the inter prediction mode), bS[xD i [yD j is set to be equal to 1. - Otherwise, if cIdx is equal to 0, edgeFlags[xD i [yD j is equal to 2, and one or more of the following conditions are true, bS[xD i [yD j is set to be equal to 1. - The coding sub-block containing sample p0 and the coding sub-block containing sample q0 are both coded in the IBC prediction mode, and the absolute difference between the horizontal or vertical components of the block vectors used for predicting the two coding sub-blocks is 8 or more in 1 / 16 luma sample units. - A different reference picture or a different number of motion vectors is used for predicting the coding sub-block containing sample p0 than for predicting the coding sub-block containing sample q0. Note 1 - The determination of whether the reference pictures used for two coding sub-blocks are the same or different is based only on which picture is referenced, regardless of whether the prediction is formed using the index of reference picture list 0 or the index of reference picture list 1, and regardless of whether the positions of the indices in the reference picture list are different. Note 2 - The number of motion vectors used for predicting the coding sub-block whose top-left sample covers (xSb, ySb) is equal to PredFlagL0[xSb][ySb] + PredFlagL1[xSb][ySb]. - One motion vector is used to predict the coding sub-block containing sample p0, and one motion vector is used to predict the coding sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the motion vectors used is 8 or more in 1 / 16 luma sample units. - Two motion vectors and two different reference pictures are used to predict the coding sub-block containing sample p0, and two motion vectors regarding the same two reference pictures are used to predict the coding sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used for predicting the two coding sub-blocks regarding the same reference picture is 8 or more in 1 / 16 luma sample units. - Two motion vectors regarding the same reference picture are used to predict the coding sub-block containing sample p0, and two motion vectors regarding the same reference picture are used to predict the coding sub-block containing sample q0, and both of the following conditions are true. - The absolute difference between the horizontal or vertical components of the motion vectors in list 0 used for predicting the two coding sub-blocks is 8 or more in 1 / 16 luma sample units, or the absolute difference between the horizontal or vertical components of the motion vectors in list 1 used for predicting the two coding sub-blocks is 8 or more in 1 / 16 luma sample units. - The absolute difference between the horizontal or vertical components of the motion vector in list 0 used for predicting the coding sub-block containing sample p0 and the motion vector in list 1 used for predicting the coding sub-block containing sample q0 is 8 or more in 1 / 16 luma sample units, or the absolute difference between the horizontal or vertical components of the motion vector in list 1 used for predicting the coding sub-block containing sample p0 and the motion vector in list 0 used for predicting the coding sub-block containing sample q0 is 8 or more in 1 / 16 luma sample units. - Otherwise, variable bS[ xD i [ yD jis set to be equal to 0.
[0236] 8.8.3.6 Edge Filtering Process for One Direction The input to this process is as follows. - A variable edgeType that specifies whether a vertical edge (EDGE_VER) or a horizontal edge (EDGE_HOR) is currently being processed - A variable cIdx that specifies the current color component - The reconstructed picture recPicture before deblocking - A position (xCb, yCb) that specifies the top - left sample of the current coding block with respect to the top - left sample of the current picture - A variable nCbW that specifies the width of the current coding block - A variable nCbH that specifies the height of the current coding block - An array bS that specifies the boundary strength - Arrays maxFilterLengthPs and maxFilterLengthQs
[0237] The output of this process is the corrected reconstructed picture recPicture after deblocking.
[0238] For the edge filtering process, the following is applied. - The variable gridSize is set as follows. gridSize = cIdx == 0? 4 : 8 (1280) - The variables subW, subH, xN, yN are derived as follows. subW = cIdx == 0? 1 : SubWidthC (1281) subH = cIdx == 0? 1 : SubHeightC (1282) xN = edgeType == EDGE_VER? Max(0, (nCbW / gridSize) - 1) : (nCbW / 4 / subW) - 1 (1283) yN = edgeType == EDGE_VER? (nCbH / 4 / subH) - 1 : Max(0, (nCbH / gridSize) - 1) (1284) - For the variable xD where k = 0..xN k and the variable yD where m = 0..yN m are derived as follows. xD k = edgeType == EDGE_VER? (k * gridSize) : (k << (2 / subW)) (1285) yD m = edgeType == EDGE_VER? (m << (2 / subH)) : (m * gridSize) (1286) - For xD where k = 0..xN k and yD where m = 0..yN m the following applies. - When bS[xD k [yD m is greater than 0, the following ordered steps apply. - When cIdx is equal to 0, the filtering process for the edges in the luma coding block of the current coding unit consists of the following ordered steps. 1. The decision process for the edges of the luma block defined in clause 8.8.3.6.1 is applied with the luma picture sample array recPicture, the position (xCb, yCb) of the luma coding block, the luma position (xBl, yBl) of the block set to be equal to (xD k , yD m ), the edge direction edgeType, and the boundary filtering strength bS[xD k [yD m, maxFilterLengthPs[ xD k [ yD m such that the maximum filter length maxFilterLengthP is set equal to, and maxFilterLengthQs[ xD k [ yD m such that the maximum filter length maxFilterLengthQ is set equal to, are input, and the determinations dE, dEp, and dEq, the modified maximum filter lengths maxFilterLengthP and maxFilterLengthQ, and the variable t C are called with the output. 2. The filtering process for the edges of the block as defined in paragraph 8.8.3.6.2 is called with the luma picture sample array recPicture, the position (xCb, yCb) of the luma coding block, the luma position (xBl, yBl) of the block set equal to (xD k , yD m ), the edge direction edgeType, the determinations dE, dEp, and dEq, the maximum filter lengths maxFilterLengthP and maxFilterLengthQ, and the variable t C and outputs the modified luma picture sample array recPicture. - Otherwise (when cIdx is not equal to 0), the filtering process for the edges within the chroma coding block of the current coding unit specified by cIdx consists of the following ordered steps. 1. The determination process for the edges of the chroma block as defined in paragraph 8.8.3.6.3 is called with the chroma picture sample array recPicture, the position (xCb, yCb) of the chroma coding block, the position (xBl, yBl) of the chroma block set equal to (xD k , yD m ), the edge direction edgeType, the variable cIdx, the boundary filtering strength bS[ xD k [ yD m , maxFilterLengthPs[ xDk [ yD m The maximum filter lengths maxFilterLengthP and maxFilterLengthQs set to be equal to ][ xD k [ yD m Taking as input the maximum filter length maxFilterLengthQ set to be equal to ][ yD, the modified maximum filter lengths maxFilterLengthP and maxFilterLengthQ, and the variable t C is called with the output. 2. When maxFilterLengthQ is greater than 0, the filtering process for the edges of the chroma blocks defined in Section 8.8.3.6.4 is called with the chroma picture sample array recPicture, the position (xCb, yCb) of the chroma coding block, the chroma position (xBl, yBl) of the block set to be equal to (xD k , yD m ), the edge direction edgeType, the variable t C , the maximum filter lengths maxFilterLengthP and maxFilterLengthQ as inputs, and with the modified chroma picture sample array recPicture as the output.
[0239] 8.8.3.6.1 Decision Process for the Edges of the Luma Blocks The inputs to this process are as follows. - The picture sample array recPicture - The position (xCb, yCb) specifying the top - left sample of the current coding block with respect to the top - left sample of the current picture - The position (xBl, yBl) specifying the top - left sample of the current block with respect to the top - left sample of the current coding block - The variable edgeType specifying whether a vertical (EDGE_VER) edge or a horizontal (EDGE_HOR) edge is to be filtered - The variable bS specifying the boundary filtering strength - Variable maxFilterLengthP that specifies the maximum filter length - Variable maxFilterLengthQ that specifies the maximum filter length
[0240] The output of this process is as follows. - Variables dE, dEp, and dEq that include a judgment - Modified filter length variables maxFilterLengthP and maxFilterLengthQ - Variable t C
[0241] Sample values p where i = 0..Max(2, maxFilterLengthP), j = 0..Max(2, maxFilterLengthQ), and k = 0 and 3 i,k and q j,k are derived as follows. - When edgeType is equal to EDGE_VER, the following applies. q j,k = recPicture[xCb + xBl + j][yCb + yBl + k] (1287) p i,k = recPicture[xCb + xBl - i - 1][yCb + yBl + k] (1288) - Otherwise (when edgeType is equal to EDGE_HOR), the following applies. q j,k = recPicture[xCb + xBl + k][yCb + yBl + j] (1289) p i,k = recPicture[xCb + xBl + k][yCb + yBl - i - 1] (1290)
[0242] Variable qpOffset is derived as follows. - When sps_ladf_enabled_flag is equal to 1, the following applies. - The reconstructed luma level variable lumaLevel is derived as follows. lumaLevel = ( ( p 0,0 + p 0,3 + q 0,0 + q 0,3 ) >> 2 ) (1291) - The variable qpOffset is set equal to sps_ladf_lowest_interval_qp_offset and modified as follows. for( i = 0; i < sps_num_ladf_intervals_minus2 + 1; i++ ) { if( lumaLevel > SpsLadfIntervalLowerBound[ i + 1 ] ) qpOffset = sps_ladf_qp_offset[ i ] (1292) else break } - Otherwise, qpOffset is set equal to 0.
[0243] The variables Qp Q and Qp P are set equal to the Qp 0,0 and p 0,0 values of the coding unit containing the coding block including the samples q Y respectively.
[0244] The variable qP is derived as follows. qP = ( ( Qp Q + Qp P + 1 ) >> 1 ) + qpOffset (1293)
[0245] The value of the variable β' is determined as specified in Table 43 based on the quantization parameter Q derived as follows. Q = Clip3( 0, 63, qP + ( slice_beta_offset_div2 << 1 ) ) (1294) where slice_beta_offset_div2 is the value of the syntax element slice_beta_offset_div2 for the slice containing sample q 0,0 and C
[0246] the variable β is derived as follows β = β' * (1 << (BitDepth - 8)) (1295)
[0247] the value of the variable t C ' is determined as specified in Table 43 based on the quantization parameter Q derived as follows Q = Clip3(0, 65, qP + 2 * (bS - 1) + (slice_tc_offset_div2 << 1)) (1296) where slice_tc_offset_div2 is the value of the syntax element slice_tc_offset_div2 for the slice containing sample q 0,0 and C
[0248] the variable t C is derived as follows t C = BitDepth < 10? (t C ' + 2) >> (10 - BitDepth) : t C ' * (1 << (BitDepth - 10)) (1297)
[0249] the following ordered steps are applied the variables dp0, dp3, dq0, and dq3 are derived as follows dp0 = Abs(p 2,0 - 2 * p 1,0 + p 0,0 ) (1298) dp3 = Abs(p 2,3 - 2 * p 1,3 + p 0,3 ) (1299) dq0 = Abs( q 2,0 - 2 * q 1,0 + q 0,0 ) (1300) dq3 = Abs( q 2,3 - 2 * q 1,3 + q 0,3 ) (1301) When both maxFilterLengthP and maxFilterLengthQ are 3 or more, the variables sp0, sq0, spq0, sp3, sq3, and spq3 are derived as follows. sp0 = Abs( p 3,0 - p 0,0 ) (1302) sq0 = Abs( q 0,0 - q 3,0 ) (1303) spq0 = Abs( p 0,0 - q 0,0 ) (1304) sp3 = Abs( p 3,3 - p 0,3 ) (1305) sq3 = Abs( q 0,3 - q 3,3 ) (1306) spq3 = Abs( p 0,3 - q 0,3 ) (1307) 1. The variables sidePisLargeBlk and sideQisLargeBlk are set to be equal to 0. When maxFilterLengthP is greater than 3, sidePisLargeBlk is set to be equal to 1. When maxFilterLengthQ is greater than 3, sideQisLargeBlk is set to be equal to 1. When edgeType is equal to EDGE_HOR and (yCb + yBl ) % CtbSizeY is equal to 0, sidePisLargeBlk is set to be equal to 0. The variables dSam0 and dSam3 are initialized to 0. When sidePisLargeBlk or sideQisLargeBlk is greater than 0, the following applies. a. The variables dp0L and dp3L are derived as follows, and maxFilterLengthP is modified. - When sidePisLargeBlk is equal to 1, the following applies. dp0L = (dp0 + Abs(p 5,0 - 2 * p 4,0 + p 3,0 ) + 1) >> 1 (1308) dp3L = (dp3 + Abs(p 5,3 - 2 * p 4,3 + p 3,3 ) + 1) >> 1 (1309) - Otherwise, the following applies. dp0L = dp0 (1310) dp3L = dp3 (1311) maxFilterLengthP = 3 (1312) b. The variables dq0L and dq3L are derived as follows. - When sideQisLargeBlk is equal to 1, the following applies. dq0L = (dq0 + Abs(q 5,0 - 2 * q 4,0 + q 3,0 ) + 1) >> 1 (1313) dq3L = (dq3 + Abs(q 5,3 - 2 * q 4,3 + q 3,3 ) + 1) >> 1 (1314) - Otherwise, the following applies. dq0L = dq0 (1315) dq3L = dq3 (1316) c. The variables sp0L and sp3L are derived as follows. - When maxFilterLengthP is equal to 7, the following applies. sp0L = sp0 + Abs( p 7,0 - p 6,0 - p 5,0 + p 4,0 ) (1317) sp3L = sp3 + Abs( p 7,3 - p 6,3 - p 5,3 + p 4,3 ) (1318) - Otherwise, the following applies. sp0L = sp0 (1319) sp3L = sp3 (1320) d. The variables sq0L and sq3L are derived as follows. - If maxFilterLengthQ is equal to 7, the following applies. sq0L = sq0 + Abs( q 4,0 - q 5,0 - q 6,0 + q 7,0 ) (1321) sq3L = sq3 + Abs( q 4,3 - q 5,3 - q 6,3 + q 7,3 ) (1322) - Otherwise, the following applies. sq0L = sq0 (1323) sq3L = sq3 (1324) e. The variables dpq0L, dpq3L, and dL are derived as follows. dpq0L = dp0L + dq0L (1325) dpq3L = dp3L + dq3L (1326) dL = dpq0L + dpq3L (1327) f. When dL is less than β, the following ordered steps apply. i. The variable dpq is set to be equal to 2 * dpq0L. The variable sp is set to be equal to sp0L, the variable sq is set to be equal to sq0L, and the variable spq is set to be equal to spq0. The variables p0, p3, q0, and q3 are first initialized to 0 and then modified according to sidePisLargeBlk and sideQisLargeBlk as follows. - When sidePisLargeBlk is equal to 1, the following applies. p3 = p 3,0 (1328) p0 = p maxFilterLengthP,0 (1329) - When sideQisLargeBlk is equal to 1, the following applies. q3 = q 3,0 (1330) q0 = q maxFilterLengthQ,0 (1331) For the sample position (xCb + xBl, yCb + yBl), the decision process for the luma samples defined in Section 8.8.3.6.5 is called with the sample values p0, p3, q0, q3, the variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t C as inputs, and the output is assigned to the decision dSam0. The variable dpq is set to be equal to 2 * dpq3L. The variable sp is set to be equal to sp3L, the variable sq is set to be equal to sq3L, and the variable spq is set to be equal to spq3. The variables p0, p3, q0, and q3 are first initialized to 0 and then modified according to sidePisLargeBlk and sideQisLargeBlk as follows. - When sidePisLargeBlk is equal to 1, the following applies. p3 = p 3,3 (1332) p0 = p maxFilterLengthP,3 (1333) - When sideQisLargeBlk is equal to 1, the following applies. q3 = q 3,3 (1334) q0 = q maxFilterLengthQ,3 (1335) When edgeType is equal to EDGE_VER for the sample position (xCb + xBl, yCb + yBl + 3) or edgeType is equal to EDGE_HOR for the sample position (xCb + xBl + 3, yCb + yBl), the decision process for the luma sample as defined in 8.8.3.6.5 is called with the sample values p0, p3, q0, q3, variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t C as input, and the output is assigned to decision dSam3. 2. Variables dE, dEp, and dEq are derived as follows. - If both dSam0 and dSam3 are equal to 1, variable dE is set to be equal to 3, dEp is set to be equal to 1, and dEq is set to be equal to 1. - Otherwise, the following ordered steps are applied. Variables dpq0, dpq3, dp, dq, and d are derived as follows. dpq0 = dp0 + dq0 (1336) dpq3 = dp3 + dq3 (1337) dp = dp0 + dp3 (1338) dq = dq0 + dq3 (1339) d = dpq0 + dpq3 (1340) Variables dE, dEp, dEq, sidePisLargeBlk, and sideQisLargeBlk are set to be equal to 0. If d is less than β and both maxFilterLengthP and maxFilterLengthQ are greater than 2, the following ordered steps are applied. Variable dpq is set to be equal to 2 * dpq0. The variable sp is set to be equal to sp0, the variable sq is set to be equal to sq0, and the variable spq is set to be equal to spq0. For the sample position (xCb + xBl, yCb + yBl), the decision process for the luma samples defined in Section 8.8.3.6.5 is performed with the variables p0, p3, q0, q3, variable dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t all set to be equal to 0 C and is called with these as inputs, and the output is assigned to the decision dSam0. The variable dpq is set to be equal to 2 * dpq3. The variable sp is set to be equal to sp3, the variable sq is set to be equal to sq3, and the variable spq is set to be equal to spq3. When edgeType is equal to EDGE_VER for the sample position (xCb + xBl, yCb + yBl + 3) or edgeType is equal to EDGE_HOR for the sample position (xCb + xBl + 3, yCb + yBl), the decision process for the samples defined in Section 8.8.3.6.5 is performed with the variables p0, p3, q0, q3, variable dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t all set to be equal to 0 C and is called with these as inputs, and the output is assigned to the decision dSam3. When d is less than β, the following ordered steps are applied. The variable dE is set to be equal to 1. When dSam0 is equal to 1 and dSam3 is equal to 1, the variable dE is set to be equal to 2, and both maxFilterLengthP and maxFilterLengthQ are set to be equal to 3. When maxFilterLengthP is greater than 1, maxFilterLengthQ is greater than 1, and dp is less than (β + (β >> 1)) >> 3, the variable dEp is set to be equal to 1. When maxFilterLengthP is greater than 1, maxFilterLengthQ is greater than 1, and dq is less than (β + (β >> 1)) >> 3, the variable dEq is set to be equal to 1. When dE is equal to 1, maxFilterLengthP is set to be equal to 1 + dEp, and maxFilterLengthQ is set to be equal to 1 + dEq.
[0250] [Table 6]
[0251] 8.8.3.6.2 Filtering Process for the Edges of the Luma Block The inputs to this process are as follows. - Picture sample array recPicture - Position (xCb, yCb) specifying the top - left sample of the current coding block with respect to the top - left sample of the current picture - Position (xBl, yBl) specifying the top - left sample of the current block with respect to the top - left sample of the current coding block - Variable edgeType specifying whether a vertical (EDGE_VER) edge or a horizontal (EDGE_HOR) edge is to be filtered - Variables dE, dEp, and dEq including the decision - Variables maxFilterLengthP and maxFilterLengthQ including the maximum filter length - Variable t C
[0252] The output of this process is the modified picture sample array recPicture.
[0253] Depending on the value of edgeType, the following applies. - When edgeType is equal to EDGE_VER, the following ordered steps apply. Sample values p where i = 0..maxFilterLengthP, j = 0..maxFilterLengthQ, and k = 0..3 i,k and q j,k are derived as follows. q j,k = recPicture[ xCb + xBl + j ][ yCb + yBl + k ] (1341) p i,k = recPicture[ xCb + xBl - i - 1 ][ yCb + yBl + k ] (1342) When dE is not equal to 0 and dE is not equal to 3, for each sample position (xCb + xBl, yCb + yBl + k), k = 0..3, the following ordered steps apply. The filtering process for luma samples using the short filter defined in clause 8.8.3.6.6 is called with sample values p where variables maxFilterLengthP, maxFilterLengthQ, i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i,k , q j,k , decision dE, variables dEp and dEq, and variable t C as input, and the number of filtered samples nDp and nDq from each side of the block boundary, and filtered sample values p i ' and q j ' as output. When nDp is greater than 0, the filtered sample values p where i = 0..nDp - 1 i replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl - i - 1 ][ yCb + yBl + k ] = p i ' (1343) When nDq is greater than 0, the filtered sample values q for which j = 0..nDq - 1 j ' replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl + j ][ yCb + yBl + k ] = q j ' (1344) When dE is equal to 3, for each sample position ( xCb + xBl, yCb + yBl + k ), k = 0..3, the following ordered steps are applied. The filtering process for luma samples using the long filter defined in clause 8.8.3.6.7 is called with the sample values p i,k , q j,k , and t C as input and the filtered sample values p i ' and q j ' as output. The filtered sample values p for which i = 0..maxFilterLengthP - 1 i ' replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl - i - 1 ][ yCb + yBl + k ] = p i ' (1345) The filtered sample values q for which j = 0..maxFilterLengthQ - 1 j ' replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl + j ][ yCb + yBl + k ] = q j ' (1346) - Otherwise (when edgeType is equal to EDGE_HOR), the following ordered steps are applied. 1. Sample values p i,k and q j,k are derived as follows. q j,k = recPicture[ xCb + xBl + k ][ yCb + yBl + j ] (1347) p i,k = recPicture[ xCb + xBl + k ][ yCb + yBl - i - 1 ] (1348) 2. When dE is not equal to 0 and dE is not equal to 3, for each sample position (xCb + xBl + k, yCb + yBl), k = 0..3, the following ordered steps are applied. The filtering process for luma samples using the short filter defined in 8.8.3.6.6 is called with sample values p i,k and q i,k the decision dE, variables dEp and dEq, and variable t C as input, and the number of filtered samples nDp and nDq from each side of the block boundary, and the filtered sample values p i ' and q j ' as output. When nDp is greater than 0, the filtered sample values p i ' for i = 0..nDp - 1 replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl + k ][ yCb + yBl - i - 1 ] = p i ' (1349) When nDq is greater than 0, the filtered sample values q for which j = 0..nDq - 1 j ' replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl + k ][ yCb + yBl + j ] = q j ' (1350) 3. When dE is equal to 3, for each sample position (xCb + xBl + k, yCb + yBl), k = 0..3, the following ordered steps are applied. The filtering process for luma samples using the long filter defined in 8.8.3.6.7 is called with the sample values p i,k , q j,k , and the variable t C as input, and the filtered sample values p i ' and q j ' as output. The filtered sample values p for which i = 0..maxFilterLengthP - 1 i ' replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl + k ][ yCb + yBl - i - 1 ] = p i ' (1351) The filtered sample values q for which j = 0..maxFilterLengthQ - 1 j ' replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl + k ][ yCb + yBl + j ] = q j ' (1352)
[0254] 8.8.3.6.3 Judgment Process for Chroma Block Edges This process is called only when ChromaArrayType is not equal to 0.
[0255] The inputs to this process are as follows. - Chroma picture sample array recPicture - Chroma position (xCb, yCb) specifying the top-left sample of the current chroma coding block with respect to the top-left chroma sample of the current picture - Chroma position (xBl, yBl) specifying the top-left sample of the current chroma block with respect to the top-left sample of the current chroma coding block - Variable edgeType specifying whether a vertical (EDGE_VER) edge or a horizontal (EDGE_HOR) edge is to be filtered - Variable cIdx specifying the color component index - Variable bS specifying the boundary filtering strength - Variable maxFilterLengthP specifying the maximum filter length - Variable maxFilterLengthQ specifying the maximum filter length
[0256] The outputs of this process are as follows. - Modified filter length variables maxFilterLengthP and maxFilterLengthQ - Variable t C
[0257] Variable maxK is derived as follows. - When edgeType is equal to EDGE_VER, the following applies. maxK = (SubHeightC == 1)? 3 : 1 (1353) - Otherwise (when edgeType is equal to EDGE_HOR), the following applies. maxK = (SubWidthC == 1)? 3 : 1 (1354)
[0258] Values p where i = 0..maxFilterLengthP, j = 0..maxFilterLengthQ, and k = 0..maxK i,k and q i,k are derived as follows. - When edgeType is equal to EDGE_VER, the following applies. q j,k = recPicture[xCb + xBl + j][yCb + yBl + k] (1355) p i,k = recPicture[xCb + xBl - i - 1][yCb + yBl + k] (1356) subSampleC = SubHeightC (1357) - Otherwise (when edgeType is equal to EDGE_HOR), the following applies. q j,k = recPicture[xCb + xBl + k][yCb + yBl + j] (1358) p i,k = recPicture[xCb + xBl + k][yCb + yBl - i - 1] (1359) subSampleC = SubWidthC (1360)
[0259] Variable Qp P is derived as follows. - At the luma position (xTb P , yTb P ), with respect to the top-left luma sample of the picture, sample p 0,0It is set as the top - left luma sample position of the transform block including it. - TuCResMode[ xTb P [ yTb P is equal to 2, Qp P is set to be equal to Qp' 0,0 of the transform block including sample p CbCr . - Otherwise, when cIdx is equal to 1, Qp P is set to be equal to Qp' 0,0 of the transform block including sample p Cb . - In other cases, Qp P is set to be equal to Qp' 0,0 of the transform block including sample p Cr .
[0260] The variable Qp Q is derived as follows. - The luma position (xTb Q , yTb Q ) is set as the top - left luma sample position of the transform block including sample q 0,0 with reference to the top - left luma sample of the picture. - TuCResMode[ xTb Q [ yTb Q is equal to 2, Qp Q is set to be equal to Qp' 0,0 of the transform block including sample q CbCr . - Otherwise, when cIdx is equal to 1, Qp Q is set to be equal to Qp' 0,0 of the transform block including sample q Cb . - In other cases, Qp Q is set to be equal to Qp' 0,0 of the transform block including sample q Cr .
[0261] The variable Qp C is derived as follows. Qp C = ( Qp Q - QpBdOffset + Qp P - QpBdOffset + 1 ) >> 1 (1361)
[0262] The value of the variable β' is determined as specified in Table 43 based on the quantization parameter Q derived as follows. sliceBetaOffsetDiv2 = ( cIdx == 1? slice_cb_beta_offset_div2 : slice_cr_beta_offset_div2 ) Q = Clip3( 0, 63, Qp C + ( sliceBetaOffsetDiv2 << 1 ) ) (1362) where slice_cb_beta_offset_div2 and slice_cr_beta_offset_div2 are the values of the syntax elements slice_cb_beta_offset_div2 and slice_cr_beta_offset_div2 for the slice containing sample q 0,0 respectively.
[0263] The variable β is derived as follows. β = β' * ( 1 << ( BitDepth - 8 ) ) (1363)
[0264] The value of the variable t C ' is determined as specified in Table 43 based on the chroma quantization parameter Q derived as follows. sliceTcOffsetDiv2 = ( cIdx == 1? slice_cb_tc_offset_div2 : slice_cr_beta_offset_div2 ) Q = Clip3( 0, 65, Qp C + 2 * ( bS - 1 ) + ( sliceTcOffsetDiv2 << 1 ) ) (1364) where slice_cb_tc_offset_div2 and slice_cr_beta_offset_div2 are the values of the syntax elements slice_cb_tc_offset_div2 and slice_cr_beta_offset_div2, respectively, for the slice containing sample q 0,0 is.
[0265] The variable t C is derived as follows. t C = (BitDepth < 10)? (t C ' + 2) >> (10 - BitDepth) : t C ' * (1 << (BitDepth - 10)) (1365)
[0266] When both maxFilterLengthP and maxFilterLengthQ are equal to 1 and bS is not equal to 2, maxFilterLengthP and maxFilterLengthQ are both set to be equal to 0.
[0267] When maxFilterLengthQ is equal to 3, the following ordered steps apply. 1. The variable n1 is derived as follows. n1 = subSampleC == 2? 1 : 3 (1366) 2. When maxFilterLengthP is equal to 1, samples p 3,0 and p 2,0 are both set to be equal to p 1,0 , and samples p 3,n1 , p 2,n1 are both set to be equal to p 1,n1 . 3. The variables dpq0, dpq1, dp, dq, and d are derived as follows. dp0 = Abs(p 2,0 - 2 * p 1,0 + p 0,0 ) (1367) dp1 = Abs( p 2,n1 - 2 * p 1,n1 + p 0,n1 ) (1368) dq0 = Abs( q 2,0 - 2 * q 1,0 + q 0,0 ) (1369) dq1 = Abs( q 2,n1 - 2 * q 1,n1 + q 0,n1 ) (1370) dpq0 = dp0 + dq0 (1371) dpq1 = dp1 + dq1 (1372) dp = dp0 + dp1 (1373) dq = dq0 + dq1 (1374) d = dpq0 + dpq1 (1375) 4. The variables dSam0 and dSam1 are both set to be equal to 0. 5. When d is less than β, the following ordered steps are applied. a. The variable dpq is set to be equal to 2 * dpq0. b. The variable dSam0 is derived by calling the decision process for chroma samples as defined in clause 8.8.3.6.8 with the sample values p 0,0 , p 3,0 , q 0,0 , and q 3,0 , the variable dpq, β, and t C as inputs, with respect to the sample position (xCb + xBl, yCb + yBl), and the output is assigned to the decision dSam0. c. The variable dpq is set to be equal to 2 * dpq1. d. The variable dSam1 is modified as follows. - When edgeType is equal to EDGE_VER, the decision process for chroma samples as defined in clause 8.8.3.6.8 is called with respect to the sample position (xCb + xBl, yCb + yBl + n1), with the sample values p0,n1 , p 3,n1 , q 0,n1 , and q 3,n1 , variables dpq, β, and t C are called with the inputs, and the output is assigned to the determination dSam1. - Otherwise (when edgeType is equal to EDGE_HOR), for the sample position (xCb + xBl + n1, yCb + yBl), the determination process for the chroma samples defined in Section 8.8.3.6.8 is applied to the sample value p 0,n1 , p 3,n1 , q 0,n1 , and q 3,n1 , variables dpq, β, and t C are called with the inputs, and the output is assigned to the determination dSam1. 6. When dSam0 is equal to 0 or dSam1 is equal to 0, maxFilterLengthP and maxFilterLengthQ are both set to be equal to 1.
[0268] 8.8.3.6.4 Filtering Process for Chroma Block Edges This process is called only when ChromaArrayType is not equal to 0.
[0269] The inputs to this process are as follows. - Chroma picture sample array recPicture - Chroma position (xCb, yCb) specifying the top-left sample of the current chroma coding block with respect to the top-left chroma sample of the current picture - Chroma position (xBl, yBl) specifying the top-left sample of the current chroma block with respect to the top-left sample of the current chroma coding block - Variable edgeType specifying whether a vertical (EDGE_VER) edge or a horizontal (EDGE_HOR) edge is to be filtered - Variable maxFilterLengthP specifying the maximum filter length - The variable maxFilterLengthQ that specifies the maximum filter length - The variable tC
[0270] The output of this process is the array recPicture of modified chroma picture samples.
[0271] The variable maxK is derived as follows. - When edgeType is equal to EDGE_VER, the following applies. maxK = (SubHeightC == 1)? 3 : 1 (1376) - Otherwise (when edgeType is equal to EDGE_HOR), the following applies. maxK = (SubWidthC == 1)? 3 : 1 (1377)
[0272] Values p where i = 0..maxFilterLengthP i Values q where j = 0..maxFilterLengthQ j and values k where k = 0..maxK are derived as follows. - When edgeType is equal to EDGE_VER, the following applies. q j,k = recPicture[xCb + xBl + j][yCb + yBl + k] (1378) p i,k = recPicture[xCb + xBl - i - 1][yCb + yBl + k] (1379) - Otherwise (when edgeType is equal to EDGE_HOR), the following applies. q j,k = recPicture[xCb + xBl + k][yCb + yBl + j] (1380) p i,k = recPicture[xCb + xBl + k][yCb + yBl - i - 1] (1381)
[0273] Depending on the value of edgeType, the following applies. - When edgeType is equal to EDGE_VER, for each sample position (xCb + xBl, yCb + yBl + k), k = 0..maxK, the following ordered steps apply. 1. The filtering process for chroma samples defined in clause 8.8.3.6.9 is called with sample values p i,k , q j,k , and variable t C as input, and filtered sample values p i ' and q j ' as output, where i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1. 2. The filtered sample values p i ' and q j ' replace the corresponding samples in the sample array recPicture as follows. recPicture[xCb + xBl + j][yCb + yBl + k] = q j ' (1382) recPicture[xCb + xBl - i - 1][yCb + yBl + k] = p i ' (1383) - Otherwise (when edgeType is equal to EDGE_HOR), for each sample position (xCb + xBl + k, yCb + yBl), k = 0..maxK, the following ordered steps apply. 1. The filtering process for the chroma samples as defined in item 8.8.3.6.9 takes as input the sample values p with variables maxFilterLengthP and maxFilterLengthQ, i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i,k , q j,k , and the variable t C and outputs the filtered sample values p i ' and q j ' with i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1. 2. The filtered sample values p i ' and q j ' with i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1 replace the corresponding samples in the sample array recPicture as follows. recPicture[ xCb + xBl + k ][ yCb + yBl + j ] = q j ' (1384) recPicture[ xCb + xBl + k ][ yCb + yBl - i - 1 ] = p i ' (1385)
[0274] 8.8.3.6.5 Decision process for luma samples The inputs to this process are as follows. - The sample values p0, p3, q0, and q3 - The variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t C
[0275] The output of this process is the variable dSam which contains the decision.
[0276] The variables sp and sq are modified as follows. - When sidePisLargeBlk is equal to 1, the following applies. sp = ( sp + Abs( p3- p0) + 1 ) >> 1 (1386) - When sideQisLargeBlk is equal to 1, the following applies. sq = ( sq + Abs( q3- q0) + 1 ) >> 1 (1387)
[0277] The variables sThr1 and sThr2 are derived as follows. - If sidePisLargeBlk is equal to 1 or sideQisLargeBlk is equal to 1, the following applies. sThr1 = 3 *β>> 5 (1388) sThr2 =β>> 4 (1389) - Otherwise, the following applies. sThr1 =β>> 3 (1390) sThr2 =β>> 2 (1391)
[0278] The variable dSam is specified as follows. - If all of the following conditions are true, dSam is set to be equal to 1. - dpq is less than sThr2 - sp + sq is less than sThr1 - spq is less than ( 5 * t C + 1 ) >> 1 - Otherwise, dSam is set to be equal to 0.
[0279] 8.8.3.6.6 Filtering Process for Luma Samples Using Short Filters The input to this process is as follows. - The variables maxFilterLengthP and maxFilterLengthQ - Sample values p where i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i and q j - Variable dE - Variables dEp and dEq each containing a determination for filtering sample p1 and q1 respectively - Variable t C
[0280] The output of this process is as follows. - Number of filtered samples nDp and nDq - Filtered sample values p where i = 0..nDp - 1, j = 0..nDq - 1 i ' and q j '
[0281] Depending on the value of dE, the following applies. - If variable dE is equal to 2, then nDp and nDq are set to both be equal to 3, and the following strong filtering is applied. p0' = Clip3( p0 - 3 * t C , p0 + 3 * t C , ( p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 + 4 ) >> 3 ) (1392) p1' = Clip3( p1 - 2 * t C , p1 + 2 * t C , ( p2 + p1 + p0 + q0 + 2 ) >> 2 ) (1993) p2' = Clip3( p2 - 1 * t C , p2 + 1 * t C , ( 2 * p3 + 3 * p2 + p1 + p0 + q0 + 4 ) >> 3 ) (1394) q0' = Clip3( q0 - 3 * t C , q0 + 3 * t C, ((p1 + 2 * p0 + 2 * q0 + 2 * q1 + q2 + 4) >> 3) (1395) q1' = Clip3(q1 - 2 * t C , q1 + 2 * t C , ((p0 + q0 + q1 + q2 + 2) >> 2) (1396) q2' = Clip3(q2 - 1 * t C , q2 + 1 * t C , ((p0 + q0 + q1 + 3 * q2 + 2 * q3 + 4) >> 3) (1397) - Otherwise, both nDp and nDq are set equal to 0, and the following weak filtering is applied. - The following is applied. Δ = ((9 * (q0 - p0) - 3 * (q1 - p1) + 8) >> 4) (1398) - When Abs(Δ) is less than t C * 10, the following ordered steps are applied. - The filtered sample values p0' and q0' are specified as follows. Δ = Clip3(-t C , t C , Δ) (1399) p0' = Clip1(p0 + Δ) (1400) q0' = Clip1(q0 - Δ) (1401) - When dEp is equal to 1, the filtered sample value p1' is specified as follows. Δp = Clip3(-(t C >> 1), t C >> 1, (((p2 + p0 + 1) >> 1) - p1 + Δ) >> 1) (1402) p1' = Clip1(p1 + Δp) (1403) - When dEq is equal to 1, the filtered sample value q1' is specified as follows. Δq = Clip3( -( t C >> 1 ), t C >> 1, ( ( ( q2+ q0+ 1 ) >> 1 ) - q1-Δ) >> 1 ) (1404) q1' = Clip1( q1+Δq ) (1405) - nDp is set to be equal to dEp + 1, and nDq is set to be equal to dEq + 1.
[0282] When nDp is greater than 0 and the pred_mode_plt_flag of the coding unit including the coding block containing sample p0 is equal to 1, nDp is set to be equal to 0.
[0283] When nDq is greater than 0 and the pred_mode_plt_flag of the coding unit including the coding block containing sample q0 is equal to 1, nDq is set to be equal to 0.
[0284] 8.8.3.6.7 Filtering Process for Luma Samples Using Long Filters The input to this process is as follows. - Variables maxFilterLengthP and maxFilterLengthQ - Sample values p where i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ i and q j - Variable t C
[0285] The output of this process is as follows. - Filtered sample values p' where i = 0..maxFilterLengthP - 1, j = 0..maxFilterLenghtQ - 1 i and q j '
[0286] The variable refMiddle is derived as follows. - When maxFilterLengthP is equal to maxFilterLengthQ and maxFilterLengthP is equal to 5, the following applies. refMiddle = ( p4+ p3+ 2 * ( p2+ p1+ p0+ q0+ q1+ q2) + q3+ q4+ 8 ) >> 4 (1406) - Otherwise, when maxFilterLengthP is equal to maxFilterLengthQ and maxFilterLengthP is not equal to 5, the following applies. refMiddle = ( p6+ p5+ p4+ p3+ p2+ p1+ 2 * ( p0+ q0) + q1+ q2+ q3+ q4+ q5+ q6+ 8 ) >> 4 (1407) - Otherwise, when one of the following conditions is true, - maxFilterLengthQ is equal to 7 and maxFilterLengthP is equal to 5. - maxFilterLengthQ is equal to 5 and maxFilterLengthP is equal to 7. The following applies. refMiddle = ( p5+ p4+ p3+ p2+ 2 * ( p1+ p0+ q0+ q1) + q2+ q3+ q4+ q5+ 8 ) >> 4 (1408) - Otherwise, when one of the following conditions is true, - maxFilterLengthQ is equal to 5 and maxFilterLengthP is equal to 3. - maxFilterLengthQ is equal to 3 and maxFilterLengthP is equal to 5. The following applies. refMiddle = ( p3+ p2+ p1+ p0+ q0+ q1+ q2+ q3+ 4) >> 3 (1409) - Instead, when maxFilterLengthQ is equal to 7 and maxFilterLengthP is equal to 3, the following applies. refMiddle = ( 2 * ( p2+ p1+ p0+ q0) + p0+ p1+ q1+ q2+ q3+ q4+ q5+ q6+ 8 ) >> 4 (1410) - In other cases, the following applies. refMiddle = ( p6+ p5+ p4+ p3+ p2+ p1+ 2 *( q2+ q1+ q0+ p0) + q0+ q1+ 8 ) >> 4 (1411)
[0287] The variables refP and refQ are derived as follows. refP = (p maxFilterLengtP + p maxFilterLengthP-1 + 1 ) >> 1 (1412) refQ = ( q maxFilterLengtQ + q maxFilterLengthQ-1 + 1 ) >> 1 (1413)
[0288] The variables f i and t C PD i are defined as follows. - When maxFilterLengthP is equal to 7, the following applies. f 0..6 = { 59, 50, 41, 32, 23, 14, 5} (1414) t C PD 0..6 = { 6, 5, 4, 3, 2, 1, 1} (1415) - Instead, when maxFilterLengthP is equal to 5, the following applies. f 0..4 = { 58, 45, 32, 19, 6} (1416) t C PD 0..4 = { 6, 5, 4, 3, 2} (1417) - In other cases, the following applies. f 0..2 = {53, 32, 11} (1418) t C PD 0..2 = {6, 4, 2} (1419)
[0289] Variable g j and t C QD j are defined as follows. - When maxFilterLengthQ is equal to 7, the following applies. g 0..6 = {59, 50, 41, 32, 23, 14, 5} (1420) t C QD 0..6 = {6, 5, 4, 3, 2, 1, 1} (1421) - Otherwise, when maxFilterLengthQ is equal to 5, the following applies. g 0..4 = {58, 45, 32, 19, 6} (1422) t C QD 0..4 = {6, 5, 4, 3, 2} (1423) - In other cases, the following applies. g 0..2 = {53, 32, 11} (1424) t C QD 0..2 = {6, 4, 2} (1425)
[0290] The filtered sample values p i ' and q j ' where i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1 are derived as follows. p i ' = Clip3(p i - (t C * t C PD i ) >> 1, pi + (t C * t C PD i ) >> 1, (refMiddle * f i + refP * (64 - f i ) + 32) >> 6)(1426) q j ' = Clip3(q j - (t C * t C QD j ) >> 1, q j + (t C * t C QD j ) >> 1, (refMiddle * g j + refQ * (64 - g j ) + 32) >> 6)(1427)
[0291] Coding block containing sample p i When the pred_mode_plt_flag of the coding unit containing the coding block containing sample p is equal to 1, the filtered sample value p i ' is replaced by the corresponding input sample value p i where i = 0..maxFilterLengthP - 1.
[0292] Coding block containing sample q i When the pred_mode_plt_flag of the coding unit containing the coding block containing sample q is equal to 1, the filtered sample value q i ' is replaced by the corresponding input sample value q j where j = 0..maxFilterLengthQ - 1.
[0293] 8.8.3.6.8 Decision Process for Chroma Samples The input to this process is as follows. - Sample values p0, p3, q0, and q3 - Variables dpq, β, and t C
[0294] The output of this process is the variable dSam, which includes a determination.
[0295] The variable dSam is specified as follows. - If all of the following conditions are true, dSam is set to be equal to 1. - dpq is less than (β >> 2). - Abs(p3 - p0) + Abs(q0 - q3) is less than (β >> 3). - Abs(p0 - q0) is less than (5 * t C + 1) >> 1. - Otherwise, dSam is set to be equal to 0.
[0296] 8.8.3.6.9 Filtering Process for Chroma Samples This process is called only when ChromaArrayType is not equal to 0.
[0297] The inputs to this process are as follows. - The variables maxFilterLengthP and maxFilterLengthQ - Chroma sample values p where i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1 i and q j - The variable t C
[0298] The outputs of this process are the filtered sample values p where i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1 i ' and q j '.
[0299] Filtered sample values p where i = 0..maxFilterLengthP - 1 and j = 0..maxFilterLengthQ - 1 i ' and q j ' are derived as follows. - If both maxFilterLengthP and maxFilterLengthQ are equal to 3, the following strong filtering is applied. p0' = Clip3( p0 - t C , p0 + t C , ( p3 + p2 + p1 + 2 * p0 + q0 + q1 + q2 + 4 ) >> 3 ) (1428) p1' = Clip3( p1 - t C , p1 + t C , ( 2 * p3 + p2 + 2 * p1 + p0 + q0 + q1 + 4 ) >> 3 ) (1429) p2' = Clip3( p2 - t C , p2 + t C , ( 3 * p3 + 2 * p2 + p1 + p0 + q0 + 4 ) >> 3 ) (1430) q0' = Clip3( q0 - t C , q0 + t C , ( p2 + p1 + p0 + 2 * q0 + q1 + q2 + q3 + 4 ) >> 3 ) (1431) q1' = Clip3( q1 - t C , q1 + t C , ( p1 + p0 + q0 + 2 * q1 + q2 + 2 * q3 + 4 ) >> 3 ) (1432) q2' = Clip3( q2 - t C , q2 + t C , ( p0 + q0 + q1 + 2 * q2 + 3 * q3 + 4 ) >> 3 ) (1433) - Otherwise, if variable maxFilterLengthP is equal to 1 and maxFilterLengthQ is equal to 3, the following filtering is applied. p0' = Clip3( p0 - t C , p0 + t C , ( 3 * p1 + 2 * p0 + q0 + q1 + q2 + 4 ) >> 3 ) (1434) q0' = Clip3( q0 - t C , q0 + t C , ( 2 * p1 + p0 + 2 * q0 + q1 + q2 + q3 + 4 ) >> 3 ) (1435) q1' = Clip3( q1 - t C , q1 + t C , ( p1 + p0 + q0 + 2 * q1 + q2 + 2 * q3 + 4 ) >> 3 ) (1436) q2' = Clip3( q2 - t C , q2 + t C , ( p0 + q0 + q1 + 2 * q2 + 3 * q3 + 4 ) >> 3 ) (1437) - Otherwise, the following weak filtering is applied. Δ = Clip3( -t C , t C , ( ( ( ( q0 - p0) << 2 ) + p1 - q1 + 4 ) >> 3 ) ) (1438) p0' = Clip1( p0 + Δ) (1439) q0' = Clip1( q0 - Δ) (1440)
[0300] Sample p i When the pred_mode_plt_flag of the coding unit including the coding block including sample p i is equal to 1, the filtered sample value p i ' is replaced by the corresponding input sample value p
[0301] Sample q iWhen the pred_mode_plt_flag of a coding unit including a coding block including i is equal to 1, the filtered sample value q i is replaced by the corresponding input sample value q
[0302] Currently, the signaling of Cb and Cr deblocking control parameters is performed, for example, when the value of ChromaArrayType is equal to 0, even if the color format of the encoded sequence is 4:0:0. When the input sequence has no color components, there is no further need to perform deblocking for the color components.
[0303] In some cases, the deblocking control parameters may be the same across both the luma and chroma components in typical cases.
[0304] Blocks coded using the Joint Cb-Cr mechanism may exhibit different quantization error characteristics and may benefit from signaling separate deblocking control parameters (beta and Tc offset).
[0305] Embodiment 1 In this embodiment, the beta and Tc offset of Cb and Cr deblocking (for simplicity, in this application, we further refer to those offsets as deblocking control parameters) are signaled only when the value of ChromaArrayType is not equal to 0.
[0306] The syntax for this embodiment is shown as follows.
[0307]
Table 7A
Table 7B
[0308] Or,
[0309]
Table 8
[0310] Or,
[0311]
Table 9
[0312] In some examples, since ChromaArrayType is signaled at the sequence parameter set level (SPS), the value of ChromaArrayType may not be obtained at the PPS syntax level. Conditional signaling based on ChromaArrayType within the PPS may introduce an analysis dependency between the SPS and the PPS. Therefore, one alternative solution is to move the existing deblocking control parameters from the PPS level to the SPS level. In this way, the analysis dependency between the SPS and the PPS is avoided.
[0313] Alternatively, the deblocking control parameters may be conditionally signaled based on an existing syntax element called pps_chroma_tool_offsets_present_flag.
[0314] The modified syntax of the PPS is shown below.
[0315]
Table 10A
Table 10B
[0316] The above solution has the advantage of not creating any parsing dependencies between SPS and PPS and signaling the deblocking control parameters for the Cb and Cr components only when the value of ChromaArrayType is not equal to 0.
[0317] Another alternative solution is to conditionally signal the deblocking control parameters at the PH and SH levels (based on ChromaArrayType) without conditionally signaling the deblocking control parameters at the PPS level (based on ChromaArrayType).
[0318] In this embodiment, the definitions of these syntaxes in the table may refer to the above description.
[0319] Embodiment 2 In this embodiment, new syntax elements are signaled. This syntax is introduced to indicate whether the luma and chroma deblocking control parameters are the same. When the values of the luma and chroma deblocking control parameters are different, the deblocking control parameters for Cb and Cr are further signaled. In this embodiment, redundant signaling when the deblocking parameters are the same across the luma and chroma components is removed.
[0320] The syntax and semantics of this embodiment are as shown below.
[0321]
Table 11
[0322]
Table 12
[0323]
Table 13
[0324] The semantics of the newly introduced syntax elements are as follows.
[0325] slice_chroma_offsets_same_as_luma equal to 0 specifies that the syntax elements slice_cb_beta_offset_div2, slice_cb_tc_offset_div2, slice_cr_beta_offset_div2, and slice_cr_tc_offset_div2 are further signaled within the slice header.
[0326] slice_chroma_offsets_same_as_luma equal to 1 specifies that the values of the syntax elements slice_cb_beta_offset_div2, slice_cb_tc_offset_div2, slice_cr_beta_offset_div2, and slice_cr_tc_offset_div2 are not further signaled and are assumed to be the same as slice_beta_offset_div2 and slice_tc_offset_div2, respectively.
[0327] ph_chroma_offsets_same_as_luma equal to 0 specifies that the syntax elements ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, and ph_cr_tc_offset_div2 are further signaled within the picture header.
[0328] ph_chroma_offsets_same_as_luma equal to 1 specifies that the values of the syntax elements ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, and ph_cr_tc_offset_div2 are not signaled and are further assumed to be the same as ph_beta_offset_div2 and ph_tc_offset_div2 respectively.
[0329] pps_chroma_offsets_same_as_luma equal to 0 specifies that the syntax elements pps_cb_beta_offset_div2, pps_cb_tc_offset_div2, pps_cr_beta_offset_div2, and pps_cr_tc_offset_div2 are further signaled within the PPS. pps_chroma_offsets_same_as_luma equal to 1 specifies that the values of the syntax elements pps_cb_beta_offset_div2, pps_cb_tc_offset_div2, pps_cr_beta_offset_div2, and pps_cr_tc_offset_div2 are not signaled and are further assumed to be the same as pps_beta_offset_div2 and pps_tc_offset_div2 respectively.
[0330] The definitions of other syntax in the table may refer to the above description.
[0331] Embodiment 3 In this embodiment, separate β and tc offset parameters are introduced for the joint cb-cr coded block.
[0332] The syntax is as follows.
[0333] [Table 14]
[0334]
Table 15
[0335]
Table 16
[0336] The semantics of the newly introduced syntactic elements are as follows.
[0337] pps_cbcr_beta_offset_div2 and pps_cbcr_tc_offset_div2 specify the default deblocking parameter offsets for β and tC (divided by 2) applied to the luma Cb - Cr components of slices that reference the PPS, unless the default deblocking parameter offsets present in the picture header or slice header of the slice that references the PPS override them. The values of pps_cbcr_beta_offset_div2 and pps_cbcr_tc_offset_div2 are both in the range from - 12 to 12, inclusive of - 12 and 12. When not present, the values of pps_cbcr_beta_offset_div2 and pps_cbcr_tc_offset_div2 are both assumed to be equal to 0.
[0338] ph_cbcr_beta_offset_div2 and ph_cbcr_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the luma slice's equalized Cb - Cr components related to PH. The values of ph_cbcr_beta_offset_div2 and ph_cbcr_tc_offset_div2 are both in the range from - 12 to 12, inclusive of - 12 and 12. When not present, the values of ph_cbcr_beta_offset_div2 and ph_cbcr_tc_offset_div2 are assumed to be equal to pps_cbcr_beta_offset_div2 and pps_cbcr_tc_offset_div2, respectively.
[0339] slice_cbcr_beta_offset_div2 and slice_cbcr_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the current slice's equalized Cb - Cr components. The values of slice_cbcr_beta_offset_div2 and slice_cbcr_tc_offset_div2 are both in the range from - 12 to 12, inclusive of - 12 and 12. When not present, the values of slice_cbcr_beta_offset_div2 and slice_cbcr_tc_offset_div2 are assumed to be equal to ph_cbcr_beta_offset_div2 and ph_cbcr_tc_offset_div2, respectively.
[0340] The required changes for the derivation of the QP value for chroma deblocking are as follows.
[0341] The value of the variable β' is determined as specified in Table 43 based on the quantization parameter Q derived as follows. sliceBetaOffsetDiv2 = ((TuCResMode[ xTb Q [ yTb Q == 2) || (TuCResMode[ xTbp [ yTb p == 2)? slice_cbcr_beta_offset_div2 : (cIdx == 1? slice_cb_beta_offset_div2 : slice_cr_beta_offset_div2 )) Q = Clip3(0, 63, Qp C + (sliceBetaOffsetDiv2 << 1)) (1355) where slice_cb_beta_offset_div2, slice_cr_beta_offset_div2, and slice_cbcr_beta_offset_div2 are the values of the syntax elements slice_cb_beta_offset_div2, slice_cr_beta_offset_div2, and slice_cbcr_beta_offset_div2 for the slice containing sample q 0,0 respectively.
[0342] The value of variable t C ' is determined as specified in Table 43 based on the chroma quantization parameter Q derived as follows. sliceTcOffsetDiv2 = ((TuCResMode[xTb Q [ yTb Q || TuCResMode[xTb p [ yTb p == 2)? slice_cbcr_tc_offset_div2 : (cIdx == 1? slice_cb_tc_offset_div2 : slice_cr_tc_offset_div2 )) Q = Clip3(0, 65, Qp C + 2 * (bS - 1)+ (sliceTcOffsetDiv2 << 1)) (1357) where slice_cb_tc_offset_div2, slice_cr_beta_offset_div2, and slice_cr_tc_offset_div2 are the values of the syntax elements slice_cb_tc_offset_div2, slice_cr_tc_offset_div2, and slice_cbcr_tc_offset_div2 for a slice containing sample q 0,0 respectively. The definitions of other syntax in the table may refer to the above description.
[0343] The definitions of other syntax in the table may refer to the above description.
[0344] In the implementation shown in FIG. 8, a coding method implemented by a decoding device is disclosed, and the method includes the following.
[0345] S801: Obtain a bitstream.
[0346] The bitstream may be obtained by a wireless network or a wired network. The bitstream may be transmitted from a website, a server, or other remote sources using a coaxial cable, an optical fiber cable, a twisted pair, a digital subscriber line (DSL), or a wireless technology such as infrared, radio, microwave, WiFi, Bluetooth, LTE, or 5G.
[0347] In an embodiment, the bitstream is a sequence of bits in the form of a network abstraction layer (NAL) unit stream or a byte stream that forms the representation of a sequence of access units (AUs) that form one or more coded video sequences (CVSs).
[0348] In some embodiments, for the decoding process, on the decoder side, the bitstream is read and the decoded pictures are derived from the bitstream, and for the encoding process, on the encoder side, the bitstream is generated.
[0349] Typically, the bitstream contains syntax elements formed by a syntax structure.
[0350] Syntax element: An element of data represented within the bitstream.
[0351] Syntax structure: Zero or more syntax elements that coexist within the bitstream in a specified order.
[0352] In a particular example, the format of the bitstream defines the relationship between the Network Abstraction Layer (NAL) unit stream and the byte stream, and either the Network Abstraction Layer (NAL) unit stream or the byte stream is called the bitstream.
[0353] The bitstream can be in one of two formats, namely, the format of the NAL unit stream or the format of the byte stream. The format of the NAL unit stream is conceptually a more "basic" type. The format of the NAL unit stream contains a sequence of syntax structures called NAL units. This sequence is ordered in the decoding order. There are constraints imposed on the decoding order (and content) of the NAL units of the NAL unit stream.
[0354] The format of the byte stream can be constructed from the format of the NAL unit stream by ordering the NAL units in decoding order and prefixing each NAL unit with a start code prefix and zero or more zero-valued bytes to form a byte stream. The format of the NAL unit stream can be extracted from the format of the byte stream by searching for the position of the pattern of unique start code prefixes within this byte stream.
[0355] This clause specifies the relationship between the original picture given by the bitstream and the decoded picture.
[0356] The video source represented by the bitstream is a sequence of pictures in decoding order.
[0357] The original picture and the decoded picture are each composed of one or more of the following sample arrays. - Luma (Y) only (monochrome) - Luma and two chroma (YCbCr or YCgCo) - Green, blue, and red (also called GBR, RGB) - Arrays representing other unspecified monochrome or trichromatic sampling (e.g., also called YZX, XYZ)
[0358] The variables and terms associated with these arrays are called luma (or L or Y) and chroma, regardless of the actual color representation method used, and the two chroma arrays are called Cb and Cr. The actual color representation method used can be indicated in the syntax defined within the VUI parameters specified in ITU-T H.SEI | ISO / IEC 23002-7.
[0359] S802: Obtain the value of a syntax element from the bitstream.
[0360] In an implementation, the value of a syntax element is related to a deblocking control parameter for a chroma component of a slice of a coded picture. For example, the value of the syntax element indicates whether a syntax element related to a chroma tool offset exists within a picture parameter set (PPS) raw byte sequence payload (RBSP) structure.
[0361] In an example, the syntax is represented by pps_chroma_tool_offsets_present_flag. A pps_chroma_tool_offsets_present_flag equal to 1 specifies that a syntax element related to a chroma tool offset exists within the PPS RBSP syntax structure and that the tc and β offset syntax elements for chroma deblocking may exist within the PH syntax structure or SH of a picture that references the PPS. A pps_chroma_tool_offsets_present_flag equal to 0 specifies that a syntax element related to a chroma tool offset does not exist within the PPS RBSP syntax structure and that the tc and β offset syntax elements for chroma deblocking do not exist within the PH syntax structure or SH of a picture that references the PPS. When sps_chroma_format_idc is equal to 0, the value of pps_chroma_tool_offsets_present_flag is equal to 0.
[0362] In an example, the value of the syntax element is obtained within the PPS.
[0363] In an example, when there are no color components in a video sequence, the value of the syntax element is equal to 0.
[0364] In an example, the value of the syntax is used to determine whether a deblocking control parameter for a luma component of a coding block is the same as a deblocking control parameter for a chroma component of the block.
[0365] S803: When the value of the syntax element is equal to a preset value, obtain the value of the deblocking control parameter for the chroma component of the slice from the bitstream.
[0366] The preset value is an integer value. In the example, the preset value is not equal to 0. In the example, the preset value is equal to 1.
[0367] In the example, the value of the deblocking control parameter for the chroma component of the coding block is obtained within the PPS.
[0368] In the example, the value of the deblocking control parameter for the chroma component of the slice is obtained within the picture header PH.
[0369] In the example, the value of the deblocking control parameter for the chroma component of the slice is obtained within the slice header SH.
[0370] In the example, the deblocking control parameter for the chroma component of the slice is signaled when the video sequence has color components.
[0371] In the example, at the PPS level, the deblocking control parameter for the chroma component of the slice is represented by pps_cb_beta_offset_div2, pps_cb_tc_offset_div2, pps_cr_beta_offset_div2, or pps_cr_tc_offset_div2.
[0372] In some implementations, it may be understood that there is only one deblocking control parameter for the chroma component or any combination of these deblocking control parameters exists. For example, all four of these deblocking control parameters are conditionally signaled by the value of pps_chroma_tool_offsets_present_flag.
[0373]
Table 17
[0374] pps_cb_beta_offset_div2 and pps_cb_tc_offset_div2 specify the default deblocking parameter offsets for β and tC (divided by 2) applied to the Cb component of slices that reference the PPS, unless the default deblocking parameter offset present in the picture header or slice header of the slice that references the PPS overrides them. The values of pps_cb_beta_offset_div2 and pps_cb_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of pps_cb_beta_offset_div2 and pps_cb_tc_offset_div2 are assumed to be equal to pps_luma_beta_offset_div2 and pps_luma_tc_offset_div2, respectively.
[0375] pps_cr_beta_offset_div2 and pps_cr_tc_offset_div2 specify the default deblocking parameter offsets for β and tC (divided by 2) applied to the Cr component of slices that reference the PPS, unless the default deblocking parameter offset present in the picture header or slice header of the slice that references the PPS overrides them. The values of pps_cr_beta_offset_div2 and pps_cr_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of pps_cr_beta_offset_div2 and pps_cr_tc_offset_div2 are assumed to be equal to pps_luma_beta_offset_div2 and pps_luma_tc_offset_div2, respectively.
[0376] pps_luma_beta_offset_div2 and pps_luma_tc_offset_div2 specify the default deblocking parameter offsets for β and tC (divided by 2) applied to the luma component of a slice that references the PPS, unless the default deblocking parameter offsets present in the picture header or slice header of the slice that references the PPS override them. The values of pps_luma_beta_offset_div2 and pps_luma_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of pps_luma_beta_offset_div2 and pps_luma_tc_offset_div2 are both assumed to be equal to 0.
[0377] In the example, at the PH level, the deblocking control parameters for the chroma component of a slice are represented by ph_cb_beta_offset_div2, ph_cb_tc_offset_div2, ph_cr_beta_offset_div2, or ph_cr_tc_offset_div2. It may be understood that in some implementations, there may be only one deblocking control parameter for the chroma component, or any combination of these deblocking control parameters. For example, all four of these deblocking control parameters are conditionally signaled by the value of pps_chroma_tool_offsets_present_flag.
[0378] [Table 18]
[0379] ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cb component of the slice in the current picture. The values of ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12.
[0380] When not present, the values of ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2 are inferred as follows.
[0381] If pps_chroma_tool_offsets_present_flag is equal to 1, the values of ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2 are inferred to be equal to pps_cb_beta_offset_div2 and pps_cb_tc_offset_div2, respectively.
[0382] Otherwise (if pps_chroma_tool_offsets_present_flag is equal to 0), the values of ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2 are inferred to be equal to ph_luma_beta_offset_div2 and ph_luma_tc_offset_div2, respectively.
[0383] ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cr component of the slice in the current picture. The values of ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12.
[0384] When not present, the values of ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2 are inferred as follows.
[0385] If pps_chroma_tool_offsets_present_flag is equal to 1, the values of ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2 are inferred to be equal to pps_cr_beta_offset_div2 and pps_cr_tc_offset_div2, respectively.
[0386] Otherwise (when pps_chroma_tool_offsets_present_flag is equal to 0), the values of ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2 are inferred to be equal to ph_luma_beta_offset_div2 and ph_luma_tc_offset_div2, respectively.
[0387] ph_luma_beta_offset_div2 and ph_luma_tc_offset_div2 specify the deblocking parameter offsets for (divided by 2) β and tC applied to the luma component of the slices within the current picture. The values of ph_luma_beta_offset_div2 and ph_luma_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When not present, the values of ph_luma_beta_offset_div2 and ph_luma_tc_offset_div2 are inferred to be equal to pps_luma_beta_offset_div2 and pps_luma_tc_offset_div2, respectively.
[0388] In an example, at the slice header level, the deblocking control parameters for the chroma components of a slice are represented by sh_cb_beta_offset_div2, sh_cb_tc_offset_div2, sh_cr_beta_offset_div2, or sh_cr_tc_offset_div2.
[0389] In some implementations, it may be understood that there is only one deblocking control parameter for the chroma components, or any combination of these deblocking control parameters exists. For example, all four of these deblocking control parameters are conditionally signaled by the value of pps_chroma_tool_offsets_present_flag.
[0390]
Table 19
[0391] sh_cb_beta_offset_div2 and sh_cb_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cb component of the current slice. The values of sh_cb_beta_offset_div2 and sh_cb_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12.
[0392] When not present, the values of sh_cb_beta_offset_div2 and sh_cb_tc_offset_div2 are inferred as follows.
[0393] If pps_chroma_tool_offsets_present_flag is equal to 1, the values of sh_cb_beta_offset_div2 and sh_cb_tc_offset_div2 are inferred to be equal to ph_cb_beta_offset_div2 and ph_cb_tc_offset_div2, respectively.
[0394] In other cases (when pps_chroma_tool_offsets_present_flag is equal to 0), the values of sh_cb_beta_offset_div2 and sh_cb_tc_offset_div2 are respectively assumed to be equal to sh_luma_beta_offset_div2 and sh_luma_tc_offset_div2.
[0395] sh_cr_beta_offset_div2 and sh_cr_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cr component of the current slice. The values of sh_cr_beta_offset_div2 and sh_cr_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12.
[0396] When not present, the values of sh_cr_beta_offset_div2 and sh_cr_tc_offset_div2 are assumed as follows.
[0397] When pps_chroma_tool_offsets_present_flag is equal to 1, the values of sh_cr_beta_offset_div2 and sh_cr_tc_offset_div2 are respectively assumed to be equal to ph_cr_beta_offset_div2 and ph_cr_tc_offset_div2.
[0398] In other cases (when pps_chroma_tool_offsets_present_flag is equal to 0), the values of sh_cr_beta_offset_div2 and sh_cr_tc_offset_div2 are respectively assumed to be equal to sh_luma_beta_offset_div2 and sh_luma_tc_offset_div2.
[0399] sh_luma_beta_offset_div2 and sh_luma_tc_offset_div2 specify the deblocking parameter offsets for β and tC (divided by 2) applied to the luma component of the current slice. The values of sh_luma_beta_offset_div2 and sh_luma_tc_offset_div2 are both in the range from -12 to 12, inclusive of -12 and 12. When absent, the values of sh_luma_beta_offset_div2 and sh_luma_tc_offset_div2 are assumed to be equal to ph_luma_beta_offset_div2 and ph_luma_tc_offset_div2, respectively.
[0400] In an implementation, the method further includes setting the value of the deblocking control parameter for the chroma component of the slice to be equal to the value of the deblocking control parameter for the luma component of the slice when the value of the syntax element is not equal to a preset value.
[0401] S804: Execute a deblocking process on the blocks within the slice according to the value of the deblocking control parameter.
[0402] Generally, for the deblocking filter process, the input to the deblocking filter process is the reconstructed picture before deblocking, e.g., the array recPictureL, and when sps_chroma_format_idc is not equal to 0, the arrays recPictureCb and recPictureCr.
[0403] The output of this process is the modified reconstructed picture after deblocking, the array recPictureL, and when sps_chroma_format_idc is not equal to 0, the arrays recPictureCb and recPictureCr.
[0404] Vertical edges within a picture are first filtered. Then, using the samples modified by the vertical edge filtering process as input, horizontal edges within the picture are filtered. The vertical and horizontal edges within each CTB of a CTU are processed separately on a coding unit basis. The vertical edges of a coding block within a coding unit are filtered starting from the left edge of the coding block and proceeding in their geometric order towards the right edge of the coding block. The horizontal edges of a coding block within a coding unit are filtered starting from the upper edge of the coding block and proceeding in their geometric order towards the lower edge of the coding block.
[0405] Details regarding the deblocking process may refer to the above description.
[0406] In the implementation shown in FIG. 11, a video decoding apparatus 900 is disclosed, and the apparatus 900 includes a receiving module 901 configured to obtain a bitstream, a parsing module 902 configured to obtain the value of a syntax element from the bitstream, where the value of the syntax element is related to a deblocking control parameter for the chroma component of a slice of a coded picture (for example, the value of the syntax element indicates whether a syntax element related to a chroma tool offset exists within the picture parameter set PPS raw byte sequence payload RBSP structure), and the parsing module 902 is configured to obtain the value of the deblocking control parameter for the chroma component of the slice from the bitstream when the value of the syntax element is equal to a preset value, and the preset value is an integer value.
[0407] The bitstream may be obtained by a wireless network or a wired network. The bitstream may be transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, microwave, WiFi, Bluetooth, LTE, or 5G.
[0408] In an embodiment, the bitstream is a sequence of bits in the form of a network abstraction layer (NAL) unit stream or a byte stream that forms a representation of a sequence of access units (AUs) that form one or more coded video sequences (CVSs).
[0409] In some embodiments, with respect to the decoding process, the decoder side reads the bitstream and derives decoded pictures from the bitstream, and with respect to the encoding process, the encoder side generates the bitstream.
[0410] Typically, the bitstream includes syntax elements formed by a syntax structure.
[0411] Syntax element: An element of data represented within the bitstream.
[0412] Syntax structure: Zero or more syntax elements that exist together within the bitstream in a specified order.
[0413] In a particular example, the format of the bitstream defines the relationship between a network abstraction layer (NAL) unit stream and a byte stream, and either the network abstraction layer (NAL) unit stream or the byte stream is referred to as the bitstream.
[0414] The bitstream can be in one of two formats, namely, the NAL unit stream format or the byte stream format. The NAL unit stream format is conceptually the more "basic" type. The NAL unit stream format contains a sequence of syntax structures called NAL units. This sequence is ordered in decoding order. There are constraints imposed on the decoding order (and content) of the NAL units of the NAL unit stream.
[0415] The byte stream format can be constructed from the NAL unit stream format by ordering the NAL units in decoding order and prefixing each NAL unit with a start code prefix and zero or more zero-value bytes to form a byte stream. The NAL unit stream format can be extracted from the byte stream format by searching for the pattern of unique start code prefixes within this byte stream.
[0416] This section specifies the relationship between the original picture given by the bitstream and the decoded picture.
[0417] The video source represented by the bitstream is a sequence of pictures in decoding order.
[0418] The original picture and the decoded picture are each composed of one or more of the following sample arrays. - Luma (Y) only (monochrome) - Luma and two chromas (YCbCr or YCgCo) - Green, blue, and red (also called GBR, RGB) - Arrays representing other unspecified monochrome or trichromatic sampling (e.g., also called YZX, XYZ)
[0419] The variables and terms associated with these arrays are called luma (or L or Y) and chroma, regardless of the actual color representation method being used, and the two chroma arrays are called Cb and Cr. The actual color representation method being used can be indicated by a syntax defined within the VUI parameters specified in ITU-T H.SEI | ISO / IEC 23002-7.
[0420] Further details of the receiving module 901 and the analysis module 902 may refer to the examples and implementations of the above method.
Example
[0421] A coding method implemented by a decoding device, obtaining a bitstream related to a coding block; obtaining a syntax value from the bitstream; when the syntax value is equal to a preset value (in the example, the preset value is not equal to 0), obtaining a value of a deblocking control parameter from the bitstream.
Example
[0422] The method of Example 1 where the syntax value is obtained at the sequence parameter set level.
Example
[0423] The method of Example 1 where the syntax value is obtained according to a picture parameter set.
Example
[0424] The method of Example 1 where the syntax value is obtained according to a picture header.
Example
[0425] The method of Example 1 where the syntax value is obtained according to a slice header.
Example
[0426] Any one of the methods according to Examples 1 to 5, in which the value of the deblocking control parameter is obtained according to the picture parameter set.
Example
[0427] Any one of the methods according to Examples 1 to 5, in which the value of the deblocking control parameter is obtained according to the picture header.
Example
[0428] Any one of the methods according to Examples 1 to 5, in which the value of the deblocking control parameter is obtained according to the slice header.
Example
[0429] Any one of the methods according to Examples 1 to 5, in which the value of the deblocking control parameter is obtained at the sequence parameter set level.
Example
[0430] Any one of the methods according to Examples 1 to 9, in which the value of the syntax is used to indicate that no color component exists in the video sequence.
Example
[0431] Any one of the methods according to Examples 1 to 10, in which the deblocking control parameter is signaled only when the video sequence has a color component.
Example
[0432] Any one of the methods according to Examples 1 to 9, in which the value of the syntax is used to determine whether the deblocking control parameter for the luma component of the block is the same as the deblocking control parameter for the chroma component of the block.
Example
[0433] A method according to any one of Examples 1 to 12, wherein the value of the deblocking control parameter is a preset deblocking parameter offset applied to the congruent Cb-Cr components of the block.
Example
[0434] A decoder (30) including a processing circuit for executing a method according to any one of Examples 1 to 13.
Example
[0435] A computer program product including program code for executing a method according to any one of Examples 1 to 14 when executed on a computer or a processor.
Example
[0436] One or more processors, A non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming configuring the decoder to execute a method according to any one of Examples 1 to 15 when executed by the processor.
Example
[0437] A non-transitory computer-readable medium carrying program code that causes a computer device to execute a method according to any one of Examples 1 to 16 when executed by the computer device.
[0438] The following is an explanation of application examples of the encoding method and decoding method shown in the above embodiments, and systems using them.
[0439] FIG. 6 is a block diagram showing a content supply system 3100 for realizing a content distribution service. This content supply system 3100 includes a capture device 3102 and a terminal device 3106, and optionally includes a display 3126. The capture device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any combination of these types.
[0440] The capture device 3102 may generate data and encode the data by the encoding method shown in the above embodiments. Alternatively, the capture device 3102 may distribute the data to a streaming server (not shown), and the server encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone or a smart pad, a computer or a laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination of these. For example, the capture device 3102 may include the above-described source device 12. When the data includes video, the video encoder 20 included in the capture device 3102 may actually perform video encoding processing. When the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform audio encoding processing. For some actual scenarios, the capture device 3102 distributes the encoded video and audio data by multiplexing them together. For other actual scenarios, for example, in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 distributes the encoded audio data and the encoded video data to the terminal device 3106 separately.
[0441] In content supply system 3100, terminal device 310 receives and plays back encoded data. Terminal device 3106 can be a smartphone or smart pad 3108, computer or laptop 3110, network video recorder (NVR) / digital video recorder (DVR) 3112, TV 3114, set-top box (STB) 3116, video conferencing system 3118, video surveillance system 3120, personal digital assistant (PDA) 3122, in-vehicle device 3124, or a combination of any of these, which are devices having data reception and restoration capabilities. For example, terminal device 3106 may include the above-described destination device 14. When the encoded data includes video, video decoder 30 included in the terminal device is prioritized to perform video decoding. When the encoded data includes audio, the audio decoder included in the terminal device is prioritized to perform audio decoding processing.
[0442] For a terminal device having a display, such as smartphone or smart pad 3108, computer or laptop 3110, network video recorder (NVR) / digital video recorder (DVR) 3112, TV 3114, personal digital assistant (PDA), or in-vehicle device 3124, the terminal device can supply the decoded data to the display of the terminal device. For a terminal device without a display, such as STB 3116, video conferencing system 3118, or video surveillance system 3120, it communicates with external display 3126 and the decoded data is received and shown.
[0443] When each device of this system performs encoding or decoding, the picture encoding device or picture decoding device shown in the above embodiments can be used.
[0444] FIG. 7 is a diagram showing the structure of an example of the terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol progress unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, the Real-Time Streaming Protocol (RTSP), the Hypertext Transfer Protocol (HTTP), the HTTP Live Streaming Protocol (HLS), MPEG-DASH, the Real-Time Transport Protocol (RTP), the Real-Time Messaging Protocol (RTMP), or any combination of these types.
[0445] After the protocol progress 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 described above, for some actual 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.
[0446] By means of multiplex separation processing, a video elementary stream (ES), an audio ES, and optionally subtitles are generated. A video decoder 3206 including the video decoder 30 described in the above embodiment decodes the video ES by the decoding method shown in the above embodiment to generate video frames, and supplies this data to a synchronization unit 3212. An audio decoder 3208 decodes the audio ES to generate audio frames, and supplies this data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in FIG. 7) before supplying the video frames to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in FIG. 7) before supplying the audio frames to the synchronization unit 3212.
[0447] The synchronization unit 3212 synchronizes the video frames and the audio frames, and supplies the video / audio to a video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video information and audio information. The information may be coded in a syntax that uses time stamps regarding the presentation of the coded audio data and visual data as well as time stamps regarding the distribution of the data stream itself.
[0448] When subtitles are included in the stream, a subtitle decoder 3210 decodes the subtitles, synchronizes the subtitles with the video frames and the audio frames, and supplies the video / audio / subtitle to a video / audio / subtitle display 3216.
[0449] The present invention is not limited to the above-described system, and either the picture encoding device or the picture decoding device of the above-described embodiment may be incorporated into other systems, for example, an automotive system.
[0450] Mathematical operator The mathematical operators used in this application are similar to the mathematical operators used in the C programming language. However, the results of integer division and arithmetic shift operations are more strictly defined, and additional operations such as exponentiation and division of real values are defined. The rules for numbering and counting generally start from 0. For example, "the first" is equivalent to number 0, "the second" is equivalent to number 1, and so on.
[0451] Arithmetic Operators The following arithmetic operators are defined as follows. + Addition - Subtraction (as a two-argument operator) or negation (as a unary prefix operator) * Multiplication including matrix multiplication x y Exponentiation. Defines y to the power of x. In other contexts, such notation is used for superscript writing not intended to be interpreted as exponentiation. / Integer division that truncates the result towards zero. For example, 7 / 4 and -7 / -4 are truncated to 1, and -7 / 4 and 7 / -4 are truncated to -1. ÷ Used to represent division in a mathematical equation where truncation or rounding is not intended.
[0452]
Number
[0453] Used to represent division in a mathematical equation where truncation or rounding is not intended.
[0454]
Number
[0455] The sum of f(i) where i takes all integer values from x to y inclusive. x % y Remainder. Defined only for integers x and y where x >= 0 and y > 0, the remainder of x divided by y.
[0456] Logical operator The following logical operators are defined as follows. x && y Boolean logical "product" of x and y x || y Boolean logical "sum" of x and y ! Boolean logical "negation" x? y : z If x is true or not equal to 0, it is evaluated to the value y; otherwise, it is evaluated to the value z.
[0457] Relational operator The following relational operators are defined as follows. > Greater than >= Greater than or equal to < Less than <= Less than or equal to == Equal to != Not equal to
[0458] When a relational operator is applied to a syntax element or variable to which the value "na" (not applicable) is assigned, the value "na" is treated as a different value with respect to the syntax element or variable. The value "na" is considered not equal to any other value.
[0459] Bitwise operator The following bitwise operators are defined as follows. & Bitwise "logical product". When operating on integer arguments, it acts on the two's complement representation of integer values. When operating on a binary argument containing fewer bits than another argument, the shorter argument is extended by adding higher-order bits equal to 0. Bitwise "logical sum". When operating on integer arguments, it acts on the two's complement representation of integer values. When operating on a binary argument containing fewer bits than another argument, the shorter argument is extended by adding higher-order bits equal to 0. ^ Exclusive OR per bit. When operating on an integer argument, it acts on the two's complement representation of the integer value. When operating on a binary argument containing fewer bits than another argument, the shorter argument is extended by adding leading bits equal to 0. x>>y Arithmetic right shift of the two's complement representation of the integer x by y binary digits. This function is defined only for non-negative integer values of y. The bit shifted into the most significant bit (MSB) as a result of the right shift has a value equal to the MSB of x before the shift operation. x<<y Arithmetic left shift of the two's complement representation of the integer x by y binary digits. This function is defined only for non-negative integer values of y. The bit shifted into the least significant bit (LSB) as a result of the left shift has a value equal to 0.
[0460] 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 as an array index, is evaluated with the value of the variable before the increment operation. -- Decrement, i.e., x-- is equivalent to x = x - 1 and, when used as an array index, is evaluated with the value of the variable before the decrement operation. += Increment by the specified amount, i.e., x += 3 is equivalent to x = x + 3 and x += (-3) is equivalent to x = x + (-3). -= Decrement by the specified amount, i.e., x -= 3 is equivalent to x = x - 3 and x -= (-3) is equivalent to x = x - (-3).
[0461] Range notation The following notations are used to specify a range of values. x = y..z x takes integer values from y to z, including y and z, assuming x, y, and z are integer values and z is greater than y.
[0462] Mathematical function The following mathematical functions are defined.
[0463] [Number]
[0464] Asin(x) Acts on the argument x in the range from -1.0 to 1.0 including -1.0 and 1.0, and has an output value in the range from -π÷2 to π÷2 including -π÷2 and π÷2 in radians, which is the inverse sine function of trigonometry Atan(x) Acts on the argument x and has an output value in the range from -π÷2 to π÷2 including -π÷2 and π÷2 in radians, which is the inverse tangent function of trigonometry
[0465] [Number]
[0466] Ceil(x) The smallest integer greater than or equal to x. Clip1 Y (x) = Clip3(0, (1 << BitDepth Y ) - 1, x) Clip1 C (x) = Clip3(0, (1 << BitDepth C ) - 1, x)
[0467] [Number]
[0468] Cos(x) The cosine function of trigonometry that acts on the argument x in radians. Floor(x) The largest integer less than or equal to x.
[0469] [Number]
[0470] Ln(x) is the natural logarithm of x (the logarithm with base e, where e is the constant 2.718281828... that is the base of the natural logarithm). Log2(x) is the logarithm of x with base 2. Log10(x) is the logarithm of x with base 10.
[0471]
Number
[0472] Round(x) = Sign(x) * Floor(Abs(x) + 0.5)
[0473]
Number
[0474] Sin(x) is the sine function of trigonometry acting on the argument x in radians
[0475]
Number
[0476] Swap(x, y) = (y, x) Tan(x) is the tangent function of trigonometry acting on the argument x in radians
[0477] Operator precedence When the precedence in the formula is not explicitly indicated using parentheses, the following rules apply. Operations with higher precedence are evaluated before any operations with lower precedence. Operations with the same precedence are evaluated in order from left to right.
[0478] The following table shows the operator precedence from the highest to the lowest, with higher positions in the table indicating higher precedence.
[0479] For the operators also used in the C programming language, the precedence used in this specification is the same as that used in the C programming language.
[0480]
Table 20
[0481] Text description of logical operations In the text, in the following form, that is, if( condition 0 ) Statement 0 else if( condition 1 ) Statement 1 else / * Comment conveying information about the remaining conditions * / Statement n Logical operation statements mathematically described in the form of may be described as follows. As follows / ... The following applies. - In the case of condition 0, Statement 0 - Otherwise, in the case of condition 1, Statement 1 -... - In other cases (comment conveying information about the remaining conditions), Statement n
[0482] In this text, each statement of "in the case of..., ...; otherwise, in the case of..., ...; in other cases, ..." is introduced by "as follows..." or "... is applicable below" immediately following "in the case of...". The last condition of "in the case of..., ...; otherwise, in the case of..., ...; in other cases, ..." is always "in other cases, ...". The statements of "in the case of..., ...; otherwise, in the case of..., ...; in other cases, ..." inserted alternately can be identified by matching "as follows..." or "... is applicable below" with the final "in other cases, ...".
[0483] In this text, in the following form, that is, if( condition 0a && condition 0b ) Statement 0 else if( condition 1a || condition 1b ) Statement 1 ... else Statement n The logical operation statements described mathematically in the form of As follows... / ... is applicable below. - When all of the following conditions are true, Statement 0 - Condition 0a - Condition 0b - Otherwise, when one or more of the following conditions are true, Statement 1 - Condition 1a - Condition 1b -... - In other cases, Statement n
[0484] In this text, in the following form, that is, if( condition 0 ) Statement 0 if( condition 1 ) Statement 1 The statement of the logical operation mathematically described in the form of may be described as follows. When condition 0, statement 0 When condition 1, statement 1
[0485] Although embodiments of the present invention have been mainly described based on video coding, embodiments of the coding system 10, the encoder 20, and the decoder 30 (and the system 10 corresponding thereto), as well as other embodiments described herein, may be configured for the processing or coding of still pictures, i.e., individual pictures independent of any preceding or successive pictures similar to video coding. Note that generally, when the coding of picture processing is limited to a single picture 17, only the inter-prediction units 244 (encoder) and 344 (decoder) may not be available. All other functions (also referred to as tools or technologies) of the video encoder 20 and the video decoder 30, for example, residual calculation 204 / 304, transformation 206, quantization 208, inverse quantization 210 / 310, (inverse) transformation 212 / 312, segmentation 262 / 362, intra-prediction 254 / 354, and / or loop filtering 220, 320, and entropy coding 270, and entropy decoding 304 may be equally used for the processing of still pictures.
[0486] For example, the encoder 20 and decoder 30, and embodiments of the functions described herein in connection with, for example, the encoder 20 and decoder 30 may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on a computer-readable medium as one or more instructions or code or transmitted over a communication medium and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium, or a communication medium including any medium that facilitates transfer of a computer program from one place to another, for example, by a communication protocol. In this way, generally, the computer-readable medium may correspond to (1) a tangible computer-readable storage medium that is non-transitory or (2) a communication medium such as a signal or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0487] By way of example and not limitation, such computer-readable storage media can 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 the desired program code in the form of instructions or data structures and that is accessible by a computer. Also, any connection can appropriately be called a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then 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 transient media, but instead are directed to non-transient, tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray (registered trademark) disc, where disk typically magnetically reproduces data while disc optically reproduces data using a laser. Combinations of the above should also be included within the scope of computer-readable media.
[0488] The commands may be executed by one or more processors such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to either the foregoing structures or any other structure suitable for implementation of the techniques described herein. Additionally, in some aspects, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Also, the techniques may be implemented entirely in one or more circuits or logic elements.
[0489] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses including wireless handsets, integrated circuits (ICs), or a set of ICs (e.g., a chipset). Although various components, modules, or units are described in the present disclosure to emphasize aspects of the functionality of a device configured to execute the disclosed techniques, implementation by different hardware units is not necessarily required. Rather, as described above, the various units may be provided by a combination in a codec hardware unit or by a set of interoperable hardware units including one or more of the foregoing processors in conjunction with suitable software and / or firmware.
Description of the Reference Signs
[0490] 10 Video coding system, coding system 12 Source device 13 Communication channel 14 Destination device 16 Picture source 17 Picture, picture data, raw picture, raw picture data, monochrome picture, color picture, current picture 18 Preprocessor, preprocessing unit, picture preprocessor 19 Preprocessed picture, preprocessed picture data 20 Video encoder, encoder 21 Encoded picture data, encoded bitstream 22 Communication interface, communication unit 28 Communication interface, communication unit 30 Decoder, video decoder 31 Decoded picture data, decoded picture 32 Postprocessor, postprocessing unit 33 Postprocessed picture data, postprocessed picture 34 Display device 46 Processing circuit 100 Video encoder 201 Input, input interface 203 Picture block, original block, current block, current picture block, CTU 204 Residual calculation unit, residual calculation 205 Residual block, residual 206 Transformation processing unit, transformation 207 Transformation coefficient 208 Quantization unit, quantization 209 Quantized coefficient, quantized transformation coefficient, quantized residual coefficient 210 Inverse quantization unit, inverse quantization 211 Dequantized coefficient, dequantized residual coefficient 212 Inverse transformation processing unit, (inverse) transformation 213 Reconstructed residual block 214 Reconstruction unit, adder, summer 215 Reconstructed block 216 Buffer 220 Loop filter unit, loop filter, loop filtering 221 Filtered block, filtered reconstructed block 230 Decoded picture buffer (DPB) 231 Decoded picture 244 Inter prediction unit (encoder) 254 Intra prediction unit, inter prediction unit, intra prediction 260 Mode selection unit 262 Partitioning unit, partitioning 265 Prediction block, predictor 266 Syntax element 270 Entropy coding unit 272 Output, output interface 304 Entropy decoding unit, residual calculation 309 Quantized coefficient 310 Inverse quantization unit, inverse quantization 311 Dequantized coefficient, transform coefficient 312 Inverse transform processing unit, (inverse) transform, output 313 Reconstructed residual block 314 Reconstruction unit, adder, summer 315 Reconstructed block 320 Loop filter, loop filter unit, loop filtering unit, loop filtering 321 Filtered block, decoded video block 330 Decoded picture buffer (DPB) 331 Decoded picture 344 Inter prediction unit (decoder) 354 Intra prediction unit, intra prediction 360 Mode application unit 362 Partitioning 365 Prediction block 400 Video coding device 410 Incoming port, input port 420 Receiver Unit (Rx) 430 Processor, Logic Unit, Central Processing Unit (CPU) 440 Transmitter Unit (Tx) 450 Transmission Port, Output Port 460 Memory 470 Coding Module 500 Device 502 Processor 504 Memory 506 Data 508 Operating System 510 Application Program 512 Bus 514 Secondary Storage 518 Display 900 Video Decoder 901 Receiving Module 902 Analysis Module 3100 Content Supply System 3102 Capture Device 3104 Communication Link 3106 Terminal Device 3108 Smartphone, Smart Pad 3110 Computer, Laptop 3112 Network Video Recorder (NVR) / Digital Video Recorder (DVR) 3114 TV 3116 Set-Top Box (STB) 3118 Video Conference System 3120 Video Surveillance System 3122 Personal Digital Assistant (PDA) 3124 In-Vehicle Device 3126 Display 3202 Protocol Progress Unit 3204 Multiplex Separation Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronous Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display
Claims
Claims 1 A method of coding implemented by a decoding device, comprising: obtaining a value of a syntax element from a bitstream, wherein the value of the syntax element is related to a deblocking control parameter for a chroma component of a slice of a coded picture; when the value of the syntax element is equal to a preset value, analyzing a value of the deblocking control parameter for the chroma component of the slice from the bitstream, wherein the preset value is an integer value; and performing a deblocking process on blocks in the slice according to the value of the deblocking control parameter. Claims 2 The method according to claim 1, wherein the value of the syntax element is obtained from a picture parameter set PPS. Claims 3 The method according to claim 1 or 2, wherein the value of the deblocking control parameter for the chroma component of the slice is obtained from the PPS. Claims 4 The method according to claim 1 or 2, wherein the value of the deblocking control parameter for the chroma component of the slice is obtained from a picture header PH. Claims 5 The method according to claim 1 or 2, wherein the value of the deblocking control parameter for the chroma component of the slice is obtained from a slice header SH. Claims 6 The method according to any one of claims 1 to 5, wherein when there is no color component in the video sequence, the value of the syntax element is equal to 0. Claims 7 The method according to any one of claims 1 to 6, wherein when the video sequence has a color component, the deblocking control parameter for the chroma component of the slice is signaled. Claims 8 The method according to any one of claims 1 to 7, wherein the value of the syntax element is used to determine whether a deblocking control parameter for a luma component of the slice is the same as the deblocking control parameter for the chroma component of the slice. Claims 9 When the value of the syntax element is not equal to the preset value, further comprising the step of setting the value of the deblocking control parameter for the chroma component of the slice equal to the value of the deblocking control parameter for the luma component of the slice. The method according to any one of claims 1 to 8.
10. The method according to any one of claims 1 to 9, wherein the value of the deblocking control parameter is a preset deblocking parameter offset applied to the average Cb-Cr component of the slice.
11. A decoder (30) comprising a processing circuit for performing the method according to any one of claims 1 to 10.
12. A computer program product comprising program code for performing the method according to any one of claims 1 to 10 when executed on a computer or a processor.
13. One or more processors, A non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming configuring the decoder to perform the method according to any one of claims 1 to 10 when executed by the processor. A decoder comprising a non-transitory computer-readable storage medium.
14. A non-transitory computer-readable medium carrying program code that causes a computer device to perform the method according to any one of claims 1 to 10 when executed by the computer device.
Citation Information
Patent Citations
Use of chroma quantization parameter offsets in deblocking
US20170134728A1
Quantization parameter offset for chroma deblocking filtering
WO2021051044A1
Methods for processing chroma signals
WO2021167830A1