Decoding method, coding method, electronic equipment and storage medium

Through the method of sharing nonlinear limiting index, the problem of large bit overhead transmission in the Wiener filter is solved, and the compression efficiency of video encoding is improved.

CN120281910APending Publication Date: 2025-07-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410031983.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-08
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

In the prior art, the nonlinear limiting operation of the Wiener filter requires the transmission of a nonlinear filter index for each tap coefficient. As the filter tap coefficient and the number of filter banks increase, the transmission bit overhead increases significantly, affecting the compression efficiency of the video.

Method used

Using the method of shared nonlinear limiting index, the target flag is determined by analyzing the code stream to indicate whether the filter tap coefficient uses the shared nonlinear limiting index, and the target nonlinear limiting index is obtained when the value is taken as the first value, reducing the bit overhead of the nonlinear limiting index.

Benefits of technology

It effectively reduces the bit overhead of nonlinear limiting indexes and improves the compression efficiency of video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281910A_ABST
    Figure CN120281910A_ABST
Patent Text Reader

Abstract

The invention provides a decoding method, a coding method, electronic equipment and a computer readable storage medium, which are applied to the technical field of video coding and decoding. The decoding method comprises the steps that a code stream is analyzed, a target mark is determined, and the target mark is used for indicating whether the tap coefficient of at least one filter uses a shared non-linear amplitude limiting index or not; if the target mark value is a first value, a target nonlinear clipping index is obtained, and the target nonlinear clipping index is a nonlinear clipping index shared by tap coefficients of the at least one filter. In the embodiment of the invention, the non-linear amplitude limiting indexes respectively corresponding to the plurality of tap coefficients of the at least one filter can be represented by one target non-linear amplitude limiting index, so that the bit overhead of the non-linear amplitude limiting indexes can be effectively reduced, and the video compression efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of video coding and decoding, and in particular, to a decoding method, an encoding method, an electronic device, and a computer-readable storage medium. Background Art

[0002] As loop filters adopted in Versatile Video Coding (VVC), Adaptive Loop Filtering (ALF) and Cross-Component Adaptive Loop Filtering (CCALF) belong to Wiener filters. Wiener filters are linear filters, and the filtering process only considers the spatial similarity between adjacent pixels and the current pixel to be processed. To enable the Wiener filter to consider both the spatial similarity and sample similarity between adjacent pixels and the current pixel to be processed, a non-linear clipping operation can be adopted. That is, the difference between the input of the Wiener filter and the current pixel is limited by clipping.

[0003] In the prior art, when adopting the non-linear clipping operation, a non-linear filter index needs to be transmitted for each tap coefficient of the filter. However, with the increase in the number of filter tap coefficients and the number of supported filter groups, the bit overhead required to transmit the non-linear clipping index will increase significantly, affecting the compression efficiency of the video. Summary of the Invention

[0004] The present application provides a decoding method, an encoding method, an electronic device, and a computer-readable storage medium, which are beneficial to improving the compression efficiency of the video.

[0005] In a first aspect, the present application provides a decoding method applied to a processor. The method includes: parsing a bitstream to determine a target flag, where the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non-linear clipping index; if the value of the target flag is a first value, obtaining a target non-linear clipping index, where the target non-linear clipping index is a non-linear clipping index shared by the tap coefficients of the at least one filter.

[0006] In a second aspect, the present application provides an encoding method applied to an encoder. The method includes: determining the value of a target flag according to the rate-distortion cost, where the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non-linear clipping index; writing the target flag and its value into the bitstream; if the value of the target flag is a first value, writing a target non-linear clipping index into the bitstream, where the target non-linear clipping index is a non-linear clipping index shared by the tap coefficients of the at least one filter.

[0007] In a third aspect, the present application provides a closing device configured in a decoder. The device includes: a parsing module and an obtaining module;

[0008] Wherein, the parsing module is configured to parse a bitstream to determine a target flag, and the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non-linear clipping index; and, the obtaining module is configured to, if the target flag takes a first value, obtain a target non-linear clipping index, where the target non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the at least one filter.

[0009] In a fourth aspect, there is provided an encoding device configured in an encoder. The device includes: a determining module and a writing module;

[0010] Wherein, the determining module is configured to determine the value of a target flag according to a rate-distortion cost, and the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non-linear clipping index; and, the writing module is configured to write the target flag into the bitstream; the writing module is further configured to, if the target flag takes a first value, write a target non-linear clipping index into the bitstream, where the target non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the at least one filter.

[0011] In a fifth aspect, there is provided an electronic device including a processor and a memory; the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the methods in the first aspect or the second aspect and their respective implementation manners.

[0012] In a sixth aspect, there is provided a chip for implementing the methods in any one of the first aspects or their respective implementation manners. Specifically, the chip includes: a processor, which is used to call and run a computer program from a memory, so that a device installed with the chip executes the methods in the first aspect or the second aspect and their respective implementation manners.

[0013] In a seventh aspect, there is provided a computer-readable storage medium for storing a computer program, and the computer program causes a computer to execute the methods in the first aspect and their respective implementation manners.

[0014] In an eighth aspect, there is provided a computer-readable storage medium storing a computer program, and the computer program is executed by a processor to form a bitstream according to the encoding method provided in the second aspect, and the bitstream is stored in the computer-readable storage medium.

[0015] In a ninth aspect, there is provided a computer program product including computer program instructions that cause a computer to execute the methods in the first aspect or the second aspect and their respective implementations as described above.

[0016] In a tenth aspect, there is provided a computer program which, when running on a computer, causes the computer to execute the methods in the first aspect or the second aspect and their respective implementations as described above.

[0017] In summary, in the solution provided by the embodiments of the present application, the processor can determine the value of the target flag by parsing the bitstream. Among them, if the value of the target flag is the first value, it indicates that there is at least one filter whose tap coefficients use a shared non-linear clipping index; if the value of the target flag is not the first value, it indicates that there is no filter whose tap coefficients use a shared non-linear clipping index. Further, when the value of the target flag is the first value, the processor further obtains the target non-linear clipping index, where the target non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the at least one filter. Thus, in the embodiments of the present application, the non-linear clipping indexes respectively corresponding to the multiple tap coefficients of the at least one filter can be represented by a target non-linear clipping index, thereby effectively reducing the bit overhead of the non-linear clipping index and being beneficial to improving the compression efficiency of the video. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0019] Figure 1 It is a schematic diagram of the ALF and CCALF processing flow applicable to the present application;

[0020] Figure 2 It is a schematic diagram of the shape of the ALF filter applicable to the present application;

[0021] Figure 3 It is a schematic diagram of the shape of the ECM-8.0ALF filter applicable to the present application;

[0022] Figure 4 It is a schematic diagram of the flow of a decoding method provided by an embodiment of the present application;

[0023] Figure 5 It is a schematic diagram of the flow of a decoding method provided by an embodiment of the present application;

[0024] Figure 6Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0025] Figure 7 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0026] Figure 8 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0027] Figure 9 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0028] Figure 10 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0029] Figure 11 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0030] Figure 12 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0031] Figure 13 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0032] Figure 14 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0033] Figure 15 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0034] Figure 16 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0035] Figure 17 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0036] Figure 18 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0037] Figure 19 Schematic flowchart of a decoding method provided by an embodiment of the present application;

[0038] Figure 20 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0039] Figure 21 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0040] Figure 22Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0041] Figure 23 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0042] Figure 24 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0043] Figure 25 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0044] Figure 26 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0045] Figure 27 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0046] Figure 28 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0047] Figure 29 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0048] Figure 30 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0049] Figure 31 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0050] Figure 32 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0051] Figure 33 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0052] Figure 34 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0053] Figure 35 Schematic flowchart of an encoding method provided by an embodiment of the present application;

[0054] Figure 36 Schematic structural diagram of a decoding device provided by an embodiment of the present application;

[0055] Figure 37 Schematic structural diagram of an encoding device provided by an embodiment of the present application;

[0056] Figure 38It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0057] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0058] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In the embodiments of the present invention of the present application, "B corresponding to A" means that B is associated with A. In one implementation manner, B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information. In addition, the terms "include" and "have" and any of their deformations are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices. In the description of the present application, unless otherwise specified, "a plurality of" means two or more than two.

[0059] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, and works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit including the function of the module or unit.

[0060] 1. ALF and CCALF in VVC

[0061] As loop filters adopted in VVC, ALF and CCALF adaptively determine filter coefficients according to different video contents, so as to reduce the mean square error (MSE) between the reconstructed component and the original component. Among them, Figure 1It is a schematic diagram of the ALF and CCALF processing flows applicable to this application. Among them, the input of ALF is the reconstructed pixel values before being processed by ALF. Refer to Figure 1 the luminance (Luma) sample adaptive offset (SAO) SAO in luma and the chrominance (CbCr) sample adaptive offset (SAO), SAO Cr and SAO Cb ; the output of ALF is the enhanced reconstructed luminance image and reconstructed chrominance image. As an adaptive filter, the Wiener filter can generate different filter coefficients for video content with different characteristics. Therefore, ALF needs to classify the video content first and then use the corresponding filter for each category of video content. In the design of VVC, each 4x4 block is divided into one of 25 categories according to its own directionality and activity. The corresponding filter coefficients are calculated for each category of video content.

[0062] 1.1. Regarding the shape of the ALF filter:

[0063] For the luminance component, in addition to the 4x4 block-level adaptation, VVC also supports the ALF adaptive switch at the coding tree unit (CTU) level. Each CTU can use the filter bank generated by the current slice, or the filter bank generated by the already encoded slice, or one of the 16 offline-trained fixed filter banks. Inside the CTU, each 4x4 block selects the corresponding filter from the filter bank according to its own category for filtering. The filter coefficients and the corresponding clipping index are transmitted to the decoding end by ALF_APS (Adaptation Parameter Set). One ALF_APS can contain a luminance filter bank (including up to 25 filters) and up to 8 chrominance filters.

[0064] CCALF uses the luminance component to correct the chrominance component. Refer to Figure 1 , CCALF uses the luminance component SAO luma as the input, and the output is the corrected values ΔR Cb and ΔR Cr . Whether to use the corresponding corrected values can be controlled independently for the two chrominance components. The corrected values and the output of the chrominance ALF together constitute the final chrominance components Cb (representing the blue chrominance) and Cr (representing the red chrominance).

[0065] Regarding the shape of the ALF filter:

[0066] In VVC, ALF uses two different-shaped diamond filters as shown in Figure 2 . Among them, a 7x7 diamond filter is used for the luma component, and a 5x5 diamond filter is used for the chroma component.

[0067] Regarding pixel block classification and geometric transformation:

[0068] For the luma component, ALF adaptively uses different filters at the sub-block level (4x4), that is, each 4x4 pixel block needs to be classified into one of 25 categories. For the chroma component, ALF does not need to classify the pixels at the sub-block level, and the same filter is used for all chroma pixels within a CTU. The classification index C of the luma component pixel block is obtained jointly by the directionality feature (D) and the quantized activity feature (Activity) of the block. As shown in formula (1):

[0069]

[0070] To calculate the directionality feature D and the activity feature , first, the horizontal, vertical, diagonal, and anti-diagonal gradient values of each pixel within the 4x4 pixel block need to be calculated, referring to formulas (2)-(5):

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

[0072] V k,l = |2R(k, l) - R(k, l - 1) - R(k, l + 1)| #(3)

[0073] D0 k,l = |2R(k, l) - R(k - 1, l - 1) - R(k + 1, l + 1)| #(4)

[0074] D1 k,l = |2R(k, l) - R(k - 1, l + 1) - R(k + 1, l - 1)| #(5)

[0075] Based on the pixel gradients, the horizontal, vertical, diagonal, and anti-diagonal gradients of each 4x4 block as a whole are calculated as follows:

[0076]

[0077]

[0078] Among them, i and j represent the coordinates of the top-left pixel of the 4x4 pixel block, and R(k, l) represents the reconstructed pixel value at the position (k, l) before being filtered by ALF.

[0079] After obtaining the gradient values of the pixel block, the maximum and minimum values of the horizontal and vertical gradient values are as shown in formulas (8) and (9):

[0080]

[0081] The maximum and minimum values of the diagonal and anti-diagonal direction gradient values are respectively:

[0082]

[0083] The directional feature D is derived by comparing the maximum and minimum values of the gradient values in four directions obtained from formulas (8)-(9):

[0084] Step1: If and hold simultaneously, then D is set to 0.

[0085] Step2: If then go to Step3, otherwise go to Step4.

[0086] Step3: If then D is set to 2, otherwise D is set to 1.

[0087] Step4: If then D is set to 4, otherwise D is set to 3.

[0088] The activity feature A is calculated by the following formula:

[0089]

[0090] The activity feature A will be quantized to the interval [0-4] as the quantized activity feature

[0091] Before filtering each 4x4 luminance block, according to the gradient value of the current block, the geometric transformation rules based on the pixel block gradient value shown in Table 1 are used to perform geometric transformation on the filter coefficients and the corresponding limit values, including no transformation (Notransformation), diagonal transformation (Diagonal), vertical flip (Vertical flip), and rotation transformation (Rotation). Applying geometric transformation to the filter coefficients is equivalent to applying geometric transformation to the pixel values and then performing filtering while keeping the coefficients unchanged. The purpose of geometric transformation is to align the directionality of different block contents as much as possible, thereby reducing the number of classifications required by ALF and enabling different pixels to share the same filter coefficients. Using geometric transformation can increase the true classification from 25 classes to 100 classes without increasing the number of ALF filters, improving its adaptability.

[0092] Table 1

[0093] Gradient value Several transformations <![CDATA[g d1 <g d0 and g h <g v > Unchanged <![CDATA[g d1 <g d0 and g v ≤g h > Diagonal transformation <![CDATA[g d0 ≤g d1 and g h <g v > Vertical flip <![CDATA[g d0 ≤g d1 and g v ≤g h > Rotation transformation

[0094] 1.3. ALF Filtering Process in VVC

[0095] At the decoding end, if the ALF flag at the CTU level is true, each pixel R(i, j) in the current CTU will be filtered. The filtering process and output are as shown in Equation (11):

[0096]

[0097] where f(k, l) represents the filter tap coefficients, K(x, y) is the clipping function, and c(k, l) are the parameters related to the clipping operation. The values of k and l range from -L / 2 to L / 2, where L is the length of the filter. The specific definition of the clipping function is K(x, y) = min(y, max(-y, x)). The clipping operation adds a non-linear function to ALF, which can reduce the influence of pixels with overly large surrounding differences on the current pixel.

[0098] 2. ALF in ECM (Enhanced Compression Model) - 8.0

[0099] ECM - 8.0 removes the downsampling operation during gradient calculation and the limitation of the virtual boundary in the ALF classification process. At the same time, the basic unit of the ALF classification operation changes from a 4x4 sub-block to a 2x2 sub-block. Also, the shapes of the luminance and chrominance filters change accordingly.

[0100] 2.1. Enhanced Fixed Filters

[0101] For the luminance component, ECM - 8.0 uses three different classifiers (C0, C1, and C2) and three groups of different filters (F0, F1, and F2). Among them, filter groups F0 and F1 contain fixed filters, and their coefficients are generated through offline training with classifiers C0 and C1. F2 contains filter coefficients generated from the content to be encoded, which need to be written into the bitstream and transmitted to the decoding end.

[0102] 2.2. Classification Process

[0103] In ECM - 8.0, each 2x2 sub-block generates a corresponding class index C i based on its directional feature D and activity feature i , as shown in Equation (12):

[0104]

[0105] Among them, i represents the classifier index, and M D,i represents the total number of active features D i used by the corresponding classifier.

[0106] Similar to the calculation process in VVC, the horizontal, vertical, diagonal, and anti-diagonal gradients of each pixel are generated using a 1-D Laplacian operator. For classifier C0, the gradient of its sub-block is generated by summing the pixel gradient values at all positions in the 4x4 region covering the target 2x2 sub-block. For classifiers C1 and C2, the gradient of their sub-blocks is generated by summing the pixel gradient values at all positions in the 12x12 region covering the target 2x2 sub-block. It is stipulated that the sub-block gradients in the horizontal, vertical, diagonal, and anti-diagonal directions are Then the directional feature D i is obtained by comparing the following two values with a set of thresholds:

[0107]

[0108] The directional feature D2 uses the same thresholds 2 and 4.5 as in VVC. For D0 and D1, first calculate the horizontal / vertical edge strength and the diagonal edge strength using the thresholds Th = [1.25, 1.5, 2, 3, 4.5, 8]. When the edge strength is set to 0; otherwise, is the largest integer that satisfies . When the edge strength is set to 0; otherwise is the largest integer that satisfies . When i.e., the horizontal / vertical direction edge is stronger, the directional feature D i is generated from Table 2-a. Otherwise, the directional feature D i is generated from Table 2-b.

[0109] Table 2-a Table 2-b

[0110]

[0111] The active feature is generated by quantizing the accumulated results A i of the sub-block level horizontal and vertical gradients, and its quantized value range is from 0 to n. For n is set to 4; for and n is set to 15. An ALF_APS can transmit up to 4 sets of luminance component filters, and each filter bank contains up to 25 filters.

[0112] 2.3, Classifier Based on 2x2 Sub-blocks

[0113] In ECM-8.0, a newly added classifier is used in the classification process of ALF. For a set of filter banks transmitted to the decoding end, a flag bit is used to indicate whether to use the original classifier or the new classifier. The new classifier cannot use geometric transformation. When using the new classifier, the pixels at all positions in a 2x2 sub-block are added together, and then the classification is performed according to the sum of the pixel values.

[0114] class index =(sum × 25) >> (sample bitdepth + 2) (13)

[0115] 2.4, Filtering Process

[0116] First, two fixed filters F0 and F using 13x13 diamond filters generate two intermediate values R0(x, y) and R1(x, y) for the current pixel to be filtered. Then, the online-generated filter F2 is applied to R0(x, y), R1(x, y) and the surrounding pixels to generate the filtered pixel, as shown in Equation (14):

[0117]

[0118] where f i,j represents the difference between the clipped surrounding pixels and the current pixel R(x, y), and g i represents the difference between the clipped R i-20 (x, y) and the current pixel. The filter coefficients c i , i = 0, … 21, need to be transmitted to the decoding end.

[0119] In ECM-8.0, the luminance filters generated by online training include a total of 4 types of inputs: spatially adjacent samples, reconstructed samples before deblocking, extended samples generated by filtering with fixed filters, and residual components. Its shape is as Figure 3 shown. Among them, #0 - #19 represent spatially adjacent samples, #20 - #25, #28 - #29 represent samples generated by filtering with fixed filters, #26, #27, #30 represent reconstructed samples before deblocking, and #31, #32 represent residual components. According to various types of inputs, the filtering process is as follows:

[0120]

[0121] where f i,j represents the difference between the clipped spatially surrounding pixel samples and the current sample R(x, y), and g iDenotes the difference between the pixel sample generated by filtering with a fixed filter after clipping and the current sample R(x,y), h i,j Denotes the difference between the reconstructed sample before deblocking after clipping and the current sample R(x,y). r i Denotes the residual component after clipping, rFiltered i Denotes the residual component generated by filtering with a fixed filter after clipping. The residual component and the reconstructed component use the same fixed filter.

[0122] In ALF_APS, a flag bit is used to indicate whether to use only the residual component or both the residual component and the residual component filtered by a fixed filter.

[0123] 2.5. Classifier for the residual component

[0124] In JVET-AD0219, a new classifier based on the luminance residual component is proposed as the third classifier of ALF. For any 2x2 luminance sub-block, first calculate the sum sum of the absolute values of the residual components at all positions within the 8x8 region covering the current 2x2 sub-block, and then classify according to the accumulated sum using the following formula:

[0125] classIdx = sum>>(sample bit depth - 4)(16)

[0126] The final classIdx ranges from 0 to 24. In ALF_APS, the classifier used for each filter bank needs to be transmitted.

[0127] 3. ALF Nonlinear Clipping

[0128] As a linear filter, Wiener filtering only considers the spatial similarity between adjacent pixels and the current pixel to be processed. To enable ALF to consider both the spatial similarity and the sample similarity between adjacent pixels and the current pixel to be processed, ALF uses a nonlinear clipping operation. That is, the difference between the ALF input and the current pixel is restricted by clipping. The clipping function is as follows:

[0129] K i = min(b i , max(-b i , diffi i ))#(17)

[0130] where, diff i is the difference between the i-th input of ALF and the current pixel, b i is the nonlinear clipping value corresponding to the filter tap coefficient, and is determined by the nonlinear clipping index d iDecision. The correspondence between the non - linear clipping index and non - linear clipping in VVC and ECM is as follows:

[0131]

[0132] Among them, BD represents the bit - depth of the pixel, and d i is the non - linear clipping index, which can be 0, 1, 2, or 3.

[0133] In VVC and ECM, each tap coefficient of the filter has a corresponding non - linear clipping index. If the encoding end decides to use non - linear clipping, all non - linear clipping indexes need to be transmitted to the decoding end. The transmission process related to the non - linear clipping index is shown in Table 3 below:

[0134] Table 3

[0135]

[0136] alf_comp_num_alt_filters_minus1 + 1 represents the number of different filter banks used for the current color component (in VVC, the luminance component supports a maximum of 1 filter bank, and the chrominance component supports a maximum of 8 filter banks. In ECM, the luminance component supports a maximum of 4 filter banks, and the chrominance component supports a maximum of 8 filter banks). For each filter bank, it is necessary to use alf_comp_clip_flag to indicate whether the filters included in the current filter bank use non - linear clipping. alf_comp_num_filters_signalled_minus 1+1 represents the number of filters included in the current filter bank (in VVC, a filter bank of the luminance component contains a maximum of 25 filters, and a filter bank of the chrominance component contains a maximum of 1 filter. In ECM, a filter bank of the luminance component contains a maximum of 25 filters, and a filter bank of the chrominance component contains a maximum of 1 filter). If non - linear clipping is used, the non - linear filter index needs to be transmitted for each tap coefficient of the filter (in VVC, a filter of the luminance component contains 13 tap coefficients, and a filter of the chrominance component contains 7 tap coefficients. In ECM, a filter of the luminance component contains 40 tap coefficients, and a filter of the chrominance component contains 21 tap coefficients).

[0137] The non - linear clipping in the current ALF can enable the Wiener filter to consider the similarity with surrounding content while utilizing spatial correlation, but it is necessary to transmit the corresponding non - linear clipping index for all tap coefficients of the filters included in each filter bank. With the increase in the number of filter tap coefficients and the number of allowed filter banks, the bit overhead for transmitting the ALF non - linear clipping index will increase significantly, thus affecting the overall compression efficiency.

[0138] To solve the technical problems existing in the above-related technologies, the embodiments of the present application provide an enhanced ALF non-linear clipping method using a shared non-linear clipping index and a related non-linear clipping index transmission method, which can improve the performance of ALF non-linear clipping and is beneficial to improving the overall compression efficiency of the encoder.

[0139] The technical solutions of the embodiments of the present application are described in detail below through some embodiments. These several embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0140] Embodiment 1

[0141] Figure 4 It is a schematic flow chart of a decoding method P400 provided by the embodiments of the present application. Among them, the execution subject of the decoding method P400 is a processor. Refer to Figure 4 , the method P400 includes:

[0142] S410, parsing the bitstream to determine a target flag, where the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non-linear clipping index.

[0143] S420, if the value of the target flag is a first value, obtaining a target non-linear clipping index, where the target non-linear clipping index is a non-linear clipping index shared by the tap coefficients of the at least one filter.

[0144] Exemplarily, there is a preset mapping relationship between different non-linear clipping indexes and different non-linear clipping intervals. For example, 4 clipping indexes [0, 1, 2, 3] similar to VTM or ECM can be used, and the absolute values of the clipping intervals of this index association relationship are [1024, 128, 32, 8] respectively. To improve the refinement degree, the number of clipping indexes can also be increased according to actual needs. For example, 8 clipping indexes [0, 1, 2, 3, 4, 5, 6, 7] can be used, and the absolute values of the clipping intervals of this index association relationship can be [1024, 256, 128, 64, 32, 16, 8, 4].

[0145] Exemplarily, the above non-linear clipping index and the corresponding clipping interval can also be transmitted in HLS (SPS (Sequence Parameter Set), PPS (Picture Parameter Set), VPS (Video Parameter Set), APS, Picture Header or Slice Header, etc.).

[0146] Exemplarily, whether to use the target non - linear index for sharing provided by the embodiments of the present application can also be transmitted in HLS (such as SPS, PPS, VPS, APS, PictureHeader or SliceHeader, etc.).

[0147] Exemplarily, after the processor parses the code stream to determine the above - mentioned target non - linear clipping index, it obtains a target non - linear clipping interval that has a mapping relationship with the target non - linear clipping index, so as to perform a non - linear clipping operation on the input of the at least one filter through the target non - linear clipping interval. Thus, the difference between the ALF input and the current pixel is restricted by the clipping method. Furthermore, it can enable the ALF to consider both the spatial similarity and sample similarity between adjacent pixels and the current pixel to be processed. It can be seen that the embodiments of the present application provide an enhanced ALF non - linear clipping method, which can improve the performance of ALF non - linear clipping.

[0148] Exemplarily, the above - mentioned target non - linear clipping index for sharing can be used for one or more of the chrominance component, luminance component, and cross - color component. For example, it can be used for the luminance component or the chrominance component respectively; for example, it can also be used for the luminance component and the chrominance component simultaneously; for example, it can also be used in the case of cross - color components (such as using the luminance component to enhance the chrominance component, using the Cb component to enhance the Cr component, using the Cr component to enhance the Cb component).

[0149] In the solution provided by the method P400 of the present application, the processor can determine the value of the target flag by parsing the code stream. Among them, if the value of the target flag is the first value, it indicates that there is at least one filter whose tap coefficients use a shared non - linear clipping index; if the value of the target flag is not the first value, it indicates that there is no filter whose tap coefficients use a shared non - linear clipping index. Further, in the case where the value of the target flag is the first value, the processor further obtains the target non - linear clipping index, where the target non - linear clipping index is the non - linear clipping index shared by the tap coefficients of the at least one filter. Thus, in the embodiments of the present application, the non - linear clipping indexes respectively corresponding to the multiple tap coefficients of the at least one filter can be represented by a target non - linear clipping index, which can effectively reduce the bit overhead of the non - linear clipping index and is beneficial to improving the compression efficiency of the video. At the same time, the embodiments of the present application provide an enhanced ALF non - linear clipping method, which can improve the performance of ALF non - linear clipping.

[0150] Embodiment 2

[0151] Based on Embodiment 1, Embodiment 2 of the present application also provides a decoding method. The implementation methods described in Embodiment 1 can all be applied to Embodiment 2 and can achieve the same technical effects.

[0152] As a specific implementation of S410: The above-mentioned target flag includes a first flag, and the first flag is used to indicate whether the tap coefficients of all filters in multiple filter banks that support shared use of a non-linear clipping index use a shared non-linear clipping index. Exemplarily, at the encoding end, whether to use a shared non-linear clipping index for the tap coefficients of all filters in multiple supported filter banks can be determined by rate-distortion cost RDO. When the encoder determines that the multiple filter banks support the use of a shared non-linear clipping index for the tap coefficients of all filters, the value of the first flag is determined and the first flag and its value are written into the bitstream. Thus, the processor can obtain the value of the first flag by parsing the bitstream.

[0153] Exemplarily, the first flag can be represented as "alf_alt_share_nonlinear_flag". If the value of alf_alt_share_nonlinear_flag is a second value (such as "0"), it means that a shared non-linear clipping index will not be used for the tap coefficients of all filters in the multiple filter banks; if the value of alf_alt_share_nonlinear_flag is a first value (such as "1"), it means that a shared non-linear clipping index is used for the tap coefficients of all filters in the multiple filter banks.

[0154] As a specific implementation of S420: When the value of the first flag alf_alt_share_nonlinear_flag is the first value (such as "1"), the processor can determine a first non-linear clipping index, which is exemplarily represented as "alf_alt_shared_nonlinear_idx", by parsing the bitstream. Thus, the first non-linear clipping index "alf_alt_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of all filters in the multiple filter banks.

[0155] In this exemplary embodiment, a transmission process of related syntax elements "alf_alt_share_nonlinear_flag" and "alf_alt_shared_nonlinear_idx" is shown in Table 4.

[0156] Table 4

[0157]

[0158] Referring to Table 4, the processor first parses the alf_alt_share_nonlinear_flag (the first flag). If the value of this syntax element is the first value (e.g., "1"), indicating that the tap coefficients of all filters in multiple filter banks use a shared non-linear clipping index, then it will further parse the alf_alt_shared_nonlinear_idx (the first non-linear clipping index) to obtain the non-linear clipping index shared by the tap coefficients of all filters in multiple filter banks. In this case, for the above-mentioned multiple filter banks, only one shared non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the inputs of all filters in multiple filter banks. Thus, it can significantly reduce the bit overhead of the non-linear clipping index, which is beneficial to improving the video compression efficiency.

[0159] Exemplarily, when a filter bank uses non-linear clipping and the alf_alt_share_nonlinear_flag (the first flag) has a second value (e.g., "0"), the processor needs to parse the corresponding non-linear clipping index for each tap coefficient.

[0160] Embodiment III

[0161] Based on Embodiment I, Embodiment III of the present application also provides a decoding method P500. The implementation methods described in Embodiment I can all be applied to Embodiment III and can achieve the same technical effects. Figure 5 It is a schematic flowchart of a decoding method P500 provided by an embodiment of the present application.

[0162] As a specific implementation of S410, execute S510: Parse the bitstream to determine a second flag, where the second flag is used to indicate whether there is at least one first target filter bank among multiple filter banks that support sharing a non-linear clipping index, and among them, the above-mentioned first target filter bank includes at least one filter whose tap coefficients use a shared non-linear clipping index.

[0163] In this embodiment, the above-mentioned target flag includes a second flag, and the second flag is used to indicate whether there is at least one first target filter bank among multiple filter banks that support sharing a non-linear clipping index, and among them, the above-mentioned first target filter bank includes at least one filter whose tap coefficients use a shared non-linear clipping index. Exemplarily, at the encoding end, whether there is the above-mentioned first target filter bank among the above-mentioned multiple filter banks can be determined by rate-distortion cost RDO. In the case where the encoder determines that there is the above-mentioned first target filter bank among multiple filter banks that support sharing a non-linear clipping index, determine the value of the second flag and write the second flag and its value into the bitstream. Thus, the processor can obtain the value of the second flag by parsing the bitstream.

[0164] Exemplarily, the above second flag may be expressed as "alf_alt_has_filter_share_nonlinear". If the value of alf_alt_has_filter_share_nonlinear is the second value (such as "0"), it indicates that none of the multiple filter banks that support shared use of the nonlinear clipping index share the use of the nonlinear clipping index; if the value of alf_alt_has_filter_share_nonlinear is the first value (such as "1"), it indicates that there is at least one of the above first target filter banks among the multiple filter banks.

[0165] As a specific implementation manner of S420, S520 - S540 are executed.

[0166] In S520, if the above second flag takes the first value, the bitstream is parsed to determine a third flag corresponding to each filter bank, and the third flag is used to indicate whether the current filter bank is the above first target filter bank.

[0167] As described above, if the second flag alf_alt_has_filter_share_nonlinear takes the first value (such as "1"), it means that there is at least one of the above first target filter banks among the multiple (such as N) filter banks. Further, in order to further locate which filter bank belongs to the first target filter bank, the processor needs to determine the third flag corresponding to the i-th (where i is an integer sequentially taking values from 1 to N) filter bank among the N filter banks. The third flag of the i-th filter bank is used to indicate whether the i-th filter bank is the above first target filter bank, that is, at least one filter in the i-th filter bank uses a shared nonlinear clipping index for the tap coefficients.

[0168] Exemplarily, the above third flag may be expressed as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is the second value (such as "0"), it indicates that the current filter bank does not belong to the above first target filter bank, that is, the current filter bank does not contain a filter with tap coefficients using a shared nonlinear clipping index; if the value of alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it indicates that the current filter bank belongs to the above first target filter bank, that is, the current filter bank contains at least one filter with tap coefficients using a shared nonlinear clipping index.

[0169] In S530, if the above-mentioned third flag takes the first value, parse the bitstream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0170] As described above, if the third flag alf_filterset_has_filter_share_nonlinear takes the first value (such as "1"), it means that the current filter bank belongs to the above-mentioned first target filter bank, that is, at least one filter tap coefficient in the current filter bank uses a shared non-linear clipping index. Further, in order to further locate which filter in the first target filter bank has tap coefficients sharing the use of the non-linear clipping index, it is necessary to determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank. Suppose the current first target filter bank contains M filters, and the fourth flag of the j-th (where j is an integer taking values from 1 to M in sequence) filter is used to indicate whether the tap coefficients of the j-th filter share the use of the non-linear clipping index.

[0171] Exemplarily, the above-mentioned fourth flag can be expressed as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (such as "0"), it means that the tap coefficients of the current filter do not use a shared non-linear clipping index; if alf_filter_share_nonlinear takes the first value (such as "1"), it means that the tap coefficients of the current filter use a shared non-linear clipping index.

[0172] In S540, if the above-mentioned fourth flag takes the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0173] As described above, if the fourth flag alf_filter_share_nonlinear takes the first value (such as "1"), it means that the tap coefficients of the current filter use a shared non-linear clipping index, that is, the filter with tap coefficients using a shared non-linear clipping index is located. Further, the processor can parse the bitstream to determine the second non-linear clipping index, which is exemplarily expressed as "alf_filter_shared_nonlinear_idx". Thus, the above-mentioned second non-linear clipping index "alf_filter_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of the located above-mentioned filter.

[0174] In this exemplary embodiment, a transmission process of relevant syntax elements is shown in Table 5.

[0175] Table 5

[0176]

[0177] Referring to Table 5, the processor first parses alf_alt_has_filter_share_nonlinear (the second flag). If the value of this syntax element is the first value (e.g., "1"), it means that there is at least one of the above-mentioned first target filter banks among the above-mentioned multiple filter banks. Further, in order to locate which filter bank belongs to the first target filter bank, the processor parses alf_filterset_has_filter_share_nonlinear (the third flag). If the value of this syntax element is the first value (e.g., "1"), it means that the current filter bank belongs to the above-mentioned first target filter bank, that is, at least one filter tap coefficient in the current filter bank uses a shared non-linear clipping index. In order to further locate which filter in the first target filter bank shares the use of the non-linear clipping index for its tap coefficients, the processor parses alf_filter_share_nonlinear (the fourth flag). If the value of this syntax element is the first value (e.g., "1"), it means that the tap coefficients of the current filter use a shared non-linear clipping index, and then alf_filter_shared_nonlinear_idx (the second non-linear clipping index) will be further parsed to obtain the non-linear clipping index shared by the tap coefficients of the located filter. In this case, for the multiple tap coefficients of the located filter, only one shared non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be reduced, which is beneficial to improving the compression efficiency of the video.

[0178] Embodiment 4

[0179] Based on Embodiment 1, Embodiment 4 of the present application also provides a decoding method P600. The implementation methods described in Embodiment 1 can all be applied to Embodiment 4 and can achieve the same technical effects. Figure 6 It is a schematic flowchart of a decoding method P600 provided by an embodiment of the present application.

[0180] As a specific implementation of S410, S610 is executed: Parse the code stream to determine the third flag, where the above-mentioned target flag is used to indicate whether the current filter bank is the first target filter bank, and the above-mentioned first target filter bank includes at least one filter whose tap coefficients use a shared non-linear clipping index.

[0181] In this embodiment, the above-mentioned target flag includes a third flag, and the third flag is used to indicate whether the current filter bank is a first target filter bank, where the first target filter bank includes tap coefficients of at least one filter using a shared non-linear clipping index. Exemplarily, at the encoding end, whether the current filter bank belongs to the first target filter bank can be determined by rate-distortion cost RDO. When the encoder determines that the current filter bank has the first target filter bank, the value of the third flag is determined and the third flag and its value are written into the bitstream. Thus, the processor can obtain the value of the third flag by parsing the bitstream.

[0182] Exemplarily, the third flag can be expressed as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is a second value (such as "0"), it means that the current filter bank does not belong to the first target filter bank, that is, the current filter bank does not include a filter with tap coefficients using a shared non-linear clipping index; if the value of alf_filterset_has_filter_share_nonlinear is a first value (such as "1"), it means that the current filter bank belongs to the first target filter bank, that is, the current filter bank includes at least one filter with tap coefficients using a shared non-linear clipping index.

[0183] As a specific implementation of S420, S620 - S630 are executed.

[0184] In S620, if the value of the third flag is the first value, the bitstream is parsed to determine the fourth flag corresponding to each filter in the first target filter bank, and the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0185] As described above, if the value of the third flag alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it means that the current filter bank belongs to the first target filter bank, that is, the current filter bank includes at least one filter with tap coefficients using a shared non-linear clipping index. Further, in order to further locate which filter in the first target filter bank has tap coefficients sharing a non-linear clipping index, the value of the fourth flag corresponding to each filter in the first target filter bank needs to be determined. Suppose the current first target filter bank includes M filters, and the fourth flag of the j-th (j is an integer taking values from 1 to M in sequence) filter is used to indicate whether the tap coefficients of the j-th filter share a non-linear clipping index.

[0186] Exemplarily, the above-mentioned fourth flag may be represented as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it indicates that the tap coefficients of the current filter do not use the shared non-linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it indicates that the tap coefficients of the current filter use the shared non-linear clipping index.

[0187] In S630, if the above-mentioned fourth flag takes the first value, obtain the second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0188] As described above, if the fourth flag alf_filter_share_nonlinear takes the first value (such as "1"), it means that the tap coefficients of the current filter use the shared non-linear clipping index, that is, the filter with the tap coefficients using the shared non-linear clipping index is located. Further, the processor can determine the second non-linear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filter_shared_nonlinear_idx". Thus, the above-mentioned second non-linear clipping index "alf_filter_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of the located above-mentioned filter.

[0189] In this exemplary embodiment, a transmission process of related syntax elements is shown in Table 6.

[0190] Table 6

[0191]

[0192] Referring to Table 6, the processor first parses alf_filterset_has_filter_share_nonlinear (the third flag). If the value of this syntax element is the first value (e.g., "1"), it indicates that the current filter bank belongs to the first target filter bank mentioned above, that is, at least one filter tap coefficient in the current filter bank uses a shared non - linear clipping index. To further locate which filter in the first target filter bank has its tap coefficients sharing the non - linear clipping index, the processor parses alf_filter_share_nonlinear (the fourth flag). If the value of this syntax element is the first value (e.g., "1"), indicating that the tap coefficients of the current filter use a shared non - linear clipping index, then it will further parse alf_filter_shared_nonlinear_idx (the second non - linear clipping index) to obtain the non - linear clipping index shared by the tap coefficients of the located filter. In this case, for the multiple tap coefficients of the located filter, only one shared non - linear clipping index needs to be transmitted to achieve the non - linear clipping operation on the input of the filter. This can reduce the bit overhead of the non - linear clipping index, and thus is beneficial to improving the compression efficiency of the video.

[0193] Embodiment 5

[0194] Based on Embodiment 1, Embodiment 5 of the present application also provides a decoding method. The implementation methods described in Embodiment 1 can all be applied to Embodiment 5 and achieve the same technical effects.

[0195] As a specific implementation of S410: The above - mentioned target flag includes the fourth flag, and the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non - linear clipping index. Exemplarily, at the encoding end, whether to use a shared non - linear clipping index for the tap coefficients of the current filter can be determined by rate - distortion cost RDO. When the encoder determines that the tap coefficients of the current filter use a shared non - linear clipping index, the value of the fourth flag is determined and the fourth flag and its value are written into the bitstream. Thus, the processor can obtain the value of the fourth flag by parsing the bitstream.

[0196] Exemplarily, the above - mentioned fourth flag can be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear has a second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared non - linear clipping index; if alf_filter_share_nonlinear has a first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared non - linear clipping index.

[0197] As a specific implementation of S420: When the fourth flag alf_filter_share_nonlinear takes a first value (such as "1"), the processor can determine a second nonlinear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filter_shared_nonlinear_idx". Thus, the above-mentioned second nonlinear clipping index "alf_filter_shared_nonlinear_idx" can represent the nonlinear clipping index shared by the tap coefficients of the current filter.

[0198] In this exemplary embodiment, a transmission process of related syntax elements is shown in Table 7.

[0199] Table 7

[0200]

[0201] Referring to Table 7, the processor first parses alf_filter_share_nonlinear (the fourth flag). If this syntax element takes the first value (such as "1"), indicating that the tap coefficients of the current filter use a shared nonlinear clipping index, it will further parse alf_filter_shared_nonlinear_idx (the second nonlinear clipping index) to obtain the nonlinear clipping index shared by the tap coefficients of the current filter. In this case, for multiple tap coefficients of this filter, only one shared nonlinear clipping index needs to be transmitted to achieve the nonlinear clipping operation on the input of this filter. Thus, the bit overhead of the nonlinear clipping index can be reduced, which is beneficial to improving the compression efficiency of the video.

[0202] Embodiment Six

[0203] Based on Embodiment One, Embodiment Six of the present application also provides a decoding method P700. The implementation methods described in Embodiment One can all be applied to Embodiment Six and can achieve the same technical effects. Figure 7 It is a schematic flowchart of a decoding method P700 provided by an embodiment of the present application.

[0204] As a specific implementation of S410, execute S710: Parse the bitstream to determine a fifth flag, where the fifth flag is used to indicate whether there is at least one second target filter bank, and the tap coefficients of the filters in the second target filter bank use a shared nonlinear clipping index.

[0205] In this embodiment, the above-mentioned target flag includes a fifth flag, and the fifth flag is used to indicate whether there is at least one second target filter bank among multiple filter banks that support shared use of a non-linear clipping index, where the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index. Exemplarily, at the encoding end, whether there is the second target filter bank among the multiple filter banks can be determined by rate-distortion cost RDO. When the encoder determines that there is the second target filter bank among the multiple filter banks that support shared use of the non-linear clipping index, the value of the fifth flag is determined and the fifth flag and its value are written into the bitstream. Thus, the processor can obtain the value of the fifth flag by parsing the bitstream.

[0206] Exemplarily, the fifth flag can be represented as "alf_has_filterset_share_nonlinear". If the value of alf_has_filterset_share_nonlinear is a second value (such as "0"), it means that the filters in all supported filter banks do not use a shared non-linear clipping index, and there is no need to transmit additional syntax elements related to the shared non-linear index; if the value of alf_has_filterset_share_nonlinear is a first value (such as "1"), it means that there is at least one of the second target filter banks among the multiple filter banks.

[0207] As a specific implementation of S420, S720 - S730 are executed.

[0208] In S720, if the value of the fifth flag is the first value, parse the bitstream to determine the sixth flag corresponding to each filter bank, and the sixth flag is used to indicate whether the current filter bank is the second target filter bank.

[0209] As described above, if the value of the fifth flag alf_has_filterset_share_nonlinear is the first value (such as "1"), it means that there is at least one of the second target filter banks among the multiple (such as L) filter banks. Further, in order to further locate which filter bank belongs to the second target filter bank, it is necessary to determine the sixth flag corresponding to the i-th (where i is an integer that takes values from 1 to L in sequence) filter bank among the L filter banks. The sixth flag of the i-th filter bank is used to indicate whether the i-th filter bank is the second target filter bank, that is, the tap coefficients of the filters in the i-th filter bank use a shared non-linear clipping index.

[0210] Exemplarily, the above-mentioned sixth flag can be represented as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it indicates that the current filter bank does not belong to the above-mentioned second target filter bank, that is, the tap coefficients of all filters in the current filter bank do not use a shared non-linear clipping index; if the value of alf_filterset_share_nonlinear_flag is the first value (such as "1"), it indicates that the current filter bank belongs to the above-mentioned second target filter bank, that is, the tap coefficients of the filters in the current filter bank use a shared non-linear clipping index.

[0211] In S730, if the above-mentioned sixth flag takes the first value, obtain a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the above-mentioned second target filter bank.

[0212] As described above, if the sixth flag alf_filterset_share_nonlinear_flag takes the first value (such as "1"), it means that the tap coefficients of the filters in the current filter bank use a shared non-linear clipping index, that is, the filter with the tap coefficients using the shared non-linear clipping index is located. Further, the processor can determine the third non-linear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filterset_shared_nonlinear_idx". Thus, the above-mentioned third non-linear clipping index "alf_filterset_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of the located filter.

[0213] In this exemplary embodiment, a transmission process of related syntax elements is shown in Table 8.

[0214] Table 8

[0215]

[0216]

[0217] Referring to Table 8, the processor first parses alf_has_filterset_share_nonlinear (the fifth flag). If the value of this syntax element is the first value (e.g., "1"), it indicates that there is at least one of the above-mentioned second target filter banks in the above-mentioned L filter banks, that is, at least one of the above-mentioned L filter banks contains a filter bank in which all tap coefficients use a shared non-linear clipping index. Further, in order to locate which filter bank belongs to the second target filter bank, the processor parses alf_filterset_share_nonlinear_flag (the sixth flag). If the value of this syntax element is the first value (e.g., "1"), it indicates that the current filter bank belongs to the above-mentioned second target filter bank, that is, all tap coefficients of all filters in the current filter bank use a shared non-linear clipping index. The processor will then further parse alf_filterset_shared_nonlinear_idx (the third non-linear clipping index) to obtain the non-linear clipping index shared by all tap coefficients of all filters in the above-mentioned second target filter bank. In this case, for the multiple tap coefficients respectively corresponding to all filters in the above-mentioned current filter bank, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the inputs of all filters in this filter bank. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0218] Embodiment VII

[0219] Based on Embodiment I, Embodiment VII of the present application also provides a decoding method. The implementation methods described in Embodiment I can all be applied to Embodiment VII and achieve the same technical effects.

[0220] As a specific implementation of S410: the above-mentioned target flag includes the sixth flag, and the sixth flag is used to indicate whether the current filter bank is the second target filter bank, where the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index. Exemplarily, at the encoding end, whether to use a shared non-linear clipping index for all tap coefficients of all filters in the current filter bank can be determined by rate-distortion cost RDO. When the encoder determines that all tap coefficients of all filters in the current filter bank use a shared non-linear clipping index, the value of the sixth flag is determined and the sixth flag and its value are written into the bitstream. Thus, the processor can obtain the value of the sixth flag by parsing the bitstream.

[0221] Exemplarily, the above sixth flag may be represented as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it indicates that the current filter bank does not belong to the above second target filter bank, that is, the tap coefficients of all filters in the current filter bank do not use a shared non-linear clipping index; if the value of alf_filterset_share_nonlinear_flag is the first value (such as "1"), it indicates that the current filter bank belongs to the above second target filter bank, that is, the tap coefficients of all filters in the current filter bank use a shared non-linear clipping index.

[0222] As a specific implementation of S420: When the value of the sixth flag alf_filterset_share_nonlinear_flag is the first value (such as "1"), the processor can determine the third non-linear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filterset_shared_nonlinear_idx". Thus, the above third non-linear clipping index "alf_filterset_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of all filters in the current filter bank.

[0223] In this exemplary embodiment, a transmission process of related syntax elements is shown in Table 9.

[0224] Table 9

[0225]

[0226] Referring to Table 9, the processor first parses alf_filterset_share_nonlinear_flag (the sixth flag). If the value of this syntax element is the first value (such as "1"), it indicates that the current filter bank belongs to the above second target filter bank, that is, the tap coefficients of all filters in the current filter bank use a shared non-linear clipping index. Then the processor will further parse alf_filterset_shared_nonlinear_idx (the third non-linear clipping index), so as to obtain the non-linear clipping index shared by the tap coefficients of all filters in the current filter bank. In this case, for the multiple tap coefficients respectively corresponding to all filters in the current filter bank, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the inputs of all filters in the filter bank. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0227] Embodiment VIII

[0228] Based on Embodiment I, Embodiment VIII of the present application also provides a decoding method P800. The implementation manners described in Embodiment I can all be applied to Embodiment VIII and can achieve the same technical effects. Figure 8 It is a schematic flowchart of a decoding method P800 provided by an embodiment of the present application. Refer to Figure 8 , method P800 includes S810 - S850.

[0229] As a specific implementation manner of S410, in S810, the bitstream is parsed to determine a first flag, and the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing a non - linear clipping index use a shared non - linear clipping index.

[0230] The target flag includes the first flag, and the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing a non - linear clipping index use a shared non - linear clipping index. Exemplarily, at the encoding end, whether to use a shared non - linear clipping index for the tap coefficients of all filters in multiple supportable filter banks can be determined by rate - distortion cost RDO. When the encoder determines that the multiple filter banks support the use of a shared non - linear clipping index for the tap coefficients of all filters, the value of the first flag is determined and the first flag and its value are written into the bitstream. Thus, the processor can obtain the value of the first flag by parsing the bitstream.

[0231] Exemplarily, the first flag can be represented as "alf_alt_share_nonlinear_flag". If the value of alf_alt_share_nonlinear_flag is a second value (such as "0"), it means that a shared non - linear clipping index will not be used for the tap coefficients of all filters in the multiple filter banks; if the value of alf_alt_share_nonlinear_flag is a first value (such as "1"), it means that a shared non - linear clipping index is used for the tap coefficients of all filters in the multiple filter banks.

[0232] As a specific implementation manner of S420, S820 - S850 are executed.

[0233] In S820, if the value of the first flag is the second value, the bitstream is parsed to determine a second flag, and the second flag is used to indicate whether there is at least one first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use a shared non - linear clipping index.

[0234] As described above, if the first flag alf_alt_share_nonlinear_flag takes the second value (such as "0"), it means that the shared non-linear clipping index will not be used for the tap coefficients of all the filters in the above-mentioned multiple filter banks. Then the processor needs to parse the bitstream to determine whether there is a first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index.

[0235] Exemplarily, the processor parses the bitstream to determine the value of the second flag. The second flag is used to indicate whether there is at least one first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index. Exemplarily, at the encoding end, whether there is the first target filter bank in the above-mentioned multiple filter banks can be determined by rate distortion cost RDO. When the encoder determines that there is the first target filter bank in the multiple filter banks that support shared use of the non-linear clipping index, determine the value of the second flag and write the second flag and its value into the bitstream. Thus, the processor can obtain the value of the second flag by parsing the bitstream.

[0236] Exemplarily, the second flag can be expressed as "alf_alt_has_filter_share_nonlinear". If alf_alt_has_filter_share_nonlinear takes the second value (such as "0"), it means that none of the multiple filter banks that support shared use of the non-linear clipping index share the non-linear clipping index; if alf_alt_has_filter_share_nonlinear takes the first value (such as "1"), it means that there is at least one of the above-mentioned first target filter banks in the above-mentioned multiple filter banks.

[0237] In S830, if the second flag takes the first value, parse the bitstream to determine the third flag corresponding to each filter bank. The third flag is used to indicate whether the current filter bank is the first target filter bank.

[0238] The specific implementation manner of S830 is the same as that of S520 and will not be elaborated here.

[0239] In S840, if the third flag takes the first value, parse the bitstream to determine the fourth flag corresponding to each filter in the first target filter bank. The fourth flag is used to indicate whether the tap coefficients of the current filter use the shared non-linear clipping index.

[0240] The specific implementation manner of S840 is the same as that of S530 and will not be elaborated here.

[0241] In S850, if the value of the above-mentioned fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0242] The specific implementation of S850 is the same as that of S540 and will not be elaborated here.

[0243] In the solution provided in the eighth embodiment, for the multiple tap coefficients of the above-mentioned located filter, only one shared second non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thereby, the bit overhead of the non-linear clipping index can be reduced, which is conducive to improving the compression efficiency of the video.

[0244] Embodiment Nine

[0245] Based on Embodiment One, Embodiment Nine of the present application also provides a decoding method P900. The implementation methods described in Embodiment One can all be applied to Embodiment Nine and can achieve the same technical effects. Figure 9 It is a schematic flowchart of a decoding method P900 provided by an embodiment of the present application. Refer to Figure 9 , method P900 includes S910 - S940.

[0246] As a specific implementation of S410, in S910, parse the code stream to determine a first flag, where the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing the non-linear clipping index use the shared non-linear clipping index.

[0247] The specific implementation of S910 is the same as that of S810 and will not be elaborated here.

[0248] As a specific implementation of S420, execute S920 - S940.

[0249] In S920, if the value of the above-mentioned first flag is the second value, parse the code stream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is a first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index.

[0250] If the first flag alf_alt_share_nonlinear_flag takes the second value (such as "0"), it means that the shared non-linear clipping index will not be used for the tap coefficients of all the filters in the above-mentioned multiple filter banks. Then the processor needs to parse the bitstream to determine whether the current filter bank belongs to the first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index.

[0251] Exemplarily, the processor parses the bitstream to determine the value of the third flag. The third flag is used to indicate whether the current filter bank is the first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index. Exemplarily, at the encoding end, whether the current filter bank belongs to the first target filter bank can be determined by rate-distortion cost RDO. When the encoder determines that the first target filter bank exists in the current filter bank, it determines the value of the third flag and writes the third flag and its value into the bitstream. Thus, the processor can obtain the value of the third flag by parsing the bitstream.

[0252] Exemplarily, the third flag can be expressed as "alf_filterset_has_filter_share_nonlinear". If alf_filterset_has_filter_share_nonlinear takes the second value (such as "0"), it means that the current filter bank does not belong to the first target filter bank, that is, the current filter bank does not include a filter whose tap coefficients use the shared non-linear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as "1"), it means that the current filter bank belongs to the first target filter bank, that is, the current filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index.

[0253] In S930, if the third flag takes the first value, parse the bitstream to determine the fourth flag corresponding to each filter in the first target filter bank, and the fourth flag is used to indicate whether the tap coefficients of the current filter use the shared non-linear clipping index.

[0254] The specific implementation of S930 is the same as that of S620 and will not be elaborated here.

[0255] In S940, if the fourth flag takes the first value, obtain the second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0256] The specific implementation of S940 is the same as that of S630 and will not be elaborated here.

[0257] In the solution provided in the ninth embodiment, for the multiple tap coefficients of the located filter, only one second non - linear clipping index for shared use needs to be transmitted, and the non - linear clipping operation on the input of the filter can be realized. Thereby, the bit overhead of the non - linear clipping index can be reduced, which is conducive to improving the compression efficiency of the video.

[0258] Embodiment Ten

[0259] Based on Embodiment One, Embodiment Ten of the present application also provides a decoding method P1000. The implementation methods described in Embodiment One can all be applied to Embodiment Ten and can achieve the same technical effects. Figure 10 It is a schematic flowchart of a decoding method P1000 provided by an embodiment of the present application. Refer to Figure 10 , the method P1000 includes S1010 - S1030.

[0260] As a specific implementation of S410, in S1010, the bitstream is parsed to determine a first flag, and the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support shared use of the non - linear clipping index use a shared non - linear clipping index.

[0261] The specific implementation of S1010 is the same as that of S810 and will not be elaborated here.

[0262] As a specific implementation of S420, S1020 - S1030 are executed.

[0263] In S1020, if the first flag takes a second value, the bitstream is parsed to determine a fourth flag corresponding to each filter, and the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non - linear clipping index.

[0264] If the first flag alf_alt_share_nonlinear_flag takes a second value (such as "0"), it means that the shared non - linear clipping index will not be used for the tap coefficients of all filters in the multiple filter banks. Then the processor needs to parse the bitstream to determine whether the tap coefficients of the current filter use a shared non - linear clipping index.

[0265] Exemplarily, the processor parses the bitstream to determine the value of the fourth flag. The above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index. Exemplarily, at the encoding end, whether to use a shared non-linear clipping index for the tap coefficients of the current filter can be determined by rate-distortion cost RDO. When the encoder determines that the tap coefficients of the current filter use a shared non-linear clipping index, it determines the value of the fourth flag and writes the fourth flag and its value into the bitstream. Thus, the processor can obtain the value of the fourth flag by parsing the bitstream.

[0266] Exemplarily, the above-mentioned fourth flag can be represented as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it means that the tap coefficients of the current filter do not use a shared non-linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it means that the tap coefficients of the current filter use a shared non-linear clipping index.

[0267] In S1030, if the value of the above-mentioned fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0268] When the value of the fourth flag alf_filter_share_nonlinear is the first value (such as "1"), the processor can determine the second non-linear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filter_shared_nonlinear_idx". Thus, the above-mentioned second non-linear clipping index "alf_filter_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of the current filter.

[0269] In the solution provided in Embodiment Ten, for the multiple tap coefficients of the above-mentioned located filter, only one shared second non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be reduced, which is beneficial to improving the compression efficiency of the video.

[0270] Embodiment Eleven

[0271] Based on Embodiment One, the embodiment of the present application also provides a decoding method P1100. The implementation methods described in Embodiment One can all be applied to Embodiment Eleven and can achieve the same technical effects. Figure 11It is a schematic flowchart of a decoding method P1100 provided by an embodiment of the present application. Refer to Figure 11 The method P1100 includes S1110 - S1140.

[0272] As a specific implementation manner of S410, in S1110, parse the bitstream to determine a first flag, where the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support shared use of a non - linear clipping index use a shared non - linear clipping index.

[0273] The specific implementation manner of S1110 is the same as that of S810 and will not be described herein again.

[0274] As a specific implementation manner of S420, execute S1120 - S1140.

[0275] In S1120, if the first flag takes a second value, parse the bitstream to determine a fifth flag, where the fifth flag is used to indicate whether there is at least one second target filter bank, and the tap coefficients of the filters in the second target filter bank use a shared non - linear clipping index.

[0276] If the first flag alf_alt_share_nonlinear_flag takes a second value (such as "0"), it means that the shared non - linear clipping index is not used for the tap coefficients of all filters in the multiple filter banks. Then the processor needs to parse the bitstream to determine whether there is a second target filter bank in the multiple filter banks, and the tap coefficients of the filters in the second target filter bank use a shared non - linear clipping index.

[0277] Exemplarily, the processor parses the bitstream to determine the value of the fifth flag. Exemplarily, at the encoding end, whether there is the second target filter bank in the multiple filter banks can be determined by rate - distortion cost RDO. When the encoder determines that there is the second target filter bank in the multiple filter banks that support shared use of a non - linear clipping index, determine the value of the fifth flag and write the fifth flag and its value into the bitstream. Thus, the processor can obtain the value of the fifth flag by parsing the bitstream.

[0278] Exemplarily, the above-mentioned fifth flag can be expressed as "alf_has_filterset_share_nonlinear". If the value of alf_has_filterset_share_nonlinear is the second value (such as "0"), it means that the filters in all supported filter banks do not use the shared non-linear clipping index, and there is no need to transmit additional syntax elements related to the shared non-linear index; if the value of alf_has_filterset_share_nonlinear is the first value (such as "1"), it means that there is at least one of the above-mentioned second target filter banks among the above-mentioned multiple filter banks.

[0279] In S1130, if the value of the above-mentioned fifth flag is the first value, parse the bitstream to determine the sixth flag corresponding to each filter bank, and the sixth flag is used to indicate whether the current filter bank is the above-mentioned second target filter bank.

[0280] The specific implementation manner of S1130 is the same as that of S720, and will not be elaborated here.

[0281] In S1140, if the value of the above-mentioned sixth flag is the first value, obtain the third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the above-mentioned second target filter bank.

[0282] The specific implementation manner of S1140 is the same as that of S730, and will not be elaborated here.

[0283] In the solution provided in the eleventh embodiment, for the multiple tap coefficients respectively corresponding to all the filters in the above-mentioned current filter bank, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the inputs of all the filters in the filter bank. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0284] Embodiment Twelve

[0285] Based on Embodiment One, Embodiment Twelve of the present application also provides a decoding method P1200. The implementation manners described in Embodiment One can all be applied to Embodiment Twelve and achieve the same technical effects. Figure 12 This is a schematic flowchart of a decoding method P1200 provided by an embodiment of the present application. Refer to Figure 12 , Method P1200 is implemented based on Method P1100. Method P1200 includes S1110 - S1140, and S1210 - S1240.

[0286] As a specific implementation of S410, in S1110, the bitstream is parsed to determine a first flag, where the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing the use of non-linear clipping indexes use a shared non-linear clipping index.

[0287] As a specific implementation of S420, S1120 - S1140 and S1210 - S1240 are executed.

[0288] Among them, the specific implementations of S1110 - S1140 have been introduced in detail in the above embodiments and will not be elaborated here.

[0289] In S1210, if the value of the fifth flag is the second value, it is determined that the second target filter bank does not exist among the multiple filter banks, and the bitstream is parsed to determine a second flag, where the second flag is used to indicate whether there is at least one first target filter bank, where the first target filter bank includes tap coefficients of at least one filter that use a shared non-linear clipping index.

[0290] Exemplarily, the fifth flag can be expressed as "alf_has_filterset_share_nonlinear". If the value of alf_has_filterset_share_nonlinear is the second value (such as "0"), it means that the filters in all supported filter banks do not use a shared non-linear clipping index, that is, the second target filter bank does not exist. Then the processor parses the bitstream to determine whether there is a first target filter bank among all supported filter banks.

[0291] Exemplarily, the processor parses the bitstream to determine the value of the second flag. Among them, the second flag is used to indicate whether there is at least one first target filter bank, where the first target filter bank includes tap coefficients of at least one filter that use a shared non-linear clipping index. Exemplarily, at the encoding end, whether there is the first target filter bank among the multiple filter banks can be determined by rate-distortion cost RDO. In the case that the encoder determines that there is the first target filter bank among the multiple filter banks that support sharing the use of non-linear clipping indexes, the value of the second flag is determined and the second flag and its value are written into the bitstream. Thus, the processor can obtain the value of the second flag by parsing the bitstream.

[0292] Exemplarily, the above-mentioned second flag can be expressed as "alf_alt_has_filter_share_nonlinear". If the value of alf_alt_has_filter_share_nonlinear is the second value (such as "0"), it means that none of the multiple filter banks that support shared use of the nonlinear clipping index share the use of the nonlinear clipping index; if the value of alf_alt_has_filter_share_nonlinear is the first value (such as "1"), it means that there is at least one of the above-mentioned first target filter banks among the multiple filter banks.

[0293] In S1220, if the above-mentioned second flag takes the first value, the bitstream is parsed to determine the third flag corresponding to each filter bank, and the third flag is used to indicate whether the current filter bank is the above-mentioned first target filter bank.

[0294] The specific implementation manner of S1220 is the same as that of S520, and will not be elaborated here.

[0295] In S1230, if the above-mentioned third flag takes the first value, the bitstream is parsed to determine the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and the fourth flag is used to indicate whether the tap coefficients of the current filter use the shared nonlinear clipping index;

[0296] The specific implementation manner of S1230 is the same as that of S530, and will not be elaborated here.

[0297] In S1240, if the above-mentioned fourth flag takes the first value, obtain the second nonlinear clipping index, where the second nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the filter.

[0298] The specific implementation manner of S1240 is the same as that of S540, and will not be elaborated here.

[0299] In the solution provided in the twelfth embodiment, for the multiple tap coefficients of the above-mentioned current filter, only one shared nonlinear clipping index needs to be transmitted to achieve the nonlinear clipping operation on the input of the filter. Thus, the bit overhead of the nonlinear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0300] Embodiment Thirteen

[0301] Based on Embodiment One, Embodiment Thirteen of the present application also provides a decoding method P1300. The implementation manners described in Embodiment One can all be applied to Embodiment Thirteen and can achieve the same technical effects. Figure 13It is a schematic flowchart of a decoding method P1300 provided by an embodiment of the present application. Refer to Figure 13 , the method P1300 is implemented based on the method P1100. The method P1300 includes S1110 - S1140, and S1310 - S1330.

[0302] As a specific implementation of S410, in S1110, the bitstream is parsed to determine a first flag, and the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support shared use of non - linear clipping indexes use a shared non - linear clipping index.

[0303] As a specific implementation of S420, S1120 - S1140 and S1310 - S1330 are executed.

[0304] Among them, the specific implementations of S1110 - S1140 have been introduced in detail in the above embodiments and will not be elaborated here.

[0305] In S1310, if the above - mentioned fifth flag takes a second value, it is determined that the second target filter bank does not exist in the above - mentioned multiple filter banks, and the bitstream is parsed to determine a third flag corresponding to each filter bank, and the third flag is used to indicate whether the current filter bank is the first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use a shared non - linear clipping index.

[0306] Exemplarily, the above - mentioned fifth flag can be expressed as "alf_has_filterset_share_nonlinear". If alf_has_filterset_share_nonlinear takes the second value (such as "0"), it means that the filters in all supported filter banks do not use a shared non - linear clipping index, that is, the second target filter bank does not exist.

[0307] To locate which filter bank belongs to the first target filter bank among all supported filter banks, the processor needs to determine the third flag corresponding to the i - th (where i is an integer sequentially taking values from 1 to Y) filter bank among all supported filter banks (assuming there are Y filter banks). The third flag of the i - th filter bank is used to indicate whether the i - th filter bank is the above - mentioned first target filter bank, that is, the i - th filter bank includes at least one filter whose tap coefficients use a shared non - linear clipping index.

[0308] Exemplarily, the above third flag can be expressed as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is the second value (such as "0"), it means that the current filter bank does not belong to the above first target filter bank, that is, the current filter bank does not contain a filter with a shared non-linear clipping index for tap coefficients; if the value of alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it means that the current filter bank belongs to the above first target filter bank, that is, the current filter bank contains at least one filter with a shared non-linear clipping index for tap coefficients.

[0309] In S1320, if the above third flag takes the first value, the bitstream is parsed to determine the fourth flag corresponding to each filter in the above first target filter bank, and the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0310] The specific implementation of S1320 is the same as that of S530 and will not be elaborated here.

[0311] In S1330, if the above fourth flag takes the first value, a second non-linear clipping index is obtained, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0312] The specific implementation of S1330 is the same as that of S540 and will not be elaborated here.

[0313] In the solution provided in the thirteenth embodiment, for the multiple tap coefficients of the above current filter respectively, only one shared non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is conducive to improving the video compression efficiency.

[0314] Embodiment Fourteen

[0315] Based on Embodiment One, Embodiment Fourteen of the present application also provides a decoding method P1400. The implementation methods described in Embodiment One can all be applied to Embodiment Fourteen and achieve the same technical effects. Figure 14 It is a schematic flowchart of a decoding method P1400 provided by an embodiment of the present application. Refer to Figure 14 , method P1400 is implemented based on method P1100. Method P1400 includes S1110 - S1140, and S1410 - S1420.

[0316] As a specific implementation of S410, in S1110, the bitstream is parsed to determine a first flag, where the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing the use of a non-linear clipping index use a shared non-linear clipping index.

[0317] As a specific implementation of S420, S1120 - S1140 and S1410 - S1420 are executed.

[0318] Among them, the specific implementations of S1110 - S1140 have been introduced in detail in the above embodiments and will not be elaborated here.

[0319] In S1410, if the above fifth flag takes a second value, it is determined that the second target filter bank does not exist among the multiple filter banks, and the bitstream is parsed to determine a fourth flag corresponding to each filter, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0320] Exemplarily, the above fifth flag can be represented as "alf_has_filterset_share_nonlinear". If alf_has_filterset_share_nonlinear takes a second value (such as "0"), it means that the filters in all supported filter banks do not use a shared non-linear clipping index, that is, the second target filter bank does not exist.

[0321] To locate which filter's tap coefficients share the use of a non-linear clipping index among all supported filter banks, it is necessary to determine the value of the fourth flag corresponding to each filter in all supported filter banks. Suppose there are X filters in all supported filter banks, and the fourth flag of the j-th filter (where j is an integer taking values from 1 to X in sequence) is used to indicate whether the tap coefficients of the j-th filter share the use of a non-linear clipping index.

[0322] Exemplarily, the above fourth flag can be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes a second value (such as "0"), it means that the tap coefficients of the current filter do not use a shared non-linear clipping index; if alf_filter_share_nonlinear takes a first value (such as "1"), it means that the tap coefficients of the current filter use a shared non-linear clipping index.

[0323] In S1420, if the value of the above fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above filter.

[0324] The specific implementation of S1420 is the same as that of S540, and will not be elaborated here.

[0325] In the solution provided in the fourteenth embodiment, for the multiple tap coefficients of the above current filter, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is conducive to improving the compression efficiency of the video.

[0326] Embodiment Fifteen

[0327] Based on Embodiment One, Embodiment Fifteen of the present application also provides a decoding method P1500. The implementation methods described in Embodiment One can all be applied to Embodiment Fifteen and achieve the same technical effects. Figure 15 This is a schematic flowchart of a decoding method P1500 provided by an embodiment of the present application. Refer to Figure 15 , Method P1500 is implemented based on Method P1100. Method P1500 includes S1110 - S1140, and S1510 - S1530.

[0328] As a specific implementation of S410, in S1110, parse the bitstream to determine a first flag, where the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing the non-linear clipping index use a shared non-linear clipping index.

[0329] As a specific implementation of S420, execute S1120 - S1140 and S1510 - S1530.

[0330] Among them, the specific implementation methods of S1110 - S1140 have been introduced in detail in the above embodiments and will not be elaborated here.

[0331] In S1510, if the value of the above sixth flag is the second value, determine that the current filter bank is not the above second target filter bank, and parse the bitstream to determine the third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is a first target filter bank, and among them, the first target filter bank includes at least one filter whose tap coefficients use a shared non-linear clipping index.

[0332] Exemplarily, the above-mentioned sixth flag may be represented as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it indicates that the current filter bank does not belong to the above-mentioned second target filter bank, that is, not all tap coefficients of the filters in the current filter bank use a shared non-linear clipping index.

[0333] To determine whether the current filter bank belongs to the first target filter bank, the processor decodes to determine the third flag corresponding to the current filter bank. The third flag of the current filter bank is used to indicate whether the current filter bank is the above-mentioned first target filter bank, that is, at least one of the filters in the current filter bank has tap coefficients that use a shared non-linear clipping index.

[0334] Exemplarily, the above-mentioned third flag may be represented as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is the second value (such as "0"), it indicates that the current filter bank does not belong to the above-mentioned first target filter bank, that is, the current filter bank does not contain filters with tap coefficients using a shared non-linear clipping index; if the value of alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it indicates that the current filter bank belongs to the above-mentioned first target filter bank, that is, the current filter bank contains at least one filter with tap coefficients using a shared non-linear clipping index.

[0335] In S1520, if the above-mentioned third flag takes the first value, the bitstream is parsed to determine the fourth flag corresponding to each filter in the above-mentioned first target filter bank. The fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0336] The specific implementation of S1520 is the same as that of S530 and will not be elaborated here.

[0337] In S1530, if the above-mentioned fourth flag takes the first value, a second non-linear clipping index is obtained, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0338] The specific implementation of S1530 is the same as that of S540 and will not be elaborated here.

[0339] In the solution provided in the fifteenth embodiment, for the multiple tap coefficients of the current filter described above, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. This can significantly reduce the bit overhead of the non-linear clipping index, thereby facilitating the improvement of the video compression efficiency.

[0340] Embodiment Sixteen

[0341] Based on Embodiment One, Embodiment Sixteen of the present application also provides a decoding method P1600. The implementation methods described in Embodiment One can all be applied to Embodiment Sixteen and achieve the same technical effects. Figure 16 It is a schematic flowchart of a decoding method P1600 provided by an embodiment of the present application. Refer to Figure 16 , Method P1600 is implemented based on Method P1100. Method P1600 includes S1110 - S1140, and S1610 - S1620.

[0342] As a specific implementation of S410, in S1110, the code stream is parsed to determine a first flag, and the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing a non-linear clipping index use a shared non-linear clipping index.

[0343] As a specific implementation of S420, S1120 - S1140 and S1610 - S1620 are executed.

[0344] Among them, the specific implementation methods of S1110 - S1140 are introduced in detail in the above embodiments and will not be elaborated here.

[0345] In S1610, if the above sixth flag takes a second value, it is determined that the current filter bank is not the above second target filter bank, and the code stream is parsed to determine a fourth flag corresponding to each filter, and the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0346] Exemplarily, the above sixth flag can be expressed as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it means that the current filter bank does not belong to the above second target filter bank, that is, not all the tap coefficients of the current filter bank use a shared non-linear clipping index.

[0347] To locate which filter's tap coefficients in the current filter bank share the use of the non-linear clipping index, it is necessary to determine the value of the fourth flag corresponding to each filter in the above-mentioned current filter bank. Suppose the current filter bank contains Z filters, and the fourth flag of the j-th filter (where j is an integer that takes values from 1 to Z in sequence) is used to indicate whether the tap coefficients of the j-th filter share the use of the non-linear clipping index.

[0348] Exemplarily, the above-mentioned fourth flag can be expressed as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it means that the tap coefficients of the current filter do not use the shared non-linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it means that the tap coefficients of the current filter use the shared non-linear clipping index.

[0349] In S1620, if the value of the above-mentioned fourth flag is the first value, obtain the second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0350] The specific implementation manner of S1620 is the same as that of S540, and will not be elaborated here.

[0351] In the solution provided in the sixteenth embodiment, for the multiple tap coefficients of the above-mentioned current filter, only one shared non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0352] Embodiment Seventeen

[0353] Based on Embodiment One, Embodiment Seventeen of the present application also provides a decoding method P700. The implementation manners described in Embodiment One can all be applied to Embodiment Seventeen and can achieve the same technical effects. Figure 17 It is a schematic flowchart of a decoding method P1700 provided by an embodiment of the present application. Refer to Figure 17 , method P1700 includes S1710 - S1730.

[0354] As a specific implementation manner of S410, in S1710, parse the code stream to determine the first flag, where the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing the use of the non-linear clipping index use the shared non-linear clipping index.

[0355] The specific implementation of S1710 is the same as that of S810, and will not be elaborated here.

[0356] As a specific implementation of S420, execute S1720 - S1730.

[0357] In S1720, if the first flag takes the second value, parse the bitstream to determine the sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is the second target filter bank, and among them, the tap coefficients of the filters in the second target filter bank use a shared non - linear clipping index.

[0358] If the first flag alf_alt_share_nonlinear_flag takes the second value (such as "0"), it means that the shared non - linear clipping index will not be used for the tap coefficients of all filters of multiple supportable filter banks. Then the processor needs to parse the bitstream to determine whether there is a second target filter bank, where the tap coefficients of the filters in the second target filter bank use a shared non - linear clipping index.

[0359] To further locate which filter bank belongs to the second target filter bank, the processor parses the bitstream to determine the value of the sixth flag corresponding to each filter bank. Exemplarily, the sixth flag can be expressed as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it means that the current filter bank does not belong to the second target filter bank, that is, the shared non - linear clipping index is not used for the tap coefficients of all filters in the current filter bank; if alf_filterset_share_nonlinear_flag takes the first value (such as "1"), it means that the current filter bank belongs to the second target filter bank, that is, the shared non - linear clipping index is used for the tap coefficients of all filters in the current filter bank.

[0360] In S1730, if the sixth flag takes the first value, obtain the third non - linear clipping index, where the third non - linear clipping index is the non - linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

[0361] The specific implementation of S1730 is the same as that of S730, and will not be elaborated here.

[0362] In the solution provided in the seventeenth embodiment, for the multiple tap coefficients respectively corresponding to all the filters in the current filter bank, only one shared non-linear clipping index needs to be transmitted to achieve non-linear clipping operations on the inputs of all the filters in the filter bank. This can significantly reduce the bit overhead of the non-linear clipping index, thereby facilitating the improvement of the video compression efficiency.

[0363] The eighteenth embodiment

[0364] Based on the first embodiment, the eighteenth embodiment of the present application also provides a decoding method P1800. The implementation methods described in the first embodiment can all be applied to the eighteenth embodiment and achieve the same technical effects. Figure 18 This is a schematic flowchart of a decoding method P1800 provided by an embodiment of the present application. Refer to Figure 18 , method P1800 is implemented based on method P1700. Method P1800 includes S1710 - S1730, and S1810 - S1830.

[0365] As a specific implementation of S410, in S1710, the bitstream is parsed to determine a first flag, and the first flag is used to indicate whether the tap coefficients of the filters in the multiple filter banks that support the shared use of the non-linear clipping index use the shared non-linear clipping index.

[0366] As a specific implementation of S420, S1720 - S1730 and S1810 - S1830 are executed.

[0367] Among them, the specific implementation methods of S1710 - S1730 have been introduced in detail in the above embodiments and will not be elaborated here.

[0368] In S1810, if the sixth flag takes a second value, it is determined that the current filter bank is not the second target filter bank, and the bitstream is parsed to determine a third flag corresponding to each filter bank. The third flag is used to indicate whether the current filter bank is a first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index.

[0369] Exemplarily, the sixth flag can be represented as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it means that the current filter bank does not belong to the second target filter bank, that is, not all the tap coefficients of the filters in the current filter bank use the shared non-linear clipping index.

[0370] To determine whether the current filter bank belongs to the first target filter bank, the processor decodes to determine the third flag corresponding to the current filter bank. The third flag of the current filter bank is used to indicate whether the current filter bank is the above-mentioned first target filter bank, that is, the tap coefficients of at least one filter in the current filter bank use a shared non-linear clipping index.

[0371] Exemplarily, the above-mentioned third flag can be expressed as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is the second value (such as "0"), it means that the current filter bank does not belong to the above-mentioned first target filter bank, that is, the current filter bank does not contain a filter with a tap coefficient using a shared non-linear clipping index; if the value of alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it means that the current filter bank belongs to the above-mentioned first target filter bank, that is, the current filter bank contains at least one filter tap coefficient using a shared non-linear clipping index.

[0372] In S1820, if the above-mentioned third flag takes the first value, the bitstream is parsed to determine the fourth flag corresponding to each filter in the above-mentioned first target filter bank. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared non-linear clipping index.

[0373] The specific implementation of S1820 is the same as that of S530, and will not be elaborated here.

[0374] In S1830, if the above-mentioned fourth flag takes the first value, obtain the second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0375] The specific implementation of S1530 is the same as that of S540, and will not be elaborated here.

[0376] In the solution provided in the eighteenth embodiment, for the multiple tap coefficients of the above-mentioned current filter, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0377] Embodiment Nineteen

[0378] Based on Embodiment 1, Embodiment 19 of the present application also provides a decoding method P1900. The implementation methods described in Embodiment 1 can all be applied to Embodiment 19 and achieve the same technical effects. Figure 19 It is a schematic flowchart of a decoding method P1900 provided by an embodiment of the present application. Refer to Figure 19 , method P1900 is implemented based on method P1700. Method P1900 includes S1710 - S1730, and S1910 - S1920.

[0379] As a specific implementation of S410, in S1710, the bitstream is parsed to determine a first flag, and the first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support shared use of the non - linear limiting index use a shared non - linear limiting index.

[0380] As a specific implementation of S420, S1720 - S1730 and S1910 - S1920 are executed.

[0381] In S1910, if the value of the sixth flag is the second value, it is determined that the current filter bank is not the second target filter bank, and the bitstream is parsed to determine a fourth flag corresponding to each filter. The fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non - linear limiting index.

[0382] Exemplarily, the sixth flag can be represented as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it means that the current filter bank does not belong to the second target filter bank, that is, the tap coefficients of all filters in the current filter bank do not use a shared non - linear limiting index.

[0383] To locate which filter's tap coefficients in the current filter bank share the use of the non - linear limiting index, it is necessary to determine the value of the fourth flag corresponding to each filter in the current filter bank. Suppose the current filter bank contains Z filters, and the fourth flag of the j - th filter (where j is an integer sequentially taking values from 1 to Z) is used to indicate whether the tap coefficients of the j - th filter share the use of the non - linear limiting index.

[0384] Exemplarily, the above fourth flag may be represented as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it indicates that the tap coefficients of the current filter do not use the shared non - linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it indicates that the tap coefficients of the current filter use the shared non - linear clipping index.

[0385] In S1920, if the above fourth flag takes the first value, obtain the second non - linear clipping index, where the second non - linear clipping index is the non - linear clipping index shared by the tap coefficients of the above filter.

[0386] The specific implementation of S1920 is the same as that of S540, and will not be elaborated here.

[0387] In the solution provided in the nineteenth embodiment, for the multiple tap coefficients of the above current filter, only one shared non - linear clipping index needs to be transmitted to achieve the non - linear clipping operation on the input of the filter. Thus, it can significantly reduce the bit overhead of the non - linear clipping index, and further facilitate improving the compression efficiency of the video.

[0388] As described above in conjunction with Figures 4 to 19 , the decoding method embodiments of the present application have been described in detail. Below in conjunction with Figures 20 to 35 , the embodiments of the video encoding method of the present application will be introduced.

[0389] Embodiment Twenty

[0390] Figure 20 FIG. is a schematic flowchart of an encoding method P2000 provided in an embodiment of the present application. Among them, the execution subject of the encoding method P2000 is an encoder. Referring to Figure 20 , the method P2000 includes:

[0391] S2010, determine the value of the target flag, where the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non - linear clipping index.

[0392] Exemplarily, the encoder may determine whether the tap coefficients of the filter use a shared non - linear clipping index according to the rate - distortion cost. If there are tap coefficients of at least one filter using the shared non - linear clipping index, determine that the value of the target flag is the first value (such as "1"); if there is no filter with tap coefficients using the shared non - linear clipping index, determine that the value of the target flag is not the first value, for example, take the second value (such as "0").

[0393] In S2020, write the above-mentioned target flag and its value into the bitstream.

[0394] In S2030, if the value of the above-mentioned target flag is the first value, write the target non-linear clipping index into the bitstream, where the target non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned at least one filter.

[0395] When the value of the target flag is the first value, the encoder writes the target non-linear clipping index into the bitstream. Thus, the processor can parse the bitstream to obtain the above-mentioned target non-linear clipping index, and this target non-linear clipping index is used as the non-linear clipping index shared by the tap coefficients of the above-mentioned at least one filter.

[0396] Exemplarily, there is a preset mapping relationship between different non-linear clipping indexes and different non-linear clipping intervals. For example, 4 clipping indexes [0, 1, 2, 3] similar to VTM or ECM can be used, and the absolute values of the clipping intervals corresponding to this index relationship are [1024, 128, 32, 8] respectively. To improve the refinement degree, the number of clipping indexes can also be increased according to actual needs. For example, 8 clipping indexes [0, 1, 2, 3, 4, 5, 6, 7] are used, and the absolute values of the clipping intervals corresponding to this index relationship can be [1024, 256, 128, 64, 32, 16, 8, 4].

[0397] Exemplarily, the encoder writes the above-mentioned target clipping index and its corresponding target clipping interval into the bitstream. Thus, after the processor parses the bitstream to determine the above-mentioned target non-linear clipping index, it obtains the target non-linear clipping interval that has a mapping relationship with the target non-linear clipping index, so as to perform a non-linear clipping operation on the input of the above-mentioned at least one filter through the target non-linear clipping interval. Thus, the difference between the ALF input and the current pixel is restricted by the clipping method. Furthermore, it can enable the ALF to simultaneously consider the spatial similarity and sample similarity between adjacent pixels and the current pixel to be processed. It can be seen that the embodiment of the present application provides an enhanced ALF non-linear clipping method, which can improve the performance of ALF non-linear clipping.

[0398] Exemplarily, the above-mentioned non-linear clipping index and the corresponding clipping interval can also be transmitted in HLS (SPS (Sequence Parameter Set), PPS (Picture Parameter Set), VPS (Video Parameter Set), APS, Picture Header or Slice Header, etc.).

[0399] Exemplarily, whether to use the target non - linear index for sharing provided by the embodiments of the present application can also be transmitted in HLS (SPS, PPS, VPS, APS, PictureHeader, SliceHeader, etc.).

[0400] In the solution provided by the method P2000 of the present application, the encoder determines the value of the target flag and writes it into the bitstream. Among them, if the value of the target flag is the first value, it indicates that there is at least one filter whose tap coefficients use a shared non - linear clipping index; if the value of the target flag is not the first value, it indicates that there is no filter whose tap coefficients use a shared non - linear clipping index. Further, when the value of the target flag is the first value, the encoder writes the target non - linear clipping index into the bitstream, where the target non - linear clipping index is the non - linear clipping index shared by the tap coefficients of the above - mentioned at least one filter. Thus, in the embodiments of the present application, the non - linear clipping indexes corresponding to the multiple tap coefficients of the above - mentioned at least one filter can be represented by a target non - linear clipping index, which can effectively reduce the bit overhead of the non - linear clipping index and is beneficial to improving the compression efficiency of the video. At the same time, the embodiments of the present application provide an enhanced ALF non - linear clipping method, which can improve the performance of ALF non - linear clipping.

[0401] Embodiment XXI

[0402] Based on Embodiment XX, Embodiment XXI of the present application also provides an encoding method. The implementation methods described in Embodiment XX can all be applied to Embodiment XXI and can achieve the same technical effects.

[0403] In the embodiments of the present application, the above - mentioned target flag includes a first flag, and the first flag is used to indicate whether the tap coefficients of all filters in multiple filter groups that support shared use of the non - linear clipping index use the shared non - linear clipping index. Exemplarily, at the encoding end, whether to use the shared non - linear clipping index for the tap coefficients of all filters in multiple filter groups that can be supported can be determined by rate - distortion cost RDO. When the encoder determines that the above - mentioned multiple filter groups support the use of the shared non - linear clipping index for the tap coefficients of all filters, it determines the value of the first flag and writes the first flag and its value into the bitstream. Thus, the processor can obtain the value of the first flag by parsing the bitstream.

[0404] Exemplarily, the above first flag may be represented as "alf_alt_share_nonlinear_flag". If the value of alf_alt_share_nonlinear_flag is the second value (such as "0"), it indicates that the shared non-linear clipping index is not used for the tap coefficients of all filters in the above multiple filter banks; if the value of alf_alt_share_nonlinear_flag is the first value (such as "1"), it indicates that the shared non-linear clipping index is used for the tap coefficients of all filters in the above multiple filter banks.

[0405] When the value of the first flag alf_alt_share_nonlinear_flag is the first value (such as "1"), the processor can determine the first non-linear clipping index by parsing the bitstream, which is exemplarily represented as "alf_alt_shared_nonlinear_idx". Thus, the above first non-linear clipping index "alf_alt_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of all filters in the above multiple filter banks.

[0406] In this exemplary embodiment, a transmission process of the related syntax elements "alf_alt_share_nonlinear_flag" and "alf_alt_shared_nonlinear_idx" is shown in Table 4.

[0407] In the solution provided in the twenty-first embodiment, for the above multiple filter banks, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the inputs of all filters in the multiple filter banks. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0408] Embodiment Twenty-two

[0409] Based on Embodiment Twenty, Embodiment Twenty-two of the present application also provides an encoding method P2100. The implementation methods described in Embodiment Twenty can all be applied to Embodiment Twenty-two and achieve the same technical effects. Figure 21 It is a schematic flowchart of an encoding method P2100 provided by an embodiment of the present application.

[0410] In S2110, determine the value of the second flag, and write the second flag and its value into the bitstream. The second flag is used to indicate whether there is at least one first target filter bank in the multiple filter banks that support sharing the non-linear clipping index, where the first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index.

[0411] In this embodiment, the above-mentioned target flag includes a second flag, and the second flag is used to indicate whether there is at least one first target filter bank among multiple filter banks that support shared use of a non-linear clipping index, where the first target filter bank includes tap coefficients of at least one filter that use a shared non-linear clipping index. Exemplarily, at the encoding end, whether there is the first target filter bank among the multiple filter banks can be determined by rate-distortion cost RDO. When the encoder determines that there is the first target filter bank among the multiple filter banks that support shared use of a non-linear clipping index, determine the value of the second flag and write the second flag and its value into the bitstream. Thus, the processor can obtain the value of the second flag by parsing the bitstream.

[0412] Exemplarily, the second flag can be expressed as "alf_alt_has_filter_share_nonlinear". If the value of alf_alt_has_filter_share_nonlinear is the second value (such as "0"), it means that none of the multiple filter banks that support shared use of a non-linear clipping index share the non-linear clipping index; if the value of alf_alt_has_filter_share_nonlinear is the first value (such as "1"), it means that there is at least one of the above-mentioned first target filter banks among the multiple filter banks.

[0413] In S2120, if the value of the second flag is the first value, determine the value of the third flag corresponding to each filter bank, and write the third flag and its value into the bitstream, where the third flag is used to indicate whether the current filter bank is the first target filter bank.

[0414] As described above, if the value of the second flag alf_alt_has_filter_share_nonlinear is the first value (such as "1"), it means that there is at least one of the above-mentioned first target filter banks among the multiple (such as N) filter banks. Further, in order to further locate which filter bank belongs to the first target filter bank, the processor needs to determine the third flag corresponding to the i-th (where i is an integer that takes values from 1 to N in sequence) filter bank among the N filter banks. The third flag of the i-th filter bank is used to indicate whether the i-th filter bank is the first target filter bank, that is, the tap coefficients of at least one filter in the i-th filter bank use a shared non-linear clipping index.

[0415] Exemplarily, the above-mentioned third flag can be expressed as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is the second value (such as "0"), it indicates that the current filter bank does not belong to the above-mentioned first target filter bank, that is, the current filter bank does not contain a filter with a shared non-linear limiting index for tap coefficients; if the value of alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it indicates that the current filter bank belongs to the above-mentioned first target filter bank, that is, the current filter bank contains at least one filter with a shared non-linear limiting index for tap coefficients.

[0416] In S2130, if the above-mentioned third flag takes the first value, determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and write the above-mentioned fourth flag and its value into the code stream. The above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear limiting index.

[0417] As described above, if the third flag alf_filterset_has_filter_share_nonlinear takes the first value (such as "1"), it means that the current filter bank belongs to the above-mentioned first target filter bank, that is, the current filter bank contains at least one filter with a shared non-linear limiting index for tap coefficients. Further, in order to further locate which filter in the first target filter bank has a shared non-linear limiting index for tap coefficients, it is necessary to determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank. Suppose the current first target filter bank contains M filters, and the fourth flag of the j-th filter (where j is an integer that sequentially takes values from 1 to M) is used to indicate whether the tap coefficients of the j-th filter share a non-linear limiting index.

[0418] Exemplarily, the above-mentioned fourth flag can be expressed as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it indicates that the tap coefficients of the current filter do not use a shared non-linear limiting index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it indicates that the tap coefficients of the current filter use a shared non-linear limiting index.

[0419] In S2140, if the value of the fourth flag is the first value, a second nonlinear clipping index is written into the bitstream, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

[0420] As described above, if the fourth flag alf_filter_share_nonlinear takes the first value (such as "1"), it means that the tap coefficients of the current filter use a shared nonlinear clipping index, that is, the filter whose tap coefficients use a shared nonlinear clipping index has been located. Further, the processor can determine the second nonlinear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filter_shared_nonlinear_idx". Thus, the second nonlinear clipping index "alf_filter_shared_nonlinear_idx" can represent the nonlinear clipping index shared by the tap coefficients of the located filter.

[0421] In this exemplary embodiment, a transmission process of relevant syntax elements is shown in Table 5.

[0422] In the solution provided in Example 22, for the multiple tap coefficients of the filter located above, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input, thereby reducing the bit overhead of the nonlinear clipping index and further improving the compression efficiency of the video.

[0423] Embodiment 23

[0424] Based on the embodiment 20, the embodiment 23 of the present application also provides a coding method P2200. The implementation methods recorded in the embodiment 20 can be applied to the embodiment 23 and can achieve the same technical effect. Figure 22 A flowchart of an encoding method P2200 provided in an embodiment of the present application.

[0425] In S2210, the value of the third flag is determined, and the third flag and its value are written into the bitstream, wherein the target flag is used to indicate whether the current filter group is the first target filter group, wherein the first target filter group contains at least one filter whose tap coefficients use a shared nonlinear limiting index.

[0426] In this embodiment, the above-mentioned target flag includes a third flag, and the third flag is used to indicate whether the current filter bank is a first target filter bank, where at least one filter tap coefficient in the first target filter bank uses a shared non-linear clipping index. Exemplarily, at the encoding end, whether the current filter bank belongs to the first target filter bank can be determined by rate-distortion cost RDO. When the encoder determines that the current filter bank has the first target filter bank, the value of the third flag is determined and the third flag and its value are written into the code stream. Thus, the processor can obtain the value of the third flag by parsing the code stream.

[0427] Exemplarily, the third flag can be expressed as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is a second value (such as "0"), it indicates that the current filter bank does not belong to the first target filter bank, that is, the current filter bank does not contain a filter with a tap coefficient using a shared non-linear clipping index; if the value of alf_filterset_has_filter_share_nonlinear is a first value (such as "1"), it indicates that the current filter bank belongs to the first target filter bank, that is, the current filter bank contains at least one filter tap coefficient using a shared non-linear clipping index.

[0428] In S2220, if the value of the third flag is the first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the code stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared non-linear clipping index.

[0429] As described above, if the value of the third flag alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it means that the current filter bank belongs to the first target filter bank, that is, the current filter bank contains at least one filter tap coefficient using a shared non-linear clipping index. Further, in order to further locate which filter in the first target filter bank has a tap coefficient sharing a non-linear clipping index, it is necessary to determine the value of the fourth flag corresponding to each filter in the first target filter bank. Suppose the current first target filter bank contains M filters, and the fourth flag of the jth (j is an integer sequentially taking values from 1 to M) filter is used to indicate whether the tap coefficient of the jth filter shares a non-linear clipping index.

[0430] Exemplarily, the above-mentioned fourth flag can be represented as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it indicates that the tap coefficients of the current filter do not use the shared non-linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it indicates that the tap coefficients of the current filter use the shared non-linear clipping index.

[0431] In S2230, if the above-mentioned fourth flag takes the first value, the second non-linear clipping index is written into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0432] As described above, if the fourth flag alf_filter_share_nonlinear takes the first value (such as "1"), it indicates that the tap coefficients of the current filter use the shared non-linear clipping index, that is, the filter whose tap coefficients use the shared non-linear clipping index is located. Further, the processor can determine the second non-linear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filter_shared_nonlinear_idx". Thus, the above-mentioned second non-linear clipping index "alf_filter_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of the located above-mentioned filter.

[0433] In this exemplary embodiment, a transmission process of related syntax elements is shown in Table 6.

[0434] In the solution provided in Embodiment XXIII, for the multiple tap coefficients of the above-mentioned located filter, only one shared non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be reduced, which is beneficial to improving the compression efficiency of the video.

[0435] Embodiment XXIV

[0436] Based on Embodiment XX, Embodiment XXIV of the present application also provides an encoding method. The implementation methods described in Embodiment XX can all be applied to Embodiment XXIV and can achieve the same technical effects.

[0437] The above-mentioned target flag includes a fourth flag, and the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index. Exemplarily, at the encoding end, whether to use a shared non-linear clipping index for the tap coefficients of the current filter can be determined through rate-distortion cost RDO. When the encoder determines that the tap coefficients of the current filter use a shared non-linear clipping index, the value of the fourth flag is determined and the fourth flag and its value are written into the bitstream. Thus, the processor can obtain the value of the fourth flag by parsing the bitstream.

[0438] Exemplarily, the above-mentioned fourth flag can be expressed as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it indicates that the tap coefficients of the current filter do not use a shared non-linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it indicates that the tap coefficients of the current filter use a shared non-linear clipping index.

[0439] When the value of the fourth flag alf_filter_share_nonlinear is the first value (such as "1"), the processor can determine the second non-linear clipping index by parsing the bitstream, which is exemplarily expressed as "alf_filter_shared_nonlinear_idx". Thus, the above-mentioned second non-linear clipping index "alf_filter_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of the current filter.

[0440] In this exemplary embodiment, a transmission process of related syntax elements is shown in Table 7.

[0441] In the solution provided in the twenty-fourth embodiment, for multiple tap coefficients of the filter, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be reduced, which is beneficial to improving the compression efficiency of the video.

[0442] Embodiment Twenty-five

[0443] Based on Embodiment Twenty, Embodiment Twenty-five of the present application also provides an encoding method P2300. The implementation methods described in Embodiment Twenty can all be applied to Embodiment Twenty-five and can achieve the same technical effects. Figure 23 It is a schematic flowchart of an encoding method P2300 provided by an embodiment of the present application.

[0444] In S2310, determine the value of a fifth flag, and write the fifth flag and its value into the bitstream. The fifth flag is used to indicate whether there is at least one second target filter bank, where the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index.

[0445] In this embodiment, the target flag includes a fifth flag. The fifth flag is used to indicate whether there is at least one second target filter bank among multiple filter banks that support shared use of a non-linear clipping index, where the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index. Exemplarily, at the encoding end, whether there is the second target filter bank among the multiple filter banks can be determined by rate-distortion cost RDO. When the encoder determines that there is the second target filter bank among the multiple filter banks that support shared use of a non-linear clipping index, determine the value of the fifth flag and write the fifth flag and its value into the bitstream. Thus, the processor can obtain the value of the fifth flag by parsing the bitstream.

[0446] Exemplarily, the fifth flag can be expressed as "alf_has_filterset_share_nonlinear". If the value of alf_has_filterset_share_nonlinear is a second value (such as "0"), it means that the filters in all supported filter banks do not use a shared non-linear clipping index, and there is no need to transmit additional syntax elements related to the shared non-linear index; if the value of alf_has_filterset_share_nonlinear is a first value (such as "1"), it means that there is at least one of the second target filter banks among the multiple filter banks.

[0447] In S2320, if the value of the fifth flag is the first value, determine the value of the sixth flag corresponding to each filter bank, and write the sixth flag and its value into the bitstream. The sixth flag is used to indicate whether the current filter bank is the second target filter bank.

[0448] As described above, if the value of the fifth flag alf_has_filterset_share_nonlinear is the first value (such as "1"), it means that there is at least one of the second target filter banks among the multiple (such as L) filter banks. Further, to further locate which filter bank belongs to the second target filter bank, it is necessary to determine the sixth flag corresponding to the i-th (where i is an integer sequentially taking values from 1 to L) filter bank among the L filter banks. The sixth flag of the i-th filter bank is used to indicate whether the i-th filter bank is the second target filter bank, that is, the tap coefficients of all filters in the i-th filter bank use a shared non-linear clipping index.

[0449] Exemplarily, the above-mentioned sixth flag may be represented as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it indicates that the current filter bank does not belong to the above-mentioned second target filter bank, that is, the tap coefficients of all filters in the current filter bank do not use a shared non-linear clipping index; if the value of alf_filterset_share_nonlinear_flag is the first value (such as "1"), it indicates that the current filter bank belongs to the above-mentioned second target filter bank, that is, the tap coefficients of all filters in the current filter bank use a shared non-linear clipping index.

[0450] In S2330, if the above-mentioned sixth flag takes the first value, write the third non-linear clipping index into the bitstream, where the above-mentioned third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the above-mentioned second target filter bank.

[0451] As described above, if the sixth flag alf_filterset_share_nonlinear_flag takes the first value (such as "1"), it means that the tap coefficients of all filters in the current filter bank use a shared non-linear clipping index, that is, the filter with a shared non-linear clipping index for tap coefficients is located. Further, the processor can determine the third non-linear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filterset_shared_nonlinear_idx". Thus, the above-mentioned third non-linear clipping index "alf_filterset_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of the located filter.

[0452] In this exemplary embodiment, a transmission process of related syntax elements is shown in Table 8.

[0453] In the solution provided in the twenty-fifth embodiment, for the multiple tap coefficients respectively corresponding to all filters in the above-mentioned current filter bank, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the inputs of all filters in the filter bank. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0454] Embodiment Twenty-Six

[0455] Based on Embodiment Twenty, Embodiment Twenty-Six of the present application also provides an encoding method. The implementation methods described in Embodiment Twenty can all be applied to Embodiment Twenty-Six and achieve the same technical effects.

[0456] The above target flag includes a sixth flag, and the sixth flag is used to indicate whether the current filter bank is a second target filter bank. Among them, the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index. Exemplarily, at the encoding end, whether to use a shared non-linear clipping index for the tap coefficients of all filters in the current filter bank can be determined by rate-distortion cost RDO. When the encoder determines that a shared non-linear clipping index is used for the tap coefficients of all filters in the current filter bank, the value of the sixth flag is determined and the sixth flag and its value are written into the bitstream. Thus, the processor can obtain the value of the sixth flag by parsing the bitstream.

[0457] Exemplarily, the above sixth flag can be represented as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is a second value (such as "0"), it indicates that the current filter bank does not belong to the above second target filter bank, that is, not all tap coefficients of the filters in the current filter bank use a shared non-linear clipping index; if the value of alf_filterset_share_nonlinear_flag is a first value (such as "1"), it indicates that the current filter bank belongs to the above second target filter bank, that is, all tap coefficients of the filters in the current filter bank use a shared non-linear clipping index.

[0458] When the value of the sixth flag alf_filterset_share_nonlinear_flag is the first value (such as "1"), the processor can determine a third non-linear clipping index, exemplarily represented as "alf_filterset_shared_nonlinear_idx", by parsing the bitstream. Thus, the above third non-linear clipping index "alf_filterset_shared_nonlinear_idx" can represent the non-linear clipping index shared by all tap coefficients of the filters in the current filter bank.

[0459] In this exemplary embodiment, a transmission process of related syntax elements is shown in Table 9.

[0460] In the solution provided in Embodiment Twenty-Six, for the multiple tap coefficients respectively corresponding to all the filters in the current filter bank, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the inputs of all the filters in the filter bank. This can significantly reduce the bit overhead of the non-linear clipping index, thereby facilitating the improvement of the video compression efficiency.

[0461] Embodiment Twenty-Seven

[0462] Based on Embodiment Twenty, Embodiment Twenty-Seven of the present application also provides a coding method P2400. The implementation methods described in Embodiment Twenty can all be applied to Embodiment Twenty-Seven and achieve the same technical effects. Figure 24 It is a schematic flowchart of a coding method P2400 provided by an embodiment of the present application.

[0463] In S2410, determine the value of the first flag and write the first flag and its value into the code stream. The first flag is used to indicate whether the tap coefficients of all the filters in multiple filter banks that support sharing a non-linear clipping index use the shared non-linear clipping index.

[0464] The target flag includes the first flag. The first flag is used to indicate whether the tap coefficients of all the filters in multiple filter banks that support sharing a non-linear clipping index use the shared non-linear clipping index. Exemplarily, at the coding end, whether to use the shared non-linear clipping index for the tap coefficients of all the filters in multiple supported filter banks can be determined by rate-distortion cost RDO. When the encoder determines that the multiple filter banks support the use of the shared non-linear clipping index for the tap coefficients of all the filters, determine the value of the first flag and write the first flag and its value into the code stream. Thus, the processor can obtain the value of the first flag by parsing the code stream.

[0465] Exemplarily, the first flag can be expressed as "alf_alt_share_nonlinear_flag". If the value of alf_alt_share_nonlinear_flag is the second value (such as "0"), it means that the shared non-linear clipping index will not be used for the tap coefficients of all the filters in the multiple filter banks; if the value of alf_alt_share_nonlinear_flag is the first value (such as "1"), it means that the shared non-linear clipping index is used for the tap coefficients of all the filters in the multiple filter banks.

[0466] In S2420, if the above first flag takes the second value, determine the value of the second flag and write the second flag and its value into the bitstream. The second flag is used to indicate whether there is at least one first target filter bank, where the first target filter bank includes tap coefficients of at least one filter using a shared non - linear clipping index.

[0467] As described above, if the first flag alf_alt_share_nonlinear_flag takes the second value (such as "0"), it means that the tap coefficients of all filters in the above - mentioned multiple filter banks will not use a shared non - linear clipping index. Then the processor needs to parse the bitstream to determine whether there is a first target filter bank, where the first target filter bank includes tap coefficients of at least one filter using a shared non - linear clipping index.

[0468] Exemplarily, the processor parses the bitstream to determine the value of the second flag. The second flag is used to indicate whether there is at least one first target filter bank, where the first target filter bank includes tap coefficients of at least one filter using a shared non - linear clipping index. Exemplarily, at the encoding end, whether there is the first target filter bank in the above - mentioned multiple filter banks can be determined by rate - distortion cost RDO. In the case where the encoder determines that there is the first target filter bank in the multiple filter banks that support sharing the non - linear clipping index, determine the value of the second flag and write the second flag and its value into the bitstream. Thus, the processor can obtain the value of the second flag by parsing the bitstream.

[0469] Exemplarily, the second flag can be expressed as "alf_alt_has_filter_share_nonlinear". If alf_alt_has_filter_share_nonlinear takes the second value (such as "0"), it means that none of the multiple filter banks that support sharing the non - linear clipping index share the non - linear clipping index; if alf_alt_has_filter_share_nonlinear takes the first value (such as "1"), it means that there is at least one of the above - mentioned first target filter banks in the multiple filter banks.

[0470] In S2430, if the above second flag takes the first value, determine the value of the third flag corresponding to each filter bank and write the third flag and its value into the bitstream. The third flag is used to indicate whether the current filter bank is the above - mentioned first target filter bank.

[0471] The specific implementation of S2430 is the same as that of S2120 and will not be elaborated here.

[0472] In S2440, if the value of the above-mentioned third flag is the first value, determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and write the above-mentioned fourth flag and its value into the bitstream. The above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0473] The specific implementation manner of S2440 is the same as that of S2130, and will not be elaborated here.

[0474] In S2450, if the value of the above-mentioned fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the above-mentioned second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0475] The specific implementation manner of S2450 is the same as that of S2140, and will not be elaborated here.

[0476] In the solution provided in the twenty-seventh embodiment, for the multiple tap coefficients of the above-mentioned located filter, only one shared second non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the input of the filter. Thereby, the bit overhead of the non-linear clipping index can be reduced, which is beneficial to improving the compression efficiency of the video.

[0477] Embodiment Twenty-Eight

[0478] Based on Embodiment Twenty, Embodiment Twenty-Eight of the present application also provides an encoding method P2500. The implementation manners described in Embodiment Twenty can all be applied to Embodiment Twenty-Eight and can achieve the same technical effects. Figure 25 It is a schematic flowchart of an encoding method P2500 provided by an embodiment of the present application.

[0479] In S2510, determine the value of the first flag, and write the above-mentioned first flag and its value into the bitstream. The above-mentioned first flag is used to indicate whether the tap coefficients of the filters in multiple filter banks that support sharing the non-linear clipping index use the shared non-linear clipping index.

[0480] The specific implementation manner of S2510 is the same as that of S2410, and will not be elaborated here.

[0481] In S2520, if the value of the above-mentioned first flag is the second value, determine the value of the third flag corresponding to each filter bank, and write the above-mentioned third flag and its value into the bitstream. The above-mentioned third flag is used to indicate whether the current filter bank is the first target filter bank, where the above-mentioned first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index.

[0482] If the value of the first flag alf_alt_share_nonlinear_flag is the second value (e.g., "0"), it means that the shared non - linear clipping index will not be used for the tap coefficients of all filters in the above - mentioned multiple filter banks. Then the processor needs to parse the code stream to determine whether the current filter bank belongs to the first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use the shared non - linear clipping index.

[0483] Exemplarily, the processor parses the code stream to determine the value of the third flag. The third flag is used to indicate whether the current filter bank is the first target filter bank, where the first target filter bank includes at least one filter whose tap coefficients use the shared non - linear clipping index. Exemplarily, at the encoding end, whether the current filter bank belongs to the first target filter bank can be determined by rate - distortion cost RDO. When the encoder determines that there is a first target filter bank in the current filter bank, it determines the value of the third flag and writes the third flag and its value into the code stream. Thus, the processor can obtain the value of the third flag by parsing the code stream.

[0484] Exemplarily, the third flag can be expressed as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is the second value (e.g., "0"), it means that the current filter bank does not belong to the first target filter bank, that is, the current filter bank does not include a filter whose tap coefficients use the shared non - linear clipping index; if the value of alf_filterset_has_filter_share_nonlinear is the first value (e.g., "1"), it means that the current filter bank belongs to the first target filter bank, that is, the current filter bank includes at least one filter whose tap coefficients use the shared non - linear clipping index.

[0485] In S2530, if the value of the third flag is the first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the code stream. The fourth flag is used to indicate whether the tap coefficients of the current filter use the shared non - linear clipping index.

[0486] The specific implementation of S2530 is the same as that of S2130 and will not be elaborated here.

[0487] In S2540, if the value of the fourth flag is the first value, write the second non - linear clipping index into the code stream, where the second non - linear clipping index is the non - linear clipping index shared by the tap coefficients of the filter.

[0488] The specific implementation manner of S2540 is the same as that of S2140, which will not be elaborated here.

[0489] In the solution provided in the twenty-eighth embodiment, for the multiple tap coefficients of the located filter, only one second non-linear clipping index for shared use needs to be transmitted, and the non-linear clipping operation on the input of the filter can be realized. Therefore, the bit overhead of the non-linear clipping index can be reduced, which is beneficial to improving the compression efficiency of the video.

[0490] Twenty-ninth Embodiment

[0491] Based on the twentieth embodiment, the twenty-ninth embodiment of the present application also provides an encoding method P2600. The implementation manners described in the twentieth embodiment can all be applied to the twenty-ninth embodiment and can achieve the same technical effects. Figure 26 It is a schematic flowchart of an encoding method P2600 provided by an embodiment of the present application.

[0492] In S2610, determine the value of the first flag, and write the first flag and its value into the code stream. The first flag is used to indicate whether the tap coefficients of the filters in the multiple filter banks that support shared use of the non-linear clipping index use the shared non-linear clipping index.

[0493] The specific implementation manner of S2610 is the same as that of S2410, which will not be elaborated here.

[0494] In S2620, if the value of the first flag is the second value, determine the value of the fourth flag corresponding to each filter, and write the fourth flag and its value into the code stream. The fourth flag is used to indicate whether the tap coefficients of the current filter use the shared non-linear clipping index.

[0495] If the value of the first flag alf_alt_share_nonlinear_flag is the second value (such as "0"), it means that the shared non-linear clipping index will not be used for the tap coefficients of all filters in the multiple filter banks. Then the processor needs to parse the code stream to determine whether the tap coefficients of the current filter use the shared non-linear clipping index.

[0496] Exemplarily, the processor parses the bitstream to determine the value of the fourth flag. The above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index. Exemplarily, at the encoding end, whether to use a shared non-linear clipping index for the tap coefficients of the current filter can be determined by rate-distortion cost RDO. When the encoder determines that the tap coefficients of the current filter use a shared non-linear clipping index, the value of the fourth flag is determined and the fourth flag and its value are written into the bitstream. Thus, the processor can obtain the value of the fourth flag by parsing the bitstream.

[0497] Exemplarily, the above-mentioned fourth flag can be represented as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it means that the tap coefficients of the current filter do not use a shared non-linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it means that the tap coefficients of the current filter use a shared non-linear clipping index.

[0498] In S2630, if the value of the above-mentioned fourth flag is the first value, the second non-linear clipping index is written into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0499] When the value of the fourth flag alf_filter_share_nonlinear is the first value (such as "1"), the processor can determine the second non-linear clipping index by parsing the bitstream, which is exemplarily represented as "alf_filter_shared_nonlinear_idx". Thus, the above-mentioned second non-linear clipping index "alf_filter_shared_nonlinear_idx" can represent the non-linear clipping index shared by the tap coefficients of the current filter.

[0500] In the solution provided in the twenty-ninth embodiment, for the multiple tap coefficients of the above-mentioned located filter, only one shared second non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be reduced, which is beneficial to improving the compression efficiency of the video.

[0501] Embodiment Thirty

[0502] Based on Embodiment Twenty, Embodiment Thirty of the present application also provides an encoding method P2700. The implementation methods described in Embodiment Twenty can all be applied to Embodiment Thirty and can achieve the same technical effects. Figure 27Schematic flowchart of an encoding method P2700 provided by an embodiment of the present application.

[0503] In S2710, determine the value of a first flag, and write the first flag and its value into the bitstream. The first flag is used to indicate whether the tap coefficients of filters in multiple filter banks that support shared use of a non - linear clipping index use a shared non - linear clipping index.

[0504] The specific implementation of S2710 is the same as that of S2410, and will not be elaborated here.

[0505] In S2720, if the value of the first flag is a second value, determine the value of a fifth flag, and write the fifth flag and its value into the bitstream. The fifth flag is used to indicate whether there is at least one second target filter bank, where the tap coefficients of filters in the second target filter bank use a shared non - linear clipping index.

[0506] If the first flag alf_alt_share_nonlinear_flag takes the second value (such as "0"), it means that the shared non - linear clipping index is not used for the tap coefficients of all filters in the multiple filter banks. Then the processor needs to parse the bitstream to determine whether there is a second target filter bank in the multiple filter banks, where the tap coefficients of filters in the second target filter bank use a shared non - linear clipping index.

[0507] Exemplarily, the processor parses the bitstream to determine the value of the fifth flag. Exemplarily, at the encoding end, whether there is the second target filter bank in the multiple filter banks can be determined by rate - distortion cost RDO. When it is determined that there is a second target filter bank in the multiple filter banks that support shared use of a non - linear clipping index, determine the value of the fifth flag and write the fifth flag and its value into the bitstream. Thus, the processor can obtain the value of the fifth flag by parsing the bitstream.

[0508] Exemplarily, the fifth flag can be represented as "alf_has_filterset_share_nonlinear". If alf_has_filterset_share_nonlinear takes the second value (such as "0"), it means that the filters in all supported filter banks do not use a shared non - linear clipping index, and there is no need to transmit additional syntax elements related to the shared non - linear index; if alf_has_filterset_share_nonlinear takes the first value (such as "1"), it means that there is at least one second target filter bank in the multiple filter banks.

[0509] In S2730, if the value of the above-mentioned fifth flag is the first value, determine the value of the sixth flag corresponding to each filter bank, and write the above-mentioned sixth flag and its value into the bitstream. The above-mentioned sixth flag is used to indicate whether the current filter bank is the above-mentioned second target filter bank.

[0510] The specific implementation manner of S2730 is the same as that of S2320, and will not be elaborated here.

[0511] In S2740, if the value of the above-mentioned sixth flag is the first value, write the third non-linear clipping index into the bitstream, where the above-mentioned third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the above-mentioned second target filter bank.

[0512] The specific implementation manner of S2740 is the same as that of S2330, and will not be elaborated here.

[0513] In the solution provided in Embodiment Thirty, for the multiple tap coefficients respectively corresponding to all the filters in the above-mentioned current filter bank, only one shared non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the inputs of all the filters in this filter bank. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is conducive to improving the compression efficiency of the video.

[0514] Embodiment Thirty-One

[0515] Based on Embodiment Twenty, Embodiment Thirty-One of the present application also provides an encoding method P2800. The implementation manners described in Embodiment Twenty can all be applied to Embodiment Thirty-One and can achieve the same technical effects. Figure 28 It is a schematic flowchart of an encoding method P2800 provided by an embodiment of the present application. Refer to Figure 28 , Method P2800 is implemented based on Method P2700. Method P2800 includes S2710 - S2740, and S2810 - S2840.

[0516] Among them, the specific implementation manners of S2710 - S2740 have been introduced in detail in the above embodiments and will not be elaborated here.

[0517] In S2810, if the value of the above-mentioned fifth flag is the second value, it is determined that there is no above-mentioned second target filter bank in the above-mentioned multiple filter banks, and the value of the second flag is determined, and the above-mentioned second flag and its value are written into the bitstream. The above-mentioned second flag is used to indicate whether there is at least one first target filter bank, where the above-mentioned first target filter bank includes at least one filter whose tap coefficients use a shared non-linear clipping index.

[0518] Exemplarily, the above-mentioned fifth flag can be represented as "alf_has_filterset_share_nonlinear". If the value of alf_has_filterset_share_nonlinear is the second value (such as "0"), it means that the filters in all supported filter banks do not use the shared non-linear clipping index, that is, the above-mentioned second target filter bank does not exist. Then the processor parses whether the first target filter bank exists in all supported filter banks of the bitstream.

[0519] Exemplarily, the processor parses the bitstream to determine the value of the second flag. The second flag is used to indicate whether there is at least one first target filter bank, where the above-mentioned first target filter bank includes tap coefficients of at least one filter using a shared non-linear clipping index. Exemplarily, at the encoding end, whether the first target filter bank exists in the above-mentioned multiple filter banks can be determined by rate-distortion cost RDO. When the encoder determines that the first target filter bank exists in the multiple filter banks that support shared use of the non-linear clipping index, the value of the second flag is determined and the second flag and its value are written into the bitstream. Thus, the processor can obtain the value of the second flag by parsing the bitstream.

[0520] Exemplarily, the above-mentioned second flag can be represented as "alf_alt_has_filter_share_nonlinear". If the value of alf_alt_has_filter_share_nonlinear is the second value (such as "0"), it means that the multiple filter banks that support shared use of the non-linear clipping index do not share the use of the non-linear clipping index; if the value of alf_alt_has_filter_share_nonlinear is the first value (such as "1"), it means that there is at least one of the above-mentioned first target filter banks in the above-mentioned multiple filter banks.

[0521] In S2820, if the value of the above-mentioned second flag is the first value, determine the value of the third flag corresponding to each filter bank, and write the above-mentioned third flag and its value into the bitstream. The third flag is used to indicate whether the current filter bank is the above-mentioned first target filter bank.

[0522] The specific implementation manner of S2820 is the same as that of S2120 and will not be elaborated here.

[0523] In S2830, if the value of the above-mentioned third flag is the first value, determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and write the above-mentioned fourth flag and its value into the bitstream. The fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0524] The specific implementation of S2830 is the same as that of S2130, and will not be elaborated here.

[0525] In S2840, if the above fourth flag takes the first value, the second non-linear clipping index is written into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above filter.

[0526] The specific implementation of S2840 is the same as that of S2140, and will not be elaborated here.

[0527] In the solution provided in the thirty-first embodiment, for the multiple tap coefficients of the above current filter, only one shared non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0528] The thirty-second embodiment

[0529] Based on the twentieth embodiment, the thirty-second embodiment of the present application also provides an encoding method P2900. The implementation methods described in the twentieth embodiment can all be applied to the thirty-second embodiment and can achieve the same technical effects. Figure 29 It is a schematic flowchart of an encoding method P2900 provided by an embodiment of the present application. Refer to Figure 29 , the method P2900 is implemented based on the method P2700. The method P2900 includes S2710 - S2740, and S2910 - S2930.

[0530] Among them, the specific implementation of S2710 - S2740 has been introduced in detail in the above embodiments, and will not be elaborated here.

[0531] In S2910, if the above fifth flag takes the second value, it is determined that the second target filter bank does not exist in the above multiple filter banks, and the value of the third flag corresponding to each filter bank is determined, and the third flag and its value are written into the bitstream. The third flag is used to indicate whether the current filter bank is the first target filter bank, where the first target filter bank includes the tap coefficients of at least one filter using a shared non-linear clipping index.

[0532] Exemplarily, the above-mentioned fifth flag may be expressed as "alf_has_filterset_share_nonlinear". If the value of alf_has_filterset_share_nonlinear is the second value (such as "0"), it means that the filters in all supported filter banks do not use the shared non-linear clipping index, that is, the above-mentioned second target filter bank does not exist.

[0533] In order to locate which filter bank among all supported filter banks belongs to the first target filter bank, the processor needs to determine the third flag corresponding to the i-th (where i is an integer sequentially taking values from 1 to Y) filter bank among all the above-mentioned supported filter banks (assuming there are Y filter banks). The third flag of the i-th filter bank is used to indicate whether the i-th filter bank is the above-mentioned first target filter bank, that is, at least one filter in the i-th filter bank uses the shared non-linear clipping index for the tap coefficients.

[0534] Exemplarily, the above-mentioned third flag may be expressed as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is the second value (such as "0"), it means that the current filter bank does not belong to the above-mentioned first target filter bank, that is, the current filter bank does not contain a filter whose tap coefficients use the shared non-linear clipping index; if the value of alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it means that the current filter bank belongs to the above-mentioned first target filter bank, that is, the current filter bank contains at least one filter whose tap coefficients use the shared non-linear clipping index.

[0535] In S2920, if the above-mentioned third flag takes the first value, determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and write the above-mentioned fourth flag and its value into the bitstream. The fourth flag is used to indicate whether the tap coefficients of the current filter use the shared non-linear clipping index.

[0536] The specific implementation manner of S2920 is the same as that of S2130, and will not be elaborated here.

[0537] In S2930, if the above-mentioned fourth flag takes the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0538] The specific implementation manner of S2930 is the same as that of S2140, and will not be elaborated here.

[0539] In the solution provided in the thirty-second embodiment, for the multiple tap coefficients of the above current filters respectively, only one non-linear clipping index for shared use needs to be transmitted, and the non-linear clipping operation on the input of the filter can be realized. Thereby, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0540] The thirty-third embodiment

[0541] Based on the twentieth embodiment, the thirty-third embodiment of the present application also provides an encoding method P3000. The implementation manners described in the twentieth embodiment can all be applied to the thirty-third embodiment and can achieve the same technical effects. Figure 30 It is a schematic flowchart of an encoding method P3000 provided by an embodiment of the present application. Refer to Figure 30 , the method P3000 is implemented based on the method P2700. The method P3000 includes S2710 - S2740, and S3010 - S3020.

[0542] Among them, the specific implementation manners of S2710 - S2740 have been introduced in detail in the above embodiments and will not be elaborated here.

[0543] In S3010, if the above fifth flag takes the second value, it is determined that the second target filter group does not exist in the above multiple filter groups, and the value of the fourth flag corresponding to each filter is determined, and the above fourth flag and its value are written into the code stream. The fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0544] Exemplarily, the above fifth flag can be expressed as "alf_has_filterset_share_nonlinear". If alf_has_filterset_share_nonlinear takes the second value (such as "0"), it means that the filters in all supported filter groups do not use a shared non-linear clipping index, that is, the second target filter group does not exist.

[0545] In order to locate which filter's tap coefficients share the use of the non-linear clipping index among all supported filter groups, it is necessary to determine the value of the fourth flag corresponding to each filter in all supported filter groups. Suppose there are X filters in all supported filter groups, and the fourth flag of the jth (j is an integer sequentially taking values from 1 to X) filter is used to indicate whether the tap coefficients of the jth filter share the use of the non-linear clipping index.

[0546] Exemplarily, the above fourth flag may be expressed as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it indicates that the tap coefficients of the current filter do not use the shared non-linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it indicates that the tap coefficients of the current filter use the shared non-linear clipping index.

[0547] In S3020, if the above fourth flag takes the first value, the second non-linear clipping index is written into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above filter.

[0548] The specific implementation of S3020 is the same as that of S2140 and will not be elaborated here.

[0549] In the solution provided in the thirty-third embodiment, for the multiple tap coefficients of the above current filter, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thereby, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0550] Embodiment Thirty-Four

[0551] Based on Embodiment Twenty, Embodiment Thirty-Four of the present application also provides an encoding method P3100. The implementation methods described in Embodiment Twenty can all be applied to Embodiment Thirty-Four and can achieve the same technical effects. Figure 31 It is a schematic flowchart of an encoding method P3100 provided by an embodiment of the present application. Refer to Figure 31 , Method P3100 is implemented based on Method P2700. Method P3100 includes S2710 - S2740, and S3110 - S3130.

[0552] Among them, the specific implementation of S2710 - S2740 has been introduced in detail in the above embodiments and will not be elaborated here.

[0553] In S3110, if the above sixth flag takes the second value, it is determined that the current filter bank is not the above second target filter bank, and the value of the third flag corresponding to each filter bank is determined, and the above third flag and its value are written into the bitstream. The above third flag is used to indicate whether the current filter bank is the first target filter bank, where the above first target filter bank includes at least one filter whose tap coefficients use the shared non-linear clipping index.

[0554] Exemplarily, the above-mentioned sixth flag can be represented as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it indicates that the current filter bank does not belong to the above-mentioned second target filter bank, that is, not all tap coefficients of the filters in the current filter bank use a shared non-linear clipping index.

[0555] To determine whether the current filter bank belongs to the first target filter bank, the processor decodes to determine the third flag corresponding to the current filter bank. The third flag of the current filter bank is used to indicate whether the current filter bank is the above-mentioned first target filter bank, that is, at least one of the filters in the current filter bank has tap coefficients using a shared non-linear clipping index.

[0556] Exemplarily, the above-mentioned third flag can be represented as "alf_filterset_has_filter_share_nonlinear". If the value of alf_filterset_has_filter_share_nonlinear is the second value (such as "0"), it indicates that the current filter bank does not belong to the above-mentioned first target filter bank, that is, the current filter bank does not contain a filter with tap coefficients using a shared non-linear clipping index; if the value of alf_filterset_has_filter_share_nonlinear is the first value (such as "1"), it indicates that the current filter bank belongs to the above-mentioned first target filter bank, that is, the current filter bank contains at least one filter with tap coefficients using a shared non-linear clipping index.

[0557] In S3120, if the above-mentioned third flag takes the first value, determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and write the above-mentioned fourth flag and its value into the code stream. The above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0558] The specific implementation of S3120 is the same as that of S2130 and will not be elaborated here.

[0559] In S3130, if the above-mentioned fourth flag takes the first value, write the second non-linear clipping index into the code stream, where the above-mentioned second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0560] The specific implementation of S3130 is the same as that of S2140 and will not be elaborated here.

[0561] In the solution provided in Embodiment 34, for the multiple tap coefficients of the current filter, only one non - linear clipping index for shared use needs to be transmitted, and the non - linear clipping operation on the input of the filter can be realized. Thus, the bit overhead of the non - linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0562] Embodiment 35

[0563] Based on Embodiment 20, Embodiment 35 of the present application also provides an encoding method P3200. The implementation manners described in Embodiment 20 can all be applied to Embodiment 35 and can achieve the same technical effects. Figure 32 It is a schematic flowchart of an encoding method P3200 provided by an embodiment of the present application. Refer to Figure 32 , Method P3200 is implemented based on Method P2700. Method P3200 includes S2710 - S2740, and S3210 - S3220.

[0564] Among them, the specific implementation manners of S2710 - S2740 have been introduced in detail in the above embodiments and will not be repeated here.

[0565] In S3210, if the value of the above - mentioned sixth flag is the second value, it is determined that the current filter bank is not the above - mentioned second target filter bank, and the value of the fourth flag corresponding to each filter is determined, and the above - mentioned fourth flag and its value are written into the code stream. The fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non - linear clipping index.

[0566] Exemplarily, the above - mentioned sixth flag can be expressed as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it means that the current filter bank does not belong to the above - mentioned second target filter bank, that is, the tap coefficients of all filters in the current filter bank do not use a shared non - linear clipping index.

[0567] In order to locate which filter in the current filter bank shares the use of the non - linear clipping index for the tap coefficients, it is necessary to determine the value of the fourth flag corresponding to each filter in the above - mentioned current filter bank. Suppose the current filter bank contains Z filters, and the fourth flag of the j - th filter (where j is an integer that takes values from 1 to Z in sequence) is used to indicate whether the tap coefficients of the j - th filter share the use of the non - linear clipping index.

[0568] Exemplarily, the above fourth flag may be expressed as "alf_filter_share_nonlinear". If the value of alf_filter_share_nonlinear is the second value (such as "0"), it indicates that the tap coefficients of the current filter do not use the shared non-linear clipping index; if the value of alf_filter_share_nonlinear is the first value (such as "1"), it indicates that the tap coefficients of the current filter use the shared non-linear clipping index.

[0569] In S3220, if the above fourth flag takes the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above filter.

[0570] The specific implementation of S3220 is the same as that of S2140 and will not be elaborated here.

[0571] In the solution provided in the thirty-fifth embodiment, for the multiple tap coefficients of the above current filter, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is conducive to improving the compression efficiency of the video.

[0572] Embodiment Thirty-Six

[0573] Based on Embodiment Twenty, Embodiment Thirty-Six of the present application also provides an encoding method P3300. The implementation methods described in Embodiment Twenty can all be applied to Embodiment Thirty-Six and can achieve the same technical effects. Figure 33 It is a schematic flowchart of an encoding method P3300 provided by an embodiment of the present application.

[0574] In S3310, determine the value of the first flag and write the above first flag and its value into the bitstream. The first flag is used to indicate whether the tap coefficients of the filters in multiple filter groups that support sharing the non-linear clipping index use the shared non-linear clipping index.

[0575] The specific implementation of S3310 is the same as that of S2410 and will not be elaborated here.

[0576] In S3320, if the above first flag takes the second value, determine the value of the sixth flag corresponding to each filter group and write the above sixth flag and its value into the bitstream. The sixth flag is used to indicate whether the current filter group is a second target filter group, where the tap coefficients of the filters in the second target filter group use the shared non-linear clipping index.

[0577] If the first flag alf_alt_share_nonlinear_flag takes the second value (e.g., "0"), it means that the shared non - linear clipping index is not used for the tap coefficients of all filters in multiple supportable filter banks. Then the processor needs to parse the bitstream to determine whether there is a second target filter bank, where the tap coefficients of the filters in the second target filter bank use the shared non - linear clipping index.

[0578] To further locate which filter bank belongs to the second target filter bank, the processor parses the bitstream to determine the value of the sixth flag corresponding to each filter bank. Exemplarily, the sixth flag can be expressed as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (e.g., "0"), it means that the current filter bank does not belong to the second target filter bank, that is, the tap coefficients of all filters in the current filter bank do not use the shared non - linear clipping index; if alf_filterset_share_nonlinear_flag takes the first value (e.g., "1"), it means that the current filter bank belongs to the second target filter bank, that is, the tap coefficients of all filters in the current filter bank use the shared non - linear clipping index.

[0579] In S3330, if the sixth flag takes the first value, write the third non - linear clipping index into the bitstream, where the third non - linear clipping index is the non - linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

[0580] The specific implementation of S3330 is the same as that of S2330 and will not be elaborated here.

[0581] In the solution provided in Embodiment Thirty - Six, for the multiple tap coefficients respectively corresponding to all filters in the current filter bank, only one shared non - linear clipping index needs to be transmitted to achieve the non - linear clipping operation on the inputs of all filters in the filter bank. Thus, it can significantly reduce the bit overhead of the non - linear clipping index, which is beneficial to improving the compression efficiency of the video.

[0582] Embodiment Thirty - Seven

[0583] Based on Embodiment Twenty, Embodiment Thirty - Seven of the present application also provides an encoding method P3400. The implementation methods described in Embodiment Twenty can all be applied to Embodiment Thirty - Seven and can achieve the same technical effects. Figure 34 It is a schematic flowchart of an encoding method P3400 provided by an embodiment of the present application. Refer to Figure 34, Method P3400 is implemented based on Method P3300. Method P3400 includes S3310 - S3330, and S3410 - S3430.

[0584] Among them, the specific implementation manners of S3310 - S3330 have been introduced in detail in the above embodiments and will not be elaborated here.

[0585] In S3410, if the above - mentioned sixth flag takes the second value, it is determined that the current filter bank is not the above - mentioned second target filter bank, and the values of the third flags corresponding to each filter bank are determined, and the above - mentioned third flags and their values are written into the bitstream. The above - mentioned third flag is used to indicate whether the current filter bank is the first target filter bank, where the above - mentioned first target filter bank includes at least one filter whose tap coefficients use a shared non - linear clipping index.

[0586] Exemplarily, the above - mentioned sixth flag can be expressed as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it means that the current filter bank does not belong to the above - mentioned second target filter bank, that is, not all the tap coefficients of the current filter bank use the shared non - linear clipping index.

[0587] To determine whether the current filter bank belongs to the first target filter bank, the processor decodes to determine the third flag corresponding to the current filter bank. The third flag of the current filter bank is used to indicate whether the current filter bank is the above - mentioned first target filter bank, that is, at least one filter in the current filter bank has tap coefficients using a shared non - linear clipping index.

[0588] Exemplarily, the above - mentioned third flag can be expressed as "alf_filterset_has_filter_share_nonlinear". If alf_filterset_has_filter_share_nonlinear takes the second value (such as "0"), it means that the current filter bank does not belong to the above - mentioned first target filter bank, that is, the current filter bank does not include a filter with tap coefficients using a shared non - linear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as "1"), it means that the current filter bank belongs to the above - mentioned first target filter bank, that is, the current filter bank includes at least one filter with tap coefficients using a shared non - linear clipping index.

[0589] In S3420, if the value of the above-mentioned third flag is the first value, determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and write the above-mentioned fourth flag and its value into the bitstream. The above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0590] The specific implementation manner of S3420 is the same as that of S2130, and will not be elaborated here.

[0591] In S3430, if the value of the above-mentioned fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the above-mentioned second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0592] The specific implementation manner of S3430 is the same as that of S2140, and will not be elaborated here.

[0593] In the solution provided in the thirty-seventh embodiment, for the multiple tap coefficients of the above-mentioned current filter, only one shared non-linear clipping index needs to be transmitted to implement the non-linear clipping operation on the input of the filter. Thus, the bit overhead of the non-linear clipping index can be significantly reduced, which is beneficial to improving the compression efficiency of the video.

[0594] Embodiment Thirty-eight

[0595] Based on Embodiment Twenty, Embodiment Thirty-eight of the present application also provides an encoding method P3500. The implementation manners described in Embodiment Twenty can all be applied to Embodiment Thirty-eight and achieve the same technical effects. Figure 35 It is a schematic flowchart of an encoding method P3500 provided by an embodiment of the present application. Refer to Figure 35 , Method P3500 is implemented based on Method P3300. Method P3500 includes S3310 - S3330, and S3510 - S3520.

[0596] Among them, the specific implementation manners of S3310 - S3330 are introduced in detail in the above embodiments and will not be elaborated here.

[0597] In S3510, if the value of the above-mentioned sixth flag is the second value, it is determined that the current filter bank is not the above-mentioned second target filter bank, and the value of the fourth flag corresponding to each filter is determined, and the above-mentioned fourth flag and its value are written into the bitstream. The above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index.

[0598] Exemplarily, the above-mentioned sixth flag can be expressed as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is the second value (such as "0"), it indicates that the current filter bank does not belong to the above-mentioned second target filter bank, that is, the tap coefficients of all filters in the current filter bank do not use a shared non-linear clipping index.

[0599] In order to locate which filter's tap coefficients in the current filter bank share the use of the non-linear clipping index, it is necessary to determine the value of the fourth flag corresponding to each filter in the above-mentioned current filter bank. Suppose the current filter bank contains Z filters, and the fourth flag of the j-th filter (where j is an integer taking values from 1 to Z in sequence) is used to indicate whether the tap coefficients of the j-th filter share the use of the non-linear clipping index.

[0600] Exemplarily, the above-mentioned fourth flag can be expressed as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (such as "0"), it indicates that the tap coefficients of the current filter do not use a shared non-linear clipping index; if alf_filter_share_nonlinear takes the first value (such as "1"), it indicates that the tap coefficients of the current filter use a shared non-linear clipping index.

[0601] In S3520, if the above-mentioned fourth flag takes the first value, the second non-linear clipping index is written into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filter.

[0602] The specific implementation manner of S3520 is the same as that of S2140, and will not be elaborated here.

[0603] In the solution provided in the thirty-eighth embodiment, for the multiple tap coefficients of the above-mentioned current filter, only one shared non-linear clipping index needs to be transmitted to achieve the non-linear clipping operation on the input of the filter. Thus, it can significantly reduce the bit overhead of the non-linear clipping index, and further facilitate improving the compression efficiency of the video.

[0604] As described above in conjunction with Figures 3 to 35 , the method embodiments of the present application for encoding and decoding have been described in detail, where the processor can be used as a decoder. Below in conjunction with Figure 36 and Figure 37 , the apparatus embodiments of the present application will be described in detail.

[0605] Figure 36 is a schematic structural diagram of the decoding apparatus 3600 provided by the embodiments of the present application. Refer toFigure 36 , the decoding device 3600 includes: a parsing module 3610 and an obtaining module 3620;

[0606] Among them, the above-mentioned parsing module 3610 is used to parse the bitstream to determine a target flag, and the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non-linear clipping index; and, the above-mentioned obtaining module 3620 is used to obtain a target non-linear clipping index if the value of the target flag is a first value, where the target non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the at least one filter.

[0607] In an exemplary embodiment, based on the above solution, the target flag includes a first flag, and the first flag is used to indicate whether the tap coefficients of all filters in multiple filter groups that support sharing the non-linear clipping index use a shared non-linear clipping index; the target non-linear clipping index includes a first non-linear clipping index, where the first non-linear clipping index is the non-linear clipping index shared by the tap coefficients of all filters in the multiple filter groups.

[0608] In an exemplary embodiment, based on the above solution, the target flag includes a second flag, and the second flag is used to indicate whether there is at least one first target filter group, where the first target filter group includes tap coefficients of at least one filter that use a shared non-linear clipping index;

[0609] The above-mentioned parsing module 3610 is further used to: if the value of the second flag is a first value, parse the bitstream to determine a third flag corresponding to each filter group, and the third flag is used to indicate whether the current filter group is the first target filter group; if the value of the third flag is a first value, parse the bitstream to determine a fourth flag corresponding to each filter in the first target filter group, and the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the fourth flag is a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0610] In an exemplary embodiment, based on the above solution, the target flag includes: a third flag corresponding to each filter group, and the third flag is used to indicate whether the current filter group is a first target filter group, where the first target filter group includes tap coefficients of at least one filter that use a shared non-linear clipping index;

[0611] The above parsing module 3610 is further configured to: if the value of the above third flag is the first value, parse the bitstream to determine a fourth flag corresponding to each filter in the above first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the above fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above filter.

[0612] In an exemplary embodiment, based on the above solution, the above target flag includes: a fourth flag corresponding to each filter, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; the above target non-linear clipping index includes a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above filter.

[0613] In an exemplary embodiment, based on the above solution, the above target flag includes a fifth flag, where the fifth flag is used to indicate whether there is at least one second target filter bank, where the tap coefficients of the filters in the above second target filter bank use a shared non-linear clipping index;

[0614] The above parsing module 3610 is further configured to: if the value of the above fifth flag is the first value, parse the bitstream to determine a sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is the above second target filter bank; if the value of the above sixth flag is the first value, obtain a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the above second target filter bank.

[0615] In an exemplary embodiment, based on the above solution, the above target flag includes: a sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is a second target filter bank, where the tap coefficients of the filters in the above second target filter bank use a shared non-linear clipping index; the above target non-linear clipping index includes a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the above second target filter bank.

[0616] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the first flag takes a second value, parse the code stream to determine a second flag, where the second flag is used to indicate whether there is at least one first target filter bank, and the first target filter bank includes tap coefficients of at least one filter that use a shared non-linear clipping index; if the second flag takes a first value, parse the code stream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is the first target filter bank; if the third flag takes a first value, parse the code stream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0617] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the first flag takes a second value, parse the code stream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is the first target filter bank, and the first target filter bank includes tap coefficients of at least one filter that use a shared non-linear clipping index; if the third flag takes a first value, parse the code stream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0618] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the first flag takes a second value, parse the code stream to determine a fourth flag corresponding to each filter, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0619] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the first flag takes a second value, parse the bitstream to determine a fifth flag, where the fifth flag is used to indicate whether there is at least one second target filter bank, and in the second target filter bank, the tap coefficients of the filters use a shared non-linear clipping index; if the fifth flag takes a first value, parse the bitstream to determine a sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is the second target filter bank; if the sixth flag takes a first value, obtain a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

[0620] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the fifth flag takes a second value, determine that there is no second target filter bank in the multiple filter banks, and parse the bitstream to determine a second flag, where the second flag is used to indicate whether there is at least one first target filter bank, and in the first target filter bank, the tap coefficients of at least one filter use a shared non-linear clipping index; if the second flag takes a first value, parse the bitstream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is the first target filter bank; if the third flag takes a first value, parse the bitstream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared non-linear clipping index; if the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters.

[0621] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the fifth flag takes a second value, determine that there is no second target filter bank in the multiple filter banks, and parse the bitstream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is a first target filter bank, and in the first target filter bank, the tap coefficients of at least one filter use a shared non-linear clipping index; if the third flag takes a first value, parse the bitstream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared non-linear clipping index; if the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters.

[0622] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the fifth flag takes the second value, determine that the second target filter bank does not exist in the multiple filter banks, and determine the fourth flag corresponding to each filter by parsing the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0623] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the sixth flag takes the second value, determine that the current filter bank is not the second target filter bank, and determine the third flag corresponding to each filter bank by parsing the bitstream, where the third flag is used to indicate whether the current filter bank is the first target filter bank, and wherein, the first target filter bank includes tap coefficients of at least one filter using a shared non-linear clipping index; if the third flag takes the first value, parse the bitstream to determine the fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0624] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the sixth flag takes the second value, determine that the current filter bank is not the second target filter bank, and determine the fourth flag corresponding to each filter by parsing the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0625] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the first flag takes the second value, parse the bitstream to determine the sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is the second target filter bank, and wherein, the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index; if the sixth flag takes the first value, obtain a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

[0626] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the sixth flag takes a second value, determine that the current filter bank is not the second target filter bank, and determine a third flag corresponding to each filter bank by parsing the code stream, where the third flag is used to indicate whether the current filter bank is the first target filter bank, and in the first target filter bank, the tap coefficients of at least one filter use a shared non-linear clipping index; if the third flag takes a first value, parse the code stream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0627] In an exemplary embodiment, based on the above solution, the parsing module 3610 is further configured to: if the sixth flag takes a second value, determine that the current filter bank is not the second target filter bank, and determine a fourth flag corresponding to each filter by parsing the code stream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0628] In an exemplary embodiment, based on the above solution, the determining module 3620 is further configured to: if the second flag takes a second value, determine that there is no filter in the plurality of filter banks whose tap coefficients use a shared non-linear clipping index; or, if the third flag takes a second value, determine that there is no filter in the current filter bank whose tap coefficients use a shared non-linear clipping index; or, if the fourth flag takes a second value, determine that the tap coefficients of the current filter do not use a shared non-linear clipping index.

[0629] In an exemplary embodiment, based on the above solution, there is a preset mapping relationship between different non-linear clipping indexes and different non-linear clipping intervals; the parsing module 3610 is further configured to: after obtaining the target non-linear clipping index, obtain a target non-linear clipping interval that has a mapping relationship with the target non-linear clipping index, so as to perform a non-linear clipping operation on the input of the at least one filter through the target non-linear clipping interval.

[0630] In an exemplary embodiment, based on the above solution, the input of the above filter includes any one or more of the following: chrominance component; luminance component; cross-color component; wherein, the cross-color component includes any one or more of the following: enhancing the chrominance component through the luminance component, enhancing the red chrominance component through the blue chrominance component, and enhancing the blue chrominance component through the red chrominance component.

[0631] It should be understood that the embodiments of the decoding device and the embodiments of the decoding method can correspond to each other, and similar descriptions can refer to the embodiments of the decoding method. To avoid repetition, they will not be elaborated here. Specifically, Figure 36 The illustrated decoding device can execute the embodiments of the above decoding method, and the foregoing and other operations and / or functions of each module in the device respectively implement the method embodiments corresponding to the nodes in the main node group. For the sake of brevity, they will not be elaborated here.

[0632] Figure 37 is a schematic structural diagram of an encoding device 3700 provided by an embodiment of the present application. The encoding device 3700 is configured in a terminal device. Refer to Figure 37 The encoding device 3700 includes: a determination module 3710 and a writing module 3720;

[0633] Wherein, the above determination module 3710 is used to determine the value of a target flag, and the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non-linear clipping index; the above writing module 3720 is used to write the target flag and its value into the code stream; the above writing module 3720 is further used to, if the value of the target flag is a first value, write a target non-linear clipping index into the code stream, where the target non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the at least one filter.

[0634] In an exemplary embodiment, based on the foregoing solution, the target flag includes a first flag, and the first flag is used to indicate whether the tap coefficients of the filters in multiple filter groups that support shared use of the non-linear clipping index use a shared non-linear clipping index; the target non-linear clipping index includes a first non-linear clipping index, where the first non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the multiple filter groups.

[0635] In an exemplary embodiment, based on the foregoing solution, the target flag includes a second flag, and the second flag is used to indicate whether there is at least one first target filter group, where the first target filter group includes tap coefficients of at least one filter that use a shared non-linear clipping index;

[0636] The above-mentioned writing module 3720 is further configured to: if the value of the second flag is the first value, determine the value of the third flag corresponding to each filter bank, and write the third flag and its value into the bitstream, where the third flag is used to indicate whether the current filter bank is the first target filter bank; if the value of the third flag is the first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0637] In an exemplary embodiment, based on the foregoing solution, the target flag includes: a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is the first target filter bank, and where the first target filter bank includes at least one filter whose tap coefficients use a shared non-linear clipping index;

[0638] The above-mentioned writing module 3720 is further configured to: if the value of the third flag is the first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0639] In an exemplary embodiment, based on the foregoing solution, the target flag includes: a fourth flag corresponding to each filter, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; the target non-linear clipping index includes a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0640] In an exemplary embodiment, based on the foregoing solution, the target flag includes a fifth flag, where the fifth flag is used to indicate whether there is at least one second target filter bank, and where the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index;

[0641] The above-mentioned writing module 3720 is further configured to: if the value of the above-mentioned fifth flag is the first value, determine the value of the sixth flag corresponding to each filter bank, and write the above-mentioned sixth flag and its value into the bitstream, where the sixth flag is used to indicate whether the current filter bank is the above-mentioned second target filter bank; if the value of the above-mentioned sixth flag is the first value, write the third non-linear clipping index into the bitstream, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the above-mentioned second target filter bank.

[0642] In an exemplary embodiment, based on the foregoing solution, the above-mentioned target flag includes: a sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is the second target filter bank, and the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index; the above-mentioned target non-linear clipping index includes a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the above-mentioned second target filter bank.

[0643] In an exemplary embodiment, based on the foregoing solution, the above-mentioned writing module 3720 is further configured to: if the value of the above-mentioned first flag is the second value, determine the value of the second flag, and write the above-mentioned second flag and its value into the bitstream, where the second flag is used to indicate whether there is at least one first target filter bank, and the tap coefficients of at least one filter in the first target filter bank use a shared non-linear clipping index; if the value of the above-mentioned second flag is the first value, determine the value of the third flag corresponding to each filter bank, and write the above-mentioned third flag and its value into the bitstream, where the third flag is used to indicate whether the current filter bank is the above-mentioned first target filter bank; if the value of the above-mentioned third flag is the first value, determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter bank, and write the above-mentioned fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared non-linear clipping index; if the value of the above-mentioned fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the above-mentioned filters.

[0644] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the first flag takes a second value, determine the value of the third flag corresponding to each filter bank, and write the third flag and its value into the bitstream, where the third flag is used to indicate whether the current filter bank is a first target filter bank, and in the first target filter bank, the tap coefficients of at least one filter use a shared non-linear clipping index; if the third flag takes a first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, write a second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0645] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the first flag takes a second value, determine the value of the fourth flag corresponding to each filter, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, write a second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0646] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the first flag takes a second value, determine the value of the fifth flag, and write the fifth flag and its value into the bitstream, where the fifth flag is used to indicate whether there is at least one second target filter bank, and in the second target filter bank, the tap coefficients of the filters use a shared non-linear clipping index; if the fifth flag takes a first value, determine the value of the sixth flag corresponding to each filter bank, and write the sixth flag and its value into the bitstream, where the sixth flag is used to indicate whether the current filter bank is the second target filter bank; if the sixth flag takes a first value, write a third non-linear clipping index into the bitstream, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

[0647] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the value of the fifth flag is the second value, determine that the second target filter bank does not exist in the multiple filter banks, determine the value of the second flag, and write the second flag and its value into the bitstream, where the second flag is used to indicate whether there is at least one first target filter bank, and in the first target filter bank, the tap coefficients of at least one filter use a shared non-linear clipping index; if the value of the second flag is the first value, determine the value of the third flag corresponding to each filter bank, and write the third flag and its value into the bitstream, where the third flag is used to indicate whether the current filter bank is the first target filter bank; if the value of the third flag is the first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0648] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the value of the fifth flag is the second value, determine that the second target filter bank does not exist in the multiple filter banks, determine the value of the third flag corresponding to each filter bank, and write the third flag and its value into the bitstream, where the third flag is used to indicate whether the current filter bank is the first target filter bank, and in the first target filter bank, the tap coefficients of at least one filter use a shared non-linear clipping index; if the value of the third flag is the first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0649] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the value of the fifth flag is the second value, determine that the second target filter bank does not exist in the multiple filter banks, determine the value of the fourth flag corresponding to each filter, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0650] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the value of the sixth flag is the second value, determine that the current filter bank is not the second target filter bank, determine the value of the third flag corresponding to each filter bank, and write the third flag and its value into the bitstream, where the third flag is used to indicate whether the current filter bank is the first target filter bank, and wherein the first target filter bank includes tap coefficients of at least one filter using a shared non-linear clipping index; if the value of the third flag is the first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0651] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the value of the sixth flag is the second value, determine that the current filter bank is not the second target filter bank, determine the value of the fourth flag corresponding to each filter, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the value of the fourth flag is the first value, write the second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0652] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the first flag takes a second value, determine the value of the sixth flag corresponding to each filter bank, and write the sixth flag and its value into the bitstream, where the sixth flag is used to indicate whether the current filter bank is a second target filter bank, and in the second target filter bank, the tap coefficients of the filters use a shared non-linear clipping index; if the sixth flag takes a first value, write a third non-linear clipping index into the bitstream, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

[0653] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the sixth flag takes a second value, determine that the current filter bank is not the second target filter bank, and determine the value of the third flag corresponding to each filter bank, and write the third flag and its value into the bitstream, where the third flag is used to indicate whether the current filter bank is a first target filter bank, and in the first target filter bank, the tap coefficients of at least one filter use a shared non-linear clipping index; if the third flag takes a first value, determine the value of the fourth flag corresponding to each filter in the first target filter bank, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, write a second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0654] In an exemplary embodiment, based on the foregoing solution, the writing module 3720 is further configured to: if the sixth flag takes a second value, determine that the current filter bank is not the second target filter bank, and determine the value of the fourth flag corresponding to each filter, and write the fourth flag and its value into the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; if the fourth flag takes a first value, write a second non-linear clipping index into the bitstream, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

[0655] In an exemplary embodiment, based on the foregoing solution, there is a preset mapping relationship between different non-linear clipping indexes and different non-linear clipping intervals; the writing module 3720 is specifically configured to: write the target non-linear clipping index and its corresponding target non-linear clipping interval into the bitstream; where the target non-linear clipping interval is used to perform a non-linear clipping operation on the input of the at least one filter.

[0656] It should be understood that the embodiments of the encoding device and the embodiments of the encoding method can correspond to each other, and similar descriptions can refer to the embodiments of the encoding method. To avoid repetition, they will not be elaborated here. Specifically, Figure 37 The encoding device shown can execute the embodiments of the above encoding method, and the foregoing and other operations and / or functions of each module in the device respectively implement the method embodiments corresponding to the nodes in the main node group. For the sake of brevity, they will not be elaborated here.

[0657] Above, the device of the embodiments of the present application has been described from the perspective of functional modules in combination with the drawings. It should be understood that the functional module can be implemented in the form of hardware, or in the form of instructions in software, or in a combination of hardware and software modules. Specifically, each step of the method embodiments in the present application can be completed by the integrated logic circuit in the hardware in the processor and / or instructions in software form. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. Optionally, the software module can be located in mature storage media in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage media is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps in the above method embodiments.

[0658] Figure 38 is a schematic block diagram of the electronic device 3800 provided by the embodiments of the present application, Figure 38 The electronic device 3800 can be used to execute the above encoding and decoding method, and the electronic device 3800 can be an encoder or a decoder.

[0659] Such as Figure 38 shown, the electronic device 3800 may include:

[0660] A memory 3810 and a processor 3820. The memory 3810 is used to store a computer program 3830 and transmit the program code 33 to the processor 3820. In other words, the processor 3820 can call and run the computer program 3830 from the memory 3810 to implement the method in the embodiments of the present application.

[0661] For example, the processor 3820 can be used to execute the steps in the above method according to the instructions in the computer program 3830.

[0662] In some embodiments of the present application, the processor 3820 may include but is not limited to:

[0663] General-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.

[0664] In some embodiments of the present application, the memory 3810 includes, but is not limited to:

[0665] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synch link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0666] In some embodiments of the present application, the computer program 3830 may be divided into one or more modules, and the one or more modules are stored in the memory 3810 and executed by the processor 3820 to complete the encoding method or decoding method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 3830 in the electronic device.

[0667] As Figure 38 shown, the electronic device 3800 may further include:

[0668] A transceiver 3840, which can be connected to the processor 3820 or the memory 3810.

[0669] Among them, the processor 3820 can control the transceiver 3840 to communicate with other devices. Specifically, it can send information or data to other devices, or receive information or data sent by other devices. The transceiver 3840 can include a transmitter and a receiver. The transceiver 3840 can further include an antenna, and the number of antennas can be one or more.

[0670] It should be understood that the various components in the electronic device 3830 are connected through a bus system. Among them, the bus system includes not only a data bus, but also a power bus, a control bus, and a status signal bus.

[0671] According to one aspect of the present application, there is provided a computer storage medium, on which a computer program is stored. When the computer program is executed by a computer, the computer can execute the method of the above method embodiment. Or rather, the embodiment of the present application further provides a computer program product containing instructions. When the instructions are executed by a computer, the computer executes the method of the above method embodiment.

[0672] According to another aspect of the present application, there is provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of the above method embodiment. In the embodiment of the present application, the computer program is executed by the processor to encode a method to form a code stream, and the code stream is stored in the computer-readable storage medium.

[0673] In other words, when implemented using software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0674] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0675] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or modules can be in an electrical, mechanical, or other form.

[0676] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, in each embodiment of the present application, the various functional modules can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0677] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A decoding method, characterized in that, Applied to a processor, the method includes: Parse a bitstream to determine a target flag, where the target flag is used to indicate whether tap coefficients of at least one filter use a shared non-linear clipping index; If the target flag takes a first value, obtain a target non-linear clipping index, where the target non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the at least one filter.

2. The method according to claim 1, wherein The target flag includes a first flag, where the first flag is used to indicate whether tap coefficients of filters in multiple filter groups that support shared use of a non-linear clipping index use the shared non-linear clipping index; The target non-linear clipping index includes a first non-linear clipping index, where the first non-linear clipping index is the non-linear clipping index shared by the tap coefficients of filters in the multiple filter groups.

3. The method according to claim 1, characterized in that, The target flag includes a second flag, where the second flag is used to indicate whether there is at least one first target filter group, where the first target filter group includes tap coefficients of at least one filter that use a shared non-linear clipping index; The method further includes: If the second flag takes a first value, parse the bitstream to determine a third flag corresponding to each filter group, where the third flag is used to indicate whether the current filter group is the first target filter group; If the third flag takes a first value, parse the bitstream to determine a fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether tap coefficients of the current filter use a shared non-linear clipping index; If the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

4. The method according to claim 1, wherein The target flag includes: a third flag corresponding to each filter group, where the third flag is used to indicate whether the current filter group is a first target filter group, where the first target filter group includes tap coefficients of at least one filter that use a shared non-linear clipping index; The method further includes: If the third flag takes a first value, parse the bitstream to determine a fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether tap coefficients of the current filter use a shared non-linear clipping index; If the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

5. The method according to claim 1, wherein The target flag includes: a fourth flag corresponding to each filter, where the fourth flag is used to indicate whether tap coefficients of the current filter use a shared non-linear clipping index; The target non-linear clipping index includes a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

6. The method according to claim 1, wherein The target flag includes a fifth flag, where the fifth flag is used to indicate whether there is at least one second target filter group, where tap coefficients of filters in the second target filter group use a shared non-linear clipping index; The method further includes: If the fifth flag takes a first value, parse the code stream to determine a sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is the second target filter bank; If the sixth flag takes a first value, obtain a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

7. The method according to claim 1, characterized in that, The target flag includes: a sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is the second target filter bank, and the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index; The target non-linear clipping index includes a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

8. The method according to claim 2, characterized in that, The method further includes: If the first flag takes a second value, parse the code stream to determine a second flag, where the second flag is used to indicate whether there is at least one first target filter bank, and the tap coefficients of at least one filter in the first target filter bank use a shared non-linear clipping index; If the second flag takes a first value, parse the code stream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is the first target filter bank; If the third flag takes a first value, parse the code stream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; If the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

9. The method according to claim 2, wherein The method further includes: If the first flag takes a second value, parse the code stream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is the first target filter bank, and the tap coefficients of at least one filter in the first target filter bank use a shared non-linear clipping index; If the third flag takes a first value, parse the code stream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; If the fourth flag takes a first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

10. The method according to claim 2, wherein The method further includes: If the first flag takes a second value, parse the code stream to determine a fourth flag corresponding to each filter, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; If the value of the fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

11. The method according to claim 2, characterized in that, The method further includes: If the value of the first flag is the second value, parse the bitstream to determine a fifth flag, where the fifth flag is used to indicate whether there is at least one second target filter bank, and among the second target filter banks, the tap coefficients of the filters use a shared non-linear clipping index; If the value of the fifth flag is the first value, parse the bitstream to determine a sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is the second target filter bank; If the value of the sixth flag is the first value, obtain a third non-linear clipping index, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

12. The method according to claim 11, wherein The method further includes: If the value of the fifth flag is the second value, determine that there is no second target filter bank among the multiple filter banks, and parse the bitstream to determine a second flag, where the second flag is used to indicate whether there is at least one first target filter bank, and among the first target filter banks, the tap coefficients of at least one filter use a shared non-linear clipping index; If the value of the second flag is the first value, parse the bitstream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is the first target filter bank; If the value of the third flag is the first value, parse the bitstream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared non-linear clipping index; If the value of the fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

13. The method according to claim 11, wherein The method further includes: If the value of the fifth flag is the second value, determine that there is no second target filter bank among the multiple filter banks, and parse the bitstream to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is the first target filter bank, and among the first target filter banks, the tap coefficients of at least one filter use a shared non-linear clipping index; If the value of the third flag is the first value, parse the bitstream to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared non-linear clipping index; If the value of the fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

14. The method according to claim 11, wherein The method further includes: If the value of the fifth flag is the second value, it is determined that the second target filter bank does not exist in the multiple filter banks, and the bitstream is parsed to determine a fourth flag corresponding to each filter, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; If the value of the fourth flag is the first value, a second non-linear clipping index is obtained, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

15. The method according to claim 11, wherein The method further includes: If the value of the sixth flag is the second value, it is determined that the current filter bank is not the second target filter bank, and the bitstream is parsed to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is a first target filter bank, and wherein the first target filter bank includes tap coefficients of at least one filter using a shared non-linear clipping index; If the value of the third flag is the first value, the bitstream is parsed to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; If the value of the fourth flag is the first value, a second non-linear clipping index is obtained, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

16. The method according to claim 11, wherein The method further includes: If the value of the sixth flag is the second value, it is determined that the current filter group is not the second target filter group, and the bitstream is parsed to determine a fourth flag corresponding to each filter, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; If the value of the fourth flag is the first value, a second non-linear clipping index is obtained, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

17. The method according to claim 2, characterized in that, The method further includes: If the value of the first flag is the second value, the bitstream is parsed to determine a sixth flag corresponding to each filter bank, where the sixth flag is used to indicate whether the current filter bank is a second target filter bank, and wherein the tap coefficients of the filters in the second target filter bank use a shared non-linear clipping index; If the value of the sixth flag is the first value, a third non-linear clipping index is obtained, where the third non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filters in the second target filter bank.

18. The method according to claim 17, wherein The method further includes: If the value of the sixth flag is the second value, it is determined that the current filter bank is not the second target filter bank, and the bitstream is parsed to determine a third flag corresponding to each filter bank, where the third flag is used to indicate whether the current filter bank is a first target filter bank, and wherein the first target filter bank includes tap coefficients of at least one filter using a shared non-linear clipping index; If the value of the third flag is the first value, the bitstream is parsed to determine a fourth flag corresponding to each filter in the first target filter bank, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; If the value of the fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

19. The method according to claim 17, wherein The method further includes: If the value of the sixth flag is the second value, determine that the current filter bank is not the second target filter bank, and determine the fourth flag corresponding to each filter by parsing the bitstream, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared non-linear clipping index; If the value of the fourth flag is the first value, obtain a second non-linear clipping index, where the second non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the filter.

20. The method according to claim 12, wherein The method further includes: If the value of the second flag is the second value, determine that there is no filter in the plurality of filter banks whose tap coefficients use a shared non-linear clipping index; or, If the value of the third flag is the second value, determine that there is no filter in the current filter bank whose tap coefficients use a shared non-linear clipping index; or, If the value of the fourth flag is the second value, determine that the tap coefficients of the current filter do not use a shared non-linear clipping index.

21. The method according to any one of claims 1 to 20, characterized in that, There is a preset mapping relationship between different non-linear clipping indexes and different non-linear clipping intervals; After obtaining the target non-linear clipping index, the method further includes: Obtain a target non-linear clipping interval that has a mapping relationship with the target non-linear clipping index, so as to perform a non-linear clipping operation on the input of the at least one filter through the target non-linear clipping interval.

22. A coding method, characterized in that, Applied to an encoder, the method includes: Determine the value of a target flag, where the target flag is used to indicate whether the tap coefficients of at least one filter use a shared non-linear clipping index; Write the target flag and its value into the bitstream; If the value of the target flag is the first value, write the target non-linear clipping index into the bitstream, where the target non-linear clipping index is the non-linear clipping index shared by the tap coefficients of the at least one filter.

23. An electronic device, characterized in that, Includes a processor and a memory; The memory is used to store a computer program; The processor is used to execute the computer program to implement the method according to any one of claims 1 to 22 above.

24. A computer-readable storage medium, characterized in that, Used to store a computer program; The computer program causes the computer to execute the decoding method according to any one of claims 1 to 21 above.

25. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the encoding method according to claim 22 to form a bitstream, and the bitstream is stored in the computer-readable storage medium.