Method and apparatus for adaptive loop filter

By using spatially adjacent sample points and combined ALF classifiers in video decoding and encoding, the problem of insufficient ALF encoding and decoding in the prior art is solved, and more efficient video data processing and bit rate reduction are achieved.

CN119732044APending Publication Date: 2025-03-28BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380060181.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-08-18
Filing Date
2023-08-17
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the existing video encoding and decoding technology, there is still room for improvement in the encoding and decoding efficiency of the adaptive loop filter (ALF), especially when processing complex video data.

Method used

Filtered sample points are obtained by using spatially adjacent sample points associated with the current sample points during video decoding and encoding. The specific method includes obtaining features based on edges and second ALF classifiers based on bands, combining them into a combined classifier, and adjusting the filter shape according to the bitstream.

Benefits of technology

It improves the encoding and decoding efficiency of ALF in video encoding and decoding, enhances the processing capability of complex video data, reduces the bit rate, and maintains video quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119732044A_ABST
    Figure CN119732044A_ABST
Patent Text Reader

Abstract

Methods, apparatus, and non-transitory computer-readable storage media for video decoding and encoding are provided. In a video decoding method, a decoder may obtain one or more spatially adjacent sample points associated with a current sample point, where the one or more spatially adjacent sample points are from at least one of a predicted sample point or a reconstructed sample point, and where the one or more spatially adjacent sample points are from at least one of the predicted sample point or the reconstructed sample point. The reconstructed sample point is a sample point that precedes / precedes sample point adaptive offset (SAO) filtering. In addition, the decoder may obtain a filtered sample point of the current sample point based on one or more spatially adjacent sample points.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is filed based on and claims priority to U.S. Provisional Application No. 63 / 399,213, filed on August 18, 2022, entitled “Methods and Devices for Adaptive Loop Filter,” the entire text of which is incorporated by reference for all purposes. Technical Field

[0003] The present disclosure relates to video coding and compression, and in particular, but not limited to, methods and apparatus for improving the coding efficiency of an adaptive loop filter (ALF). Background Art

[0004] Various video codec techniques can be used to compress video data. Video coding is performed according to one or more video codec standards. For example, today, some well-known video codec standards include Versatile Video Codec (VVC), High Efficiency Video Codec (HEVC, also known as H.265 or MPEG-H Part 2) and Advanced Video Codec (AVC, also known as H.264 or MPEG-4 Part 10), which are jointly developed by ISO / IEC MPEG and ITU-T VCEG. Open Media Video 1 (AV1) was developed by the Alliance for Open Media (AOM) as a successor to its previous standard VP9. Audio and Video Codec (AVS) (which refers to digital audio and digital video compression standards) is another video compression standard series developed by the Audio and Video Coding Standard Workgroup of China. Most existing video codec standards are based on the well-known hybrid video codec framework, that is, block-based prediction methods (e.g., inter-frame prediction, intra-frame prediction) are used to reduce the redundancy present in video images or sequences, and transform coding is used to compress the energy of prediction errors. An important goal of video coding technology is to compress video data into a form that uses a lower bit rate while avoiding or minimizing video quality degradation.

[0005] The first generation of AVS standards includes the Chinese national standards "Information Technology, Advanced Audio and Video Codec Part 2: Video" (referred to as AVS1) and "Information Technology, Advanced Audio and Video Codec Part 16: Broadcasting and Television Video" (referred to as AVS+). Compared with the MPEG-2 standard, it can provide about 50% bit rate savings at the same perceived quality. The video part of the AVS1 standard was promulgated as a Chinese national standard in February 2006. The second generation of AVS standards includes the Chinese national standard "Information Technology High Efficiency Multimedia Codec" (referred to as AVS2) series, which is mainly aimed at the transmission of additional HD TV programs. The codec efficiency of AVS2 is twice that of AVS+. In May 2016, AVS2 was released as a Chinese national standard. At the same time, the video part of the AVS2 standard was submitted by the Institute of Electrical and Electronics Engineers (IEEE) as an international application standard. The AVS3 standard is a new generation of video codec standards for UHD video applications, aiming to surpass the codec efficiency of the latest international standard HEVC. In March 2019, at the 68th AVS meeting, the AVS3-P2 baseline was completed, which provides about 30% bit rate savings over the HEVC standard. Currently, there is a reference software called High Performance Model (HPM) maintained by the AVS Working Group to demonstrate a reference implementation of the AVS3 standard. Summary of the invention

[0006] This disclosure provides examples of techniques related to improving the encoding and decoding efficiency of ALF.

[0007] According to a first aspect of the present disclosure, a method for video decoding is provided. In the method, a decoder may obtain one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of a predicted sample or a reconstructed sample, and the reconstructed sample is a sample before sample adaptive offset (SAO) filtering. In addition, the decoder may obtain a filtered sample of the current sample based on the one or more spatial neighboring samples.

[0008] According to a second aspect of the present disclosure, a method for video encoding is provided. In the method, an encoder may obtain one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of a predicted sample or a reconstructed sample, and the reconstructed sample is a sample before SAO filtering. In addition, the encoder may obtain a filtered sample of the current sample based on the one or more spatial neighboring samples.

[0009] According to a third aspect of the present disclosure, a method for video decoding is provided. In the method, a decoder may obtain a first feature based on an edge-based first ALF classifier. In addition, the decoder may obtain a second feature based on a band-based second ALF classifier. In addition, the decoder may obtain a combined classifier for online ALF based on the first feature and the second feature.

[0010] According to a fourth aspect of the present disclosure, a method for video encoding is provided. In the method, the encoder may obtain a first feature based on an edge-based first ALF classifier. In addition, the encoder may obtain a second feature based on a band-based second ALF classifier. In addition, the encoder may derive a combined classifier for online ALF based on the first feature and the second feature.

[0011] According to a fifth aspect of the present disclosure, a method for video decoding is provided. In the method, a decoder may obtain a bitstream from an encoder. In addition, the decoder may adjust a chrominance ALF shape associated with the bitstream based on a luma ALF shape associated with the bitstream.

[0012] According to a sixth aspect of the present disclosure, a method for video encoding is provided. In the method, an encoder may signal a syntax element indicating a luma ALF in a bitstream. In addition, the encoder may adjust a chroma ALF shape associated with the bitstream based on the luma ALF shape.

[0013] According to a seventh aspect of the present disclosure, a device for video decoding is provided. The device may include one or more processors and a memory, the memory being coupled to the one or more processors and configured to store instructions executable by the one or more processors. In addition, the one or more processors are configured to execute the method according to the first aspect, the third aspect, or the fifth aspect when executing the instructions.

[0014] According to an eighth aspect of the present disclosure, a device for video encoding is provided. The device may include one or more processors and a memory, the memory being coupled to the one or more processors and configured to store instructions executable by the one or more processors. Further, the one or more processors are configured to execute the method according to the second aspect, the fourth aspect, or the sixth aspect when executing the instructions.

[0015] According to the ninth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which is used to store computer-executable instructions, which, when executed by one or more computer processors, cause one or more computer processors to receive a bit stream and execute a method according to the first aspect, the third aspect or the fifth aspect based on the bit stream.

[0016] According to the tenth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which is used to store computer-executable instructions. When the computer-executable instructions are executed by one or more computer processors, the one or more computer processors execute the method according to the second aspect, the fourth aspect or the sixth aspect to encode a current block into a bit stream and transmit the bit stream.

[0017] According to an eleventh aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing a bit stream to be decoded by the method according to the first aspect, the third aspect or the fifth aspect.

[0018] According to a twelfth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing a bit stream generated by a method according to the second aspect, the fourth aspect or the sixth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] A more specific description of examples of the present disclosure will be presented by reference to specific examples illustrated in the accompanying drawings. Given that these drawings depict only some examples and are therefore not to be considered limiting of scope, these examples will be described and explained in more detail and detail through the use of the accompanying drawings.

[0020] Figure 1A is a block diagram illustrating a system for encoding and decoding video blocks according to some examples of the present disclosure.

[0021] Figure 1B is a block diagram of an encoder according to some examples of the present disclosure.

[0022] Figure 1C to Figure 1F is a block diagram illustrating how a frame may be recursively partitioned into multiple video blocks of different sizes and shapes according to some examples of the present disclosure.

[0023] Figure 1G is a block diagram illustrating an exemplary video encoder according to some examples of the present disclosure.

[0024] Figure 2A is a block diagram of a decoder according to some examples of the present disclosure.

[0025] Figure 2B is a block diagram illustrating an exemplary video decoder according to some examples of the present disclosure.

[0026] Figure 3A is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0027] Figure 3B is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0028] Figure 3C is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0029] Figure 3D is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0030] Figure 3E is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0031] Figure 4A and Figure 4B Two filter shapes supported by luma and chroma components according to some examples of the present disclosure are shown, 7×7 diamond and 5×5 diamond.

[0032] Figure 5 It is shown that only the gradient of each second sample point within the 10×10 window is calculated according to some examples of the present disclosure.

[0033] Fig. 6A A 90 degree rotation applied to filter coefficients according to some examples of the present disclosure is shown.

[0034] Figure 6B Diagonal flipping of filter coefficients as applied according to some examples of the present disclosure is shown.

[0035] Figure 6C Vertical flipping of filter coefficients applied according to some examples of the present disclosure is shown.

[0036] Figure 7 The filter shape of filter F2 according to some examples of the present disclosure is shown, which is applied to R0(x,y), R1(x,y), neighboring samples, and samples before the deblocking filter (DBF) to obtain filtered samples.

[0037] Figure 8 Various filter shapes for extracting information in the prediction signal according to some examples of the present disclosure are shown, including 1×1, 3×3, or 5×5.

[0038] Fig. 9 It is shown that the chroma ALF filter shape is changed to a long cross shape according to some examples of the present disclosure.

[0039] Fig.10 is a diagram illustrating a computing environment coupled with a user interface according to some examples of the present disclosure.

[0040] Fig.11 Various online ALF filter inputs are shown according to some examples of the present disclosure.

[0041] Fig.12 1×1 and 3×3 filter shapes applied to prediction samples of ALF according to some examples of the present disclosure are shown.

[0042] Fig.13 is a flowchart illustrating a method for video decoding according to some examples of the present disclosure.

[0043] Fig.14 is a diagram illustrating some examples according to the present disclosure corresponding to Fig.13 The video decoding method shown is a flowchart of a video encoding method.

[0044] Fig.15 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0045] Fig.16 is a diagram illustrating some examples according to the present disclosure corresponding to Fig.15 The illustrated method is a flow chart of a method for video encoding and a method for video decoding.

[0046] Fig.17 is a flowchart illustrating a method for video decoding according to some examples of the present disclosure.

[0047] Fig.18 is a diagram illustrating some examples according to the present disclosure corresponding to Fig.17 The illustrated method is a flow chart of a method for video encoding and a method for video decoding. DETAILED DESCRIPTION

[0048] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, many non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

[0049] The terms used in this disclosure are only used for the purpose of describing specific embodiments and are not intended to limit the disclosure. The singular forms "a / an", "said" and "the" in this disclosure and the appended claims are also intended to include plural forms, unless otherwise clearly indicated throughout the disclosure. It should also be understood that the term "and / or" used in this disclosure refers to and includes one or any one or all possible combinations of the listed multiple related items.

[0050] References throughout this specification to "one embodiment," "an embodiment," "an example," "some embodiments," "some examples," or similar language mean that the particular features, structures, or characteristics being described are included in at least one embodiment or example. Unless explicitly stated otherwise, features, structures, elements, or characteristics described in conjunction with one or some embodiments are also applicable to other embodiments.

[0051] Throughout this disclosure, the terms "first", "second", "third", etc. are used as nomenclatures and are only used to refer to related elements, such as devices, parts, components, steps, etc., and do not imply any spatial or temporal order unless otherwise explicitly stated. For example, "first device" and "second device" may refer to two separately formed devices, or two parts, components or working states of the same device, and may be named arbitrarily.

[0052] The terms "module", "sub-module", "circuit", "sub-circuit", "circuitry", "sub-circuitry", "unit", or "sub-unit" may include a memory (shared, dedicated, or group) that stores code or instructions that can be executed by one or more processors. A module may include one or more circuits with or without stored code or instructions. A module or circuit may include one or more components that are directly or indirectly connected. These components may or may not be physically attached to or adjacent to each other.

[0053] As used herein, the terms "if" or "when..." may be understood to mean "at" or "in response to" depending on the context. These terms, if they appear in a claim, may not indicate that the associated limitation or feature is conditional or optional. For example, a method may include the following steps: i) when or if condition X exists, perform function or action X', and ii) when or if condition Y exists, perform function or action Y'. The method may have the ability to perform function or action X' and the ability to perform function or action Y' at the same time. Therefore, functions X' and Y' may be performed at different times in multiple executions of the method.

[0054] The unit or module may be implemented in pure software, pure hardware, or a combination of hardware and software. For example, in a pure software implementation, the unit or module may include functionally related code blocks or software components that are linked together directly or indirectly to perform a specific function.

[0055] Figure 1A1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. As shown in FIG1 , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a target device 14. Source device 12 and target device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some embodiments, source device 12 and target device 14 are equipped with wireless communication capabilities.

[0056] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to directly send the encoded video data to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (e.g., a wireless communication protocol) and sent to the target device 14. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network (e.g., a local area network, a wide area network, or a global network such as the Internet). The communication medium may include a router, a switch, a base station, or any other device that may be beneficial to facilitate communication from the source device 12 to the target device 14.

[0057] In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. The encoded video data in the storage device 32 may then be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that may hold the encoded video data generated by the source device 12. The target device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a network server (e.g., for a website), a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive. The target device 14 may access the encoded video data through any standard data connection suitable for accessing the encoded video data stored on the file server, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., a Digital Subscriber Line (DSL), a cable modem, etc.), or a combination of both wireless channels and wired connections. The transmission of the encoded video data from the storage device 32 may be a streaming transmission, a download transmission, or a combination of both streaming and download transmissions.

[0058] like Figure 1A As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in this application may be generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.

[0059] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be sent directly to the target device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device 32 for later access by the target device 14 or other devices for decoding and / or playback. The output interface 22 may further include a modem and / or a transmitter.

[0060] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements may be included within the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.

[0061] In some implementations, the target device 14 may include a display device 34, which may be an integrated display device and an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to a user and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0062] The video encoder 20 and the video decoder 30 can operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, Part 10 of MPEG-4, AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 can be configured to encode the video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 can be configured to decode the video data according to any of these current standards or future standards.

[0063] The video encoder 20 and the video decoder 30 may be implemented as any of a variety of suitable encoder and / or decoder circuits, respectively, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic devices, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and either of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device.

[0064] Like HEVC, VVC is built on a block-based hybrid video codec framework. Figure 1B 1 is a block diagram illustrating a block-based video encoder according to some embodiments of the present disclosure. In the encoder 100, the input video signal is processed block by block (referred to as a coding unit (CU)). The encoder 100 may be as follows: Figure 1A Video encoder 20 shown. In VTM-1.0, a CU can be up to 128×128 pixels. However, unlike HEVC, which partitions blocks based solely on a quadtree, in VVC, a coding tree unit (CTU) is split into multiple CUs to accommodate different local characteristics based on quad / bin / ternary trees. In addition, the concept of multiple partition unit types in HEVC has been removed, that is, there is no longer a division of CU, prediction unit (PU), and transform unit (TU) in VVC; instead, each CU is always used as a basic unit for both prediction and transformation without further partitioning. In a multi-type tree structure, a CTU is first partitioned according to a quadtree structure. Then, each quadtree leaf node can be further partitioned according to a binary tree structure and a ternary tree structure.

[0065] FIG. 3A to FIG. 3E is a schematic diagram illustrating a multi-type tree partitioning mode according to some embodiments of the present disclosure. FIG. 3A to FIG. 3E Five partition types are shown, including quad partition ( Figure 3A ), vertical binary partition ( Figure 3B ), horizontal binary partitioning ( Figure 3C ), vertical trident partition ( Figure 3D ) and horizontal three-pronged partitioning ( Figure 3E ).

[0066] For each given video block, spatial prediction and / or temporal prediction can be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples (called reference samples) of already coded adjacent blocks in the same video picture / slice to predict the current video block. Spatial prediction reduces the spatial redundancy inherent in the video signal. Temporal prediction (also known as "inter-frame prediction" or "motion compensated prediction") uses reconstructed pixels from already coded video pictures to predict the current video block. Temporal prediction reduces the temporal redundancy inherent in the video signal. The temporal prediction signal for a given CU is typically represented by one or more motion vectors (MVs) that indicate the amount and direction of motion between the current CU and its temporal reference. Similarly, if multiple reference pictures are supported, a reference picture index is additionally sent, which is used to identify which reference picture in the reference picture storage the temporal prediction signal comes from.

[0067] After spatial prediction and / or temporal prediction, the intra / inter mode decision circuit 121 in the encoder 100 selects the best prediction mode, for example based on a rate-distortion optimization method. Then, the block prediction value 120 is subtracted from the current video block; and the resulting prediction residual is decorrelated using the transform circuit 102 and the quantization circuit 104. The resulting quantized residual coefficients are dequantized by the dequantization circuit 116, and the quantized residual coefficients are inversely transformed by the inverse transform circuit 118 to form a reconstructed residual, which is then added back to the prediction block to form a reconstructed signal for the CU. Further, before the reconstructed CU is placed in the reference picture storage of the picture buffer 117 and used for encoding and decoding future video blocks, loop filtering 115, such as a deblocking filter, sample adaptive offset (SAO) and / or adaptive loop filter (ALF), can be applied to the reconstructed CU. To form the output video bitstream 114, the coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are sent to the entropy coding unit 106 for further compression and packing to form a bitstream.

[0068] For example, a deblocking filter is available in the current version of VVC as well as AVC and HEVC. In HEVC, an additional loop filter called SAO is defined to further improve the coding efficiency. In the current version of the VVC standard, another loop filter called ALF is being actively studied and is likely to be included in the final standard.

[0069] These loop filter operations are optional. Performing these operations helps improve coding efficiency and visual quality. Encoder 100 can also decide to turn off these operations to save computational complexity.

[0070] It should be noted that if these filter options are turned on by the encoder 100, intra prediction is typically based on unfiltered reconstructed pixels, while inter prediction is based on filtered reconstructed pixels.

[0071] Figure 2A is a block diagram illustrating a block-based video decoder 200 that can be used in conjunction with many video codec standards. The decoder 200 is located at Figure 1B The block-based video decoder 200 may be similar to the reconstruction-related part in the encoder 100. Figure 1A The video decoder 30 shown. In the decoder 200, the incoming video bitstream 201 is first decoded by entropy decoding 202 to obtain quantization coefficient levels and prediction related information. Then, the quantization coefficient levels are processed by inverse quantization 204 and inverse transform 206 to obtain reconstructed prediction residuals. The block prediction value mechanism implemented in the intra / inter mode selector 212 is configured to perform intra prediction 208 or motion compensation 210 based on the decoded prediction information. A set of unfiltered reconstructed pixels is obtained by summing the reconstructed prediction residual from the inverse transform 206 with the prediction output generated by the block prediction value mechanism using an adder 214.

[0072] The reconstructed block may further pass through the loop filter 209 and then be stored in the picture buffer 213 used as a reference picture storage. The reconstructed video in the picture buffer 213 may be sent to drive a display device and used to predict future video blocks. When the loop filter 209 is turned on, a filtering operation is performed on these reconstructed pixels to obtain a final reconstructed video output 222.

[0073] Figure 1G is a block diagram illustrating another exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 can perform intra-frame prediction coding and inter-frame prediction coding on video blocks within a video frame. Intra-frame prediction coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that in the field of video coding and decoding, the term "frame" can be used as a synonym for the term "image" or "picture".

[0074] like Figure 1GAs shown in FIG. 1 , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a segmentation unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63 such as a deblocking filter can be located between the adder 62 and the DPB 64 to filter the block boundary to remove the block effect from the reconstructed video. In addition to the deblocking filter, another loop filter (e.g., a sample adaptive offset (SAO) filter and / or an adaptive loop filter (ALF)) can also be used to filter the output of the adder 62. In some examples, the loop filter can be omitted, and the decoded video block can be directly provided to the DPB 64 by the adder 62. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed among one or more of the illustrated fixed or programmable hardware units.

[0075] Video data memory 40 may store video data to be encoded by components of video encoder 20. Figure 1A The video source 18 shown obtains video data in the video data memory 40. The DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) for use by the video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding the video data. The video data memory 40 and the DPB 64 can be formed by any of a variety of memory devices. In various examples, the video data memory 40 can be on-chip with other components of the video encoder 20, or off-chip relative to those components.

[0076] like Figure 1GAs shown in , after receiving the video data, the segmentation unit 45 within the prediction processing unit 41 segments the video data into video blocks. This segmentation may also include segmenting the video frame into strips, tiles (e.g., a set of video blocks) or other larger coding units (CUs) according to a predefined splitting structure associated with the video data (e.g., a quadtree (QT) structure). A video frame is or can be viewed as a two-dimensional array or matrix of samples having sample values. The samples in the array may also be referred to as pixels or picture elements (pel). 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 video frame. For example, a video frame may be divided into multiple video blocks by using QT segmentation. A video block is again or may be viewed as a two-dimensional array or matrix of samples having sample values, but its dimension is smaller than the dimension of a video frame. The number of samples in the horizontal and vertical directions (or axes) of a video block defines the size of the video block. The video block may be further partitioned into one or more block partitions or sub-blocks (which may again form blocks) by, for example, iteratively using QT partitioning, binary tree (BT) partitioning or ternary tree (TT) partitioning or any combination thereof. It should be noted that the term "block" or "video block" used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU) and / or may be or correspond to a corresponding block (e.g., a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB)) and / or a sub-block.

[0077] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., coding rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements (e.g., motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.

[0078] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block in relation to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block in relation to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, for example, to select an appropriate coding mode for each block of video data.

[0079] In some embodiments, motion estimation unit 42 determines an inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion of a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame associated with a current block being encoded within the current frame. The predetermined pattern may designate a video frame in a sequence as a P frame or a B frame. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC coding in a manner similar to the motion vector determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine a block vector.

[0080] In terms of pixel differences, the prediction block for the video block may be or may correspond to a block or reference block of a reference frame that is considered to closely match the video block to be encoded, and the pixel difference may be determined by the sum of absolute differences (SAD), the sum of squared differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values ​​for sub-integer pixel positions of the reference frames stored in the DPB 64. For example, the video encoder 20 may interpolate values ​​for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 may perform a motion search relative to full pixel positions and fractional pixel positions and output a motion vector with fractional pixel accuracy.

[0081] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction block of a reference frame selected from a first reference frame list (list 0) or a second reference frame list (list 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.

[0082] The motion compensation performed by the motion compensation unit 44 may involve obtaining or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector for the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from the DPB 64, and forward the prediction block to the adder 50. The adder 50 then forms a residual video block of pixel difference values ​​by subtracting the pixel values ​​of the prediction block provided by the motion compensation unit 44 from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include luminance component differences or chrominance component differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying a prediction block, any flag indicating a prediction mode, or any other syntax information described herein. It should be noted that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are described separately for conceptual purposes.

[0083] In some embodiments, the intra BC unit 48 may generate vectors and obtain prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values ​​for the various tested intra prediction modes using rate-distortion analysis, and select an intra prediction mode with the best rate-distortion characteristic among the tested modes as a suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to produce the coded block, as well as the bit rate (i.e., the number of bits) used to produce the coded block. Intra BC unit 48 may calculate ratios based on the distortion and rate for the various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.

[0084] In other examples, intra BC unit 48 may use, in whole or in part, motion estimation unit 42 and motion compensation unit 44 to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identifying the prediction block may include calculating values ​​for sub-integer pixel positions.

[0085] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, the video encoder 20 can form a residual video block by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include both luma component differences and chroma component differences.

[0086] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 can perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 can determine the intra-frame prediction mode for encoding the current block. To this end, the intra-frame prediction processing unit 46 can use various intra-frame prediction modes to encode the current block, for example, during a separate encoding pass, and the intra-frame prediction processing unit 46 (or in some examples, the mode selection unit) can select a suitable intra-frame prediction mode from the tested intra-frame prediction modes to use. The intra-frame prediction processing unit 46 can provide information indicating the intra-frame prediction mode selected for the block to the entropy coding unit 56. The entropy coding unit 56 can encode the information indicating the selected intra-frame prediction mode into the bitstream.

[0087] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform (e.g., a discrete cosine transform (DCT) or a conceptually similar transform).

[0088] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan on the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.

[0089] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream may then be sent to a video bitstream such as a Figure 1A The video decoder 30 shown, or archived as Figure 1A The video frame may be stored in storage device 32 as shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.

[0090] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain to generate a reference block for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0091] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0092] Figure 2B 1 is a block diagram showing another exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above-mentioned operations in combination with the above-mentioned operations. Figure 1G The encoding process is substantially the inverse of the decoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0093] In some examples, units of the video decoder 30 may be assigned to perform embodiments of the present application. In addition, in some examples, embodiments of the present disclosure may be dispersed in one or more of the units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (e.g., the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (e.g., the motion compensation unit 82).

[0094] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. For example, the video data stored in the video data memory 79 may be obtained from the storage device 32, from a local video source (e.g., a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use by the video decoder 30 (e.g., in intra-frame or inter-frame prediction coding mode) when decoding the video data. The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. Figure 2B 92 are depicted as two different components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and the DPB 92 can be provided by the same memory device or separate memory devices. In some examples, the video data memory 79 can be on-chip with other components of the video decoder 30, or off-chip relative to those components.

[0095] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators, and other syntax elements to the prediction processing unit 81.

[0096] When a video frame is encoded as an intra-prediction coded (I) frame or for intra-coded prediction blocks in other types of frames, the intra-prediction unit 84 of the prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the intra-prediction mode transmitted by the signal and reference data from a previously decoded block of the current frame.

[0097] When the video frame is encoded as an inter-frame prediction coding (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vector and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct the reference frame lists, i.e., List 0 and List 1, based on the reference frames stored in the DPB 92 using a default construction technique.

[0098] In some examples, when a video block is encoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.

[0099] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for a video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) for encoding a video block of a video frame, an inter prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, motion vectors for each inter prediction encoded video block of the frame, inter prediction states for each inter prediction encoded video block of the frame, and other information for decoding a video block in the current video frame.

[0100] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as flags, to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video block in the current video frame.

[0101] Motion compensation unit 82 may also perform interpolation using interpolation filters as used by video encoder 20 during encoding of the video blocks to calculate interpolated values ​​for sub-integer pixels of reference blocks. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 based on the received syntax elements and use these interpolation filters to produce the prediction blocks.

[0102] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.

[0103] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (e.g., a deblocking filter, an SAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 1A on a display device 34).

[0104] In the current VVC and AVS3 standards, the motion information of the current coding block is either copied from the spatial or temporal neighboring blocks specified by the merge candidate index, or obtained through explicit signal transmission of motion estimation. The focus of the present disclosure is to improve the accuracy of the affine merge mode motion vector by improving the derivation method of the affine merge candidate block. To facilitate the description of the present disclosure, the existing affine merge mode design in the VVC standard is taken as an example to illustrate the proposed ideas. Please note that although the existing affine mode design in the VVC standard is used as an example throughout the present disclosure, for technicians in the field of modern video coding technology, the proposed technology can also be applied to affine motion prediction modes of different designs or other codec tools with the same or similar design spirit.

[0105] In a typical video encoding and decoding process, a video sequence usually includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other examples, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.

[0106] like Figure 1C As shown in , the video encoder 20 (or more specifically, a segmentation unit in a prediction processing unit of the video encoder 20) generates an encoded representation of a frame by first segmenting the frame into a set of CTUs. A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 1D As shown in , each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding the samples of the coding tree blocks. The syntax elements describe the properties of different types of units of coding pixel blocks and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding the samples of the coding tree block. The coding tree block may be an N×N block of samples.

[0107] To achieve better performance, the video encoder 20 may recursively perform tree partitioning, such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof, on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 1E As depicted in , a 64×64 CTU 400 is first divided into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are respectively divided into four CUs with a block size of 16×16. Two 16×16 CUs 430 and CU 440 are further divided into four CUs with a block size of 8×8. Figure 1F Depicted is a diagram showing Figure 1E The quadtree data structure of the final result of the partitioning process of the CTU 400 depicted in FIG. 4 corresponds to a CU of a corresponding size ranging from 32×32 to 8×8. Figure 1DEach CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of the same size frame, and syntax elements for encoding the samples of the coding blocks. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and syntax structures for encoding the samples of the coding block. It should be noted that Figures 1E to 1F The quadtree partitioning depicted in FIG is for illustrative purposes only, and one CTU can be split into multiple CUs based on quadtree partitioning / ternary tree partitioning / binary tree partitioning to adapt to varying local characteristics. In a multi-type tree structure, one CTU is partitioned according to a quadtree structure, and each quadtree leaf CU can be further partitioned according to a binary and ternary tree structure. Figures 3A to 3E As shown, there are five possible partitioning types for a coding block with width W and height H, namely, quadruple partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.

[0108] In some embodiments, the video encoder 20 may further partition the coding block of the CU into one or more (M×N) PBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter or intra) is applied. The PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate a predicted luma block, a predicted Cb block, and a predicted Cr block for the luma PB, Cb PB, and Cr PB of each PU of the CU.

[0109] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.

[0110] After the video encoder 20 generates the predicted luma block, the predicted Cb block, and the predicted Cr block for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the predicted luma block of the CU from the original luma coding block of the CU, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.

[0111] In addition, if Figure 1E As shown in , the video encoder 20 can use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of the CU into one or more luma transform blocks, Cb transform blocks and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. The TU of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Therefore, each TU of a CU may be associated with a luma transform block, a Cb transform block and a Cr transform block. In some examples, the luma transform block associated with the TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.

[0112] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block for the TU.

[0113] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream including a sequence of bits that form a representation of an encoded frame and associated data, and the bitstream is stored in the storage device 32 or sent to the target device 14.

[0114] After receiving the bitstream generated by the video encoder 20, the video decoder 30 can parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 can reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing video data is generally inverse to the encoding process performed by the video encoder 20. For example, the video decoder 30 can perform an inverse transform on the coefficient block associated with the TU of the current CU to reconstruct the residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding the samples of the prediction block for the PU of the current CU to the corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block for each CU of the frame, the video decoder 30 can reconstruct the frame.

[0115] As mentioned above, video coding mainly uses two modes, namely, intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction) to achieve video compression. It should be noted that IBC can be regarded as intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to coding efficiency than intra-frame prediction because motion vectors are used to predict the current video block based on the reference video block.

[0116] But with the ever-improving video data capture technology and finer video block sizes for retaining details in the video data, the amount of data required to represent the motion vector for the current frame has also increased significantly. One way to overcome this challenge benefits from the fact that not only a group of neighboring CUs in both the spatial domain and the temporal domain have similar video data for prediction purposes, but also the motion vectors between these neighboring CUs are similar. Therefore, the motion information of spatially neighboring CUs and / or temporally co-located CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU by exploring spatial and temporal correlations (which is also called the "motion vector predictor" (MVP) of the current CU).

[0117] Instead of combining as above Figure 1BThe actual motion vector of the current CU determined by the motion estimation unit is encoded into the video bitstream, and the motion vector prediction value of the current CU is subtracted from the actual motion vector of the current CU to generate a motion vector difference (MVD) for the current CU. By doing so, it is not necessary to encode the motion vector determined by the motion estimation unit for each CU of the frame into the video bitstream, and the amount of data used to represent the motion information in the video bitstream can be significantly reduced.

[0118] Similar to the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, both the video encoder 20 and the video decoder 30 need to adopt a set of rules for constructing a motion vector candidate list (also called a "merge list") for the current CU using those potential candidate motion vectors associated with the spatial neighboring CUs and / or temporal co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector prediction value for the current CU. By doing so, the motion vector candidate list itself does not need to be sent from the video encoder 20 to the video decoder 30, and the index of the selected motion vector prediction value within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector prediction value within the motion vector candidate list to encode and decode the current CU.

[0119] ALF in VVC

[0120] Filter shapes, linear filtering, and adaptive truncation

[0121] In VVC, ALF is applied to the output samples of SAO. FIG. 4A to FIG. 4B As shown in Figure 1, the luminance component and chrominance component support two filter shapes: 7×7 diamond and 5×5 diamond. FIG. 4A to FIG. 4B In , each square corresponds to a luma or chroma sample, and the center square corresponds to the current sample to be filtered. The filter coefficients are point symmetric, and each integer filter coefficient is represented with 7-bit decimal precision. In addition, the sum of the coefficients of a filter is equal to 128, which is the 7-bit decimal precision fixed-point representation of 1.0:

[0122]

[0123] Therein, the number of coefficients N is equal to 13 and 7 for filter shapes of 7×7 and 5×5, respectively.

[0124] The value of the filtered sample at coordinate (x,y) It is obtained by applying the coefficient c to the value of the reconstructed sample point R(x,y) i The results are as follows:

[0125]

[0126] Among them, (x+x i ,y+y i ) and (xx i ,yy i ) is related to the i-th coefficient c i The corresponding coordinates of the reconstructed sample points. Due to the constraints in equation (1), equation (2) can be written as:

[0127]

[0128] In VVC, the possibility of intercepting the difference between the adjacent sample value and the current sample to be filtered is added to equation (3), as follows:

[0129]

[0130] in,

[0131] f i =min(b i ,max(-b i ,R(x+x i ,y+y i )-R(x,y)))+

[0132] min(b i ,max(-b i ,R(xx i ,yy i )-R(x,y))) (5)

[0134] b i is the coefficient c i The interception parameters are determined by the interception index d i Decision. i It is derived as follows:

[0135]

[0136] Where BD is the sample bit depth, and d i Can be 0, 1, 2, or 3.

[0137] Luma sub-block level filter adaptation

[0138] In VVC, sub-block level filter adaptation is only applied to the luma component. Each 4×4 luma block is classified based on its directionality and 2D Laplacian activity. First, the sample gradient values ​​in the horizontal, vertical and two diagonal directions are calculated:

[0139] H k,l =|2R(k,l)-R(k-1,l)-R(k+1,l)|,

[0140] V k,l =|2R(k,l)-R(k,l-1)-R(k,l+1)|,

[0141] D0 k,l =|2R(k,l)-R(k-1,l-1)-R(k+1,l+1)|,

[0142] D1 k,l =|2R(k,l)-R(k-1,l+1)-R(k+1,l-1)|. (7)

[0144] Based on the sample point gradient, the sub-block horizontal gradient g h , vertical gradient g v and two diagonal gradients g d0 and g d1 is calculated as

[0145]

[0146] The indices i and j refer to the coordinates of the top left corner sample in the 4×4 luma block. From equation (8), it can be seen that the sum of the gradients of the samples in the 10×10 luma window covering the target 4×4 block is used to classify the block. To reduce complexity, only the gradient of every second sample in the 10×10 window is calculated, as Figure 5 The gradient values ​​of other sample points are set to 0.

[0147] Secondly, to assign the directionality D, the ratio of the maximum to the minimum horizontal and vertical gradients of the sub-block is calculated.

[0148]

[0149] And the ratio of the maximum to minimum diagonal gradients of the two sub-blocks

[0150]

[0151] Compare with a set of thresholds t1 and t2:

[0152] Step 1: If and Then D is set to 0.

[0153] Step 2: If Then the directivity D is calculated in step 3, otherwise it is calculated in step 4.

[0154] Step 3: If Then D is set to 2, otherwise D is set to 1.

[0155] Step 4: If Then D is set to 4, otherwise D is set to 3.

[0156] Each subsequent step in the calculation of D above is performed only if no value was assigned to D in the previous step. Third, the activity value A is calculated as

[0157]

[0158] A is further mapped to the range 0 to 4: Among them, {Q n Finally, each 4×4 luma block is classified into one of the following 25 classes:

[0159]

[0160] Each class can be assigned its own filter.

[0161] Before filtering each 4×4 luma block, a geometric transformation is applied to the filter coefficients, such as a 90 degree rotation, diagonal or vertical flip, e.g. FIG. 6A to FIG. 6C As shown, it depends on the sub-block gradient value, as specified in Table 1.

[0162] Table 1 Geometric transformation based on sub-block gradient values

[0163] Sub-block gradient value Transform <![CDATA[g d1 <g d0 And g h <g v ]]> No transformation <![CDATA[g d1 <g d0 And g v ≤g h ]]> Diagonal Flip <![CDATA[g do ≤g d1 And g h <g v ]]> Flip Vertically <![CDATA[g do ≤g d1 And g v ≤g h ]]> 90 degree rotation

[0164] Coding tree block level filter adaptation

[0165] In addition to luma 4×4 block-level filter adaptation, ALF also supports CTB-level filter adaptation. The luma CTB can use the filter bank calculated for the current stripe, or one of the filter banks calculated for the coded stripe. It can also use one of 16 offline trained filter banks. In each luma CTB, which filter in the selected filter bank should be applied to each 4×4 block is determined by the class C calculated for that block according to equation (12).

[0166] Chroma uses only CTB-level filter adaptation. In one slice, up to 8 filters can be used for chroma components. Each CTB can select one of the filters.

[0167] Syntax Design

[0168] The filter coefficients and truncation index are carried in the ALF APS. The ALF APS can include up to 8 chroma filters and one luma filter bank (with up to 25 filters). Each of the 25 luma classes also includes an index i C. With the same index i C Classes of ALF coefficients share the same filter. By combining different classes, the number of bits required to represent the filter coefficients is reduced. The absolute value of the filter coefficients is represented using an exponential Golomb code of order 0, followed by a sign bit for non-zero coefficients. When truncation is enabled, a truncation index is also signaled using a two-bit fixed-length code for each filter coefficient. The storage required for the ALF coefficients and the truncation index within the APS is a maximum of 3480 bits. The decoder can use up to 8 ALF APSs simultaneously.

[0169] The filter control syntax element includes two types of information. First, the ALF on / off flag is signaled at the sequence, picture, slice, and CTB levels. Chroma ALF can be enabled at the corresponding level only when luma ALF is enabled at the picture and slice level. Second, if ALF is enabled at the picture, slice, and CTB level, the filter usage information is signaled at that level. The referenced ALF APS ID is encoded and decoded at the slice level, or at the picture level if all slices within a picture use the same APS. A maximum of 7 ALF APSs can be referenced for the luma component, while a maximum of 1 ALF APS can be referenced for the chroma component. For the luma CTB, an index is signaled to indicate which ALF APS or offline trained luma filter bank to use. For the chroma CTB, the index indicates which filter in the referenced APS to use.

[0170] Reduce line buffer

[0171] To reduce the storage requirements of ALF, VVC uses line buffer boundary processing. In VVC, the line buffer boundary is located at 4 luma samples and 2 chroma samples above the horizontal CTU boundary. When ALF is applied to samples on one side of the line buffer boundary, the samples on the other side of the line buffer boundary cannot be used.

[0172] ALF in ECM

[0173] Remove ALF Simplification

[0174] ALF gradient subsampling and ALF virtual boundary processing are removed. The block size for classification is reduced from 4×4 to 2×2. The filter size for both luma and chroma (where ALF coefficients are signaled) is increased to 9×9.

[0175] ALF with fixed filter

[0176] To filter the luminance samples, three different classifiers (C0, C1, and C2) and three different filter banks (F0, F1, and F2) are used. Banks F0 and F1 contain fixed filters whose coefficients are trained for classifiers C0 and C1. The filter coefficients in F2 are signaled. i Which filter is used by the classifier C i The class C assigned to this sample point i decided.

[0177] Filtering

[0178] First, two 13×13 diamond fixed filters F0 and F1 are applied to obtain two intermediate samples R0(x, y) and R1(x, y). Then, F2 is applied to R0(x, y), R1(x, y), adjacent samples, and samples before the deblocking filter (DBF) to obtain the filtered samples.

[0179]

[0180] Among them, f i,j is the intercept difference between the adjacent sample point and the current sample point R(x, y), g i YesR i-20 The intercept difference between (x, y) and the current sample point R(x, y), h i,j is the intercept difference between the adjacent sample point before DBF and the current sample point R(x, y). The signal transmission filter coefficient c i , i = 0, ... 24. The filter shape of F2 is as follows Figure 7 shown.

[0181] Classification

[0182] Based on the directionality D i and activities Assign class C to each 2×2 block i :

[0183]

[0184] Among them, M D,i Indicates directionality D i The total number of .

[0185] As with VVC, the 1-D Laplacian operator is used to calculate the horizontal, vertical, and two diagonal gradient values ​​of each sample point. The sum of the sample point gradients within the 4×4 window covering the target 2×2 block is used for classifier C0, and the sum of the sample point gradients within the 12×12 window is used for classifiers C1 and C2. The sum of the horizontal, vertical, and two diagonal gradients is expressed as and Directionality D i is through

[0186]

[0187] The directionality D2 is determined by comparing it with a set of thresholds. In VVC, the directionality D2 is derived using thresholds 2 and 4.5. For D0 and D1, the horizontal / vertical edge strength is first calculated. and diagonal edge strength Threshold Th = [1.25, 1.5, 2, 3, 4.5, 8] is used. If The edge strength is 0; otherwise, is satisfied The largest integer. If The edge strength is 0; otherwise, is satisfied The maximum integer of . When horizontal / vertical edges dominate, D i is obtained using Table 2(a); otherwise, when diagonal edges dominate, D i is obtained using Table 2(b).

[0188] Table 2. and To D i Mapping

[0189]

[0190] To obtain The sum of the vertical and horizontal gradients A i Mapped to the range from 0 to n, where n is equal to 4, and for and Equals 15.

[0191] In ALF_APS, up to 4 luminance filter groups are signaled, each group can have up to 25 filters.

[0192] Alternative 2×2ALF classifier

[0193] The classification in ALF is extended by adding alternative classifiers. For signaled luma filterbanks, a flag is signaled to indicate whether an alternative classifier is applied. No geometric transformation is applied for alternative band classifiers. When applying band-based classifiers, the sum of the sample values ​​of a 2×2 luma block is first calculated. The class index is then calculated as follows,

[0194] class_index = (total * 25) >> (sample bit depth + 2). (16)

[0195] Although ALF has been improved in ECM, its performance still has room for further improvement.

[0196] First, the online ALF filter in ECM takes spatial neighboring pixels, fixed ALF filter results, and spatial neighboring pixels before deblocking filter as input. However, in addition to this information, other information (such as spatial neighboring pixels in the prediction signal, spatial neighboring pixels before SAO) can also be used as input to the online ALF filter equation, which may benefit the codec performance.

[0197] Secondly, in ECM, the online ALF filter adaptively uses an edge-based classifier and a band-based classifier. However, these two classifiers can be further combined to provide other classifiers, which may benefit the codec performance.

[0198] Third, in ECM, the filter shape of the chroma ALF is a diamond, while the filter shape of the luma ALF is a long cross. This non-uniform design may not be optimal from a standardization perspective.

[0199] In the present disclosure, in order to solve the problems pointed out above, methods are provided for further improving existing designs of ALFs. Generally, the main features of the examples provided in the present disclosure are summarized as follows.

[0200] 1. The online ALF filter takes the spatial neighboring pixels in the prediction signal and the spatial neighboring pixels before SAO as additional input.

[0201] 2. Using a classifier combining the features of the edge-based classifier and the features of the band-based classifier as an additional classifier for the online ALF filter.

[0202] 3. Change the filter shape of the chroma ALF from a diamond to a long cross to unify it with the filter shape of the luma ALF.

[0203] It should be noted that the disclosed methods can be applied independently or in combination.

[0204] Predicted and prior SAO information is used as additional ALF input

[0205] According to one or more embodiments of the present disclosure, predicted and pre-SAO information is used as additional ALF equation inputs. Different approaches can be used to achieve this goal.

[0206] In the first approach, it is proposed to take the spatially neighboring pixels in the prediction signal as additional ALF equation inputs. Various filter shapes can be used to extract the information in the prediction signal. For example, the filter shape can be 1×1, 3×3, or 5×5, such as Figure 8 As shown. Various equation forms can be used to extract information in the prediction signal. In one example, the intercepted difference between the surrounding pixels in the prediction signal and the current pixel is used as the ALF equation input. In another example, the intercepted difference between the surrounding pixels in the prediction signal and the co-located pixels in the prediction signal, and the intercepted difference between the co-located pixels in the prediction signal and the current pixel are used as the input of the ALF equation.

[0207] In the second approach, it is proposed to take spatially neighboring pixels in the signal before SAO as input to the additional ALF equation. Various filter shapes can be used to extract information in the signal before SAO. For example, the filter shape can be 1×1, 3×3, or 5×5, such as Figure 8 As shown. Various equation forms can be used to extract information in the pre-SAO signal. In one example, the intercepted differences between the surrounding pixels in the pre-SAO signal and the current pixel are used as inputs to the ALF equation. In another example, the intercepted differences between the surrounding pixels in the pre-SAO signal and the co-located pixels in the pre-SAO signal, and the intercepted differences between the co-located pixels in the pre-SAO signal and the current pixel are used as inputs to the ALF equation.

[0208] In the third method, the information in the prediction and in the signal before SAO are both proposed as inputs to the ALF equation. The utilization methods proposed in the first and second methods can be combined to implement the third method.

[0209] A new classifier that combines the features of edge-based classifiers and band-based classifiers

[0210] According to one or more embodiments of the present disclosure, features of edge-based classifiers and features of band-based classifiers are combined to derive a new classifier for an online ALF filter.Different approaches can be used to achieve this goal.

[0211] In the first method, it is proposed to first calculate the directionality D of the sub-block of the luminance component, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as

[0212] C=B*M D +D (17)

[0213] Where B is the index calculated with reference to the band-based classifier, M DDenotes the total number of directivity D. In one example, for a 2×2 luma block, directivity D is calculated the same way as D2 in ECM, and B is calculated as

[0214] B = (total * 5) >> (sample bit depth + 2) (18)

[0215] In the second method, it is proposed to first calculate the activity value A of the sub-block of the luminance component, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as

[0216] C=B*M A +A (19)

[0217] Where B is the index calculated with reference to the band-based classifier, M A Indicates the total number of activity values ​​A. In one example, for a 2×2 luminance block, the activity value A is calculated in the same way as in ECM. is the same, and B is calculated as

[0218] B = (total * 5) >> (sample bit depth + 2) (20)

[0219] In the third method, it is proposed to first calculate the index of the sub-block of the luminance component with reference to the edge-based classifier, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as

[0220] C=B*M E +E (21)

[0221] where B is the index calculated with reference to the band-based classifier, M E represents the total number of indices calculated with reference to the edge-based classifier, and E is the index calculated with reference to the edge-based classifier. In one example, for a 2×2 luma block, index E is calculated the same way as C2 in ECM, and B is calculated as

[0222] B = (total sum * 2) >> (sample bit depth + 2) (22)

[0223] Adjust the chroma ALF filter shape to be consistent with the luma ALF filter shape

[0224] In a third aspect of the present disclosure, there is provided a method of changing the chroma ALF filter shape from a diamond to a Fig. 9 The long cross shown is consistent with the luminance ALF filter shape.

[0225] Fig.10A computing environment (or computing device) 1610 coupled to a user interface 1660 is shown. The computing environment 1610 may be part of a data processing server. In some embodiments, the computing device 1610 may perform any of the various methods or processes (such as encoding / decoding methods or processes) described above according to various examples of the present disclosure. The computing environment 1610 may include a processor 1620, a memory 1640, and an I / O interface 1650.

[0226] The processor 1620 generally controls the overall operation of the computing environment 1610, such as operations associated with display, data acquisition, data communication, and image processing. The processor 1620 may include one or more processors for executing instructions to perform all or some of the steps in the above method. In addition, the processor 1620 may include one or more modules that facilitate the interaction between the processor 1620 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a GPU, etc.

[0227] The memory 1640 is configured to store various types of data to support the operation of the computing environment 1610. The memory 1640 may include predetermined software 1642. Examples of the above data include instructions for any application or method operating on the computing environment 1610, video data sets, image data, etc. The memory 1640 may be implemented by using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0228] I / O interface 1650 provides an interface between processor 1620 and peripheral interface modules (e.g., keyboard, click wheel, buttons, etc.). Buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. I / O interface 1650 may be coupled to an encoder and a decoder.

[0229] In some embodiments, a non-transitory computer-readable storage medium including, for example, a plurality of programs included in a memory 1640 is also provided, and the plurality of programs can be executed by a processor 1620 in a computing environment 1610 for performing the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, or the like.

[0230] A non-transitory computer-readable storage medium stores a plurality of programs for execution by a computing device having one or more processors, wherein when the plurality of programs are executed by the one or more processors, the computing device executes the above-mentioned motion prediction method.

[0231] In some embodiments, the computing environment 1610 may be implemented using one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), graphics processing units (GPUs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0232] Fig.11 , where the fixed filter output samples are obtained by feeding the reconstructed samples immediately after SAO into the fixed filter trained offline. The online ALF filter may take the reconstructed samples immediately before SAO (i.e., the samples immediately before SAO) as additional input, or the predicted samples as additional input, or both the reconstructed samples immediately before SAO and the predicted samples as additional input. Fig.11 As shown, various inputs of the online ALF filter may include not only the reconstructed samples immediately after the SAO, the fixed filter output samples, and the reconstructed samples before the DBF, but also the reconstructed samples immediately before the SAO and the predicted samples.

[0233] Fig.12 1×1 and 3×3 filter shapes for prediction samples applied to ALF according to some examples of the present disclosure are shown. In some examples, assuming that the prediction samples are used as additional input to the online ALF filter, the filtered samples can be derived as

[0234]

[0235] Among them, R(x, y) represents the current sample point; f i,j represents the intercept difference between the adjacent sample point immediately after SAO and R(x, y); g i represents the intercept difference between the fixed filter output sample and R(x, y); h i,j represents the intercept difference between the adjacent sample point immediately before DBF and R(x, y). i,j is the intercept difference between the adjacent predicted sample and the current sample R(x, y). The filter coefficient c is transmitted by the signal i , i = 0, ... N. Different filter shapes can be used, for example Fig.12 1×1 and 3×3 rhombuses shown.

[0236] When the reconstructed samples immediately before the SAO are used as additional inputs to the online ALF filter, the prediction samples in the above equation can be directly replaced by the reconstructed samples immediately before the SAO.

[0237] Fig.13 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0238] In step 1301, at the decoder side, the processor 1620 may obtain one or more spatial neighboring samples associated with the current sample, wherein the one or more spatial neighboring samples are from at least one of the predicted sample or the reconstructed sample, and the reconstructed sample is a sample before SAO filtering.

[0239] In some examples, such as Fig.11 As shown, in addition to the reconstructed samples immediately after the SAO, the fixed filter output samples, and the reconstructed samples immediately before the DBF, the one or more spatial neighboring samples may further include prediction samples and the reconstructed samples immediately before the SAO.

[0240] In step 1302, at the decoder side, the processor 1620 may obtain a filtered sample of a current sample based on one or more spatial neighboring samples.

[0241] In some examples, in step 1302, processor 1620 may obtain filtered samples based on one or more spatially neighboring samples and one or more filter coefficients, wherein the one or more filter coefficients are associated with different filter shapes. For example, various filter shapes may be used to extract information from a signal before SAO or a predicted signal. The filter shape may be, for example, Figure 8 or Fig.12 1×1, 3×3 or 5×5 as shown.

[0242] In some examples, processor 1620 may obtain a clipped difference based on one or more spatially adjacent sample points and the current sample point, where the clipped difference may be as shown in equation (13) or equation (23) above.

[0243] For example, the clipped difference may include one of the following differences: a clipped difference between one or more surrounding sample points and the current sample point, or a clipped difference between one or more surrounding sample points and a co-located sample point, wherein the one or more surrounding sample points and the co-located sample point are from one or more spatially adjacent sample points.

[0244] In some examples, one or more coefficients may be signaled in a bitstream by an encoder and received by a decoder.

[0245] In some examples, processor 1620 may obtain one or more spatial neighboring samples, including one or more neighboring output samples after SAO filtering, one or more fixed filter output samples, one or more neighboring samples before DBF, predicted samples, and / or reconstructed samples, and then obtain filtered samples based on the one or more spatial neighboring samples obtained above, as shown in equation (23).

[0246] Fig.14 is a diagram illustrating some examples according to the present disclosure corresponding to Fig.13 The illustrated method is a flow chart of a method for video encoding and a method for video decoding.

[0247] In step 1401, at the encoder side, the processor 1620 may obtain one or more spatial neighboring samples associated with the current sample, wherein the one or more spatial neighboring samples are from at least one of the predicted sample or the reconstructed sample, and the reconstructed sample is a sample before SAO filtering.

[0248] In some examples, such as Fig.11 As shown, in addition to the reconstructed samples immediately after the SAO, the fixed filter output samples, and the reconstructed samples immediately before the DBF, the one or more spatial neighboring samples may further include prediction samples and the reconstructed samples immediately before the SAO.

[0249] In step 1302, at the encoder side, the processor 1620 may obtain a filtered sample of a current sample based on one or more spatial neighboring samples.

[0250] In some examples, in step 1302, processor 1620 may obtain filtered samples based on one or more spatially neighboring samples and one or more filter coefficients, wherein the one or more filter coefficients are associated with different filter shapes. For example, various filter shapes may be used to extract information from a signal before SAO or a predicted signal. The filter shape may be, for example, Figure 8 or Fig.12 1×1, 3×3 or 5×5 as shown.

[0251] In some examples, processor 1620 may obtain a clipped difference based on one or more spatially adjacent sample points and the current sample point, where the clipped difference may be as shown in equation (13) or equation (23) above.

[0252] For example, the clipped difference may include one of the following differences: a clipped difference between one or more surrounding sample points and the current sample point, or a clipped difference between one or more surrounding sample points and a co-located sample point, wherein the one or more surrounding sample points and the co-located sample point are from one or more spatially adjacent sample points.

[0253] In some examples, one or more coefficients may be signaled in a bitstream by an encoder and received by a decoder.

[0254] In some examples, processor 1620 may obtain one or more spatial neighboring samples, including one or more neighboring output samples after SAO filtering, one or more fixed filter output samples, one or more neighboring samples before DBF, predicted samples, and / or reconstructed samples, and then obtain filtered samples based on the one or more spatial neighboring samples obtained above, as shown in equation (23).

[0255] Fig.15 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0256] In step 1501 , at the decoder side, the processor 1620 may obtain a first feature based on a first edge-based ALF classifier.

[0257] In step 1502, at the decoder side, the processor 1620 may obtain a second feature based on the band-based first ALF classifier.

[0258] In step 1503 , at the decoder side, the processor 1620 may derive a combined classifier for online ALF based on the first feature and the second feature.

[0259] In some examples, features of the edge-based classifier and features of the band-based classifier are combined to derive a new classifier for the online ALF filter so that features of different aspects retained by different classifiers (e.g., edge-based classifier and band-based classifier) ​​can be maintained. In some examples, the first ALF classifier can be an edge-based classifier and the second ALF classifier can be a band-based classifier, or the first ALF classifier can be a band-based classifier and the second ALF classifier can be an edge-based classifier.

[0260] In some examples, the processor 1620 may obtain a first feature based on a first ALF classifier by calculating the directionality of a sub-block of a luminance component and obtaining the total number of directionality, and obtain a second feature based on a second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating the index of the second ALF classifier. For example, as discussed above, it is proposed to first calculate the directionality D of the sub-block of the luminance component, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as C=B*M D +D, where B is the index calculated with reference to the band-based classifier, M DDenotes the total number of directivities D. In one example, for a 2×2 luma block, directivity D is calculated the same way as D2 in ECM, and B is calculated as B=(total*5)>>(sample bit depth+2).

[0261] In some examples, the processor 1620 may obtain a first feature based on a first ALF classifier by calculating an activity value of a sub-block of a luminance component and obtaining a total number of activity values, and obtain a second feature based on a second ALF classifier by calculating a sum of sample values ​​of the sub-block and calculating an index of a reference second ALF classifier. For example, as discussed above, it is proposed to first calculate an activity value A of a sub-block having a luminance component, then calculate the sum of sample values ​​of the sub-block and map it to an index of a reference band-based classifier, and the class index of the sub-block is calculated as C=B*M A +A, where B is the index calculated by the reference band-based classifier, M A Indicates the total number of activity values ​​A. In one example, for a 2×2 luminance block, the activity value A is calculated in the same way as in ECM. The same, and B is calculated as B = (sum*5)>>(sample bit depth+2).

[0262] In some examples, the processor 1620 may obtain a first feature based on the first ALF classifier by calculating the index of the sub-block of the luminance component with reference to the first ALF classifier and obtaining the total number of indexes, and obtain a second feature based on the second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating the index with reference to the second ALF classifier. For example, as discussed above, it is proposed to first calculate the index of the sub-block of the luminance component with reference to the edge-based classifier, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as C=B*M E +E, where B is the index calculated by the reference band-based classifier, M E represents the total number of indices calculated with reference to the edge-based classifier, and E is the index calculated with reference to the edge-based classifier. In one example, for a 2×2 luma block, index E is calculated the same way as C2 in ECM, and B is calculated as B=(sum*2)>>(sample bit depth+2).

[0263] Fig.16 is a diagram illustrating some examples according to the present disclosure corresponding to Fig.15 The illustrated method is a flow chart of a method for video encoding and a method for video decoding.

[0264] In step 1601 , at the encoder side, the processor 1620 may obtain a first feature based on a first edge-based ALF classifier.

[0265] In step 1602, at the encoder side, the processor 1620 may obtain a second feature based on a band-based first ALF classifier.

[0266] In step 1603 , at the encoder side, the processor 1620 may derive a combined classifier for online ALF based on the first feature and the second feature.

[0267] In some examples, features of the edge-based classifier and features of the band-based classifier are combined to derive a new classifier for the online ALF filter so that features of different aspects retained by different classifiers (e.g., edge-based classifier and band-based classifier) ​​can be maintained. In some examples, the first ALF classifier can be an edge-based classifier and the second ALF classifier can be a band-based classifier, or the first ALF classifier can be a band-based classifier and the second ALF classifier can be an edge-based classifier.

[0268] In some examples, the processor 1620 may obtain a first feature based on a first ALF classifier by calculating the directionality of a sub-block of a luminance component and obtaining the total number of directionality, and obtain a second feature based on a second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating the index of the reference second ALF classifier. For example, as discussed above, it is proposed to first calculate the directionality D of the sub-block of the luminance component, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as C=B*M D +D, where B is the index calculated with reference to the band-based classifier, M D Denotes the total number of directivities D. In one example, for a 2×2 luma block, directivity D is calculated the same way as D2 in ECM, and B is calculated as B=(total*5)>>(sample bit depth+2).

[0269] In some examples, the processor 1620 may obtain a first feature based on a first ALF classifier by calculating an activity value of a sub-block of a luminance component and obtaining a total number of activity values, and obtain a second feature based on a second ALF classifier by calculating a sum of sample values ​​of the sub-block and calculating an index of the second ALF classifier. For example, as discussed above, it is proposed to first calculate an activity value A of a sub-block of a luminance component, then calculate the sum of sample values ​​of the sub-block and map it to an index of a reference band-based classifier, and the class index of the sub-block is calculated as C=B*M A +A, where B is the index calculated by the reference band-based classifier, M A Indicates the total number of activity values ​​A. In one example, for a 2×2 luminance block, the activity value A is calculated in the same way as in ECM. The same, and B is calculated as B = (sum*5)>>(sample bit depth+2).

[0270] In some examples, the processor 1620 may obtain a first feature based on the first ALF classifier by calculating the index of the sub-block of the luminance component with reference to the first ALF classifier and obtaining the total number of indexes, and obtain a second feature based on the second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating the index with reference to the second ALF classifier. For example, as discussed above, it is proposed to first calculate the index of the sub-block of the luminance component with reference to the edge-based classifier, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as C=B*M E +E, where B is the index calculated by the reference band-based classifier, M E represents the total number of indices calculated with reference to the edge-based classifier, and E is the index calculated with reference to the edge-based classifier. In one example, for a 2×2 luma block, index E is calculated the same way as C2 in ECM, and B is calculated as B=(sum*2)>>(sample bit depth+2).

[0271] Fig.17 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0272] In step 1701 , at the decoder side, the processor 1620 may obtain a bitstream from an encoder.

[0273] In step 1702, at the decoder side, the processor 1620 may adjust the chroma ALF shape associated with the bitstream based on the luma ALF shape associated with the bitstream.

[0274] In some examples, at the decoder side, processor 1620 can adjust the chroma ALF shape associated with the bitstream to be consistent with the luma ALF filter shape by changing the chroma ALF shape from a diamond to a long cross, where the luma ALF shape is a long cross, such as Fig. 9 shown.

[0275] Fig.18 is a diagram illustrating some examples according to the present disclosure corresponding to Fig.17 The video decoding method shown is a flowchart of a video encoding method.

[0276] In step 1801 , at the encoder side, the processor 1620 may signal a syntax element indicating a luma ALF in a bitstream.

[0277] In step 1802, at the encoder side, the processor 1620 may adjust the chroma ALF shape associated with the bitstream based on the luma ALF shape.

[0278] In some examples, only one luma filter shape can be enabled in the encoder, and a flag identifying the luma filter shape and transmitted to the bitstream is always set to true. Accordingly, only one chroma filter shape is enabled in the encoder, and it is consistent with the luma filter shape.

[0279] In some examples, at the encoder side, processor 1620 can adjust the chroma ALF shape associated with the bitstream to be consistent with the luma ALF filter shape by changing the chroma ALF shape from a diamond to a long cross, where the luma ALF shape is a long cross, such as Fig. 9 shown.

[0280] In some examples, a device for video encoding and decoding is provided. The device includes a processor 1620 and a memory 1640, the memory is configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Figures 13 to 18 Any of the methods shown in .

[0281] In some examples, a non-transitory computer-readable storage medium is provided, which has instructions stored thereon. When the instructions are executed by the processor 1620, the instructions cause the processor to perform the following steps: Figures 13 to 18 In one example, multiple programs can be executed by processor 1620 in computing environment 1610 to (e.g., from Figure 1G The video encoder 20 in the computing environment 1610 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1620 in the computing environment 1610 to perform the above-mentioned decoding method according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 1620 in the computing environment 1610 to perform the above-mentioned encoding method to encode the video information (e.g., video blocks representing video frames, and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1620 in the computing environment 1610 to (e.g., to Figure 2B Alternatively, a non-transitory computer-readable storage medium may store the bit stream or data stream generated by the encoder (e.g., Figure 1G The video encoder 20 in FIG. 1 generates a video signal for a decoder (eg, Figure 2BA bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.) used by the video decoder 30 in the video decoder 30 when decoding video data. The non-transitory computer-readable storage medium may be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0282] Other examples of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any changes, uses or adaptations of the disclosure made in accordance with its general principles, including deviations from the present disclosure within known or customary practices in the art. It is intended that the specification and examples be considered exemplary only.

[0283] It should be understood that the present disclosure is not limited to the exact examples described above and shown in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A method for video decoding, comprising: Obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of a predicted sample or a reconstructed sample, and wherein the reconstructed sample is a sample before sample adaptive offset (SAO) filtering; and A filtered sample of the current sample is obtained by the decoder based on the one or more spatial neighboring samples.

2. The method of claim 1, further comprising: The filtered samples are obtained by the decoder based on the one or more spatially neighboring samples and one or more filter coefficients, wherein the one or more filter coefficients are associated with different filter shapes.

3. The method of claim 2, further comprising: Obtaining, by the decoder, a clipping difference based on the one or more spatially adjacent sample points and the current sample point; as well as The filtered samples are obtained by the decoder based on the truncated difference and the one or more filter coefficients.

4. The method of claim 3, wherein: The intercept difference includes one of the following differences: The intercepted difference between one or more surrounding sample points and the current sample point; or The intercepted difference between the one or more surrounding sample points and the co-located sample point, wherein the one or more surrounding sample points and the co-located sample point are from the one or more spatially adjacent sample points.

5. The method of claim 2, further comprising: The one or more coefficients signaled by the encoder are obtained by the decoder.

6. The method of claim 1, further comprising: Obtaining, by the decoder, one or more adjacent output samples after the SAO filtering, one or more fixed filter output samples, and one or more adjacent samples before a deblocking filter (DBF); as well as The filtered sample of the current sample is obtained by the decoder based on the one or more spatial neighboring samples including the one or more neighboring output samples after the SAO filtering, the one or more fixed filter output samples, and the one or more neighboring samples before the DBF.

7. A method for video encoding, comprising: Obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of a prediction sample or a reconstructed sample, and wherein the reconstructed sample is a sample before sample adaptive offset (SAO) filtering; and A filtered sample of the current sample is obtained by the encoder based on the one or more spatial neighboring samples.

8. The method of claim 7, further comprising: The filtered samples are obtained by the encoder based on the one or more spatially neighboring samples and one or more filter coefficients, wherein the one or more filter coefficients are associated with different filter shapes.

9. The method of claim 8, further comprising: Obtaining, by the encoder, a clipping difference based on the one or more spatially adjacent sample points and the current sample point; as well as The filtered samples are obtained by the encoder based on the truncated difference and the one or more filter coefficients.

10. The method of claim 9, wherein: The intercept difference includes one of the following differences: The intercepted difference between one or more surrounding sample points and the current sample point; or The intercepted difference between the one or more surrounding sample points and the co-located sample point, wherein the one or more surrounding sample points and the co-located sample point are from the one or more spatially adjacent sample points.

11. The method of claim 8, further comprising: The one or more coefficients are signaled by the encoder.

12. The method of claim 7, further comprising: Obtaining, by the encoder, one or more adjacent output samples after the SAO filtering, one or more fixed filter output samples, and one or more adjacent samples before a deblocking filter (DBF); as well as The filtered sample of the current sample is obtained by the encoder based on the one or more spatial neighboring samples including the one or more neighboring output samples after the SAO filtering, the one or more fixed filter output samples, and the one or more neighboring samples before the DBF.

13. A method for video decoding, comprising: Obtaining, by a decoder, a first feature based on a first adaptive loop filter (ALF) classifier, wherein the first adaptive loop filter classifier is edge-based; obtaining, by the decoder, a second feature based on a second ALF classifier, the second ALF classifier being band-based; as well as A combined classifier for an online adaptive loop filter (ALF) is derived by the decoder based on the first feature and the second feature.

14. The method of claim 13, further comprising: The decoder obtains the first feature based on the first ALF classifier by calculating the directionality of the sub-blocks of the luminance component and obtaining the total number of the directionality; as well as The decoder obtains the second feature based on the second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating an index referring to the second ALF classifier.

15. The method of claim 13, further comprising: The decoder obtains the first feature based on the first ALF classifier by calculating activity values ​​of sub-blocks of a luminance component and obtaining a total number of the activity values; as well as The decoder obtains the second feature based on the second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating an index referring to the second ALF classifier.

16. The method of claim 13, further comprising: The decoder calculates the index of the sub-block of the luminance component by referring to the first ALF classifier and obtains the total number of the indexes to obtain the first feature based on the first ALF classifier; as well as The decoder obtains the second feature based on the second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating an index referring to the second ALF classifier.

17. A method for video encoding, comprising: Obtaining, by an encoder, a first feature based on a first adaptive loop filter (ALF) classifier, wherein the first adaptive loop filter classifier is edge-based; obtaining, by the encoder, a second feature based on a second ALF classifier, the second ALF classifier being band-based; and A combined classifier for an online adaptive loop filter (ALF) is derived by the encoder based on the first feature and the second feature.

18. The method of claim 17, further comprising: The encoder obtains the first feature based on the first ALF classifier by calculating the directionality of the sub-blocks of the luminance component and obtaining the total number of the directionality; as well as The encoder obtains the second feature based on the second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating the index referring to the second ALF classifier.

19. The method of claim 17, further comprising: The encoder obtains the first feature based on the first ALF classifier by calculating activity values ​​of sub-blocks of the luminance component and obtaining the total number of the activity values; as well as The encoder obtains the second feature based on the second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating the index referring to the second ALF classifier.

20. The method of claim 17, further comprising: The encoder calculates the index of the sub-block of the luminance component by referring to the first ALF classifier and obtains the total number of the indexes to obtain the first feature based on the first ALF classifier; as well as The encoder obtains the second feature based on the second ALF classifier by calculating the sum of the sample values ​​of the sub-block and calculating the index referring to the second ALF classifier.

21. A method for video decoding, comprising: The decoder obtains the bitstream from the encoder; as well as A chroma adaptive loop filter (ALF) shape associated with the bitstream is adjusted, by the decoder, based on a luma ALF shape associated with the bitstream.

22. The method of claim 22, further comprising: The chroma ALF shape associated with the bitstream is adjusted by the decoder by changing the chroma ALF shape from a diamond to a long cross, wherein the luma ALF shape is the long cross.

23. A method for video encoding, comprising: A syntax element indicating a luma adaptive loop filter (ALF) is signaled by the encoder in the bitstream; as well as A chroma ALF shape associated with the bitstream is adjusted, by the encoder, based on the luma ALF shape.

24. The method of claim 22, further comprising: The chroma ALF shape associated with the bitstream is adjusted by the encoder by changing the chroma ALF shape from a diamond to a long cross, wherein the luma ALF shape is the long cross.

25. An apparatus for video decoding, comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, The one or more processors are configured to perform the method of any one of claims 1 to 6, 13 to 16, and 21 to 22 when executing the instructions.

26. An apparatus for video encoding, comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, The one or more processors are configured to perform the method of any one of claims 7 to 12, 17 to 20, and 23 to 24 when executing the instructions.

27. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and perform the method of any one of claims 1 to 6, 13 to 16, and 21 to 22 based on the bit stream.

28. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method of any one of claims 7 to 12, 17 to 20, and 23 to 24, to encode the current sample into a bitstream and transmit the bitstream.

29. A non-transitory computer-readable storage medium for storing a bit stream to be decoded by the method of any one of claims 1 to 6, 13 to 16, and 21 to 22.

30. A non-transitory computer-readable storage medium for storing a bitstream generated by the method of any one of claims 7 to 12, 17 to 20, and 23 to 24.