Encoding and decoding method using adaptive size filtering and corresponding apparatus

By adaptively selecting filter size and combining bilateral filters, the problem of balancing compression efficiency and deblocking artifacts in video decoding is solved, thereby improving the quality and flexibility of video decoding.

CN123187433APending Publication Date: 2026-11-27INTERDIGITAL CE PATENT HOLDINGS SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202580026711.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-08
Filing Date
2025-03-17
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing video decoding schemes struggle to balance compression efficiency and deblocking reduction, especially in high-efficiency video decoding standards such as VVC, where traditional filtering methods fail to fully utilize decoding information for adaptive filtering.

Method used

An adaptively sized filter is employed, with the filter size selected based on decoding information, including block size, prediction mode, motion information, and residual information. A bilateral filter is used for filtering, combined with deblocking filtering, sample adaptive offset, and adaptive loop filtering to reduce coding artifacts.

Benefits of technology

It improves the compression efficiency and deblocking effect of video decoding, enhances the quality of reconstructed images, adapts to different video content characteristics, and enhances the flexibility of encoders and decoders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123187433A_ABST
    Figure CN123187433A_ABST
Patent Text Reader

Abstract

A decoding method is disclosed. A block of reconstructed samples is obtained. A filter size is selected based on coding information. The block of reconstructed samples is filtered using a filter of the selected filter size.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-references to related applications This application claims the benefit of European application number 24305551.4, filed on 8 April 2024, which is incorporated herein by reference in its entirety. Technical Field

[0002] At least one embodiment of this example relates in general to a method and apparatus for encoding and decoding image patches using adaptive-size filtering (e.g., bilateral filtering). Background Technology

[0003] To achieve high compression efficiency, image and video decoding schemes typically employ prediction and transform to utilize spatial and temporal redundancy in video content. Generally, intra-frame or inter-frame prediction is used to leverage intra- or inter-frame image correlations, followed by transform, quantization, and entropy decoding of the difference between the original and predicted blocks (often called prediction error or prediction residual). To reconstruct the video, the compressed data is decoded through the inverse process corresponding to entropy decoding, quantization, transform, and prediction. Summary of the Invention

[0004] In one implementation, a method for filtering reconstructed blocks (e.g., reconstructed image blocks) is disclosed, wherein the filter size is selected based on decoding information. In one example, the decoding information includes any one of block size, prediction mode, motion information, and residual information. In one example, the filter size is selected based on whether the block size is above or below a certain value. In another example, the block size is selected based on whether the intra-prediction mode (e.g., the intra-prediction mode of the block to be filtered, or the intra-prediction mode of one of its reference blocks) is DC / Planar or angular. In another example, the block size is selected based on the position of the last significant DCT coefficient, for example, based on whether that position is near or far from the top-left corner. In yet another example, the block size is selected based on motion information (e.g., based on the magnitude of the motion vector). The filter can be a bilateral filter (BIF). The filter can be a plus-shaped filter. This filtering method can be used by an encoding method (e.g., in an encoder) or a decoding method (e.g., in a decoder). Attached Figure Description

[0005] Figure 1 The diagram illustrates a system block diagram that can implement various aspects of this embodiment; Figure 2 A block diagram illustrating one embodiment of a video encoder is shown; Figure 3 The diagram illustrates a block diagram of one embodiment of a video decoder; Figure 4 The illustration shows examples of binary tree and ternary tree partitioning; Figure 5 An example of an 8x8 transform unit block and the filter aperture for a specific sample is depicted; Figure 6 The diagram illustrates a bilateral filtering (BIF) method where a look-up table is used to obtain the filter weights. Figure 7 It depicts a current sample and its four neighboring samples in a plus sign shape; Figure 8 Two windows covering two pixels were depicted; Figure 9 The sample used in the weighted sum is described; Figure 10 The combination of bilateral filtering and sample adaptive offset (SAO) filtering is described; Figure 11 A rhombic 5x5 filter core was described; Figure 12 A bilateral chromaticity filter, executed in parallel with the SAO filter, is described. Figure 13 Another example of an in-loop filtering process with CCSAO (Cross-Component SAO) and BIF is illustrated; and Figure 14-23 A flowchart depicts methods for filtering reconstructed blocks based on various examples. Detailed Implementation

[0006] This application describes various aspects, including tools, features, embodiments, models, methods, etc. Many of these aspects are described in detail, and are generally described in a manner that may sound limiting, at least for the purpose of illustrating the various characteristics. However, this is for the purpose of clarity and does not limit the application or scope of these aspects. In fact, all the different aspects can be combined and interchanged to provide other aspects. Furthermore, these aspects can also be combined and interchanged with aspects described in previous applications.

[0007] The aspects described and anticipated in this application can be implemented in many different forms. The following... Figure 1 , Figure 2 and Figure 3 Some embodiments have been provided, but other embodiments are also contemplated, and Figure 1 , Figure 2 and Figure 3The discussion does not limit the breadth of implementation. At least one of these aspects relates generally to video encoding and decoding, and at least one other aspect relates generally to the transmission of a generated or encoded bitstream. These and other aspects can be implemented as a method, an apparatus, a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) having instructions thereon stored thereon for encoding or decoding video data according to any of the described methods, and / or a computer-readable storage medium having a bitstream generated according to any of the described methods stored thereon.

[0008] In this application, the terms "reconstruction" and "decoding" are used interchangeably, as are the terms "encoding" and "decoding," the terms "pixel" and "sample," and the terms "image," "picture," and "frame." Typically, but not necessarily, the term "reconstruction" is used on the encoder side, while "decoding" is used on the decoder side. In this application, the terms "dequantization" and "scaling" are used interchangeably.

[0009] This document describes various methods, and each method includes one or more steps or actions for implementing the method. Unless the correct operation of the method requires a specific order of steps or actions, the order and / or use of specific steps and / or actions can be modified or combined. Furthermore, terms such as "first" and "second" can be used in various embodiments to modify elements, components, steps, operations, etc., such as, for example, "first decoding" and "second decoding." Unless specifically required, the use of these terms does not imply an ordering of the modified operations. Therefore, in this example, the first decoding does not need to be performed before the second decoding and can occur, for example, before, during, or in a time period overlapping with the second decoding.

[0010] For clarity, the terms "met condition," "unmet condition," and "configuration condition(s)" are used throughout the embodiments described herein to describe conditions relative to a threshold (e.g., greater than or less than), a threshold value, a configuration value, etc. For example, a met condition may be described as being above a threshold value, while a unmet condition (e.g., a performance criterion) may be described as being below a threshold value. The embodiments described herein are not limited to threshold-based conditions. Any other kind of conditions and parameters(s) (such as, for example, belonging to or not belonging to a range of values) may be applied to the embodiments described herein.

[0011] This aspect is not limited to VVC or HEVC, and can be applied to, for example, other standards and recommendations (whether pre-existing or developed in the future) and any extensions of such standards and recommendations (including VVC and HEVC). Unless otherwise stated or technically excluded, the aspects described in this application may be used alone or in combination.

[0012] Figure 1 The diagram illustrates an example of a system that can implement various aspects and embodiments. System 100 can be embodied as a device including the various components described below and configured to perform one or more aspects described in this application. Examples of such devices include, but are not limited to, various electronic devices such as personal computers, laptop computers, smartphones, tablet computers, digital multimedia set-top boxes, digital television receivers, personal video recording systems, connected home appliances, and servers. Elements of system 100 can be embodied individually or in combination in a single integrated circuit, multiple ICs, and / or discrete components. For example, in at least one embodiment, the processing and encoder / decoder elements of system 100 are distributed across multiple ICs and / or discrete components. In various embodiments, system 100 is communicatively coupled to other systems or other electronic devices via, for example, a communication bus or through dedicated input and / or output ports. In various embodiments, system 100 is configured to implement one or more aspects described in this application.

[0013] System 100 includes at least one processor 110 configured to execute instructions loaded thereon for implementing various aspects, such as those described in this application. Processor 110 may include embedded memory, input / output interfaces, and various other circuitry, as known in the art. System 100 includes at least one memory 120 (e.g., a volatile memory device and / or a non-volatile memory device). System 100 includes a storage device 140, which may include non-volatile memory and / or volatile memory, including but not limited to EEPROM, ROM, PROM, RAM, DRAM, SRAM, flash memory, disk drives, and / or optical disk drives. Storage device 140 may include internal storage devices, attached storage devices, and / or network-accessible storage devices, as non-limiting examples.

[0014] System 100 includes an encoder / decoder module 130 configured to, for example, process data to provide encoded or decoded video, and the encoder / decoder module 130 may include its own processor and memory. The encoder / decoder module 130 represents multiple modules that may be included in a device to perform encoding and / or decoding functions. As is known, a device may include one or both of an encoding module and a decoding module. Furthermore, the encoder / decoder module 130 may be implemented as a separate element of system 100, or it may be incorporated within processor 110 as a combination of hardware and software, as is known to those skilled in the art.

[0015] Program code to be loaded onto processor 110 or encoder / decoder 130 to execute the various aspects described herein may be stored in storage device 140 and subsequently loaded onto memory 120 for execution by processor 110. According to various embodiments, one or more of processor 110, memory 120, storage device 140, and encoder / decoder module 130 may store one or more of various items during the execution of the processes described herein. Such stored items may include, but are not limited to, input video, decoded video or portions of decoded video, bitstreams, matrices, variables, and intermediate or final results from processing equations, formulas, operations, and arithmetic logic.

[0016] In some embodiments, the memory within processor 110 and / or encoder / decoder module 130 is used to store instructions and provide working memory for processing required during encoding or decoding. However, in other embodiments, external memory (e.g., the processing device may be processor 110 or encoder / decoder module 130) is used for one or more of these functions. External memory may be memory 120 and / or storage device 140, such as dynamically volatile memory and / or non-volatile flash memory. In several embodiments, external non-volatile flash memory is used to store, for example, the operating system of a television. In at least one embodiment, a fast external dynamic volatile memory, such as RAM, is used as working memory for video decoding and decoding operations, such as for MPEG-2 (MPEG stands for Moving Picture Experts Group, MPEG-2 is also known as ISO / IEC 13818, and 13818-1 is also known as H.222, and 13818-2 is also known as H.262), HEVC (HEVC stands for High Efficiency Video Decoding, also known as H.265 and MPEG-H Part 2) or VVC (Multi-Functional Video Decoding, a new standard developed by JVET (Joint Video Experts Group)).

[0017] Inputs to the components of system 100 can be provided through various input devices as shown in block 105. Such input devices include, but are not limited to: (i) a radio frequency (RF) section that receives, for example, RF signals transmitted over the air by a broadcaster, (ii) component (COMP) input terminals (or a set of COMP input terminals), (iii) universal serial bus (USB) input terminals, and / or (iv) high-definition multimedia interface (HDMI) input terminals. Figure 1 Other examples not shown include composite video.

[0018] In various embodiments, the input device of block 105 has associated corresponding input processing elements, as known in the art. For example, the RF section may be associated with elements suitable for: (i) selecting a desired frequency (also known as selecting a signal, or limiting a signal band to a certain band), (ii) down-converting the selected signal, (iii) further band-limiting to a narrower band to select, for example, a signal band, which may be referred to as a channel in some embodiments, (iv) demodulating the down-converted and band-limited signal, (v) performing error correction, and (vi) demultiplexing to select a desired data packet stream. The RF section in various embodiments includes one or more elements to perform these functions, such as frequency selectors, signal selectors, band limiters, channel selectors, filters, downconverters, demodulators, error correctors, and demultiplexers. The RF section may include a tuner that performs various of these functions, including, for example, down-converting a received signal to a lower frequency (e.g., intermediate frequency or near-baseband frequency) or baseband. In one set-top box embodiment, the RF section and its associated input processing elements receive RF signals transmitted via a wired (e.g., cable) medium and perform frequency selection by filtering, down-converting, and re-filtering to a desired frequency band. Various embodiments rearrange the order of the above (and other) elements, remove some of these elements, and / or add other elements that perform similar or different functions. Adding elements may include inserting elements between existing elements, such as, for example, inserting amplifiers and analog-to-digital converters. In various embodiments, the RF section includes an antenna.

[0019] Furthermore, the USB and / or HDMI terminals may include corresponding interface processors for connecting system 100 to other electronic devices via USB and / or HDMI connections. It should be understood that various aspects of input processing, such as Reed-Solomon error correction, may be implemented as needed, for example, within a separate input processing IC or within processor 110. Similarly, various aspects of USB or HDMI interface processing may be implemented as needed within a separate interface IC or within processor 110. The demodulated, error-corrected, and demultiplexed streams are provided to various processing elements, including, for example, processor 110 and encoder / decoder 130, which operate in conjunction with memory and storage elements to process the data streams as needed for presentation on the output device.

[0020] Various components of system 100 can be housed within an integrated housing. Within the integrated housing, various components can be interconnected and transmit data using a suitable connection arrangement 115, such as an internal bus known in the art, including an I2C bus, wiring, and printed circuit board.

[0021] System 100 includes a communication interface 150 that enables communication with other devices via a communication channel 190. The communication interface 150 may include, but is not limited to, a transceiver configured to send and receive data via the communication channel 190. The communication interface 150 may include, but is not limited to, a modem or network interface card (NIC), and the communication channel 190 may be implemented, for example, in a wired and / or wireless medium.

[0022] In various embodiments, data is streamed to system 100 using a Wi-Fi network such as IEEE 802.11 (IEEE stands for Institute of Electrical and Electronics Engineers). The Wi-Fi signals in these embodiments are received via communication channel 190 and communication interface 150, which are adapted for Wi-Fi communication. Communication channel 190 in these embodiments is typically connected to an access point or router that provides access to external networks, including the Internet, to allow streaming applications and other over-the-top communications. Other embodiments use a set-top box that delivers data via an HDMI connection to input block 105 to provide streaming data to system 100. Still other embodiments use an RF connection to input block 105 to provide streaming data to system 100. As described above, various embodiments provide data in a non-streaming manner. Furthermore, various embodiments use wireless networks other than Wi-Fi, such as cellular networks or Bluetooth networks.

[0023] System 100 can provide output signals to various output devices, including a display 165, a speaker 175, and other peripheral devices 185. The display 165 in various embodiments includes one or more of, for example, a touchscreen display, an organic light-emitting diode (OLED) display, a flexible display, and / or a foldable display. The display 165 can be used in a television, tablet computer, laptop, cellular phone (mobile phone), or other device. The display 165 can also be integrated with other components (e.g., in a smartphone) or stand alone (e.g., an external monitor for a laptop). Other peripheral devices 185, in various examples of embodiments, include one or more of a standalone digital video disc (or digital multifunction disc) (DVR, for both terms), a disc player, a stereo system, and / or a lighting system. Various embodiments use one or more peripheral devices 185 that provide functionality based on the output of system 100. For example, a disc player performs the function of playing the output of system 100.

[0024] In various embodiments, control signals communicate between system 100 and display 165, speaker 175, or other peripheral devices 185 using signaling protocols such as AV.Link, CEC, or other communication protocols that enable device-to-device control with or without user intervention. Output devices may be communicatively coupled to system 100 via dedicated connections through corresponding interfaces 160, 170, and 180. Alternatively, output devices may be connected to system 100 via communication interface 150 using communication channel 190. Display 165 and speaker 175 may be integrated into a single unit, integrated with other components of system 100 in an electronic device such as, for example, a television. In various embodiments, display interface 160 includes a display driver, such as a timing controller (TCon) chip.

[0025] Display 165 and speaker 175 may alternatively be separated from one or more other components, for example, if the RF portion of input 105 is part of a separate set-top box. In various embodiments where display 165 and speaker 175 are external components, the output signal may be provided via a dedicated output connection including, for example, an HDMI port, a USB port, or a COMP output.

[0026] The embodiments may be executed by computer software implemented by processor 110, or by hardware, or by a combination of hardware and software. As a non-limiting example, the embodiments may be implemented by one or more integrated circuits. Memory 120 may be of any type suitable for the technical environment and may be implemented using any suitable data storage technology, such as optical memory devices, magnetic memory devices, semiconductor-based memory devices, fixed memory, and removable memory, as a non-limiting example. Processor 110 may be of any type suitable for the technical environment and may include one or more of microprocessors, general-purpose computers, special-purpose computers, and processors based on multi-core architectures, as a non-limiting example.

[0027] Figure 2 The illustration shows an example video encoder 200, such as a VVC (Variety Video Decoder) encoder. Figure 2 The diagram may also depict an encoder that improves upon the VVC standard or an encoder that employs a technology similar to VVC.

[0028] Before encoding, the video sequence may undergo pre-coding (201), such as applying a color transformation to the input color image (e.g., a conversion from RGB 4:4:4 to YCbCr 4:2:0), or performing a remapping of the input image components to obtain a signal distribution that is more resilient to compression (e.g., using histogram equalization with one of the color components). Metadata may be associated with this pre-processing and appended to the bitstream.

[0029] In encoder 200, the image is encoded by encoder elements as described below. The image to be encoded is partitioned (202) and processed in units such as CTU (decode tree unit) and CU (decode unit). Each unit is encoded using, for example, an intra-frame or inter-frame mode. When a unit is encoded in intra-frame mode, intra-frame prediction (260) is performed, for example using an intra-frame prediction tool such as decoder-side intra-frame mode derivation (DIMD). In inter-frame mode, motion estimation (275) and compensation (270) are performed. The encoder determines (205) which of the intra-frame or inter-frame modes is used to encode the unit and indicates the intra-frame / inter-frame decision by, for example, a prediction mode flag. The prediction residual is calculated by, for example, subtracting (210) the predicted block (also called the prediction block) from the original image block.

[0030] The prediction residuals are then transformed (225) into transformation coefficients c (also known as prediction residual transformation coefficients), which are quantized (230) into quantization indices. (Also known as transform coefficient level or encoder-side quantization transform coefficients). Quantization level (also known as quantization index). Motion vectors and other syntax elements (such as image partitioning information) are entropy decoded (245) to output a bitstream. The encoder can skip the transform and apply quantization directly to the untransformed residual signal. The encoder can bypass both the transform and quantization, i.e., the residual is directly decoded without applying the transform or quantization process.

[0031] The encoder decodes the coded blocks to provide a reference for further prediction. The quantization transform coefficients are dequantized (240) (also known as scaling) and inverse transformed (250) to decode the prediction residuals. The decoded prediction residuals and prediction blocks are combined (255) to reconstruct the image blocks. An in-loop filter (265) is applied to the reconstructed image to perform filtering such as deblocking / SAO (Sample Adaptive Offset) / BIF (Bilateral Filtering) / ALF (Adaptive Loop Filtering) to reduce coding artifacts. The filtered image is stored in a reference image buffer (280). The in-loop filter (265) is thus used to enhance the reconstructed image before storing it in the reference image buffer (280). In-loop filters form an entire family. Among them, the deblocking filter (DBF) is designed to reduce blocking artifacts that occur along block boundaries. Deblocking filters are often designed to improve subjective quality, i.e., the perceptibility of such decoding errors to the human psychological visual system. In common video decoding standards such as HEVC and VVC, deblocking filters are predetermined based on decoding information (such as prediction modes, motion vectors, and transform coefficients) and local variations across block boundaries. Adaptive Loop Filters (ALFs), on the other hand, are learned on the encoder side to minimize the mean square error relative to the source image, and the learned filter weights are then encoded into the bitstream. ALFs are typically applied at the CTU level, while deblocking filters are applied along block boundaries.

[0032] Quantization of residuals (e.g., residual coefficients) can produce ringing artifacts around edges in both still images and moving objects in videos. Applying a bilateral filter (BIF) can significantly reduce ringing artifacts. BIF can be applied directly to the decoded sample values ​​(also known as reconstructed sample values) after the inverse transform. In a variant, BIF can be applied to the reconstructed samples (e.g., reconstructed sample values) after deblocking filtering, for example, using a larger filter and an optimized lookup table (e.g., approximating the filter weights).

[0033] Figure 3 A block diagram of an example video decoder 300 is shown. In decoder 300, the bitstream is decoded by decoder elements as described below. Video decoder 300 typically performs the same operations as... Figure 2 The encoding process described herein is the inverse of the decoding process. Encoder 200 typically also performs video decoding as part of the encoded video data.

[0034] Specifically, the input to the decoder includes a video bitstream, which can be generated by the video encoder 200. The bitstream is first entropy decoded (330) to obtain the quantization level. (Also known as the transform coefficient level or quantization level on the decoder side), prediction mode, motion vectors, and other decoding information. Image partitioning information indicates how the image is partitioned. Therefore, the decoder can partition the (335) image based on the decoded image partitioning information. Quantization level The dequantized (340) are the reconstructed transform coefficients. Dequantization, also known as scaling, involves reconstructing the transform coefficients. The image is inversely transformed (350) to obtain the prediction residual. The prediction residual and the predicted block (also known as the prediction block) are combined (355) to reconstruct the image block. The predicted block can be obtained from intra-frame prediction (360) or motion-compensated prediction (i.e., inter-frame prediction) (375). An intra-loop filter (365) (e.g., the same intra-loop filter (265) applied on the encoder side) is applied to the reconstructed image. The filtered image is stored at a reference image buffer (380). Note that for a given image, the contents of the reference image buffer 380 on the decoder 300 side are the same as the contents of the reference image buffer 280 on the encoder 200 side for the same image.

[0035] The decoded image can also undergo post-decoding processing (385), such as inverse color transformation (e.g., conversion from YCbCr 4:2:0 to RGB 4:4:4) or inverse remapping, which is the inverse of the remapping process performed in the pre-encoding process (201). Post-decoding processing can utilize metadata derived in the pre-encoding process and signaled in the bitstream.

[0036] As mentioned earlier, an image to be encoded can be divided or partitioned into multiple non-overlapping blocks or units, for example, partitioned into decoding tree units (CTUs). In one example, the CTU size can be set to 128×128 for luminance samples, as is the case in VVC.

[0037] Each decoding tree unit (CTU) can be processed as a single decoding unit, or it can be divided into multiple decoding units (CUs) through one or more recursive quadtree (QTBT) partitions followed by one or more recursive multi-type tree partitions (such as binary tree (BT) or ternary tree (TT)). Multi-type tree partitions can be horizontal binary tree partitions, vertical binary tree partitions, horizontal ternary tree partitions, or vertical ternary tree partitions, such as... Figure 4 As shown. A CTU dual-tree (for intra-frame decoding slices) can be described on top of a block partitioning structure, separating the luma and chroma decoding trees. The segmentation applied to each CTU (QTBT, BT, or TT) produces one or more CUs with square and rectangular shapes. These allow for a better fit to local image content characteristics and features.

[0038] By increasing the CTU size to 128x128 for luminance, decoding efficiency can be improved at the cost of increased complexity. The size of each CU can be related to the information present in that CU, for example, it can be related to the rate-distortion (RD) cost of the CU. The rate-distortion (RD) cost of a candidate block can be calculated as follows: CostRD = D + Lambda(QP)*R, where D is the distortion (L2, i.e., mean square error) of the current block with its decoding parameters, R is the associated code rate (e.g., in terms of the number of decoded bits), and Lambda(QP) is the Lagrangian parameter, for example, derived from the quantization parameter QP. Higher QP results in fewer but larger CUs compared to smaller QP. Once partitioning is completed during the decoding phase, several features are available for intra-frames and each CU, such as the intra-prediction mode, code block flag (CBF), DCT transform coefficients, and the parameter Last_xy_sig. The intra-prediction mode indicates which prediction mode is used, such as planar or angular prediction.

[0039] By increasing the CTU size to 128x128 for luminance, we can typically improve decoding efficiency, but at the cost of increased complexity. The size of each CU is related to the information contained within that CU, and more specifically, to the rate-distortion (RD) cost of that CU. The rate-distortion (RD) cost of a candidate block is calculated as follows: CostRD = D + Lambda(QP)R, Where D is the distortion (L2, i.e., mean square error) of the current block with its decoding parameters, R is the associated code rate (in bits decoded), and Lambda(QP) is the Lagrangian parameter derived from the quantization parameter QP. A higher QP produces fewer but larger CUs compared to a smaller QP. Once partitioning is complete during the decoding phase, several features are available for each intra-frame and each CU, such as the intra-prediction mode, the code block flag (CBF), the DCT transform coefficients, and the parameter Last_xy_sig. The intra-prediction mode indicates which prediction mode is used, such as planar or angular prediction. The code block flag (CBF) indicates whether residuals are added to the prediction, i.e., whether the encoded result of the CU contains non-zero residuals. This flag can be decoded component by component. The DCT transform coefficients are the values ​​of the residual coefficients from the transform and quantization. Last_xy_sig is a parameter that signals the position of the last valid coefficient within the transform unit.

[0040] A bilateral filter can be derived from a Gaussian filter and applied to samples in a reconstructed image. In one example, a sample in the reconstructed image (e.g., each sample) can be replaced by a weighted average of itself and its neighbors. The weights can be calculated based on the distance from the center sample and the differences in the sample values. When the filter has... Figure 5 In the case of the small plus sign shape shown, all distances are either 0 or 1. Figure 5 An example of an 8x8 TU (transformer unit) block and filter aperture is depicted for a sample located at (1,1).

[0041] The sample located at (i, j) can be filtered using its neighboring samples (k, l). Weights These are the weights assigned to sample (k, l) to filter sample (i, j), and are defined as follows: (Equation 1).

[0042] Where I(i, j) and I(k, l) are the original reconstructed intensity values ​​of samples (i, j) and (k, l), respectively. It is a spatial parameter, and These are the range parameters. The properties (or strength) of a bilateral filter are controlled by these two parameters. Samples closer to the target sample and with a smaller intensity difference from it will have a greater weight than samples farther away and with a larger intensity difference. In this initial contribution, Based on the size of the transformation unit (Equation 2), and Based on the QP used for the current block (Equation 3).

[0043] (Equation 2) (Equation 3).

[0044] Bilateral filters can be applied directly to TU blocks (e.g., each TU block) in both the encoder and decoder after the inverse transform. As a result, subsequent intra-frame decoded blocks will be predicted from sample values ​​that have already been filtered by the bilateral filter. This also makes it possible to incorporate the bilateral filter operation into the rate-distortion decision in the encoder.

[0045] Samples in the transform unit (e.g., each sample) can be filtered using only their immediate neighbors. The filter can have a plus-shaped filter aperture centered on the sample to be filtered. The output is the filtered sample value. Therefore, the calculation is as follows: (Equation 4).

[0046] For TU sizes larger than 16×16, the block is treated as several 16×16 blocks, and in Equation 2, the TU block width = TU block height = 16. Furthermore, rectangular blocks are treated as several square block instances.

[0047] To reduce computation, bilateral filters can be implemented using a lookup table (LUT), which stores all weights for a specific QP in a two-dimensional array. The LUT is indexed on one dimension using the intensity difference between the sample to be filtered and the reference sample, and on the other dimension using the TU size. For efficient storage of the LUT, the weights can be rounded to 8 bits of precision. Figure 6 The diagram illustrates a bilateral filtering method in which a coefficient lookup table is used to obtain the weights of the filter.

[0048] A bilateral filter can be a plus-shaped five-tap filter, hence the name plus-shaped filter. The filter strength can be based solely on the TU size and QP.

[0049] In another example, the filter strength can be lower for blocks using inter-frame prediction. Inter-frame prediction blocks typically have fewer residuals than intra-frame prediction blocks, so it makes sense to perform less filtering on the reconstruction of inter-frame prediction blocks. The filter strength for intra-frame prediction blocks is set as before, but the following spatial weights are used for inter-frame prediction blocks: (Equation 5).

[0050] The size of the lookup table (LUT) for a bilateral filter can be reduced. The goal of the LUT is to pre-compute the weights of the bilateral filter: (Equation 6) Make the filtered pixels It can be calculated as follows: (Equation 7).

[0051] For center weights, i.e., the weights of the center pixel, and .therefore and This means the central weight Always 1.0.

[0052] For all other weights, This is because the filter only includes the pixel's four neighbors (the "plus-shaped" filter kernel). Therefore, in It represents the intensity of the center pixel. Since the center weight is always 1.0, it does not require a LUT. For other weights, a 3D LUT indexed on the following dimensions can be used: mode, QP, and absolute intensity difference.

[0053] variable Six different values ​​can be taken, depending on the TU size and block type; three each for intra-frame blocks (4×4, 8×8, and 16×16 blocks), and three for inter-frame blocks (4×4, 8×8, and 16×16 blocks). (Rectangular blocks use the smaller dimension). Variables It can be calculated from the QP value, and the filter is only enabled for QP 18 and higher: for QP 17 and lower, It becomes too small to alter the filtered value. Therefore, this dimension can take 34 different values ​​(18 to 51). Absolute intensity difference A 10-bit luminance value can take 1024 distinct values. Each weight can be stored using an unsigned short integer. Therefore, a brute-force implementation requires 6 * 34 * 1024 * 2 = 417,792 bytes of LUT memory.

[0054] In another example, division is replaced by multiplication and a lookup table (LUT). To keep the LUT size as small as possible, starting from Equation 7, the numerator and denominator of the division are set to be as small as possible. To reduce the numerator, the filter equation is rewritten using difference. To reduce the denominator, large center weight values ​​for inter-frame blocks of 16×16 and larger are avoided by turning off the filter for these blocks. Since the filter (shape 2x2) only touches the center pixel and its four neighbors, the equation (Equation 7) can be written as: (Equation 8) in It is the intensity of the center pixel, and , , and These are the intensities of the left, right, top, and bottom pixels, respectively. Similarly, It is the weight of the center pixel, and , , and It is the corresponding weight of neighboring pixels.

[0055] The molecules may become relatively large. Fortunately, equation 8 can be rewritten as: (Equation 9) in , And so on. When a large strength difference occurs... At that time, the bilateral filter will select the smaller weight. This means the product It's always very small, because either Small, or Small.

[0056] The denominator in Equation 9 is equal to Non-centralized weights , , and The maximum value can be set to 31. The center weight can be any of the values ​​mentioned in Table 1.

[0057] Table 1 - Center weight values ​​based on prediction pattern and TB length.

[0058] In another example, a simplification of the bilateral filter is proposed. For each block, the inverse quantization transform coefficients are examined, and if they contain only one non-zero coefficient located at the DC position, the bilateral filtering of the associated reconstructed block is skipped.

[0059] In another example, a new filtering procedure is proposed. Since the bilateral filter is always applied to luma blocks with non-zero transform coefficients and slice quantization parameters greater than 17, there is no need to signal the use of the bilateral filter. If the bilateral filter is applied, it is performed on the decoded sample immediately after the inverse transform. Furthermore, the filter parameters (i.e., weights) are explicitly derived from the decoded information. The filtering procedure (Equation 7) is rewritten as: (Equation 10) in It is the intensity of the current sample, and It is the modified intensity of the current sample. and These are the intensity and weighting parameters of the k-th neighboring sample, respectively. An example of a current sample and its four neighboring samples (i.e., K=4) in a plus sign shape is depicted on... Figure 7 .

[0060] More specifically, the weights associated with the k-th neighboring sample The definition is as follows: (Equation 11) in (Equation 12) and This depends on the decoding mode and the decoding block size. To further improve decoding performance, for inter-frame decoding blocks, the intensity difference between the current sample and one of its neighboring samples is replaced by the representative intensity difference across two windows covering both the current sample and its neighboring samples. Therefore, the equation for the filtering process becomes: (Equation 13) in and They represent respectively with and The m-th sample value within the center window. In this proposal, the window size is set to 3×3. Coverage and An example of two windows is depicted in Figure 8 .

[0061] Spatial filter intensity can be tuned based on the CU area size for bilateral filters. Much research has focused on reducing the size of the LUT to approximate the numerator and denominator in the following equation: (Equation 14) in These are filtered samples. It is the intensity of the center sample (the sample to be filtered). , , and These are the intensities of the left, right, top, and bottom samples, respectively. Figure 9 The sample used in the weighted sum is described.

[0062] The delta value is the difference relative to the center sample; , And so on. The weights are calculated as follows: (Equation 15) X can be A, B, L, or R.

[0063] exist Figure 10 In the example shown, the bilateral filter can be combined with a Sample Adaptive Offset (SAO) loop filter. This filter is applied during the SAO loop filtering stage. Both the proposed bilateral filter (BIF) and SAO use samples from the deblocking stage as input. Each filter creates a per-sample offset, which is added to the input samples and then clipped.

[0064] In detail, output samples The following was obtained: (Equation 16) in It is an input sample from the deblocked block. It is the offset from the bilateral filter, and It's an offset from SAO.

[0065] The diamond 5x5 filter core can be used with 26 tables (16 entries each), and it operates in the same loop filtering stage as SAO. Figure 11 A rhombic 5x5 filter core is described.

[0066] On this diagram, The center is the sample, and the samples surrounding the center are indicated by A, B, L, and R, representing up, down, left, and right respectively, with NW, NE, SW, and SE representing northwest, etc. Similarly, AA represents up-up, BB represents down-down, etc.

[0067] In another example, similar to BIF-luminance, BIF-chrominance can be performed in parallel with the SAO process, such as... Figure 12 As shown, BIF-chroma and SAO can use the same chroma samples generated by the deblocking filter as input and generate two offsets in parallel for each chroma sample. These two offsets are then added to the input chroma samples to obtain a sum, which is then clipped to form the final output chroma sample value. The proposed BIF-chroma provides on / off control mechanisms at both the CTU and slice levels.

[0068] Figure 13 Another example of an in-loop filtering process with CCSAO (Cross-Component SAO) and BIF is illustrated. For each output sample, three offsets are calculated and clipped: (Equation 17) The bilateral filter applied to image I can be rewritten as follows: (Equation 18).

[0069] in It is the filtered image at (x,y). These are the coefficients of the bilateral filter, and A window centered at (x,y) The reconstructed pixels in, where (Equation 19) It is a pixel window centered at (x,y). It can be equal to . Other, more truncated windows are also possible, such as or .

[0070] Bilateral filtering for domain filters and range filter Both use a low-pass Gaussian filter.

[0071] A domain low-pass Gaussian filter gives higher weights to pixels spatially closer to the center pixel. When the window... Truncation by height (e.g.) When the range low-pass Gaussian filter is applied, all filter coefficients from the domain filter are close to 1. The range low-pass Gaussian filter gives higher weights to pixels similar to the center pixel. Combining the range filter and the domain filter, the bilateral filter is averaged along the edges but reduced in the gradient direction. Therefore, it preserves edges while smoothing noise.

[0072] In the previous example, the BIF is mainly driven by the BIF LUT, which depends on some decoding information such as QP, CBF flag (flag ON), prediction mode inter-frame / intra-frame, and the BIF is only applied to CUs that are neither too small nor too large.

[0073] BIF filtering is not adaptive in terms of filter size. Regardless of the CU characteristics, it has a fixed filter size; for example, the filter is a plus-shaped filter of size 3 or 5. The main drawback is that if the window (e.g., the filter size) is too small in a uniform and large region, smoothing or denoising will be too weak and ineffective. If the window (e.g., the filter size) is too large in edge regions, there is a risk that smoothing or denoising may be too strong. When the filter shape and LUT are fixed, BIF cannot optimally fit the signal.

[0074] In contrast, a method for better fitting of signals in edge or uniform regions is disclosed. This method adapts the BIF filter size (e.g., a plus-shape filter size) based on decoding information (e.g., decoding parameters). The decoding information provides general information about the signal within a block (e.g., in the encoded CU). Therefore, the BIF filter size can be adapted based on the block (e.g., CU) size and / or the decoding information to better fit the signal in edge or uniform regions. From the decoding information, the filter size (e.g., the plus-shape filter size) can be derived to fit the signal within the block (e.g., the CU). In one example, the BIF size is driven by the partition (CU size). In another example, the BIF filter size is driven by the residual (e.g., CBF flag, Last_xy_sig). In yet another example, the BIF filter size is driven by the intra-frame prediction mode (e.g., DC, plane, angle). In yet another example, the BIF filter size is driven by motion information (e.g., the magnitude of the motion vector).

[0075] If a CU is considered as a basic block, a small CU can reflect rich information (such as edges) in that area, while a large CU can reflect a uniform area. The block can also be a CTU or another block partition or region.

[0076] Block size selection is highly dependent on the QP value; higher and lower QP values ​​mean larger and smaller block sizes, respectively. Lower QP values ​​preserve image details, while higher QP values ​​provide a higher compression ratio at the cost of image quality loss. If the cost is unsatisfactory for the CU, the CU is segmented. The higher the QP, the larger the CU. Uniform regions (with low cost) can be located within CUs with large areas.

[0077] In all the examples below, the terms “block” and “CU” are used interchangeably.

[0078] Figure 14 A flowchart depicts a method 1500 for filtering reconstructed sample blocks (also known as reconstructed blocks or reconstructed image blocks) according to an example. This method can be applied in the same manner by an encoding or decoding method for in-loop filtering or post-filtering. In fact, in-loop filters ( Figure 2 265 and Figure 3 The 365th step (365) is applied by both the encoder and decoder in the decoding loop to reconstruct the sample.

[0079] In S1502, the reconstructed sample block is obtained. On the encoder side, the reconstructed sample can be... Figure 2 This is obtained after block 255 (e.g., after inverse quantization 240, inverse transform 250, and prediction 255). On the decoder side, the reconstructed samples can be obtained after block 255. Figure 3 It is obtained after block 355 (e.g., after inverse quantization 340, inverse transform 350, and prediction 355).

[0080] In S1504, the filter size is selected based on decoding information (also known as decoding parameters). This decoding information may include any of the following: block size, prediction mode, motion information, and residual information (e.g., CBF or the position of the last valid DCT coefficient). In one example, a filter larger than a block size below a certain value can be selected for a block size higher than that value.

[0081] In one example, a filter of a larger size can be selected for an intra-frame block associated with a DC or Planar mode than for a block associated with an angular mode. This intra-frame mode is the prediction mode used to obtain the reconstructed sample block. When the reconstructed sample block is associated with an inter-frame prediction mode, this intra-frame mode can be the mode of a reference block.

[0082] In one example, if the last valid DCT coefficient is near the top-left corner of the block (e.g., within the DCT coefficient block), a larger filter can be selected than if the last valid DCT coefficient is far from the top-left corner of the block. The DCT coefficients are those used to obtain the reconstructed sample block.

[0083] In another example, when the block size is below a certain value, a filter of the first size can be selected to filter the reconstructed sample block; when the block size is above this value and the intra-frame mode of the block is DC or Planar, a filter of the second size can be selected to filter the reconstructed sample block; and when the block size is above this value and the intra-frame mode of the block is angular mode, a filter of the third size can be selected to filter the reconstructed sample block. The first size is lower than the second size, and the second size itself is lower than the third size.

[0084] In yet another example, the filter size can be selected based on motion information, such as the magnitude or direction of the motion vector. In one example, a larger filter can be selected for motion vectors with amplitudes above a certain value than for motion vectors with amplitudes below that value.

[0085] As an indicator of residuals, the value of CBF can also be used to activate or deactivate filters.

[0086] In S1506, the reconstructed sample block is filtered using a filter of the selected size.

[0087] All the examples below are described for plus-shaped filters. However, they can be applied to filters of different shapes, such as diamonds.

[0088] Figure 15 A flowchart illustrating a filtering method based on an example is provided. In this example, two (e.g., only two) filter sizes (e.g., filter shapes) are used. For example, one size is 3 and the other is 5. These two BIF filters could be... Figure 7 The plus-shaped filter shown is a filter with a size of 3 and Figure 11 The plus-shaped filter shown is a filter of size 5. Its corresponding LUT can also be used in place of the fully analytical equation (Equation 18). Other filters are also possible.

[0089] In S1001, the block size (e.g., CU) is compared with the value T1. The value T1 (e.g., corresponding to the block size (e.g., CU size)) drives which filter to use. In one example, T1 = 1024 pixels, which corresponds to a block of size 32x32.

[0090] If the block size (e.g., CU size) is less than T1, then in S1002, a BIF filter of the first size (e.g., a plus-shape filter of size 3 or a 3x3 shape filter) represented as BIF_filter_shape_1 is selected (e.g., selected or used).

[0091] Otherwise, in S1003, a BIF filter of a second size (e.g., a plus-shape filter of size 5 or a 5x5 shape filter) represented as BIF_filter_shape_2 is selected (e.g., chosen or used). The size of the second BIF filter can be different from the size of the first BIF filter; for example, the second size can be larger than the first size. The same LUT as described above can be used.

[0092] Figure 16 A flowchart illustrating a filtering method based on another example is provided. The filtering is refined by block (e.g., CU) regions by increasing the number of filters with different plus-shaped filter sizes (e.g., plus-shaped filters of sizes 3, 5, and 7).

[0093] In S2001, the block size (e.g., CU) is compared with the value T1. The value T1 (e.g., corresponding to the block size (e.g., CU size)) drives which filter to use. In one example, T1 = 1024 pixels, which corresponds to a block of size 32x32.

[0094] If the block size (e.g., CU size) is less than T1, in S2002, a BIF filter of the first size (e.g., a plus-shape filter of size 3) is selected (e.g., selected or used) and represented as BIF_filter_shape_1.

[0095] Otherwise (i.e., if the block size is higher than T1), in S2003 the block (e.g., CU) size is compared with another value T2. In one example, T2 = 4096 pixels, which corresponds to a block of size 64x64.

[0096] If the block size is less than T2, in S2004, a BIF filter of the second size (e.g., a plus-shape filter of size 5) is selected (e.g., selected or used) and represented as BIF_filter_shape_2.

[0097] Otherwise, that is, if the block size is higher than T2, then in S2005, a BIF filter of the third size (e.g., a plus-shaped filter of size 7) is selected (e.g., selected or used) as BIF_filter_shape_3.

[0098] The first, second, and third sizes can be different. In one example, the third size can be larger than the second size, and the second size can be larger than the first size.

[0099] Figure 17A flowchart illustrating a filtering method based on another example is provided. The filtering is refined by increasing the number of filters with different filter sizes (e.g., plus-shaped filters of sizes 3, 5, and 7), by block (e.g., CU) regions. The BIF filter size selection is driven by the residual and the block size (e.g., CU size).

[0100] In S3001, the value of CBF is obtained. CBF indicates whether the encoded result of a block (e.g., CU) contains non-zero residuals. If CBF equals 0 (OFF), the residual coefficients of the block do not need to be decoded. In this case, we can assume that there is no difference between the reconstructed pixels and the original pixels in the block. This means that BIF does not need to be applied to the block. If CBF equals 1 (ON), the residual coefficients of the block need to be decoded (correspondingly). In this case, we can assume that there is a difference between the reconstructed pixels and the original pixels in the block. We can use... Figure 16 Or, as shown in 17, the same partition-driven strategy applies filters of different sizes (e.g., different plus-shaped filter sizes).

[0101] In S3002, the block size (e.g., CU) is compared with the value T1. The value T1 (e.g., corresponding to block size / area) drives which filter to use. In one example, T1 = 1024 pixels, which corresponds to a block of size 32x32.

[0102] If the block size (e.g., CU size) is less than T1, then in S3003, a BIF filter of the first size (e.g., a plus-shape filter of size 3) is selected (e.g., selected or used) and represented as BIF_filter_shape_1.

[0103] Otherwise, in S3004, a BIF filter of a second size, represented as BIF_filter_shape_2 (e.g., a plus-shape filter of size 5), is selected (e.g., chosen or used). The second BIF filter size may differ from the first BIF filter size; for example, the second size may be larger than the first size. The same LUT as described above can be used.

[0104] exist Figure 18 In the variant shown, the Last_xy_sig syntax element (e.g., a flag) can be used. In fact, the Last_xy_sig syntax element also provides information about the residual, as it corresponds to the position (x,y) of the last valid DCT coefficient in the block. If (x,y) is close to the top-left corner of the block, the energy of the DCT coefficient is concentrated in low frequencies; that is, the block is a uniform region.

[0105] The position of the last valid DCT coefficient in the block is compared with the top-left corner of the block. If the position of the last valid DCT coefficient (e.g., the position of Last_xy_sig) is close to the top-left corner (e.g., in the first 50% of DCT coefficients), a second BIF filter BIF_filter_shape_2 (with a shape filter size of 5) is selected in S3006.

[0106] Otherwise (i.e., if the position of the last valid DCT coefficient (e.g., the position of Last_xy_sig) is far from the top-left corner, for example, after the first 50% of the DCT coefficients), the first BIF filter BIF_filter_shape_1 (with a shape filter size of 3) is selected in S3008. Figure 19 In the example, S3008 can be replaced by S3009, S3010, and S3012. In this case, if the position of the last valid DCT coefficient (e.g., the position of Last_xy_sig) is far from the top left corner, the block size is compared with T1 in S3009, and the filter size is selected based on that comparison.

[0107] Figure 20 A flowchart illustrating a filtering method based on another example is provided, where the BIF filter size is selected based on the intra-prediction mode. Intra-mode decoding information for a block is read to check if the block (e.g., CU) is encoded with orientation information. Intra-mode decoding contains six most probable modes (MPMs). The Planar mode (always the most probable mode (MPM)) is decoded first with a separate flag. The DC and Angular modes are decoded using a list of the remaining five MPMs derived from the intra-modes of neighboring blocks. If the intra-mode is decoded with the Angular mode, the block contains orientation propagation for decoding.

[0108] In S4001, the intra-prediction mode (e.g., for the block to be filtered) is obtained and compared with the DC / Planar mode. For blocks in DC and Planar modes (corresponding to regions in the uniform region with higher probability), in S4002, a BIF filter of the first size (with a plus-shaped filter size of 5) is selected, denoted as BIF_filter_shape_1.

[0109] Otherwise, for the angular pattern block (corresponding to the block with a high probability of having an edge), in S4003 a BIF filter of the second size (with a plus shape filter size of 3) is selected as BIF_filter_shape_2.

[0110] The size of the second BIF filter can differ from the size of the first BIF filter; for example, the second size can be larger than the first size. The same LUT as described above can be used.

[0111] exist Figure 21 In the example shown, the prediction mode of the block is checked in S4000. If / when the block is inter-decoded, its reference block can be obtained in S4004 (if it is intra-decoded), and its intra-prediction mode can be checked in S4005. The intra-prediction mode of the reference block is compared with the DC / Planar mode, and depending on the type of intra-prediction mode, a first-size BIF filter (denoted as BIF_filter_shape_1) or a second-size BIF filter (denoted as BIF_filter_shape_2) is selected in S4007 and S4006, respectively.

[0112] about Figure 15-21 Publicly available methods can be combined. Figure 22 A flowchart is depicted based on another example of a filtering method, in which the BIF filter size is selected based on various decoding information (e.g., CBF, block size, intra-prediction mode).

[0113] For example, from the block, the CBF value is checked in S5001. If the CBF is OFF (or its value is empty), the block is not filtered by BIF. If the CBF is ON (or its value is 1), it means that there are some residuals, and BIF can be applied to enhance the signal. In S5002, the block size is compared with the value T1. If the block size is smaller than T1 (e.g., 1024 pixels, corresponding to 32x32), in S5003, a BIF filter of the first size, represented as BIF_filter_shape_1 (e.g., a plus-shape filter size of 3), is selected. Otherwise, the intra-frame prediction mode is checked in S5004. For blocks decoded using DC and planar modes, in S5005, a BIF filter of the second size, represented as BIF_filter_shape_2 (e.g., a plus-shape filter size of 5), is selected. For blocks decoded using angle mode, in S5006, a BIF filter of the third size, represented as BIF_filter_shape_3 (e.g., a plus-shape filter size of 7), is selected. The first, second, and third sizes can be different. In one example, the third size can be larger than the second size, and the second size can be larger than the first size.

[0114] Figure 23 A flowchart illustrating a filtering method based on another example is provided, in which the BIF filter size is selected based on motion information.

[0115] In S6000, the prediction mode of the block to be filtered is checked. If the block is intra-frame decoded, then apply... Figure 21 Steps S4001, S4002, and S4003.

[0116] If / when the block is inter-frame decoded, at least one motion vector (MV) is obtained in S6002 and compared with the value TM1.

[0117] If the amplitude of MV is lower than TM1, a third BIF filter (denoted as BIF_filter_shape_3) is selected in S6003. In one example, the third BIF filter is the same as the first BIF filter. Otherwise, a fourth BIF filter (denoted as BIF_filter_shape_4) is selected in S6004. In one example, the fourth BIF filter is the same as the second BIF filter.

[0118] In another example, instead of magnitude, or appended to magnitude, check the direction of the vector.

[0119] Furthermore, this aspect is not limited to ECM, VVC, or HEVC, and can be applied to, for example, other standards and recommendations, as well as any extensions of such standards and recommendations. Unless otherwise stated or technically excluded, the aspects described in this application may be used alone or in combination.

[0120] Various numerical values ​​are used in this application. These specific values ​​are for illustrative purposes only, and the aspects described are not limited to these specific values.

[0121] Note that the syntax elements used in this article, such as terms in equations and algorithms, signal (e.g., flags, patterns) labels / names, such as CBF, Last_xy_sig, etc., are descriptive terms. Therefore, they do not preclude the use of other syntax element names.

[0122] Various implementations involve decoding. As used herein, "decoding" can encompass all or part of a process performed, for example, on a received encoded sequence to produce a final output suitable for display. In various embodiments, such a process includes one or more processes typically performed by a decoder, such as entropy decoding, inverse quantization, inverse transform, and differential decoding. In various embodiments, such a process also includes, or alternatively includes, processes performed by a decoder of the various implementations described herein, such as filtering a reconstructed block using a filter whose size is selected based on any of the block size, intra-frame prediction mode, and residual information.

[0123] As a further example, in one embodiment "decoding" refers only to entropy decoding, in another embodiment "decoding" refers only to differential decoding, and in yet another embodiment "decoding" refers to a combination of entropy decoding and differential decoding, and in yet another embodiment "decoding" refers to the entire image reconstruction process including entropy decoding. Whether the phrase "decoding process" is intended to specifically refer to a subset of operations or to refer to a broader decoding process will be clear based on the context of the specific description and is considered well understood by those skilled in the art.

[0124] Various implementations involve encoding. In a manner similar to the discussion of “decoding” above, the term “encoding” as used herein can encompass all or part of a process performed, for example, on an input video sequence to produce an encoded bitstream. In various embodiments, such a process includes one or more processes typically performed by an encoder, such as partitioning, differential coding, transform, quantization, and entropy coding. In various embodiments, such a process also includes, or alternatively includes, processes performed by an encoder of the various implementations described herein, such as filtering a reconstructed block using a filter whose size is selected based on any one of the block size, intra-frame prediction mode, and residual information.

[0125] As a further example, in one embodiment “encoding” refers only to entropy encoding, in another embodiment “encoding” refers only to differential encoding, and in yet another embodiment “encoding” refers to a combination of differential and entropy encoding. Whether the phrase “encoding process” is intended to specifically refer to a subset of operations or to refer to a broader encoding process will be clear based on the specific context of the description and is considered well understood by those skilled in the art.

[0126] This disclosure has described various information fragments that can be sent or stored, such as, for example, syntax. This information can be packaged or arranged in a variety of ways, including, for example, those common in video standards, such as placing the information in SPS, PPS, NAL units, headers (e.g., NAL unit headers or slice headers), or SEI messages. Other methods are also available, including, for example, those common for system-level or application-level standards, such as placing the information in one or more of the following: a. SDP (Session Description Protocol), a format for describing multimedia communication sessions for purposes such as session announcements and session invitations, for example as described in the RFC and used in conjunction with RTP (Real-Time Transport Protocol) transmission.

[0127] b. DASH MPD (Media Presentation Description) descriptors, such as those used in DASH and transmitted via HTTP, are associated with a representation or set of representations to provide additional features to the content representation.

[0128] c. RTP header extensions, for example, used during RTP streaming.

[0129] d. ISO basic media file formats, such as those used in OMAF, use boxes, which are object-oriented building blocks defined by unique type identifiers and lengths, and are also called "atoms" in some specifications.

[0130] e. HLS (HTTP Live Stream) manifest, transmitted via HTTP. The manifest can be associated, for example, with a version or set of versions of the content to provide the characteristics of that version or set of versions.

[0131] When the accompanying drawings are presented as flowcharts, it should be understood that they also provide block diagrams of the corresponding devices. Similarly, when the accompanying drawings are presented as block diagrams, it should be understood that they also provide flowcharts of the corresponding methods / processes.

[0132] Some implementations involve rate-distortion optimization. Specifically, during the encoding process, a balance or trade-off between code rate and distortion is typically considered under constraints of computational complexity. Rate-distortion optimization is generally formulated as minimizing a rate-distortion function, which is a weighted sum of code rate and distortion. Different approaches exist for solving the rate-distortion optimization problem. For example, such approaches can be based on extensive testing of all encoding options, including all considered modes or decoding parameter values, and a complete evaluation of their decoding costs and associated distortion of the reconstructed signal after decoding and decoding. Faster methods can also be used to save encoding complexity, particularly based on the computation of approximate distortion based on predicting or predicting the residual signal (rather than the reconstructed signal). A hybrid of these two approaches can also be used, such as by using approximate distortion for only some possible encoding options and full distortion for others. Other methods evaluate only a subset of possible encoding options. More generally, many methods employ any of a variety of techniques to perform optimization, but optimization is not necessarily a complete evaluation of both decoding costs and associated distortion.

[0133] The implementations and aspects described herein can be implemented as, for example, methods or procedures, apparatus, software programs, data streams, or signals. Even if discussed only in the context of a single implementation (e.g., discussed only as a method), implementations of the discussed features can be implemented in other forms (e.g., apparatus or program). Apparatus can be implemented in, for example, suitable hardware, software, and firmware. Methods can be implemented in, for example, a processor, which generally refers to a processing device, including, for example, a computer, microprocessor, integrated circuit, or programmable logic device. Processors also include communication devices, such as, for example, computers, cellular phones, portable / personal digital assistants (“PDAs”), and other devices that facilitate information communication between end users.

[0134] References to “an embodiment,” “an embodiment,” “an implementation,” or “implementation,” as well as other variations, mean that a particular feature, structure, characteristic, etc., described in connection with that embodiment is included in at least one embodiment. Therefore, the phrases “in an embodiment,” “in an embodiment,” “in an implementation,” or “in an implementation,” and any other variations appearing throughout this application, do not necessarily refer to the same embodiment.

[0135] Furthermore, this application may refer to "determining" various information fragments. Determining information may include, for example, one or more of estimated information, calculated information, predicted information, or information retrieved from memory.

[0136] Furthermore, this application may refer to "accessing" various information fragments. Accessing information may include, for example, receiving information, retrieving information (e.g., from memory), storing information, moving information, copying information, calculating information, determining information, predicting information, or estimating information, or one or more of these.

[0137] Furthermore, this application may refer to "receiving" various pieces of information. Like "accessing," receiving is intended to be a broad term. Receiving information may include, for example, accessing information or retrieving information (e.g., from memory) or one or more of it. Moreover, "receiving" is generally referred to in one way or another during operations such as storing information, processing information, transmitting information, moving information, copying information, erasing information, calculating information, determining information, predicting information, or estimating information.

[0138] It should be understood that any use of “ / ”, “and / or”, and “at least one” below (e.g., in the cases of “A / B”, “A and / or B”, and “at least one of A and B”) is intended to include selecting only the first listed option (A), or only the second listed option (B), or both options (A and B). As a further example, in the cases of “A, B, and / or C” and “at least one of A, B, and C”, such wording is intended to include selecting only the first listed option (A), or only the second listed option (B), or only the third listed option (C), or selecting the first and second listed options (A and B), or selecting the first and third listed options (A and C), or selecting the second and third listed options (B and C), or selecting all three options (A, B, and C). As will be apparent to those skilled in the art and related fields, this can be extended with the number of items listed. Furthermore, the terms “any” or “any one” used in this document, followed by a list of multiple items and / or multiple categories of items, are intended to include “any one,” “any combination,” “any multiple,” and / or “any combination of multiple” of items / item categories, individually or in combination with other items and / or other item categories.

[0139] Furthermore, the term "signal" as used herein refers to instructing the corresponding decoder on something, among other things. For example, in some embodiments, the encoder signals one of the following: the intra-frame mode, the position of the last valid DCT coefficient, or a flag indicating whether the CU's encoding result contains a non-zero residual. Thus, in embodiments, the same parameter is used on both the encoder and decoder sides. Therefore, for example, the encoder can transmit (explicit signaling) specific parameters to the decoder so that the decoder can use the same specific parameters. Conversely, if the decoder already has specific parameters as well as other parameters, signaling can be used without transmission (implicit signaling) to simply allow the decoder to know and select specific parameters. Bit savings are achieved in various embodiments by avoiding the transmission of any actual functions. It should be understood that signaling can be accomplished in a variety of ways. For example, in various embodiments, one or more syntax elements, flags, etc., are used to signal information to the corresponding decoder. Although the verb form of the term "signal" has been referred to above, the term "signal" can also be used as a noun herein.

[0140] As will be apparent to those skilled in the art, implementations can generate various signals formatted to carry information, which can be stored or transmitted, for example. The information may include, for example, instructions for performing a method, or data generated by one of the described implementations. For example, the signal may be formatted to carry a bitstream of the described embodiments. Such a signal may be formatted as, for example, electromagnetic waves (e.g., using the radio frequency portion of a spectrum) or baseband signals. Formatting may include, for example, encoding the data stream and modulating a carrier wave with the encoded data stream. The information carried by the signal may be, for example, analog or digital information. The signal may be transmitted via a variety of different wired or wireless links, as known. The signal may be stored on a processor-readable medium.

[0141] This document describes numerous examples. Features of the examples may be provided individually or in any combination across various claim classes and types. Furthermore, examples may include one or more of the features, devices, or aspects described herein, individually or in any combination across various claim classes and types. For example, the features described herein may be implemented in a bitstream or signal including information generated as described herein. This information may allow a decoder to decode the bitstream, an encoder according to any of the described embodiments, a bitstream, and / or a decoder. For example, the features described herein may be implemented by creating and / or transmitting and / or receiving and / or decoding a bitstream or signal. For example, the features described herein may be implemented as a method, process, apparatus, medium storing instructions, medium storing data, or signal. For example, the features described herein may be implemented by a TV, set-top box, cellular phone, tablet computer, or other electronic device performing decoding. The TV, set-top box, cellular phone, tablet computer, or other electronic device may display (e.g., using a monitor, screen, or other type of display) the obtained image (e.g., an image reconstructed from a residual of a video bitstream). The TV, set-top box, cellular phone, tablet computer, or other electronic device may receive a signal including an encoded image and perform decoding.

[0142] Several embodiments have been described above. The features of these embodiments may be provided individually or in any combination across various claim classes and types.

[0143] A decoding method is disclosed, including: Obtain the reconstructed sample block; Selecting the filter size based on the decoded information; and The reconstructed sample block is filtered using a filter of the selected filter size.

[0144] An encoding method is disclosed, including: Obtain the reconstructed sample block; Selecting the filter size based on the decoded information; and The reconstructed sample block is filtered using a filter of the selected filter size.

[0145] In one example, the decoding information includes any one of the block size, prediction mode, and residual information.

[0146] In one example, the residual information includes the position of the last valid discrete cosine transform (DCT) coefficient.

[0147] In one example, residual information includes flags indicating whether residuals are added to the prediction to reconstruct the sample block.

[0148] In one example, the filter is a plus-shaped bilateral filter.

[0149] In one example, the decoding information is the block size, and selecting the filter size based on the decoding information includes: Select the filter of the first size when the block size is below a certain value; and If the block size is higher than the stated value, a filter of a second size is selected, where the second size is greater than the first size.

[0150] In one example, the decoding information is the position of the last valid discrete cosine transform coefficient, and selecting the filter size based on the decoding information includes: Choose the filter of the first size when the last valid DCT coefficient is far from the top left corner; and When the last valid DCT coefficient is located near the top left corner, select the filter of the second size, which is larger than the first size.

[0151] In one example, the decoding information is an intra-frame prediction mode, and selecting the filter size based on the decoding information includes: In either DC intra-prediction mode or planar intra-prediction mode, select the filter of the first size; and In the case of angle intra-frame prediction mode, a filter of the second size is selected, which is larger than the first size.

[0152] In one example, the decoding information is a motion vector, and selecting the filter size based on the decoding information includes: Select a filter of the third size when the magnitude of the motion vector is below a certain value; and If the magnitude of the motion vector is higher than the stated value, a filter of the fourth size is selected, which is greater than the third size.

[0153] In one example, the method includes deactivating the filtering of the reconstructed sample block using a filter of a selected size if the flag indicates that no residual is added to the prediction.

Claims

1. A decoding method, comprising: Obtain the reconstructed sample block; Based on the decoded information, a bilateral filter is selected from a set of bilateral filters that includes at least a first bilateral filter and a second bilateral filter, wherein the first bilateral filter and the second bilateral filter have different sizes; and The reconstructed sample block is filtered using the selected bilateral filter.

2. An encoding method, comprising: Obtain the reconstructed sample block; Based on the decoded information, a bilateral filter is selected from a set of bilateral filters that includes at least a first bilateral filter and a second bilateral filter, wherein the first bilateral filter and the second bilateral filter have different sizes; and The reconstructed sample block is filtered using the selected bilateral filter.

3. The method according to claim 1 or 2, wherein, The decoding information includes any one of the following: block size, prediction mode, motion vector, and residual information.

4. The method according to claim 3, wherein, The residual information includes the position of the last valid discrete cosine transform (DCT) coefficient.

5. The method according to any one of claims 1 to 4, wherein, The set of bilateral filters includes at least two bilateral filters selected from the following: a plus-shaped bilateral filter of size 3, a plus-shaped bilateral filter of size 5, and a plus-shaped bilateral filter of size 7.

6. The method according to any one of claims 1 to 5, wherein, The decoding information is the block size. Based on the decoding information, bilateral filters are selected from the set of bilateral filters, including: When the block size is below a certain value, select the first-sized bilateral filter; and If the block size is higher than the stated value, a second-sized bilateral filter is selected, where the second size is greater than the first size.

7. The method according to any one of claims 1 to 5, wherein, The decoding information is the position of the last valid discrete cosine transform coefficient. Based on the decoding information, bilateral filters are selected from the set of bilateral filters, including: Choose a bilateral filter of the first size if the last valid DCT coefficient is located far from the top left corner; and When the last valid DCT coefficient is located near the top left corner, a second-sized bilateral filter is selected, which is larger than the first size.

8. The method according to any one of claims 1 to 5, wherein, The decoding information is an intra-frame prediction mode. Based on the decoding information, bilateral filters are selected from the bilateral filter set, including: In either DC intra-prediction mode or planar intra-prediction mode, select a bilateral filter of the first size; and In the case of angle intra-frame prediction mode, a bilateral filter of the second size is selected, which is larger than the first size.

9. The method according to any one of claims 1 to 5, wherein, The decoded information is a motion vector. Based on the decoded information, bilateral filters are selected from the set of bilateral filters, including: When the magnitude of the motion vector is below a certain value, a bilateral filter of the third size is selected; and When the magnitude of the motion vector is higher than a certain value, a filter of the fourth size is selected, which is greater than the third size.

10. A decoding apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein, The one or more processors are configured to perform the method according to claim 1.

11. An encoding apparatus comprising one or more processors and at least one memory coupled to said one or more processors, wherein, The one or more processors are configured to perform the method according to claim 2.

12. A computer program comprising program code instructions for implementing the method of claim 1 when executed by a processor.

13. A computer-readable storage medium having stored thereon instructions for implementing the method according to claim 2.

14. A signal comprising a bit stream formed by performing the method according to claim 2.