Decoding method, coding method, electronic device 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.

WO2025148630A1PCT designated stage expired Publication Date: 2025-07-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/139704
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-08
Filing Date
2024-12-16
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

In the prior art, the nonlinear limiting index transmission bit overhead of the Wiener filter is too large, affecting the compression efficiency of video encoding.

Method used

Using the method of shared nonlinear limiting index, the target flag is determined by analyzing the code stream to obtain the shared nonlinear limiting index, reducing the number of nonlinear limiting indexes.

Benefits of technology

Effectively reduce the bit overhead of nonlinear limiting indexes and improve the compression efficiency of video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024139704_17072025_PF_FP_ABST
    Figure CN2024139704_17072025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a decoding method, a coding method, an electronic device and a computer-readable storage medium, which are applied in the technical field of video coding and decoding. The decoding method comprises: parsing a bit stream to determine a target flag in the bit stream and the value of the target flag, wherein the target flag is used for indicating whether tap coefficients of at least one filter use a shared nonlinear amplitude-limiting index; and if the value of the target flag is a first value, further acquiring a target nonlinear amplitude-limiting index from the bit stream, wherein the target nonlinear amplitude-limiting index is a nonlinear amplitude-limiting index shared by the tap coefficients of the at least one filter. In the embodiments of the present application, nonlinear amplitude-limiting indexes respectively corresponding to a plurality of tap coefficients of a filter can be represented by one target nonlinear amplitude-limiting index. Thus, for the same number of tap coefficients, the number of nonlinear amplitude-limiting indexes can be reduced, such that the bit overheads of the nonlinear amplitude-limiting indexes can be effectively reduced, thereby facilitating an improvement in the compression efficiency of a video.
Need to check novelty before this filing date? Find Prior Art

Description

Decoding method, encoding method, electronic device and storage medium

[0001] Priority information

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on January 8, 2024, with application number 2024100319839 and invention name “Decoding method, encoding method, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

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

[0004] Adaptive loop filtering (ALF) and cross-component adaptive loop filtering (CCALF), loop filters used in Versatile Video Coding (VVC), are both Wiener filters. Wiener filters are linear filters that only consider the spatial similarity between adjacent pixels and the current pixel being processed. To ensure that the Wiener filter considers both spatial and sample similarity between adjacent pixels and the current pixel being processed, a nonlinear clipping operation can be employed. Specifically, the difference between the Wiener filter input and the current pixel is limited through clipping.

[0005] Existing techniques employ nonlinear clipping, requiring the transmission of a nonlinear filter index for each filter tap coefficient. However, as the number of filter tap coefficients increases and the number of supported filter banks increases, the bit overhead required to transmit the nonlinear clipping index increases significantly, impacting video compression efficiency. Summary of the Invention

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

[0007] In a first aspect, the present application provides a decoding method, applied to an electronic device, the method comprising: parsing a bitstream to determine a target flag in the bitstream and a value of the target flag, the target flag being used to indicate whether the tap coefficients of at least one filter use a shared nonlinear clipping index; if the value of the target flag is a first value, obtaining a target nonlinear clipping index from the bitstream, wherein the target nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the at least one filter.

[0008] In a second aspect, the present application provides a coding method, which is applied to an electronic device, and the method includes: determining the value of a target flag based on a rate-distortion cost, the target flag being used to indicate whether the tap coefficients of at least one filter use a shared nonlinear clipping index; writing the target flag and its value into a bitstream; if the target flag is a first value, writing the target nonlinear clipping index into the bitstream, wherein the target nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the at least one filter.

[0009] In a third aspect, the present application provides a decoding device configured in an electronic device for decoding, the device comprising: a parsing module and an acquisition module;

[0010] The parsing module is configured to parse the bitstream to determine a target flag and a value of the target flag in the bitstream, wherein the target flag is configured to indicate whether the tap coefficients of at least one filter use a shared nonlinear clipping index; and the acquisition module is configured to acquire a target nonlinear clipping index from the bitstream if the value of the target flag is a first value, wherein the target nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the at least one filter.

[0011] In a fourth aspect, an encoding device is provided, configured in an electronic device for encoding, the device comprising: a determination module and a writing module;

[0012] Among them, the above-mentioned determination module is used to determine the value of the target flag according to the rate-distortion cost, and the above-mentioned target flag is used to indicate whether the tap coefficients of at least one filter use a shared nonlinear clipping index; and the above-mentioned writing module is used to write the above-mentioned target flag into the code stream; the above-mentioned writing module is also used to write the target nonlinear clipping index into the code stream if the value of the above-mentioned target flag is a first value, wherein the above-mentioned target nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the above-mentioned at least one filter.

[0013] In a fifth aspect, an electronic device is provided, comprising a processor and a memory; the memory is used to store computer programs, and the processor is used to call and run the computer programs stored in the memory to execute the methods in the first aspect or the second aspect and their respective implementations.

[0014] In a sixth aspect, a chip is provided for implementing the method of any aspect of the first aspect or its respective implementations. Specifically, the chip includes a processor for calling and executing a computer program from a memory, causing a device equipped with the chip to perform the method of the first or second aspect and its respective implementations.

[0015] In a seventh aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method in the first aspect and its various implementations.

[0016] In an eighth aspect, a computer-readable storage medium storing a computer program is provided. The computer program is executed by a processor to perform the encoding method provided in the second aspect to form a code stream, and the code stream is stored in the computer-readable storage medium.

[0017] In a ninth aspect, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions enable a computer to execute the method in the first aspect or the second aspect and its respective implementations.

[0018] In a tenth aspect, a method for processing a video stream is provided, wherein the video stream is generated according to the method in the second aspect and its implementation, or is decoded based on the method provided by the first aspect.

[0019] In an eleventh aspect, a computer program is provided, which, when executed on a computer, enables the computer to execute the method in the above-mentioned first aspect or second aspect and its respective implementation manners.

[0020] In summary, in the solution provided by the embodiment of the present application, the electronic device can determine the target flag and its value by parsing the code stream. Among them, if the value of the target flag is the first value, it means that there is a filter whose tap coefficients use a shared nonlinear limiting index; if the value of the target flag is not the first value, it means that there is no filter whose tap coefficients use a shared nonlinear limiting index. Furthermore, when the target flag value is the first value, the electronic device further obtains the target nonlinear limiting index from the code stream, wherein the target nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filter. In the embodiment of the present application, the nonlinear limiting indexes corresponding to the multiple tap coefficients of the above-mentioned filter can be represented by a target nonlinear limiting index. Compared with the related art, for the same number of tap coefficients, the solution provided by the embodiment of the present application can reduce the number of nonlinear limiting indexes, so that the embodiment of the present application can effectively reduce the bit overhead of the nonlinear limiting index, which is conducive to improving the compression efficiency of the video. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] FIG1 is a schematic diagram of the ALF and CCALF processing flow applicable to the present application;

[0022] FIG2 is a schematic diagram of the shape of an ALF filter applicable to the present application;

[0023] FIG3 is a schematic diagram of the shape of an ECM-8.0ALF filter applicable to the present application;

[0024] FIG4 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0025] FIG5 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0026] FIG6 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0027] FIG7 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;

[0028] FIG8 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;

[0029] FIG9 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0030] FIG10 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;

[0031] FIG11 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0032] FIG12 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0033] FIG13 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;

[0034] FIG14 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0035] FIG15 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;

[0036] FIG16 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0037] FIG17 is a schematic diagram of a flow chart of a decoding method provided in an embodiment of the present application;

[0038] FIG18 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;

[0039] FIG19 is a schematic diagram of a flowchart of a decoding method provided in an embodiment of the present application;

[0040] FIG20 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0041] FIG21 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0042] FIG22 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0043] FIG23 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0044] FIG24 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0045] FIG25 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0046] FIG26 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0047] FIG27 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0048] FIG28 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0049] FIG29 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0050] FIG30 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0051] FIG31 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0052] FIG32 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0053] FIG33 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0054] FIG34 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0055] FIG35 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

[0056] FIG36 is a schematic structural diagram of a decoding device provided in an embodiment of the present application;

[0057] FIG37 is a schematic structural diagram of an encoding device provided in an embodiment of the present application;

[0058] Figure 38 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0060] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In the embodiments of the present invention, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A, but that B can also be determined based on A and / or other information. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices. In the description of this application, unless otherwise specified, "plurality" refers to two or more than two.

[0061] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a 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 part of an overall module or unit that includes the function of the module or unit.

[0062] 1. ALF and CCALF in VVC

[0063] As loop filters adopted in VVC, ALF and CCALF adaptively determine the filter coefficients according to different video contents, thereby reducing the mean square error (MSE) between the reconstructed component and the original component. Figure 1 is a schematic diagram of the ALF and CCALF processing flow that can be applied to this application. The input of ALF is the reconstructed pixel value before ALF processing, refer to Figure 1 for the sample adaptive offset (SAO) of luminance (Luma) luma 、CbCr sample adaptive compensation (Sample Adaptive Offset, SAO), SAO Cr 、SAO CbThe output of the ALF is an enhanced reconstructed luminance image and a reconstructed chrominance image. As an adaptive filter, the Wiener filter can generate different filter coefficients for different video content characteristics. Therefore, the ALF must first classify the video content and then use the corresponding filter for each category. In the VVC design, each 4x4 block is classified into one of 25 categories based on its directionality and activity. A corresponding filter coefficient is calculated for each category of video content.

[0064] 1.1. About the shape of the ALF filter:

[0065] For the luminance component, in addition to 4x4 block-level adaptation, VVC also supports ALF adaptation switching at the Coding Tree Unit (CTU) level. Each CTU can use the filter group generated by the current slice, or the filter group generated by the coded slice, or a set of fixed filters from the 16 offline trained fixed filter groups. Within the CTU, each 4x4 block selects a filter of the corresponding category from the filter group for filtering according to its own category. The filter coefficients and the corresponding clipping index are transmitted to the decoding end by ALF_APS (Adaptation Parameter Set). An ALF_APS can contain a luminance filter group (including up to 25 filters) and up to 8 chroma filters.

[0066] CCALF uses the luminance component to modify the chrominance component. Referring to Figure 1, CCALF uses the luminance component SAO luma As input, the output is the correction value ΔR of the chrominance component Cb , ΔR Cr The two chroma components can independently control whether to use the corresponding correction value. The correction value and the output of the chroma ALF together constitute the final chroma components Cb (representing blue chroma) and Cr (representing red chroma).

[0067] Regarding the shape of the ALF filter:

[0068] In VVC, ALF uses two diamond filters of different shapes as shown in Figure 2. The luminance component uses a 7x7 diamond filter, and the chrominance component uses a 5x5 diamond filter.

[0069] About pixel block classification and geometric transformation:

[0070] For the luminance component, ALF will adaptively use different filters at the sub-block level (4x4), that is, each 4x4 pixel block needs to be divided into one of 25 categories. For the chrominance component, ALF does not need to classify the pixels at the sub-block level. All chrominance pixels in a CTU use the same filter. The classification index C of the luminance component pixel block is composed of the directionality feature (Directionality) D and the quantized activity feature (Activity) of the block. As obtained by formula (1):

[0071] To calculate the directional feature D and activity feature First, we need to calculate the horizontal, vertical, diagonal, and anti-diagonal gradient values ​​of each pixel in the 4x4 pixel block, referring to formulas (2)-(5): k,l =|2R(k,l)-R(k-1,l)-R(k+1,l)| (2) V k,l =|2R(k,l)-R(k,l-1)-R(k,l+1)| (3) D0 k,l =|2R(k,l)-R(k-1,l-1)-R(k+1,l+1)| (4) D1 k,l =|2R(k,l)-R(k-1,l+1)-R(k+1,l-1)| (5)

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

[0073] Where i and j represent the coordinates of the upper left corner pixel of the 4x4 pixel block, and R(k,l) represents the reconstructed pixel value at position (k,l) before ALF filtering.

[0074] After obtaining the gradient value of the pixel block, the maximum and minimum values ​​of the horizontal and vertical gradient values ​​are as follows:

[0075] The maximum and minimum values ​​of the diagonal and anti-diagonal gradient values ​​are:

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

[0077] Step 1: If and If both are true, then D is set to 0.

[0078] Step 2: If Then go to Step 3, otherwise go to Step 4.

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

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

[0081] The activity characteristic A is calculated by the following formula:

[0082] Activity feature A will be quantized to the range of [0-4] as the quantized activity feature

[0083] Before filtering each 4x4 luminance block, the filter coefficients and corresponding clipping values ​​are geometrically transformed according to the gradient value of the current block, according to the geometric transformation rules based on the pixel block gradient value shown in Table 1. These transformations include no transformation, diagonal transformation, vertical flip, and rotation transformation. Applying a geometric transformation to the filter coefficients is equivalent to applying a geometric transformation to the pixel values ​​while keeping the coefficients unchanged and then filtering. The purpose of the geometric transformation is to align the directionality of the content of different blocks as much as possible, thereby reducing the number of categories required for the ALF and allowing different pixels to share the same filter coefficients. Using geometric transformations can increase the actual classification from 25 to 100 categories without increasing the number of ALF filters, thereby improving its adaptability.

[0084] Table 1

[0085] 1.3 ALF filtering process in VVC

[0086] 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 formula (11):

[0087] Here, f(k, l) represents the filter tap coefficients, K(x, y) is the clipping function, and c(k, l) is the parameter associated with the clipping operation. The values ​​of k and l range from -L / 2 to L / 2, where L is the filter length. The clipping function is defined as K(x, y) = min(y, max(-y, x)). Clipping adds nonlinearity to the ALF, reducing the impact of significantly different surrounding pixels on the current pixel.

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

[0089] ECM-8.0 removes the downsampling operation and virtual boundary restrictions during gradient calculation during ALF classification. Furthermore, the basic unit of the ALF classification operation has been changed from a 4x4 sub-block to a 2x2 sub-block. The shapes of the luma and chroma filters have also been changed accordingly.

[0090] 2.1 Enhanced fixed filter

[0091] For the luminance component, ECM-8.0 uses three different classifiers (C0, C1, and C2) and three different filter sets (F0, F1, and F2). Filter sets F0 and F1 contain fixed filters whose coefficients are generated based on offline training of classifiers C0 and C1. F2 contains filter coefficients generated from the content to be encoded and needs to be written into the bitstream for transmission to the decoder.

[0092] 2.2 Classification Process

[0093] In ECM-8.0, each 2x2 sub-block is divided into two groups according to its directional characteristics D i and activity characteristics Generate the corresponding category index C i , as shown in formula (12):

[0094] Among them, i represents the classifier index, M D,i Represents the activity feature D used by the corresponding classifier i The total number of .

[0095] Similar to the calculation process in VVC, the horizontal, vertical, diagonal, and anti-diagonal gradients of each pixel are generated using the 1-D Laplacian operator. For classifier C0, the gradient of its sub-block is generated by adding the pixel gradient values ​​of all positions in the 4x4 area covering the target 2x2 sub-block. For classifiers C1 and C2, the gradient of its sub-block is generated by adding the pixel gradient values ​​of all positions in the 12x12 area covering the target 2x2 sub-block. The horizontal, vertical, diagonal, and anti-diagonal sub-block gradients are specified as Then the directional characteristic D i It is obtained by comparing the following two values ​​with a set of thresholds:

[0096] Directional feature D2 uses the same thresholds of 2 and 4.5 as VVC. For D0 and D1, first calculate the horizontal / vertical edge strength and diagonal edge strength Use threshold Th=[1.25,1.5,2,3,4.5,8]. When the edge strength Set to 0; otherwise, is satisfied The maximum integer of . When the edge strength Set to 0; otherwise To satisfy The maximum integer of . That is, when the horizontal / vertical edge is strong, the directional feature D i Generated from Table 2-a. Otherwise, the directional feature D i Generated from Table 2-b.

[0097] Activity characteristics It is the result of accumulating the horizontal and vertical gradients of the sub-block level A i The quantized value range is 0 to n. n is set to 4; for and n is set to 15. One ALF_APS can transmit up to 4 groups of luminance component filters, each filter group contains up to 25 filters.

[0098] 2.3. Band Classifier Based on 2x2 Sub-Blocks

[0099] In ECM-8.0, the ALF classification process uses a new classifier. For a set of filters transmitted to the decoder, a flag is used to indicate whether to use the original classifier or the new classifier. The new classifier cannot use geometric transformations. When using the new classifier, all pixels in a 2x2 sub-block are added together, and then the classification is performed based on the sum of the pixel values. index =(sum×25)>>(sample bitdepth+2) (13)

[0100] 2.4 Filtering process

[0101] First, two fixed filters F0 and F1 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 filter F2 is applied to R0(x,y), R1(x,y) and the surrounding pixels to generate the filtered pixel, as shown in formula (14):

[0102] Among them, f i,j Indicates the difference between the surrounding pixels after the clipping operation and the current pixel R(x,y), gi Represents R after limiting operation i-20 The difference between (x,y) and the current pixel. Filter coefficient c i ,i=0,…21,need to be transmitted to the decoding end.

[0103] In ECM-8.0, the luminance filter generated by online training contains four types of input: spatially adjacent samples, reconstructed samples before deblocking, extended samples generated by filtering with a fixed filter, and residual components. Its shape is shown in Figure 3. Among them, #0-#19 represent spatially adjacent samples, #20-#25, #28-#29 represent samples generated by filtering with a fixed filter, #26, #27, #30 represent reconstructed samples before deblocking, and #31 and #32 represent residual components. Based on these multiple types of input, the filtering process is as follows:

[0104] Among them, f i,j Indicates the difference between the limited spatial pixel samples and the current sample R(x,y), g i Represents the difference between the pixel sample generated by filtering with a fixed filter and the current sample R(x,y), h i,j Represents the difference between the reconstructed sample before the deblocking effect after clipping and the current sample R(x,y). i Represents the residual component after limiting, rFiltered i Represents the residual component generated by filtering with a fixed filter after clipping. The residual component and the reconstructed component use the same fixed filter.

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

[0106] 2.5. Classifier based on residual component

[0107] In JVET-AD0219, a new classifier based on the luma residual component is proposed as the third classifier of ALF. For any 2x2 luma sub-block, the sum of the absolute values ​​of the residual components of all positions in the 8x8 area covering the current 2x2 sub-block is first calculated. Then, the classification is performed based on the accumulated sum using the following formula: classIdx = sum>>(sample bit depth-4) (16)

[0108] The value range of the final category classIdx is 0-24. In ALF_APS, a classifier needs to be transmitted for each filter bank.

[0109] 3. ALF nonlinear limiting

[0110] As a linear filter, the Wiener filter only considers the spatial similarity between adjacent pixels and the current pixel to be processed. In order for the ALF to consider both the spatial similarity and sample similarity between adjacent pixels and the current pixel to be processed, the ALF uses a nonlinear clipping operation. That is, the difference between the ALF input and the current pixel is limited by clipping. The clipping function is as follows: K i =min(b i ,max(-b i ,diff i )) (17)

[0111] Among them, diff i is the difference between the ALF i-th input and the current pixel, b i The nonlinear amplitude limiting value corresponding to the filter tap coefficient is represented by the nonlinear amplitude limiting index d i The corresponding relationship between the nonlinear clipping index and the nonlinear clipping in VVC and ECM is:

[0112] Where BD represents the bit depth of the pixel, d i is the nonlinear clipping index, which can be 0, 1, 2, or 3.

[0113] In VVC and ECM, each filter tap coefficient has a corresponding nonlinear clipping index. If the encoder decides to use nonlinear clipping, all nonlinear clipping indices need to be transmitted to the decoder. The transmission process related to the nonlinear clipping index is shown in Table 3 below:

[0114] Table 3

[0115] alf_comp_num_alt_filters_minus1+1 indicates the number of different filter groups used by the current color component (in VVC, the luma component supports up to 1 filter group, and the chroma component supports up to 8 filter groups. In ECM, the luma component supports up to 4 filter groups, and the chroma component supports up to 8 filter groups). For each filter group, alf_comp_clip_flag is required to indicate whether the filters contained in the current filter group use nonlinear limiting. alf_comp_num_filters_signalled_minus1+1 indicates the number of filters contained in the current filter group (in VVC, a filter group for the luma component contains up to 25 filters, and a filter group for the chroma component contains up to 1 filter. In ECM, a filter group for the luma component contains up to 25 filters, and a filter group for the chroma component contains up to 1 filter). If nonlinear limiting is used, the nonlinear filter index must be transmitted for each tap coefficient of the filter (in VVC, a filter for the luminance component contains 13 tap coefficients, and a filter for the chrominance component contains 7 tap coefficients. In ECM, a filter for the luminance component contains 40 tap coefficients, and a filter for the chrominance component contains 21 tap coefficients).

[0116] The current nonlinear clipping in ALF allows the Wiener filter to exploit spatial correlation while also considering similarity with surrounding content. However, this requires transmitting the corresponding nonlinear clipping index for all tap coefficients of each filter bank. As the number of filter tap coefficients increases and the number of supported filter banks increases, the bit overhead of transmitting the ALF nonlinear clipping index increases significantly, thus affecting overall compression efficiency.

[0117] In order to solve the technical problems existing in the above-mentioned related technologies, the embodiments of the present application provide an enhanced ALF nonlinear limiting method using a shared nonlinear limiting index and a related nonlinear limiting index transmission method, which can improve the performance of ALF nonlinear limiting and is beneficial to improving the overall compression efficiency of electronic devices used to perform video encoding tasks (which can be called encoders, encoding devices, etc.).

[0118] The following describes the technical solutions of the embodiments of the present application in detail through some embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0119] Example 1

[0120] FIG4 is a flow chart of a decoding method P400 provided in an embodiment of the present application. The decoding method P400 is performed by an electronic device. Specifically, the electronic device can be used to perform video decoding tasks and can be exemplarily referred to as a decoder, decoding device, etc. Referring to FIG4 , the method P400 includes:

[0121] S410: The electronic device parses a code stream to determine a target flag and a value of the target flag, where the target flag is used to indicate whether tap coefficients of at least one filter use a shared nonlinear clipping index.

[0122] S420: If the target flag is a first value, the electronic device obtains a target nonlinear clipping index from the bitstream, wherein the target nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the at least one filter.

[0123] Exemplarily, there is a preset mapping relationship between different nonlinear clipping indices and different nonlinear clipping intervals. For example, four clipping indices [0, 1, 2, 3] similar to VTM or ECM can be used, and the absolute values ​​of the clipping intervals associated with these indexes are [1024, 128, 32, 8]. To improve the level of refinement, the number of clipping indices can be increased according to actual needs. For example, using eight clipping indices [0, 1, 2, 3, 4, 5, 6, 7], the absolute values ​​of the clipping intervals associated with these indexes can be [1024, 256, 128, 64, 32, 16, 8, 4].

[0124] Exemplarily, the above-mentioned nonlinear limiting index and the corresponding limiting interval can also be transmitted in HLS (SPS (Sequence Parameter Set, sequence parameter set), PPS (Picture Parameter Set, image parameter set), VPS (Video Parameter Set, video parameter set), APS, PictureHeader or SliceHeader, etc.).

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

[0126] Exemplarily, after parsing the bitstream to determine the target nonlinear clipping index, the electronic device obtains a target nonlinear clipping interval that is mapped to the target nonlinear clipping index, and performs a nonlinear clipping operation on the input of the at least one filter using the target nonlinear clipping interval. This limits the difference between the ALF input and the current pixel through clipping. This enables the ALF to simultaneously consider both spatial similarity and sample similarity between adjacent pixels and the current pixel to be processed. This demonstrates that the embodiments of the present application provide an enhanced ALF nonlinear clipping method that improves the performance of ALF nonlinear clipping.

[0127] Exemplarily, the target non-linear clipping index for sharing can be used for one or more of the chrominance component, the luma component, and the cross-color component. For example, it can be used for the luma component or the chrominance component separately; for example, it can also be used for the luma component and the chrominance component simultaneously; for example, it can also be used for the cross-color component (for example, using the luma component to enhance the chrominance component, using the Cb component to enhance the Cr component, and using the Cr component to enhance the Cb component).

[0128] In the solution provided by method P400 of the present application, an electronic device used to perform a video decoding task can parse a bitstream to determine the value of a target flag. If the target flag takes a first value, it indicates that at least one filter has tap coefficients that use a shared nonlinear clipping index; if the target flag does not take a first value, it indicates that no filter has tap coefficients that use a shared nonlinear clipping index. Furthermore, when the target flag takes a first value, the electronic device further obtains a target nonlinear clipping index, where the target nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the at least one filter. In an embodiment of the present application, the nonlinear clipping indexes corresponding to the multiple tap coefficients of the at least one filter can be represented by a target nonlinear clipping index. For the same number of tap coefficients, the number of nonlinear clipping indices can be reduced, thereby effectively reducing the bit overhead of the nonlinear clipping index, which is beneficial for improving video compression efficiency. Furthermore, an embodiment of the present application provides an enhanced ALF nonlinear clipping method that can improve the performance of ALF nonlinear clipping.

[0129] Example 2

[0130] Based on the first embodiment, the second embodiment of the present application also provides a decoding method. The implementation methods described in the first embodiment can be applied to the second embodiment and can achieve the same technical effect.

[0131] As a specific implementation of S410: the above-mentioned target flag includes a first flag, and the above-mentioned first flag is used to indicate whether the tap coefficients of all filters in the multiple filter groups that support the shared use of nonlinear clipping index use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the tap coefficients of all filters in the multiple filter groups that can be supported use a shared nonlinear clipping index can be determined by the rate-distortion cost RDO. When the encoder determines that the multiple filter groups support the use of a shared nonlinear 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 above-mentioned electronic device can obtain the value of the above-mentioned first flag by parsing the bitstream.

[0132] Exemplarily, the first flag may be represented as “alf_alt_share_nonlinear_flag.” If alf_alt_share_nonlinear_flag takes the second value (e.g., “0”), it indicates that a shared nonlinear clipping index is not used for the tap coefficients of all filters of the plurality of filter groups; if alf_alt_share_nonlinear_flag takes the first value (e.g., “1”), it indicates that a shared nonlinear clipping index is used for the tap coefficients of all filters of the plurality of filter groups.

[0133] As a specific implementation of S420: When the first flag alf_alt_share_nonlinear_flag takes a first value (e.g., "1"), the electronic device may parse the bitstream to determine a first nonlinear clipping index, exemplarily represented as "alf_alt_shared_nonlinear_idx." Thus, the first nonlinear clipping index "alf_alt_shared_nonlinear_idx" may represent a nonlinear clipping index shared by tap coefficients of all filters in the plurality of filter banks.

[0134] 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.

[0135] Table 4

[0136] Referring to Table 4, the electronic device first parses alf_alt_share_nonlinear_flag (first flag). If the syntax element is a first value (such as "1"), indicating that the tap coefficients of all filters in the multiple filter groups use a shared nonlinear clipping index, it will further parse alf_alt_shared_nonlinear_idx (first nonlinear clipping index) to obtain the nonlinear clipping index shared by the tap coefficients of all filters in the multiple filter groups. In this case, for the multiple filter groups, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on all filter inputs in the multiple filter groups. This can significantly reduce the bit overhead of the nonlinear clipping index, thereby improving the compression efficiency of the video.

[0137] Exemplarily, when a filter bank uses nonlinear clipping and alf_alt_share_nonlinear_flag (first flag) takes the second value (such as “0”), the electronic device needs to parse the corresponding nonlinear clipping index for each tap coefficient.

[0138] Example 3

[0139] Based on the first embodiment, the third embodiment of the present application also provides a decoding method P500. The implementation methods described in the first embodiment can be applied to the third embodiment and can achieve the same technical effect. Figure 5 is a flowchart of a decoding method P500 provided in the embodiment of the present application.

[0140] As a specific implementation of S410, execute S510: parse the code stream and determine a second flag, wherein the second flag is used to indicate whether there is at least one first target filter group among multiple filter groups that support shared use of nonlinear limiting indexes, wherein the tap coefficients of the first target filter group containing at least one filter use a shared nonlinear limiting index.

[0141] In this embodiment, 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 among the multiple filter groups that support the shared use of nonlinear clipping indexes, wherein the tap coefficients of the at least one filter in the first target filter group include the shared nonlinear clipping index. Exemplarily, at the encoding end, whether the first target filter group exists among the multiple filter groups can be determined by the rate-distortion cost RDO. When the encoder determines that the first target filter group exists among the multiple filter groups that support the shared use of nonlinear clipping indexes, the value of the second flag is determined and the second flag and its value are written into the bitstream. Thus, the electronic device for performing the video decoding task can obtain the value of the second flag by parsing the bitstream.

[0142] Exemplarily, the second flag may be represented as "alf_alt_has_filter_share_nonlinear". If alf_alt_has_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the plurality of filter groups supporting the sharing of nonlinear clipping indices do not share nonlinear clipping indices; and if alf_alt_has_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the plurality of filter groups includes the first target filter group.

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

[0144] In S520 , if the value of the second flag is the first value, the bitstream is parsed 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.

[0145] As described above, if the second flag alf_alt_has_filter_share_nonlinear takes the first value (such as "1"), it indicates that there is at least one of the above-mentioned first target filter groups among the above-mentioned multiple (such as N) filter groups. Furthermore, in order to further locate which filter group belongs to the first target filter group, the above-mentioned electronic device needs to determine the third flag corresponding to the i-th (i is an integer ranging from 1 to N) filter group among the above-mentioned N filter groups. The third flag of the i-th filter group is used to indicate whether the i-th filter group is the above-mentioned first target filter group, that is, the tap coefficients of at least one filter in the i-th filter group use a shared nonlinear limiting index.

[0146] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0147] In S530, if the third flag is the first value, the code stream is parsed to determine the fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear clipping index.

[0148] As mentioned above, if the third flag alf_filterset_has_filter_share_nonlinear takes the first value (such as "1"), it means that the current filter group belongs to the above-mentioned first target filter group, that is, the current filter group contains at least one filter tap coefficient that uses a shared nonlinear clipping index. Furthermore, in order to further locate which filter in the first target filter group has its tap coefficients shared using the nonlinear clipping index, it is necessary to determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter group. If the current first target filter group contains M filters, the fourth flag of the j-th filter (j is an integer that takes values ​​from 1 to M in sequence) is used to indicate whether the tap coefficients of the j-th filter share the nonlinear clipping index.

[0149] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0150] In S540, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

[0151] 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 a shared nonlinear clipping index, that is, a filter whose tap coefficients use a shared nonlinear clipping index has been located. Further, the electronic device can parse the bitstream to determine the second nonlinear clipping index, 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.

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

[0153] Table 5

[0154] Referring to Table 5, the electronic device first parses alf_alt_has_filter_share_nonlinear (second flag). If the syntax element is a first value (such as "1"), it indicates that there is at least one first target filter group in the plurality of filter groups. Further, in order to locate which filter group belongs to the first target filter group, the electronic device parses alf_filterset_has_filter_share_nonlinear (third flag). If the syntax element is a first value (such as "1"), it indicates that the current filter group belongs to the first target filter group, that is, the current filter group Contains at least one filter tap coefficient using a shared nonlinear clipping index; in order to further locate which filter in the first target filter group has a tap coefficient that shares a nonlinear clipping index, the electronic device parses alf_filter_share_nonlinear (the fourth flag). If the syntax element is a first value (such as "1"), indicating that the tap coefficient of the current filter uses 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 coefficient of the located filter. In this case, for the multiple tap coefficients of the above-mentioned filter located above, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This can reduce the bit overhead of the nonlinear clipping index, thereby improving the compression efficiency of the video.

[0155] Example 4

[0156] Based on the first embodiment, the fourth embodiment of the present application also provides a decoding method P600. The implementation methods described in the first embodiment can be applied to the fourth embodiment and can achieve the same technical effect. Figure 6 is a flowchart of a decoding method P600 provided in the embodiment of the present application.

[0157] As a specific implementation of S410, S610 is executed: parsing the code stream, determining a third flag, the target flag is used to indicate whether the current filter group is a first target filter group, wherein the first target filter group includes at least one filter whose tap coefficients use a shared nonlinear limiting index.

[0158] In this embodiment, the target flag includes a third flag, which is used to indicate whether the current filter group is a first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the current filter group belongs to the first target filter group can be determined using a rate-distortion cost (RDO). If the encoder determines that the first target filter group exists in the current filter group, it determines the value of the third flag and writes the third flag and its value into the bitstream. Thus, an electronic device used to perform video decoding tasks can obtain the value of the third flag by parsing the bitstream.

[0159] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

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

[0161] In S620, if the third flag is the first value, the code stream is parsed to determine the fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear clipping index.

[0162] As mentioned above, if the third flag alf_filterset_has_filter_share_nonlinear takes the first value (such as "1"), it means that the current filter group belongs to the above-mentioned first target filter group, that is, the current filter group contains at least one filter tap coefficient that uses a shared nonlinear clipping index. Furthermore, in order to further locate which filter in the first target filter group has its tap coefficients shared using the nonlinear clipping index, it is necessary to determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter group. If the current first target filter group contains M filters, the fourth flag of the j-th filter (j is an integer that takes values ​​from 1 to M in sequence) is used to indicate whether the tap coefficients of the j-th filter share the nonlinear clipping index.

[0163] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0164] In S630, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

[0165] 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 a shared nonlinear clipping index, that is, a filter whose tap coefficients use a shared nonlinear clipping index has been located. Further, the electronic device can parse the bitstream to determine the second nonlinear clipping index, 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.

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

[0167] Table 6

[0168] Referring to Table 6, the electronic device first parses alf_filterset_has_filter_share_nonlinear (third flag). If the syntax element is a first value (such as "1"), it indicates that the current filter group belongs to the first target filter group, that is, the current filter group contains at least one filter tap coefficient that uses a shared nonlinear clipping index; in order to further locate which filter in the first target filter group has a tap coefficient that shares a nonlinear clipping index, the electronic device parses alf_filter_share_nonlinear (fourth flag). If the syntax element is a first value (such as "1"), it indicates that the tap coefficient of the current filter uses a shared nonlinear clipping index, and then further parses alf_filter_shared_nonlinear_idx (second nonlinear clipping index) to obtain the nonlinear clipping index shared by the tap coefficient of the located filter. In this case, for the multiple tap coefficients of the located filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This can reduce the bit overhead of the nonlinear clipping index, thereby improving the compression efficiency of the video.

[0169] Example 5

[0170] Based on the first embodiment, the fifth embodiment of the present application also provides a decoding method. The implementation methods described in the first embodiment can be applied to the fifth embodiment and can achieve the same technical effect.

[0171] As a specific implementation of S410: The target flag includes a fourth flag, which is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index. Exemplarily, at the encoder, whether the shared nonlinear clipping index is used for the tap coefficients of the current filter can be determined using a rate-distortion deduction (RDO). If the encoder determines that the tap coefficients of the current filter use a shared nonlinear clipping index, the value of the fourth flag is determined and the fourth flag and its value are written into the bitstream. Thus, the electronic device for performing the video decoding task can obtain the value of the fourth flag by parsing the bitstream.

[0172] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0173] As a specific implementation of S420: When the fourth flag alf_filter_share_nonlinear takes a first value (e.g., "1"), the electronic device may parse the bitstream to determine a second nonlinear clipping index, exemplarily represented as "alf_filter_shared_nonlinear_idx." Thus, the second nonlinear clipping index "alf_filter_shared_nonlinear_idx" may represent a nonlinear clipping index shared by the tap coefficients of the current filter.

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

[0175] Table 7

[0176] Referring to Table 7, the above-mentioned electronic device first parses alf_filter_share_nonlinear (the fourth flag). If the syntax element takes the first value (such as "1"), indicating that the tap coefficient of the current filter uses 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 the filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This can reduce the bit overhead of the nonlinear clipping index, which is beneficial to improving the compression efficiency of the video.

[0177] Example 6

[0178] Based on the first embodiment, the sixth embodiment of the present application also provides a decoding method P700. The implementation methods described in the first embodiment can be applied to the sixth embodiment and can achieve the same technical effect. Figure 7 is a flowchart of a decoding method P700 provided in the embodiment of the present application.

[0179] As a specific implementation of S410, S710 is executed: parsing the code stream, determining a fifth flag, where the fifth flag is used to indicate whether there is at least one second target filter group, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear limiting index.

[0180] In this embodiment, the target flag includes a fifth flag, and the fifth flag is used to indicate whether there is at least one second target filter group among the multiple filter groups that support the shared use of nonlinear clipping indexes, wherein the tap coefficients of the filters in the second target filter group use the shared nonlinear clipping index. Exemplarily, at the encoding end, whether the second target filter group exists among the multiple filter groups can be determined by the rate-distortion cost RDO. When the encoder determines that the second target filter group exists among the multiple filter groups that support the shared use of nonlinear clipping indexes, the value of the fifth flag is determined and the fifth flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the fifth flag by parsing the bitstream.

[0181] Exemplarily, the fifth flag may be represented as "alf_has_filterset_share_nonlinear". If alf_has_filterset_share_nonlinear takes the second value (e.g., "0"), it indicates that the filters in all supported filter groups do not use a shared nonlinear clipping index, and no additional syntax elements related to the shared nonlinear index need to be transmitted; if alf_has_filterset_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the second target filter groups exists in the plurality of filter groups.

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

[0183] In S720 , if the value of the fifth flag is the first value, the bitstream is parsed to determine a sixth flag corresponding to each filter group, where the sixth flag is used to indicate whether the current filter group is the second target filter group.

[0184] As described above, if the fifth flag alf_has_filterset_share_nonlinear takes the first value (such as "1"), it indicates that there is at least one of the above-mentioned second target filter groups in the above-mentioned multiple (such as L) filter groups. Furthermore, in order to further locate which filter group belongs to the second target filter group, it is necessary to determine the sixth flag corresponding to the i-th (i is an integer ranging from 1 to L in sequence) filter group in the above-mentioned L filter groups. The sixth flag of the i-th filter group is used to indicate whether the i-th filter group is the above-mentioned second target filter group, that is, the tap coefficients of the filters in the i-th filter group use a shared nonlinear clipping index.

[0185] 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 indicates that the current filter group does not belong to the second target filter group, that is, not all tap coefficients of filters in the current filter group use shared nonlinear clipping indexes; if alf_filterset_share_nonlinear_flag is the first value (such as "1"), it indicates that the current filter group belongs to the second target filter group, that is, the tap coefficients of the filters in the current filter group use shared nonlinear clipping indexes.

[0186] In S730, if the value of the sixth flag is the first value, a third nonlinear clipping index is obtained, wherein the third nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filters in the second target filter group.

[0187] As described above, if the sixth flag alf_filterset_share_nonlinear_flag takes the first value (such as "1"), it indicates that the tap coefficients of the filters in the current filter group use a shared nonlinear clipping index, that is, a filter whose tap coefficients use a shared nonlinear clipping index has been located. Further, the electronic device can parse the bitstream to determine the third nonlinear clipping index, exemplarily represented as "alf_filterset_shared_nonlinear_idx". Thus, the third nonlinear clipping index "alf_filterset_shared_nonlinear_idx" can represent the nonlinear clipping index shared by the tap coefficients of the located filter.

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

[0189] Table 8

[0190] Referring to Table 8, the above-mentioned electronic device first parses alf_has_filterset_share_nonlinear (fifth flag). If the value of this syntax element is the first value (such as "1"), it indicates that there is at least one of the above-mentioned second target filter groups in the above-mentioned L filter groups, that is, the above-mentioned L filter groups contain at least one filter group in which all tap coefficients use a shared nonlinear clipping index; further, in order to locate which filter group belongs to the second target filter group, the above-mentioned electronic device parses alf_filterset_share_nonlinear_flag (sixth flag). If the value of this syntax element is the first value (such as "1"), it indicates that the current filter group belongs to the above-mentioned second target filter group, that is, the tap coefficients of all filters in the current filter group use a shared nonlinear clipping index; the above-mentioned electronic device will further parse alf_filterset_shared_nonlinear_idx (third nonlinear clipping index) to obtain the nonlinear clipping index shared by the tap coefficients of all filters in the above-mentioned second target filter group. In this case, for the multiple tap coefficients corresponding to all filters in the current filter bank, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping operations on all filter inputs in the filter bank. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0191] Example 7

[0192] Based on the first embodiment, the seventh embodiment of the present application also provides a decoding method. The implementation methods described in the first embodiment can be applied to the seventh embodiment and can achieve the same technical effects.

[0193] As a specific implementation of S410: the above-mentioned target flag includes a sixth flag, and the above-mentioned sixth flag is used to determine whether the current filter group is the second target filter group, wherein the tap coefficients of the filters in the above-mentioned second target filter group use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the tap coefficients of all filters in the current filter group use a shared nonlinear clipping index can be determined by the rate-distortion cost RDO. When the encoder determines that the tap coefficients of all filters in the current filter group use a shared nonlinear clipping index, the value of the sixth flag is determined and the sixth flag and its value are written into the code stream. Thus, the above-mentioned electronic device can obtain the value of the above-mentioned sixth flag by parsing the code stream.

[0194] 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 indicates that the current filter group does not belong to the second target filter group, that is, not all filters in the current filter group use a shared nonlinear clipping index for the tap coefficients; if alf_filterset_share_nonlinear_flag is the first value (such as "1"), it indicates that the current filter group belongs to the second target filter group, that is, all filters in the current filter group use a shared nonlinear clipping index for the tap coefficients.

[0195] As a specific implementation of S420: When the sixth flag alf_filterset_share_nonlinear_flag takes a first value (e.g., "1"), the electronic device may parse the bitstream to determine a third nonlinear clipping index, exemplarily represented as "alf_filterset_shared_nonlinear_idx." Thus, the third nonlinear clipping index "alf_filterset_shared_nonlinear_idx" may represent a nonlinear clipping index shared by tap coefficients of all filters in the current filter group.

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

[0197] Table 9

[0198] With reference to Table 9, the electronic device first parses alf_filterset_share_nonlinear_flag (the sixth flag). If the syntax element is the first value (such as "1"), it indicates that the current filter group belongs to the second target filter group, that is, the tap coefficients of all filters in the current filter group use a shared nonlinear clipping index. The electronic device will further parse alf_filterset_shared_nonlinear_idx (the third nonlinear clipping index) to obtain the nonlinear clipping index shared by the tap coefficients of all filters in the current filter group. In this case, for the multiple tap coefficients corresponding to all filters in the current filter group, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on all filter inputs in the filter group. This can significantly reduce the bit overhead of the nonlinear clipping index, which is beneficial to improving the compression efficiency of the video.

[0199] Example 8

[0200] Based on Example 1, Example 8 of the present application also provides a decoding method P800. The implementation methods described in Example 1 can all be applied to Example 8 and achieve the same technical effects. Figure 8 is a flowchart of a decoding method P800 provided in this embodiment of the present application. Referring to Figure 8, method P800 includes S810-S850.

[0201] As a specific implementation of S410, in S810, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indices use a shared nonlinear clipping index.

[0202] The target flag includes a first flag, which is used to indicate whether the tap coefficients of the filters in the multiple filter groups that support the shared use of nonlinear clipping indexes use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the tap coefficients of all filters in the multiple filter groups that can be supported use a shared nonlinear clipping index can be determined by a rate-distortion cost (RDO). When the encoder determines that the multiple filter groups support the use of a shared nonlinear 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 electronic device can obtain the value of the first flag by parsing the bitstream.

[0203] Exemplarily, the first flag may be represented as “alf_alt_share_nonlinear_flag.” If alf_alt_share_nonlinear_flag takes the second value (e.g., “0”), it indicates that a shared nonlinear clipping index is not used for the tap coefficients of all filters of the plurality of filter groups; if alf_alt_share_nonlinear_flag takes the first value (e.g., “1”), it indicates that a shared nonlinear clipping index is used for the tap coefficients of all filters of the plurality of filter groups.

[0204] As a specific implementation of S420, execute S820-S850.

[0205] In S820, if the value of the first flag is the second value, the code stream is parsed to determine the second flag, and the second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of the first target filter group containing at least one filter use a shared nonlinear limiting index.

[0206] As described above, if the first flag alf_alt_share_nonlinear_flag takes the second value (e.g., "0"), indicating that a shared nonlinear clipping index will not be used for the tap coefficients of all filters of the plurality of filter groups, the electronic device must parse the bitstream to determine whether a first target filter group exists, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear clipping index.

[0207] Exemplarily, the electronic device parses the code stream to determine the value of the second flag. The second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of the first target filter group containing at least one filter use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the first target filter group exists in the multiple filter groups can be determined by the rate-distortion cost RDO. When the encoder determines that the first target filter group exists in the multiple filter groups that support the shared use of the nonlinear clipping index, the value of the second flag is determined and the second flag and its value are written into the code stream. Thus, the electronic device can obtain the value of the second flag by parsing the code stream.

[0208] Exemplarily, the second flag may be represented as "alf_alt_has_filter_share_nonlinear". If alf_alt_has_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the plurality of filter groups supporting the sharing of nonlinear clipping indices do not share nonlinear clipping indices; and if alf_alt_has_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the plurality of filter groups includes the first target filter group.

[0209] In S830 , if the value of the second flag is the first value, the bitstream is parsed 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.

[0210] The specific implementation of S830 is the same as that of S520 and will not be repeated here.

[0211] In S840, if the third flag is the first value, the code stream is parsed to determine the fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear clipping index.

[0212] The specific implementation of S840 is the same as that of S530 and will not be repeated here.

[0213] In S850, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

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

[0215] In the solution provided in Example 8, for the multiple tap coefficients of the located filter, only one shared second nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0216] Embodiment 9

[0217] Based on Example 1, Example 9 of the present application also provides a decoding method P900. The implementation methods described in Example 1 can all be applied to Example 9 and can achieve the same technical effects. Figure 9 is a flowchart of a decoding method P900 provided in an embodiment of the present application. Referring to Figure 9, method P900 includes S910-S940.

[0218] As a specific implementation of S410, in S910, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indices use a shared nonlinear clipping index.

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

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

[0221] In S920, if the value of the first flag is the second value, the code stream is parsed to determine the 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, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0222] If the first flag alf_alt_share_nonlinear_flag takes a second value (e.g., "0"), indicating that a shared nonlinear clipping index is not used for the tap coefficients of all filters of the plurality of filter groups, the electronic device needs to parse the bitstream to determine whether the current filter group belongs to a first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear clipping index.

[0223] Exemplarily, the electronic device parses the bitstream to determine the value of the third flag. The third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter included in the first target filter group use a shared nonlinear limiting index. Exemplarily, at the encoding end, whether the current filter group belongs to the first target filter group can be determined by the rate-distortion cost RDO. When the encoder determines that the first target filter group exists in the current filter group, the value of the third flag is determined and the third flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the third flag by parsing the bitstream.

[0224] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0225] In S930, if the third flag is the first value, the code stream is parsed to determine the fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear clipping index.

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

[0227] In S940, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

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

[0229] In the solution provided in Example 9, for the multiple tap coefficients of the located filter, only one shared second nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0230] Example 10

[0231] Based on Example 1, Example 10 of the present application also provides a decoding method P1000. The implementation methods described in Example 1 can all be applied to Example 10 and achieve the same technical effects. Figure 10 is a schematic flow chart of a decoding method P1000 provided in an embodiment of the present application. Referring to Figure 10, method P1000 includes S1010-S1030.

[0232] As a specific implementation of S410, in S1010, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indexes use a shared nonlinear clipping index.

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

[0234] As a specific implementation of S420, execute S1020-S1030.

[0235] In S1020, if the value of the first flag is the second value, the code stream 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 nonlinear clipping index.

[0236] If the first flag alf_alt_share_nonlinear_flag takes the second value (e.g., "0"), it indicates that the shared nonlinear clipping index will not be used for the tap coefficients of all filters of the plurality of filter banks. The electronic device must parse the bitstream to determine whether the tap coefficients of the current filter use the shared nonlinear clipping index.

[0237] Exemplarily, the electronic device parses the bitstream to determine the value of a fourth flag. The fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index. Exemplarily, at the encoder, whether the shared nonlinear clipping index is used for the tap coefficients of the current filter can be determined using a rate-distortion deduction (RDO). If the encoder determines that the tap coefficients of the current filter use a shared nonlinear clipping index, the value of the fourth flag is determined and the fourth flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the fourth flag by parsing the bitstream.

[0238] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0239] In S1030, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

[0240] When the fourth flag alf_filter_share_nonlinear takes a first value (e.g., "1"), the electronic device may parse the bitstream to determine a second nonlinear clipping index, exemplarily represented as "alf_filter_shared_nonlinear_idx." Thus, the second nonlinear clipping index "alf_filter_shared_nonlinear_idx" may represent a nonlinear clipping index shared by the tap coefficients of the current filter.

[0241] In the solution provided in Example 10, for the multiple tap coefficients of the located filter, only one shared second nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0242] Example 11

[0243] Based on Example 1, this embodiment of the present application also provides a decoding method P1100. The implementation methods described in Example 1 can all be applied to Example 11 and achieve the same technical effects. Figure 11 is a flow chart of a decoding method P1100 provided in this embodiment of the present application. Referring to Figure 11, method P1100 includes S1110-S1140.

[0244] As a specific implementation of S410, in S1110, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indices use a shared nonlinear clipping index.

[0245] The specific implementation of S1110 is the same as that of S810 and will not be repeated here.

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

[0247] In S1120, if the value of the first flag is the second value, the code stream is parsed to determine the fifth flag, and the fifth flag is used to indicate whether there is at least one second target filter group, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear limiting index.

[0248] If the first flag alf_alt_share_nonlinear_flag takes a second value (e.g., "0"), indicating that a shared nonlinear clipping index will not be used for the tap coefficients of all filters in the plurality of filter groups, the electronic device must parse the bitstream to determine whether a second target filter group exists in the plurality of filter groups, and the tap coefficients of the filters in the second target filter group use a shared nonlinear clipping index.

[0249] Exemplarily, the electronic device parses the bitstream to determine the value of the fifth flag. Exemplarily, at the encoder, whether the second target filter group exists among the multiple filter groups can be determined using a rate-distortion deduction (RDO). If the encoder determines that the second target filter group exists among the multiple filter groups that support shared nonlinear clipping indices, the encoder determines the value of the fifth flag and writes the fifth flag and its value into the bitstream. Thus, the electronic device can obtain the value of the fifth flag by parsing the bitstream.

[0250] Exemplarily, the fifth flag may be represented as "alf_has_filterset_share_nonlinear". If alf_has_filterset_share_nonlinear takes the second value (e.g., "0"), it indicates that the filters in all supported filter groups do not use a shared nonlinear clipping index, and no additional syntax elements related to the shared nonlinear index need to be transmitted; if alf_has_filterset_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the second target filter groups exists in the plurality of filter groups.

[0251] In S1130 , if the value of the fifth flag is the first value, the code stream is parsed to determine a sixth flag corresponding to each filter group, where the sixth flag is used to indicate whether the current filter group is the second target filter group.

[0252] The specific implementation of S1130 is the same as that of S720 and will not be repeated here.

[0253] In S1140, if the value of the sixth flag is the first value, a third nonlinear clipping index is obtained, wherein the third nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filters in the second target filter group.

[0254] The specific implementation of S1140 is the same as that of S730 and will not be repeated here.

[0255] In the solution provided in Example 11, for the multiple tap coefficients corresponding to all filters in the current filter bank, only a single shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping operations on all filter inputs in the filter bank. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0256] Example 12

[0257] Based on Example 1, Example 12 of the present application also provides a decoding method P1200. The implementation methods described in Example 1 can all be applied to Example 12 and can achieve the same technical effects. Figure 12 is a flow chart of a decoding method P1200 provided in an embodiment of the present application. Referring to Figure 12, method P1200 is implemented based on method P1100. Method P1200 includes S1110-S1140, and S1210-S1240.

[0258] As a specific implementation of S410, in S1110, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indices use a shared nonlinear clipping index.

[0259] As a specific implementation of S420 , execute S1120 - S1140 and S1210 - S1240 .

[0260] Among them, the specific implementation of S1110-S1140 has been introduced in detail in the above embodiments and will not be repeated here.

[0261] In S1210, if the value of the fifth flag is the second value, it is determined that the second target filter group does not exist in the multiple filter groups, and the second flag is determined by parsing the code stream, and the second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0262] Exemplarily, the fifth flag may be represented as "alf_has_filterset_share_nonlinear." If alf_has_filterset_share_nonlinear takes the second value (e.g., "0"), it indicates that none of the filters in any supported filter set use a shared nonlinear clipping index, i.e., the second target filter set does not exist. The electronic device then analyzes the bitstream to determine whether the first target filter set exists among all supported filter sets.

[0263] Exemplarily, the electronic device parses the code stream to determine the value of the second flag. The second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of the first target filter group containing at least one filter use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the first target filter group exists in the multiple filter groups can be determined by the rate-distortion cost RDO. When the encoder determines that the first target filter group exists in the multiple filter groups that support the shared use of the nonlinear clipping index, the value of the second flag is determined and the second flag and its value are written into the code stream. Thus, the electronic device can obtain the value of the second flag by parsing the code stream.

[0264] Exemplarily, the second flag may be represented as "alf_alt_has_filter_share_nonlinear". If alf_alt_has_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the plurality of filter groups supporting the sharing of nonlinear clipping indices do not share nonlinear clipping indices; and if alf_alt_has_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the plurality of filter groups includes the first target filter group.

[0265] In S1220 , if the value of the second flag is the first value, the bitstream is parsed 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.

[0266] The specific implementation of S1220 is the same as that of S520 and will not be repeated here.

[0267] In S1230, 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 group, where the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index.

[0268] The specific implementation of S1230 is the same as that of S530 and will not be repeated here.

[0269] In S1240, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

[0270] The specific implementation of S1240 is the same as that of S540 and will not be repeated here.

[0271] In the solution provided in Example 12, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping of the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0272] Example 13

[0273] Based on Example 1, Example 13 of the present application also provides a decoding method P1300. The implementation methods described in Example 1 can all be applied to Example 13 and can achieve the same technical effects. Figure 13 is a flow chart of a decoding method P1300 provided in an embodiment of the present application. Referring to Figure 13, method P1300 is implemented based on method P1100. Method P1300 includes S1110-S1140, and S1310-S1330.

[0274] As a specific implementation of S410, in S1110, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indices use a shared nonlinear clipping index.

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

[0276] Among them, the specific implementation of S1110-S1140 has been introduced in detail in the above embodiments and will not be repeated here.

[0277] In S1310, if the value of the fifth flag is the second value, it is determined that the second target filter group does not exist in the multiple filter groups, and the third flag corresponding to each filter group is determined by parsing the code stream. The third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0278] Exemplarily, the fifth flag may be represented as “alf_has_filterset_share_nonlinear.” If alf_has_filterset_share_nonlinear takes the second value (such as “0”), it indicates that the filters in all supported filter sets do not use shared nonlinear clipping indexes, that is, the second target filter set does not exist.

[0279] In order to locate which filter group among all supported filter groups belongs to the first target filter group, the electronic device needs to determine the third flag corresponding to the i-th filter group (i is an integer ranging from 1 to Y) among all supported filter groups (assuming that the number of supported filter groups is Y). The third flag of the i-th filter group is used to indicate whether the i-th filter group is the first target filter group, that is, the tap coefficients of at least one filter in the i-th filter group use a shared nonlinear clipping index.

[0280] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0281] In S1320, if the value of the third flag is the first value, the code stream is parsed to determine the fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear clipping index.

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

[0283] In S1330, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

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

[0285] In the solution provided in Example 13, for each of the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping of the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0286] Example 14

[0287] Based on Example 1, Example 14 of the present application also provides a decoding method P1400. The implementation methods described in Example 1 can all be applied to Example 14 and can achieve the same technical effects. Figure 14 is a flow chart of a decoding method P1400 provided in an embodiment of the present application. Referring to Figure 14, method P1400 is implemented based on method P1100. Method P1400 includes S1110-S1140, and S1410-S1420.

[0288] As a specific implementation of S410, in S1110, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indices use a shared nonlinear clipping index.

[0289] As a specific implementation of S420 , execute S1120 - S1140 and S1410 - S1420 .

[0290] Among them, the specific implementation of S1110-S1140 has been introduced in detail in the above embodiments and will not be repeated here.

[0291] In S1410, if the value of the fifth flag is the second value, it is determined that the second target filter group does not exist in the multiple filter groups, and the fourth flag corresponding to each filter is determined by parsing the code stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0292] Exemplarily, the fifth flag may be represented as “alf_has_filterset_share_nonlinear.” If alf_has_filterset_share_nonlinear takes the second value (such as “0”), it indicates that the filters in all supported filter sets do not use shared nonlinear clipping indexes, that is, the second target filter set does not exist.

[0293] In order to locate which filter's tap coefficients share the nonlinear clipping index from all supported filter banks, it is necessary to determine the value of the fourth flag corresponding to each filter in all supported filter banks. If all supported filter banks contain X filters, the fourth flag of the jth filter (j is an integer ranging from 1 to X) is used to indicate whether the tap coefficients of the jth filter share the nonlinear clipping index.

[0294] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0295] In S1420, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

[0296] The specific implementation of S1420 is the same as that of S540 and will not be repeated here.

[0297] In the solution provided in Example 14, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping of the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0298] Example 15

[0299] Based on Example 1, Example 15 of the present application also provides a decoding method P1500. The implementation methods described in Example 1 can all be applied to Example 15 and can achieve the same technical effects. Figure 15 is a flow chart of a decoding method P1500 provided in an embodiment of the present application. Referring to Figure 15, method P1500 is implemented based on method P1100. Method P1500 includes S1110-S1140, and S1510-S1530.

[0300] As a specific implementation of S410, in S1110, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indices use a shared nonlinear clipping index.

[0301] As a specific implementation of S420 , S1120 - S1140 and S1510 - S1530 are executed.

[0302] Among them, the specific implementation of S1110-S1140 has been introduced in detail in the above embodiments and will not be repeated here.

[0303] In S1510, 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 third flag corresponding to each filter group is determined by parsing the code stream. The third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0304] Exemplarily, the sixth flag may be represented as “alf_filterset_share_nonlinear_flag.” If alf_filterset_share_nonlinear_flag is the second value (eg, “0”), it indicates that the current filter set does not belong to the second target filter set, i.e., not all filters in the current filter set have tap coefficients that use a shared nonlinear clipping index.

[0305] To determine whether the current filter group belongs to the first target filter group, the electronic device decodes to determine a third flag corresponding to the current filter group, wherein the third flag of the current filter group is used to indicate whether the current filter group is the first target filter group, that is, the tap coefficients of at least one filter in the current filter group use a shared nonlinear clipping index.

[0306] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0307] In S1520, if the third flag is the first value, the code stream is parsed to determine the fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear clipping index.

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

[0309] In S1530, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

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

[0311] In the solution provided in Example 15, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping of the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0312] Example 16

[0313] Based on Example 1, Example 16 of the present application also provides a decoding method P1600. The implementation methods described in Example 1 can all be applied to Example 16 and can achieve the same technical effects. Figure 16 is a flow chart of a decoding method P1600 provided in an embodiment of the present application. Referring to Figure 16, method P1600 is implemented based on method P1100. Method P1600 includes S1110-S1140, and S1610-S1620.

[0314] As a specific implementation of S410, in S1110, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indices use a shared nonlinear clipping index.

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

[0316] Among them, the specific implementation of S1110-S1140 has been introduced in detail in the above embodiments and will not be repeated here.

[0317] In S1610, 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 fourth flag corresponding to each filter is determined by parsing the code stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0318] Exemplarily, the sixth flag may be represented as “alf_filterset_share_nonlinear_flag.” If alf_filterset_share_nonlinear_flag is the second value (eg, “0”), it indicates that the current filter set does not belong to the second target filter set, i.e., not all filters in the current filter set have tap coefficients that use a shared nonlinear clipping index.

[0319] In order to locate which filter in the current filter bank has tap coefficients that share the nonlinear clipping index, the value of the fourth flag corresponding to each filter in the current filter bank is determined. If the current filter bank contains Z filters, the fourth flag of the j-th filter (j is an integer ranging from 1 to Z) is used to indicate whether the tap coefficients of the j-th filter share the nonlinear clipping index.

[0320] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0321] In S1620, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

[0322] The specific implementation of S1620 is the same as that of S540 and will not be repeated here.

[0323] In the solution provided in Example 16, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0324] Example 17

[0325] Based on Example 1, Example 17 of the present application also provides a decoding method P700. The implementation methods described in Example 1 can all be applied to Example 17 and achieve the same technical effects. Figure 17 is a flowchart of a decoding method P1700 provided in an embodiment of the present application. Referring to Figure 17, method P1700 includes S1710-S1730.

[0326] As a specific implementation of S410, in S1710, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indexes use a shared nonlinear clipping index.

[0327] The specific implementation of S1710 is the same as that of S810 and will not be repeated here.

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

[0329] In S1720, if the value of the first flag is the second value, the code stream is parsed to determine the sixth flag corresponding to each filter group, and the sixth flag is used to indicate whether the current filter group is the second target filter group, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear limiting index.

[0330] If the first flag alf_alt_share_nonlinear_flag takes a second value (e.g., "0"), indicating that a shared nonlinear clipping index is not used for the tap coefficients of all filters of the supported multiple filter groups, the electronic device needs to parse the bitstream to determine whether a second target filter group exists, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear clipping index.

[0331] In order to further locate which filter group belongs to the second target filter group, the electronic device parses the code stream to determine the value of the sixth flag corresponding to each filter group. Exemplarily, the sixth flag can be expressed as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is a second value (such as "0"), it means that the current filter group does not belong to the second target filter group, that is, not all filters in the current filter group use a shared nonlinear clipping index for the tap coefficients; if alf_filterset_share_nonlinear_flag is a first value (such as "1"), it means that the current filter group belongs to the second target filter group, that is, the tap coefficients of all filters in the current filter group use a shared nonlinear clipping index.

[0332] In S1730, if the value of the sixth flag is the first value, a third nonlinear clipping index is obtained, wherein the third nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filters in the second target filter group.

[0333] The specific implementation of S1730 is the same as that of S730 and will not be repeated here.

[0334] In the solution provided in Example 17, for the multiple tap coefficients corresponding to all filters in the current filter bank, only a single shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping operations on all filter inputs in the filter bank. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0335] Example 18

[0336] Based on Example 1, Example 18 of the present application also provides a decoding method P1800. The implementation methods described in Example 1 can all be applied to Example 18 and can achieve the same technical effects. Figure 18 is a flow chart of a decoding method P1800 provided in an embodiment of the present application. Referring to Figure 18, method P1800 is implemented based on method P1700. Method P1800 includes S1710-S1730, and S1810-S1830.

[0337] As a specific implementation of S410, in S1710, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indexes use a shared nonlinear clipping index.

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

[0339] Among them, the specific implementation of S1710-S1730 has been introduced in detail in the above embodiments and will not be repeated here.

[0340] In S1810, 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 third flag corresponding to each filter group is determined by parsing the code stream. The third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0341] Exemplarily, the sixth flag may be represented as “alf_filterset_share_nonlinear_flag.” If alf_filterset_share_nonlinear_flag is the second value (eg, “0”), it indicates that the current filter set does not belong to the second target filter set, i.e., not all filters in the current filter set have tap coefficients that use a shared nonlinear clipping index.

[0342] To determine whether the current filter group belongs to the first target filter group, the electronic device decodes to determine a third flag corresponding to the current filter group, wherein the third flag of the current filter group is used to indicate whether the current filter group is the first target filter group, that is, the tap coefficients of at least one filter in the current filter group use a shared nonlinear clipping index.

[0343] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0344] In S1820, if the value of the third flag is the first value, the code stream is parsed to determine the fourth flag corresponding to each filter in the first target filter group, where the fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear clipping index.

[0345] The specific implementation of S1820 is the same as that of S530 and will not be repeated here.

[0346] In S1830, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

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

[0348] In the solution provided in Example 18, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping of the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0349] Example 19

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

[0351] As a specific implementation of S410, in S1710, the code stream is parsed to determine a first flag, which is used to indicate whether the tap coefficients of filters in multiple filter groups supporting shared nonlinear clipping indexes use a shared nonlinear clipping index.

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

[0353] In S1910, 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 fourth flag corresponding to each filter is determined by parsing the code stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0354] Exemplarily, the sixth flag may be represented as “alf_filterset_share_nonlinear_flag.” If alf_filterset_share_nonlinear_flag is the second value (eg, “0”), it indicates that the current filter set does not belong to the second target filter set, i.e., not all filters in the current filter set have tap coefficients that use a shared nonlinear clipping index.

[0355] In order to locate which filter in the current filter bank has tap coefficients that share the nonlinear clipping index, the value of the fourth flag corresponding to each filter in the current filter bank is determined. If the current filter bank contains Z filters, the fourth flag of the j-th filter (j is an integer ranging from 1 to Z) is used to indicate whether the tap coefficients of the j-th filter share the nonlinear clipping index.

[0356] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0357] In S1920, if the value of the fourth flag is the first value, a second nonlinear clipping index is obtained, wherein the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filter.

[0358] The specific implementation of S1920 is the same as that of S540 and will not be repeated here.

[0359] In the solution provided in Example 19, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping of the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0360] The above describes in detail an embodiment of the decoding method of the present application in conjunction with Figures 4 to 19. The following describes an embodiment of the video encoding method of the present application in conjunction with Figures 20 to 35.

[0361] Example 20

[0362] FIG20 is a flow chart of an encoding method P2000 provided in an embodiment of the present application. The encoding method P2000 is performed by an electronic device. Specifically, the electronic device can be used to perform video encoding tasks and can be exemplarily referred to as an encoder, encoding device, etc. Referring to FIG20 , the method P2000 includes:

[0363] S2010: The electronic device determines a value of a target flag, where the target flag is used to indicate whether tap coefficients of at least one filter use a shared nonlinear clipping index.

[0364] Exemplarily, the encoder may determine whether the tap coefficients of the filter use a shared nonlinear clipping index based on the rate-distortion cost. If there is at least one filter whose tap coefficients use a shared nonlinear clipping index, the value of the target flag is determined to be a first value (such as "1"); if there is no filter whose tap coefficients use a shared nonlinear clipping index, the value of the target flag is determined to be not the first value, for example, a second value (such as "0").

[0365] S2020: The electronic device writes the target flag and its value into the code stream.

[0366] S2030: If the target flag is a first value, the electronic device writes a target nonlinear clipping index into the bitstream, where the target nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the at least one filter.

[0367] When the target flag takes the first value, the encoder writes the target nonlinear clipping index into the bitstream, so that the electronic device can parse the bitstream to obtain the target nonlinear clipping index, and the target nonlinear clipping index is used as a nonlinear clipping index shared by the tap coefficients of the at least one filter.

[0368] Exemplarily, there is a preset mapping relationship between different nonlinear clipping indices and different nonlinear clipping intervals. For example, four clipping indices [0, 1, 2, 3] similar to VTM or ECM can be used, and the absolute values ​​of the clipping intervals associated with these indexes are [1024, 128, 32, 8]. To improve the level of refinement, the number of clipping indices can be increased according to actual needs. For example, using eight clipping indices [0, 1, 2, 3, 4, 5, 6, 7], the absolute values ​​of the clipping intervals associated with these indexes can be [1024, 256, 128, 64, 32, 16, 8, 4].

[0369] Exemplarily, the encoder writes the target clipping index and its corresponding target clipping interval into the bitstream. Thus, after the electronic device parses the bitstream to determine the target nonlinear clipping index, it obtains the target nonlinear clipping interval that has a mapping relationship with the target nonlinear clipping index, and performs a nonlinear clipping operation on the input of the at least one filter using the target nonlinear clipping interval. This limits the difference between the ALF input and the current pixel through clipping. This enables the ALF to simultaneously consider the spatial similarity and sample similarity between adjacent pixels and the current pixel to be processed. This shows that the embodiment of the present application provides an enhanced ALF nonlinear clipping method that can improve the performance of ALF nonlinear clipping.

[0370] Exemplarily, the above-mentioned nonlinear limiting index and the corresponding limiting interval can also be transmitted in HLS (SPS (Sequence Parameter Set, sequence parameter set), PPS (Picture Parameter Set, image parameter set), VPS (Video Parameter Set, video parameter set), APS, PictureHeader or SliceHeader, etc.).

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

[0372] In the solution provided by method P2000 of the present application, the encoder determines the value of the target flag and writes it into the bitstream. 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 nonlinear 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 nonlinear clipping index. Furthermore, when the target flag is the first value, the encoder writes the target nonlinear clipping index into the bitstream, wherein the target nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the at least one filter. In the embodiment of the present application, the nonlinear clipping indexes corresponding to the multiple tap coefficients of the at least one filter can be represented by a target nonlinear clipping index. For the same number of tap coefficients, the number of nonlinear clipping indices can be reduced, thereby effectively reducing the bit overhead of the nonlinear clipping index, which is beneficial to improving the compression efficiency of the video. At the same time, the embodiment of the present application provides an enhanced ALF nonlinear clipping method that can improve the performance of ALF nonlinear clipping.

[0373] Example 21

[0374] Based on the embodiment 20, the embodiment 21 of the present application also provides an encoding method. The implementation methods described in the embodiment 20 can be applied to the embodiment 21 and can achieve the same technical effects.

[0375] In an embodiment of the present application, the target flag includes a first flag, which is used to indicate whether the tap coefficients of all filters in a plurality of filter groups that support the shared use of nonlinear clipping indexes use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the tap coefficients of all filters in the plurality of filter groups that can be supported use a shared nonlinear clipping index can be determined by a rate-distortion cost RDO. When the encoder determines that the plurality of filter groups support the use of a shared nonlinear 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 electronic device can obtain the value of the first flag by parsing the bitstream.

[0376] Exemplarily, the first flag may be represented as “alf_alt_share_nonlinear_flag.” If alf_alt_share_nonlinear_flag takes the second value (e.g., “0”), it indicates that a shared nonlinear clipping index is not used for the tap coefficients of all filters of the plurality of filter groups; if alf_alt_share_nonlinear_flag takes the first value (e.g., “1”), it indicates that a shared nonlinear clipping index is used for the tap coefficients of all filters of the plurality of filter groups.

[0377] When the first flag alf_alt_share_nonlinear_flag takes a first value (e.g., "1"), the electronic device may parse the bitstream to determine a first nonlinear clipping index, exemplarily represented as "alf_alt_shared_nonlinear_idx." Thus, the first nonlinear clipping index "alf_alt_shared_nonlinear_idx" may represent a nonlinear clipping index shared by the tap coefficients of all filters in the plurality of filter banks.

[0378] 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.

[0379] In the solution provided in Example 21, for the aforementioned multiple filter banks, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping operations on all filter inputs in the multiple filter banks. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0380] Example 22

[0381] Based on Example 20, Example 22 of the present application also provides an encoding method P2100. The implementation methods described in Example 20 can all be applied to Example 22 and achieve the same technical effects. Figure 21 is a flow chart of an encoding method P2100 provided in an embodiment of the present application.

[0382] In S2110, the value of the second flag is determined, and the second flag and its value are written into the code stream, wherein the second flag is used to indicate whether there is at least one first target filter group among multiple filter groups that support shared use of nonlinear limiting indexes, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0383] In this embodiment, 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 among the multiple filter groups that support the shared use of nonlinear clipping indexes, wherein the tap coefficients of the at least one filter included in the first target filter group use the shared nonlinear clipping index. Exemplarily, at the encoding end, whether the first target filter group exists among the multiple filter groups can be determined by the rate-distortion cost RDO. When the encoder determines that the first target filter group exists among the multiple filter groups that support the shared use of nonlinear clipping indexes, the value of the second flag is determined and the second flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the second flag by parsing the bitstream.

[0384] Exemplarily, the second flag may be represented as "alf_alt_has_filter_share_nonlinear". If alf_alt_has_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the plurality of filter groups supporting the sharing of nonlinear clipping indices do not share nonlinear clipping indices; and if alf_alt_has_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the plurality of filter groups includes the first target filter group.

[0385] In S2120, if the value of the second flag is the first value, the value of the third flag corresponding to each filter group 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 group is the first target filter group.

[0386] As described above, if the second flag alf_alt_has_filter_share_nonlinear takes the first value (such as "1"), it indicates that there is at least one of the above-mentioned first target filter groups among the above-mentioned multiple (such as N) filter groups. Furthermore, in order to further locate which filter group belongs to the first target filter group, the above-mentioned electronic device needs to determine the third flag corresponding to the i-th (i is an integer ranging from 1 to N) filter group among the above-mentioned N filter groups. The third flag of the i-th filter group is used to indicate whether the i-th filter group is the above-mentioned first target filter group, that is, the tap coefficients of at least one filter in the i-th filter group use a shared nonlinear limiting index.

[0387] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0388] In S2130, if the value of the third flag is the first value, the value of the fourth flag corresponding to each filter in the first target filter group is determined, and the fourth flag and its value are written into the bit stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0389] As mentioned above, if the third flag alf_filterset_has_filter_share_nonlinear takes the first value (such as "1"), it means that the current filter group belongs to the above-mentioned first target filter group, that is, the current filter group contains at least one filter tap coefficient that uses a shared nonlinear clipping index. Furthermore, in order to further locate which filter in the first target filter group has its tap coefficients shared using the nonlinear clipping index, it is necessary to determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter group. If the current first target filter group contains M filters, the fourth flag of the j-th filter (j is an integer that takes values ​​from 1 to M in sequence) is used to indicate whether the tap coefficients of the j-th filter share the nonlinear clipping index.

[0390] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0391] 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.

[0392] 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 a shared nonlinear clipping index, that is, a filter whose tap coefficients use a shared nonlinear clipping index has been located. Further, the electronic device can parse the bitstream to determine the second nonlinear clipping index, 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.

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

[0394] 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. This reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0395] Example 23

[0396] Based on Example 20, Example 23 of the present application also provides an encoding method P2200. The implementation methods described in Example 20 can all be applied to Example 23 and can achieve the same technical effects. Figure 22 is a flow chart of an encoding method P2200 provided in an embodiment of the present application.

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

[0398] In this embodiment, the target flag includes a third flag, which is used to indicate whether the current filter group is a first target filter group, wherein the tap coefficients of at least one filter included in the first target filter group use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the current filter group belongs to the first target filter group can be determined by a rate-distortion cost (RDO). When the encoder determines that the first target filter group exists in the current filter group, the value of the third flag is determined and the third flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the third flag by parsing the bitstream.

[0399] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0400] In S2220, if the value of the third flag is the first value, the value of the fourth flag corresponding to each filter in the first target filter group is determined, and the fourth flag and its value are written into the bit stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0401] As mentioned above, if the third flag alf_filterset_has_filter_share_nonlinear takes the first value (such as "1"), it means that the current filter group belongs to the above-mentioned first target filter group, that is, the current filter group contains at least one filter tap coefficient that uses a shared nonlinear clipping index. Furthermore, in order to further locate which filter in the first target filter group has its tap coefficients shared using the nonlinear clipping index, it is necessary to determine the value of the fourth flag corresponding to each filter in the above-mentioned first target filter group. If the current first target filter group contains M filters, the fourth flag of the j-th filter (j is an integer that takes values ​​from 1 to M in sequence) is used to indicate whether the tap coefficients of the j-th filter share the nonlinear clipping index.

[0402] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0403] In S2230, 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.

[0404] 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 a shared nonlinear clipping index, that is, a filter whose tap coefficients use a shared nonlinear clipping index has been located. Further, the electronic device can parse the bitstream to determine the second nonlinear clipping index, 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.

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

[0406] In the solution provided in Example 23, 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. This reduces the bit overhead of the nonlinear clipping index and further improves video compression efficiency.

[0407] Example 24

[0408] Based on the embodiment 20, the embodiment 24 of the present application also provides an encoding method. The implementation methods described in the embodiment 20 can be applied to the embodiment 24 and can achieve the same technical effects.

[0409] The target flag includes a fourth flag, which is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index. Exemplarily, at the encoder, whether the shared nonlinear clipping index is used for the tap coefficients of the current filter can be determined using a rate-distortion deduction (RDO). If the encoder determines that the tap coefficients of the current filter use a shared nonlinear clipping index, the value of the fourth flag is determined and the fourth flag and its value are written into the bitstream. The electronic device can then obtain the value of the fourth flag by parsing the bitstream.

[0410] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0411] When the fourth flag alf_filter_share_nonlinear takes a first value (e.g., "1"), the electronic device may parse the bitstream to determine a second nonlinear clipping index, exemplarily represented as "alf_filter_shared_nonlinear_idx." Thus, the second nonlinear clipping index "alf_filter_shared_nonlinear_idx" may represent a nonlinear clipping index shared by the tap coefficients of the current filter.

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

[0413] In the solution provided in Example 24, for multiple tap coefficients of the filter, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping of the filter input. This reduces the bit overhead of the nonlinear clipping index and further improves video compression efficiency.

[0414] Example 25

[0415] Based on Example 20, Example 25 of the present application also provides an encoding method P2300. The implementation methods described in Example 20 can all be applied to Example 25 and can achieve the same technical effects. Figure 23 is a flow chart of an encoding method P2300 provided in an embodiment of the present application.

[0416] In S2310, the value of the fifth flag is determined, and the fifth flag and its value are written into the code stream, where the fifth flag is used to indicate whether there is at least one second target filter group, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear limiting index.

[0417] In this embodiment, the target flag includes a fifth flag, and the fifth flag is used to indicate whether there is at least one second target filter group among the multiple filter groups that support the shared use of nonlinear clipping indexes, wherein the tap coefficients of the filters in the second target filter group use the shared nonlinear clipping index. Exemplarily, at the encoding end, whether the second target filter group exists among the multiple filter groups can be determined by the rate-distortion cost RDO. When the encoder determines that the second target filter group exists among the multiple filter groups that support the shared use of nonlinear clipping indexes, the value of the fifth flag is determined and the fifth flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the fifth flag by parsing the bitstream.

[0418] Exemplarily, the fifth flag may be represented as "alf_has_filterset_share_nonlinear". If alf_has_filterset_share_nonlinear takes the second value (e.g., "0"), it indicates that the filters in all supported filter groups do not use a shared nonlinear clipping index, and no additional syntax elements related to the shared nonlinear index need to be transmitted; if alf_has_filterset_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the second target filter groups exists in the plurality of filter groups.

[0419] In S2320, if the value of the fifth flag is the first value, the value of the sixth flag corresponding to each filter group is determined, and the sixth flag and its value are written into the bitstream. The sixth flag is used to indicate whether the current filter group is the second target filter group.

[0420] As described above, if the fifth flag alf_has_filterset_share_nonlinear takes the first value (such as "1"), it indicates that there is at least one of the above-mentioned second target filter groups in the above-mentioned multiple (such as L) filter groups. Furthermore, in order to further locate which filter group belongs to the second target filter group, it is necessary to determine the sixth flag corresponding to the i-th (i is an integer ranging from 1 to L in sequence) filter group in the above-mentioned L filter groups. The sixth flag of the i-th filter group is used to indicate whether the i-th filter group is the above-mentioned second target filter group, that is, the tap coefficients of all filters in the i-th filter group use a shared nonlinear clipping index.

[0421] 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 indicates that the current filter group does not belong to the second target filter group, that is, not all filters in the current filter group use a shared nonlinear clipping index for the tap coefficients; if alf_filterset_share_nonlinear_flag is the first value (such as "1"), it indicates that the current filter group belongs to the second target filter group, that is, all filters in the current filter group use a shared nonlinear clipping index for the tap coefficients.

[0422] In S2330, if the value of the sixth flag is the first value, a third nonlinear clipping index is written into the bitstream, wherein the third nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filters in the second target filter group.

[0423] 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 group use a shared nonlinear clipping index, that is, the filter whose tap coefficients use a shared nonlinear clipping index has been located. Further, the above-mentioned electronic device can determine the third nonlinear clipping index by parsing the code stream, exemplarily expressed as "alf_filterset_shared_nonlinear_idx". Thus, the above-mentioned third nonlinear clipping index "alf_filterset_shared_nonlinear_idx" can represent the nonlinear clipping index shared by the tap coefficients of the located filter.

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

[0425] In the solution provided in Example 25, for the multiple tap coefficients corresponding to all filters in the current filter bank, only a single shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping operations on all filter inputs in the filter bank. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0426] Example 26

[0427] Based on the embodiment 20, the embodiment 26 of the present application also provides an encoding method. The implementation methods described in the embodiment 20 can be applied to the embodiment 26 and can achieve the same technical effects.

[0428] The target flag includes a sixth flag, which is used to determine whether the current filter group is the second target filter group, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the tap coefficients of all filters in the current filter group use a shared nonlinear clipping index can be determined by a rate-distortion cost RDO. When the encoder determines that the tap coefficients of all filters in the current filter group use a shared nonlinear clipping index, the value of the sixth flag is determined and the sixth flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the sixth flag by parsing the bitstream.

[0429] 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 indicates that the current filter group does not belong to the second target filter group, that is, not all filters in the current filter group use a shared nonlinear clipping index for the tap coefficients; if alf_filterset_share_nonlinear_flag is the first value (such as "1"), it indicates that the current filter group belongs to the second target filter group, that is, all filters in the current filter group use a shared nonlinear clipping index for the tap coefficients.

[0430] When the sixth flag alf_filterset_share_nonlinear_flag takes a first value (e.g., "1"), the electronic device may parse the bitstream to determine a third nonlinear clipping index, exemplarily represented as "alf_filterset_shared_nonlinear_idx." Thus, the third nonlinear clipping index "alf_filterset_shared_nonlinear_idx" may represent a nonlinear clipping index shared by the tap coefficients of all filters in the current filter group.

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

[0432] In the solution provided in Example 26, for the multiple tap coefficients corresponding to all filters in the current filter bank, only one shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping operations on all filter inputs in the filter bank. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0433] Example 27

[0434] Based on Example 20, Example 27 of the present application also provides an encoding method P2400. The implementation methods described in Example 20 can all be applied to Example 27 and achieve the same technical effects. Figure 24 is a flow chart of an encoding method P2400 provided in an embodiment of the present application.

[0435] In S2410, the value of the first flag is determined, and the first flag and its value are written into the code stream. The first flag is used to indicate whether the tap coefficients of all filters in multiple filter groups that support shared use of nonlinear clipping indexes use shared nonlinear clipping indexes.

[0436] The target flag includes a first flag, which is used to indicate whether the tap coefficients of all filters in a plurality of filter groups that support the shared use of nonlinear clipping indices use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the tap coefficients of all filters in the plurality of filter groups that can be supported use a shared nonlinear clipping index can be determined by a rate-distortion cost (RDO). When the encoder determines that the plurality of filter groups support the use of a shared nonlinear 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 electronic device can obtain the value of the first flag by parsing the bitstream.

[0437] Exemplarily, the first flag may be represented as “alf_alt_share_nonlinear_flag.” If alf_alt_share_nonlinear_flag takes the second value (e.g., “0”), it indicates that a shared nonlinear clipping index is not used for the tap coefficients of all filters of the plurality of filter groups; if alf_alt_share_nonlinear_flag takes the first value (e.g., “1”), it indicates that a shared nonlinear clipping index is used for the tap coefficients of all filters of the plurality of filter groups.

[0438] In S2420, if the value of the first flag is the second value, the value of the second flag is determined, and the second flag and its value are written into the bitstream, and the second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of the first target filter group containing at least one filter use a shared nonlinear limiting index.

[0439] As described above, if the first flag alf_alt_share_nonlinear_flag takes the second value (e.g., "0"), indicating that a shared nonlinear clipping index will not be used for the tap coefficients of all filters of the plurality of filter groups, the electronic device must parse the bitstream to determine whether a first target filter group exists, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear clipping index.

[0440] Exemplarily, the electronic device parses the code stream to determine the value of the second flag. The second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of the first target filter group containing at least one filter use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the first target filter group exists in the multiple filter groups can be determined by the rate-distortion cost RDO. When the encoder determines that the first target filter group exists in the multiple filter groups that support the shared use of the nonlinear clipping index, the value of the second flag is determined and the second flag and its value are written into the code stream. Thus, the electronic device can obtain the value of the second flag by parsing the code stream.

[0441] Exemplarily, the second flag may be represented as "alf_alt_has_filter_share_nonlinear". If alf_alt_has_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the plurality of filter groups supporting the sharing of nonlinear clipping indices do not share nonlinear clipping indices; and if alf_alt_has_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the plurality of filter groups includes the first target filter group.

[0442] In S2430, if the value of the second flag is the first value, the value of the third flag corresponding to each filter group 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 group is the first target filter group.

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

[0444] In S2440, if the value of the third flag is the first value, the value of the fourth flag corresponding to each filter in the first target filter group is determined, and the fourth flag and its value are written into the bit stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0445] The specific implementation of S2440 is the same as that of S2130 and will not be repeated here.

[0446] In S2450, 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.

[0447] The specific implementation of S2450 is the same as that of S2140 and will not be repeated here.

[0448] In the solution provided in Example 27, for the multiple tap coefficients of the located filter, only one shared second nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0449] Example 28

[0450] Based on Example 20, Example 28 of the present application also provides an encoding method P2500. The implementation methods described in Example 20 can all be applied to Example 28 and can achieve the same technical effects. Figure 25 is a flow chart of an encoding method P2500 provided in an embodiment of the present application.

[0451] In S2510, the value of the first flag is determined, and the first flag and its value are written into the code stream. The first flag is used to indicate whether the tap coefficients of the filters in the multiple filter groups that support the shared use of the nonlinear clipping index use the shared nonlinear clipping index.

[0452] The specific implementation of S2510 is the same as that of S2410 and will not be repeated here.

[0453] In S2520, if the value of the first flag is the second value, the value of the third flag corresponding to each filter group is determined, and the third flag and its value are written into the code stream. The third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of the first target filter group include at least one filter using a shared nonlinear limiting index.

[0454] If the first flag alf_alt_share_nonlinear_flag takes a second value (e.g., "0"), indicating that a shared nonlinear clipping index is not used for the tap coefficients of all filters of the plurality of filter groups, the electronic device needs to parse the bitstream to determine whether the current filter group belongs to a first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear clipping index.

[0455] Exemplarily, the electronic device parses the bitstream to determine the value of the third flag. The third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter included in the first target filter group use a shared nonlinear limiting index. Exemplarily, at the encoding end, whether the current filter group belongs to the first target filter group can be determined by the rate-distortion cost RDO. When the encoder determines that the first target filter group exists in the current filter group, the value of the third flag is determined and the third flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the third flag by parsing the bitstream.

[0456] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0457] In S2530, if the value of the third flag is the first value, the value of the fourth flag corresponding to each filter in the first target filter group is determined, and the fourth flag and its value are written into the bit stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

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

[0459] In S2540, 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.

[0460] The specific implementation of S2540 is the same as that of S2140 and will not be repeated here.

[0461] In the solution provided in Example 28, for the multiple tap coefficients of the located filter, only one shared second nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0462] Example 29

[0463] Based on Example 20, Example 29 of the present application also provides an encoding method P2600. The implementation methods described in Example 20 can all be applied to Example 29 and can achieve the same technical effects. Figure 26 is a flow chart of an encoding method P2600 provided in an embodiment of the present application.

[0464] In S2610, the value of the first flag is determined and the first flag and its value are written into the code stream. The first flag is used to indicate whether the tap coefficients of the filters in the plurality of filter groups supporting the shared use of the nonlinear clipping index use the shared nonlinear clipping index.

[0465] The specific implementation of S2610 is the same as that of S2410 and will not be repeated here.

[0466] In S2620, if the value of the first flag is the second value, the value of the fourth flag corresponding to each filter is determined, and the fourth flag and its value are written into the code stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0467] If the first flag alf_alt_share_nonlinear_flag takes the second value (e.g., "0"), it indicates that the shared nonlinear clipping index will not be used for the tap coefficients of all filters of the plurality of filter banks. The electronic device must parse the bitstream to determine whether the tap coefficients of the current filter use the shared nonlinear clipping index.

[0468] Exemplarily, the electronic device parses the bitstream to determine the value of a fourth flag. The fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index. Exemplarily, at the encoder, whether the shared nonlinear clipping index is used for the tap coefficients of the current filter can be determined using a rate-distortion deduction (RDO). If the encoder determines that the tap coefficients of the current filter use a shared nonlinear clipping index, the value of the fourth flag is determined and the fourth flag and its value are written into the bitstream. Thus, the electronic device can obtain the value of the fourth flag by parsing the bitstream.

[0469] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0470] In S2630, 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.

[0471] When the fourth flag alf_filter_share_nonlinear takes a first value (e.g., "1"), the electronic device may parse the bitstream to determine a second nonlinear clipping index, exemplarily represented as "alf_filter_shared_nonlinear_idx." Thus, the second nonlinear clipping index "alf_filter_shared_nonlinear_idx" may represent a nonlinear clipping index shared by the tap coefficients of the current filter.

[0472] In the solution provided in Example 29, for the multiple tap coefficients of the located filter, only one shared second nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0473] Example 30

[0474] Based on Example 20, Example 30 of the present application also provides an encoding method P2700. The implementation methods described in Example 20 can all be applied to Example 30 and achieve the same technical effects. Figure 27 is a flow chart of an encoding method P2700 provided in an embodiment of the present application.

[0475] In S2710, the value of the first flag is determined, and the first flag and its value are written into the code stream. The first flag is used to indicate whether the tap coefficients of the filters in the multiple filter groups that support the shared use of the nonlinear clipping index use the shared nonlinear clipping index.

[0476] The specific implementation of S2710 is the same as that of S2410 and will not be repeated here.

[0477] In S2720, if the value of the first flag is the second value, the value of the fifth flag is determined, and the fifth flag and its value are written into the code stream, and the fifth flag is used to indicate whether there is at least one second target filter group, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear limiting index.

[0478] If the first flag alf_alt_share_nonlinear_flag takes a second value (e.g., "0"), indicating that a shared nonlinear clipping index will not be used for the tap coefficients of all filters in the plurality of filter groups, the electronic device must parse the bitstream to determine whether a second target filter group exists in the plurality of filter groups, and the tap coefficients of the filters in the second target filter group use a shared nonlinear clipping index.

[0479] Exemplarily, the electronic device parses the bitstream to determine the value of the fifth flag. Exemplarily, at the encoder, whether the second target filter group exists among the multiple filter groups can be determined using a rate-distortion deduction (RDO). If the encoder determines that the second target filter group exists among the multiple filter groups that support shared nonlinear clipping indices, the encoder determines the value of the fifth flag and writes the fifth flag and its value into the bitstream. Thus, the electronic device can obtain the value of the fifth flag by parsing the bitstream.

[0480] Exemplarily, the fifth flag may be represented as "alf_has_filterset_share_nonlinear". If alf_has_filterset_share_nonlinear takes the second value (e.g., "0"), it indicates that the filters in all supported filter groups do not use a shared nonlinear clipping index, and no additional syntax elements related to the shared nonlinear index need to be transmitted; if alf_has_filterset_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the second target filter groups exists in the plurality of filter groups.

[0481] In S2730, if the value of the fifth flag is the first value, the value of the sixth flag corresponding to each filter group is determined, and the sixth flag and its value are written into the bitstream. The sixth flag is used to indicate whether the current filter group is the second target filter group.

[0482] The specific implementation of S2730 is the same as that of S2320 and will not be repeated here.

[0483] In S2740, if the value of the sixth flag is the first value, a third nonlinear clipping index is written into the bitstream, wherein the third nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filters in the second target filter group.

[0484] The specific implementation of S2740 is the same as that of S2330 and will not be repeated here.

[0485] In the solution provided in Example 30, for the multiple tap coefficients corresponding to all filters in the current filter bank, only a single shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping operations on all filter inputs in the filter bank. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0486] Example 31

[0487] Based on Example 20, Example 31 of the present application also provides an encoding method P2800. The implementation methods described in Example 20 can all be applied to Example 31 and can achieve the same technical effects. Figure 28 is a flow chart of an encoding method P2800 provided in an embodiment of the present application. Referring to Figure 28, method P2800 is implemented based on method P2700. Method P2800 includes S2710-S2740, and S2810-S2840.

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

[0489] In S2810, if the value of the fifth flag is the second value, it is determined that the second target filter group does not exist in the multiple filter groups, and the value of the second flag is determined, and the second flag and its value are written into the code stream. The second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of at least one filter in the first target filter group include a shared nonlinear limiting index.

[0490] Exemplarily, the fifth flag may be represented as "alf_has_filterset_share_nonlinear." If alf_has_filterset_share_nonlinear takes the second value (e.g., "0"), it indicates that none of the filters in any supported filter set use a shared nonlinear clipping index, i.e., the second target filter set does not exist. The electronic device then analyzes the bitstream to determine whether the first target filter set exists among all supported filter sets.

[0491] Exemplarily, the electronic device parses the code stream to determine the value of the second flag. The second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of the first target filter group containing at least one filter use a shared nonlinear clipping index. Exemplarily, at the encoding end, whether the first target filter group exists in the multiple filter groups can be determined by the rate-distortion cost RDO. When the encoder determines that the first target filter group exists in the multiple filter groups that support the shared use of the nonlinear clipping index, the value of the second flag is determined and the second flag and its value are written into the code stream. Thus, the electronic device can obtain the value of the second flag by parsing the code stream.

[0492] Exemplarily, the second flag may be represented as "alf_alt_has_filter_share_nonlinear". If alf_alt_has_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the plurality of filter groups supporting the sharing of nonlinear clipping indices do not share nonlinear clipping indices; and if alf_alt_has_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that at least one of the plurality of filter groups includes the first target filter group.

[0493] In S2820, if the value of the second flag is the first value, the value of the third flag corresponding to each filter group 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 group is the first target filter group.

[0494] The specific implementation of S2820 is the same as that of S2120 and will not be repeated here.

[0495] In S2830, if the value of the third flag is the first value, the value of the fourth flag corresponding to each filter in the first target filter group is determined, and the fourth flag and its value are written into the bit stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0496] The specific implementation of S2830 is the same as that of S2130 and will not be repeated here.

[0497] In S2840, 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.

[0498] The specific implementation of S2840 is the same as that of S2140 and will not be repeated here.

[0499] In the solution provided in Example 31, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0500] Example 32

[0501] Based on Example 20, Example 32 of the present application also provides an encoding method P2900. The implementation methods described in Example 20 can all be applied to Example 32 and can achieve the same technical effects. Figure 29 is a flow chart of an encoding method P2900 provided in an embodiment of the present application. Referring to Figure 29, method P2900 is implemented based on method P2700. Method P2900 includes S2710-S2740, and S2910-S2930.

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

[0503] In S2910, if the value of the fifth flag is the second value, it is determined that the second target filter group does not exist in the multiple filter groups, and the value of the third flag corresponding to each filter group is determined, and the third flag and its value are written into the code stream. The third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0504] Exemplarily, the fifth flag may be represented as “alf_has_filterset_share_nonlinear.” If alf_has_filterset_share_nonlinear takes the second value (such as “0”), it indicates that the filters in all supported filter sets do not use shared nonlinear clipping indexes, that is, the second target filter set does not exist.

[0505] In order to locate which filter group among all supported filter groups belongs to the first target filter group, the electronic device needs to determine the third flag corresponding to the i-th filter group (i is an integer ranging from 1 to Y) among all supported filter groups (assuming that the number of supported filter groups is Y). The third flag of the i-th filter group is used to indicate whether the i-th filter group is the first target filter group, that is, the tap coefficients of at least one filter in the i-th filter group use a shared nonlinear clipping index.

[0506] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0507] In S2920, if the value of the third flag is the first value, the value of the fourth flag corresponding to each filter in the first target filter group is determined, and the fourth flag and its value are written into the bit stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0508] The specific implementation of S2920 is the same as that of S2130 and will not be repeated here.

[0509] In S2930, 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.

[0510] The specific implementation of S2930 is the same as that of S2140 and will not be repeated here.

[0511] In the solution provided in Example 32, for each of the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0512] Example 33

[0513] Based on Example 20, Example 33 of the present application also provides an encoding method P3000. The implementation methods described in Example 20 can all be applied to Example 33 and can achieve the same technical effects. Figure 30 is a flow chart of an encoding method P3000 provided in an embodiment of the present application. Referring to Figure 30, method P3000 is implemented based on method P2700. Method P3000 includes S2710-S2740, and S3010-S3020.

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

[0515] In S3010, if the value of the fifth flag is the second value, it is determined that the second target filter group does not exist in the multiple filter groups, and the value of the fourth flag corresponding to each filter is determined, and the fourth flag and its value are written into the code stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0516] Exemplarily, the fifth flag may be represented as “alf_has_filterset_share_nonlinear.” If alf_has_filterset_share_nonlinear takes the second value (such as “0”), it indicates that the filters in all supported filter sets do not use shared nonlinear clipping indexes, that is, the second target filter set does not exist.

[0517] In order to locate which filter's tap coefficients share the nonlinear clipping index from all supported filter banks, it is necessary to determine the value of the fourth flag corresponding to each filter in all supported filter banks. If all supported filter banks contain X filters, the fourth flag of the jth filter (j is an integer ranging from 1 to X) is used to indicate whether the tap coefficients of the jth filter share the nonlinear clipping index.

[0518] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0519] In S3020, 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.

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

[0521] In the solution provided in Example 33, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0522] Example 34

[0523] Based on Example 20, Example 34 of the present application also provides an encoding method P3100. The implementation methods described in Example 20 can all be applied to Example 34 and can achieve the same technical effects. Figure 31 is a flow chart of an encoding method P3100 provided in an embodiment of the present application. Referring to Figure 31, method P3100 is implemented based on method P2700. Method P3100 includes S2710-S2740, and S3110-S3130.

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

[0525] In S3110, 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 value of the third flag corresponding to each filter group is determined, and the third flag and its value are written into the code stream. The third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0526] Exemplarily, the sixth flag may be represented as “alf_filterset_share_nonlinear_flag.” If alf_filterset_share_nonlinear_flag is the second value (eg, “0”), it indicates that the current filter set does not belong to the second target filter set, i.e., not all filters in the current filter set have tap coefficients that use a shared nonlinear clipping index.

[0527] To determine whether the current filter group belongs to the first target filter group, the electronic device decodes to determine a third flag corresponding to the current filter group, wherein the third flag of the current filter group is used to indicate whether the current filter group is the first target filter group, that is, the tap coefficients of at least one filter in the current filter group use a shared nonlinear clipping index.

[0528] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0529] In S3120, if the value of the third flag is the first value, the value of the fourth flag corresponding to each filter in the first target filter group is determined, and the fourth flag and its value are written into the bit stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

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

[0531] In S3130, 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.

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

[0533] In the solution provided in Example 34, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0534] Example 35

[0535] Based on Example 20, Example 35 of the present application also provides an encoding method P3200. The implementation methods described in Example 20 can all be applied to Example 35 and can achieve the same technical effects. Figure 32 is a flow chart of an encoding method P3200 provided in an embodiment of the present application. Referring to Figure 32, method P3200 is implemented based on method P2700. Method P3200 includes S2710-S2740, and S3210-S3220.

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

[0537] In S3210, 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 value of the fourth flag corresponding to each filter is determined, and the fourth flag and its value are written into the code stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0538] Exemplarily, the sixth flag may be represented as “alf_filterset_share_nonlinear_flag.” If alf_filterset_share_nonlinear_flag is the second value (eg, “0”), it indicates that the current filter set does not belong to the second target filter set, i.e., not all filters in the current filter set have tap coefficients that use a shared nonlinear clipping index.

[0539] In order to locate which filter in the current filter bank has tap coefficients that share the nonlinear clipping index, the value of the fourth flag corresponding to each filter in the current filter bank is determined. If the current filter bank contains Z filters, the fourth flag of the j-th filter (j is an integer ranging from 1 to Z) is used to indicate whether the tap coefficients of the j-th filter share the nonlinear clipping index.

[0540] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0541] In S3220, 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.

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

[0543] In the solution provided in Example 35, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0544] Example 36

[0545] Based on Example 20, Example 36 of the present application also provides an encoding method P3300. The implementation methods described in Example 20 can all be applied to Example 36 and achieve the same technical effects. Figure 33 is a flow chart of an encoding method P3300 provided in an embodiment of the present application.

[0546] In S3310, the value of the first flag is determined, and the first flag and its value are written into the code stream. The first flag is used to indicate whether the tap coefficients of the filters in multiple filter groups that support shared use of nonlinear clipping indexes use shared nonlinear clipping indexes.

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

[0548] In S3320, if the value of the above-mentioned first flag is the second value, the value of the sixth flag corresponding to each filter group is determined, and the above-mentioned sixth flag and its value are written into the code stream. The above-mentioned sixth flag is used to indicate whether the current filter group is the second target filter group, wherein the tap coefficients of the filters in the above-mentioned second target filter group use a shared nonlinear limiting index.

[0549] If the first flag alf_alt_share_nonlinear_flag takes a second value (e.g., "0"), indicating that a shared nonlinear clipping index is not used for the tap coefficients of all filters of the supported multiple filter groups, the electronic device needs to parse the bitstream to determine whether a second target filter group exists, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear clipping index.

[0550] In order to further locate which filter group belongs to the second target filter group, the electronic device parses the code stream to determine the value of the sixth flag corresponding to each filter group. Exemplarily, the sixth flag can be expressed as "alf_filterset_share_nonlinear_flag". If alf_filterset_share_nonlinear_flag is a second value (such as "0"), it means that the current filter group does not belong to the second target filter group, that is, not all filters in the current filter group use a shared nonlinear clipping index for the tap coefficients; if alf_filterset_share_nonlinear_flag is a first value (such as "1"), it means that the current filter group belongs to the second target filter group, that is, the tap coefficients of all filters in the current filter group use a shared nonlinear clipping index.

[0551] In S3330, if the value of the sixth flag is the first value, a third nonlinear clipping index is written into the bitstream, wherein the third nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filters in the second target filter group.

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

[0553] In the solution provided in Example 36, for the multiple tap coefficients corresponding to all filters in the current filter bank, only a single shared nonlinear clipping index needs to be transmitted to implement nonlinear clipping operations on all filter inputs in the filter bank. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0554] Example 37

[0555] Based on Example 20, Example 37 of the present application also provides an encoding method P3400. The implementation methods described in Example 20 can all be applied to Example 37 and can achieve the same technical effects. Figure 34 is a flow chart of an encoding method P3400 provided in an embodiment of the present application. Referring to Figure 34, method P3400 is implemented based on method P3300. Method P3400 includes S3310-S3330, and S3410-S3430.

[0556] Among them, the specific implementation of S3310-S3330 has been introduced in detail in the above embodiments and will not be repeated here.

[0557] In S3410, 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 value of the third flag corresponding to each filter group 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 group is the first target filter group, wherein the tap coefficients of at least one filter in the first target filter group use a shared nonlinear limiting index.

[0558] Exemplarily, the sixth flag may be represented as “alf_filterset_share_nonlinear_flag.” If alf_filterset_share_nonlinear_flag is the second value (eg, “0”), it indicates that the current filter set does not belong to the second target filter set, i.e., not all filters in the current filter set have tap coefficients that use a shared nonlinear clipping index.

[0559] To determine whether the current filter group belongs to the first target filter group, the electronic device decodes to determine a third flag corresponding to the current filter group, wherein the third flag of the current filter group is used to indicate whether the current filter group is the first target filter group, that is, the tap coefficients of at least one filter in the current filter group use a shared nonlinear clipping index.

[0560] Exemplarily, the third flag may be represented as “alf_filterset_has_filter_share_nonlinear”. If alf_filterset_has_filter_share_nonlinear takes the second value (such as “0”), it indicates that the current filter set does not belong to the first target filter set, that is, the current filter set does not contain a filter whose tap coefficients use a shared nonlinear clipping index; if alf_filterset_has_filter_share_nonlinear takes the first value (such as “1”), it indicates that the current filter set belongs to the first target filter set, that is, the current filter set contains at least one filter whose tap coefficients use a shared nonlinear clipping index.

[0561] In S3420, if the value of the third flag is the first value, the value of the fourth flag corresponding to each filter in the first target filter group is determined, and the fourth flag and its value are written into the bit stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0562] The specific implementation of S3420 is the same as that of S2130 and will not be repeated here.

[0563] In S3430, 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.

[0564] The specific implementation of S3430 is the same as that of S2140 and will not be repeated here.

[0565] In the solution provided in Example 37, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0566] Example 38

[0567] Based on Example 20, Example 38 of the present application also provides an encoding method P3500. The implementation methods described in Example 20 can all be applied to Example 38 and can achieve the same technical effects. Figure 35 is a flow chart of an encoding method P3500 provided in an embodiment of the present application. Referring to Figure 35, method P3500 is implemented based on method P3300. Method P3500 includes S3310-S3330, and S3510-S3520.

[0568] Among them, the specific implementation of S3310-S3330 has been introduced in detail in the above embodiments and will not be repeated here.

[0569] In S3510, 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 value of the fourth flag corresponding to each filter is determined, and the fourth flag and its value are written into the code stream. The fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index.

[0570] Exemplarily, the sixth flag may be represented as “alf_filterset_share_nonlinear_flag.” If alf_filterset_share_nonlinear_flag is the second value (eg, “0”), it indicates that the current filter set does not belong to the second target filter set, i.e., not all filters in the current filter set have tap coefficients that use a shared nonlinear clipping index.

[0571] In order to locate which filter in the current filter bank has tap coefficients that share the nonlinear clipping index, the value of the fourth flag corresponding to each filter in the current filter bank is determined. If the current filter bank contains Z filters, the fourth flag of the j-th filter (j is an integer ranging from 1 to Z) is used to indicate whether the tap coefficients of the j-th filter share the nonlinear clipping index.

[0572] Exemplarily, the fourth flag may be represented as "alf_filter_share_nonlinear". If alf_filter_share_nonlinear takes the second value (e.g., "0"), it indicates that the tap coefficients of the current filter do not use a shared nonlinear clipping index; if alf_filter_share_nonlinear takes the first value (e.g., "1"), it indicates that the tap coefficients of the current filter use a shared nonlinear clipping index.

[0573] In S3520, 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.

[0574] The specific implementation of S3520 is the same as that of S2140 and will not be repeated here.

[0575] In the solution provided in Example 38, for the multiple tap coefficients of the current filter, only one shared nonlinear clipping index needs to be transmitted to implement the nonlinear clipping operation on the filter input. This significantly reduces the bit overhead of the nonlinear clipping index, thereby improving video compression efficiency.

[0576] The above describes in detail the encoding and decoding method embodiment of the present application in conjunction with Figures 4 to 35. The following describes in detail the device embodiment of the present application in conjunction with Figures 36 and 37.

[0577] FIG36 is a schematic diagram of the structure of a decoding device 3600 provided in an embodiment of the present application. Referring to FIG36 , the decoding device 3600 includes: a parsing module 3610 and an acquisition module 3620;

[0578] Among them, the above-mentioned parsing module 3610 is used to parse the code stream to determine the target flag and the value of the above-mentioned target flag, and the above-mentioned target flag is used to indicate whether the tap coefficient of at least one filter uses a shared nonlinear limiting index; and the above-mentioned acquisition module 3620 is used to obtain the target nonlinear limiting index from the above-mentioned code stream if the value of the above-mentioned target flag is the first value, wherein the above-mentioned target nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned at least one filter.

[0579] In an exemplary embodiment, based on the above scheme, the above-mentioned target flag includes a first flag, and the above-mentioned first flag is used to indicate whether the tap coefficients of all filters in multiple filter groups that support shared use of nonlinear limiting indexes use a shared nonlinear limiting index; the above-mentioned target nonlinear limiting index includes a first nonlinear limiting index, wherein the above-mentioned first nonlinear limiting index is a nonlinear limiting index shared by the tap coefficients of all filters in the above-mentioned multiple filter groups.

[0580] In an exemplary embodiment, based on the above scheme, 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, wherein the tap coefficients of at least one filter included in the first target filter group use a shared nonlinear clipping index;

[0581] The above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned second flag is the first value, then parse the code stream to determine the third flag corresponding to each filter group, and the above-mentioned third flag is used to indicate whether the current filter group is the above-mentioned first target filter group; if the value of the above-mentioned third flag is the first value, then parse the code stream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter group, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, then obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0582] In an exemplary embodiment, based on the above scheme, the target flag includes: a third flag corresponding to each filter group, the third flag being used to indicate whether the current filter group is a first target filter group, wherein the first target filter group includes at least one filter whose tap coefficients use a shared nonlinear clipping index;

[0583] The above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned third flag is the first value, then parse the code stream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter group, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, then obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0584] In an exemplary embodiment, based on the above scheme, the above-mentioned target flag includes: a fourth flag corresponding to each filter, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; the above-mentioned target nonlinear limiting index includes a second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is a nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0585] In an exemplary embodiment, based on the above scheme, the target flag includes a fifth flag, and the fifth flag is used to indicate whether there is at least one second target filter group, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear clipping index;

[0586] The above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned fifth flag is the first value, parse the code stream to determine the sixth flag corresponding to each filter group, and the above-mentioned sixth flag is used to indicate whether the current filter group is the above-mentioned second target filter group; if the value of the above-mentioned sixth flag is the first value, obtain the third nonlinear limiting index, wherein the above-mentioned third nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned second target filter group.

[0587] In an exemplary embodiment, based on the above scheme, the above-mentioned target flag includes: a sixth flag corresponding to each filter group, the above-mentioned sixth flag is used to indicate whether the current filter group is the second target filter group, wherein the tap coefficients of the filters in the above-mentioned second target filter group use a shared nonlinear limiting index; the above-mentioned target nonlinear limiting index includes a third nonlinear limiting index, wherein the above-mentioned third nonlinear limiting index is a nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned second target filter group.

[0588] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is further used to: if the value of the above-mentioned first flag is the second value, parse the code stream to determine the second flag, and the above-mentioned second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of the above-mentioned first target filter group include at least one filter using a shared nonlinear clipping index; if the value of the above-mentioned second flag is the first value, parse the code stream to determine the third flag corresponding to each filter group, and the above-mentioned third flag is used to indicate whether the current filter group is the above-mentioned first target filter group; if the value of the above-mentioned third flag is the first value, parse the code stream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter group, and the above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear clipping index, wherein the above-mentioned second nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the above-mentioned filters.

[0589] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned first flag is the second value, then parse the code stream to determine the third flag corresponding to each filter group, and the above-mentioned third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of the above-mentioned first target filter group contain at least one filter using a shared nonlinear limiting index; if the value of the above-mentioned third flag is the first value, then parse the code stream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter group, and the above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, then obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0590] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned first flag is the second value, parse the code stream to determine the fourth flag corresponding to each filter, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0591] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned first flag is the second value, then parse the code stream to determine the fifth flag, and the above-mentioned fifth flag is used to indicate whether there is at least one second target filter group, wherein the tap coefficients of the filters in the above-mentioned second target filter group use a shared nonlinear limiting index; if the value of the above-mentioned fifth flag is the first value, then parse the code stream to determine the sixth flag corresponding to each filter group, and the above-mentioned sixth flag is used to indicate whether the current filter group is the above-mentioned second target filter group; if the value of the above-mentioned sixth flag is the first value, then obtain the third nonlinear limiting index, wherein the above-mentioned third nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned second target filter group.

[0592] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is further used to: if the value of the above-mentioned fifth flag is the second value, determine that the above-mentioned second target filter group does not exist in the above-mentioned multiple filter groups, and determine the second flag by parsing the code stream, wherein the above-mentioned second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of at least one filter included in the above-mentioned first target filter group use a shared nonlinear clipping index; if the value of the above-mentioned second flag is the first value, parse the code stream to determine the third flag corresponding to each filter group, wherein the third flag is used to indicate whether the current filter group is the above-mentioned first target filter group; if the value of the above-mentioned third flag is the first value, parse the code stream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter group, wherein the fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear clipping index, wherein the second nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the above-mentioned filters.

[0593] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned fifth flag is the second value, determine that the above-mentioned second target filter group does not exist in the above-mentioned multiple filter groups, and determine the third flag corresponding to each filter group by parsing the code stream, and the above-mentioned third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the above-mentioned first target filter group use a shared nonlinear limiting index; if the value of the above-mentioned third flag is the first value, parse the code stream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter group, and the above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0594] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned fifth flag is the second value, determine that the above-mentioned second target filter group does not exist in the above-mentioned multiple filter groups, and determine the fourth flag corresponding to each filter by parsing the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0595] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned sixth flag is the second value, determine that the current filter group is not the above-mentioned second target filter group, and determine the third flag corresponding to each filter group by parsing the code stream, and the above-mentioned third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the above-mentioned first target filter group use a shared nonlinear limiting index; if the value of the above-mentioned third flag is the first value, parse the code stream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter group, and the above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0596] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned sixth flag is the second value, determine that the current filter group is not the above-mentioned second target filter group, and determine the fourth flag corresponding to each filter by parsing the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0597] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned first flag is the second value, parse the code stream to determine the sixth flag corresponding to each filter group, and the above-mentioned sixth flag is used to indicate whether the current filter group is the second target filter group, wherein the tap coefficients of the filters in the above-mentioned second target filter group use a shared nonlinear limiting index; if the value of the above-mentioned sixth flag is the first value, obtain the third nonlinear limiting index, wherein the above-mentioned third nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned second target filter group.

[0598] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned sixth flag is the second value, determine that the current filter group is not the above-mentioned second target filter group, and determine the third flag corresponding to each filter group by parsing the code stream, and the above-mentioned third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the above-mentioned first target filter group use a shared nonlinear limiting index; if the value of the above-mentioned third flag is the first value, parse the code stream to determine the fourth flag corresponding to each filter in the above-mentioned first target filter group, and the above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0599] In an exemplary embodiment, based on the above scheme, the above-mentioned parsing module 3610 is also used to: if the value of the above-mentioned sixth flag is the second value, determine that the current filter group is not the above-mentioned second target filter group, and determine the fourth flag corresponding to each filter by parsing the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, obtain the second nonlinear limiting index, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0600] In an exemplary embodiment, based on the above scheme, the above-mentioned determination module 3620 is also used to: if the value of the above-mentioned second flag is the second value, determine that there is no filter in the above-mentioned multiple filter groups whose tap coefficients use a shared nonlinear limiting index; or, if the value of the above-mentioned third flag is the second value, determine that there is no filter in the current filter group whose tap coefficients use a shared nonlinear limiting index; or, if the value of the above-mentioned fourth flag is the second value, determine that the tap coefficients of the current filter do not use a shared nonlinear limiting index.

[0601] In an exemplary embodiment, based on the above scheme, different nonlinear limiting indices have a preset mapping relationship with different nonlinear limiting intervals; the above-mentioned analysis module 3610 is also used to: after obtaining the target nonlinear limiting index, obtain the target nonlinear limiting interval that has a mapping relationship with the above-mentioned target nonlinear limiting index, so as to perform a nonlinear limiting operation on the input of the above-mentioned at least one filter through the above-mentioned target nonlinear limiting interval.

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

[0603] It should be understood that the decoding device embodiment and the decoding method embodiment can correspond to each other, and similar descriptions can refer to the decoding method embodiment. To avoid repetition, they are not described here. Specifically, the decoding device shown in Figure 36 can perform the above-mentioned decoding method embodiment, and the aforementioned and other operations and / or functions of each module in the device are respectively for implementing the method embodiments corresponding to the nodes in the master node group. For the sake of brevity, they are not described here.

[0604] FIG37 is a schematic diagram of the structure of an encoding device 3700 provided in an embodiment of the present application, wherein the encoding device 3700 is configured in a terminal device. Referring to FIG37 , the encoding device 3700 includes: a determination module 3710 and a writing module 3720;

[0605] Among them, the above-mentioned determination module 3710 is used to determine the value of the target flag, and the above-mentioned target flag is used to indicate whether the tap coefficients of at least one filter use a shared nonlinear limiting index; the above-mentioned writing module 3720 is used to write the above-mentioned target flag and its value into the code stream; the above-mentioned writing module 3720 is also used to write the target nonlinear limiting index into the code stream if the value of the above-mentioned target flag is the first value, wherein the above-mentioned target nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned at least one filter.

[0606] In an exemplary embodiment, based on the aforementioned scheme, the above-mentioned target flag includes a first flag, and the above-mentioned first flag is used to indicate whether the tap coefficients of the filters in multiple filter groups that support shared use of nonlinear limiting indexes use shared nonlinear limiting indexes; the above-mentioned target nonlinear limiting index includes a first nonlinear limiting index, wherein the above-mentioned first nonlinear limiting index is a nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned multiple filter groups.

[0607] In an exemplary embodiment, based on the above scheme, 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, wherein the tap coefficients of at least one filter included in the first target filter group use a shared nonlinear clipping index;

[0608] The above-mentioned writing module 3720 is also used to: if the value of the above-mentioned second flag is the first value, determine the value of the third flag corresponding to each filter group, and write the above-mentioned third flag and its value into the code stream, and the above-mentioned third flag is used to indicate whether the current filter group is the above-mentioned first target filter group; 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 group, and write the above-mentioned fourth flag and its value into the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear limiting index into the code stream, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0609] In an exemplary embodiment, based on the above scheme, the target flag includes: a third flag corresponding to each filter group, the third flag is used to indicate whether the current filter group is a first target filter group, wherein the first target filter group includes at least one filter whose tap coefficients use a shared nonlinear clipping index;

[0610] The above-mentioned writing module 3720 is also used for: if the value of the above-mentioned third flag is the first value, then determining the value of the fourth flag corresponding to each filter in the above-mentioned first target filter group, and writing the above-mentioned fourth flag and its value into the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, then writing the second nonlinear limiting index into the code stream, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0611] In an exemplary embodiment, based on the aforementioned scheme, the target flag includes: a fourth flag corresponding to each filter, the fourth flag being used to indicate whether the tap coefficients of the current filter use a shared nonlinear limiting index; the target nonlinear limiting index includes a second nonlinear limiting index, wherein the second nonlinear limiting index is a nonlinear limiting index shared by the tap coefficients of the filters.

[0612] In an exemplary embodiment, based on the above scheme, the target flag includes a fifth flag, and the fifth flag is used to indicate whether there is at least one second target filter group, wherein the tap coefficients of the filters in the second target filter group use a shared nonlinear clipping index;

[0613] The above-mentioned writing module 3720 is also used 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 group, and write the above-mentioned sixth flag and its value into the code stream, and the above-mentioned sixth flag is used to indicate whether the current filter group is the above-mentioned second target filter group; if the value of the above-mentioned sixth flag is the first value, write the third nonlinear limiting index into the code stream, wherein the above-mentioned third nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned second target filter group.

[0614] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned target flag includes: a sixth flag corresponding to each filter group, the above-mentioned sixth flag is used to indicate whether the current filter group is the second target filter group, wherein the tap coefficients of the filters in the above-mentioned second target filter group use a shared nonlinear limiting index; the above-mentioned target nonlinear limiting index includes a third nonlinear limiting index, wherein the above-mentioned third nonlinear limiting index is a nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned second target filter group.

[0615] In an exemplary embodiment, based on the above-mentioned scheme, the writing module 3720 is further used to: if the value of the first flag is the second value, determine the value of the second flag, and write the second flag and its value into the code stream, the second flag is used to indicate whether there is at least one first target filter group, wherein the tap coefficients of at least one filter included in the first target filter group use a shared nonlinear clipping index; if the value of the second flag is the first value, determine the value of the third flag corresponding to each filter group, and write the third flag and its value into the code stream, 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 the first value, determine the value of the fourth flag corresponding to each filter in the first target filter group, 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 a shared nonlinear clipping index; if the value of the fourth flag is the first value, write the second nonlinear clipping index into the code stream, wherein the second nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the filters.

[0616] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned first flag is the second value, determine the value of the third flag corresponding to each filter group, and write the above-mentioned third flag and its value into the code stream, the above-mentioned third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of the above-mentioned first target filter group containing at least one filter use a shared nonlinear limiting index; 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 group, 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 nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear limiting index into the code stream, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0617] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned first flag is the second value, determine the value of the fourth flag corresponding to each filter, and write the above-mentioned fourth flag and its value into the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear limiting index into the code stream, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0618] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned first flag is the second value, then determine the value of the fifth flag, and write the above-mentioned fifth flag and its value into the code stream, the above-mentioned fifth flag is used to indicate whether there is at least one second target filter group, wherein the tap coefficients of the filters in the above-mentioned second target filter group use a shared nonlinear limiting index; if the value of the above-mentioned fifth flag is the first value, then determine the value of the sixth flag corresponding to each filter group, and write the above-mentioned sixth flag and its value into the code stream, the above-mentioned sixth flag is used to indicate whether the current filter group is the above-mentioned second target filter group; if the value of the above-mentioned sixth flag is the first value, then write the third nonlinear limiting index into the code stream, wherein the above-mentioned third nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned second target filter group.

[0619] In an exemplary embodiment, based on the above-mentioned 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 group does not exist in the multiple filter groups, 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 group, wherein the tap coefficients of at least one filter included in the first target filter group use a shared nonlinear clipping index; if the value of the second flag is the first value, determine the value of the third flag corresponding to each filter group, and write the third flag and its value into the bitstream, where 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 the first value, determine the value of the fourth flag corresponding to each filter in the first target filter group, 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 nonlinear clipping index; if the value of the fourth flag is the first value, write the second nonlinear clipping index into the bitstream, where the second nonlinear clipping index is a nonlinear clipping index shared by the tap coefficients of the filters.

[0620] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is further used to: if the value of the above-mentioned fifth flag is the second value, determine that the above-mentioned second target filter group does not exist in the above-mentioned multiple filter groups, determine the value of the third flag corresponding to each filter group, and write the above-mentioned third flag and its value into the code stream, wherein the above-mentioned third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter included in the above-mentioned first target filter group use a shared nonlinear clipping index; 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 group, and write the above-mentioned fourth flag and its value into the code stream, wherein the above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear clipping index into the code stream, wherein the above-mentioned second nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the above-mentioned filters.

[0621] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned fifth flag is the second value, determine that the above-mentioned second target filter group does not exist in the above-mentioned multiple filter groups, and determine the value of the fourth flag corresponding to each filter, and write the above-mentioned fourth flag and its value into the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear limiting index into the code stream, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0622] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned sixth flag is the second value, determine that the current filter group is not the above-mentioned second target filter group, and determine the value of the third flag corresponding to each filter group, and write the above-mentioned third flag and its value into the code stream, wherein the above-mentioned third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the above-mentioned first target filter group use a shared nonlinear clipping index; 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 group, and write the above-mentioned fourth flag and its value into the code stream, wherein the above-mentioned fourth flag is used to indicate whether the tap coefficients of the current filter use a shared nonlinear clipping index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear clipping index into the code stream, wherein the above-mentioned second nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the above-mentioned filters.

[0623] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned sixth flag is the second value, determine that the current filter group is not the above-mentioned second target filter group, and determine the value of the fourth flag corresponding to each filter, and write the above-mentioned fourth flag and its value into the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear limiting index into the code stream, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0624] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned first flag is the second value, then determine the value of the sixth flag corresponding to each filter group, and write the above-mentioned sixth flag and its value into the code stream, the above-mentioned sixth flag is used to indicate whether the current filter group is the second target filter group, wherein the tap coefficients of the filters in the above-mentioned second target filter group use a shared nonlinear limiting index; if the value of the above-mentioned sixth flag is the first value, then write the third nonlinear limiting index into the code stream, wherein the above-mentioned third nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the filters in the above-mentioned second target filter group.

[0625] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned sixth flag is the second value, determine that the current filter group is not the above-mentioned second target filter group, and determine the value of the third flag corresponding to each filter group, and write the above-mentioned third flag and its value into the code stream, the above-mentioned third flag is used to indicate whether the current filter group is the first target filter group, wherein the tap coefficients of at least one filter in the above-mentioned first target filter group use a shared nonlinear clipping index; 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 group, 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 nonlinear clipping index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear clipping index into the code stream, wherein the above-mentioned second nonlinear clipping index is the nonlinear clipping index shared by the tap coefficients of the above-mentioned filters.

[0626] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned writing module 3720 is also used to: if the value of the above-mentioned sixth flag is the second value, determine that the current filter group is not the above-mentioned second target filter group, and determine the value of the fourth flag corresponding to each filter, and write the above-mentioned fourth flag and its value into the code stream, and the above-mentioned fourth flag is used to indicate whether the tap coefficient of the current filter uses a shared nonlinear limiting index; if the value of the above-mentioned fourth flag is the first value, write the second nonlinear limiting index into the code stream, wherein the above-mentioned second nonlinear limiting index is the nonlinear limiting index shared by the tap coefficients of the above-mentioned filters.

[0627] In an exemplary embodiment, based on the aforementioned scheme, there is a preset mapping relationship between different nonlinear limiting indices and different nonlinear limiting intervals; the above-mentioned writing module 3720 is specifically used to: write the above-mentioned target nonlinear limiting index and its corresponding target nonlinear limiting interval into the bitstream; wherein the above-mentioned target nonlinear limiting interval is used to perform a nonlinear limiting operation on the input of the above-mentioned at least one filter.

[0628] It should be understood that the encoding device embodiment and the encoding method embodiment can correspond to each other, and similar descriptions can refer to the encoding method embodiment. To avoid repetition, they are not described here. Specifically, the encoding device shown in Figure 37 can execute the above-mentioned encoding method embodiment, and the aforementioned and other operations and / or functions of each module in the device are respectively for implementing the method embodiments corresponding to the nodes in the master node group. For the sake of brevity, they are not described here.

[0629] The apparatus of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.

[0630] Figure 38 is a schematic block diagram of an electronic device 3800 provided in an embodiment of the present application. The electronic device 3800 in Figure 38 can be used to execute the above-mentioned encoding and decoding method. The electronic device 3800 can be an encoder or a decoder.

[0631] As shown in FIG38 , the electronic device 3800 may include:

[0632] The memory 3810 and the processor 3820 are configured to store the 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 embodiment of the present application.

[0633] For example, the processor 3820 may be configured to execute the steps of the above method according to the instructions in the computer program 3830 .

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

[0635] General-purpose processor, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0636] In some embodiments of the present application, the memory 3810 includes but is not limited to: volatile memory and / or non-volatile memory.

[0637] In some embodiments of the present application, the computer program 3830 may be divided into one or more modules, which are stored in the memory 3810 and executed by the processor 3820 to implement 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 implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 3830 in the electronic device.

[0638] As shown in FIG38 , the electronic device 3800 may further include:

[0639] The transceiver 3840 may be connected to the processor 3820 or the memory 3810 .

[0640] The processor 3820 may control the transceiver 3840 to communicate with other devices. Specifically, it may send information or data to other devices or receive information or data sent by other devices. The transceiver 3840 may include a transmitter and a receiver. The transceiver 3840 may further include an antenna, which may be one or more.

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

[0642] According to one aspect of the present application, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer is enabled to perform the method of the above-mentioned method embodiment. Alternatively, the present application also provides a computer program product containing instructions. When the computer is executed by the instructions, the computer is enabled to perform the method of the above-mentioned method embodiment.

[0643] According to another aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method of the above-described method embodiment. In the embodiment of the present application, the computer program is used by the processor to execute an encoding method to form a code stream, which is stored in the computer-readable storage medium.

[0644] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0645] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A decoding method, characterized in that, Applied to an electronic device, the method includes: Analyze a bitstream to determine a target flag in the bitstream and a value of the 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 value of the target flag is a first value, obtain a target non-linear clipping index from 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.

2. The method according to claim 1, characterized in that The target flag includes a first flag, and the first flag is used to indicate whether tap coefficients of filters in multiple filter banks that support shared use of the 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 banks.

3. The method according to claim 1 or 2, characterized in that, The target flag includes 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 tap coefficients of at least one filter that use the shared non-linear clipping index; The method further includes: If the value of the second flag is a first value, analyze 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 a first value, analyze 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 coefficients of the current filter use the 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.

4. The method according to any one of claims 1 to 3, characterized in that, The target flag includes: 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 tap coefficients of at least one filter that use the shared non-linear clipping index; The method further includes: If the value of the third flag is a first value, analyze 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 coefficients of the current filter use the 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.

5. The method according to any one of claims 1 to 4, characterized in that The target flag includes: a fourth flag corresponding to each filter, and the fourth flag is used to indicate whether the tap coefficients of the current filter use the 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 any one of claims 1 to 5, characterized in that, The target flag includes a fifth flag for indicating 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; The method further includes: 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.

7. The method according to any one of claims 1 to 6, 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, where 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, wherein The method further includes: If the first flag takes a second value, parse the bitstream to determine a second flag for indicating 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; 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 filter.

9. The method according to claim 2, characterized in that, The method further includes: If the first flag takes a second 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, where 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 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 filter.

10. The method according to claim 2, characterized in that, The method further includes: If the first flag takes the second value, parse the bitstream 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 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, wherein The method further includes: If the first flag takes 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 where, in the second target filter bank, the tap coefficients of the filters use a shared non-linear clipping index; If the fifth flag takes 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 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.

12. The method according to claim 11, wherein, The method further includes: If the fifth flag takes the second value, determine that there is no second target filter bank in the plurality of 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 where, 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 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 third flag takes 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 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.

13. The method according to claim 11, wherein The method further includes: If the fifth flag takes the second value, determine that there is no second target filter bank in the plurality of 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 where, 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 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 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.

14. The method according to claim 11, wherein The method further includes: If the fifth flag takes 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 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.

15. The method according to claim 11, wherein The method further includes: If the sixth flag takes 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 the first target filter bank includes at least one filter whose tap coefficients use a shared non-linear clipping index; If the third flag takes 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 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.

16. The method according to claim 11, wherein The method further includes: If the sixth flag takes 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, 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, 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, wherein The method further includes: If the first flag takes 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 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, 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 sixth flag takes 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 the first target filter bank includes at least one filter whose tap coefficients 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 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, characterized in that, 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 parse the bitstream 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.

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 electronic device, 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 decoding method described in any one of claims 1 to 21 above, or is used to execute the computer program to implement the encoding method described in claim 22 above.

24. A computer-readable storage medium, characterized in that, For storing a computer program; The computer program causes the computer to execute the decoding method described in 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 implement the encoding method described in claim 22 to form a bitstream, and the bitstream is stored in the computer-readable storage medium.

26. A method for processing a video bitstream, characterized in that, The video bitstream is generated according to the encoding method described in claim 22, or is decoded based on the decoding method described in any one of claims 1 to 21.

Citation Information

Patent Citations

  • Adaptive loop filtering (ALF) with non-linear clipping

    CN113228646A

  • Adaptive loop filter

    CN113574898A

  • On adaptive loop filtering for video coding

    CN113767623A