System and method for video encoding and decoding
By applying neural network-based sample point adaptive offset technology in video encoding and decoding, the problem of excessive or under-filtering during the filtering process is solved, and video quality and encoding and decoding efficiency are improved, especially more precise filtering is performed at the edges of high-frequency and low-frequency content.
Patent Information
- Application Number
- CN202210359096.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-04-07
- Filing Date
- 2022-04-06
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-04-06
AI Technical Summary
The existing video encoding and decoding technology has problems of excessive or underfiltering during the filtering process, resulting in the misalignment of the average intensity between the image/block and the original image/block, especially the filtering imbalance between high-frequency image content and low-frequency content, affecting the video quality.
The neural network-based sample point adaptive offset (SAO) technology is used to learn the nonlinear mapping relationship between the original image and the reconstructed image through the neural network, and use the feature extraction capability of the neural network to filter texture details, and apply image-level or block-level offsets in SAO to compensate for the unbalanced filtering intensity.
Improved the filtering effect of video encoding and decoding, enhance the signal representation of smooth areas and surrounding edges, and improve video quality and codec efficiency.
Smart Images

Figure CN114845101B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based upon and claims the benefit of U.S. Provisional Application No. 63 / 171,979, filed on April 7, 2021, the contents of which are incorporated herein by reference in their entirety. Technical Field
[0003] The present application relates to video coding and compression. More particularly, the present application relates to systems and methods for applying neural network-based sample adaptive offset (SAO) to video coding and compression. Background Art
[0004] Various electronic devices (such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, etc.) all support digital video. Electronic devices send and receive or otherwise transmit digital video data via a communication network, and / or store digital video data on a storage device. Due to the limited bandwidth capacity of a communication network and the limited storage resources of a storage device, video codecs can be used to compress video data according to one or more video codec standards before transmitting or storing the video data. For example, video codec standards include Versatile Video Coding (VVC), Joint Exploration Test Model (JEM), High Efficiency Video Codec (HEVC / H.265), Advanced Video Codec (AVC / H.264), Moving Picture Experts Group (MPEG) codecs, etc. Video codecs typically utilize prediction methods (e.g., inter-frame prediction, intra-frame prediction, etc.), which utilize the redundancy inherent in video data. Video codecs are intended to compress video data into a form using a lower bit rate while avoiding or minimizing the degradation of video quality. Summary of the Invention
[0005] Embodiments of the present disclosure provide a method for applying neural network-based sample adaptive offset (SAO) to video encoding and decoding. The method may include classifying, by a video processor, reconstructed samples of a reconstructed block into a set of categories based on a neural network-based loop filter (NNLF). The reconstructed block includes a reconstructed version of a video block from a video frame of a video. The method may also include determining, by the video processor, a set of offsets for the set of categories based on the classification of the reconstructed samples. The method may further include, in response to performing NNLF on the reconstructed block, performing SAO filtering on the NNLF-filtered samples based on the set of offsets by the video processor. NNLF-filtered samples are generated from the reconstructed samples using NNLF.
[0006] Embodiments of the present disclosure also provide a system for applying neural network-based SAO to video encoding and decoding. The system may include a memory and a video processor. The memory may be configured to store at least one video frame of a video. The video frame includes at least one video block. The video processor may be configured to classify reconstructed samples of a reconstructed block into a set of categories based on NNLF. The reconstructed block includes a reconstructed version of the video block. The video processor may also be configured to determine a set of offsets for the set of categories based on the classification of the reconstructed samples. The video processor may also be configured to, in response to performing NNLF on the reconstructed block, perform SAO filtering on the NNLF-filtered samples based on the set of offsets. NNLF-filtered samples are generated from the reconstructed samples using NNLF.
[0007] An embodiment of the present disclosure also provides a non-transitory computer-readable storage medium storing instructions that, when executed by a video processor, cause the video processor to perform a method for applying neural network-based SAO to video encoding and decoding. The method may include classifying reconstructed samples of a reconstructed block into a set of categories based on NNLF. The reconstructed block includes a reconstructed version of a video block from a video frame of a video. The method may also include determining a set of offsets for the set of categories based on the classification of the reconstructed samples. The method may also include, in response to performing NNLF on the reconstructed block, performing SAO filtering on the NNLF-filtered samples based on the set of offsets. NNLF is used to generate NNLF-filtered samples from the reconstructed samples. The method may also include generating a bitstream including offset-related information based on the set of offsets for the set of categories. The bitstream is stored in a non-transitory computer-readable storage medium.
[0008] It is to be understood that both the foregoing general description and the following detailed description are exemplary only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate examples consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0010] Figure 1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks according to some embodiments of the present disclosure.
[0011] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.
[0012] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.
[0013] Figures 4A to 4Eis a graphical representation showing how a frame may be recursively partitioned into multiple video blocks of different sizes and shapes according to some embodiments of the present disclosure.
[0014] Figure 5 A block diagram of an exemplary loop filter including an SAO filter according to some embodiments of the present disclosure is shown.
[0015] Figure 6 is a flowchart of an exemplary method for applying neural network-based SAO to video encoding and decoding according to some embodiments of the present disclosure.
[0016] Figure 7 is a flowchart of another exemplary method for applying neural network-based SAO to video encoding and decoding according to some embodiments of the present disclosure.
[0017] Figure 8A is a graphical representation showing gradient patterns used in SAO according to some examples.
[0018] Figure 8B is a graphical representation illustrating sample edge index categories in SAO edge classification according to some examples.
[0019] Figure 9A is a graphical representation illustrating an exemplary fully connected neural network (FCNN) according to some embodiments of the present disclosure.
[0020] Figure 9B is a graphical representation showing an exemplary FCNN with two hidden layers according to some embodiments of the present disclosure.
[0021] Figure 9C is a graphical representation illustrating an exemplary convolutional neural network (CNN) according to some embodiments of the present disclosure.
[0022] Figure 9D is a graphical representation illustrating the application of spatial filters to an input image in a CNN according to some embodiments of the present disclosure.
[0023] Figure 10A and Figure 10B is a graphical representation illustrating an exemplary residual network (ResNet) according to some embodiments of the present disclosure.
[0024] Figure 11 is a block diagram illustrating a computing environment coupled with a user interface according to some implementations of the present disclosure. DETAILED DESCRIPTION
[0025] Reference will now be made in detail to the specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to facilitate understanding of the subject matter presented herein. However, it will be apparent to those skilled in the art that various alternatives may be used without departing from the scope of the claims, and that the subject matter may be practiced without these specific details. For example, it will be apparent to those skilled in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.
[0026] It should be noted that the terms "first," "second," and the like used in the specification, claims, and drawings of the present disclosure are used to distinguish between objects, and are not used to describe any particular order or sequence. It should be understood that the terms used in this manner are interchangeable under appropriate conditions, such that the embodiments of the present disclosure described herein can be implemented in an order other than the order shown in the drawings or described in the present disclosure.
[0027] Similar to the High Efficiency Video Codec (HEVC) standard, the VVC standard can be built on a block-based hybrid video codec framework. The hybrid video codec framework may include an encoding system for encoding video data on the transmitting side and a decoding system for decoding video data on the receiving side. Each of the encoding system and the decoding system may include an SAO filter. For example, in the current HEVC, VVC, and AVS standards, an SAO filter may be applied to classify reconstructed samples into different categories, and corresponding offsets may be added to the samples of each category to minimize sample distortion. Sample intensity and edge characteristics may be used for sample classification. Therefore, the performance of SAO may depend on how its classification is performed.
[0028] SAO filtering can be a process of modifying reconstructed samples by conditionally adding a corresponding offset value to each reconstructed sample. SAO filtering can be applied after the deblocking filter. The offset value can be determined based on the value in the lookup table sent by the encoder. In some examples, SAO filtering can be performed on a region basis based on the filter type. The filter type can be selected per coding tree block (CTB) using a syntax element (e.g., sao-type-idx). A value of "0" for the sao-type-idx signal indicates that the SAO filter is not applied to the CTB, and values of "1" and "2" for the sao-type-idx signal indicate the use of a band offset filter type and an edge offset filter type, respectively.
[0029] In the band offset mode specified by sao-type-idx=1, the offset value selected depends directly on the sample amplitude. In this mode, the entire sample amplitude range is evenly split into 32 segments called bands, and the sample values belonging to four of these 32 bands (which are continuous within the 32 bands) are modified by adding a transmitted value denoted as the band offset. The band offset can be positive or negative. The reason for using four continuous bands is that in smooth areas where banding artifacts may appear, the sample amplitudes in the CTB tend to be concentrated in only a few bands. In addition, the design choice of using four offsets is unified with the operation of the edge offset mode, which also uses four offset values.
[0030] In the edge offset mode specified by sao-type-idx=2, the syntax element sao-eo-class with a value from 0 to 3 signals whether the horizontal direction, the vertical direction, or one of the two diagonal gradient directions is used for edge offset classification in the CTB. Figure 8A Four gradient patterns are depicted for each sao-eo-class in this pattern. For example, refer to Figure 8A , the sample point marked with "p" indicates the center sample point to be considered. The two sample points marked with "n0" and "n1" specify two adjacent sample points along the horizontal gradient pattern (e.g., sao-eo-class=0) as shown in Figure (a), two adjacent sample points along the vertical gradient pattern (e.g., sao-eo-class=1) as shown in Figure (b), two adjacent sample points along the 135° diagonal gradient pattern (e.g., sao-eo-class=2) as shown in Figure (c), and two adjacent sample points along the 45° gradient pattern (e.g., sao-eo-class=3) as shown in Figure (d).
[0031] Figure 8B The five edge index (EdgeIdx) categories (e.g., 0, 1, 2, 3, 4) into which a sample can be classified are depicted. Each sample in the CTB is classified into one of the five EdgeIdx categories by comparing the sample value "p" at the center sample position with the values "n0" and "n1" of two samples at adjacent positions. This classification can be performed for each sample based on the reconstructed sample value, so that EdgeIdx classification does not require additional signaling. Depending on the EdgeIdx category at the sample position and for each of EdgeIdx categories 1 to 4, an offset value from the transmitted lookup table is added to the sample value. The offset values for categories 1 and 2 are positive, and the offset values for categories 3 and 4 are negative. Therefore, the SAO filter generally has a smoothing effect in edge offset mode.
[0032] Therefore, for SAO types 1 and 2 (e.g., sao-type-idx = 1 or 2), a total of four amplitude offset values are sent to the decoder for each CTB. For SAO type 1 (e.g., sao-type-idx = 1), the sign of the offset value is also encoded and decoded. The offset value and related syntax elements (e.g., sao-type-idx and sao-eo-class) are determined by the encoder using criteria that optimize rate-distortion performance. The SAO parameters can be indicated to be inherited from the left CTB or the upper CTB using a merge flag to make the signaling effective. Therefore, SAO filtering may include a nonlinear filtering operation that allows additional refinement of the reconstructed samples and can enhance signal representation in both smooth areas and surrounding edges.
[0033] Consistent with the present disclosure, NNLF can be applied to the systems and methods disclosed herein for applying neural network-based SAO in video codecs to improve video codecs by learning a nonlinear mapping relationship between the original image and the reconstructed image. This nonlinear mapping relationship can be a function of various factors (such as the current sample intensity value, co-located samples, and neighboring samples within a specific receptive field), which can be different at different filtered sample locations. Therefore, the filtering process for each sample may be higher or lower than the desired intensity. From a global feature perspective, all samples within a picture or block may be over-filtered or under-filtered, resulting in a misalignment of the average intensity between the filtered image / block and the original image / block. From a local feature perspective, samples located at texture edges may be further over-filtered or under-filtered due to the unbalanced filtering intensity between high-frequency image content (e.g., edges) and low-frequency content (e.g., flat areas). Consistent with the present disclosure, the systems and methods disclosed herein can improve NNLF from both a global feature perspective and a local feature perspective, and can also explore other exemplary benefits of neural networks.
[0034] For example, the feature extraction capabilities of neural networks can be utilized in the systems and methods disclosed herein. Specifically, when performing neural network-based filtering, texture details, such as edges, can be extracted from the filtered image. Therefore, neural network-based filtering can be used in classification methods for SAO (such as texture edge classification and / or average intensity classification described below).
[0035] In another example, due to limited resources (such as limited training time, limited training data diversity, and limited neural network capacity), the neural network model may overfit or underfit the training data during the training phase. In addition, during the inference phase, the generalization ability of the trained neural network model may not meet expectations. Therefore, the neural network-based filtering performed at each image level (or block level) may be higher or lower than the desired strength. In the systems and methods disclosed herein, in order to compensate for the unbalanced filtering strength, an image-level (or block-level) offset may be applied in the SAO.
[0036] Figure 1 FIG. 1 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. Figure 1 As shown in FIG, system 10 includes a source device 12 that generates and encodes video data to be later decoded by a destination device 14. Source device 12 and destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smartphones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0037] In some embodiments, target device 14 may receive the encoded video data to be decoded via link 16. Link 16 may include any type of communication medium or device capable of forwarding the encoded video data from source device 12 to target device 14. In one example, link 16 may include a communication medium that enables source device 12 to send the encoded video data directly to target device 14 in real time. The encoded video data may be modulated according to a communication standard (such as a wireless communication protocol) and sent to 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 part 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 useful in facilitating communication from source device 12 to target device 14.
[0038] In some other embodiments, the encoded video data may be sent from output interface 22 to storage device 32. The encoded video data in storage device 32 may then be accessed by target device 14 via input interface 28. Storage device 32 may include any of a variety of distributed or locally accessible 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), flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, storage device 32 may correspond to a file server or another intermediate storage device that can store the encoded video data generated by source device 12. Target device 14 may access the stored video data from storage device 32 via streaming or downloading. A file server may be any type of computer capable of storing encoded video data and sending the encoded video data to target device 14. Exemplary file servers include a web server (e.g., for a website), a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive. Target device 14 may access the encoded video data via any standard data connection suitable for accessing encoded video data stored on a 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 any combination thereof. The transmission of the encoded video data from storage device 32 may be a streaming transmission, a download transmission, or a combination of both streaming and download transmissions.
[0039] like Figure 1 As shown in , source device 12 includes a video source 18, a video encoder 20, and an output interface 22. Video source 18 may include a source such as a video capture device (e.g., a video camera), a video archive containing previously captured video, a video feed interface for receiving video data from a video content provider, and / or a computer graphics system for generating computer graphics data as source video, or a combination of such sources. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may include camera phones or video phones. However, the embodiments described in the present disclosure may be generally applicable to video encoding / decoding and may be applied to wireless and / or wired applications.
[0040] Captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be sent directly to target device 14 via output interface 22 of source device 12. The encoded video data may also (or alternatively) be stored on storage device 32 for later access by target device 14 or other devices for decoding and / or playback. Output interface 22 may further include a modem and / or a transmitter.
[0041] Target device 14 includes an input interface 28, a video decoder 30, and a 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 communicated 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 transmitted over a communication medium, stored on a storage medium, or stored on a file server.
[0042] In some implementations, target device 14 may include a display device 34, which may be an integrated display device or an external display device configured to communicate with target device 14. 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.
[0043] The video encoder 20 and the video decoder 30 may operate according to proprietary standards or industry standards (e.g., VVC, HEVC, MPEG-4, Part 10, AVC), or extensions of such standards. It should be understood that the present disclosure is not limited to a particular video encoding / decoding standard and may be applicable to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 may be configured to decode video data according to any of these current or future standards.
[0044] 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, software, hardware, firmware, or any combination thereof. When implemented partially 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 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 encoder or decoder may be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.
[0045] Figure 2is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described herein. Video encoder 20 can perform intra-frame prediction and inter-frame prediction coding of 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 the term "frame" is used as a synonym for the term "image" or "picture" in the field of video coding and decoding.
[0046] like Figure 2 As shown in FIG, video encoder 20 includes video data memory 40, prediction processing unit 41, decoded picture buffer (DPB) 64, adder 50, transform processing unit 52, quantization unit 54, and entropy coding unit 56. Prediction processing unit 41 further includes motion estimation unit 42, motion compensation unit 44, segmentation unit 45, intra-prediction processing unit 46, and intra-block copy (BC) unit 48. In some embodiments, video encoder 20 also includes an inverse quantization unit 58 for video block reconstruction, an inverse transform processing unit 60, and adder 62. A loop filter 63 (such as a deblocking filter) may be located between adder 62 and DPB 64 to filter block boundaries to remove blocking artifacts from the reconstructed video data. In addition to the deblocking filter, another loop filter (such as an SAO filter and / or an adaptive loop filter (ALF)) may be used to filter the output of adder 62. In some examples, the loop filter may be omitted, and the decoded video blocks may be provided directly to DPB 64 by 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.
[0047] Video data memory 40 may store video data to be encoded by components of video encoder 20. The video data in video data memory 40 may be obtained, for example, from video source 18, such as Figure 1 As shown. DPB 64 is a buffer that stores reference video data (e.g., reference frames or reference pictures) for use by video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding video data. Video data memory 40 and DPB 64 can be formed by any of a variety of memory devices. In various examples, video data memory 40 can be on-chip with other components of video encoder 20, or off-chip relative to those components.
[0048] like Figure 2As shown in FIG, 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 slices, tiles (e.g., a collection of video blocks), or other larger coding units (CUs) according to a predefined splitting structure associated with the video data, such as a quadtree (QT) structure. A video frame is or can be considered to be a two-dimensional array or matrix of samples having sample values. The samples in the array may also be referred to as pixels or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the video frame. A video frame can be divided into multiple video blocks, for example, using QT segmentation. Although video blocks have smaller dimensions than video frames, video blocks are also or can be considered to be a two-dimensional array or matrix of samples having sample values. The number of samples in the horizontal and vertical directions (or axes) of a video block defines the size of the video block. A video block can be further segmented into one or more block partitions or sub-blocks (which may again form blocks), for example, by iteratively using QT segmentation, binary tree (BT) segmentation, ternary tree (TT) segmentation, or any combination thereof. It should be noted that the term "block" or "video block" as 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, such as a coding tree block (CTB), a coding block (CB), a prediction block (PB), or a transform block (TB). Alternatively or additionally, a block or video block may be or correspond to a subblock of a CTB, CB, PB, TB, etc.
[0049] Prediction processing unit 41 may select one of a plurality of possible prediction coding modes for the current video block, such as one of one or more inter-prediction coding modes from a plurality of intra-prediction coding modes, based on the error results (e.g., coding rate and distortion level). Prediction processing unit 41 may provide the resulting intra-prediction coding block or inter-prediction coding block (e.g., prediction block) to adder 50 to generate a residual block and to adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. Prediction processing unit 41 also provides syntax elements (such as motion vectors, intra-mode indicators, partition information, and other such syntax information) to entropy coding unit 56.
[0050] 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 with respect 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 with respect 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.
[0051] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for the current video frame by generating a motion vector according to a predetermined pattern within the sequence of video frames. The motion vector indicates 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 may be a process that generates motion vectors that estimate motion for a video block. For example, a motion vector may indicate the displacement of a video block within the current video frame or picture relative to a prediction block within a reference frame. The predetermined pattern may designate the video frames in the sequence as P-frames or B-frames. Intra BC unit 48 may determine vectors (e.g., block vectors) for intra BC coding in a manner similar to the motion vectors determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine the block vectors.
[0052] In terms of pixel differences, the prediction block for a 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 differences may be determined by sum of absolute differences (SAD), sum of squared differences (SSD), or other difference metrics. In some embodiments, video encoder 20 may calculate values for sub-integer pixel positions of a reference frame stored in DPB 64. For example, video encoder 20 may interpolate values for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, 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 precision.
[0053] 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.
[0054] Motion compensation performed by motion compensation unit 44 may involve extracting or generating a prediction block based on the motion vector determined by motion estimation unit 42. Upon receiving the motion vector for the current video block, 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 DPB 64, and forward the prediction block to adder 50. Adder 50 then forms a residual block of pixel difference values by subtracting the pixel values of the prediction block provided by motion compensation unit 44 from the pixel values of the current video block being encoded. The pixel difference values forming the residual block may include a luma difference component or a chroma difference component, or both. Motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by 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 the prediction block, any flags indicating a prediction mode, or any other syntax information described herein. It should be noted that motion estimation unit 42 and motion compensation unit 44 may be integrated together, which is not described in detail for conceptual purposes. Figure 2 Described separately.
[0055] In some embodiments, intra BC unit 48 may generate vectors and extract prediction blocks in a manner similar to that described above in conjunction with motion estimation unit 42 and 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, intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test their performance using rate-distortion analysis. Intra BC unit 48 may then select an appropriate intra prediction mode to use from among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, intra BC unit 48 may calculate rate-distortion values for the various tested intra prediction modes using rate-distortion analysis and select the intra prediction mode with the best rate-distortion characteristics among the tested modes as the appropriate intra prediction mode to use. Rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original, uncoded block that was coded 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 from the distortion and rate for various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
[0056] 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 identification of the prediction block may include calculating values for sub-integer pixel positions.
[0057] 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, video encoder 20 can form pixel difference values by subtracting the pixel values of the prediction block from the pixel values of the current video block being encoded, thereby forming a residual block. The pixel difference values forming the residual block may include both luma component differences and chroma component differences.
[0058] As an alternative to the inter-frame prediction performed by motion estimation unit 42 and motion compensation unit 44 or the intra-frame block copy prediction performed by intra BC unit 48 as described above, intra-frame prediction processing unit 46 may perform intra-frame prediction on the current video block. Specifically, intra-frame prediction processing unit 46 may determine an intra-frame prediction mode to use for encoding the current block. For example, intra-frame prediction processing unit 46 may use various intra-frame prediction modes to encode the current block, such as during separate encoding passes, and intra-frame prediction processing unit 46 (or in some examples, mode selection unit) may select an appropriate intra-frame prediction mode to use from the tested intra-frame prediction modes. Intra-frame prediction processing unit 46 may provide information indicating the intra-frame prediction mode selected for the block to entropy encoding unit 56. Entropy encoding unit 56 may encode the information indicating the selected intra-frame prediction mode into the bitstream.
[0059] 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 transform coefficients using a transform, such as a discrete cosine transform (DCT) or a conceptually similar transform.
[0060] 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 of the matrix comprising the quantized transform coefficients. Optionally, entropy encoding unit 56 may perform the scan.
[0061] After quantization, entropy coding unit 56 may entropy encode the quantized transform coefficients into a video bitstream using an entropy coding technique, such as 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 video stream. Figure 1 The video decoder 30 shown, or archived as Figure 1 Storage device 32 is shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode the motion vectors and other syntax elements for the current video frame being encoded using entropy encoding techniques.
[0062] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct a residual block in the pixel domain for use in generating a reference block for predicting other video blocks. A reconstructed residual block may thereby be generated. 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.
[0063] Adder 62 adds the reconstructed residual block to the motion compensated prediction block produced by motion compensation unit 44 to produce 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.
[0064] Figure 3 3 is a block diagram illustrating an 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 2 The encoding process is essentially 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.
[0065] In some examples, units of video decoder 30 may be tasked with performing embodiments of the present disclosure. Furthermore, in some examples, embodiments of the present disclosure may be dispersed across one or more of the multiple units of video decoder 30. For example, intra BC unit 85 may perform embodiments of the present disclosure alone or in combination with other units of video decoder 30, such as motion compensation unit 82, intra prediction unit 84, and entropy decoding unit 80. In some examples, video decoder 30 may not include intra BC unit 85, and the functionality of intra BC unit 85 may be performed by other components of prediction processing unit 81, such as motion compensation unit 82.
[0066] 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. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source (such as 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 the 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 modes) when decoding the video data. The video data memory 79 and the DPB 92 may be formed from 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 stored in a plurality of memory devices. Figure 3 92 as two distinct components of video decoder 30. However, it will be apparent to those skilled in the art that video data memory 79 and DPB 92 may be provided by the same memory device or by separate memory devices. In some examples, video data memory 79 may be on-chip with the other components of video decoder 30, or off-chip relative to those components.
[0067] During the decoding process, video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. Video decoder 30 may receive syntax elements at the video frame level and / or the video block level. Entropy decoding unit 80 of video decoder 30 may entropy decode the bitstream using entropy decoding techniques to obtain quantized coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. Entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators and other syntax elements to prediction processing unit 81.
[0068] When a video frame is encoded as an intra-prediction coded (e.g., I) frame or for intra-coded prediction blocks in other types of frames, intra-prediction unit 84 of prediction processing unit 81 may generate prediction data for a video block of the current video frame based on a signaled intra-prediction mode and reference data from previously decoded blocks of the current frame.
[0069] When the video frame is encoded as an inter-frame prediction coded (i.e., B or P) frame, motion compensation unit 82 of prediction processing unit 81 generates one or more prediction blocks for a video block of the current video frame based on the motion vectors and other syntax elements received from entropy decoding unit 80. Each of the prediction blocks may be generated from a reference frame within one of the reference frame lists. Video decoder 30 may construct reference frame lists, such as List 0 and List 1, based on the reference frames stored in DPB 92 using a default construction technique.
[0070] In some examples, when the 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 processed by video encoder 20 as the current video block.
[0071] Motion compensation unit 82 and / or intra BC unit 85 determine prediction information for a video block of the current video frame by parsing the motion vectors and other syntax elements, and then uses the prediction information to generate a prediction block for the current video block being decoded. For example, motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) used to encode the video block of the video frame, the inter-prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, the motion vector for each inter-prediction-encoded video block of the frame, the inter-prediction state for each inter-prediction-encoded video block of the frame, and other information used to decode the video block in the current video frame.
[0072] Similarly, 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 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 video blocks in the current video frame.
[0073] Motion compensation unit 82 may also perform interpolation to calculate interpolated values for sub-integer pixels of a reference block using interpolation filters, as used during encoding of the video block by video encoder 20. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from received syntax elements and use these interpolation filters to produce the prediction block.
[0074] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 80, using the same quantization parameters, which determine the degree of quantization, calculated for each video block in the video frame by video encoder 20. 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.
[0075] 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. The decoded video block may also be referred to as a reconstructed block for the current video block. A loop filter 91 (such as 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 block in a given frame is 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 1 on the display device 34).
[0076] In a typical video codec (e.g., including video encoding and decoding), a video sequence typically consists of 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 cases, a frame may be monochrome and therefore consist of only a two-dimensional array of luma samples.
[0077] like Figure 4AAs shown in , the video encoder 20 (or more specifically, the segmentation unit 45) 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 arranged consecutively 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 of one of 128×128, 64×64, 32×32, and 16×16. However, it should be noted that the CTUs in the present disclosure are not necessarily limited to a specific size. As Figure 4B 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 sample block.
[0078] 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 4C As depicted in FIG, a 64×64 CTU 400 is first divided into four smaller CUs, each having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four CUs with a block size of 16×16. The two 16×16 CUs 430 and CU 440 are each further divided into four CUs with a block size of 8×8. Figure 4D Depicted is a diagram showing Figure 4C The quadtree data structure is the final result of the partitioning process of the CTU 400 depicted in FIG. , with each leaf node of the quadtree corresponding to a CU of various sizes ranging from 32×32 to 8×8. Figure 4B Each 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 Figure 4C and Figure 4DThe quadtree partitioning depicted in FIG is for illustrative purposes only, and a CTU can be split into CUs based on quadtree / ternary tree / binary tree partitioning to adapt to varying local characteristics. In the multi-type tree structure, a CTU is partitioned by a quadtree structure, and each quadtree leaf CU can be further partitioned according to a binary and ternary tree structure. Figure 4E As shown, there are five possible partition 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.
[0079] In some embodiments, the video encoder 20 may further partition the coding block of the CU into one or more M×NPBs. A PB may include a rectangular (square or non-square) block of samples 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, the 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.
[0080] 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 the 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.
[0081] 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, such 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, such 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.
[0082] In addition, if Figure 4CAs shown in , the video encoder 20 may use quadtree partitioning to decompose the luma residual block, Cb residual block, and Cr residual block of a CU into one or more luma transform blocks, Cb transform blocks, and Cr transform blocks, respectively. A transform block may include a rectangular (square or non-square) block of samples to which the same transform is applied. A 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 a 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.
[0083] Video encoder 20 may apply one or more transforms to the luma transform block of a TU to generate a luma coefficient block for the TU. A coefficient block may be a two-dimensional array of transform coefficients. A transform coefficient may be a scalar. Video encoder 20 may apply one or more transforms to the Cb transform block of a TU to generate a Cb coefficient block for the TU. Video encoder 20 may apply one or more transforms to the Cr transform block of a TU to generate a Cr coefficient block for the TU.
[0084] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), video encoder 20 may quantize the coefficient block. Quantization generally refers to the process by which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After video encoder 20 quantizes the coefficient block, video encoder 20 may apply entropy coding techniques to entropy encode syntax elements indicating the quantized transform coefficients. For example, video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, video encoder 20 may output a bitstream comprising a sequence of bits forming a representation of an encoded frame and associated data, which is stored in storage device 32 or sent to target device 14.
[0085] After receiving the bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally the inverse of the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform an inverse transform on the coefficient blocks associated with the TUs of the current CU to reconstruct the residual blocks associated with the TUs of the current CU. The video decoder 30 also reconstructs the coding blocks of the current CU by adding samples of the prediction blocks for the PUs of the current CU to corresponding samples of the transform blocks of the TUs of the current CU. After reconstructing the coding blocks for each CU of the frame, the video decoder 30 may reconstruct the frame.
[0086] As mentioned above, video coding primarily uses two modes: intra-frame prediction (or intra prediction) and inter-frame prediction (or inter prediction) to achieve video compression. It should be noted that intra block copying (IBC) can be considered intra prediction or a third mode. Between the two modes, inter prediction contributes more to coding efficiency than intra prediction because it uses motion vectors to predict the current video block from a reference video block.
[0087] But with ever-improving video data capture technologies and finer video block sizes for preserving details in 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 is to benefit from the fact that not only a set of neighboring CUs in both the spatial and temporal domains have similar video data for prediction purposes, but also the motion vectors between these neighboring CUs are similar. Therefore, it is possible to use the motion information of spatially neighboring CUs and / or temporally co-located CUs as an approximation of the motion information (e.g., motion vector) of the current CU by exploiting their spatial and temporal correlations, which is also referred to as the "motion vector predictor" (MVP) of the current CU.
[0088] Instead of encoding the actual motion vector of the current CU into the video bitstream (e.g., as described above in conjunction with Figure 2 The actual motion vector determined by motion estimation unit 42 as described above is subtracted from the current CU's motion vector predictor to produce a motion vector difference (MVD) for the current CU. By doing so, the motion vector determined by motion estimation unit 42 for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent motion information in the video bitstream can be significantly reduced.
[0089] 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 can 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 spatially neighboring CUs and / or temporally co-located CUs of the current CU, and then selecting one member from the motion vector candidate list as the motion vector predictor 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 predictor within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor within the motion vector candidate list to encode and decode the current CU. Therefore, only the index of the selected motion vector predictor needs to be sent from the video encoder 20 to the video decoder 30.
[0090] Figure 5 FIG. 5 is a block diagram illustrating an exemplary loop filter 500 including an SAO filter according to some embodiments of the present disclosure. The loop filter 500 may be Figure 2 The loop filter 63 in the video encoder 20 or Figure 3 The loop filter 500 may be configured to process the video decoder 30 of FIG. Figure 2 Adder 62 or Figure 3 The reconstructed block is output from the adder 90 of FIG. The reconstructed block may be a reconstructed version of a video block from a video frame. For example, the reconstructed block may be a reconstructed version of a current video block encoded by the video encoder 20. The loop filter 500 may include one or more of a deblocking filter 502, an SAO filter 504, and an adaptive loop filter 506.
[0091] The deblocking filter 502 may be a video filter applied to a reconstructed block to improve visual quality and prediction performance by smoothing sharp edges formed at the boundaries of the reconstructed block. For example, the deblocking filter 502 may be configured to modify samples of the reconstructed block located at the block boundaries to reduce blocking artifacts generated by block-based coding.
[0092] The SAO filter 504 may be configured to modify the samples of the reconstructed block by conditionally adding an offset value to each sample of the reconstructed block. The SAO filter 504 is further described below with reference to the SAO application module 508.
[0093] The adaptive loop filter 506 is adaptive in the sense that the filter coefficients are signaled in the bitstream and can be designed based on the image content and distortion of the reconstructed block. The adaptive loop filter 506 can be applied to reduce distortion introduced by the encoding process and improve the quality of the reconstructed block. The adaptive loop filter 506 can include at least one of a luma adaptive loop filter, a Cb component chroma adaptive loop filter, a Cr component chroma adaptive loop filter, or a cross-component adaptive loop filter.
[0094] The loop filter 500 may further include an SAO application module 508 configured to apply a neural network-based SAO to the video codec. For example, the SAO application module 508 may perform a NNLF process on a video frame at a block level. This NNLF process may include any type of neural network structure, and the video frame may include one or more reconstructed blocks. By applying the NNLF process, reconstructed samples from the video frame may be converted into NNLF-filtered samples (in some cases, NNLF filtering may be disabled for some of the reconstructed samples using an NNLF on / off flag). After performing the NNLF process, the SAO application module 508 may perform a neural network (NN)-based SAO process on the NNLF-filtered samples to generate SAO-filtered samples.
[0095] As described in more detail below, the SAO application module 508 can be configured to: (1) classify reconstructed samples of the reconstructed block into a set of categories based on the NNLF; (2) determine a set of offsets for the set of categories based on the classification of the reconstructed samples; and (3) in response to performing NNLF on the reconstructed samples, perform SAO filtering on the NNLF-filtered samples based on the set of offsets using the SAO filter 504. NNLF-filtered samples are generated from the reconstructed samples using the NNLF.
[0096] Specifically, the SAO application module 508 may be configured to: (1) perform texture edge classification on the reconstructed samples to classify the reconstructed samples into a set of texture edge categories; (2) determine a set of texture edge offsets for the set of texture edge categories based on the texture edge classification of the reconstructed samples; and (3) in response to performing NNLF on the reconstructed samples, apply the set of texture edge offsets to the NNLF-filtered samples based on the texture edge classification of the reconstructed samples using the SAO filter 504. NNLF-filtered samples are generated from the reconstructed samples using NNLF. Alternatively or additionally, the SAO application module 508 may be configured to: (1) perform average intensity classification on the reconstructed samples to classify the reconstructed samples into a set of average intensity categories; (2) determine a set of average intensity offsets for the set of average intensity categories based on the average intensity classification of the reconstructed samples; and (3) in response to performing NNLF on the reconstructed samples, apply the set of average intensity offsets to the NNLF-filtered samples based on the average intensity classification of the reconstructed samples using the SAO filter 504, wherein the NNLF-filtered samples are generated from the reconstructed samples using NNLF.
[0097] With respect to texture edge classification, the sample difference before NNLF and after NNLF can be used to classify edge samples or non-edge samples. Initially, the SAO application module 508 can be configured to perform NNLF on the reconstructed samples to produce NNLF-filtered samples. NNLF can be performed at any granularity level, such as block level or picture level. Then, for each reconstructed sample, the SAO application module 508 can determine the sample difference between the reconstructed sample and the corresponding NNLF-filtered sample (e.g., sample difference = reconstructed sample - corresponding NNLF-filtered sample). The SAO application module 508 can classify the reconstructed samples into corresponding texture edge categories based on the category threshold and the sample difference, as described in more detail below.
[0098] In some embodiments, a set of texture edge classes may include texture edge samples of a first class ("class 1"), texture edge samples of a second class ("class 2"), and texture edge samples of a third class ("class 3"). The class threshold may have a threshold value T, where T>0. For each reconstructed sample classified as a texture edge sample of the first class, the absolute value of the sample difference between the reconstructed sample and the corresponding filtered sample may be less than a positive threshold value (e.g., T). For each reconstructed sample classified as a texture edge sample of the second class, the sample difference between the reconstructed sample and the corresponding filtered sample may be equal to or greater than the positive threshold value (e.g., T). For each reconstructed sample classified as a texture edge sample of the third class, the sample difference between the reconstructed sample and the corresponding filtered sample may be equal to or greater than a negative threshold value (e.g., -T). It is contemplated that a set of texture edge classes may include any number of classes, such as two or more classes, which is not limited herein.
[0099] For example, for each reconstructed sample, if the absolute value of the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is less than T, the SAO application module 508 may classify the reconstructed sample as a first category of texture edge sample. Alternatively, if the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is equal to or greater than T, the SAO application module 508 may classify the reconstructed sample as a second category of texture edge sample. Alternatively, if the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is equal to or less than -T, the SAO application module 508 may classify the reconstructed sample as a third category of texture edge sample.
[0100] Next, the SAO application module 508 may determine a set of texture edge offsets for a set of texture edge categories based on the texture edge classification of the reconstructed samples. Specifically, for each texture edge category, the SAO application module 508 may determine a subset of reconstructed samples classified as the texture edge category based on the texture edge classification of the reconstructed samples. The SAO application module 508 may also determine a subset of NNLF filtered samples corresponding to the subset of reconstructed samples. The SAO application module 508 may determine a texture edge offset for the texture edge category based on the subset of reconstructed samples and the subset of NNLF filtered samples.
[0101] For example, the SAO application module 508 may determine a set of candidate offsets from a predetermined offset range (e.g., the predetermined offset range may be between -32 and 31). For each candidate offset in the set, the SAO application module 508 may calculate the aggregate distortion between the subset of reconstructed samples and the subset of NNLF-filtered samples. For example, for each reconstructed sample from the subset of reconstructed samples, the distortion between the reconstructed sample and the corresponding NNLF-filtered sample from the subset of NNLF-filtered samples may be calculated. Consistent with the present disclosure, the distortion may be, for example, SAD, SSD, mean square error (MSE), or any other suitable difference metric. For example, the distortion may be the MSE between the reconstructed sample and the corresponding NNLF-filtered sample. A subset of distortions may then be calculated for each subset of reconstructed samples. The aggregate distortion may be the sum of the distortion subsets corresponding to the subset of reconstructed samples. By performing similar operations for each candidate offset in the set, the SAO application module 508 may calculate a set of aggregate distortions for the set of candidate offsets. The SAO application module 508 may select a candidate offset having the minimum aggregate distortion among a set of aggregate distortions from a set of candidate offsets as a texture edge offset for a category. The minimum aggregate distortion may be referred to as a category distortion associated with the texture edge offset relative to a threshold T and a category (denoted as "Dis(T,category)").
[0102] By performing similar operations, a set of texture edge offsets for a set of texture edge categories may be determined for a threshold value T. A set of category distortions associated with the set of texture edge offsets may also be determined for the threshold value T.
[0103] In some embodiments, the SAO application module 508 may modify the threshold value T within a predetermined threshold range (e.g., a range of [0, 31]). The modified threshold value may be denoted as T', where T' ≥ 0. By performing the operations described above, the SAO application module 508 may reclassify the reconstructed samples into a set of texture edge categories based on the modified threshold value T'. For example, for each reconstructed sample, if the absolute value of the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is less than the modified positive threshold value T', the SAO application module 508 may classify the reconstructed sample as a texture edge sample of the first category. Alternatively, if the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is equal to or greater than the modified positive threshold value T', the SAO application module 508 may classify the reconstructed sample as a texture edge sample of the second category. Alternatively, if the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is equal to or less than the modified negative threshold value (-T'), the SAO application module 508 may classify the reconstructed sample as a texture edge sample of the third category.
[0104] By performing the operations described above, the SAO application module 508 can generate a new set of texture edge offsets for a set of texture edge categories based on the modified threshold value T' and the texture edge reclassification of the reconstructed samples. A new set of category distortions associated with the new set of texture edge offsets can also be determined for the modified threshold value T'.
[0105] The SAO application module 508 may determine (1) a first aggregated class distortion associated with a threshold value T and (2) a second aggregated class distortion associated with a modified threshold value T'. The first aggregated class distortion may be a sum of a set of class distortions associated with a set of texture edge offsets for the threshold value T. The second aggregated class distortion may be a sum of a new set of class distortions associated with a new set of texture edge offsets for the modified threshold value T'.
[0106] For example, Table 1 below shows a set of texture edge offsets (V(T, 1), V(T, 2), V(T, 3)) and a set of class distortions (Dis(T, 1), Dis(T, 2), Dis(T, 3)) for a set of classes (class 1, class 2, and class 3) for a threshold value T. Table 1 also shows a new set of texture edge offsets (V(T', 1), V(T', 2), V(T', 3)) and a new set of class distortions (Dis(T', 1), Dis(T', 2), Dis(T', 3)) for the set of classes for a modified threshold value T'. The first aggregate class distortion can be calculated as: first aggregate class distortion = sum(Dis(T, 1), Dis(T, 2), Dis(T, 3)). The second aggregate class distortion can be calculated as: second aggregate class distortion = sum(DIS(T', 1), DIS(T', 2), DIS(T', 3)).
[0107] Table 1:
[0108]
[0109] The SAO application module 508 may determine whether the first aggregated class distortion is greater than the second aggregated class distortion. In response to the first aggregated class distortion being greater than the second aggregated class distortion, the SAO application module 508 may update the class threshold with a modified threshold value T' and update the set of texture edge offsets with a new set of texture edge offsets. Otherwise, the SAO application module 508 may maintain the class threshold value at threshold value T and maintain the set of texture edge offsets unchanged.
[0110] By performing similar operations for a range of possible thresholds within a predetermined threshold range, the SAO application module 508 can determine a threshold for the class threshold and a set of texture edge offsets for the set of texture edge classes that is associated with a minimum aggregated class distortion.
[0111] The SAO application module 508 may generate or update a bitstream to include offset-related information based on the set of texture edge offsets for the set of texture edge categories. For example, the offset-related information may include the threshold and the set of texture edge offsets for the set of texture edge categories. The SAO application module 508 may provide the bitstream to the video decoder 30. After receiving the bitstream from the video encoder 20, the video decoder 30 may parse the threshold and the set of texture edge offsets from the bitstream. Similar texture edge classification may be performed on reconstructed samples derived at the video decoder 30. Similar descriptions will not be repeated herein.
[0112] An exemplary texture edge classification process is provided herein. The texture edge classification process may include step (1) performing NNLF at a predetermined granularity level (e.g., at a picture level or a block level). For example, NNLF may be performed on reconstructed samples in a spatial region at the granularity level to produce NNLF-filtered samples. If the granularity level is a picture level, the spatial region may be a picture (or video frame), or if the granularity level is a block level, the spatial region may be a reconstructed block, etc. The spatial region may also be, for example, a CTU or any other flexible region (e.g., a picture may be divided into regions, such as multi-level quadtree partitions).
[0113] The texture edge classification process may further include step (2) calculating a sample difference before and after the NNLF at each sample position in the spatial region. For example, for each reconstructed sample in the spatial region, a sample difference between the reconstructed sample (before the NNLF) and the corresponding NNLF-filtered sample (after the NNLF) may be calculated. As a result, sample differences associated with all reconstructed samples in the spatial region may be calculated separately.
[0114] The texture edge classification process may further include step (3) classifying the reconstructed samples in the spatial region into a set of texture edge categories based on the calculated sample point differences associated with the reconstructed samples. For example, the set of texture edge categories may include three categories, such as category 1, category 2, and category 3 described above. Each reconstructed sample in the spatial region may be classified into one of the three categories based on the category threshold and the sample point differences of the reconstructed samples by performing operations similar to the above operations.
[0115] The texture edge classification process may further include step (4) deriving a texture edge offset for each category by the video encoder 20. For each category, a subset of reconstructed samples within the spatial region may be classified into the category. The texture edge offset for the category may be associated with the minimum aggregate distortion of the subset of reconstructed samples. Specifically, for each reconstructed sample classified into the category, the distortion may be calculated as the MSE between the reconstructed sample and the corresponding NNLF filtered sample. The texture edge offset for the category may be exhaustively searched from a given offset range (e.g., from -32 to 31). For example, the given offset range may include a set of candidate offsets. For each candidate offset, the distortion at each sample position from the same category may be calculated separately and added together to form an aggregate distortion for the candidate offset, so that a set of aggregate distortions may be calculated for the set of candidate offsets respectively. Then, the candidate offset that produces the minimum aggregate distortion in the set of aggregate distortions is selected as the texture edge offset for the category. By performing similar operations, a set of texture edge offsets may be determined for the set of texture edge categories. Note that when computing the minimum aggregate distortion, the samples considered are from the same spatial region and also from the same class.
[0116] The texture edge classification process may further include step (5) varying the threshold of the class threshold within a given threshold range (such as [0, 31]) and repeating steps (3) and (4) until all possible combinations of threshold and offset values are found. Each threshold may be associated with a corresponding set of texture edge offsets and a corresponding set of class distortions. As described above, the threshold and the corresponding set of texture edge offsets associated with the minimum aggregated class distortion may be selected as the derived threshold and the derived set of texture edge offsets for the set of texture edge classes.
[0117] The texture edge classification process may further include the step of (6) writing the derived thresholds and the derived set of texture edge offsets for the set of texture edge classes into the bitstream.
[0118] The texture edge classification process may further include step (7) parsing the threshold value and the set of texture edge offsets from the bitstream at the video decoder 30. A similar texture edge classification process may be performed on the video decoder 30.
[0119] Regarding average intensity classification, reconstructed samples in a spatial region can be classified into two categories (e.g., a category of NNLF samples and a category of non-NNLF samples). A spatial region can be a region at any suitable granularity level (such as a block level or a picture level). For example, a spatial region can be a picture (or video frame), a reconstructed block, a CTU, or any other flexible region (e.g., a picture can be divided into regions, such as multi-level quadtree partitions). Reconstructed samples to which NNLF is applied can be classified as NNLF samples, while reconstructed samples to which NNLF is not applied can be classified as non-NNLF samples.
[0120] To perform mean intensity classification, the SAO application module 508 may determine whether to perform NNLF on a spatial region (e.g., a reconstructed block). In response to determining that NNLF is performed on the spatial region, the SAO application module 508 may classify the reconstructed samples in the spatial region as NNLF samples. Alternatively, in response to determining that NNLF is not performed on the spatial region, the SAO application module 508 may classify the reconstructed samples in the spatial region as non-NNLF samples.
[0121] The SAO application module 508 may determine a set of average intensity offsets for a set of average intensity categories based on the average intensity classification of the reconstructed samples. For example, in response to the reconstructed samples in the spatial region being classified as non-NNLF samples, the SAO application module 508 may determine the average intensity offset for the non-NNLF sample category to be zero. In other words, no average intensity offset is derived for the non-NNLF sample category, indicating that SAO filtering based on the average intensity offset is not performed.
[0122] Optionally, in response to reconstructed samples in the spatial region being classified as NNLF samples, the SAO application module 508 may perform NNLF on the reconstructed samples to generate NNLF-filtered samples. The SAO application module 508 may determine an average intensity offset for the NNLF sample category based on the minimum aggregate distortion between the reconstructed samples and the NNLF-filtered samples. For example, the SAO application module 508 may determine a set of candidate offsets from a predetermined offset range (e.g., the predetermined offset range may be between -32 and 31). For each candidate offset in the set, the SAO application module 508 may calculate the aggregate distortion between the reconstructed sample and the NNLF-filtered sample. For example, for each reconstructed sample, the distortion between the reconstructed sample and the corresponding NNLF-filtered sample may be calculated, so that the distortion for all reconstructed samples may be obtained. The aggregate distortion may be the sum of the distortions for the reconstructed samples. By performing similar operations on each candidate offset in the set, the SAO application module 508 may calculate a set of aggregate distortions for each candidate offset in the set. The SAO application module 508 may select, from the set of candidate offsets, a candidate offset having the smallest aggregated distortion in the set of aggregated distortion groups as the average intensity offset for the class of NNLF samples.
[0123] An exemplary average intensity classification process is provided herein. The average intensity classification process may include the step of (1) determining whether to perform NNLF in a spatial region. The spatial region may be a picture-level or block-level region, such as a picture or a block. The average intensity classification process may include the step of (2) classifying each reconstructed sample in the spatial region into one of two categories (NNLF sample or non-NNLF sample).
[0124] For example, an on / off flag may be used to indicate whether NNLF is applied in a spatial region. The on / off flag may be determined on the encoder side based on a rate-distortion optimization algorithm. For example, if the rate distortion of the reconstructed samples in the spatial region when NNLF is performed is less than the rate distortion when NNLF is not performed, the on / off flag may be enabled (e.g., the on / off flag is true). Otherwise, the on / off flag may be turned off (e.g., the on / off flag is false). If the on / off flag of the spatial region is true, it indicates that all reconstructed samples in the spatial region are NNLF samples. Otherwise (if the on / off flag is false), it indicates that all reconstructed samples in the spatial region are non-NNLF samples.
[0125] If the reconstructed sample in the spatial region is classified as a class of NNLF samples, the average intensity classification process may include step (3) deriving, by the video encoder 20, an average intensity offset for the class of NNLF samples. The average intensity offset is associated with the minimum aggregate distortion of the reconstructed sample. For example, by performing operations similar to the above operations, the SAO application module 508 may respectively calculate a set of aggregate distortions for a set of candidate offsets. The SAO application module 508 may select, from the set of candidate offsets, a candidate offset having the minimum aggregate distortion in the set of aggregate distortions as the average intensity offset for the class of NNLF samples.
[0126] In some embodiments, an average intensity offset for a class of NNLF samples may be determined regardless of the region governed by the on / off flag. For example, each block of the current picture may have a separate on / off flag, but the average intensity offset may be the same for all reconstructed samples within the picture that are classified as NNLF samples. In other words, even if the reconstructed samples are in different blocks with separate on / off flags, as long as the reconstructed samples are in the same picture and classified as the same class of NNLF samples, the average intensity offset is the same for the reconstructed samples.
[0127] On the other hand, if the reconstructed sample in the spatial region is classified as a non-NNLF sample, the average intensity classification process may include step (4) determining the average intensity offset for the non-NNLF sample class to be zero. In other words, the average intensity offset is not derived, which means that SAO filtering based on the average intensity offset is not performed.
[0128] Consistent with the present disclosure, the texture edge classification and average intensity classification disclosed herein can be combined in any manner. In some embodiments, the reconstructed sample may be first classified as an NNLF sample or a non-NNLF sample, and then further classified into the corresponding category of the texture edge sample (e.g., classified as an edge sample or a non-edge sample). Alternatively, the reconstructed sample may be first classified into the corresponding category of the texture edge sample, and then further classified as an NNLF sample or a non-NNLF sample. One offset may be derived for one category. If the reconstructed sample belongs to multiple categories, the offsets associated with the multiple categories may be applied to the NNLF filtered samples corresponding to the reconstructed sample by an addition operation. For example, for a reconstructed sample that is classified as an NNLF sample and also classified as a first category (category 1) of texture edge samples, when SAO filtering is applied, both the average intensity offset associated with the NNLF sample and the texture edge offset associated with category 1 may be added to the NNLF filtered sample corresponding to the reconstructed sample.
[0129] Consistent with the present disclosure, the texture edge classification and average intensity classification disclosed herein can be performed at any granularity level. In some embodiments, classification can be performed at the picture level, CTU level, block level, or flexible region level. For picture-level texture edge classification (or average intensity classification), reconstructed samples in the same category within a picture share the same texture edge offset (or the same average intensity offset). Similarly, for CTU-level texture edge classification (or average intensity classification), reconstructed samples in the same category within a CTU share the same texture edge offset (or the same average intensity offset).
[0130] For flexible region-level texture edge classification (or average intensity classification), the picture can be divided into regions, such as multi-level quadtree partitioning, and reconstructed samples in the corresponding regions and in the same category can share the same texture edge offset (or the same average intensity offset). Reconstructed samples in different categories in different regions can have different texture edge offsets (or different average intensity offsets), and even reconstructed samples in the same category in different regions can have different texture edge offsets (or different average intensity offsets).
[0131] Consistent with the present disclosure, the texture edge classification and average intensity classification disclosed herein are not limited to any particular type of neural network structure. For example, the texture edge classification and average intensity classification disclosed herein can be applied to any type of neural network structure. An exemplary neural network structure is shown below. 9A to 10B Shown in.
[0132] Consistent with the present disclosure, both the texture edge classification and the average intensity classification disclosed herein can be applied separately to co-located YUV samples. The Y sample may include samples of the luma component. The U (blue projection) sample and the V (red projection) sample may each include samples of two chroma components. In this case, offsets including a texture edge offset and an average intensity offset may be derived separately for the co-located YUV samples. Alternatively, only one classification (e.g., texture edge classification or average intensity classification) may be applied to one or both components of the co-located YUV sample. For example, the UV sample may be smoother than the Y sample, so that the texture edge classification is applied only to the Y sample and not to the UV sample.
[0133] Consistent with the present disclosure, if the texture edge classification and / or average intensity classification disclosed herein are applied, they are performed at both the encoder and decoder sides. The corresponding offset for each category can be derived only at the encoder side and written into the bitstream so that the bitstream is sent to the decoder side. Alternatively, to save signaling overhead, the corresponding offset for each category can be derived at both the encoder and decoder sides by following predefined rules. Exemplary predefined rules are described in more detail below with reference to exemplary signaling reduction methods.
[0134] In some embodiments, each reconstructed sample from a particular spatial region (e.g., a reconstructed block) may be classified into one or more categories from a set of categories. The set of categories may be associated with a set of offsets, respectively. To perform SAO filtering on NNLF-filtered samples, for each NNLF-filtered sample generated from the corresponding reconstructed sample, the SAO application module 508 may determine whether the corresponding reconstructed sample is classified into one or more categories from the set of categories. The SAO application module 508 may determine one or more offsets from the set of offsets corresponding to the one or more categories. The SAO application module 508 may apply the one or more offsets to the NNLF-filtered samples.
[0135] For example, the group of categories may include at least one of a group of texture edge categories or a group of average intensity categories. Accordingly, the group of offsets may include at least one of a group of texture edge offsets for the group of texture edge categories or a group of average intensity offsets for the group of average intensity categories. The corresponding reconstructed sample may be classified into at least one of the texture edge category or the average intensity category. That is, the corresponding reconstructed sample may be classified into the texture edge category, the average intensity category, or both the texture edge category and the average intensity category. The SAO application module 508 may apply at least one of the texture edge offset associated with the texture edge category or the average intensity offset associated with the average intensity category to the NNLF filtered sample. For example, if the reconstructed sample is classified only into the texture edge category (or the average intensity category), the SAO application module 508 may apply the texture edge offset associated with the texture edge category (or the average intensity offset associated with the average intensity category) to the NNLF filtered sample corresponding to the reconstructed sample. Alternatively, if the reconstructed sample is classified into both the texture edge category and the average intensity category, the SAO application module 508 may apply both the texture edge offset and the average intensity offset to the NNLF filtered samples corresponding to the reconstructed sample.
[0136] In some embodiments, the SAO application module 508 may generate or update the bitstream to include offset-related information based on at least one of: (1) a set of texture edge offsets for a set of texture edge categories; or (2) a set of average intensity offsets for a set of average intensity categories. The SAO application module 508 may provide the bitstream to the video decoder 30.
[0137] In some embodiments, the offset-related information may include at least one of the following: (1) a value of a category threshold and a set of texture edge offsets for a set of texture edge categories; (2) an NNLF flag signal (e.g., an on / off flag) indicating whether NNLF has been performed on the reconstructed block, wherein the NNLF flag signal may cause the video decoder 30 to derive a set of average intensity offsets for a set of average intensity categories (as described in more detail below with reference to an exemplary signaling reduction method); or (3) a set of indices for at least one of a set of texture edge offsets or a set of average intensity offsets, as described in more detail below with reference to an exemplary signaling reduction method. The set of indices may be generated based on one or more offset mapping tables.
[0138] In some embodiments, in order to achieve higher coding efficiency, one or more exemplary signaling reduction methods may be applied to reduce the signaling overhead for texture edge classification and / or average intensity classification disclosed herein. In a first signaling reduction method, a set of average intensity offsets for a set of average intensity categories may be derived on the decoder side. For example, when the on / off flag for NNLF is true at the block (or picture) level, (1) a first average intensity of the entire block (or picture) before applying NNLF and (2) a second average intensity of the entire block (or picture) after applying NNLF may be calculated on the decoder side. In this case, the difference in average intensity before and after NNLF may be calculated as the difference between the first average intensity and the second average intensity. The average intensity offset value may be derived based on the average intensity difference.
[0139] For example, a lookup table (eg, an offset mapping table) may be sent in the bitstream to video decoder 30 and used at the decoder side to derive the average intensity offset value. An exemplary offset mapping table is shown below (Table 2).
[0140] Table 2: Mapping table of average intensity shift based on average intensity difference
[0141] Average intensity difference Offset value +1 or -1 0 +2 1 -2 -1 >+3 2 <-3 -2 … …
[0142] In another example, a linear function can be used to derive the average intensity offset value. An exemplary linear function is shown in equation (1) below:
[0143] Offset=Clip(0,MAX,a×MeanDiff+b) (1)
[0144] In equation (1), "Offset" represents the average intensity offset value derived for the current block (or picture), "MeanDiff" represents the average intensity difference of the current block (or picture) before and after NNLF, and "a" and "b" represent coefficients derived at the encoder side and sent in the bitstream. The function "Clip" can be used to constrain the derived average intensity offset value to be in the range of [0, MAX], where MAX can be a fixed value or a value derived at the encoder side and sent in the bitstream.
[0145] In this first signaling reduction method, a block-level (or picture-level) flag may be determined at the encoder side. The block-level (or picture-level) flag may be used to evaluate whether to enable the derivation of an average intensity offset value for the current block (or picture) at the decoder side. For example, the video decoder 30 may determine whether to derive an average intensity offset value a for the current block (or current picture) at the decoder side based on the block-level (or picture-level) flag.
[0146] In the second signaling reduction method, the average intensity shift can be avoided at the decoder side. In some embodiments, in response to applying NNLF to a block (or picture) using a neural network model, the reconstructed samples can be preprocessed before being input to the neural network model (before applying NNLF). For example, the average intensity value of the block (or picture) can be shifted before applying NNLF. After applying NNLF to the block (or picture), the shifted average intensity value can be added back to all samples for the block (or picture). In this case, the training data for the neural network model can be similarly preprocessed for shifting the average intensity value. Examples of neural network models may include, but are not limited to, FCNN, CNN, long short-term memory network (LSTM), etc.
[0147] In the third signaling reduction method, the texture edge offset can be reused for multiple categories. For example, three categories (category 1, category 2, category 3) can be determined for texture edge classification. In category 1, the absolute value of the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is lower than the positive threshold T. In category 2, the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is greater than or equal to the positive threshold T. In category 3, the sample difference between the reconstructed sample and the corresponding NNLF filtered sample is less than or equal to the negative threshold -T. The texture edge offset values for category 2 and category 3 can be shared, but have different signs. For example, when the texture edge offset for category 2 is derived as x, the texture edge offset for category 3 is -x.
[0148] In a fourth signaling reduction method, one or more offset mapping tables can be used to reduce signaling bits. For example, an offset mapping table can be used to index the average intensity offset or texture edge offset to generate an offset index. The offset index can then be sent to the decoder to save signaling bits. An exemplary offset mapping table (Table 3) is shown below, where the actual offset value (e.g., the actual average intensity offset value or the actual texture edge offset value) can be continuous or discontinuous.
[0149] Table 3: Offset mapping table
[0150] Offset Index Actual offset 0 1 1 2 2 4 3 6
[0151] Another exemplary offset mapping table (Table 4) is shown below, where the actual offset value can be negative or positive.
[0152] Table 4: Offset mapping table
[0153] Offset Index Actual offset 0 -2 1 -1 2 0 3 1 4 2 5 3 6 4 7 5
[0154] In another example, a combined offset mapping table can be used to further reduce signaling bits. An exemplary offset mapping table (Table 5) is shown below, in which a single index value can be used to retrieve a combination of offset-related parameters (including offset values, thresholds, etc. for different categories). In Table 5, offset 1 represents the offset value for the first category, and offset 2 represents the offset value for the second category.
[0155] Table 5: Offset mapping table
[0156] Offset Index Offset 1 Offset 2 Threshold 0 1 -1 5 1 1 0 5 2 2 -1 7 3 3 -2 7
[0157] In some embodiments, if multiple offset mapping tables are used to generate offset indices, a table selection index value and the generated offset indices may be sent together in the bitstream. The table selection index value may be used to identify which offset mapping table is used to generate the offset indices.
[0158] Figure 6 6 is a flow chart of an exemplary method 600 for applying neural network-based SAO to video encoding and decoding according to some embodiments of the present disclosure. The method 600 may be implemented by the video encoder 20 (specifically, the SAO application module 508) and may include steps 602 to 606 as described below. Some steps may be optional to perform the disclosure provided herein. In addition, some steps may be performed simultaneously or in conjunction with the steps described below. Figure 6 The execution order is different as shown.
[0159] In step 602, the SAO application module 508 may classify reconstructed samples of a reconstructed block into a set of categories based on the NNLF. The reconstructed block may include a reconstructed version of a video block from a video frame of a video. For example, the SAO application module 508 may perform texture edge classification on the reconstructed samples to classify the reconstructed samples into a set of texture edge categories. Alternatively or additionally, the SAO application module 508 may perform average intensity classification on the reconstructed samples to classify the reconstructed samples into a set of average intensity categories.
[0160] In step 604, the SAO application module 508 may determine a set of offsets for the set of categories based on the classification of the reconstructed samples. For example, the SAO application module 508 may determine a set of texture edge offsets for the set of texture edge categories based on the texture edge classification of the reconstructed samples. Alternatively or additionally, the SAO application module 508 may determine a set of average intensity offsets for the set of average intensity categories based on the average intensity classification of the reconstructed samples.
[0161] In step 606, the SAO application module 508 may, in response to performing NNLF on the reconstructed block, perform SAO filtering on the NNLF-filtered samples based on the set of offsets. NNLF-filtered samples are generated from the reconstructed samples using NNLF. For example, each reconstructed sample may be classified into a texture edge category, an average intensity category, or both. Accordingly, the SAO application module 508 may apply a texture edge offset associated with the texture edge category, an average intensity offset associated with the average intensity category, or both, to the NNLF-filtered samples corresponding to the reconstructed samples.
[0162] Figure 7 7 is a flow chart of another exemplary method 700 for applying neural network-based SAO to video encoding and decoding according to some embodiments of the present disclosure. The method 700 may be implemented by the video encoder 20 (specifically, the SAO application module 508) and may include steps 702 to 714 as described below. Some steps may be optional to perform the disclosure provided herein. In addition, some steps may be performed simultaneously or in conjunction with the steps described below. Figure 7 The execution order is different as shown.
[0163] In step 702 , the SAO application module 508 may perform average intensity classification on the reconstructed samples of the reconstructed block to classify the reconstructed samples into a set of average intensity categories.
[0164] In step 704 , the SAO application module 508 may determine a set of average intensity offsets for the set of average intensity categories based on the average intensity classification of the reconstructed samples.
[0165] In step 706 , the SAO application module 508 may perform texture edge classification on the reconstructed samples to classify the reconstructed samples into a set of texture edge categories.
[0166] In step 708 , the SAO application module 508 may determine a set of texture edge offsets for the set of texture edge categories based on the texture edge classification of the reconstructed samples.
[0167] In step 710 , for each reconstructed sample, the SAO application module 508 may determine at least one of a corresponding texture edge category or a corresponding average intensity category into which the reconstructed sample is classified.
[0168] In step 712, for each reconstructed sample, the SAO application module 508 may apply at least one of a texture edge offset associated with the corresponding texture edge category or an average intensity offset associated with the corresponding average intensity category to the NNLF filtered sample corresponding to the reconstructed sample. The NNLF filtered samples may be generated from the reconstructed samples using NNLF. For example, if the reconstructed sample is classified only into the corresponding texture edge category (or only into the corresponding average intensity category), the SAO application module 508 may apply the texture edge offset associated with the corresponding texture edge category (or the average intensity offset associated with the opposite texture edge category) to the NNLF filtered sample. If the reconstructed sample is classified into both the corresponding texture edge category and the corresponding average intensity category, the SAO application module 508 may apply both the texture edge offset and the average intensity offset to the NNLF filtered sample.
[0169] In step 714 , the SAO application module 508 may generate a bitstream including offset-related information based on at least one of the set of texture edge offsets or the set of average intensity offsets. The bitstream may be provided to the video decoder 30 .
[0170] For example, the offset-related information may include the value of the category threshold and the set of texture edge offsets for the set of texture edge categories. Alternatively or additionally, the offset-related information may include an NNLF flag signal indicating that NNLF has been performed on the reconstructed block. The NNLF flag signal may enable the video decoder 30 to derive the set of average intensity offsets for the set of average intensity categories. Alternatively or additionally, the offset-related information may include a set of indices for at least one of the set of texture edge offsets or the set of average intensity offsets. The set of indices may be generated based on one or more offset mapping tables. Alternatively or additionally, the offset-related information may include the one or more offset mapping tables.
[0171] Figure 8A is a graphical representation showing gradient patterns used in SAO according to some examples. Figure 8B is a graphical representation showing the edge index categories of sample points in SAO edge classification according to some examples. Figure 8A and Figure 8B, and similar descriptions will not be repeated here.
[0172] Figure 9A is a graphical representation illustrating an exemplary FCNN according to some embodiments of the present disclosure. The FCNN may include an input layer, an output layer, and multiple hidden layers. Figure 9B An exemplary FCNN with two hidden layers is shown in .
[0173] At the kth layer of FCNN, the output f can be obtained using the following equations (2) and (3): k (x k-1 , W k , B k ):
[0174] f k (x k-1 , W k , B k )=δ(x k-1 *W k +B k ) (2)
[0175]
[0176] In equations (2) and (3), x k-1 ∈R M W represents the output of the (k-1)th layer. k ∈R M*N and B k ∈R N denote the weight and bias at the kth layer, respectively. δ(·) denotes the activation function, such as the rectified linear unit (ReLU) function determined by the following equation (4):
[0177]
[0178] Therefore, the general form of an FCNN with K layers can be written as:
[0179] FCNN(x)=f K (...f k (f k-1 (...f 1 (x,W 1 , B 1 )...), W k , B k )..., W K , B K ),
[0180] Where 1≤k≤K (5)
[0181] According to the universal approximation assumption and Equation (5), given any continuous function g(x) and a certain ε>0, there exists a neural network f(x) with a reasonable choice of nonlinearity, such as ReLU, such that |g(x)-f(x)|<ε. Consequently, over the past decade, many empirical studies have applied neural networks as approximators to simulate models with hidden variables in order to extract interpretable features beneath the surface. For example, when applied to image recognition, FCNNs have helped researchers build systems that understand not only individual pixels but also deeper and more complex substructures such as edges, textures, geometry, and / or objects.
[0182] Figure 9C is a graphical representation of an exemplary CNN according to some implementations of the present disclosure. As a common neural network architecture for image / video applications, CNN is similar to Figure 9B The FCNN shown in Figure 1 includes weights and bias metrics. CNN can be considered a three-dimensional (3D) neural network. Figure 9C In , neurons are arranged in a 3D structure (width, height, and depth) to form a CNN with an input layer, a first hidden layer, a second hidden layer, and an output layer. The second hidden layer is Figure 9C It is visualized in [W, H, and depth]. In this example, the input layer holds the input image or video frame, so its width and height are the same as the input image or video frame. When applied to image or video applications, each neuron in the CNN is a spatial filter element with an extended depth aligned with its input, for example, if there are 3 color components in the input image, the depth is 3.
[0183] Figure 9D An example is shown in FIG, where the dimensions of the basic elements in CNN are determined as [Filter width , Filter height , Inputd epth ,Output depth ], and in this example is set to [5, 5, 3, 4]. A spatial filter with dimensions [5, 5, 3, 4] is applied to a 64×64×3 input image. Two extra pixels are padded for convolution operations. That is, each spatial filter performs a 2-dimensional spatial convolution with 5×5×3 weights on the input image, and then outputs 4 convolution results. Therefore, when the boundaries are padded with 2 extra pixels, the dimensions of the filtered output result are [64+4, 64+4, 4].
[0184] Figure 10A and Figure 10Bis a graphical representation of an exemplary residual network (ResNet) according to some embodiments of the present disclosure. Note that as the depth of the neural network increases, the accuracy of the neural network may saturate and drop rapidly. More specifically, adding more layers to a deep neural network may lead to higher training errors because the gradient gradually vanishes along the deep neural network and moves towards zero gradient at the end. In this case, ResNet with residual blocks can solve this accuracy drop problem by introducing identity connections.
[0185] like Figure 10A As shown in Figure 1, the basic module of ResNet consists of a residual block and an identity connection. According to the universal approximation hypothesis, given an input x, the weighted layer with an activation function in the residual block approximates the hidden function F(x). Then, the output of the basic module of ResNet can be expressed as H(x) = x + F(x).
[0186] By stacking multiple layers of nonlinear neural networks together, the residual block can explore features that represent the local characteristics of the input image. Without introducing additional parameters and computational complexity, the identity connection is proved to be able to achieve the same result by skipping the following steps: Figure 10A The deep learning network is made trainable by skipping one or more nonlinear weighting layers as shown in . By skipping the weighting layers, the differential output of the basic module of ResNet can be written as:
[0187]
[0188] Therefore, even if the difference term Gradually decreasing towards zero, the identifier "1" can still continue and pass the input to the next layer, rather than being stuck at zero gradient and preventing information from propagating. In theory, if a neuron cannot propagate information to the next neuron, it can be considered a dead neuron, which is an untrainable element in the neural network.
[0189] like Figure 10A As shown in , after adding x and F(x) together to obtain H(x), another nonlinear activation function can be applied. Figure 10A In
[15] , the residual block acts as an element of ResNet, and the output of the residual block is added element-wise to the input of the residual block through the identity connection.
[0190] Figure 10B An example of a ResNet formed by stacking residual blocks together is shown. The residual features of the residual block can be fused with the signature features before propagating to the next residual block.
[0191] Figure 1111. The computing environment 1110 is shown coupled to a user interface 1150 according to some embodiments of the present disclosure. The computing environment 1110 may be part of a data processing server. The computing environment 1110 includes a processor 1120, a memory 1130, and an input / output (I / O) interface 1140.
[0192] The processor 1120 generally controls the overall operation of the computing environment 1110, such as operations associated with display, data acquisition, data communication, and image processing. The processor 1120 may include one or more processors to execute instructions to perform all or some of the steps in the methods described above. In addition, the processor 1120 may include one or more modules that facilitate interaction between the processor 1120 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a graphics processing unit (GPU), etc.
[0193] The memory 1130 is configured to store various types of data to support the operation of the computing environment 1110. The memory 1130 may include predetermined software 1132. Examples of such data include instructions for any application or method operating on the computing environment 1110, video data sets, image data, etc. The memory 1130 may be implemented 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.
[0194] The I / O interface 1140 provides an interface between the processor 1120 and peripheral interface modules (such as a keyboard, click wheel, buttons, etc.). The buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. The I / O interface 1140 may be coupled to an encoder and a decoder.
[0195] In some embodiments, a non-transitory computer-readable storage medium is also provided, which includes a plurality of programs, such as in the memory 1130, which can be executed by the processor 1120 in the computing environment 1110 to perform the method described above. Optionally, the non-transitory computer-readable storage medium may store therein a program generated by an encoder (e.g., Figure 2 The video encoder 20 in FIG. 1 uses the encoding method described above to generate the video for the decoder (eg, Figure 3A bitstream or data stream including encoded video information (e.g., video information including one or more syntax elements) 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.
[0196] In some embodiments, a computing device is also provided, comprising one or more processors (e.g., processor 1120); and a non-transitory computer-readable storage medium or memory 1130 storing a plurality of programs executable by the one or more processors, wherein the one or more processors are configured to perform the above-described method when executing the plurality of programs.
[0197] In some embodiments, a computer program product is also provided, which includes, for example, multiple programs in the memory 1130, and the multiple programs can be executed by the processor 1120 in the computing environment 1110 to perform the above method. For example, the computer program product may include a non-transitory computer-readable storage medium.
[0198] In some embodiments, the computing environment 1110 may be implemented using one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0199] The description of the present disclosure has been presented for purposes of illustration and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative embodiments will be apparent to one of ordinary skill in the art having the benefit of the teachings presented in the foregoing description and the associated drawings.
[0200] Unless otherwise specified, the order of the steps of the method according to the present disclosure is intended to be illustrative only, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but may be changed according to actual conditions. In addition, at least one step of the method according to the present disclosure may be adjusted, combined, or deleted according to actual requirements.
[0201] The examples are chosen and described in order to best explain the principles of the present disclosure and to enable others skilled in the art to understand the various embodiments of the present disclosure and to best utilize the basic principles and various embodiments with various modifications as are suited to the particular use contemplated. Therefore, it will be understood that the scope of the present disclosure is not limited to the specific examples of the embodiments disclosed and that modifications and other embodiments are intended to be included within the scope of the present disclosure.
Claims
1. A computer-implemented method for applying neural network-based sample adaptive offset (SAO) to video encoding and decoding, comprising: classifying, by a video processor, reconstructed samples of a reconstructed block into a set of categories based on a neural network based loop filter (NNLF), wherein the reconstructed block comprises a reconstructed version of a video block from a video frame of the video; determining, by the video processor, a set of offsets for the set of categories based on the classification of the reconstructed samples; and in response to performing the NNLF on the reconstructed block, performing, by the video processor, SAO filtering on NNLF-filtered samples based on the set of offsets, wherein the NNLF-filtered samples are generated from the reconstructed samples using the NNLF, wherein classifying the reconstructed sample points into the set of categories comprises performing texture edge classification on the reconstructed sample points to classify the reconstructed sample points into a set of texture edge categories; The performing of texture edge classification on the reconstructed sample points to classify the reconstructed sample points into a set of texture edge categories comprises: performing the NNLF on the reconstructed samples to generate the NNLF-filtered samples; and Each reconstructed sample is classified into a corresponding texture edge category based on a category threshold and a sample difference between the reconstructed sample and a corresponding NNLF-filtered sample.
2. The method of claim 1 , wherein classifying the reconstructed points into the set of categories further comprises: Mean intensity classification is performed on the reconstructed points to classify the reconstructed points into a set of mean intensity categories.
3. The method of claim 1 , wherein the set of texture edge categories includes texture edge samples of a first category, texture edge samples of a second category, and texture edge samples of a third category, and classifying each reconstructed sample into a corresponding texture edge category comprises: In response to an absolute value of a sample difference between the reconstructed sample and a corresponding NNLF-filtered sample being less than T, classifying the reconstructed sample as a texture edge sample of the first category, where T represents a positive threshold of the category threshold; In response to a sample difference between the reconstructed sample and a corresponding NNLF-filtered sample being equal to or greater than T, classifying the reconstructed sample as a texture edge sample of the second category; or In response to a sample difference between the reconstructed sample and a corresponding NNLF-filtered sample being equal to or less than −T, the reconstructed sample is classified as a texture edge sample of the third category.
4. The method of claim 1 , wherein determining the set of offsets for the set of categories based on the classification of the reconstructed samples comprises: A set of texture edge offsets for the set of texture edge categories is determined based on the texture edge classification of the reconstructed samples.
5. The method of claim 4 , wherein determining a set of texture edge offsets for the set of texture edge categories based on the texture edge classification of the reconstructed samples comprises: For each texture edge category in the set of texture edge categories, determining a subset of the reconstructed samples that are classified as the texture edge category; determining a subset of the NNLF filtered samples corresponding to the subset of the reconstructed samples; and A texture edge offset for the texture edge class is determined based on the subset of the reconstructed samples and the subset of the NNLF filtered samples.
6. The method of claim 5 , wherein determining a texture edge offset for the texture edge category comprises: determining a set of candidate offsets from a predetermined range of offsets; For each candidate offset, computing an aggregate distortion between the subset of the reconstructed samples and the subset of the NNLF filtered samples, such that a set of aggregate distortions is computed for each of the set of candidate offsets; and A candidate offset having a minimum aggregate distortion among the set of aggregate distortions is selected from the set of candidate offsets as a texture edge offset for the texture edge category.
7. The method according to claim 4, further comprising: modifying a threshold of said category threshold within a predetermined threshold range; reclassifying the reconstructed sample points into the set of texture edge categories based on the modified threshold; and A new set of texture edge offsets for the set of texture edge categories is generated based on the modified threshold and the reclassification of the reconstructed samples.
8. The method according to claim 7, further comprising: determining whether a first aggregation class distortion associated with the threshold is greater than a second aggregation class distortion associated with the modified threshold; and In response to the first aggregation class distortion being greater than the second aggregation class distortion, updating the threshold value with the modified threshold value; and The set of texture edge offsets is updated with the new set of texture edge offsets.
9. The method of claim 2, wherein the set of average intensity categories includes a category of NNLF samples and a category of non-NNLF samples, and performing average intensity classification on the reconstructed samples to classify the reconstructed samples into the set of average intensity categories comprises: determining whether to perform the NNLF on the reconstructed block; In response to determining to perform the NNLF on the reconstructed block, classifying the reconstructed sample into a category of the NNLF sample; or In response to determining not to perform the NNLF on the reconstructed block, the reconstructed sample is classified into the category of the non-NNLF sample.
10. The method of claim 9, wherein determining a set of offsets for the set of categories based on the classification of the reconstructed samples comprises: A set of mean intensity offsets for the set of mean intensity categories is determined based on the mean intensity classification of the reconstructed samples.
11. The method of claim 10, wherein determining a set of mean intensity offsets for the set of mean intensity categories based on the mean intensity classification of the reconstructed samples comprises: In response to the reconstructed sample being classified as the class of non-NNLF samples, determining a mean intensity offset for the class of non-NNLF samples to be zero; or In response to the reconstructed sample being classified as the category of the NNLF sample, performing the NNLF on the reconstructed samples to generate the NNLF-filtered samples; and An average intensity offset for the class of NNLF samples is determined based on a minimum aggregate distortion between the reconstructed samples and the NNLF filtered samples.
12. The method according to claim 1, wherein Performing SAO filtering on the NNLF filtered samples based on the set of offsets includes: For each NNLF filtered sample generated from the corresponding reconstructed sample, determining one or more categories into which the corresponding reconstructed sample points are classified from the set of categories; determining one or more offsets corresponding to the one or more categories from the set of offsets; and The one or more offsets are applied to the NNLF filtered samples.
13. The method according to claim 12, wherein: The set of categories includes at least one of a set of texture edge categories or a set of average intensity categories; The set of offsets comprises at least one of a set of texture edge offsets for the set of texture edge categories or a set of average intensity offsets for the set of average intensity categories; The corresponding reconstructed sample is classified into at least one of a texture edge class or an average intensity class; and Applying the one or more offsets to the NNLF filtered samples includes applying at least one of a texture edge offset associated with the texture edge class or an average intensity offset associated with the average intensity class to the NNLF filtered samples.
14. The method according to claim 2, further comprising: generating a bitstream including offset-related information based on at least one of a set of texture edge offsets for the set of texture edge classes or a set of average intensity offsets for the set of average intensity classes; and The bitstream is provided to a video decoder.
15. The method according to claim 14, wherein The offset related information includes at least one of the following: a value of a class threshold and said set of texture edge offsets for said set of texture edge classes; a NNLF flag signal indicating that the NNLF has been performed on the reconstructed block, wherein the NNLF flag signal causes the video decoder to derive the set of mean intensity offsets for the set of mean intensity categories; or A set of indices for at least one of the set of texture edge offsets or the set of mean intensity offsets, wherein the set of indices is generated based on an offset mapping table.
16. A system for applying neural network-based sample adaptive offset (SAO) to video coding and decoding, comprising: a memory configured to store at least one video frame of a video, the video frame comprising at least one video block; as well as The video processor is configured as: classifying reconstructed samples of a reconstructed block into a set of categories according to a neural network based loop filter (NNLF), wherein the reconstructed block comprises a reconstructed version of the video block; determining a set of offsets for the set of categories based on the classification of the reconstructed samples; and In response to performing the NNLF on the reconstructed block, performing SAO filtering on NNLF-filtered samples based on the set of offsets, wherein the NNLF-filtered samples are generated from the reconstructed samples using the NNLF, In order to classify the reconstructed samples into the set of categories, the video processor is further configured to perform texture edge classification on the reconstructed samples to classify the reconstructed samples into a set of texture edge categories. In order to perform texture edge classification on the reconstructed samples to classify the reconstructed samples into a set of texture edge categories, the video processor is further configured to: performing the NNLF on the reconstructed samples to generate the NNLF-filtered samples; and Each reconstructed sample is classified into a corresponding texture edge category based on a category threshold and a sample difference between the reconstructed sample and a corresponding NNLF-filtered sample.
17. The system of claim 16, wherein to classify the reconstructed samples into the set of categories, the video processor is further configured to: Mean intensity classification is performed on the reconstructed points to classify the reconstructed points into a set of mean intensity categories.
18. A non-transitory computer-readable storage medium storing instructions, which, when executed by a video processor, cause the video processor to perform a method for applying a neural network-based sample adaptive offset (SAO) to video encoding and decoding, the method comprising: classifying reconstructed samples of a reconstructed block into a set of categories according to a neural network based loop filter (NNLF), wherein the reconstructed block comprises a reconstructed version of a video block from a video frame of a video; determining a set of offsets for the set of categories based on the classification of the reconstructed samples; In response to performing the NNLF on the reconstructed block, performing SAO filtering on NNLF-filtered samples based on the set of offsets, wherein the NNLF-filtered samples are generated from the reconstructed samples using the NNLF; and generating a bitstream comprising offset-related information based on the set of offsets for the set of categories, wherein the bitstream is stored in the non-transitory computer-readable storage medium, wherein classifying the reconstructed sample points into the set of categories comprises performing texture edge classification on the reconstructed sample points to classify the reconstructed sample points into a set of texture edge categories; The performing of texture edge classification on the reconstructed sample points to classify the reconstructed sample points into a set of texture edge categories comprises: performing the NNLF on the reconstructed samples to generate the NNLF-filtered samples; and Each reconstructed sample is classified into a corresponding texture edge category based on a category threshold and a sample difference between the reconstructed sample and a corresponding NNLF-filtered sample.
Citation Information
Patent Citations
Method and apparatus of neural network based processing in video coding
US20180249158A1