Video encoding method, video decoding method, and bitstream generation method
By employing non-differential coding and nonlinear in-loop filtering techniques, the complexity of adaptive loop filters in video encoding is reduced, improving the efficiency and speed of encoding-decoding processes.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- SZ DJI TECH CO LTD
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-19
AI Technical Summary
Current video encoding standards, such as VVC and HEVC, utilize complex and computationally intensive adaptive loop filters (ALF) for in-loop filtering, which are inefficient in practical applications due to high complexity and computational demands.
Implement a method and apparatus for intra-loop filtering using non-differential coding schemes and non-exponential Golomb decoding for filtering coefficient sets, along with nonlinear in-loop filtering for luminance and chromaticity components, to reduce complexity and improve encoding-decoding performance.
The proposed method reduces the computational complexity of in-loop filtering, accelerates calculation speed, and enhances encoding-decoding performance by optimizing the encoding scheme.
Smart Images

Figure 2026083103000001_ABST
Abstract
Description
Technical Field
[0001] Copyright Statement The content disclosed in this patent document includes materials protected by copyright. This copyright is owned by the copyright owner. The copyright owner does not oppose any person from reproducing this patent document or the disclosure of this patent existing in the official records and official documents of the Trademark Office.
[0002] The present invention relates to the field of digital video encoding technology, and more specifically, to a method and apparatus for in-loop filtering.
Background Art
[0003] Currently, in order to reduce the bandwidth occupied by video storage and transmission, it is necessary to perform encoding and compression processing on video data. Currently, in normal encoding technologies, the process of encoding and compression processing of video includes processes of block division, prediction, transformation, quantization, and entropy encoding to form a hybrid video encoding frame. Based on this hybrid video encoding frame, after decades of development, video encoding and decoding technology standards have gradually been formed. Some currently mainstream video encoding and decoding standards include the international video encoding standard H.264 / MPEG-AVC, H.265 / MEPG-HEVC, the domestic audio and video encoding standard AVS2, and the currently under-creation international standard H.266 / VVC and domestic standard AVS3.
[0004] In the encoding processes of block division, prediction, transformation, quantization, and entropy encoding, due to the existence of quantization, there are compression distortions such as block effects and ringing effects in the decoded and reconstructed video. Moreover, in the inter-frame prediction mode, the compression distortion in the reconstructed video affects the encoding quality of subsequent images. Therefore, in order to reduce the compression distortion, an in-loop filter technology is introduced into the encoding and decoding structure frame to improve the current decoded image quality, provide a high-quality reference image for subsequent encoded images, and improve the compression efficiency.
[0005] In the currently under-development VVC (Versatile Video Coding) and HEVC (High Efficiency Video Coding) standards, loop filters include deblocking filters (DBF), sample adaptive offsets (SAO), and adaptive loop filters (ALF). Here, ALF calculates and applies self-adaptive filtering coefficients based on different pixels in the image, based on the principle of the Wiener filter. While ALF provides good filtering effects and can improve coding efficiency, it is highly complex, computationally intensive, and has certain drawbacks in practical applications. [Overview of the project] [Means for solving the problem]
[0006] The present invention provides a method and apparatus for intra-loop filtering, which can reduce the complexity of intra-loop filtering and decrease computation time compared to the prior art.
[0007] In a first embodiment, a method for intra-loop filtering is provided, which includes determining a plurality of sets of filtering coefficients for intra-loop filtering and encoding the plurality of sets of filtering coefficients using a non-differential coding scheme.
[0008] A second embodiment provides a method for intra-loop filtering, which includes obtaining an intra-loop filtering bitstream, decoding instruction information indicating the number of filtering coefficient sets in the bitstream to determine that there are multiple filtering coefficient sets, and decoding the bitstream of filtering coefficients in the bitstream using a non-differential decoding method to obtain multiple filtering coefficient sets.
[0009] A third aspect provides a method for intra-loop filtering, which includes determining a modified index parameter for intra-loop filtering and encoding the modified index parameter using a non-exponential Golomb coding scheme.
[0010] A fourth aspect provides a method for intra-loop filtering, which includes obtaining an intra-loop filtering bitstream and decoding the bitstream of the modified index parameters in the bitstream using a non-exponential Golomb decoding scheme to obtain the modified index parameters for intra-loop filtering.
[0011] A fifth aspect provides a method for nonlinear in-loop filtering, which includes determining in-loop filtering correction parameters for the luminance component and the chromaticity component of an image frame, and that the in-loop filtering correction parameters for the luminance component and the chromaticity component are parameters selected from the same parameter list.
[0012] In a sixth aspect, a device for in-loop filtering is provided, which has a processor for determining multiple sets of filtering coefficients for in-loop filtering and for encoding the multiple sets of filtering coefficients using a non-differential coding scheme.
[0013] A seventh embodiment provides a device for in-loop filtering, which has a processor that acquires a bitstream for in-loop filtering, decodes instruction information indicating the number of sets of filtering coefficients in the bitstream, determines that there are multiple sets of filtering coefficients, and decodes the bitstream of filtering coefficients in the bitstream using a non-differential decoding method to obtain multiple sets of filtering coefficients.
[0014] In an eighth aspect, a device for in-loop filtering is provided, the device having a processor, the processor for determining the modified index parameters for in-loop filtering and for encoding the modified index parameters using a non-exponential Golomb coding scheme.
[0015] In a ninth aspect, a device for intra-loop filtering is provided, which has a processor that acquires an intra-loop filtering bitstream, decodes the bitstream of the modified index parameters in the bitstream using a non-exponential Golomb decoding scheme, and obtains the modified index parameters for intra-loop filtering.
[0016] In a tenth embodiment, a nonlinear in-loop filtering apparatus is provided, which has a processor for determining in-loop filtering correction parameters for the luminance component and the chromaticity component of an image frame, wherein the in-loop filtering correction parameters for the luminance component and the chromaticity component are parameters selected from the same parameter list.
[0017] The technical solution of the embodiment of this application is to optimize the encoding scheme in the encoding-decoding-loop filtering process, thereby reducing the complexity of the calculations for in-loop filtering, accelerating the calculation speed, and improving encoding-decoding performance. [Brief explanation of the drawing]
[0018] [Figure 1] This is a block diagram of a technical solution using an embodiment of the present application. [Figure 2] This is a schematic diagram of a video encoding frame based on an embodiment of this application. [Figure 3] This is a schematic diagram of a video decoding frame based on an embodiment of the present application. [Figure 4]Schematic diagram of a Wiener filter based on an embodiment of the present application. [Figure 5a] Schematic diagram of an ALF filter based on an embodiment of the present application. [Figure 5b] Schematic diagram of another ALF filter based on another embodiment of the present application. [Figure 6] Schematic flowchart of a method for in-loop filtering in an embodiment of the present application. [Figure 7] Schematic flowchart of a method for in-loop filtering in another embodiment of the present application. [Figure 8] Schematic flowchart of a method for in-loop filtering in another embodiment of the present application. [Figure 9] Schematic flowchart of a method for in-loop filtering in another embodiment of the present application. [Figure 10] Schematic flowchart of a method for in-loop filtering in another embodiment of the present application. [Figure 11] Schematic flowchart of a method for in-loop filtering in another embodiment of the present application. [Figure 12] Schematic flowchart of a method for in-loop filtering in another embodiment of the present application. [Figure 13] Schematic flowchart of a method for in-loop filtering in another embodiment of the present application. [Figure 14] Schematic flowchart of a method for in-loop filtering in another embodiment of the present application. [Figure 15] Schematic block diagram of an in-loop filtering apparatus in an embodiment of the present application. [Figure 16] Schematic block diagram of an in-loop filtering apparatus in another embodiment of the present application. [Figure 17] Schematic block diagram of an in-loop filtering apparatus in another embodiment of the present application. [Figure 18] Schematic block diagram of an in-loop filtering apparatus in another embodiment of the present application. [Figure 19]This is a schematic block diagram of the nonlinear loop filtering apparatus according to an embodiment of this application. [Modes for carrying out the invention]
[0019] The technical solutions in the embodiments of this application will be described below with reference to the drawings.
[0020] The embodiments of this application can be applied to standard or non-standard image or video encoders, for example, VVC standard encoders.
[0021] The specific examples provided herein are intended solely to help those skilled in the art better understand the embodiments of this application and are not intended to limit the scope of the embodiments.
[0022] Furthermore, it should be understood that the formulas in the embodiments of this application are merely illustrative and do not limit the scope of the embodiments of this application, and that each formula can be modified, and these modifications also fall within the scope of protection of this application.
[0023] Furthermore, in each embodiment of this application, the number of each process does not indicate the order of execution, and the execution order of each process is determined by its function and inherent logic, and is not intended to impose any limitations on the implementation process of the embodiments of this application.
[0024] Furthermore, it should be understood that the various embodiments described herein can be implemented individually or in combination, and this application does not limit them.
[0025] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as that commonly understood by those skilled in the art. The technical terms used in the specification of this application are solely for the purpose of describing specific embodiments and are not intended to limit the scope of this application. The term "at least one" as used in this application includes any combination of one or more related listed items.
[0026] Figure 1 is a block diagram of a technical solution using an embodiment of the present application.
[0027] As shown in Figure 1, system 100 can receive data to be processed 102, process the data to be processed 102, and generate processed data 108. For example, system 100 can receive data to be encoded, encode the data to be encoded, and generate encoded data, or system 100 can receive data to be decoded, decode the data to be decoded, and generate decoded data. In some embodiments, the components of system 100 can be implemented by one or more processors, which may be processors in a computer system or processors in a mobile system (e.g., an unmanned aerial vehicle). The processor may be any type of processor and is not limited to the embodiments of the present invention. In some possible designs, the processor may have an encoder, a decoder, or a coder-decoder. System 100 may further have one or more memories. These memories can store commands and data, such as commands executable by a computer implementing the technical solution of an embodiment of the present invention, the data to be processed 102, the processed data 108, etc. These memories may be any type of memory and are not limited to the embodiments of the present invention.
[0028] The data to be encoded may include documents, images, graphic objects, video sequences, audio, video, or any other data that requires encoding. In some situations, the data to be encoded may include sensing data from sensors, which may be vision sensors (e.g., cameras, infrared sensors), microphones, near-field sensors (e.g., ultrasonic sensors, radar), position sensors, temperature sensors, touch sensors, etc. In some situations, the data to be encoded may include information from a user, such as bioinformation, which may include facial features, fingerprint scans, retinal scans, voice recordings, DNA samples, etc.
[0029] Figure 2 is a schematic diagram of a video encoded frame 2 based on an embodiment of this application. As shown in Figure 2, after receiving the video to be encoded, each frame in the video is encoded sequentially, starting from the first frame of the video to be encoded. Here, the currently encoded frame undergoes processes such as prediction, transformation, quantization, and entropy coding to finally output the bitstream of the currently encoded frame. Correspondingly, the decoding process usually follows the reverse process of the above-described process to decode the received bitstream and recover the video frame information before decoding.
[0030] Specifically, as shown in Figure 2, the video encoded frame 2 has an encoding control module 201 for determining control operations and selecting parameters during the encoding process. For example, as shown in Figure 2, the encoding control module 202 controls the parameters used for transformation, quantization, inverse quantization, and inverse transformation, as well as the selection of intra-frame or inter-frame modes, motion prediction, and filter parameter control. The control parameters of the encoding control module 202 are also input into the entropy encoding module and encoded to form a part of the encoded bitstream.
[0031] The encoding process begins with the current frame to be encoded, and the frame is divided into segments, specifically sliced and then block-divided. Optionally, in one example, the frame to be encoded is divided into multiple non-overlapping largest coding tree units (CTUs), each CTU being further divided into a series of even smaller coding units (Coding Units, CUs) iteratively according to a quadtree, binary tree, or ternary tree scheme. In some examples, a CU may further have associated prediction units (PUs) and transform units (TUs), where the PU is the basic unit for prediction and the TU is the basic unit for transformation and quantization. In some examples, the PUs and TUs are each obtained by dividing the CU into one or more blocks, one of which has multiple prediction blocks (PBs) and associated syntax elements. In some examples, the PUs and TUs may be the same, or they may be obtained by different division schemes using the CU. In some examples, at least two of the CU, PU, and TU are the same, for example, CU, PU, and TU are not distinguished, and prediction, quantization, and transformation are all performed using CU as the unit. For ease of explanation, below, CTU, CU, or any other formed data unit will be referred to as an encoded block.
[0032] In the embodiments of this application, it should be understood that the data subject to video encoding may be frames, slices, coding tree units, coding units, coding blocks, or any group thereof. In different embodiments, the size of the data units may be changed.
[0033] Specifically, as shown in Figure 2, after dividing the frame to be encoded into multiple encoding blocks, a prediction process is performed to remove spatial and temporal domain redundancy information from the current frame to be encoded. Currently, relatively commonly used predictive coding schemes include two methods: intra-frame prediction and inter-frame prediction. Intra-frame prediction predicts the current encoding block using only the reconstructed information in the current frame image, while inter-frame prediction predicts the current encoding block using information from other previously reconstructed frame images (also called reference frames). Specifically, in the embodiment of this application, the coding control module 202 is for determining whether to select intra-frame prediction or inter-frame prediction.
[0034] When the in-frame prediction mode is selected, the in-frame prediction process 203 involves obtaining a reconstructed block of an already encoded adjacent block surrounding the current encoded block as a reference block, calculating a predicted value based on the pixel value of this reference block using the prediction mode method to generate a predicted block, reducing the corresponding pixel value between the current encoded block and the predicted block to obtain the residual of the current encoded block, and then, after transformation 204, quantization 205, and entropy coding 210, forming the bitstream of the current encoded block. Furthermore, all encoded blocks of the current target frame, after undergoing the above encoding process, form a part of the encoded bitstream of the target frame. In addition, the control and parameter data generated in the in-frame prediction 203 are also encoded by entropy coding 210 and form a part of the encoded bitstream.
[0035] Specifically, transformation 204 is intended to improve coding efficiency by removing the correlation of residuals in image blocks. The transformation of residual data of the current coded block is usually done using the Discrete Cosine Transform (DCT) or the Discrete Sine Transform (DST). For example, the coding side multiplies the residual information of the block to be coded by a single N×M transformation matrix and its transpose, and after multiplication, obtains the transformation coefficients of the current coded block.
[0036] After generating the conversion coefficients, quantization 205 further enhances the compression efficiency, and the conversion coefficients can be converted to quantized coefficients. Subsequently, the quantized coefficients are entropy coded 210 to obtain the residual bitstream of the current coded block. Here, the entropy coding scheme includes, but is not limited to, CABAC (Context Adaptive Binary Arithmetic Coding, CABAC) entropy coding.
[0037] Specifically, the encoded neighboring block in the in-frame prediction process 203 is the encoded neighboring block before encoding the current encoded block, and the reconstructed block obtained by adding this neighboring block and the predicted block together after transforming 204, quantizing 205, inverse quantizing 206, and inverse transforming 207 the residuals generated in the encoding process of this neighboring block. Correspondingly, inverse quantization 206 and inverse transforming 207 are the reverse processes of quantization 206 and transformation 204, and are for recovering the residual data before quantization and transformation.
[0038] As shown in Figure 2, when the inter-frame prediction mode is selected, the inter-frame prediction process includes motion prediction 208 and motion compensation 209. Specifically, motion prediction 208 is performed based on a reference image in the reconstructed image frame. In one or more reference frame images, the image block most similar to the current encoded block is searched for based on a certain matching criterion and designated as the matching block. The relative shift between this matching block and the current encoded block is the motion vector (MV) of the current target to be encoded. After motion prediction is performed on all encoded blocks in the target to be encoded frame, motion compensation 209 is performed on the current target to be encoded frame based on the motion vector and the reference frame to obtain the predicted value of the current target to be encoded frame. The original values of the pixels in this target to be encoded frame are mutually subtracted with the corresponding predicted values to obtain the residual of the target to be encoded frame. The residual of the current target to be encoded frame is transformed 204, quantized 205, and entropy encoded 210, and then forms part of the encoded bitstream of the target to be encoded frame. In addition, the control and parameter data generated in motion compensation prediction 209 are also encoded by entropy coding 210, forming part of the encoded bitstream.
[0039] Here, as shown in Figure 2, the reconstructed video frame is the video frame obtained after filtering 211. Filtering 211 is for reducing compression distortions such as block effects and ringing effects generated during the encoding process, and the reconstructed video frame is for providing a reference frame for inter-frame prediction during the encoding process, and during the decoding process, the reconstructed video frame is output to the final decoded video after post-processing. In the embodiment of this application, filtering 211 includes three filtering techniques: deblocking DB filtering 2111, sample adaptive offset SAO filtering 2112, and adaptive loop filter ALF 2113, where ALF 2113 is provided after DB 2111 and SAO 2112. The filtering parameters in the filtering 211 process are similarly transmitted to an entropy code and encoded, forming part of the encoded bitstream.
[0040] Figure 3 is a schematic diagram of a video decoding frame 3 based on another embodiment of this application. As shown in Figure 3, video decoding performs the operation steps corresponding to video encoding. First, entropy coding 301 is used to obtain one or more data information from residual data, prediction syntax, in-frame prediction syntax, motion compensation syntax, and filtering syntax in the encoded bitstream. Here, the residual data is inversely quantized 302 and inversely transformed 303 to obtain the original residual data information. In addition, based on the prediction syntax, it is determined whether to use in-frame prediction or inter-frame prediction for the current decoding block. If it is an in-frame prediction 304, prediction information is constructed according to the in-frame prediction scheme using the reconstructed image block in the current frame based on the in-frame prediction syntax obtained by decoding. If it is an inter-frame prediction, a reference block is determined in the reconstructed image based on the motion compensation syntax obtained by decoding, and prediction information is obtained. Subsequently, the prediction information and residual information are superimposed, and a reconstructed video frame is obtained by the filtering 311 operation, and the decoded video is obtained after post-processing 306 of the reconstructed video frame.
[0041] Specifically, in the embodiments of this application, the filtering 311 may be the same as the filtering 211 in Figure 2, and includes a deblocking DB filtering 3111, a sample adaptive offset SAO filtering 3112, and an adaptive loop filter 3113, where the filtering parameters and control parameters in filtering 311 may be obtained by entropy decoding of the encoded bitstream, and the three filtering processes are performed based on the obtained filtering parameters and control parameters.
[0042] Specifically, DB filtering processes pixels at the boundaries of the prediction unit PU and the transformation unit TU. It applies nonlinear weighting to boundary pixels using a trained low-pass filter, thereby reducing blocking effects. SAO filtering classifies pixel values in coded blocks within a frame image, adding compensation values to each type of pixel. Different coded blocks employ different filtering methods, and different types of pixel compensation values differ within different coded blocks, further bringing the reconstructed frame image closer to the original frame image and avoiding ringing effects. ALF filtering is a Wiener filtering process. Based on the Wiener filtering principle, it calculates filtering coefficients and filters, primarily to minimize the mean-squared error (MSE) between the reconstructed frame image and the original frame image. This further improves the image quality of the reconstructed frame, increases the accuracy of motion prediction and motion compensation, and effectively enhances the overall coding efficiency of the coding system. However, ALF filtering is complex, computationally intensive, and has certain drawbacks in practical applications.
[0043] To facilitate understanding, the ALF filtering process will now be described in detail with reference to Figures 4, 5a, and 5b.
[0044] Calculation principle of ALF filtering coefficients First, we will explain the calculation method for the ALF filtering coefficient based on the Wiener filtering principle. As shown in Figure 4, the pixel signal in the original encoded frame of the current encoding is X, the reconstructed pixel signal after encoding, DB filtering and SAO filtering is Y, the noise or distortion introduced by Y in this process is e, and the reconstructed pixel signal is filtered by the filtering coefficient f in Wiener filtering, and then the ALF reconstructed signal
number
number
number
[0045] Selectively, in a possible embodiment, a filter consisting of a set of ALF filtering coefficients has 13 symmetrically distributed filtering coefficients C0 to C12 and a filter length L of 7, as shown in Figures 5a and 5b. Or, it has 7 symmetrically distributed filtering coefficients C0 to C6 and a filter length L of 5. Selectively, the filter shown in Figure 5a is also called a 7*7 filter and is applied to the luminance component of the encoded frame, and the filter shown in Figure 5b is also called a 5*5 filter and is applied to the chromaticity component of the encoded frame.
[0046] In the embodiments of this application, the filter comprising the ALF filtering coefficients may be of other types, such as a symmetrically distributed filter with a filter length of 9, and the embodiments of this application are not limited thereto.
[0047] In the linear ALF filtering process, for each pixel point to be filtered in the reconstructed image frame, the filtered result for the current point is obtained by weighting the surrounding pixel points, i.e., it is the corresponding pixel point in the ALF reconstructed image frame. Specifically, the pixel point I(x,y) in the reconstructed image frame is the current pixel point to be filtered, (x,y) is the position coordinate of the current pixel point to be filtered in the encoded frame, the filtering coefficient at the center of the filter corresponds to it, the other filtering coefficients in the filter correspond to each pixel point around I(x,y), the filtering coefficient values in the filter are weights, and the numerical value obtained by multiplying the filtering coefficient values in the filter by the corresponding pixel points and averaging them is the filtered pixel value O(x,y) of the current pixel point to be filtered I(x,y), and the specific formula is as follows.
number
[0048] Following this method, each pixel point in the reconstructed image frame is sequentially filtered to obtain the filtered ALF reconstructed image frame.
[0049] Selectively, in a possible embodiment, the filtering coefficient w(i,j) of the filter is an integer between [-1,1].
[0050] In selectable embodiments, the filtering coefficient w(i,j) of the filter is truncated after being expanded by 128 times to obtain w'(i,j), where w'(i,j) is an integer between [-128 and 128]. Specifically, the calculation formula for encoding and transmitting the expanded w'(i,j), which is easy to implement by encoding and decoding in hardware, and for using the expanded w'(i,j) to filter and obtain O(x,y), is as follows.
number
[0051] In the selectable case, instead of directly employing a filter and using it as a weight in other nonlinear ALF filtering processes, the filtered result is obtained by weighting and averaging multiple pixel points. By introducing nonlinear parameter elements and optimizing the filtering effect, the calculation formula obtained by filtering I(x,y) and calculating O'(x,y) using nonlinear ALF filtering is as follows.
number
number
[0052] Specifically, in the k(d,b)clip operation, k(i,j) represents the ALF correction clip parameter for in-loop filtering, and will be referred to as the correction parameter or clip parameter below. Each filtering coefficient w(i,j) corresponds to a single clip parameter. For the encoded frame luminance component, one clip parameter is selected from {1024, 181, 32, 6}, and for the encoded frame chromaticity component, one clip parameter is selected from {1024, 161, 25, 4}. Additionally, the index corresponding to each clip parameter, i.e., the correction (clip) index parameter, must be written to the bitstream. If the clip parameter is 1024, the clip index parameter 0 is written to the bitstream. Similarly, if it is 181, 1 is written to the bitstream. Therefore, the clip index parameters for both encoded frame luminance classification and encoded frame chromaticity classification are integers between 0 and 3.
[0053] Pixel classification and segmentation Next, if calculating a corresponding set of ALF filtering coefficients for each pixel point is complex and time-consuming, and writing each pixel point's ALF coefficient to the bitstream would incur enormous costs, then it is necessary to classify and partition the pixel points in the reconstructed image. Each type of pixel point is assigned the same set of ALF filtering coefficients (a type of filter), thereby reducing computational complexity and improving encoding efficiency.
[0054] There can be multiple selectable pixel classification methods. For example, classification can be performed only on the luminance Y component of a pixel, without classifying the chromaticity UV component. Alternatively, the luminance Y component can be divided into 25 parts, while the chromaticity UV component is not divided, resulting in only one type of classification. In other words, for a single frame image, the encoded frames for the luminance Y component can correspond to a maximum of 25 sets of filters, and the encoded frames for the chromaticity UV component can correspond to one set of filters.
[0055] In the embodiments of this application, the pixel type may be the type corresponding to the luminance Y component, but the embodiments of this application are not limited thereto, and the pixel type may also be the type corresponding to other components or all components. For ease of explanation, the encoded frame of the luminance Y component will be classified and segmented below, and ALF filtering will be explained as an example.
[0056] In selectable embodiments, the reconstructed image frame after DB filtering and SAO filtering is divided into multiple 4x4 pixel blocks. These 4x4 blocks are then classified.
[0057] For example, each individual 4x4 block can be classified in the Laplace direction.
number
[0058] C represents the type to which the pixel block belongs. D is the Laplace direction.
number
number
[0059] The calculation method for method D is as follows: First, the Laplace gradient is calculated for the current 4x4 block in different directions, and the calculation formula is as follows.
number
[0060]
number
number
number
number
number
[0061] Correspondingly, calculated and obtained
number
number
number
number
[0062] Subsequently, direction D is determined based on the ratio of the extreme values of the Laplace gradients in the four directions, and the specific calculation formula is as follows.
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
[0063] Selectable in possible embodiments,
number
number
[0064] Quantize A to obtain an integer between 0 and 4,
number
[0065] Therefore, by combining the values of D and A, the value range of C is an integer between 0 and 24, and in the embodiments of this application, at most, a 4*4 block in a single frame image is divided into 25 types.
[0066] Selectively, in a possible embodiment, the encoded frame has N types of 4*4 blocks, each type of 4*4 block having a set of ALF filtering coefficients, where N is an integer between 1 and 25.
[0067] In the embodiments of this application, the entire frame image can be divided into multiple 4*4 blocks, or into blocks of other pixel sizes, for example, into multiple 8*8 or 16*16 blocks, and the embodiments of this application are not limited to this.
[0068] Furthermore, in the embodiments of this application, in addition to classifying based on the Laplace direction described above, blocks may also be classified using other classification methods, and the embodiments of this application are not limited to this.
[0069] Furthermore, in the embodiments of this application, the number of classifications may be any other number besides 25, and it should be understood that the embodiments of this application are not limited thereto.
[0070] Block-based ALF filtering ALF filtering can be divided into frame-based ALF, block-based ALF, and quadtree-based ALF. Frame-based ALF uses a set of filtering coefficients to filter the entire frame. Block-based ALF divides the encoded frame into image blocks of the same size and determines whether or not to apply ALF filtering to each image block. Quadtree-based ALF divides the encoded frame into image blocks of different sizes based on the quadtree partitioning scheme and determines whether or not to apply ALF filtering. Frame-based ALF is computationally simple but has poor filtering effectiveness. On the other hand, quadtree-based ALF is computationally complex. Therefore, in some standards or technologies, for example, in the latest VVC standard currently under consideration, the reference software VTM adopts block-based ALF.
[0071] The block-based ALF in VTM will be explained as an example. In VTM, an encoded frame has frame-level ALF filtering marker bits and block-level ALF filtering marker bits. Selectively, this block level may be a CTU, CU, or other segmented image block, but the embodiments of this application are not limited thereto, and for ease of explanation, the CTU-level ALF filtering marker bits will be explained below as an example.
[0072] Specifically, if the frame-level ALF filtering marker bit indicates that ALF filtering will not be performed, the CTU-level ALF filtering marker bit in the encoded frame is not identified. If the frame-level ALF filtering marker bit indicates that ALF filtering will be performed, the CTU-level ALF filtering marker bit in the encoded frame is identified to indicate whether the current CTU performs ALF filtering or not.
[0073] The following method allows for the inclusion of Z CTUs in the encoded frame and the calculation of N sets of ALF filtering coefficients in the encoded frame. For each type of combination method, the N sets of ALF filtering coefficients and the rate-distortion cost (RD cost) of the encoded frame are calculated to determine whether or not to combine the Z CTUs in the encoded frame using ALF filtering. Here, the calculation method for the i-th set of ALF in each set of ALF filtering coefficients is as follows: For the current CTU combination method, the i-th type pixel in the CTU that undergoes ALF filtering is calculated using f, while the i-th type pixel in the other CTUs that do not undergo ALF filtering is not calculated using f, and the i-th set of ALF coefficients in the current combination method is calculated. It should be understood that the N sets of ALF filtering coefficients obtained may differ from one another depending on the combination method.
[0074] The RD cost for multiple combinations is compared, and the combination with the smallest RD cost is determined as the final combination. Furthermore, the N sets of ALF filtering coefficients obtained by calculating with this different combination are the ALF filtering coefficients with the best adaptability.
[0075] If the combination with the minimum RD cost is to perform ALF filtering on at least one of the Z CTUs, then the frame-level ALF marker bit of the encoded frame identifies that ALF filtering is performed, and the CTU-level ALF marker bits sequentially identify whether or not ALF filtering is performed on the CTU data. For example, if the marker bit identifies as 0, it means that ALF filtering is not performed, and if the marker bit identifies as 1, it means that ALF filtering is performed.
[0076] In particular, if the combination scheme with the minimum RD cost is one in which none of the Z CTUs are ALF filtered, then the encoded frame does not undergo ALF filtering, and the frame-level ALF marker bit of the encoded frame identifies that no ALF filtering is performed. In this case, the CTU-level ALF marker bit does not identify this.
[0077] It should be understood that the ALF in the embodiments of this application applies not only to the VVC standard but also to other block-based ALF technical solutions or standards.
[0078] ALF filtering coefficient coding determination Selectively, after calculating and obtaining N sets of ALF filtering coefficients using the current CTU combination method, ALF can decide whether or not to employ techniques such as coefficient merging based on the RD cost. This allows for encoding based on the aforementioned techniques without affecting the quality of the reconstructed image frame, further improving compression performance and reducing the number of bits required for the filtering coefficient.
[0079] To make it selectable, the following three decisions are made to this N set of ALF filtering coefficients. (1) Whether or not to merge different ALF filtering coefficients. (2) Whether or not to set the ALF filtering coefficient to zero. (3) The ALF filtering coefficients are encoded using either a differential coding method or a non-differential coding method.
[0080] Specifically, merging different ALF filtering coefficients means that different types of image blocks in the reconstructed frame use the same ALF filtering coefficient. When several types use the same filtering coefficient, the transmission of some filtering coefficient values in the bitstream is reduced, thereby improving encoding efficiency.
[0081] When the ALF filtering coefficient is set to zero, the reconstructed frame may contain certain types of pixel points, and the result is better than when ALF filtering is not used. In other words, the RD cost without ALF filtering is smaller than the RD cost with ALF filtering. In such situations, the filtering coefficient corresponding to these types of pixel points can be directly set to zero, reducing the transmission of some filtering coefficient values in the bitstream and thereby improving encoding efficiency.
[0082] In the encoding scheme, two encoding methods can be selected for the ALF filtering coefficients. The first non-differential encoding method directly writes the filtering coefficients to the bitstream. The other differential encoding method writes the first set of filtering coefficients to the bitstream, writes the result of subtracting the first set from the second set to the bitstream, then writes the coefficients obtained by subtracting the second set from the third set to the bitstream, and so on.
[0083] The options are to sequentially decide whether or not to merge the ALF filtering coefficients, whether or not to set them to zero, and to determine the encoding scheme, and the embodiments of this application do not limit the order of these three decisions.
[0084] In a preferred embodiment, the options are to first decide whether or not to merge, then decide whether or not to zero out, and finally determine the encoding scheme.
[0085] Specifically, in each decision, the RD cost of the encoded frame is calculated based on the current conditions, and the conditions corresponding to the minimum RD cost are determined to obtain the decision result.
[0086] For example, when deciding whether or not to merge ALF filtering coefficients, different pixel types are merged, and multiple sets of merged filtering coefficients are calculated for the merged pixel type based on the Wiener filtering principle. For example, an encoded frame has N types of pixels, corresponding to N sets of initial filtering coefficients, where N is a positive integer less than or equal to 25. Two or more sets of the N sets of pixel types are combined, and the result of this combination is a new merged filtering coefficient. For example, two sets of types are combined into one type to obtain N-1 sets of types, and then filtering coefficients are calculated for these types to obtain N-1 filters.
[0087] Selectively, different merging methods are employed to merge the N sets of initial filtering coefficients, and finally, N different types of merged combinations are obtained, where the i-th type of merged combination contains i sets of merged filtering coefficients, where each set of merged filtering coefficients corresponds to at least one set of initial filtering coefficients, and i is a positive integer less than or equal to N.
[0088] In the selectable aspects, in the embodiments of this application, a new merge filtering coefficient is calculated for each type of merge combination, and a decision is made regarding whether to set the merge filtering coefficients in multiple sets of merge filtering coefficients to zero in this merge combination format, and the encoding scheme.
[0089] Specifically, different selection methods are employed to select one or more merge filtering coefficients from a set of multiple merge filtering coefficients and set them to zero, or to choose not to set any merge filtering coefficients to zero, thereby obtaining multiple types of different combinations of filtering coefficients to set to zero, and calculating the RD cost for each different combination of filtering coefficients to set to zero. The specific combination of filtering coefficients to set to zero that has the minimum RD cost is obtained, and multiple sets of filtering coefficients to set to zero and not to zero are calculated for this combination.
[0090] Specifically, in situations where the first marker bit is used to determine whether or not to set the filtering coefficients to zero, if there is a situation where they should be set to zero, the second marker bit is used to determine whether or not to set the filtering coefficients of each pair to zero. When a pair of filtering coefficients is set to zero, ALF filtering is not performed on the pixel type corresponding to this pair of filtering coefficients, the marker bit identifies that the filtering coefficients of this pair should be set to zero, and the filtering coefficients of this pair are not written to the bitstream. If a pair of filtering coefficients is not set to zero, ALF filtering is performed on the pixel type corresponding to this pair of filtering coefficients, and the marker bit identifies that the filtering coefficients of this pair should not be set to zero. If the first marker bit indicates that there is no situation where the coefficients should be set to zero, the second marker bit is not transmitted.
[0091] Finally, based on the calculation of RD cost, the differential and non-differential coding schemes are determined for multiple sets of non-zero filtering coefficients, and the coding scheme with the minimum RD cost is obtained. For example, if the RD cost to be calculated is small for the differential coding scheme, the differential coding scheme is selected.
[0092] In merged combinations, the minimum RD cost is used to calculate the non-zero filtering coefficients and the differential / non-differential coding scheme for that merged combination. Based on this, the RD costs of multiple types of merged combinations are compared to determine the specific merged combination with the minimum RD cost, the multiple sets of filtering coefficients for that combination, and related filtering parameters such as the clip parameter.
[0093] After determining the merging method for multiple sets of filtering coefficients, whether to set them to zero or not, and the encoding method, during the encoding process, the syntax marker bits are used to identify the filtering coefficients corresponding to multiple types of pixels sequentially, specifically which sets of filtering coefficients to set to zero, and whether to use a differential or non-differential encoding method. During the decoding process, the syntax marker bits are decoded to obtain the corresponding information, and the corresponding decoding operation is performed accordingly.
[0094] The purpose of introducing differential coding to current technology is to reduce the number of bits required to encode filtering coefficients when encoding multiple sets of filtering coefficients, thereby improving compression performance. In particular, if there is a regular variation between multiple sets of ALF filtering coefficients, for example, if the difference between two sets of adjacent filtering coefficients is smaller than the difference between one of the sets of filtering coefficients, the number of bits required for encoding can be reduced. Otherwise, if the difference between two sets of filtering coefficients is larger than the difference between one of the sets of filtering coefficients, or if there is no regularity in the numerical values of the two sets of filtering coefficients, then employing differential coding cannot reduce the number of bits. In this case, non-differential coding is used, and the filtering coefficients are encoded directly.
[0095] In current ALF technology, there is no strong, disciplined change in numerical values between multiple sets of filtering coefficients, and the values of the filtering coefficients may be negative or integers. In other words, the difference between two sets of filtering coefficients is greater than some or all of the filtering coefficients of one of the sets. Therefore, when choosing between differential coding and non-differential coding, the probability of choosing differential coding is low. Furthermore, when encoding using differential coding, dependencies arise between the filtering coefficients. In the decoding process, if an error occurs in one of these coefficients during transmission, errors occur in all the coefficients that depend on this coefficient, leading to a decrease in the quality of the filtered image.
[0096] In addition, it is necessary to decide whether to adopt differential coding or non-differential coding by calculating the RD cost, and in the process of deciding whether to merge or set the filtering coefficients to zero, there are many related combination types, and for each type of combination type, it is necessary to determine whether the coding method is differential coding or non-differential coding by calculating the RD cost, so the calculation of the RD cost is large and affects the decision calculation time on the coding side.
[0097] More importantly, when it is necessary to select an encoding mode between differential and non-differential encoding schemes, the encoding mode information must be conveyed using syntax marker bits during the encoding process, which increases the number of bits in the bitstream and is detrimental to compression.
[0098] Therefore, the current ALF filtering coefficient encoding scheme is redundant and complex, affecting compression efficiency and operating time. In view of this, the embodiment of this application provides an improved technical solution.
[0099] The technical solution of the embodiment of this application can be used on both the encoding and decoding sides. Below, the technical solution of the embodiment of this application will be described from the perspective of the encoding side and the decoding side, respectively.
[0100] Figure 6 shows a schematic flowchart of the in-loop filtering method 200 of the embodiment of this application. This method 200 can be performed on the encoding side. For example, it can be performed when performing an encoding operation using the system 100 shown in Figure 1.
[0101] S210, determine the filtering coefficients for multiple sets of intra-loop filtering.
[0102] Selectable, as described above, the multiple sets of filtering coefficients of the in-loop filtering ALF are coefficient values in a Wiener filter that minimize the mean squared error between the reconstructed image frame and the original encoded image frame, obtained based on the Wiener filtering principle.
[0103] Selectively, the filter may have multiple shapes. For example, in the VVC standard, for the encoded frame luminance component, a filter including 13 filtering coefficients as shown in Figure 5a may be employed, where the 13 filtering coefficients constitute a set of filtering coefficients. For the encoded frame chromaticity component, for example, a filter including 7 filtering coefficients as shown in Figure 5b may be employed, where the 7 filtering coefficients constitute a set of filtering coefficients.
[0104] In the process of selecting the ALF (Alternatively Variable Filtering) within a loop, pixels in the encoded frame are classified, and different types of ALF filtering coefficients may be different. Each type of pixel corresponds to one set of ALF filtering coefficients for the filtering calculation. For example, in the VVC standard, pixels in an encoded frame are divided into up to 25 types, and the obtained ALF filtering coefficients are N sets, where N is an integer less than or equal to 25.
[0105] In addition, the filtering coefficients are calculated by employing a block-based intra-loop filtering method. As mentioned above, one or more sets of filtering coefficients are calculated in situations where different blocks are activated by intra-loop filtering switches at the control block level. For example, in the VVC standard, the CTU level is used as the block-level control unit, and N sets of filtering coefficients are calculated and obtained.
[0106] In the embodiments of this application, the multiple sets of filtering coefficients of the in-loop filtering ALF may be filtering coefficients for the luminance component of the encoded frame, or filtering coefficients for the chromaticity component of the encoded frame, and the embodiments of this application are not limited thereto.
[0107] Furthermore, in the embodiments of this application, the multiple sets of filtering coefficients for the intra-loop filtering may be intra-loop filtering coefficients calculated based on frames, intra-loop filtering coefficients calculated based on blocks, or intra-loop filtering coefficients calculated based on quadtrees, and the embodiments of this application are not limited to these.
[0108] S220, a non-differential encoding scheme is used to encode the multiple sets of filtering coefficients.
[0109] As mentioned above, when encoding multiple sets of filtering coefficients, it is possible to reduce the number of bits used during encoding by employing a differential encoding method for each set of filtering coefficients. However, it is not always possible to reduce the number of bits by employing a differential encoding method in all cases. Furthermore, in actual situations, the probability of employing a differential encoding method is small. In addition, in some cases, for example, the difference obtained after reducing two sets of filtering coefficients from each other is larger than the difference obtained from any one of the previous sets of filtering coefficients, and employing a differential encoding method would increase the number of bits. Therefore, in the embodiment of this application, it is possible to directly employ a non-differential encoding method to encode the multiple sets of filtering coefficients and improve encoding efficiency.
[0110] In addition, using a non-differential coding scheme eliminates dependencies between multiple sets of filtering coefficients, preventing errors from occurring in dependent sets of filtering coefficients during transmission and thus avoiding affecting the quality of the decoded image on the decoding side.
[0111] The selectable non-differential coding schemes include exponential Golomb coding, fixed-length coding, Unali coding, and the like.
[0112] Preferably, in the embodiment of this application, an exponential Golomb coding scheme is employed to encode multiple sets of filtering coefficients, which are then written to a bitstream, thereby achieving lossless compression of multiple sets of ALF filtering coefficients.
[0113] As an option, Figure 7 shows a schematic flowchart of the coding-side in-loop filtering method 500 of another embodiment of the present application.
[0114] The aforementioned loop filtering method 300 includes the following: S310, Determine the filtering coefficients for multiple sets of intra-loop filtering. S320, Do not select an encoding method for the multiple sets of filtering coefficients. S330, a non-differential encoding scheme is used to encode the multiple sets of filtering coefficients.
[0115] In the embodiment of this application, steps S310 and S330 may be the same as steps S210 and S220 in Figure 6, and after determining multiple sets of filtering coefficients, the encoding method for these multiple sets of filtering coefficients is not selected, but the multiple sets of filtering coefficients are encoded directly using a non-differential encoding method and written to the bitstream.
[0116] The coding method does not select an encoding scheme for multiple sets of filtering coefficients; in other words, the coding side does not calculate and select the best one among multiple types of encoding schemes. This avoids the decision calculation process, saving computational resources and coding time, and accelerating the coding speed without affecting coding efficiency.
[0117] For example, in a system where it is possible to select an encoding scheme for multiple sets of filtering coefficients, the optimal encoding scheme is determined by calculating the RD cost of the encoded frame for multiple types of encoding schemes and selecting the one with the smallest RD cost. On the other hand, the embodiment of this application does not perform the above-mentioned calculation and selection of RD cost.
[0118] The selection of the encoding scheme for the multiple sets of filtering coefficients includes, but is not limited to, a selection between differential encoding schemes and non-differential encoding schemes. Furthermore, it may also be a selection between multiple types of encoding schemes, such as specific exponential Golomb encoding schemes, and the embodiments of this application are not limited to this.
[0119] Selectively, in the intra-loop filtering method 200 and the intra-loop filtering method 300, the syntax elements of the intra-loop filtering do not include syntax elements that specify an encoding scheme for multiple sets of filtering coefficients.
[0120] When it is necessary to select an encoding method from multiple types of encoding methods, the syntax element to be encoded identifies the encoding method of the filtering coefficient, leaving at least one bit, and then encodes the syntax element that identifies this encoding method of the filtering coefficient and writes it to the bitstream.
[0121] In an optional embodiment, the syntax elements of the in-loop filtering do not include a syntax element indicating whether the encoding scheme for the multiple sets of filtering coefficients is differential or non-differential.
[0122] For example, the VVC standard employs the "alf_luma_coeff_delta_prediction_flag" syntax marker bit to identify whether the encoding method for the ALF filtering coefficients in the luminance component coding frame is differential coding or non-differential coding. Specifically, this syntax marker bit is a single unsigned integer occupying one bit. When alf_luma_coeff_delta_prediction_flag=0, the ALF filtering coefficients are encoded using non-differential coding, and when alf_luma_coeff_delta_prediction_flag=1, the ALF filtering coefficients are encoded using differential coding.
[0123] However, in the embodiments of this application, there is no need to decide and select an encoding scheme from among multiple types of encoding schemes, so the syntax element of the intra-loop filtering does not specify the encoding scheme for the multiple sets of filtering coefficients. For example, in the VCC standard, removing the syntax element "alf_luma_coeff_delta_prediction_flag" reduces the number of bits encoded and improves the encoding compression efficiency.
[0124] It should be understood that the syntax element for the intra-loop filtering in the embodiments of this application may be a syntax element for the encoded frame luminance component, without specifying an encoding scheme for multiple sets of filtering coefficients of the luminance component, and may also be a syntax element for the encoded frame chromaticity component, without specifying an encoding scheme for multiple sets of filtering coefficients of the chromaticity component. The embodiments of this application are not limited thereto.
[0125] Furthermore, the embodiments of this application can also be used for other in-loop filtering ALF encoding standards or encoding technical solutions other than VVC, and it should be understood that marker bits for identifying the encoding scheme of the filtering coefficients of the in-loop filtering ALF are removed in the syntax elements.
[0126] In the selectable steps S210 and S310 of the intra-loop filtering method 200 and the intra-loop filtering method 300, determining multiple sets of filtering coefficients for intra-loop filtering specifically includes deciding to merge multiple sets of initial filtering coefficients and deciding to set them to zero to obtain the multiple sets of filtering coefficients. Specifically, the intra-loop filtering method 300 will be explained as an example, as shown in Figure 8.
[0127] S311, Multiple types of merge combination methods are employed to merge the filtering coefficients in multiple sets of initial filtering coefficients, and multiple sets of merge filtering coefficients are calculated for each type of merge combination method in the multiple types of merge combination methods.
[0128] In the embodiments of this application, the multiple sets of initial filtering coefficients are multiple sets of initial filtering coefficients corresponding to the pixel type, obtained by calculating based on the Wiener filtering principle and the pixel type. Optionally, these initial filtering coefficients may be multiple sets of initial filtering coefficients obtained by calculating based on CTU blocks, or multiple sets of initial filtering coefficients obtained by calculating based on frames or quadtrees. This process can be described by referring to the specific ALF filtering process described above, which is not explained here.
[0129] For example, if the calculated pixel type is of type N, then there are N sets of corresponding initial filtering coefficients, and the i-th set of initial filtering coefficients in the N sets of initial filtering coefficients is for filtering the i-th type in pixels of type N, where i is a positive integer less than or equal to N. Selectively, in possible embodiments, N may be a positive integer less than or equal to 25.
[0130] At least two sets of these N sets of initial filtering coefficients are merged into one set, and all pixels corresponding to these at least two sets of initial filtering coefficients are filtered using the merged filtering coefficient after merging. Selectively, the at least two sets of initial filtering coefficients to be merged are adjacent filtering coefficients, for example, in a possible combination scheme, the 1st to 3rd sets of 25 sets of initial filtering coefficients are merged, the 4th to 8th sets are merged, the 9th to 15th sets are merged, and the 16th to 25th sets are merged.
[0131] Selectable is obtained by performing different merge combinations and initial decisions on N sets of filtering coefficients, thereby obtaining a total of V-type merge combinations, and then recalculating multiple sets of merge filtering coefficients in the V-type merge combination based on the Wiener filtering principle. Here, the merge filtering coefficients in the V-type merge combination are K1 to K V Groups available, K1~K V These are all positive integers less than or equal to N, and K1 to K V Each merge filtering coefficient in a set corresponds to one or more types of pixels. In particular, if there are no combinations of filtering coefficients in the N sets of filtering coefficients, the merge filtering coefficient is the same as the initial filtering coefficient, and one set of filtering coefficients corresponds to one type of pixel.
[0132] S312, it is determined whether or not to set the filtering coefficient in the multiple sets of merge filtering coefficients to zero, and multiple sets of merge filtering coefficients that are not set to zero are obtained for each type of merge combination method in the multiple types of merge combination methods.
[0133] Specifically, when a set of filtering coefficients is set to zero, this set of filtering coefficients is not used to perform a filtering operation on the pixel, and the pixel value remains unchanged. Specifically, syntax element marker bits are used to identify whether or not there is a set of filtering coefficients to set to zero among multiple sets of filtering coefficients, and if there is a set of filtering coefficients to set to zero among multiple sets of filtering coefficients, other marker bits are used to identify whether or not each set in the multiple sets of filtering coefficients should be set to zero.
[0134] Specifically, in a merge combination scheme of one type, the merge filtering coefficients of multiple sets are not all set to zero. Instead, one or more sets of merge filtering coefficients are set to zero, resulting in a combination where the total number of zeros is obtained for multiple types.
[0135] Selectively, based on rate distortion optimization (RDO) techniques, it is determined whether or not to set the filtering coefficients in the multiple sets of merge filtering coefficients to zero. That is, the rate distortion cost (RD cost) is calculated for the encoded frames in the multiple types of zero combinations, and the zero combination with the smallest RD cost is the ultimately determined zero combination scheme. For example, in a possible embodiment, there are 10 sets of merge filtering coefficients in the current merge combination scheme, and based on the RD cost calculation, it is determined that the 1st to 3rd sets and the 5th to 7th sets of merge filtering coefficients are set to zero in the situation with the smallest RD cost, and the others are not set to zero.
[0136] Specifically, the calculation method for rate distortion cost (RD cost) is as follows:
number
[0137] Here, D (distortion) represents the degree of distortion between the reconstructed image frame using current technology and the original image encoded frame, and is usually expressed as the sum of square errors (SSE), the sum of absolute differences (SAD), or the sum of absolute transformed differences (SATD) after the Hadamard transformation. R (rate) represents the number of bits required for encoding using current technology. R represents the degree of data compression; the lower R, the higher the degree of data compression and the greater the distortion. The higher R, the less distortion, but requires a larger memory space, thus increasing the pressure on network transmission. Therefore, it is necessary to find a balance point between R and D to optimize the compression effect. Accordingly, the Lagrangian form is used to evaluate the weight of R and D in the RD cost, and the Lagrangian multiplier is used to multiply A and R by this RD cost to evaluate the weight of the number of bits, which shows that it reduces the encoding distortion caused by one bit rate.
[0138] After deciding whether or not to set a value to zero, the filtering coefficient set that is set to zero is not encoded, thus reducing the number of bits used to encode the filtering coefficients and improving the compression efficiency of the encoding.
[0139] S313, In the multiple types of merge combination methods, a specific merge combination method is determined, and multiple sets of specific merge filtering coefficients that are not set to zero in the specific merge combination method are obtained.
[0140] From the above explanation, the following can be understood: For each type of merge combination scheme, the optimal combination scheme for achieving zero using RD cost and its RD cost value are calculated and obtained. The RD cost values of the optimal zero combination schemes for the V-type merge combination schemes are then compared, and the merge combination scheme corresponding to the smallest RD cost is determined as the optimal specific merge combination scheme. Multiple sets of specific merge filtering coefficients that do not achieve zero in this specific merge combination scheme are then obtained.
[0141] In the merged combination method, the number of merged filtering coefficients is smaller than the number of initial filtering coefficients, significantly reducing the number of encoded bits for the filtering coefficients and further improving encoding compression efficiency.
[0142] In the selectable configuration, in the embodiments of this application, the multiple sets of specific merge filtering coefficients are the multiple sets of filtering coefficients in the loop filtering method 400 and the loop filtering method 500. In the selectable configuration, the encoding method for the multiple sets of specific merge filtering coefficients is not selected, and the multiple sets of specific merge filtering coefficients are encoded directly using a non-differential encoding method.
[0143] Selectively identifies the pixel type corresponding to each set of filtering coefficients in this set of specific merge filtering coefficients.
[0144] For example, after calculating the RD cost, seven sets of merge filtering coefficients are determined, and pixels of types 1 to 5 correspond to the first set of merge filtering coefficients, pixels of types 6 to 9 correspond to the second set of filtering coefficients, pixels of type 10 correspond to the third set of filtering coefficients, pixels of types 11 to 14 correspond to the fourth set of filtering coefficients, pixels of types 15 to 21 correspond to the fifth set of filtering coefficients, pixels of types 22 to 23 correspond to the sixth set of filtering coefficients, and pixels of types 24 to 25 correspond to the seventh set of filtering coefficients. In the encoding process, the filtering coefficient sets corresponding to the 25 types of pixels can be encoded as [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7].
[0145] Selectively, identify whether there is a set of merge filtering coefficients to be set to zero in the multiple sets of merge filtering coefficients in this particular merge combination scheme, and if so, further identify whether each set of merge filtering coefficients in the multiple sets of merge filtering coefficients should be set to zero.
[0146] For example, after calculating the RD cost, seven sets of merge filtering coefficients are determined. Here, the first and second sets of filtering coefficients are set to zero, while the other five sets of filtering coefficients are not set to zero. A syntax element is encoded as 1 to identify whether or not there is a set of merge filtering coefficients to be set to zero, and a syntax element is encoded as [1, 1, 0, 0, 0, 0, 0] to identify whether or not the merge filtering coefficients of each set are set to zero.
[0147] Furthermore, for example, if, after calculating the RD cost for seven sets of filtering coefficients, it is ultimately determined that none of the seven sets of filtering coefficients should be set to zero, the syntax element that identifies whether or not there is a set of filtering coefficients to be set to zero is encoded as 0, and the syntax element that identifies whether or not to set each set of filtering coefficients to zero is not encoded.
[0148] In the technical solution provided in the embodiment of this application, there is no need to select an encoding method from among multiple types of encoding methods, including differential encoding and non-differential encoding. Therefore, there is no need to calculate the RD cost for multiple sets of merge filtering coefficients based on two types of encoding methods, non-differential encoding and differential encoding. Consequently, the time required to calculate the specific merge combination method for the minimum RD cost is significantly reduced.
[0149] In addition, when calculating the RD cost, the number of marker bits used to identify the encoding scheme is reduced, so that the number of bits required for the image encoding frame does not include the number of bits for the syntax element that indicates the encoding scheme for the multiple sets of filtering coefficients. For example, it does not include the number of bits for the syntax element that indicates whether the encoding scheme for the multiple sets of filtering coefficients is a differential encoding scheme or a non-differential encoding scheme. Selectively, the number of bits for this syntax element that indicates the encoding scheme for the multiple sets of filtering coefficients is at least 1.
[0150] As described above, in the nonlinear ALF filtering process, when deciding whether to merge multiple sets of initial filtering coefficients, it is necessary to calculate and obtain a modification parameter corresponding to the merge filtering coefficient based on the RD cost, and to encode a modification (clip) index parameter corresponding to the modification parameter and write it to the bitstream. The clip index parameter is an integer between 0 and 3.
[0151] In the current VVC standard reference software VTM, an exponential Golomb coding scheme is used to encode the clip index parameter and write it to the bitstream. This requires complex calculations of the exponential Golomb order, and the large number of bits required for encoding affects encoding efficiency.
[0152] To address the aforementioned issues, Figure 9 shows a schematic flowchart of another embodiment of the in-loop filtering method 400 of this application. This method 400 can be performed on the encoding side. For example, it can be performed when performing an encoding operation using the system 100 shown in Figure 1.
[0153] S410, finalize the modified index parameters for intra-loop filtering.
[0154] In the embodiments of this application, the modified index parameter for the in-loop filtering is a modified index parameter corresponding to the modification (clip) parameter in the clip operation in nonlinear in-loop filtering. During the encoding process, it is necessary to encode the modified index parameter corresponding to the modification parameter and write it to the bitstream. The specific nonlinear in-loop filtering process can be found in the specific means described above and will not be described here.
[0155] In the embodiments of this application, the number of modification index parameters is equal to the number of modification parameters. Therefore, if there are N modification parameters, it is sufficient that different modification index parameters can be identified and distinguished from each other. The value range of the modification index parameters includes, but is not limited to, integers between 0 and N-1. It should be understood that the embodiments of this application do not limit the numerical range.
[0156] Furthermore, it should be understood that in the embodiments of this application, the correction index parameter may be only a luminance correction index parameter of the encoded frame luminance component, or only a chromaticity correction index parameter of the encoded frame chromaticity component, or a shared correction index parameter of the encoded frame luminance component and the encoded frame chromaticity component.
[0157] For example, as mentioned above, in the VVC standard, for the encoded frame luminance component, one luminance correction parameter is selected from {1024, 181, 32, 6}, and for the encoded frame chromaticity component, one chromaticity correction parameter is selected from {1024, 161, 25, 4}. In this case, both the encoded frame luminance component and the encoded frame chromaticity component must have the correction index corresponding to their respective correction parameters encoded and written to the bitstream.
[0158] Except in the circumstances described above, the selectable luminance correction parameters for the encoded frame luminance component and the chromaticity correction parameters for the encoded frame chromaticity component are the same. The selectable sets of the luminance correction parameters for the encoded frame luminance component and the chromaticity correction parameters for the encoded frame chromaticity component are either {1024, 181, 32, 6} or either {1024, 161, 25, 4}.
[0159] If selectable, the luminance correction parameter for the encoded frame luminance component and the chromaticity correction parameter for the encoded frame chromaticity component are parameters selected from the same parameter list. If selectable, the parameter list includes at least one numerical value from 1024, 181, 32, and 6. Alternatively, if selectable, the parameter list includes at least one numerical value from 1024, 161, 25, and 4.
[0160] For the selectable options, the correction parameters for both the encoded frame luminance component and the encoded frame chromaticity component are either selected from {1024, 181, 32, 6}, or selected from {1024, 181, 32}. In particular, identical correction index parameters correspond to identical correction parameters; that is, when the correction index parameter for the encoded frame luminance component is the same as the correction index parameter for the encoded frame chromaticity component, the corresponding correction parameter for the encoded frame luminance component is the same as the correction parameter for the encoded frame chromaticity component.
[0161] For example, when the luminance correction index parameter and the chromaticity correction index parameter are both 1, the correction parameter for the encoded frame luminance component and the correction parameter for the encoded frame chromaticity component are both 181. When the luminance correction index parameter and the chromaticity correction index parameter are both 2, the correction parameter for the encoded frame luminance component and the correction parameter for the encoded frame chromaticity component are both 32.
[0162] By adopting this method, the design of the correction parameters for chromaticity and luminance components can be standardized, reducing the complexity of the coder-decoder design and improving encoding performance.
[0163] S420, the modified index parameter is encoded using a non-exponential Golomb coding scheme.
[0164] Exponential Golomb coding is a variable-length coding mode that constructs codewords according to a set of rules. It divides all digits into different sets of the same size, assigning shorter code lengths to sets with smaller code values, while the code lengths within the same set are essentially equal, and the size of the sets increases exponentially. Furthermore, exponential Golomb coding can be extended up to the K order, i.e., it is a K-order exponential Golomb coding. The table below is a schematic table of K-order exponential Golomb coding, where x is the digit to be coded.
[0165] [Table 1]
[0166] As shown in Table 1, for small numbers, the number of bits required for exponential Golomb coding increases significantly as the number of numbers to be coded increases. Therefore, exponential Golomb coding is not applicable to coding small numbers. Compared to non-exponential Golomb coding methods such as fixed-length coding, it requires more coded bits and necessitates further order calculations in the coding and decoding parts, making the calculations complex and disadvantageous for improving coding efficiency.
[0167] Accordingly, in the embodiment of this application, a non-exponential Golomb coding scheme is employed to encode the modified index parameters, and the encoded parameters are written to a bitstream, thereby avoiding the need to use the order determination of the exponential Golomb coding scheme, reducing the complexity of encoding, and speeding up the calculation of the RD cost on the encoding side.
[0168] The selectable non-exponential Golomb coding scheme includes, but is not limited to, fixed-length coding schemes, unary coding schemes, or truncated unary (TU) coding schemes.
[0169] In the following explanation, we will use the example that in the VVC standard, both the number of modified index parameters and the number of corresponding modified index parameters are 4.
[0170] The modification index parameter can use four values and is used to distinguish between different modification parameters.
[0171] Selectable, these four numbers are any four different numbers, preferably, the range of these four numbers is small and includes, but is not limited to, one of the following: 0 to 3, 1 to 4, -1 to 2, -2 to 1, or -3 to 0.
[0172] In a possible embodiment, a fixed-length coding scheme is employed to encode and divide the four numbers.
[0173] For example, if we use a 2-bit fixed-length code to encode the four numbers 0, 1, 2, and 3, then 0 will be encoded as 00, 1 as 01, 2 as 10, and 3 as 11.
[0174] The encoded 00, 01, 10, and 11 are for distinguishing between four numerical values, and 00, 01, 10, and 11 can further identify other numerical values, for example, 00 may be further encoded as 1, 2, or 3, and 01 may also be encoded as 0, 2, or 3, and the embodiments of this application are not limited thereto.
[0175] In addition to using the aforementioned 2-bit fixed-length code to encode the four numbers 0, 1, 2, and 3, it is also possible to use a 3-bit or other-bit fixed-length code to encode four other numerical values. For example, a 3-bit fixed-length code can be used to encode 1 through 4, and the embodiments of this application are not limited thereto.
[0176] In other possible embodiments, a unary encoding method is adopted to encode and divide four numbers.
[0177] Optionally, a unary encoding method is adopted to encode these four numbers 0, 1, 2, and 3. For non-binary unsigned integer value codes x≥0, the unary codeword is composed of adding one trailing '0' bit to x '1' bits. For example, by adopting the unary encoding method to encode these four numbers 0, 1, 2, and 3, 0, 10, 110, and 1110 are obtained.
[0178] In other possible embodiments, a truncated unary encoding method is adopted to encode and divide four numbers.
[0179] Optionally, a truncated unary encoding method is adopted to encode these four numbers 0, 1, 2, and 3. The cutoff value S is known. For non-binary unsigned integer value codes 0≤x<S, binaryization is performed in truncated unary. When the non-binary unsigned integer value code is equal to x = S, the binaryization result is composed of all 1s and the length is S. For example, when the cutoff value S = 3, by adopting the truncated unary encoding method to encode these four numbers 0, 1, 2, and 3, 0, 10, 110, and 111 are obtained.
[0180] Particularly, when the correction parameter is selected from one of 1024, 181, 32, and 6, the four index parameters respectively correspond to one of the numbers 1024, 181, 32, and 6. Optionally, the four index parameters can perform corresponding identification according to a certain order. For example, index parameter 0 corresponds to 1024, index parameter 1 corresponds to 181, index parameter 2 corresponds to 32, and index parameter 3 corresponds to 6. Or, index parameter 3 corresponds to 1024, index parameter 2 corresponds to 181, index parameter 1 corresponds to 32, and index parameter 0 corresponds to 6.
[0181] The four index parameters can be identified in any order, not necessarily in any particular sequence, and can be randomly assigned. For example, index parameter 0 may correspond to 1024, index parameter 2 to 181, index parameter 1 to 32, and index parameter 3 to 6. Alternatively, index parameter 2 may correspond to 1024, index parameter 3 to 181, index parameter 0 to 32, and index parameter 1 to 6, and the embodiments of this application are not limited to these.
[0182] When one modification parameter is selected from 1024, 161, 25, and 4, the four index parameters each correspond to one of these numbers, and it should be understood that the identification correspondence method can be found by referring to the identification method described above and will not be explained here.
[0183] Furthermore, in other video standards or technical solutions, the number of modification parameters for in-loop filtering is N, and the modification index parameter is used to distinguish different modification parameters by employing N numerical values. It is understood that these N numerical values can be encoded and distinguished by employing one of the following: fixed-length coding, unali coding, or truncated unali coding. The coding schemes for these N numerical values and the correspondence between these N numerical values and the modification parameters can be found in the VVC standard mentioned above, while the coding schemes for the four numerical values and their correspondence with the modification parameters will not be explained here.
[0184] In selectable embodiments, the number of encoded bits for a non-exponential Golomb coding scheme, such as a fixed-length coding scheme, a unali coding scheme, or a truncated unali coding scheme, is 4 or less. When the number of bits for a non-exponential Golomb coding scheme is smaller than the number of bits for an exponential Golomb coding scheme, the coding efficiency of coding and decoding can be increased, and the coding speed can be accelerated.
[0185] Selectively, as shown in Figure 10, determining the modified index parameter for in-loop filtering in step S410 in an embodiment of this application includes the following:
[0186] S411, based on the non-exponential Golomb coding scheme, the RD cost is calculated to determine the modified index parameters for intra-loop filtering.
[0187] Specifically, based on a non-exponential Golomb coding scheme, the RD cost is calculated to determine the correction parameters corresponding to each filtering coefficient in the intra-loop filtering, and their corresponding correction index parameters.
[0188] As mentioned above, in nonlinear loop filtering, each filtering coefficient corresponds to a single modification parameter. In the coefficient merge determination process, different merge combinations and initial decisions are made for N sets of filtering coefficients, resulting in a total of V-type merge combination schemes. Based on the Wiener filtering principle, multiple sets of merge filtering coefficients in the V-type merge combination scheme are recalculated. Selectably, N is a positive integer less than or equal to 25.
[0189] In the embodiment of this application, based on the RD cost, a modification parameter corresponding to each filtering coefficient in the multiple sets of merge filtering coefficients is calculated based on the multiple sets of merge filtering coefficients obtained by recalculating multiple sets of merge filtering coefficients in a V-type merge combination scheme. In the RD cost calculation process, the encoding scheme for the modification index parameter corresponding to the modification parameter is a non-exponential Golomb encoding scheme, such as a fixed-length encoding scheme.
[0190] In the RD cost calculation process, the number of bits calculated based on the non-exponential Golomb coding scheme is less than the number of bits calculated based on the exponential Golomb coding scheme, and the exponential Golomb order determination is unnecessary. This reduces the RD cost calculation time and is advantageous for improving coding efficiency.
[0191] Selectively, as shown in Figure 11, the in-loop filtering method 500 in the embodiment of this application includes the following: S510: Determine the filtering coefficients for multiple sets of intra-loop filtering. S520, finalize the modified index parameters for intra-loop filtering. S530 employs a non-differential encoding scheme to encode multiple sets of filtering coefficients. S540, the modified index parameter is encoded using a non-exponential Golomb coding scheme.
[0192] Selectively, step S510 can be the same as or approximate to steps S210 and S310 in the aforementioned in-loop filtering methods 200 and 300. Step S520 can be the same as or approximate to steps S220 and 330. Selectively, steps S530 and S540 can be the same as or approximate to steps S410 and S420 in the aforementioned in-loop filtering method 400. Specific embodiments can be found by referring to the aforementioned technical solutions and are not described here.
[0193] In the embodiments of this application, the encoding method for multiple sets of filtering coefficients in loop filtering and the encoding method for modified index parameters are optimized to increase encoding efficiency and accelerate encoding speed from both sides, without affecting encoding quality.
[0194] As described above, the technical solution of the embodiment of this application has been explained from the perspective of the encoding side. Next, the technical solution of the embodiment of this application will be explained from the perspective of the decoding side. In addition to the following explanation, explanations that are general to both the encoding side and the decoding side can be found in the above explanation, and for the sake of simplicity, they will not be explained here.
[0195] Figure 12 shows a schematic flowchart of the in-loop filtering method 600 of the embodiment of this application. This method 600 can be performed on the decoding side. For example, it can be performed when the decoding operation is performed by the system 100 shown in Figure 1.
[0196] S610 obtains the bitstream with in-loop filtering.
[0197] S620, the instruction information indicating the number of sets of filtering coefficients in the bitstream is decoded and it is determined that there are multiple sets of filtering coefficients.
[0198] In the embodiment of this application, pixels in the decoded frame are divided into multiple types, with one type of pixel corresponding to one set of filtering coefficients. For this reason, the bitstream of the in-loop filtering includes instruction information indicating the filtering coefficients. For example, in the VVC standard reference software VTM, the instruction information MAX_NUM_ALF_CLASSES is decoded to obtain the number of sets of filtering coefficients in the in-loop filtering. When the number of sets is greater than 1, i.e., when it is determined that there are multiple sets of filtering coefficients, step S630 is executed.
[0199] S630 employs a non-differential encoding scheme to decode the bitstream of filtering coefficients in the bitstream and obtain multiple sets of filtering coefficients.
[0200] Specifically, the encoding side directly uses a non-differential encoding method for encoding, and correspondingly, the decoding side directly decodes the bitstream of filtering coefficients using a non-differential decoding method. The resulting sets of filtering coefficients do not require any further computation and can be used directly for filtering operations. On the other hand, if a differential decoding method is used for decoding, the decoded values must be further computed to obtain sets of filtering coefficients for filtering. Furthermore, there is a strong dependency between the sets of filtering coefficients, and if an error occurs during the data transmission process, it will greatly affect the sets of filtering coefficients on the decoding side, which is detrimental to the filtering effect and image quality. Therefore, compared to using a differential decoding method, filtering the bitstream of filtering coefficients using a non-differential decoding method can improve the quality of the in-loop filtered image on the decoding side.
[0201] The selectable non-differential decoding methods include exponential Golomb decoding, fixed-length decoding, Unali decoding, and the like.
[0202] In the selectable configuration, the embodiment of this application employs an exponential Golomb decoding method to decode multiple sets of filtering coefficients.
[0203] Selectively, the encoding scheme of the bitstream of the filtering coefficients is not decoded before decoding the bitstream of the filtering coefficients in the bitstream using the non-differential decoding scheme.
[0204] In a possible embodiment, the bitstream includes a bitstream of syntax elements that specify the encoding scheme for the bitstream of the filtering coefficients, but the bitstream of syntax elements is not decoded.
[0205] In other possible embodiments, the bitstream does not contain any bitstream of syntax elements that indicate the encoding scheme for the bitstream of the filtering coefficients.
[0206] In this embodiment, optionally, the bitstream does not include a bitstream of a syntax element indicating whether the coding method of the bitstream of the filtering coefficient is a differential coding method or a non-differential coding method.
[0207] For example, in the VVC standard, the "alf_luma_coeff_delta_prediction_flag" syntax marker bit is adopted to identify whether the coding method of the filtering coefficient of the in-loop filtering ALF in the luminance component of the image frame is differential coding or non-differential coding. This syntax marker bit is a signed integer without a sign and occupies one bit.
[0208] In the embodiments of the present application, the bitstream does not include the bitstream of this "alf_luma_coeff_delta_prediction_flag" syntax element, and there is no need to decode the bitstream of this syntax element, reducing the decoding time.
[0209] It should be understood that the bitstream of the syntax element indicating the coding method of the bitstream of the filtering coefficient in the embodiments of the present application may be the bitstream of the syntax element of the decoded frame luminance component, or may be the bitstream of the syntax element of the decoded frame chrominance component. The embodiments of the present application do not limit this.
[0210] Furthermore, it should be understood that the embodiments of the present application can also be used for other in-loop filtering ALF coding standards or coding technical solutions other than VVC, and the embodiments of the present application do not limit this either.
[0211] Optionally, the plurality of sets of filtering coefficients correspond to the in-loop filtering method 200 on the encoding side described above and the plurality of sets of filtering coefficients in the in-loop filtering method, which will not be described here.
[0212] As an option, Figure 13 presents a schematic flowchart of a decoding-side in-loop filtering method 700 of another embodiment of the present application, the in-loop filtering method 700 being a nonlinear in-loop filtering method.
[0213] The aforementioned loop filtering method 700 includes the following: S710 obtains the bitstream with in-loop filtering. S720 employs a non-exponential Golomb decoding method to decode the bitstream of the modified index parameters in the bitstream and obtain the modified index parameters for the in-loop filtering.
[0214] In the embodiment of this application, the modified index parameter for the in-loop filtering is a modified index parameter that corresponds to the modified (clip) parameter in the modified clip operation in nonlinear in-loop filtering.
[0215] In the embodiments of this application, the modified index parameter obtained by decoding may refer to the modified index parameter in the aforementioned encoding-side in-loop filtering method 400, which will not be described in detail here.
[0216] In the embodiments of this application, the number of modified index parameters is equal to the number of modification parameters. Therefore, if there are N modification parameters, the number of modified index parameters obtained by decoding is also N. The value range of the modified index parameters includes, but is not limited to, integers between 0 and N-1. It should be understood that the embodiments of this application do not limit the numerical range.
[0217] Furthermore, it should be understood that in the embodiments of this application, the modified index parameter obtained by decoding may be only the luminance modified index parameter of the decoded frame luminance component, or only the chromaticity modified index parameter of the decoded frame chromaticity component, or it may be a modified index parameter shared by the decoded frame luminance component and the decoded frame chromaticity component.
[0218] For example, in the VVC standard, the corresponding luminance correction parameter obtained by decoding the bitstream of the luminance correction index parameter of the decoded frame luminance component is one of {1024, 181, 32, 6}, and the corresponding chromaticity correction parameter obtained by decoding the bitstream of the chromaticity correction index parameter of the decoded frame chromaticity component is one of {1024, 161, 25, 4}.
[0219] Except in the circumstances described above, the selectable luminance correction parameters for the luminance component of the decoded frame and the chromaticity correction parameters for the chromaticity component of the decoded frame are the same. The selectable sets of the luminance correction parameters for the luminance component of the decoded frame and the chromaticity correction parameters for the chromaticity component of the decoded frame are either {1024, 181, 32, 6} or either {1024, 161, 25, 4}.
[0220] Selectable, the luminance correction parameter for the luminance component of the decoded frame and the chromaticity correction parameter for the chromaticity component of the decoded frame are parameters in the same parameter list. Selectable, the parameter list may include at least one numerical value from 1024, 181, 32, and 6. Alternatively, selectable, the parameter list may further include at least one numerical value from 1024, 161, 25, and 4.
[0221] Selectively, the correction parameters for the decoded frame luminance component and the decoded frame chromaticity component may both be one of {1024, 181, 32, 6}, or both may be one of {1024, 181, 32}, in particular, when the correction index parameter of the decoded frame luminance component obtained by decoding is the same as the correction index parameter of the decoded frame chromaticity component, the correction parameter of the decoded frame luminance component is correspondingly the same as the correction parameter of the decoded frame chromaticity component.
[0222] For example, when the luminance correction index parameter and chromaticity correction index parameter obtained after decoding are 1, the correction parameter for the luminance component of the encoded frame and the correction parameter for the chromaticity component of the encoded frame are both 181. When the luminance correction index parameter and chromaticity correction index parameter obtained after decoding are 2, the correction parameter for the luminance component of the encoded frame and the correction parameter for the chromaticity component of the encoded frame are both 32.
[0223] By employing this method for decryption, the decryption process can be simplified, the decryption speed can be accelerated, and the decryption performance can be improved.
[0224] In the embodiment of this application, a non-exponential Golomb decoding method is employed for decoding, thereby avoiding calculations for the exponential Golomb order on the decoding side, accelerating the decoding speed, and optimizing the decoding performance.
[0225] Selectively, the non-exponential Golomb decoding scheme includes, but is not limited to, a fixed-length decoding scheme, a unali decoding scheme, or a truncated unali decoding scheme. The fixed-length decoding, unali decoding, and truncated unali decoding are the inverse processes of the fixed-length coding, unali coding, and truncated unali coding described above.
[0226] Specifically, we will explain this using the example that in the VVC standard, both the number of modified index parameters and the corresponding number of modified index parameters are 4.
[0227] In a possible embodiment, a fixed-length decoding method is adopted to decode the bit stream of the modified index parameter.
[0228] For example, the bit stream of the modified index parameter corresponding to one modified index parameter is a 2-bit bit stream, and this 2-bit bit stream is one of 00, 01, 10, 11. The corresponding modified index parameters obtained by adopting fixed-length decoding for 00, 01, 10, 11 are 0, 1, 2, 3.
[0229] Optionally, based on a specific fixed-length decoding rule, 00 can be further decoded into 1, 2, or 3, and 01 can also be decoded into 0, 2, or 3, etc. The embodiments of this application do not limit this.
[0230] Optionally, in addition to the bit stream of the modified index parameter being a 2-bit bit stream as described above, the bit stream of the modified index parameter can further be a 3-bit or other number of bits. For example, decoding a 3-bit bit stream to obtain 1 to 4, etc. The embodiments of this application do not limit this.
[0231] In other possible embodiments, a unary decoding method is adopted to decode the bit stream of the modified index parameter.
[0232] Optionally, the bit stream of the modified index parameter corresponding to one modified index parameter is one of 0, 10, 110, 1110. The corresponding modified index parameters obtained by adopting unary decoding for 0, 10, 110, 1110 are 0, 1, 2, 3.
[0233] In other possible embodiments, a truncated unary decoding method is adopted to decode the bit stream of the modified index parameter.
[0234] For a selectable correction index parameter, the bitstream of the correction index parameter corresponding to one of the following is 0, 10, 110, or 111, and the corresponding correction index parameters obtained by employing truncated unali decoding for 0, 10, 110, and 111 are 0, 1, 2, and 3.
[0235] In particular, if the modification parameter is one of 1024, 181, 32, or 6, then each of the four index parameters corresponds to one of these numbers. Selectively, the four index parameters can perform corresponding identifications in a certain order. For example, index parameter 0 corresponds to 1024, index parameter 1 corresponds to 181, index parameter 2 corresponds to 32, and index parameter 3 corresponds to 6. Or, index parameter 3 corresponds to 1024, index parameter 2 corresponds to 181, index parameter 1 corresponds to 32, and index parameter 0 corresponds to 6.
[0236] Selectively, the four index parameters can perform random identification without following a fixed order. For example, index parameter 0 may correspond to 1024, index parameter 2 to 181, index parameter 1 to 32, and index parameter 3 to 6. Alternatively, index parameter 2 may correspond to 1024, index parameter 3 to 181, index parameter 0 to 32, and index parameter 1 to 6, and the embodiments of this application are not limited thereto.
[0237] If the modification parameter is one of 1024, 161, 25, or 4, then the four index parameters will each correspond to one of these numbers, and it should be understood that the identification correspondence method can be found by referring to the identification method described above, and will not be explained here.
[0238] Furthermore, it is understood that in other video standards or technical solutions, the bitstream of the modified index parameter corresponding to the modified index parameter can be decoded to obtain one of N numerical values, and this bitstream of the modified index parameter can be decoded using one of the following methods: fixed-length decoding, unali decoding, or truncated unali decoding. The decoding methods for these N numerical values and the correspondence between these N numerical values and the modified parameter can be found in the aforementioned VVC standard, while the decoding methods for the four numerical values and their correspondence with the modified parameter will not be explained here.
[0239] In selectable embodiments, the number of decoded bits for non-exponential Golomb decoding methods, such as fixed-length decoding, unari decoding, or truncated unari decoding, is 4 or less. When the number of bits for non-exponential Golomb decoding is smaller than the number of bits for exponential Golomb decoding, the decoding efficiency of encoding and decoding can be increased, and the decoding speed can be accelerated.
[0240] As an option, Figure 14 shows a schematic flowchart of the in-loop filtering method 800 on the decoding side in another embodiment of the present application.
[0241] As shown in Figure 14, in the embodiment of this application, the in-loop filtering method 800 includes the following: S810 obtains the bitstream with in-loop filtering. S820 decodes the instruction information indicating the number of sets of filtering coefficients in the bitstream and confirms that there are multiple sets of filtering coefficients. S830 employs a non-differential decoding method to decode the bitstream of filtering coefficients in the bitstream and obtain multiple sets of filtering coefficients. S840 employs a non-exponential Golomb decoding method to decode the bitstream of the modified index parameters in the bitstream and obtain the modified index parameters for the in-loop filtering.
[0242] Selectively, steps S810, S820, and S830 can be the same as or approximate to steps S610, S620, and 630 of the aforementioned in-loop filtering method 600. Step S840 can be the same as or approximate to step S720 in the aforementioned in-loop filtering method 700. Specific embodiments can be found by referring to the aforementioned technical solutions and are not described here.
[0243] In the embodiments of this application, the decoding method for multiple sets of filtering coefficients in loop filtering and the decoding method for modified index parameters are optimized to improve decoding efficiency from both sides and accelerate the decoding speed.
[0244] The above describes in detail embodiments of the coding-side in-loop filtering method of this application with reference to Figures 6 to 11. Below, an embodiment of the coding-side in-loop filtering apparatus of this application will be described in detail with reference to Figures 15 to 16. It should be understood that the embodiments of the apparatus correspond to the embodiments of the method, and similar descriptions can be found by referring to the embodiments of the method.
[0245] Figure 15 is a schematic block diagram of the coding-side in-loop filtering device 20 of an embodiment of the present application. Selectively, this in-loop filtering device 20 can correspond to in-loop filtering method 200 or 300. Selectively, this in-loop filtering device 20 can further correspond to an in-loop filtering method combining in-loop filtering methods 200 and 400, or an in-loop filtering method combining in-loop filtering methods 300 and 400, or an in-loop filtering method 500.
[0246] As shown in Figure 15, the in-loop filtering device 20 has a processor 21 and a memory 22. Memory 22 can be used to store programs, and processor 21 can be used to execute programs stored in memory. The filtering coefficients for multiple sets of filtering within the loop are determined, and an operation is performed to encode the filtering coefficients using a non-differential coding scheme.
[0247] Optionally, in the embodiments of this application, the processor 21 may be a processor or controller of an electronic device having an in-loop filtering device 20.
[0248] Selectable means that, specifically, the processor 21 does not select an encoding method for the multiple sets of filtering coefficients before encoding the multiple sets of filtering coefficients using the non-differential encoding method.
[0249] Selectively, the syntax elements of the intra-loop filtering do not include syntax elements that specify the encoding scheme for the multiple sets of filtering coefficients.
[0250] Selectively, the syntax elements of the intra-loop filtering do not include a syntax element indicating whether the encoding scheme for the multiple sets of filtering coefficients is a differential encoding scheme or a non-differential encoding scheme.
[0251] Selectable, the marker bit of the syntax element indicating whether the encoding scheme for the multiple sets of filtering coefficients is the differential encoding scheme or the non-differential encoding scheme is 0 or 1.
[0252] Selectable means that the processor 21 does not calculate the rate distortion cost of the encoded frame based on the encoding scheme of the multiple sets of filtering coefficients, and does not select the encoding scheme of the multiple sets of filtering coefficients based on the minimum rate distortion cost.
[0253] The selectability means that the processor 21 does not calculate the rate distortion cost of the encoded frame based on the differential encoding scheme and the non-differential encoding scheme, and does not select the differential encoding scheme or the non-differential encoding scheme based on the minimum rate distortion cost.
[0254] Selectively, the processor 21 employs the exponential Golomb coding scheme to encode the multiple sets of filtering coefficients, and then writes the encoded values of the multiple sets of filtering coefficients to a bitstream.
[0255] Selectively, the processor 21 employs multiple types of merge combination schemes to merge filtering coefficients in multiple sets of initial filtering coefficients, and calculates and obtains multiple sets of merge filtering coefficients in each type of merge combination scheme among the multiple types of merge combination schemes. Determine whether or not to set the filtering coefficients in the multiple sets of merge filtering coefficients to zero, and obtain multiple sets of merge filtering coefficients that are not set to zero in each type of merge combination method in the multiple types of merge combination methods. In the aforementioned multiple types of merge combination methods, the purpose is to determine a specific merge combination method and to obtain multiple sets of specific merge filtering coefficients that are not set to zero in the aforementioned specific merge combination method.
[0256] In terms of selectability, the processor 21 specifically employs different selection methods to select a merge filtering coefficient from the multiple sets of merge filtering coefficients and set it to zero, thereby obtaining different combinations of filtering coefficients to set to zero. Based on the aforementioned non-differential coding scheme, the rate distortion cost of coded frames is calculated for different combinations of filtering coefficients that are set to zero, and multiple sets of filtering coefficients that are not set to zero are determined to obtain the combination of filtering coefficients that sets to zero with the minimum rate distortion cost.
[0257] Selectively, the processor 21 calculates the rate distortion cost of the encoded frame in the multiple types of merge combination schemes based on the non-differential coding scheme, and determines and obtains the multiple sets of specific merge filtering coefficients that do not make the rate distortion cost zero in the specific merge combination scheme that minimizes the rate distortion cost.
[0258] Selectively, the processor 21 calculates the rate distortion cost based on the number of bits required to encode the encoded frame, and the number of bits required to encode the encoded frame does not include the number of bits of syntax elements indicating whether the encoding scheme of the multiple sets of filtering coefficients is a differential encoding scheme or a non-differential encoding scheme.
[0259] Selectable, the multiple sets of filtering coefficients are N sets of filtering coefficients for the luminance components of the encoded frame, where N is a positive integer less than or equal to 25.
[0260] Selectable, the multiple sets of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
[0261] Selectable, each set of filtering coefficients in the set of filtering coefficients includes 13 values.
[0262] Selectively, the in-loop filtering is nonlinear in-loop filtering, and the processor 21 further, This method determines the corrected index parameter for the nonlinear loop filtering and encodes the corrected index parameter using a non-exponential Golomb coding scheme.
[0263] For the value of the modification index parameter to be selectable, it must be an integer between 0 and 3.
[0264] For the selection to work, the number of encoded bits in the non-exponential Golomb coding scheme is 4 or less.
[0265] The non-exponential Golomb coding scheme can be a fixed-length coding scheme, a unali coding scheme, or a truncated unali coding scheme.
[0266] Selectable is the non-exponential Golomb coding scheme, which is the fixed-length coding scheme, and the number of coded bits for the fixed-length coding scheme is 2.
[0267] Selectable, the non-exponential Golomb coding scheme is the truncated unali coding scheme, and the number of coded bits for the truncated unali coding scheme is 3 or less.
[0268] Selectively, the processor 21 calculates the rate distortion cost of the encoded frame based on the non-exponential Golomb coding scheme before encoding the modified index parameters using the non-exponential Golomb coding scheme.
[0269] Selectively, the processor 21 does not calculate the rate distortion cost of the encoded frame based on the exponential Golomb coding scheme before encoding the modified index parameter using the non-exponential Golomb coding scheme.
[0270] Selectively, the processor 21 is for encoding the modified index parameter using the non-exponential Golomb coding scheme and then writing the encoded value of the modified index parameter to the bitstream.
[0271] Selectable, one of the modification index parameters corresponds to one of the in-loop filtering modification parameters, and one of the in-loop filtering modification parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. In-loop filtering is performed based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
[0272] Selectable, the correction index parameter includes a luminance correction index parameter for the encoded frame luminance component and a chromaticity correction index parameter for the encoded frame chromaticity component. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the encoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the encoded frame. When the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
[0273] For the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter to be selectable, they are parameters selected from the same parameter list.
[0274] Selectable, the parameter list includes at least one number from 1024, 181, 32, and 6.
[0275] Figure 16 is a schematic block diagram based on another encoding-side in-loop filtering device 30 of the embodiment of this application, which is an in-loop filtering device on the video encoding side, and optionally this in-loop filtering device 20 can correspond to in-loop filtering method 400. Optionally this in-loop filtering device 30 can further correspond to an in-loop filtering method combining in-loop filtering methods 400 and 200, or an in-loop filtering method combining in-loop filtering methods 400 and 300, or an in-loop filtering method 500.
[0276] As shown in Figure 16, the in-loop filtering device 30 has a processor 31 and a memory 32. Memory 32 can be used to store programs, and processor 31 can be used to execute programs stored in memory. The modified index parameters for the intra-loop filtering are determined, and an operation is performed to encode the modified index parameters using a non-exponential Golomb coding scheme.
[0277] For the value of the modification index parameter to be selectable, it must be an integer between 0 and 3.
[0278] For the selection to work, the number of encoded bits in the non-exponential Golomb coding scheme is 4 or less.
[0279] The non-exponential Golomb coding scheme can be a fixed-length coding scheme, a unali coding scheme, or a truncated unali coding scheme.
[0280] Selectable is the non-exponential Golomb coding scheme, which is the fixed-length coding scheme, and the number of coded bits for the fixed-length coding scheme is 2.
[0281] Selectable, the non-exponential Golomb coding scheme is the truncated unali coding scheme, and the number of coded bits for the truncated unali coding scheme is 3 or less.
[0282] Selectively, the processor 31 calculates the rate distortion cost of the encoded frame based on the non-exponential Golomb coding scheme before specifically employing the non-exponential Golomb coding scheme to encode the modified index parameters.
[0283] Selectively, the processor 31 does not calculate the rate distortion cost of the encoded frame based on the exponential Golomb coding scheme before encoding the modified index parameter using the non-exponential Golomb coding scheme.
[0284] Selectively, the processor 31 is configured to encode the modified index parameter using the non-exponential Golomb coding scheme, and then write the encoded value of the modified index parameter to the bitstream.
[0285] Selectively, the processor 31 further determines multiple sets of filtering coefficients for the in-loop filtering. This method employs a non-differential coding scheme to encode the aforementioned multiple sets of filtering coefficients.
[0286] Selectable means that, specifically, the processor 31 does not select an encoding method for the multiple sets of filtering coefficients before encoding the multiple sets of filtering coefficients using the non-differential encoding method.
[0287] Selectively, the syntax elements of the intra-loop filtering do not include syntax elements that specify the encoding scheme for the multiple sets of filtering coefficients.
[0288] Selectively, the syntax elements of the intra-loop filtering do not include a syntax element indicating whether the encoding scheme for the multiple sets of filtering coefficients is a differential encoding scheme or a non-differential encoding scheme.
[0289] Selectable, the marker bit of the syntax element indicating whether the encoding scheme for the multiple sets of filtering coefficients is the differential encoding scheme or the non-differential encoding scheme is 0 or 1.
[0290] Specifically, the processor 31 does not calculate the rate distortion cost of the encoded frame based on the encoding scheme of the multiple sets of filtering coefficients, nor does it select the encoding scheme of the multiple sets of filtering coefficients based on the minimum rate distortion cost.
[0291] Specifically, the processor 31 does not calculate the rate distortion cost of the encoded frame based on the differential encoding scheme and the non-differential encoding scheme, and does not select the differential encoding scheme and the non-differential encoding scheme based on the minimum rate distortion cost.
[0292] Selectively, the processor 31 employs the exponential Golomb coding scheme to encode the multiple sets of filtering coefficients, and then writes the encoded values of the multiple sets of filtering coefficients to a bitstream.
[0293] Selectively, the processor 31 employs multiple types of merge combination schemes to merge filtering coefficients in multiple sets of initial filtering coefficients, and calculates and obtains multiple sets of merge filtering coefficients in each type of merge combination scheme among the multiple types of merge combination schemes. Determine whether or not to set the filtering coefficients in the multiple sets of merge filtering coefficients to zero, and obtain multiple sets of merge filtering coefficients that are not set to zero in each type of merge combination method in the multiple types of merge combination methods. In the aforementioned multiple types of merge combination methods, the purpose is to determine a specific merge combination method and to obtain multiple sets of specific merge filtering coefficients that are not set to zero in the aforementioned specific merge combination method.
[0294] Specifically, the processor 31 employs different selection methods to select and set to zero a merge filtering coefficient from the multiple sets of merge filtering coefficients, thereby obtaining different combinations of filtering coefficients to set to zero. Based on the aforementioned non-differential coding scheme, the rate distortion cost of coded frames is calculated for different combinations of filtering coefficients that are set to zero, and multiple sets of filtering coefficients that are not set to zero are determined to obtain the combination of filtering coefficients that sets to zero with the minimum rate distortion cost.
[0295] Selectively, the processor 31 calculates the rate distortion cost of the encoded frame in the multiple types of merge combination schemes based on the non-differential encoding scheme, and determines and obtains the multiple sets of specific merge filtering coefficients that do not make the rate distortion cost zero in the specific merge combination scheme that minimizes the rate distortion cost.
[0296] Selectively, the processor 31 calculates the rate distortion cost based on the number of bits required to encode the encoded frame, wherein the number of bits required to encode the encoded frame does not include the number of bits of syntax elements indicating whether the encoding method of the multiple sets of filtering coefficients is the differential encoding method or the non-differential encoding method.
[0297] Selectable, the multiple sets of filtering coefficients are N sets of filtering coefficients for the luminance components of the encoded frame, where N is a positive integer less than or equal to 25.
[0298] Selectable, the multiple sets of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
[0299] Selectable, each set of filtering coefficients in the set of filtering coefficients includes 13 values.
[0300] Selectable, one of the modification index parameters corresponds to one of the in-loop filtering modification parameters, and one of the in-loop filtering modification parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. In-loop filtering is performed based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
[0301] Selectively, the in-loop filtering is nonlinear in-loop filtering, and the correction index parameters include a luminance correction index parameter for the encoded frame luminance component and a chromaticity correction index parameter for the encoded frame chromaticity component. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the encoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the encoded frame. When the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
[0302] For the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter to be selectable, they are parameters selected from the same parameter list.
[0303] Selectable, the parameter list includes at least one number from 1024, 181, 32, and 6.
[0304] The above describes in detail an embodiment of the in-loop filtering method on the decoding side of this application with reference to Figures 12 to 14. Below, an embodiment of the in-loop filtering apparatus of this application will be described in detail with reference to Figures 17 to 18. It should be understood that the embodiments of the apparatus correspond to the embodiments of the method, and similar descriptions can be found by referring to the embodiments of the method.
[0305] Figure 17 is a schematic block diagram of the in-loop filtering device 40 on the decoding side of an embodiment of the present application. Optionally, this in-loop filtering device 40 can correspond to in-loop filtering method 600. Optionally, this in-loop filtering device 40 can further correspond to an in-loop filtering method combining in-loop filtering methods 600 and 700, or to in-loop filtering method 800.
[0306] As shown in Figure 17, the in-loop filtering device 40 has a processor 41 and a memory 42. Memory 42 can be used to store programs, and processor 41 can be used to execute programs stored in memory. Obtain the bitstream of the in-loop filtering, The instruction information indicating the number of filtering coefficient sets in the bitstream is decoded, and it is determined that there are multiple filtering coefficient sets. A non-differential decoding method is employed to decode the bitstream of filtering coefficients in the bitstream and perform the operation of obtaining multiple sets of filtering coefficients.
[0307] Selectively, the processor 41 does not decode the encoding scheme of the bitstream of filtering coefficients before decoding the bitstream of filtering coefficients in the bitstream using the non-differential decoding scheme.
[0308] Selectively, the bitstream does not include a bitstream of syntax elements that indicate the encoding scheme for the bitstream of the filtering coefficients.
[0309] Selectively, the bitstream does not include a bitstream of syntax elements indicating whether the encoding scheme of the bitstream of the filtering coefficients is differential encoding or non-differential encoding.
[0310] Selectively, the marker bits of the bitstream of the syntax element indicating whether the encoding scheme of the bitstream of the filtering coefficients is the differential encoding scheme or the non-differential encoding scheme are 0 or 1.
[0311] The selectable non-differential decoding method is the exponential Golomb decoding method.
[0312] Selectable, the multiple sets of filtering coefficients are N sets of filtering coefficients for the luminance components of the decoded frame, where N is a positive integer less than or equal to 25.
[0313] Selectable, the multiple sets of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
[0314] Selectable, each set of filtering coefficients in the set of filtering coefficients includes 13 values.
[0315] Selectively, the in-loop filtering is nonlinear in-loop filtering, and the processor 41 further, This method employs a non-exponential Golomb decoding scheme to decode the bitstream of the modified index parameters in the bitstream, thereby obtaining the modified index parameters for the in-loop filtering.
[0316] For the value of the modification index parameter to be selectable, it must be an integer between 0 and 3.
[0317] For the selectable method, the number of decoded bits in the non-exponential Golomb decoding method is 4 or less.
[0318] The non-exponential Golomb decoding method is selectable to be one of the following: fixed-length decoding, unali decoding, or truncated unali decoding.
[0319] Selectable is the non-exponential Golomb decoding method, which is the fixed-length decoding method, and the number of decoded bits for the fixed-length decoding method is 2.
[0320] Selectable is the non-exponential Golomb decoding method, which is the truncated unali decoding method, and the number of decoded bits for the truncated unali decoding method is 3 or less.
[0321] Selectable, one of the modification index parameters corresponds to one of the in-loop filtering modification parameters, and one of the in-loop filtering modification parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. In-loop filtering is performed based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
[0322] Selectable, the correction index parameter includes a luminance correction index parameter for the luminance component of the decoded frame, and a chromaticity correction index parameter for the chromaticity component of the decoded frame. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the decoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the decoded frame. When the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
[0323] For the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter to be selectable, they are parameters selected from the same parameter list.
[0324] Selectable, the parameter list includes at least one number from 1024, 181, 32, and 6.
[0325] Figure 18 is a schematic block diagram of another in-loop filtering device 50 on the decoding side of an embodiment of the present application. Optionally, this in-loop filtering device 50 can correspond to in-loop filtering method 700. Optionally, this in-loop filtering device 50 can further correspond to an in-loop filtering method combining in-loop filtering methods 700 and 600, or to in-loop filtering method 800.
[0326] As shown in Figure 18, the in-loop filtering device 50 has a processor 51 and a memory 52. Memory 52 can be used to store programs, and processor 51 can be used to execute programs stored in memory. Obtain the bitstream of the in-loop filtering, A non-exponential Golomb decoding scheme is employed to decode the bitstream of the modified index parameters in the bitstream, and an operation is performed to obtain the modified index parameters for the intra-loop filtering.
[0327] For the value of the modification index parameter to be selectable, it must be an integer between 0 and 3.
[0328] For the selectable method, the number of decoded bits in the non-exponential Golomb decoding method is 4 or less.
[0329] The non-exponential Golomb decoding method is selectable to be one of the following: fixed-length decoding, unali decoding, or truncated unali decoding.
[0330] Selectable is the non-exponential Golomb decoding method, which is the fixed-length decoding method, and the number of decoded bits for the fixed-length decoding method is 2.
[0331] Selectable is the non-exponential Golomb decoding method, which is the truncated unali decoding method, and the number of decoded bits for the truncated unali decoding method is 3 or less.
[0332] Selectively, the processor 51 further decodes instruction information indicating the number of sets of filtering coefficients in the bitstream and determines that there are multiple sets of filtering coefficients. This method employs a non-differential decoding scheme to decode the bitstream of filtering coefficients in the bitstream to obtain multiple sets of filtering coefficients.
[0333] Selectively, the processor 51 does not decode the encoding scheme of the bitstream of filtering coefficients before decoding the bitstream of filtering coefficients in the bitstream using the non-differential decoding scheme.
[0334] Selectively, the bitstream does not include a bitstream of syntax elements that indicate the encoding scheme for the bitstream of the filtering coefficients.
[0335] Selectively, the bitstream does not include a bitstream of syntax elements indicating whether the encoding scheme of the bitstream of the filtering coefficients is differential encoding or non-differential encoding.
[0336] Selectively, the marker bits of the bitstream of the syntax element indicating whether the encoding scheme of the bitstream of the filtering coefficients is the differential encoding scheme or the non-differential encoding scheme are 0 or 1.
[0337] The selectable non-differential decoding method is the exponential Golomb decoding method.
[0338] Selectable, the multiple sets of filtering coefficients are N sets of filtering coefficients for the luminance components of the decoded frame, where N is a positive integer less than or equal to 25.
[0339] Selectable, the multiple sets of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
[0340] Selectable, each set of filtering coefficients in the set of filtering coefficients includes 13 values.
[0341] Selectable, one of the modification index parameters corresponds to one of the in-loop filtering modification parameters, and one of the in-loop filtering modification parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. In-loop filtering is performed based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
[0342] Selectable, the correction index parameter includes a luminance correction index parameter for the luminance component of the decoded frame, and a chromaticity correction index parameter for the chromaticity component of the decoded frame. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the decoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the decoded frame. When the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
[0343] For the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter to be selectable, they are parameters selected from the same parameter list.
[0344] Selectable, the parameter list includes at least one number from 1024, 181, 32, and 6.
[0345] Figure 19 is a schematic block diagram of a nonlinear in-loop filtering device 60 based on an embodiment of this application. This in-loop filtering device 60 can be used in a video encoding device and can also be used in a video decoding device.
[0346] As shown in Figure 19, the nonlinear loop filtering apparatus 60 has a processor 61 and a memory 62. Memory 62 can be used to store programs, and processor 61 can be used to execute programs stored in memory. The operation is performed to determine the in-loop filtering correction parameters for the luminance component and the chromaticity component of the image frame. Here, the in-loop filtering correction parameter for the luminance component and the in-loop filtering correction parameter for the chromaticity component are parameters selected from the same parameter list.
[0347] Selectable, the parameter list includes at least one number from 1024, 181, 32, and 6.
[0348] Selectively, the processor 61 determines the luminance correction index parameter of the luminance component and the chromaticity index parameter of the chromaticity component. Based on the luminance correction index parameter, the in-loop filtering correction parameter for the luminance component is determined, and the chromaticity index parameter corresponds to the in-loop filtering correction parameter for the chromaticity component. When the luminance correction index parameter is the same as the chromaticity correction index parameter, the in-loop filtering correction parameter for the chromaticity component is the same as the in-loop filtering correction parameter for the luminance component.
[0349] Selectively, the image frame is an encoded frame and the nonlinear loop filtering device 60 is provided within the video encoding device, or the image frame is a decoded frame and the nonlinear loop filtering device 60 is provided within the video decoding device.
[0350] Embodiments of this application further provide an electronic device which may have the in-loop filtering apparatus of each embodiment of this application described above.
[0351] It is understood that the processor in the embodiments of this application may be an integrated circuit chip and has signal processing capability. In the implementation process, each step of the embodiments of the method described above can be completed by hardware integrated logic circuits or software commands in the processor. The processor described above includes, but is not limited to, general-purpose processors, CPUs, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gates, or transistor logic devices, discrete hardware components. Each method, step, and logic block diagram disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor may be a microprocessor, or this processor may be any ordinary processor, etc. The steps of the method disclosed in the embodiments of this application can be directly embodied and executed as a hardware decoder processor, or executed as a combination of hardware and software modules in a decoder processor. The software module may reside in a storage medium known in the art, such as random memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, or registers. This storage medium resides in memory, and the processor reads the information in memory and combines its hardware to complete the steps of the method described above.
[0352] It can be understood that the memory in the embodiments of this application may be volatile memory, non-volatile memory, or may include both volatile and non-volatile memory. Here, the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), or flash memory. The volatile memory may be random access memory (RAM) and may be used as external high-speed buffer memory. By illustrative but non-limiting description, many forms of RAM can be used, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). Note that the memory of the systems and methods described herein includes, but is not limited to, these and any other suitable types of memory.
[0353] Embodiments of this application further provide a computer-readable storage medium that stores one or more programs, each having commands, and when executed on a portable electronic device containing multiple application programs, the portable electronic device can be made to execute the methods of the embodiments shown in Figures 6 to 14.
[0354] Embodiments of this application further provide a computer program having commands that, when executed on a computer, enable the computer to perform the methods of the embodiments shown in Figures 6 to 14.
[0355] Embodiments of this application further provide a chip having input and output ports, at least one processor, at least one memory, and a bus, wherein the at least one memory is for storing commands, and the at least one processor is for executing the methods of the embodiments shown in Figures 6 to 14 by calling commands in the at least one memory.
[0356] Those skilled in the art will recognize, based on the exemplary units and algorithmic steps described in the embodiments disclosed herein, that these can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are ultimately performed in hardware or software manner will depend on the specific application of the technical solution and the design constraints. Those skilled in the art will recognize that the described functions can be implemented by using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
[0357] Those skilled in the art will clearly understand, for ease of explanation and simplification, that the specific operating processes of the systems, apparatus, and units described above can be referenced from the corresponding processes in the embodiments of the aforementioned methods, and will not be described here.
[0358] In the various embodiments provided in this application, it should be understood that the systems, apparatus, and methods disclosed can be implemented in other ways. For example, the embodiments of the apparatus described above are illustrative only. For example, the division of the units is merely a division of logic functions, and in actual implementation, other division methods may exist, for example, multiple units or components may be combined or integrated into other systems, or some features may be omitted or not performed. Also, the shown or considered combinations or direct combinations or communication connections between them may be by some interface, and the indirect combinations or communication connections between apparatus or units may be electrical, mechanical or in other forms.
[0359] The unit described as the separating member may or may not be physically separated, and the member shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed among multiple network units. Depending on the actual needs, some or all of these units can be selected to achieve the objective of the solution of this embodiment.
[0360] In addition, each functional unit in each embodiment of this application can be integrated into a single processing unit, each unit can exist physically independently, or two or more units can be integrated into a single unit.
[0361] When the aforementioned functions are implemented in the form of a software function unit and sold or used as an independent product, they can be stored in a single computer-readable storage medium. Based on this understanding, the technical solutions of this application, in essence, or in part, of the prior art, or a part thereof, can be embodied in the form of a software product, the computer software product stored in a storage medium, and having a plurality of commands for causing a single computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of this application. On the other hand, the aforementioned storage medium includes various media capable of storing program code, such as USB memory, portable hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0362] The foregoing describes only specific embodiments of the present application; however, the scope of protection of this application is not limited thereto. Any person skilled in the art will readily conceive of any modifications or substitutions within the scope of the technology disclosed herein, and such modifications or substitutions will fall within the scope of protection of this application. Accordingly, the scope of protection of this application will be based on the scope of protection of the claims described above.
Claims
1. Determining multiple sets of filtering coefficients for intra-loop filtering, A method for filtering within a loop, comprising: encoding the multiple sets of filtering coefficients using a non-differential encoding scheme.
2. The method according to claim 1, wherein the encoding method for the multiple sets of filtering coefficients is not selected before encoding the multiple sets of filtering coefficients using the non-differential encoding method.
3. The method according to claim 1 or 2, wherein the syntax element for the intra-loop filtering does not include a syntax element that specifies the encoding scheme for the plurality of sets of filtering coefficients.
4. The method according to claim 3, wherein the syntax elements of the intra-loop filtering do not include a syntax element indicating whether the encoding method of the plurality of sets of filtering coefficients is a differential encoding method or the non-differential encoding method.
5. The method according to claim 4, wherein the marker bit of the syntax element indicating whether the encoding method for the plurality of sets of filtering coefficients is the differential encoding method or the non-differential encoding method is 0 or 1.
6. Not selecting an encoding method for the aforementioned multiple sets of filtering coefficients means that The method according to any one of claims 2 to 5, comprising not calculating the rate distortion cost of an encoded frame based on the encoding scheme of the plurality of sets of filtering coefficients, and not selecting the encoding scheme of the plurality of sets of filtering coefficients based on the minimum rate distortion cost.
7. The method according to claim 6, wherein the rate distortion cost of the encoded frame is not calculated based on the differential encoding method and the non-differential encoding method, and the differential encoding method or the non-differential encoding method is not selected based on the minimum rate distortion cost.
8. The non-differential coding scheme is an exponential Golomb coding scheme, and the encoding of the multiple sets of filtering coefficients by adopting the non-differential coding scheme is: The method according to any one of claims 1 to 7, comprising encoding the plurality of filtering coefficients using the exponential Golomb coding scheme, and then writing the encoded values of the plurality of filtering coefficients to a bitstream.
9. The aforementioned multiple sets of filtering coefficients are multiple sets of specific merge filtering coefficients, and determining the multiple sets of filtering coefficients for the intra-loop filtering means that This involves employing multiple types of merge combination methods to merge the filtering coefficients in multiple sets of initial filtering coefficients, and calculating and obtaining multiple sets of merge filtering coefficients for each type of merge combination method in the multiple types of merge combination methods. Determine whether or not to set the filtering coefficients in the aforementioned multiple sets of merge filtering coefficients to zero, and obtain multiple sets of merge filtering coefficients that are not set to zero in each type of merge combination method in the aforementioned multiple types of merge combination methods, The method according to any one of claims 1 to 8, comprising determining a specific merge combination method in the plurality of types of merge combination methods, and obtaining a plurality of sets of specific merge filtering coefficients that are not set to zero in the specific merge combination method.
10. Determining whether or not to set the filtering coefficients in the aforementioned multiple sets of merge filtering coefficients to zero is: By employing different selection methods, select a merge filtering coefficient from the multiple sets of merge filtering coefficients and set it to zero, thereby obtaining a combination of different filtering coefficients to set to zero. The method according to claim 9, comprising: calculating the rate distortion cost of an encoded frame for different combinations of zero filtering coefficients based on the non-differential coding scheme; and determining and obtaining multiple sets of non-zero filtering coefficients for the combination of zero filtering coefficients that minimizes the rate distortion cost.
11. In the aforementioned multiple types of merge combination schemes, determining a specific merge combination scheme and obtaining multiple sets of specific merge filtering coefficients that are not set to zero in the aforementioned specific merge combination scheme is: The method according to claim 9 or 10, comprising calculating the rate distortion cost of the encoded frame in the plurality of types of merge combination schemes based on the non-differential encoding scheme, and determining and obtaining the plurality of sets of specific merge filtering coefficients that do not set to zero in the specific merge combination scheme with the minimum rate distortion cost.
12. The method according to claim 10 or 11, wherein the rate distortion cost is calculated based on the number of bits required to encode the encoded frame, wherein the number of bits required to encode the encoded frame does not include the number of bits of the marker bits of the syntax element that indicates whether the encoding method of the plurality of sets of filtering coefficients is a differential encoding method or a non-differential encoding method.
13. The method according to any one of claims 1 to 12, wherein the plurality of filtering coefficients are N sets of filtering coefficients of the encoded frame luminance components, where N is a positive integer less than or equal to 25.
14. The method according to any one of claims 1 to 13, wherein the plurality of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
15. The method according to any one of claims 1 to 14, wherein each set of filtering coefficients in the plurality of sets of filtering coefficients includes the value of 13.
16. The aforementioned in-loop filtering is nonlinear in-loop filtering, and the method is To determine the corrected index parameters for the nonlinear loop filtering, The method according to any one of claims 1 to 15, further comprising encoding the modified index parameter using a non-exponential Golomb coding scheme.
17. The method according to claim 16, wherein the value of the modified index parameter is an integer between 0 and 3.
18. The method according to claim 16 or 17, wherein the number of encoded bits in the non-exponential Golomb coding scheme is 4 or less.
19. The method according to any one of claims 16 to 18, wherein the non-exponential Golomb coding scheme is a fixed-length coding scheme, a unali coding scheme, or a truncated unali coding scheme.
20. The method according to claim 19, wherein the non-exponential Golomb coding scheme is the fixed-length coding scheme, and the number of coded bits of the fixed-length coding scheme is 2.
21. The method according to claim 19, wherein the non-exponential Golomb coding scheme is the truncated unali coding scheme, and the number of coded bits of the truncated unali coding scheme is 3 or less.
22. Determining the corrected index parameters for the nonlinear loop filtering is: The method according to any one of claims 16 to 21, comprising: calculating the rate distortion cost of the encoded frame based on the non-exponential Golomb coding scheme before encoding the modified index parameter using the non-exponential Golomb coding scheme; and determining the modified index parameter based on the rate distortion cost.
23. The method according to any one of claims 16 to 22, wherein the rate distortion cost of the encoded frame is not calculated based on the exponential Golomb coding scheme before encoding the modified index parameter using the non-exponential Golomb coding scheme.
24. The method according to any one of claims 16 to 23, wherein the modified index parameter is encoded using the non-exponential Golomb coding scheme, and the encoded value of the modified index parameter is written to a bitstream.
25. One of the aforementioned modified index parameters corresponds to one of the in-loop filtering modified parameters, and one of the aforementioned in-loop filtering modified parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. The method according to any one of claims 16 to 24, further comprising performing in-loop filtering based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
26. The correction index parameter includes a luminance correction index parameter for the encoded frame luminance component and a chromaticity correction index parameter for the encoded frame chromaticity component. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the encoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the encoded frame. The method according to any one of claims 16 to 25, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
27. The method according to claim 26, wherein the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter are parameters selected from the same parameter list.
28. The parameter list mentioned above is: The method according to claim 27, wherein the numerical value includes at least one of 1024, 181, 32, and 6.
29. Obtaining the bitstream of the loop-filtered data, The instruction information indicating the number of filtering coefficient sets in the bitstream is decoded, and it is determined that there are multiple filtering coefficient sets. A method for filtering within a loop, comprising: employing a non-differential decoding scheme to decode a bitstream of filtering coefficients in the bitstream to obtain multiple sets of filtering coefficients.
30. The method according to claim 29, wherein the encoding scheme of the bitstream of the filtering coefficients is not decoded before decoding the bitstream of the filtering coefficients in the bitstream using the non-differential decoding method.
31. The method according to claim 29 or 30, wherein the bitstream does not include a bitstream of syntax elements that indicate the encoding scheme for the bitstream of the filtering coefficients.
32. The method according to claim 31, wherein the bitstream does not include a bitstream of syntax elements indicating whether the encoding scheme of the bitstream of the filtering coefficients is a differential encoding scheme or a non-differential encoding scheme.
33. The method according to claim 32, wherein the marker bit of the bitstream of the syntax element indicating whether the encoding method of the bitstream of the filtering coefficient is the differential encoding method or the non-differential encoding method is 0 or 1.
34. The method according to any one of claims 29 to 33, wherein the non-differential decoding method is an exponential Golomb decoding method.
35. The method according to any one of claims 29 to 34, wherein the plurality of filtering coefficients are N sets of filtering coefficients of the luminance components of the decoded frame, where N is a positive integer less than or equal to 25.
36. The method according to any one of claims 29 to 35, wherein the plurality of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
37. The method according to any one of claims 29 to 36, wherein each set of filtering coefficients in the plurality of sets of filtering coefficients includes 13 values.
38. The in-loop filtering is the nonlinear in-loop filtering, and the method is The method according to any one of claims 29 to 37, further comprising: employing a non-exponential Golomb decoding scheme to decode the bitstream of the modified index parameter in the bitstream to obtain the modified index parameter of the nonlinear in-loop filtering.
39. The method according to claim 38, wherein the value of the modified index parameter is an integer between 0 and 3.
40. The method according to claim 38 or 39, wherein the number of decoded bits in the non-exponential Golomb decoding method is 4 or less.
41. The method according to any one of claims 38 to 40, wherein the non-exponential Golomb decoding method is one of a fixed-length decoding method, a unali decoding method, or a truncated unali decoding method.
42. The method according to claim 41, wherein the non-exponential Golomb decoding method is the fixed-length decoding method, and the number of decoded bits of the fixed-length decoding method is 2.
43. The method according to claim 41, wherein the non-exponential Golomb decoding method is the truncated unali decoding method, and the number of decoded bits of the truncated unali decoding method is 3 or less.
44. One of the aforementioned modified index parameters corresponds to one of the in-loop filtering modified parameters, and one of the aforementioned in-loop filtering modified parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. The method according to any one of claims 38 to 43, further comprising performing in-loop filtering based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
45. The aforementioned correction index parameters include a luminance correction index parameter for the luminance component of the decoded frame and a chromaticity correction index parameter for the chromaticity component of the decoded frame. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the decoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the decoded frame. The method according to any one of claims 38 to 44, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
46. The method according to claim 45, wherein the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter are parameters selected from the same parameter list.
47. The parameter list mentioned above is: The method according to claim 46, wherein the numerical value includes at least one of 1024, 181, 32, and 6.
48. Determine the corrected index parameters for the intra-loop filtering. A method of intra-loop filtering, comprising: encoding the modified index parameter using a non-exponential Golomb coding scheme.
49. The method according to claim 48, wherein the value of the modified index parameter is an integer between 0 and 3.
50. The method according to claim 48 or 49, wherein the number of encoded bits in the non-exponential Golomb coding scheme is 4 or less.
51. The method according to any one of claims 48 to 50, wherein the non-exponential Golomb coding scheme is a fixed-length coding scheme, a unali coding scheme, or a truncated unali coding scheme.
52. The method according to claim 51, wherein the non-exponential Golomb coding scheme is the fixed-length coding scheme, and the number of coded bits of the fixed-length coding scheme is 2.
53. The method according to claim 51, wherein the non-exponential Golomb coding scheme is the truncated unali coding scheme, and the number of coded bits of the truncated unali coding scheme is 3 or less.
54. Determining the corrected index parameters for the intra-loop filtering is: The method according to any one of claims 48 to 53, comprising: calculating the rate distortion cost of the encoded frame based on the non-exponential Golomb coding scheme before encoding the modified index parameter using the non-exponential Golomb coding scheme; and determining the modified index parameter based on the rate distortion cost.
55. The method according to any one of claims 48 to 54, wherein the rate distortion cost of the encoded frame is not calculated based on the exponential Golomb coding scheme before encoding the modified index parameter using the non-exponential Golomb coding scheme.
56. The method according to any one of claims 48 to 55, wherein the modified index parameter is encoded using the non-exponential Golomb coding scheme, and the encoded value of the modified index parameter is written to a bitstream.
57. The aforementioned method, Determining multiple sets of filtering coefficients for intra-loop filtering, The method according to any one of claims 48 to 56, further comprising encoding the plurality of sets of filtering coefficients using a non-differential encoding scheme.
58. The method according to claim 57, wherein no coding method for the multiple sets of filtering coefficients is selected before coding the multiple sets of filtering coefficients using the non-differential coding method.
59. The method according to claim 57 or 58, wherein the syntax element for the intra-loop filtering does not include a syntax element that indicates the encoding scheme for the plurality of sets of filtering coefficients.
60. The method according to claim 59, wherein the syntax elements of the intra-loop filtering do not include a syntax element indicating whether the encoding method of the plurality of sets of filtering coefficients is a differential encoding method or the non-differential encoding method.
61. The method according to claim 60, wherein the marker bit of the syntax element indicating whether the encoding method for the plurality of sets of filtering coefficients is the differential encoding method or the non-differential encoding method is 0 or 1.
62. Not selecting an encoding method for the aforementioned multiple sets of filtering coefficients means that The method according to any one of claims 58 to 61, comprising not calculating the rate distortion cost of an encoded frame based on the encoding scheme of the plurality of sets of filtering coefficients, and not selecting the encoding scheme of the plurality of sets of filtering coefficients based on the minimum rate distortion cost.
63. The method according to claim 62, wherein the rate distortion cost of the encoded frame is not calculated based on the differential encoding method and the non-differential encoding method, and the differential encoding method and the non-differential encoding method are not selected based on the minimum rate distortion cost.
64. The non-differential coding scheme is an exponential Golomb coding scheme, and the encoding of the multiple sets of filtering coefficients by adopting the non-differential coding scheme is: The method according to any one of claims 57 to 63, comprising encoding the plurality of sets of filtering coefficients using the exponential Golomb coding scheme, and then writing the encoded values of the plurality of sets of filtering coefficients to a bitstream.
65. The aforementioned multiple sets of filtering coefficients are multiple sets of specific merge filtering coefficients, and determining the multiple sets of filtering coefficients for the intra-loop filtering means that This involves employing multiple types of merge combination methods to merge the filtering coefficients in multiple sets of initial filtering coefficients, and calculating and obtaining multiple sets of merge filtering coefficients for each type of merge combination method in the multiple types of merge combination methods. Determine whether or not to set the filtering coefficients in the aforementioned multiple sets of merge filtering coefficients to zero, and obtain multiple sets of merge filtering coefficients that are not set to zero in each type of merge combination method in the aforementioned multiple types of merge combination methods, The method according to any one of claims 57 to 64, comprising determining a specific merge combination method in the plurality of types of merge combination methods, and obtaining a plurality of sets of specific merge filtering coefficients that are not set to zero in the specific merge combination method.
66. Determining whether or not to set the filtering coefficients in the aforementioned multiple sets of merge filtering coefficients to zero is: By employing different selection methods, select a merge filtering coefficient from the multiple sets of merge filtering coefficients and set it to zero, thereby obtaining a combination of different filtering coefficients to set to zero. The method according to claim 65, comprising: calculating the rate distortion cost of an encoded frame for different combinations of zero filtering coefficients based on the non-differential coding scheme; and determining and obtaining a plurality of sets of non-zero filtering coefficients for the combination of zero filtering coefficients that minimizes the rate distortion cost.
67. In the aforementioned multiple types of merge combination schemes, determining a specific merge combination scheme and obtaining multiple sets of specific merge filtering coefficients that are not set to zero in the aforementioned specific merge combination scheme is: The method according to claim 65 or 66, comprising calculating the rate distortion cost of the encoded frame in the plurality of types of merge combination schemes based on the non-differential encoding scheme, and determining and obtaining the plurality of sets of specific merge filtering coefficients that do not make zero in the specific merge combination scheme that has the smallest rate distortion cost.
68. The method according to claim 66 or 67, wherein the rate distortion cost is calculated based on the number of bits required to encode the encoded frame, wherein the number of bits required to encode the encoded frame does not include the number of bits of syntax elements indicating whether the encoding method of the plurality of sets of filtering coefficients is the differential encoding method or the non-differential encoding method.
69. The method according to any one of claims 57 to 68, wherein the plurality of filtering coefficients are N sets of filtering coefficients of the encoded frame luminance components, where N is a positive integer less than or equal to 25.
70. The method according to any one of claims 57 to 69, wherein the plurality of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
71. The method according to any one of claims 57 to 70, wherein each set of filtering coefficients in the plurality of sets of filtering coefficients includes 13 values.
72. One of the aforementioned modified index parameters corresponds to one of the in-loop filtering modified parameters, and one of the aforementioned in-loop filtering modified parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. The method according to any one of claims 57 to 71, further comprising performing in-loop filtering based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
73. The in-loop filtering is nonlinear in-loop filtering, and the correction index parameters include a luminance correction index parameter for the encoded frame luminance component and a chromaticity correction index parameter for the encoded frame chromaticity component. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the encoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the encoded frame. The method according to any one of claims 48 to 72, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
74. The method according to claim 73, wherein the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter are parameters selected from the same parameter list.
75. The parameter list mentioned above is: The method according to claim 74, wherein the numerical value includes at least one of 1024, 181, 32, and 6.
76. Obtaining the bitstream of the loop-filtered data, A method for intra-loop filtering, comprising: employing a non-exponential Golomb decoding scheme to decode the bitstream of the modified index parameter in the bitstream, and obtaining the modified index parameter for intra-loop filtering.
77. The method according to claim 76, wherein the value of the modified index parameter is an integer between 0 and 3.
78. The method according to claim 76 or 77, wherein the number of decoded bits in the non-exponential Golomb decoding method is 4 or less.
79. The method according to any one of claims 76 to 78, wherein the non-exponential Golomb decoding method is one of a fixed-length decoding method, a unali decoding method, or a truncated unali decoding method.
80. The method according to claim 79, wherein the non-exponential Golomb decoding method is the fixed-length decoding method, and the number of decoded bits of the fixed-length decoding method is 2.
81. The method according to claim 79, wherein the non-exponential Golomb decoding method is the truncated unali decoding method, and the number of decoded bits of the truncated unali decoding method is 3 or less.
82. The aforementioned method, The instruction information indicating the number of filtering coefficient sets in the bitstream is decoded, and it is determined that there are multiple filtering coefficient sets. The method according to any one of claims 76 to 81, further comprising: employing a non-differential decoding method to decode the bitstream of filtering coefficients in the bitstream to obtain a plurality of sets of filtering coefficients.
83. The method according to claim 82, wherein the encoding scheme of the bitstream of the filtering coefficients is not decoded before decoding the bitstream of the filtering coefficients in the bitstream using the non-differential decoding method.
84. The method according to claim 82 or 83, wherein the bitstream does not include a bitstream of syntax elements that indicate the encoding scheme for the bitstream of the filtering coefficients.
85. The method according to claim 84, wherein the bitstream does not include a bitstream of syntax elements indicating whether the encoding scheme of the bitstream of the filtering coefficients is a differential encoding scheme or a non-differential encoding scheme.
86. The method according to claim 85, wherein the marker bit of the bitstream of the syntax element indicating whether the encoding method of the bitstream of the filtering coefficient is the differential encoding method or the non-differential encoding method is 0 or 1.
87. The method according to any one of claims 82 to 86, wherein the non-differential decoding method is an exponential Golomb decoding method.
88. The method according to any one of claims 82 to 87, wherein the plurality of filtering coefficients are N sets of filtering coefficients of the luminance components of the decoded frame, where N is a positive integer less than or equal to 25.
89. The method according to any one of claims 82 to 88, wherein the plurality of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
90. The method according to any one of claims 82 to 89, wherein each set of filtering coefficients in the plurality of sets of filtering coefficients includes 13 values.
91. One of the aforementioned modified index parameters corresponds to one of the in-loop filtering modified parameters, and one of the aforementioned in-loop filtering modified parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. The method according to any one of claims 82 to 90, further comprising performing in-loop filtering based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
92. The aforementioned correction index parameters include a luminance correction index parameter for the luminance component of the decoded frame and a chromaticity correction index parameter for the chromaticity component of the decoded frame. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the decoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the decoded frame. The method according to any one of claims 76 to 91, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
93. The method according to claim 92, wherein the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter are parameters selected from the same parameter list.
94. The parameter list mentioned above is: The method according to claim 93, wherein the numerical value includes at least one of 1024, 181, 32, and 6.
95. This includes determining the in-loop filtering correction parameters for the luminance component and the chromaticity component of the image frame, A nonlinear loop filtering method in which the loop filtering correction parameters for the luminance component and the loop filtering correction parameters for the chromaticity component are selected from the same parameter list.
96. The parameter list mentioned above is: The method according to claim 95, wherein the numerical value includes at least one of 1024, 181, 32, and 6.
97. Determining the in-loop filtering correction parameters for the luminance component and the chromaticity component of the aforementioned image frame is: Determine the luminance correction index parameter of the luminance component and the chromaticity index parameter of the chromaticity component, Based on the luminance correction index parameter, the in-loop filtering correction parameter for the luminance component is determined, and the chromaticity index parameter corresponds to the in-loop filtering correction parameter for the chromaticity component. The method according to claim 95 or 96, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the in-loop filtering correction parameter for the chromaticity component is the same as the in-loop filtering correction parameter for the luminance component.
98. The aforementioned image frame is an encoded frame, and the aforementioned nonlinear loop filtering method is a filtering method in the video encoding process, or The method according to any one of claims 95 to 97, wherein the image frame is a decoded frame, and the nonlinear loop filtering method is a filtering method in the video decoding process.
99. It has a processor, The processor determines multiple sets of filtering coefficients for the in-loop filtering, A loop-based filtering device that employs a non-differential coding scheme to encode the aforementioned multiple sets of filtering coefficients.
100. The aforementioned processor, specifically, The apparatus according to claim 99, wherein, before encoding the plurality of sets of filtering coefficients using the non-differential encoding method, the encoding method for the plurality of sets of filtering coefficients is not selected.
101. The apparatus according to claim 99 or 100, wherein the syntax elements for the intra-loop filtering do not include syntax elements that indicate the coding scheme for the plurality of sets of filtering coefficients.
102. The apparatus according to claim 101, wherein the syntax elements for the intra-loop filtering do not include a syntax element indicating whether the encoding method for the plurality of sets of filtering coefficients is a differential encoding method or the non-differential encoding method.
103. The apparatus according to claim 102, wherein the marker bit of the syntax element indicating whether the encoding method for the plurality of sets of filtering coefficients is the differential encoding method or the non-differential encoding method is 0 or 1.
104. The aforementioned processor, specifically, The apparatus according to any one of claims 100 to 103, wherein the rate distortion cost of the encoded frame is not calculated based on the encoding scheme of the plurality of sets of filtering coefficients, and the encoding scheme of the plurality of sets of filtering coefficients is not selected based on the minimum rate distortion cost.
105. The aforementioned processor, specifically, The apparatus according to claim 104, wherein the rate distortion cost of an encoded frame is not calculated based on the differential encoding method and the non-differential encoding method, and the differential encoding method or the non-differential encoding method is not selected based on the minimum rate distortion cost.
106. The non-differential coding scheme is an exponential Golomb coding scheme, and the processor specifically, The apparatus according to any one of claims 99 to 105, wherein the apparatus encodes the plurality of sets of filtering coefficients using the exponential Golomb coding scheme, and then writes the encoded values of the plurality of sets of filtering coefficients to a bitstream.
107. The aforementioned multiple sets of filtering coefficients are multiple sets of specific merge filtering coefficients, and the processor specifically, By employing multiple types of merge combination methods, the filtering coefficients in multiple sets of initial filtering coefficients are merged, and the multiple sets of merge filtering coefficients in each type of merge combination method are calculated and obtained. Determine whether or not to set the filtering coefficients in the multiple sets of merge filtering coefficients to zero, and obtain multiple sets of merge filtering coefficients that are not set to zero in each type of merge combination method in the multiple types of merge combination methods. The apparatus according to any one of claims 99 to 106, which determines a specific merge combination method in the aforementioned multiple types of merge combination methods and obtains a plurality of sets of specific merge filtering coefficients that are not set to zero in the aforementioned specific merge combination method.
108. The aforementioned processor, specifically, By employing different selection methods, select a merge filtering coefficient from the multiple sets of merge filtering coefficients and set it to zero, and obtain a different combination of filtering coefficients to set to zero. The apparatus according to claim 107, which calculates the rate distortion cost of an encoded frame for different combinations of zero filtering coefficients based on the non-differential coding scheme, and determines and obtains multiple sets of non-zero filtering coefficients for the combination of zero filtering coefficients that minimizes the rate distortion cost.
109. The aforementioned processor, specifically, The apparatus according to claim 107 or 108, which calculates the rate distortion cost of encoded frames in the plurality of types of merge combination schemes based on the non-differential encoding scheme, and determines and obtains the plurality of sets of specific merge filtering coefficients that do not make the rate distortion cost zero in the specific merge combination scheme that minimizes the rate distortion cost.
110. The aforementioned processor, specifically, The apparatus according to claim 108 or 109, for calculating the rate distortion cost based on the number of bits required to encode the encoded frame, wherein the number of bits required to encode the encoded frame does not include the number of bits of the marker bits of the syntax element that indicates whether the encoding method of the plurality of sets of filtering coefficients is a differential encoding method or a non-differential encoding method.
111. The apparatus according to any one of claims 99 to 110, wherein the plurality of filtering coefficients are N sets of filtering coefficients of the encoded frame luminance components, where N is a positive integer less than or equal to 25.
112. The apparatus according to any one of claims 99 to 111, wherein the plurality of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
113. The apparatus according to any one of claims 99 to 112, wherein each set of filtering coefficients in the plurality of sets of filtering coefficients includes 13 values.
114. The aforementioned in-loop filtering is nonlinear in-loop filtering, and the processor further, Determine the corrected index parameters for the nonlinear loop filtering mentioned above. The apparatus according to any one of claims 99 to 113, which employs a non-exponential Golomb coding scheme to encode the modified index parameter.
115. The apparatus according to claim 114, wherein the value of the modified index parameter is an integer between 0 and 3.
116. The apparatus according to claim 114 or 115, wherein the number of encoded bits in the non-exponential Golomb coding scheme is 4 or less.
117. The apparatus according to any one of claims 114 to 116, wherein the non-exponential Golomb coding scheme is a fixed-length coding scheme, a unali coding scheme, or a truncated unali coding scheme.
118. The apparatus according to claim 117, wherein the non-exponential Golomb coding scheme is the fixed-length coding scheme, and the number of coded bits of the fixed-length coding scheme is 2.
119. The apparatus according to claim 117, wherein the non-exponential Golomb coding scheme is the truncated unali coding scheme, and the number of coded bits of the truncated unali coding scheme is 3 or less.
120. The aforementioned processor, specifically, The apparatus according to any one of claims 114 to 119, wherein, before encoding the modified index parameters using the non-exponential Golomb coding scheme, the rate distortion cost of the encoded frame is calculated based on the non-exponential Golomb coding scheme, and the modified index parameters are determined based on the rate distortion cost.
121. The aforementioned processor, specifically, The apparatus according to any one of claims 114 to 120, wherein, before encoding the modified index parameter using the non-exponential Golomb coding scheme, the rate distortion cost of the encoded frame is not calculated based on the exponential Golomb coding scheme.
122. The aforementioned processor, specifically, The apparatus according to any one of claims 114 to 121, which encodes the modified index parameter using the non-exponential Golomb coding scheme and then writes the encoded value of the modified index parameter to a bitstream.
123. One of the aforementioned modified index parameters corresponds to one of the in-loop filtering modified parameters, and one of the aforementioned in-loop filtering modified parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. The apparatus according to any one of claims 114 to 122, wherein the processor further performs in-loop filtering based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
124. The correction index parameter includes a luminance correction index parameter for the encoded frame luminance component and a chromaticity correction index parameter for the encoded frame chromaticity component. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the encoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the encoded frame. The apparatus according to any one of claims 114 to 123, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
125. The apparatus according to claim 124, wherein the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter are parameters selected from the same parameter list.
126. The parameter list mentioned above is: The apparatus according to claim 125, which includes at least one numerical value among 1024, 181, 32, and 6.
127. It has a processor, The aforementioned processor, Obtain the bitstream of the in-loop filtering, The instruction information indicating the number of filtering coefficient sets in the bitstream is decoded, and it is determined that there are multiple filtering coefficient sets. A loop-based filtering device that employs a non-differential decoding method to decode a bitstream of filtering coefficients in the bitstream to obtain multiple sets of filtering coefficients.
128. The apparatus according to claim 127, wherein the processor specifically does not decode the encoding scheme of the bitstream of filtering coefficients before decoding the bitstream of filtering coefficients in the bitstream using the non-differential decoding scheme.
129. The apparatus according to claim 127 or 128, wherein the bitstream does not include a bitstream of syntax elements that indicate the encoding scheme for the bitstream of the filtering coefficients.
130. The apparatus according to claim 129, wherein the bitstream does not include a bitstream of syntax elements indicating whether the encoding scheme of the bitstream of the filtering coefficients is a differential encoding scheme or a non-differential encoding scheme.
131. The apparatus according to claim 130, wherein the marker bit of the bitstream of the syntax element indicating whether the encoding method of the bitstream of the filtering coefficient is the differential encoding method or the non-differential encoding method is 0 or 1.
132. The apparatus according to any one of claims 127 to 131, wherein the non-differential decoding method is an exponential Golomb decoding method.
133. The apparatus according to any one of claims 127 to 132, wherein the plurality of filtering coefficients are N sets of filtering coefficients of the luminance components of the decoded frame, where N is a positive integer less than or equal to 25.
134. The apparatus according to any one of claims 127 to 133, wherein the plurality of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
135. The apparatus according to any one of claims 127 to 134, wherein each set of filtering coefficients in the plurality of sets of filtering coefficients includes 13 values.
136. The aforementioned in-loop filtering is nonlinear in-loop filtering, and the processor further, The apparatus according to any one of claims 127 to 135, which employs a non-exponential Golomb decoding method to decode the bitstream of the modified index parameter in the bitstream and obtain the modified index parameter of the nonlinear in-loop filtering.
137. The apparatus according to claim 136, wherein the value of the correction index parameter is an integer between 0 and 3.
138. The apparatus according to claim 136 or 137, wherein the number of decoded bits in the non-exponential Golomb decoding method is 4 or less.
139. The apparatus according to any one of claims 136 to 138, wherein the non-exponential Golomb decoding method is one of a fixed-length decoding method, a unari decoding method, or a truncated unari decoding method.
140. The apparatus according to claim 139, wherein the non-exponential Golomb decoding method is the fixed-length decoding method, and the number of decoded bits of the fixed-length decoding method is 2.
141. The apparatus according to claim 139, wherein the non-exponential Golomb decoding method is the truncated unali decoding method, and the number of decoded bits of the truncated unali decoding method is 3 or less.
142. One of the aforementioned modified index parameters corresponds to one of the in-loop filtering modified parameters, and one of the aforementioned in-loop filtering modified parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. The apparatus according to any one of claims 136 to 141, wherein the processor further performs in-loop filtering based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
143. The aforementioned correction index parameters include a luminance correction index parameter for the luminance component of the decoded frame and a chromaticity correction index parameter for the chromaticity component of the decoded frame. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the decoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the decoded frame. The apparatus according to any one of claims 136 to 142, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
144. The apparatus according to claim 143, wherein the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter are parameters selected from the same parameter list.
145. The parameter list mentioned above is: The apparatus according to claim 144, which includes at least one numerical value among 1024, 181, 32, and 6.
146. The aforementioned processor, Determine the corrected index parameters for the in-loop filtering, A loop-based filtering device for encoding the modified index parameter using a non-exponential Golomb coding scheme.
147. The apparatus according to claim 146, wherein the value of the modified index parameter is an integer between 0 and 3.
148. The apparatus according to claim 146 or 147, wherein the number of encoded bits in the non-exponential Golomb coding scheme is 4 or less.
149. The apparatus according to any one of claims 146 to 148, wherein the non-exponential Golomb coding scheme is a fixed-length coding scheme, a unali coding scheme, or a truncated unali coding scheme.
150. The apparatus according to claim 149, wherein the non-exponential Golomb coding scheme is the fixed-length coding scheme, and the number of coded bits of the fixed-length coding scheme is 2.
151. The apparatus according to claim 149, wherein the non-exponential Golomb coding scheme is the truncated unali coding scheme, and the number of coded bits of the truncated unali coding scheme is 3 or less.
152. The aforementioned processor, specifically, The apparatus according to any one of claims 146 to 151, which calculates the rate distortion cost of a coded frame based on the non-exponential Golomb coding scheme and determines the modified index parameter based on the rate distortion cost, before coding the modified index parameter using the non-exponential Golomb coding scheme.
153. The aforementioned processor, specifically, The apparatus according to any one of claims 146 to 152, wherein, before encoding the modified index parameter using the non-exponential Golomb coding scheme, the rate distortion cost of the encoded frame is not calculated based on the exponential Golomb coding scheme.
154. The aforementioned processor, specifically, The apparatus according to any one of claims 146 to 153, which encodes the modified index parameter using the non-exponential Golomb coding scheme and then writes the encoded value of the modified index parameter to a bitstream.
155. The aforementioned processor further, Determine the filtering coefficients for multiple sets of filtering within the loop. The apparatus according to any one of claims 146 to 154, which employs a non-differential coding scheme to encode the plurality of sets of filtering coefficients.
156. The apparatus according to claim 155, wherein the processor specifically refrains from selecting an encoding method for the multiple sets of filtering coefficients before encoding the multiple sets of filtering coefficients using the non-differential encoding method.
157. The apparatus according to claim 155 or 156, wherein the syntax elements for the intra-loop filtering do not include syntax elements that indicate the encoding scheme for the plurality of sets of filtering coefficients.
158. The apparatus according to claim 157, wherein the syntax elements for the intra-loop filtering do not include a syntax element indicating whether the encoding method for the plurality of sets of filtering coefficients is a differential encoding method or a non-differential encoding method.
159. The apparatus according to claim 158, wherein the marker bit of the syntax element indicating whether the encoding method for the plurality of sets of filtering coefficients is the differential encoding method or the non-differential method is 0 or 1.
160. The aforementioned processor, specifically, The apparatus according to any one of claims 156 to 159, wherein the rate distortion cost of the encoded frame is not calculated based on the encoding scheme of the plurality of sets of filtering coefficients, and the encoding scheme of the plurality of sets of filtering coefficients is not selected based on the minimum rate distortion cost.
161. The aforementioned processor, specifically, The apparatus according to claim 160, wherein the rate distortion cost of the encoded frame is not calculated based on the differential encoding method and the non-differential encoding method, and the differential encoding method and the non-differential encoding method are not selected based on the minimum rate distortion cost.
162. The non-differential coding scheme is an exponential Golomb coding scheme, and the processor specifically, The apparatus according to any one of claims 155 to 161, which includes encoding the plurality of sets of filtering coefficients using the exponential Golomb coding scheme, and then writing the encoded values of the plurality of sets of filtering coefficients to a bitstream.
163. The aforementioned multiple sets of filtering coefficients are multiple sets of specific merge filtering coefficients, and the processor specifically, By employing multiple types of merge combination methods, the filtering coefficients in multiple sets of initial filtering coefficients are merged, and the multiple sets of merge filtering coefficients in each type of merge combination method are calculated and obtained. Determine whether or not to set the filtering coefficients in the aforementioned multiple sets of merge filtering coefficients to zero, and obtain multiple sets of merge filtering coefficients that are not set to zero in each type of merge combination method in the aforementioned multiple types of merge combination methods, The apparatus according to any one of claims 155 to 162, which determines a specific merge combination method in the aforementioned multiple types of merge combination methods and obtains multiple sets of specific merge filtering coefficients that are not set to zero in the aforementioned specific merge combination method.
164. The aforementioned processor, specifically, By employing different selection methods, select a merge filtering coefficient from the multiple sets of merge filtering coefficients and set it to zero, and obtain a different combination of filtering coefficients to set to zero. The apparatus according to claim 163, which calculates the rate distortion cost of an encoded frame for different combinations of zero filtering coefficients based on the non-differential coding scheme, and determines and obtains multiple sets of non-zero filtering coefficients for the combination of zero filtering coefficients that minimizes the rate distortion cost.
165. The aforementioned processor, specifically, The apparatus according to claim 163 or 164, which calculates the rate distortion cost of encoded frames in the multiple types of merge combination schemes based on the non-differential encoding scheme, and determines and obtains the multiple sets of specific merge filtering coefficients that do not make the rate distortion cost zero in the specific merge combination scheme that minimizes the rate distortion cost.
166. The aforementioned processor, specifically, The apparatus according to claim 164 or 165, for calculating the rate distortion cost based on the number of bits required to encode the encoded frame, wherein the number of bits required to encode the encoded frame does not include the number of bits of syntax elements indicating whether the encoding method of the plurality of sets of filtering coefficients is the differential encoding method or the non-differential encoding method.
167. The apparatus according to any one of claims 155 to 166, wherein the plurality of filtering coefficients are N sets of filtering coefficients of the encoded frame luminance components, where N is a positive integer less than or equal to 25.
168. The apparatus according to any one of claims 155 to 167, wherein the plurality of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
169. The apparatus according to any one of claims 155 to 168, wherein each set of filtering coefficients in the plurality of sets of filtering coefficients includes 13 values.
170. One of the aforementioned modified index parameters corresponds to one of the in-loop filtering modified parameters, and one of the aforementioned in-loop filtering modified parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. The apparatus according to any one of claims 155 to 169, wherein the processor further performs in-loop filtering based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
171. The in-loop filtering is nonlinear in-loop filtering, and the correction index parameters include a luminance correction index parameter for the encoded frame luminance component and a chromaticity correction index parameter for the encoded frame chromaticity component. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the encoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the encoded frame. The apparatus according to any one of claims 146 to 170, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
172. The apparatus according to claim 171, wherein the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter are parameters selected from the same parameter list.
173. The parameter list mentioned above is: The apparatus according to claim 172, which includes at least one numerical value among 1024, 181, 32, and 6.
174. It has a processor, The aforementioned processor, Obtain the bitstream of the in-loop filtering, An in-loop filtering device that employs a non-exponential Golomb decoding method to decode the bitstream of the modified index parameter in the bitstream and obtain the modified index parameter for in-loop filtering.
175. The apparatus according to claim 174, wherein the value of the modified index parameter is an integer between 0 and 3.
176. The apparatus according to claim 174 or 175, wherein the number of decoded bits in the non-exponential Golomb decoding method is 4 or less.
177. The apparatus according to any one of claims 174 to 176, wherein the non-exponential Golomb decoding method is one of a fixed-length decoding method, a unari decoding method, or a truncated unari decoding method.
178. The apparatus according to claim 177, wherein the non-exponential Golomb decoding method is the fixed-length decoding method, and the number of decoded bits of the fixed-length decoding method is 2.
179. The apparatus according to claim 177, wherein the non-exponential Golomb decoding method is the truncated unali decoding method, and the number of decoded bits of the truncated unali decoding method is 3 or less.
180. The aforementioned processor further, The instruction information indicating the number of filtering coefficient sets in the bitstream is decoded, and it is determined that there are multiple filtering coefficient sets. The apparatus according to any one of claims 174 to 179, which employs a non-differential decoding method to decode a bitstream of filtering coefficients in the bitstream to obtain a plurality of sets of filtering coefficients.
181. The aforementioned processor, specifically, The apparatus according to claim 180, wherein, before decoding the bitstream of filtering coefficients in the bitstream using the non-differential decoding method, the encoding method of the bitstream of filtering coefficients is not decoded.
182. The apparatus according to claim 180 or 181, wherein the bitstream does not include a bitstream of syntax elements that indicate the encoding scheme for the bitstream of the filtering coefficients.
183. The apparatus according to claim 182, wherein the bitstream does not include a bitstream of syntax elements indicating whether the encoding scheme of the bitstream of the filtering coefficients is a differential encoding scheme or a non-differential encoding scheme.
184. The apparatus according to claim 183, wherein the marker bit of the bitstream of the syntax element indicating whether the encoding method of the bitstream of the filtering coefficient is the differential encoding method or the non-differential encoding method is 0 or 1.
185. The apparatus according to any one of claims 180 to 184, wherein the non-differential decoding method is an exponential Golomb code decoding method.
186. The apparatus according to any one of claims 180 to 185, wherein the plurality of filtering coefficients are N sets of filtering coefficients of the luminance component of the decoded frame, where N is a positive integer less than or equal to 25.
187. The apparatus according to any one of claims 180 to 186, wherein the plurality of filtering coefficients are filtering coefficients calculated based on the coding tree unit CTU.
188. The apparatus according to any one of claims 180 to 187, wherein each set of filtering coefficients in the plurality of sets of filtering coefficients includes 13 values.
189. One of the aforementioned modified index parameters corresponds to one of the in-loop filtering modified parameters, and one of the aforementioned in-loop filtering modified parameters corresponds to one of the filtering coefficients among the multiple sets of filtering coefficients. The apparatus according to any one of claims 180 to 188, wherein the processor further performs in-loop filtering based on a plurality of in-loop filtering modification parameters and a plurality of sets of filtering coefficients.
190. The aforementioned correction index parameters include a luminance correction index parameter for the luminance component of the decoded frame and a chromaticity correction index parameter for the chromaticity component of the decoded frame. The luminance correction index parameter corresponds to the in-loop filtering correction parameter of the luminance component of the decoded frame, and the chromaticity correction index parameter corresponds to the in-loop filtering correction parameter of the chromaticity component of the decoded frame. The apparatus according to any one of claims 174 to 189, wherein when the luminance correction index parameter is the same as the chromaticity correction index parameter, the luminance loop filtering correction parameter is the same as the chromaticity loop filtering correction parameter.
191. The apparatus according to claim 190, wherein the luminance loop filtering correction parameter and the chromaticity loop filtering correction parameter are parameters selected from the same parameter list.
192. The parameter list mentioned above is: The apparatus according to claim 191, which includes at least one numerical value among 1024, 181, 32, and 6.
193. It has a processor, The aforementioned processor is for determining the in-loop filtering correction parameters for the luminance component and the chromaticity component of the image frame. Here, the in-loop filtering correction parameter for the luminance component and the in-loop filtering correction parameter for the chromaticity component are parameters selected from the same parameter list, in a nonlinear in-loop filtering device.
194. The parameter list mentioned above is: The apparatus according to claim 193, which includes at least one numerical value among 1024, 181, 32, and 6.
195. The aforementioned processor, specifically, Determine the luminance correction index parameter for the luminance component and the chromaticity index parameter for the chromaticity component. Based on the luminance correction index parameter, the in-loop filtering correction parameter for the luminance component is determined, and the chromaticity index parameter corresponds to the in-loop filtering correction parameter for the chromaticity component. The apparatus according to claim 193 or 194, wherein, when the luminance correction index parameter is the same as the chromaticity correction index parameter, the in-loop filtering correction parameter for the chromaticity component is the same as the in-loop filtering correction parameter for the luminance component.
196. The aforementioned image frame is an encoded frame, and the nonlinear loop filtering device is provided within the video encoding device, or The apparatus according to any one of claims 193 to 195, wherein the image frame is a decoded frame, and the nonlinear loop filtering device is provided within the video decoding device.