WO2021143177A1 - 编码、解码方法、装置及其设备 - Google Patents

编码、解码方法、装置及其设备 Download PDF

Info

Publication number
WO2021143177A1
WO2021143177A1 PCT/CN2020/115663 CN2020115663W WO2021143177A1 WO 2021143177 A1 WO2021143177 A1 WO 2021143177A1 CN 2020115663 W CN2020115663 W CN 2020115663W WO 2021143177 A1 WO2021143177 A1 WO 2021143177A1
Authority
WO
WIPO (PCT)
Prior art keywords
ccalf
alf
pixel position
level
control switch
Prior art date
Application number
PCT/CN2020/115663
Other languages
English (en)
French (fr)
Inventor
陈方栋
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Priority to US17/792,205 priority Critical patent/US11962768B2/en
Publication of WO2021143177A1 publication Critical patent/WO2021143177A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/174Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a slice, e.g. a line of blocks or a group of blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • This application relates to the technical field of encoding and decoding, and in particular to an encoding and decoding method, device and equipment.
  • a complete video encoding method can include processes such as prediction, transformation, quantization, entropy encoding, and filtering.
  • predictive coding may include intra-frame coding and inter-frame coding.
  • inter-frame coding uses the correlation of the video time domain to predict the current pixel using pixels adjacent to the coded image, so as to effectively remove the video time domain redundancy.
  • Intra-frame coding refers to using the correlation of the video space domain to predict the current pixels using the pixels of the coded block of the current frame image to achieve the purpose of removing the video spatial domain redundancy.
  • loop filtering is used to reduce image blocking or poor image effects, and to improve image quality.
  • CCALF can be used to implement loop filtering.
  • the filtering effect of CCALF in the related technology is not good, and the coding performance is relatively poor.
  • the present application provides an encoding and decoding method, device and equipment, which can improve encoding performance.
  • This application provides an encoding method, which includes:
  • the CCALF sequence-level control switch flag bit of the sequence-level parameter set SPS-level grammar indicates that the current sequence allows ALF to be enabled, then the CCALF sequence-level control switch flag bit is encoded in the SPS-level grammar.
  • the present application provides a decoding method, which includes:
  • the CCALF sequence-level control switch flag bit of the sequence-level parameter set SPS-level syntax indicates that the current sequence allows ALF to be enabled
  • the CCALF sequence-level control switch flag bit is decoded from the SPS-level syntax.
  • the present application provides an encoding device, which includes:
  • the determining module is used to determine whether the ALF sequence level control switch flag bit of the sequence level parameter set SPS level syntax indicates whether the current sequence allows ALF to be enabled;
  • the encoding module is used to encode the CCALF sequence-level control switch flag bit in the SPS-level grammar when the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled.
  • the present application provides a decoding device, which includes:
  • the determining module is used to determine whether the ALF sequence level control switch flag bit of the sequence level parameter set SPS level syntax indicates whether the current sequence allows ALF to be enabled;
  • the decoding module is used to decode the CCALF sequence-level control switch flag from the SPS-level grammar when the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled.
  • the present application provides an encoding end device, including: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine executable instructions that can be executed by the processor;
  • the processor is used to execute machine executable instructions to implement the following steps:
  • the CCALF sequence-level control switch flag bit of the sequence-level parameter set SPS-level grammar indicates that the current sequence allows ALF to be enabled, then the CCALF sequence-level control switch flag bit is encoded in the SPS-level grammar.
  • the present application provides a decoding terminal device, including: a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
  • the processor is used to execute machine executable instructions to implement the following steps:
  • the CCALF sequence-level control switch flag bit of the sequence-level parameter set SPS-level syntax indicates that the current sequence allows ALF to be enabled
  • the CCALF sequence-level control switch flag bit is decoded from the SPS-level syntax.
  • Figure 1 is a schematic diagram of the coding and decoding framework
  • Fig. 2 is a flowchart of an encoding method in an embodiment of the present application
  • FIG. 3 is a flowchart of a decoding method in an embodiment of the present application.
  • FIG. 4 is a flowchart of an encoding and decoding method in an embodiment of the present application.
  • 5A-5D are schematic diagrams of CCALF filtering processing in some embodiments of the present application.
  • 6A-6N are schematic diagrams of adjacent pixel positions in some embodiments of the present application.
  • FIG. 7 is a schematic diagram of adjacent pixel positions of ALF in an embodiment of the present application.
  • FIG. 8A is a schematic structural diagram of a decoding device in an embodiment of the present application.
  • FIG. 8B is a schematic structural diagram of an encoding device in an embodiment of the present application.
  • FIG. 8C is a hardware structure diagram of a decoding end device in an embodiment of the present application.
  • Fig. 8D is a hardware structure diagram of an encoding end device in an embodiment of the present application.
  • the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • first information may also be referred to as second information
  • second information may also be referred to as first information.
  • word "if” used can be interpreted as "when", or "when”, or "in response to certainty.”
  • Codec framework See Figure 1, which is a schematic diagram of the codec framework.
  • the encoding and decoding framework may be used to implement the encoding end processing flow of the embodiment of the present application, and the encoding and decoding framework may be used to implement the decoding end processing flow of the embodiment of the present application.
  • a complete codec framework may include but is not limited to: prediction, transformation, quantization, entropy encoder, inverse transformation, inverse quantization, reconstruction, in-loop filtering, reference image buffer and other modules, Prediction can be divided into intra prediction and inter prediction (ie motion estimation/motion compensation).
  • Prediction can be divided into intra prediction and inter prediction (ie motion estimation/motion compensation).
  • Intra-frame prediction Make use of the correlation of the video space domain and use the coded block of the current block for prediction to achieve the purpose of removing the video space domain redundancy.
  • Intra prediction specifies multiple prediction modes, and each prediction mode corresponds to a texture direction (except for DC mode). For example, if image textures are arranged horizontally, the horizontal prediction mode can better predict image information.
  • Inter-frame prediction Based on the correlation of the video time domain, since the video sequence contains strong time domain correlation, using adjacent coded image pixels to predict the pixels of the current image can achieve the purpose of effectively removing video time domain redundancy.
  • the inter prediction part of the video coding standard uses block-based motion compensation technology. The main principle is to find the best matching block in the previously encoded image for each pixel block of the current image. This process is called Motion Estimation (Motion Estimation). , ME).
  • transformation In the process of video encoding, transformation refers to the conversion of an image described in the form of pixels in the spatial domain to an image in the transform domain and expressed in the form of transform coefficients. Since most images contain more flat areas and slowly changing areas, a proper transformation process can transform the scattered distribution of image energy in the spatial domain into a relatively concentrated distribution in the transformation domain, thereby removing the signal. The correlation between the frequency domains and the quantization process can effectively compress the code stream.
  • Loop filtering is used to reduce image blockiness or poor image effects and other problems to improve image quality.
  • loop filtering may include, but is not limited to, deblocking filter (Deblocking filter), SAO (Sample Adaptive Offset, sample adaptive compensation) filtering, ALF (Adaptive Loop Filter, adaptive loop filter) filtering, CCALF (Cross -Component Adaptive Loop Filter, cross-component adaptive loop filter) filtering, etc.
  • the basic principle of ALF filter the pixel value of the reconstructed image block after filtering to be closer to the pixel value of its original pixel.
  • the basic principle of CCALF Obtain the compensated pixel value of the chrominance reconstruction block (generally the chrominance value after ALF filtering) by filtering the corresponding luminance value, making it closer to the pixel value of the original chrominance image block.
  • Flag coding In video coding, there are many modes. For a block, one of these modes may be adopted. In order to indicate which mode is adopted, each block needs to be marked by encoding the corresponding mark bit. For example, for the encoding end, the encoding end determines the value of the flag bit through decision-making by the encoding end, and then encodes the value of the flag bit and transmits it to the decoding end. For the decoding end, by analyzing the value of the flag bit, it is determined whether the corresponding mode is enabled.
  • Sequence-level parameter set This set contains a flag bit that determines whether certain tool (method) switches are allowed in the entire video sequence (ie, multi-frame video images). If the flag bit is 1, the corresponding tool (method) is allowed to be activated in the video sequence; otherwise, the tool (method) cannot be activated during the encoding process of the video sequence.
  • Picture parameter set (PPS, picture parameter set): There is a flag bit in this set that determines whether certain tool (method) switches are allowed in a certain picture. If the flag bit is 1, the corresponding tool (method) is allowed to be activated in the picture; otherwise, the tool (method) cannot be activated in the encoding process of the picture.
  • Picture header Common information for a certain frame of image, which is different from the image parameter set (which can be used by different images), and the common information only for the current image is stored in the image header. For example, when the current image contains multiple slices, the multiple slices may share the information in the image header.
  • the image head has a flag to determine whether certain tools (methods) are allowed to switch in the current image. If the flag bit is 1, the current image allows the corresponding tool (method) to be activated; otherwise, the tool (method) cannot be activated during the encoding process of the current image.
  • a frame of image can contain one slice or multiple slices. For each slice, in the header information of the slice, there is a flag bit that determines whether certain tool (method) switches are allowed in the slice. If the flag bit is 1, the corresponding tool (method) is allowed to be activated in the slice; otherwise, the tool (method) cannot be activated during the encoding process of the slice.
  • High-level grammar used to indicate whether to allow certain tools (methods) to be enabled, that is, to allow certain tools (methods) to be enabled or prohibit certain tools (methods) through high-level grammar.
  • the high-level grammar can be the high-level grammar at the sequence parameter set level, or the high-level grammar at the image parameter set level, or the high-level grammar at the film header level, or the high-level grammar at the image header level. This high-level grammar is not done Restrictions, as long as the above functions can be realized.
  • Rate-Distortion Optimized There are two major indicators for evaluating coding efficiency: code rate and PSNR (Peak Signal to Noise Ratio). The smaller the bit stream, the greater the compression rate and the greater the PSNR. , The better the quality of the reconstructed image is.
  • CCALF is an implementation of loop filtering, and CCALF can be used to implement loop filtering.
  • the filtering effect of the related technology CCALF is not good, and the coding performance is relatively poor.
  • an encoding and decoding method is proposed in the embodiments of the present application, which can improve the filtering effect of CCALF and improve the coding performance.
  • Embodiment 1 An encoding method is proposed in the embodiment of this application, which can be applied to the encoding end.
  • the method may include: if the ALF sequence-level control switch flag of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, then the SPS-level syntax
  • the CCALF sequence-level control switch flag is encoded in the CCALF sequence-level control switch flag.
  • the CCALF sequence-level control switch flag indicates that the current sequence allows CCALF to be enabled, or the CCALF sequence-level control switch flag indicates that the current sequence does not allow CCALF to be enabled.
  • the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the current sequence has chroma components
  • the CCALF sequence-level control switch flag bit is encoded in the SPS-level grammar.
  • the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow ALF to be enabled, it is forbidden to encode the CCALF sequence-level control switch flag bit in the SPS-level grammar. For example, there is no need to encode the CCALF sequence-level control switch flag bit in the SPS-level syntax, which directly indicates that the current sequence does not allow CCALF to be enabled.
  • FIG. 2 is a schematic flowchart of the encoding method, which can be applied to the encoding end, and the method may include:
  • Step 201 Determine whether the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled. If yes, step 202 can be performed; if not, step 204 can be performed.
  • Step 202 Determine whether there is a chrominance component in the current sequence.
  • step 203 can be performed; if not, step 204 can be performed.
  • Step 203 Encode the CCALF sequence-level control switch flag bit in the SPS-level syntax.
  • Step 204 It is forbidden to encode the CCALF sequence-level control switch flag bit in the SPS-level syntax.
  • the CCALF sequence-level control switch flag bit is the first value.
  • the CCALF sequence-level control switch flag bit is the second value.
  • the first value indicates that the current sequence does not allow CCALF to be enabled; the second value indicates that the current sequence allows CCALF to be enabled.
  • the first value can be 0 and the second value can be 1; or, the first value can be 1, and the second value can be 0; of course, the above is just an example.
  • the second value is not limited.
  • Application scenario 1 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, then the CCALF sequence-level control switch flag bit is encoded in the SPS-level grammar.
  • Application scenario 2 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the current sequence has chroma components, the CCALF sequence-level control switch flag bit is encoded in the SPS-level grammar.
  • Application scenario 3 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow ALF to be enabled, it is forbidden to encode the CCALF sequence-level control switch flag bit in the SPS-level grammar.
  • Application scenario 4 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and there is no chroma component in the current sequence, it is forbidden to encode the CCALF sequence-level control switch flag bit in the SPS-level grammar.
  • Application scenario 5 If the ALF sequence-level control switch flag of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the PPS-level syntax indicates that the ALF syntax exists in the image header, then encode the ALF image header-level control switch flag in the image header-level syntax Bit. Further, if the ALF image header-level control switch flag bit of the image header-level grammar indicates that the current image allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows CCALF to be enabled, then in the image header-level grammar Encode the CCALF image header control switch flag bit.
  • encoding the ALF image header level control switch flag in the image header level syntax may include: encoding the ALF image header level syntax information in the image header level syntax, and the ALF image header level syntax information includes the ALF image header level control
  • the switch flag can also include other ALF-related information, which is not limited.
  • encoding the CCALF image header level control switch flag in the image header level syntax may include: encoding CCALF image header level syntax information in the image header level syntax, and the CCALF image header level syntax information includes CCALF image header level control
  • the switch flag can also include other information related to CCALF, which is not limited.
  • Application scenario 6 If the ALF sequence-level control switch flag of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the PPS-level syntax indicates that the ALF syntax exists in the image header, then encode the ALF image header-level control switch flag in the image header-level syntax Bit. Further, if the ALF image head-level control switch flag bit of the image header-level syntax indicates that the current image allows ALF, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence does not allow CCALF to be enabled, then it is forbidden to enable CCALF in the image head-level syntax. The CCALF image header control switch flag is encoded in the grammar.
  • Application scenario 7 If the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the PPS-level syntax indicates that the ALF syntax exists in the image header, then encode the ALF image header-level control switch flag in the image header-level syntax Bit. Further, if the ALF image header control switch flag of the image header syntax indicates that the current image does not allow ALF to be enabled, it is forbidden to encode the CCALF image header control switch flag in the image header syntax.
  • the ALF image header-level control switch flag of the image header-level grammar indicates that the current image does not allow ALF to be enabled, then regardless of the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows CCALF or not to be enabled CCALF, it is forbidden to encode the CCALF image header control switch flag in the image header syntax.
  • Application scenario 8 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the PPS-level grammar indicates that the ALF syntax exists in the film header, the ALF film-level control switch flag bit can be encoded in the film header-level grammar. Further, if the ALF header-level control switch flag bit of the credit-level syntax indicates that the current slice allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then CCALF can be encoded in the credit-level syntax. The head-level control switch flag.
  • encoding the ALF credit-level control switch flag in the credit-level syntax may include: encoding the ALF credit-level syntax information in the credit-level syntax, and the ALF credit-level syntax information includes the ALF credit-level control switch flag.
  • the ALF credit-level syntax information includes the ALF credit-level control switch flag.
  • It can also include other ALF-related information, which is not limited.
  • encoding the CCALF credit-level control switch flag in the credit-level grammar may include: encoding CCALF credit-level syntax information in the credit-level syntax, and the CCALF credit-level syntax information includes the CCALF credit-level control switch flag.
  • CCALF credit-level syntax information includes the CCALF credit-level control switch flag.
  • It can also include other information related to CCALF, which is not limited.
  • Application Scenario 9 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the PPS-level grammar indicates that the ALF syntax exists in the film header, then the ALF film-level control switch flag bit can be encoded in the film header-level grammar. Further, if the ALF header-level control switch flag bit of the credit-level grammar indicates that the current slide allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow CCALF to be enabled, it can be prohibited in the credit-level syntax Encode the CCALF film header level control switch flag bit.
  • Application Scenario 10 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the PPS-level grammar indicates that the ALF syntax exists in the film header, then the ALF film-level control switch flag bit can be encoded in the film header-level grammar. Further, if the ALF credit-level control switch flag of the credit-level grammar indicates that the current slide does not allow ALF to be enabled, it may be prohibited to encode the CCALF credit-level control switch flag in the credit-level syntax.
  • the ALF header-level control switch flag bit of the intro-level syntax indicates that the current film does not allow ALF to be enabled
  • regardless of the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows or does not allow CCALF to be enabled, It is forbidden to encode the CCALF image header-level control switch flag in the film header-level syntax.
  • Application scenario 11 If the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the image header, then encode the ALF image header-level control switch in the image header-level syntax Flag bit. Further, if the ALF image header-level control switch flag bit of the image header-level grammar indicates that the current image allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows CCALF to be enabled, then in the image header-level grammar Encode the CCALF image header control switch flag bit.
  • Application scenario 12 If the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the image header, then encode the ALF image header-level control switch in the image header-level syntax Flag bit. Further, if the ALF image head-level control switch flag bit of the image header-level syntax indicates that the current image allows ALF, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence does not allow CCALF to be enabled, then it is forbidden to enable CCALF in the image head-level syntax. The CCALF image header control switch flag is encoded in the grammar.
  • Application scenario 13 If the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the image header, then encode the ALF image header-level control switch in the image header-level syntax Flag bit. Further, if the ALF image header control switch flag of the image header syntax indicates that the current image does not allow ALF to be enabled, it is forbidden to encode the CCALF image header control switch flag in the image header syntax.
  • the ALF image header-level control switch flag of the image header-level grammar indicates that the current image does not allow ALF to be enabled, then regardless of the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows CCALF or not to be enabled CCALF, it is forbidden to encode the CCALF image header control switch flag in the image header syntax.
  • Application scenario 14 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the image header-level grammar indicates that the ALF grammar exists in the film header, then the ALF film header-level control switch flag bit can be encoded in the film header-level grammar . Further, if the ALF header-level control switch flag bit of the credit-level syntax indicates that the current slice allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then CCALF can be encoded in the credit-level syntax. The head-level control switch flag.
  • Application scenario 15 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the image header-level grammar indicates that the ALF grammar exists in the film header, then the ALF film header-level control switch flag bit can be encoded in the film header-level grammar . Further, if the ALF header-level control switch flag bit of the credit-level grammar indicates that the current slide allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow CCALF to be enabled, it can be prohibited in the credit-level syntax Encode the CCALF film header level control switch flag bit.
  • Application Scenario 16 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the image header-level grammar indicates that the ALF grammar exists in the film header, the ALF film header-level control switch flag bit can be encoded in the film header-level grammar . Further, if the ALF credit-level control switch flag of the credit-level grammar indicates that the current slide does not allow ALF to be enabled, it may be prohibited to encode the CCALF credit-level control switch flag in the credit-level syntax.
  • the ALF header-level control switch flag bit of the intro-level syntax indicates that the current film does not allow ALF to be enabled
  • regardless of the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows or does not allow CCALF to be enabled, It is forbidden to encode the CCALF image header-level control switch flag in the film header-level syntax.
  • the design of high-level grammar provides flexibility in the use of CCALF. Improve the accuracy of the CCALF loop filter, improve the CCALF loop filter effect, improve the coding performance, and make the reconstruction value of the current processing unit closer to the original pixel.
  • the current processing unit may be an area that is being encoded.
  • Embodiment 2 In the embodiment of this application, a decoding method is proposed, which can be applied to the decoding end. The method may include: if the ALF sequence-level control switch flag of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, start from the SPS-level syntax In the decoding CCALF sequence level control switch flag bit, the CCALF sequence level control switch flag bit indicates that the current sequence allows CCALF to be enabled, or the CCALF sequence level control switch flag bit indicates that the current sequence does not allow CCALF to be enabled.
  • the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the current sequence has chroma components
  • the CCALF sequence-level control switch flag bit is decoded from the SPS-level grammar.
  • the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow ALF to be enabled, it is forbidden to decode the CCALF sequence-level control switch flag bit from the SPS-level grammar. For example, it is not necessary to decode the CCALF sequence-level control switch flag bit from the SPS-level grammar, and directly determine that the current sequence does not allow CCALF to be enabled.
  • FIG. 3 is a schematic flow chart of the decoding method, which can be applied to the decoding end, and the method can include:
  • Step 301 Determine whether the ALF sequence level control switch flag bit of the SPS level syntax indicates that the current sequence allows ALF to be enabled. If yes, step 302 can be performed; if not, step 304 can be performed.
  • Step 302 Determine whether there is a chrominance component in the current sequence.
  • step 303 can be performed; if not, step 304 can be performed.
  • Step 303 Decode the CCALF sequence-level control switch flag bit from the SPS-level syntax.
  • Step 304 It is forbidden to decode the CCALF sequence-level control switch flag bit from the SPS-level grammar.
  • the CCALF sequence-level control switch flag bit when decoding the CCALF sequence-level control switch flag bit from the SPS-level grammar, if the CCALF general restriction information grammar indicates that CCALF is not allowed to be enabled, it is directly determined that the CCALF sequence-level control switch flag bit is the first value; or If the general restriction information syntax of CCALF indicates that CCALF is allowed to be enabled, the CCALF sequence-level control switch flag is decoded from the SPS-level syntax to the second value.
  • the first value indicates that the current sequence does not allow CCALF to be enabled; the second value indicates that the current sequence allows CCALF to be enabled.
  • the first value may be 0 and the second value may be 1; or, the first value may be 1, and the second value may be 0; of course, the above is only an example.
  • Application scenario 1 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, then the CCALF sequence-level control switch flag bit is decoded from the SPS-level grammar.
  • Application scenario 2 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the current sequence has chroma components, the CCALF sequence-level control switch flag bit is decoded from the SPS-level grammar.
  • Application scenario 3 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow ALF to be enabled, it is forbidden to decode the CCALF sequence-level control switch flag bit from the SPS-level grammar.
  • Application scenario 4 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the current sequence does not have chroma components, it is forbidden to decode the CCALF sequence-level control switch flag bit from the SPS-level grammar.
  • Application scenario 5 If the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the PPS-level syntax indicates that the ALF syntax exists in the image header, then decode the ALF image header-level control switch flag from the image header-level syntax Bit. Further, if the ALF image header-level control switch flag bit of the image header-level syntax indicates that the current image allows ALF, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then from the image header-level syntax Decode the CCALF image header control switch flag bit.
  • Application Scenario 6 If the ALF sequence-level control switch flag of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the PPS-level syntax indicates that the ALF syntax exists in the image header, the ALF image header-level control switch flag is decoded from the image header-level syntax Bit. Further, if the ALF image head-level control switch flag bit of the image header-level syntax indicates that the current image allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence does not allow CCALF to be enabled, then the image header level is prohibited. In the syntax, the CCALF image header control switch flag is decoded.
  • Application Scenario 7 If the ALF sequence-level control switch flag of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the PPS-level syntax indicates that the ALF syntax exists in the image header, the ALF image header-level control switch flag is decoded from the image header-level syntax Bit. Further, if the ALF image header control switch flag of the image header syntax indicates that the current image does not allow ALF to be enabled, it is forbidden to decode the CCALF image header control switch flag from the image header syntax.
  • the ALF image header-level control switch flag of the image header-level grammar indicates that the current image does not allow ALF to be enabled, then regardless of the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows CCALF or not to be enabled CCALF, it is forbidden to decode the CCALF image header control switch flag from the image header syntax.
  • Application scenario 8 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the PPS-level grammar indicates that the ALF syntax exists in the film header, the ALF film-level control switch flag bit can be decoded from the film header-level grammar. Further, if the ALF header-level control switch flag bit of the introductory-level syntax indicates that the current film allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then CCALF can be decoded from the introductory syntax. The head-level control switch flag.
  • Application scenario 9 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the PPS-level grammar indicates that the ALF syntax exists in the film header, then the ALF film-level control switch flag bit can be decoded from the film header-level grammar. Further, if the ALF header-level control switch flag bit of the credit-level grammar indicates that the current slide allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow CCALF to be enabled, then it can be prohibited from the credit-level syntax Decode the CCALF film header level control switch flag bit.
  • Application Scenario 10 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the PPS-level grammar indicates that the ALF syntax exists in the film header, the ALF film-level control switch flag bit can be decoded from the film header-level grammar. Further, if the ALF header-level control switch flag bit of the credit-level grammar indicates that the current slice does not allow ALF to be enabled, the decoding of the CCALF credit-level control switch flag bit from the credit-level syntax can be prohibited.
  • the ALF header-level control switch flag bit of the intro-level syntax indicates that the current film does not allow ALF to be enabled
  • regardless of the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows or does not allow CCALF to be enabled, It is forbidden to decode the CCALF image header-level control switch flag from the film header-level syntax.
  • Application Scenario 11 If the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the image header, the ALF image header-level control can be decoded from the image header-level syntax Switch flag. Further, if the ALF image header control switch flag of the image header syntax indicates that the current image allows ALF, and the CCALF sequence control switch flag of the SPS syntax indicates that the current sequence allows CCALF to be enabled, you can start from the image header syntax Decoding CCALF image header control switch flag bit.
  • Application Scenario 12 If the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the image header, the ALF image header-level control switch is decoded from the image header-level syntax Flag bit. Further, if the ALF image head-level control switch flag bit of the image header-level syntax indicates that the current image allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence does not allow CCALF to be enabled, then the image header level is prohibited. In the syntax, the CCALF image header control switch flag is decoded.
  • Application scenario 13 If the ALF sequence-level control switch flag of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the image header, the ALF image header-level control switch is decoded from the image header-level syntax Flag bit. Further, if the ALF image header control switch flag of the image header syntax indicates that the current image does not allow ALF to be enabled, it is forbidden to decode the CCALF image header control switch flag from the image header syntax.
  • the ALF image header-level control switch flag of the image header-level grammar indicates that the current image does not allow ALF to be enabled, then regardless of the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows CCALF or not to be enabled CCALF, it is forbidden to decode the CCALF image header control switch flag from the image header syntax.
  • Application Scenario 14 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the image header-level grammar indicates that the ALF grammar exists in the film header, the ALF film header-level control switch flag bit can be decoded from the film header-level grammar . Further, if the ALF header-level control switch flag bit of the introductory-level syntax indicates that the current film allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then CCALF can be decoded from the introductory syntax. The head-level control switch flag.
  • Application scenario 15 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the image header-level grammar indicates that the ALF grammar exists in the film header, the ALF header-level control switch flag bit can be decoded from the film header-level grammar . Further, if the ALF header-level control switch flag bit of the credit-level grammar indicates that the current slide allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow CCALF to be enabled, then it can be prohibited from the credit-level syntax Decode the CCALF film header level control switch flag bit.
  • Application scenario 16 If the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the image header-level grammar indicates that the ALF grammar exists in the film header, the ALF film header-level control switch flag bit can be decoded from the film header-level grammar . Further, if the ALF header-level control switch flag bit of the credit-level grammar indicates that the current slice does not allow ALF to be enabled, the decoding of the CCALF credit-level control switch flag bit from the credit-level syntax can be prohibited.
  • the ALF header-level control switch flag bit of the intro-level syntax indicates that the current film does not allow ALF to be enabled
  • regardless of the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows or does not allow CCALF to be enabled, It is forbidden to decode the CCALF image header-level control switch flag from the film header-level syntax.
  • the design of high-level grammar provides flexibility in the use of CCALF. Improve the accuracy of the CCALF loop filter, improve the CCALF loop filter effect, improve the coding performance, and make the reconstruction value of the current processing unit closer to the original pixel.
  • the current processing unit may be an area that is being decoded.
  • Embodiment 3 For Embodiment 1 and Embodiment 2, the sequence level parameter set (SPS) syntax control of the CCALF technology can be referred to Table 1.
  • sps_alf_enabled_flag represents the ALF sequence level control switch flag bit (may also be referred to as the ALF sequence level switch flag bit)
  • sps_ccalf_enabled_flag represents the CCALF sequence level control switch flag bit (may also be referred to as the CCALF sequence level switch flag bit).
  • ChromaArrayType represents the luminance and chrominance format of the current sequence
  • ChromaArrayType! 0 means that there is a chrominance component in the current sequence.
  • the SPS syntax control shown in Table 1 is used to illustrate that only when the current sequence allows ALF to be enabled and the current sequence has chroma components, it is necessary to encode sps_ccalf_enabled_flag. The reason is that the CCALF technology is a subset of the ALF technology and is for chroma. The weight is carried out.
  • Embodiment 4 For Embodiment 1 and Embodiment 2, the general restriction information grammar control of the CCALF technology can be referred to Table 2.
  • general_constraint_info represents general restriction information syntax. If no_ccalf_constraint_flag is 1, it means that sps_ccalf_enabled_flag is 0, that is, through no_ccalf_constraint_flag, it means that CCALF is not allowed to be enabled. If no_ccalf_constraint_flag is 0, it means that there is no such restriction, that is, sps_ccalf_enabled_flag is not restricted to 0, that is, no_ccalf_constraint_flag is required to indicate that CCALF is not allowed to be enabled.
  • the value 0 and the value 1 are just examples.
  • Embodiment 5 For Embodiment 1 and Embodiment 2, the image parameter set (PPS) syntax control of CCALF technology can be referred to Table 3.
  • alf_present_in_ph_flag represents the PPS-level syntax
  • alf_present_in_ph_flag is 1, which means that the syntax related to ALF (including CCALF) exists in the picture header, that is, the encoding/decoding related information in the picture header.
  • alf_present_in_ph_flag is 0, indicating that the syntax related to ALF (including CCALF) exists in the slice header, that is, encoding/decoding related information at the slice header.
  • alf_present_in_ph_flag of 0 indicates that the syntax related to ALF (including CCALF) exists in the image header
  • alf_present_in_ph_flag of 1 indicates that the syntax related to ALF (including CCALF) exists in the film header.
  • Embodiment 6 For Embodiment 1 and Embodiment 2, the syntax related to ALF (including CCALF) in the image header can be referred to Table 4.
  • sps_alf_enabled_flag indicates the ALF sequence-level control switch flag
  • alf_present_in_ph_flag indicates that the ALF-related syntax exists in the image header or slice header (in this example)
  • pic_alf_enabled_flag indicates the ALF image header-level control switch flag
  • sps_ccalf_enabled_flag indicates the CCALF sequence-level control switch
  • the flag bit, pic_cross_component_alf_cb_enabled_flag and/or pic_cross_component_alf_cr_enabled_flag represents the CCALF image header control switch flag bit.
  • the CCALF image header-level control switch flag may include pic_cross_component_alf_cb_enabled_flag and/or pic_cross_component
  • the related syntax of ALF in the image header may include but is not limited to:
  • pic_alf_enabled_flag indicates whether ALF is allowed for the block in the image
  • pic_num_alf_aps_ids_luma indicates the number of sets of block luminance ALF filter coefficients in the image
  • pic_alf_aps_id_luma[i] indicates the index value of the i-th set of luminance ALF filter coefficients in the block in the image
  • pic_alf_chroma_idc indicates whether ALF is allowed for cb or cr in the image
  • pic_alf_aps_id_chroma indicates the index value of the chrominance ALF filter coefficient in the block in the image
  • the related syntax of CCALF in the image header may include but is not limited to:
  • pic_cross_component_alf_cb_enabled_flag indicates whether the block in the image allows cb component ccalf
  • pic_cross_component_alf_cb_aps_id indicates the filter coefficient index value used when the block in the image performs ccalf of the cb component
  • pic_cross_component_alf_cr_enabled_flag indicates whether the block in the image allows the ccalf of the cr component
  • pic_cross_component_alf_cr_aps_id indicates the filter coefficient index value used when the block in the image performs the ccalf of the cr component.
  • Embodiment 7 For Embodiment 1 and Embodiment 2, the syntax related to ALF (including CCALF) in the film header can be referred to Table 5.
  • sps_alf_enabled_flag indicates the ALF sequence-level control switch flag
  • alf_present_in_ph_flag indicates that the ALF-related syntax exists in the image header or the slice header (in this example)
  • slice_alf_enabled_flag indicates the ALF slice header-level control switch flag
  • sps_ccalf_enabled_flag indicates the CCALF sequence-level control switch flag.
  • Slice_cross_component_alf_cb_enabled_flag and/or slice_cross_component_alf_cr_enabled_flag represent the CCALF slice header-level control switch flag.
  • the CCALF header-level control switch flag may include slice_cross_component_alf_cb_enabled_flag and/or slice_cross_component_alf_cr_enabled_flag.
  • the related grammar of ALF in the title may include but is not limited to:
  • slice_alf_enabled_flag indicates whether ALF is allowed for the block in the slice
  • slice_num_alf_aps_ids_luma indicates the number of sets of block luminance ALF filter coefficients in the slice
  • slice_alf_aps_id_luma[i] indicates the index value of the i-th set of luminance ALF filter coefficients in the block in the slice;
  • slice_alf_chroma_idc indicates whether ALF is allowed for cb or cr in the slice
  • slice_alf_aps_id_chroma indicates the index value of the chrominance ALF filter coefficient in the block in the slice
  • the related grammar of CCALF in the title may include, but is not limited to:
  • slice_cross_component_alf_cb_enabled_flag indicates whether the block in the slice allows cb component ccalf
  • slice_cross_component_alf_cb_aps_id indicates the filter coefficient index value used when the block in the slice performs cb component ccalf
  • slice_cross_component_alf_cr_enabled_flag indicates whether the block in the slice is allowed to perform ccalf of the cr component
  • slice_cross_component_alf_cr_aps_id indicates the filter coefficient index value used when the block in the slice performs the ccalf of the cr component.
  • Embodiment 8 For Embodiment 1 and Embodiment 2, the difference from Embodiment 5 is that in the image header syntax of CCALF technology, pic_alf_enabled_present_flag represents the image header syntax, and pic_alf_enabled_present_flag is 1, which represents the syntax related to ALF (including CCALF) It exists in the picture header, that is, encoding/decoding related information in the picture header.
  • pic_alf_enabled_present_flag is 0, indicating that the syntax related to ALF (including CCALF) exists in the slice header, that is, encoding/decoding related information at the slice header.
  • pic_alf_enabled_present_flag of 0 indicates that the syntax related to ALF (including CCALF) exists in the image header
  • pic_alf_enabled_present_flag of 1 indicates that the syntax related to ALF (including CCALF) exists in the film header.
  • Embodiment 8 different from Embodiment 5 above, there is no PPS-level parameter alf_present_in_ph_flag. Instead of the PPS-level parameter, the parameter pic_alf_enabled_present_flag is encoded in the picture header. Exemplarily, pic_alf_enabled_present_flag and alf_present_in_ph_flag have the same meaning.
  • Embodiment 9 For Embodiment 1 and Embodiment 2, the syntax related to ALF (including CCALF) in the image header can be referred to Table 6.
  • sps_alf_enabled_flag indicates the ALF sequence-level control switch flag bit
  • pic_alf_enabled_present_flag indicates that the ALF-related syntax exists in the image header or the slice header (in this example)
  • pic_alf_enabled_flag indicates the ALF image header-level control switch flag
  • sps_ccalf_enabled_flag indicates the CCALF sequence-level control switch
  • the flag bit, pic_cross_component_alf_cb_enabled_flag and/or pic_cross_component_alf_cr_enabled_flag represents the CCALF image header control switch flag bit.
  • Embodiment 10 Regarding Embodiment 1 and Embodiment 2, the syntax related to ALF (including CCALF) in the film header can be referred to Table 7.
  • sps_alf_enabled_flag indicates the ALF sequence-level control switch flag
  • pic_alf_enabled_present_flag indicates that the ALF-related syntax exists in the image header or the slice header (in this example)
  • slice_alf_enabled_flag indicates the ALF slice header-level control switch flag
  • sps_ccalf_enabled_flag indicates the CCALF sequence-level control switch flag.
  • Slice_cross_component_alf_cb_enabled_flag and/or slice_cross_component_alf_cr_enabled_flag represent the CCALF slice header-level control switch flag.
  • u(1) means that 1 bit is used for encoding and decoding
  • u(n) means that an unsigned integer of n bits is used
  • n bits are used for encoding and decoding.
  • u(n) It is just an example and there is no restriction on this.
  • embodiment 3 to embodiment 10 can be combined arbitrarily, such as embodiment 3 and embodiment 4 can be combined; embodiment 3, embodiment 5 to embodiment 7 can be combined; embodiment 3, embodiment 8-implementation Example 10 can be combined; embodiment 3 to embodiment 7 can be combined; embodiment 3, embodiment 4, embodiment 8 to embodiment 10 can be combined; embodiment 3, embodiment 5, and embodiment 6 can be combined; embodiment 3 , Embodiment 5 and Embodiment 7 can be combined; Embodiment 3, Embodiment 8 and Embodiment 9 can be combined; Embodiment 3, Embodiment 8 and Embodiment 10 can be combined.
  • the foregoing are only examples of several combinations, and any at least two of the embodiments 3 to 10 can be combined to implement related processes.
  • Embodiment 11 Based on Embodiment 1 to Embodiment 10, if it is determined that CCALF is enabled for the current processing unit according to the CCALF control switch flag, the coding and decoding process shown in FIG. 4 can also be executed. Exemplarily, if the CCALF sequence-level control switch flag bit corresponding to the current processing unit indicates that the current sequence allows CCALF to be enabled, it is determined to enable CCALF for the current processing unit; or, if the CCALF image head-level control switch flag bit corresponding to the current processing unit indicates If the current image allows CCALF to be enabled, it is determined to enable CCALF for the current processing unit; or, if the CCALF film header level control switch flag corresponding to the current processing unit indicates that the current film allows CCALF to be enabled, then determine to enable CCALF for the current processing unit; or, if the current processing unit The CCALF sequence-level control switch flag bit corresponding to the processing unit indicates that the current sequence allows CCALF to be enabled, and the CCALF image head-
  • the encoding and decoding process shown in FIG. 4 may be used, and the encoding and decoding process may include:
  • Step 401 Obtain the reconstruction value of the luminance component and the reconstruction value of the chrominance component of each pixel position of the current processing unit.
  • the loop filtering may include, but is not limited to, deblocking filtering, SAO filtering, ALF filtering, CCALF filtering, etc.
  • deblocking filtering SAO filtering, ALF filtering, CCALF filtering
  • at least one of deblocking filtering, SAO filtering, ALF filtering, and CCALF filtering may be performed One, and there is no restriction on the order of filtering operations such as deblocking filtering, SAO filtering, ALF filtering, and CCALF filtering.
  • deblocking filtering, SAO filtering, ALF filtering, CCALF filtering and other operations can be performed, and the order of execution can be: deblocking filtering, SAO filtering, ALF filtering, CCALF filtering; or, deblocking filtering, SAO filtering, CCALF filtering, ALF filtering; or, deblocking filtering, CCALF filtering, SAO filtering, ALF filtering; or, CCALF filtering, deblocking filtering, SAO filtering, ALF filtering.
  • the above are just a few examples of the filtering order, and there is no restriction on this.
  • operations such as SAO filtering, ALF filtering, CCALF filtering can be performed, and the order of execution can be: SAO filtering, ALF filtering, CCALF filtering; or, SAO filtering, CCALF filtering, ALF filtering; or, CCALF filtering, SAO filtering, ALF filtering.
  • SAO filtering ALF filtering
  • CCALF filtering ALF filtering
  • operations such as deblocking filtering, SAO filtering, CCALF filtering can be performed, and the order of execution can be: deblocking filtering, SAO filtering, CCALF filtering; or, deblocking filtering, CCALF filtering, SAO filtering; or, CCALF filtering, Deblocking filtering, SAO filtering.
  • the order of execution can be: deblocking filtering, SAO filtering, CCALF filtering; or, deblocking filtering, CCALF filtering, SAO filtering; or, CCALF filtering, Deblocking filtering, SAO filtering.
  • Loop filtering may also include other types of filtering methods, which are not limited.
  • CCALF filtering may be the first filtering method of loop filtering. That is, in step 401, the reconstructed value of the luminance component is the reconstructed value of the unfiltered luminance component, and the chrominance The reconstructed component value is the reconstructed value of the chrominance component of the unfiltered wave.
  • CCALF filtering may be located after deblocking filtering, that is, in step 401, the reconstruction value of the luminance component is the reconstruction value of the luminance component after deblocking filtering, and the reconstruction value of the chrominance component is the chrominance after deblocking filtering. Component reconstruction value.
  • the CCALF filter may be located after the SAO filter, that is, in step 401, the luminance component reconstruction value is the luminance component reconstruction value after SAO filtering, and the chrominance component reconstruction value is the chrominance component reconstruction value after SAO filtering. value.
  • CCALF filtering may be located after ALF filtering, that is, in step 401, the reconstruction value of the luminance component is the reconstruction value of the luminance component after ALF filtering, and the reconstruction value of the chrominance component is the reconstruction value of the chrominance component after ALF filtering. value.
  • CCALF filtering and ALF filtering may also be performed at the same time.
  • CCALF filtering and ALF filtering are performed based on the reconstructed value of the luminance component and the reconstructed value of the chrominance component after SAO filtering.
  • CCALF filtering and ALF filtering are performed based on the reconstructed value of the luminance component and the reconstructed value of the chrominance component after deblocking filtering.
  • CCALF filtering and ALF filtering are performed based on the reconstructed value of the luminance component and the reconstructed value of the chrominance component of the unfiltered wave.
  • the reconstruction value of the luminance component and the reconstruction value of the chrominance component of each pixel position of the current processing unit can be obtained, for example, The reconstructed value of the luminance component after SAO filtering at each pixel position, and the reconstructed value of the chrominance component after SAO filtering at each pixel position.
  • Step 402 For the current pixel position of the current processing unit (that is, the pixel position of the reconstructed value of the chrominance component), determine the target pixel position of the current processing unit associated with the current pixel position (that is, the pixel position of the reconstructed value of the luminance component).
  • the pixel position of the reconstructed value of the chrominance component of the current processing unit may be called the current pixel position
  • the pixel position of the reconstructed value of the luminance component of the current processing unit may be called the target pixel position.
  • the target pixel position associated with the pixel position can be the same or different.
  • the current pixel position is pixel position a1
  • the target pixel position associated with the current pixel position is pixel position a1.
  • the current pixel position is the pixel position a1
  • the target pixel position associated with the current pixel position is the pixel position a2.
  • the sampling rate of the image where the current processing unit is located is in a 4:2:0 format
  • the current pixel position and the target pixel position associated with the current pixel position may be different.
  • the sampling rate of the image where the current processing unit is located is in a 4:4:4 format
  • the current pixel position and the target pixel position associated with the current pixel position may be the same.
  • the target pixel position associated with the current pixel position can be determined based on the sampling rate of the image where the current processing unit is located, and there is no restriction on the determination method.
  • the above method is only an example, and there is no restriction on this, as long as the target pixel position associated with the current pixel position can be determined.
  • the pixel position b1 is taken as the current pixel position, and the target pixel position associated with the current pixel position is determined, such as the target pixel
  • the position is the pixel position b2, and the pixel position b2 and the pixel position b1 may be the same or different.
  • Step 403 Perform filtering processing based on CCALF based on the reconstructed value of the luminance component of the target pixel position and the reconstructed value of the luminance component of the adjacent pixel position of the target pixel position to obtain the chrominance component offset value of the current pixel position.
  • the CCALF filter coefficient set of the current processing unit may be obtained; the CCALF filter coefficient of the target pixel position may be obtained, and the CCALF filter coefficient of the adjacent pixel position of the target pixel position may be obtained from the CCALF filter coefficient set. Then, based on the luminance component reconstruction value of the target pixel position, the CCALF filter coefficient of the target pixel position, the luminance component reconstruction value of the neighboring pixel position of the target pixel position and the CCALF filter coefficient of the neighboring pixel position, Perform filtering processing based on CCALF to obtain the chrominance component offset value of the current pixel position.
  • the filter coefficient when the CCALF is used for filter processing may be referred to as the CCALF filter coefficient.
  • Step 404 using the chrominance component reconstruction value of the current pixel position and the chrominance component offset value of the current pixel position to obtain the target chrominance component reconstruction value of the current pixel position.
  • the chrominance component reconstruction value of the current pixel position is compensated by the chrominance component offset value of the current pixel position to obtain the target chrominance component reconstruction value of the current pixel position.
  • step 403 and step 404 The following describes the processing procedures of step 403 and step 404 in combination with several specific situations.
  • the chrominance component reconstruction value includes the first chrominance component reconstruction value Cb and the second chrominance component reconstruction value Cr.
  • the first CCALF is used to obtain the first chrominance component reconstruction value Cb and the second chrominance component reconstruction value Cr.
  • the first chrominance component offset value I 1 corresponding to a chrominance component reconstruction value Cb
  • the second CCALF is used to obtain the second chrominance component offset value I 2 corresponding to the second chrominance component reconstruction value Cr.
  • I 0 is the reconstruction value of the luminance component of the target pixel position (that is, Luma) and the reconstruction value of the luminance component of the neighboring pixel position of the target pixel position (that is, Luma), and the target
  • the reconstructed value of the luminance component of the pixel position and the reconstructed value of the luminance component of the adjacent pixel position are input to the first CCALF and the second CCALF.
  • the first CCALF includes the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position. Therefore, the first CCALF can be based on the luminance component reconstruction value of the target pixel position, the CCALF filter coefficient of the target pixel position, and the adjacent pixel position.
  • the reconstructed value of the luminance component and the CCALF filter coefficients of adjacent pixel positions are subjected to CCALF-based filtering processing, and the filtering process is not limited, and the first chrominance component offset value I 1 of the current pixel position is obtained.
  • the second CCALF includes the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position. Therefore, the second CCALF can be based on the luminance component reconstruction value of the target pixel position, the CCALF filter coefficient of the target pixel position, and the adjacent pixel position.
  • the reconstructed value of the luminance component and the CCALF filter coefficients of adjacent pixel positions are subjected to CCALF-based filter processing. This filter processing process is not limited, and the second chrominance component offset value I 2 of the current pixel position is obtained.
  • the CCALF filter coefficient of the target pixel position in the first CCALF and the CCALF filter coefficient of the target pixel position in the second CCALF may be the same or different.
  • the CCALF filter coefficients of adjacent pixel positions in the first CCALF and the CCALF filter coefficients of adjacent pixel positions in the second CCALF may be the same or different.
  • the filter processing method of the first CCALF and the filter processing method of the second CCALF may be the same or different.
  • the first chrominance component reconstruction value Cb and the first chrominance component offset value I 1 can be used to obtain the first target color at the current pixel position
  • the reconstruction value Cb′ of the degree component for example, the sum of the reconstruction value Cb of the first chrominance component and the offset value I 1 of the first chrominance component is used as the reconstruction value of the first target chrominance component Cb′.
  • the second chrominance component reconstruction value Cr and the second chrominance component offset value I 2 can be used to obtain the second target color at the current pixel position.
  • the degree component reconstruction value Cr′ for example, the sum of the second chrominance component reconstruction value Cr and the second chrominance component offset value I 2 is used as the second target chrominance component reconstruction value Cr′.
  • the reconstructed value of the target chrominance component at the current pixel position namely Cb' and Cr', can be obtained.
  • the chrominance component reconstruction value includes the first chrominance component reconstruction value Cb and the second chrominance component reconstruction value Cr
  • CCALF is used to obtain the chrominance component Offset value
  • the chrominance component offset value is used as the first chrominance component offset value I 1 corresponding to the first chrominance component reconstruction value Cb
  • the second chrominance component reconstruction is obtained based on the chrominance component offset value
  • the second chrominance component offset value I 2 corresponding to the value Cr.
  • I 0 can be the reconstruction value of the luminance component at the target pixel position (that is, Luma) and the reconstruction value of the luminance component at the neighboring pixel position of the target pixel position (that is, Luma).
  • the reconstructed value of the luminance component at the target pixel position and the reconstructed value of the luminance component at the adjacent pixel position are input to CCALF (that is, joint CCALF).
  • CCALF includes the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position. Therefore, CCALF can reconstruct the value based on the luminance component of the target pixel position, the CCALF filter coefficient of the target pixel position, and the luminance component of the adjacent pixel position.
  • the structure value and the CCALF filter coefficients of adjacent pixel positions are subjected to CCALF-based filter processing. This filter processing process is not limited, and the first chrominance component offset value I 1 of the current pixel position is obtained.
  • the second chrominance component offset value I 2 of the current pixel position is obtained according to the first chrominance component offset value I 1.
  • the second chrominance component offset value I 2 may be the first chrominance component offset
  • the value I 1 is multiplied by the coefficient w.
  • the coefficient w can be arbitrarily configured, and there is no restriction on this.
  • the decoding end the encoding end can transmit the coefficient w to the decoding end through the code stream, and the decoding end analyzes the coefficient w from the code stream, that is, the coefficient w at the decoding end is the same as the coefficient w at the encoding end.
  • the first chrominance component reconstruction value Cb and the first chrominance component offset value I 1 can be used to obtain the first target color at the current pixel position
  • the reconstruction value Cb′ of the degree component for example, the sum of the reconstruction value Cb of the first chrominance component and the offset value I 1 of the first chrominance component is used as the reconstruction value of the first target chrominance component Cb′.
  • the second chrominance component reconstruction value Cr and the second chrominance component offset value I 2 can be used to obtain the second target color at the current pixel position.
  • the degree component reconstruction value Cr′ for example, the sum of the second chrominance component reconstruction value Cr and the second chrominance component offset value I 2 is used as the second target chrominance component reconstruction value Cr′.
  • the reconstructed value of the target chrominance component at the current pixel position namely Cb' and Cr', can be obtained.
  • Case three see Figure 5C, which is a schematic diagram of the joint filtering process of CCALF and ALF.
  • the chrominance component reconstruction value includes the first chrominance component reconstruction value Cb and the second chrominance component reconstruction value Cr, and the first CCALF uses To obtain the first chrominance component offset value I 1 corresponding to the first chrominance component reconstruction value Cb, the second CCALF is used to obtain the second chrominance component offset value I corresponding to the second chrominance component reconstruction value Cr 2 .
  • I 0 is the reconstruction value of the luminance component of the target pixel position (namely Luma) and the reconstruction value of the luminance component of the adjacent pixel position of the target pixel position (namely Luma), and the luminance component of the target pixel position is reproduced
  • the structure value and the reconstructed value of the luminance component of the adjacent pixel position are input to the first CCALF and the second CCALF.
  • the first CCALF includes the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position. Therefore, the first CCALF can be based on the luminance component reconstruction value of the target pixel position, the CCALF filter coefficient of the target pixel position, and the adjacent pixel position.
  • the reconstructed value of the luminance component and the CCALF filter coefficients of adjacent pixel positions are subjected to CCALF-based filtering processing, and the filtering process is not limited, and the first chrominance component offset value I 1 of the current pixel position is obtained.
  • the second CCALF includes the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position. Therefore, the second CCALF can be based on the luminance component reconstruction value of the target pixel position, the CCALF filter coefficient of the target pixel position, and the adjacent pixel position.
  • the reconstructed value of the luminance component and the CCALF filter coefficients of adjacent pixel positions are subjected to CCALF-based filter processing. This filter processing process is not limited, and the second chrominance component offset value I 2 of the current pixel position is obtained.
  • the reconstructed value of the luminance component at the target pixel position is directly used as the reconstructed value of the target luminance component at the target pixel position.
  • the ALF-based filtering process is performed based on the luminance component reconstruction value of the target pixel position and the ALF luminance filter coefficient to obtain the target luminance component reconstruction value of the target pixel position.
  • the reconstructed value of the luminance component at the target pixel position and the reconstructed value of the luminance component at the adjacent pixel position may be input to the first ALF, and the first ALF is used for filtering the reconstructed value of the luminance component.
  • the first ALF may include the ALF luminance filter coefficient at the target pixel position and the ALF luminance filter coefficient at the adjacent pixel position.
  • the first ALF may be based on the luminance component reconstruction value at the target pixel position, the ALF luminance filter coefficient at the target pixel position, The reconstructed value of the luminance component of the adjacent pixel position and the ALF luminance filter coefficient of the adjacent pixel position are subjected to ALF-based filtering processing, this filtering process is not limited, and the target luminance component reconstruction value of the target pixel position is finally obtained.
  • the target chrominance component reconstruction value is determined according to the chrominance component reconstruction value and the chrominance component offset value.
  • the ALF-based filtering process is performed to obtain the chrominance component reconstruction after the filtering process at the current pixel position Value; for example, based on the chrominance component reconstruction value of the current pixel position and the ALF chrominance filter coefficient of the current pixel position, the chrominance component reconstruction value of the adjacent pixel position of the current pixel position and the adjacent pixel position of the current pixel position.
  • the ALF chrominance filter coefficient of is subjected to ALF-based filtering processing to obtain the chrominance component reconstruction value after filtering processing at the current pixel position.
  • the target chrominance component is determined according to the chrominance component reconstruction value and the chrominance component offset value at the current pixel position.
  • the first chrominance component reconstruction value Cb at the current pixel position and the first chrominance component reconstruction value Cb at the adjacent pixel position of the current pixel position are input to the second ALF.
  • the second ALF includes the ALF chrominance filter coefficient of the current pixel position, and the ALF chrominance filter coefficient of the adjacent pixel position of the current pixel position.
  • the second ALF can be based on the first chrominance component reconstruction value Cb of the current pixel position,
  • the ALF chrominance filter coefficient of the current pixel position, the first chrominance component reconstruction value Cb of the adjacent pixel position of the current pixel position, and the ALF chrominance filter coefficient of the adjacent pixel position of the current pixel position are subjected to ALF-based filtering processing, Obtain the reconstructed value of the first chrominance component after the filtering process. Then, the sum of the filtered first chrominance component reconstruction value and the first chrominance component offset value I 1 is used as the first target chrominance component reconstruction value Cb′.
  • the second chrominance component reconstruction value Cr at the current pixel position and the second chrominance component reconstruction value Cr at the adjacent pixel position of the current pixel position are input to the second ALF.
  • the second ALF includes the ALF chrominance filter coefficient of the current pixel position, and the ALF chrominance filter coefficient of the adjacent pixel position of the current pixel position.
  • the second ALF can be based on the second chrominance component reconstruction value Cr at the current pixel position,
  • the ALF chrominance filter coefficient of the current pixel position, the second chrominance component reconstruction value Cr of the adjacent pixel position of the current pixel position, and the ALF chrominance filter coefficient of the adjacent pixel position of the current pixel position are subjected to ALF-based filtering processing, Obtain the reconstructed value of the second chrominance component after the filtering process.
  • the sum of the filtered second chrominance component reconstruction value and the second chrominance component offset value I 2 may be used as the second target chrominance component reconstruction value Cr′.
  • the manner in which the second ALF performs filtering processing on the first chrominance component reconstruction value Cb and the manner in which the second chrominance component reconstruction value Cr is filtered may be the same or different. This is not limited.
  • the target chrominance component reconstruction value at the current pixel position can be obtained, that is, the first target chrominance component reconstruction value Cb' and the second target chrominance component reconstruction value Cr', and the target pixel position The reconstructed value of the target luminance component.
  • Case four see Figure 5D, which is a schematic diagram of the joint filtering process of CCALF and ALF.
  • the chrominance component reconstruction value includes the first chrominance component reconstruction value Cb and the second chrominance component reconstruction value Cr.
  • CCALF is used to obtain The chrominance component offset value, which is used as the first chrominance component offset value I 1 corresponding to the first chrominance component reconstruction value Cb, and the second chrominance is obtained based on the chrominance component offset value The second chrominance component offset value I 2 corresponding to the component reconstruction value Cr.
  • I 0 can be the reconstruction value of the luminance component of the target pixel position and the luminance component reconstruction value of the adjacent pixel position of the target pixel position, and the luminance component reconstruction value of the target pixel position and the luminance component of the adjacent pixel position can be reconstructed
  • the value is input to CCALF (i.e. joint CCALF).
  • CCALF includes the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position. Therefore, it can be based on the reconstruction value of the luminance component of the target pixel position, the CCALF filter coefficient of the target pixel position, and the luminance component of the adjacent pixel position.
  • the value and the CCALF filter coefficient of the adjacent pixel position are subjected to CCALF-based filtering processing to obtain the first chrominance component offset value I 1 of the current pixel position.
  • the second chrominance component offset value I 2 of the current pixel position according to the first chrominance component offset value I 1 for example, the second chrominance component offset value I 2 is multiplied by the first chrominance component offset value I 1 Take the coefficient w.
  • the ALF-based filtering process is performed to obtain the reconstruction value of the target luminance component at the target pixel position.
  • the reconstructed value of the luminance component of the target pixel position and the reconstructed value of the luminance component of the adjacent pixel position may be input to the first ALF.
  • the first ALF includes the ALF luminance filter coefficient at the target pixel position and the ALF luminance filter coefficient at the adjacent pixel position.
  • the first ALF can be based on the luminance component reconstruction value at the target pixel position, the ALF luminance filter coefficient at the target pixel position, and the corresponding
  • the reconstructed value of the luminance component of the adjacent pixel position and the ALF luminance filter coefficient of the adjacent pixel position are subjected to ALF-based filtering processing, this filtering process is not limited, and the target luminance component reconstruction value of the target pixel position is obtained.
  • the first chrominance component reconstruction value Cb at the current pixel position and the first chrominance component reconstruction value Cb at the adjacent pixel position of the current pixel position are input to the second ALF.
  • the second ALF includes the ALF chrominance filter coefficient of the current pixel position, and the ALF chrominance filter coefficient of the adjacent pixel position of the current pixel position.
  • the second ALF can be based on the first chrominance component reconstruction value Cb of the current pixel position,
  • the ALF chrominance filter coefficient of the current pixel position, the first chrominance component reconstruction value Cb of the adjacent pixel position of the current pixel position, and the ALF chrominance filter coefficient of the adjacent pixel position of the current pixel position are subjected to ALF-based filtering processing, Obtain the reconstructed value of the first chrominance component after the filtering process. Then, the sum of the filtered first chrominance component reconstruction value and the first chrominance component offset value I 1 is used as the first target chrominance component reconstruction value Cb′.
  • the second chrominance component reconstruction value Cr at the current pixel position and the second chrominance component reconstruction value Cr at the adjacent pixel position of the current pixel position are input to the second ALF.
  • the second ALF includes the ALF chrominance filter coefficient of the current pixel position, and the ALF chrominance filter coefficient of the adjacent pixel position of the current pixel position.
  • the second ALF can be based on the second chrominance component reconstruction value Cr at the current pixel position,
  • the ALF chrominance filter coefficient of the current pixel position, the second chrominance component reconstruction value Cr of the adjacent pixel position of the current pixel position, and the ALF chrominance filter coefficient of the adjacent pixel position of the current pixel position are subjected to ALF-based filtering processing, Obtain the reconstructed value of the second chrominance component after the filtering process.
  • the sum of the filtered second chrominance component reconstruction value and the second chrominance component offset value I 2 may be used as the second target chrominance component reconstruction value Cr′.
  • the target chrominance component reconstruction value at the current pixel position can be obtained, that is, the first target chrominance component reconstruction value Cb' and the second target chrominance component reconstruction value Cr', and the target pixel position The reconstructed value of the target luminance component.
  • CCALF and ALF coexist, that is, the joint filtering of CCALF and ALF is adopted.
  • CCALF can be independent of ALF, that is, when ALF is turned off, CCALF can still be used to compensate the chrominance component reconstruction value to obtain the target chrominance component reconstruction value.
  • CCALF is used to obtain the chrominance component offset value, and then the chrominance component offset value is used to compensate the chrominance component reconstruction value at the current pixel position.
  • the loop filtering operation of ALF is performed on at least one pixel position (that is, the current pixel position), and the reconstructed value after ALF is added to the chrominance component offset value (based on the target pixel position).
  • the reconstructed value of the luminance component is obtained), and the reconstructed value of the target chrominance component at the current pixel position is obtained.
  • filtering processing based on CCALF can be performed to obtain the current pixel position.
  • Chrominance component offset value and use the chrominance component reconstruction value of the current pixel position and the chrominance component offset value of the current pixel position to obtain the target chrominance component reconstruction value of the current pixel position, and improve the CCALF loop
  • the accuracy of filtering improves the loop filtering effect of CCALF, improves coding performance, and makes the reconstructed value of the current processing unit closer to the original pixel.
  • Embodiment 12 In Embodiment 11, it is necessary to perform CCALF-based filtering processing according to the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position. In order to obtain the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position, the following methods can be used:
  • Step s11 Both the encoding end and the decoding end maintain a CCALF filter coefficient list, and the CCALF filter coefficient list may include at least one CCALF filter coefficient set. For each CCALF filter coefficient set in the CCALF filter coefficient list, the CCALF filter coefficient set may include multiple CCALF filter coefficients.
  • the CCALF filter coefficient set For each CCALF filter coefficient set, the CCALF filter coefficient set includes the CCALF filter coefficient of the target pixel position (that is, the CCALF filter coefficient of a target pixel position) and the CCALF filter coefficients of adjacent pixel positions of the target pixel position (such as multiple CCALF filter coefficients of adjacent pixel positions).
  • the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position can be obtained from the CCALF filter coefficient set.
  • the CCALF filter coefficient set may include the CCALF filter coefficients of the adjacent pixel positions of the target pixel position (such as the CCALF filter coefficients of multiple adjacent pixel positions), but does not include the CCALF of the target pixel position Filter coefficient.
  • the CCALF filter coefficients of adjacent pixel positions can be obtained from the CCALF filter coefficient set.
  • the preset value can be used as the CCALF filter coefficient of the target pixel position, or other methods can be used to obtain the CCALF filter coefficient of the target pixel position. There is no restriction on this, but the CCALF filter coefficient set does not include the target The CCALF filter coefficient of the pixel position.
  • the encoding end and the decoding end may pre-configure the CCALF filter coefficient list, as long as the CCALF filter coefficient list of the encoding end is the same as the CCALF filter coefficient list of the decoding end.
  • the CCALF filter coefficient list A is configured on the encoding end in advance, and the CCALF filter coefficient list A is configured on the decoding end.
  • the encoding end can obtain the CCALF filter coefficient list, and there is no restriction on the obtaining method, as long as the CCALF filter coefficient list can be obtained. Then, the encoding end sends the CCALF filter coefficient list to the decoding end through the code stream, and the decoding end can parse the CCALF filter coefficient list from the code stream.
  • the CCALF filter coefficient list may be a frame-level CCALF filter coefficient list, that is, for all image blocks in a frame of image, the same frame-level CCALF filter coefficient list is shared.
  • the encoding end carries the frame-level CCALF filter coefficient list through the code stream, and the decoding end parses the frame-level CCALF filter coefficient list from the code stream.
  • the decoder can store the CCALF filter coefficient list locally.
  • the CCALF filter coefficient list may be a sequence-level (SPS) CCALF filter coefficient list, that is, for all image blocks in a multi-frame image, the same sequence-level CCALF filter coefficient list is shared.
  • SPS sequence-level
  • the encoding end carries the sequence-level CCALF filter coefficient list through the code stream, and the decoding end parses the sequence-level CCALF filter coefficient list from the code stream.
  • the decoder can store the CCALF filter coefficient list locally.
  • the CCALF filter coefficient list may be an adaptive parameter set (Adaptive Parameter Set, APS) level CCALF filter coefficient list, that is, for all image blocks in a multi-frame image, a CCALF that shares the same adaptive parameter set level List of filter coefficients.
  • the encoding end carries the adaptive parameter set level CCALF filter coefficient list through the code stream, and the decoding end parses the adaptive parameter set level CCALF filter coefficient list from the code stream. After obtaining the CCALF filter coefficient list at the adaptive parameter set level, the decoder can store the CCALF filter coefficient list locally.
  • CCALF filter coefficient list at the adaptive parameter set level there may be at least one CCALF filter coefficient list at the adaptive parameter set level, and an adaptive parameter set level is selected from at least one CCALF filter coefficient list at the adaptive parameter set level
  • the list of CCALF filter coefficients is used as a list of image-level or slice-level CCALF filter coefficients.
  • the CCALF filter coefficient list may also be a CCALF filter coefficient list at the image parameter set (PPS) level, or a CCALF filter coefficient list at the slice level (SLICE or TILE).
  • Step s12 Obtain the CCALF filter coefficient set of the current processing unit. For example, for both the encoding end and the decoding end, the CCALF filter coefficient set of the current processing unit is obtained from the CCALF filter coefficient list of the current processing unit.
  • the CCALF filter coefficient list of the current processing unit may be determined according to the frame-level CCALF filter coefficient list.
  • the CCALF filter coefficient list of the frame where the current processing unit is located can be determined as the CCALF filter coefficient list of the current processing unit.
  • the CCALF filter coefficient list of the current processing unit may be determined according to the sequence-level CCALF filter coefficient list.
  • the CCALF filter coefficient list of the sequence where the current processing unit is located can be determined as the CCALF filter coefficient list of the current processing unit.
  • the CCALF filter coefficient list of the current processing unit is determined according to the CCALF filter coefficient list at the adaptive parameter set level. For example, the CCALF filter coefficient list of the adaptive parameter set where the current processing unit is located is determined as the CCALF filter coefficient list of the current processing unit.
  • the encoder can determine the rate-distortion cost value corresponding to the CCALF filter coefficient set, and there is no restriction on the determination method.
  • the CCALF filter coefficient set corresponding to the smallest rate-distortion cost value is used as the CCALF filter coefficient set of the current processing unit.
  • the encoded bit stream may carry indication information of the CCALF filter coefficient set. For example, if the current processing unit has not started the CCALF filtering operation, the indication information of the CCALF filter coefficient set is used to indicate that the current processing unit has not started the CCALF filtering operation. Or, if the current processing unit starts the CCALF filtering operation, the indication information of the CCALF filter coefficient set is used to instruct the current processing unit to start the CCALF filtering operation, and the indication information is used to indicate that the CCALF filter coefficient set of the current processing unit is in the CCALF filter coefficient list The index value in.
  • the coded bit stream of the current processing unit is obtained, and the indication information of the CCALF filter coefficient set is obtained from the coded bit stream. If the indication information is used to indicate that the current processing unit has not started the CCALF filtering operation, the decoding end does not need to perform the CCALF filtering operation. If the indication information is used to instruct the current processing unit to start the CCALF filtering operation, and indicate the index value of the CCALF filter coefficient set of the current processing unit in the CCALF filter coefficient list, the decoder will obtain the CCALF filter coefficients of the current processing unit based on the indication information.
  • the CCALF filter coefficient set of the current processing unit is acquired from the list, for example, the CCALF filter coefficient set corresponding to the index value in the CCALF filter coefficient list is taken as the CCALF filter coefficient set of the current processing unit. Then, the decoding end performs the CCALF filtering operation based on the CCALF filter coefficient set of the current processing unit.
  • Step s13 Obtain the CCALF filter coefficient of the target pixel position, and obtain the CCALF filter coefficient of the adjacent pixel position of the target pixel position from the CCALF filter coefficient set of the current processing unit. For example, if the CCALF filter coefficient set includes the CCALF filter coefficient of the target pixel position, the CCALF filter coefficient of the target pixel position is obtained from the CCALF filter coefficient set of the current processing unit. Or, if the CCALF filter coefficient set does not include the CCALF filter coefficient of the target pixel position, the preset value is used as the CCALF filter coefficient of the target pixel position, or other methods are used to obtain the CCALF filter coefficient of the target pixel position. There is no restriction on this.
  • the CCALF filter coefficient of the target pixel position can be obtained.
  • the reconstruction value of the luminance component at the target pixel position, the CCALF filter coefficient at the target pixel position, and the CCALF filter coefficient at the adjacent pixel position can be obtained.
  • the reconstructed value of the luminance component and the CCALF filter coefficients of adjacent pixel positions are subjected to CCALF-based filtering processing to obtain the chrominance component offset value of the current pixel position.
  • CCALF-based filtering processing for the specific implementation process, please refer to the foregoing embodiment.
  • the CCALF filter coefficient list (such as the CCALF filter coefficient list at the frame level, or the CCALF filter coefficient list at the sequence level, or the CCALF filter coefficient list at the adaptive parameter set level) is transmitted through the code stream
  • the CCALF filter coefficient list is The filter coefficient list includes at least one CCALF filter coefficient set, and for each CCALF filter coefficient set, it may include at least one CCALF filter coefficient.
  • the CCALF filter coefficient is 0, or 2 to the Nth power, or the inverse of 2 to the N power, and N is 0 or less than the first threshold Positive integer; and/or, the CCALF filter coefficient is located between the second threshold and the third threshold.
  • the CCALF filter coefficient can be limited, and the CCALF filter coefficient can be limited to 0, or the Nth power of 2 (that is, the power), or the power of 2.
  • the inverse number of the Nth power, the first threshold can be configured according to experience, and there is no restriction on this, for example, the first threshold is 5, 6, etc.
  • the CCALF filter coefficient can be 0, 1, 2, 4, 8, 16, 32, 64, -1, -2, -4, -8, -16, -32, -64, etc.
  • the above restriction relationship needs to be satisfied.
  • the CCALF filter coefficient is limited between the second threshold and the third threshold.
  • Both the second threshold and the third threshold can be configured based on experience, and there is no restriction on this.
  • the second threshold can be a negative value.
  • the third threshold can be positive.
  • the second threshold can be -64, and the third threshold can be 64. In this way, the CCALF filter coefficient can be limited to the range of [-64, 64].
  • the second threshold can be -63
  • the third threshold can be 63. In this way, the CCALF filter coefficient can be limited to the range of [-63, 63].
  • the second threshold can be -127
  • the third threshold can be 127.
  • the CCALF filter coefficient can be Limited to the range of [-127, 127], for example, the second threshold can be -32, and the third threshold can be 32. In this way, the CCALF filter coefficient can be limited to the range of [-32, 32].
  • the above are just a few examples, and there is no restriction on this. In summary, for each CCALF filter coefficient in the CCALF filter coefficient set, the above restriction relationship needs to be satisfied.
  • the CCALF filter coefficient can be 0, or the N-th power of 2, or the inverse of the N-th power of 2, where N is 0 or a positive integer less than the first threshold, and limit the CCALF filter coefficient to the second threshold
  • the first threshold is 6
  • the second threshold can be -63
  • the third threshold can be 63
  • the CCALF filter coefficient can be 0, 1, 2, 4, 8, 16, 32,- 1, -2, -4, -8, -16, -32, that is, each CCALF filter coefficient needs to meet the above restriction relationship.
  • the CCALF filter coefficient list when the CCALF filter coefficient list is transmitted through the code stream, the CCALF filter coefficient list includes at least one CCALF filter coefficient set, and each CCALF filter coefficient set includes at least one CCALF filter coefficient.
  • the fixed-length code encoding method is used to map the CCALF filter coefficient (for example, when the CCALF filter coefficient is the Nth power of 2, the mapping value is N+1) Encoding is performed, and a fixed-length code decoding method is used to decode the mapping value of the CCALF filter coefficient.
  • a fixed-length code encoding method is adopted to encode the mapping value of the CCALF filter coefficient, and the encoded mapping value is added to the code stream, thereby fixing the encoding bit overhead and reducing the bit overhead.
  • the fixed-length code decoding method is used to decode the mapping value of the CCALF filter coefficient to obtain the decoded mapping value, and the mapping value is converted to the CCALF filter coefficient, for example, the mapping value N+1 is converted to N of 2.
  • the power of 2 and the N power of 2 is the CCALF filter coefficient.
  • the CCALF filter coefficient list when the CCALF filter coefficient list is transmitted through the code stream, the CCALF filter coefficient list includes at least one CCALF filter coefficient set, and each CCALF filter coefficient set includes at least one CCALF filter coefficient.
  • the code stream may include the indication information r1 and the indication information r2 of the CCALF filter coefficient, and the indication information r1 is used to indicate the value of the CCALF filter coefficient. Amplitude, the indication information r2 is used to indicate the sign bit of the CCALF filter coefficient.
  • the encoder adds indication information r1 and indication information r2 to the code stream.
  • the indication information r1 is used to indicate the amplitude of the CCALF filter coefficient (such as 32), and the indication information r2 can be one bit to indicate the positive and negative values. Sign bit.
  • the indication information r1 is first parsed from the code stream, and the magnitude of the CCALF filter coefficient (such as 32) is determined based on the indication information r1.
  • the indication information r2 is parsed from the code stream, and the sign bit of the CCALF filter coefficient is determined based on the indication information r2. Then, the amplitude of the CCALF filter coefficient and the sign bit of the CCALF filter coefficient are combined to form the CCALF filter coefficient.
  • the encoding method of CCALF filter coefficients can include: when the CCALF filter coefficient is 2 to the Nth power (or the inverse of 2 to the Nth power), the CCALF filter coefficient is The amplitude is mapped, and the mapping value is N+1. If the CCALF filter coefficient is 2 to the third power (or the inverse of 2 to the third power), the mapping value is 4. Then, the fixed-length code encoding method is used to encode the mapping value 4.
  • the length of the fixed-length code depends on the maximum range of the CCALF filter coefficient. For example, when N is at most 7, the length of the fixed-length code requires M bits for encoding, such as M Can be 3.
  • a bit is added to the code stream to indicate the positive and negative sign bits of the CCALF filter coefficient.
  • the CCALF filter coefficient is 0, there is no need to perform a mapping process, and the CCALF filter coefficient is directly encoded in the code stream.
  • the decoding method of CCALF filter coefficients can include: when decoding the CCALF filter coefficients from the code stream, the fixed-length code decoding method is used to decode the CCALF filter coefficients in the code stream to obtain the mapping value (ie N+ 1) Then, the mapping value is converted to the Nth power of 2, for example, if the mapping value is 4, the mapping value is converted to the 3rd power of 2, which is 8. Then, the positive and negative sign bits of the CCALF filter coefficient are analyzed from the code stream. If it is a positive sign bit, the CCALF filter coefficient is 8, and if it is a negative sign bit, the CCALF filter coefficient is -8. So far, CCALF is obtained. Filter coefficient.
  • the decoding end parses out 0 from the code stream, it can directly determine that the CCALF filter coefficient is 0.
  • the parameter value (ie, the CCALF filter coefficient) can be only 2 to the nth power (so that the multiplication rule can be realized by shifting, and the hardware implementation complexity is low). Specifically, it can be only one of the following coefficients : ⁇ -64,-32,-16,-8,-4,-2,-1,0,1,2,4,8,16,32,64 ⁇ .
  • Corresponding index that is, an index value of -7 indicates -64
  • an index value of 0 indicates 0, and an index value of 7 indicates 64.
  • the absolute value can also be encoded with a fixed length of 3 bits, and one flag bit is encoded to express the sign bit. For the specific process, refer to the above-mentioned embodiment.
  • Embodiment 13 In Embodiment 11 and Embodiment 12, the CCALF filter coefficient set may be involved.
  • the CCALF filter coefficient set includes the CCALF filter coefficient of the target pixel position and the CCALF filter coefficient of the adjacent pixel position of the target pixel position, or, CCALF
  • the filter coefficient set includes CCALF filter coefficients of adjacent pixel positions of the target pixel position. The following describes the CCALF filter coefficients in the CCALF filter coefficient set in combination with several specific situations.
  • the CCALF filter coefficient set includes: the CCALF filter coefficient of the pixel position directly above the target pixel position (ie pixel position A1), and the CCALF of the left pixel position of the target pixel position (ie pixel position A2) Filter coefficient, the CCALF filter coefficient of the right pixel position of the target pixel position (ie pixel position A4), the CCALF filter coefficient of the pixel position directly below the target pixel position (ie pixel position A6), the lower left pixel position of the target pixel position (Ie pixel position A5) CCALF filter coefficient, the CCALF filter coefficient of the lower right pixel position of the target pixel position (ie pixel position A7), the second row of pixel position directly below the target pixel position (ie pixel position A8) CCALF filter coefficient.
  • FIG. 6A it is a 3 ⁇ 2 shape, and for each chrominance component, there are at most 4 sets of filter coefficient values. Since there are at most 2 chrominance components, there are at most 8 sets of CCALF filter coefficient values.
  • the CCALF filter coefficient at pixel position A1 is f0
  • the CCALF filter coefficient at pixel position A2 is f1
  • the CCALF filter coefficient at pixel position A3 is f2
  • the CCALF filter coefficient at pixel position A4 is f2.
  • the filter coefficient is f3, the CCALF filter coefficient at pixel position A5 is f4, the CCALF filter coefficient at pixel position A6 is f5, the CCALF filter coefficient at pixel position A7 is f6, and the CCALF filter coefficient at pixel position A8 is f7.
  • the CCALF filter coefficients of each pixel position are different
  • f2 is the CCALF filter coefficient of the target pixel position
  • f0, f1, f3, f4, f5, f6, and f7 are the CCALF filter coefficients of each adjacent pixel position.
  • the CCALF filter coefficient at pixel position A1 is f0
  • the CCALF filter coefficient at pixel position A2 is f1
  • the CCALF filter coefficient at pixel position A3 is f2
  • the CCALF filter coefficient at pixel position A4 is f2.
  • the CCALF filter coefficient is f3, the CCALF filter coefficient at pixel position A5 is f4
  • the CCALF filter coefficient at pixel position A6 is f5
  • the CCALF filter coefficient at pixel position A7 is f6
  • the CCALF filter coefficient at pixel position A8 is f0.
  • f2 is the CCALF filter coefficient of the target pixel position
  • f0, f1, f3, f4, f5, and f6 are the CCALF filter coefficients of each adjacent pixel position.
  • the pixel position A1 that is, the pixel position directly above
  • the CCALF filter coefficient f0 may be the same as the CCALF filter coefficient f0 at the pixel position A8 (that is, the pixel position in the second row directly below).
  • the CCALF filter coefficient at pixel position A1 is f0
  • the CCALF filter coefficient at pixel position A2 is f1
  • the CCALF filter coefficient at pixel position A3 is f2
  • the CCALF filter coefficient at pixel position A4 is f2.
  • the CCALF filter coefficient is f1
  • the CCALF filter coefficient at pixel position A5 is f3
  • the CCALF filter coefficient at pixel position A6 is f4
  • the CCALF filter coefficient at pixel position A7 is f3
  • the CCALF filter coefficient at pixel position A8 is f0.
  • f2 is the CCALF filter coefficient of the target pixel position
  • f0, f1, f3, and f4 are the CCALF filter coefficients of each adjacent pixel position.
  • the CCALF filter coefficient f0 at the pixel position A1 is the same as the CCALF filter coefficient f0 at the pixel position A8 (that is, the pixel position in the second row directly below).
  • the CCALF filter coefficient f1 at the pixel position A2 (that is, the left pixel position) is the same as the CCALF filter coefficient f1 at the pixel position A4 (that is, the right pixel position).
  • the CCALF filter coefficient f3 at the pixel position A5 (that is, the lower left pixel position) is the same as the CCALF filter coefficient f3 at the pixel position A7 (that is, the lower right pixel position).
  • the design of the CCALF filter coefficients is simplified, and the number of CCALF filter coefficients in the CCALF filter coefficient set is reduced.
  • the CCALF filter coefficient at pixel position A1 is f0
  • the CCALF filter coefficient at pixel position A2 is f1
  • the CCALF filter coefficient at pixel position A3 is f2
  • the CCALF filter coefficient at pixel position A4 is f2.
  • the CCALF filter coefficient is f3, the CCALF filter coefficient at pixel position A5 is f3, the CCALF filter coefficient at pixel position A6 is f4, the CCALF filter coefficient at pixel position A7 is f1, and the CCALF filter coefficient at pixel position A8 is f0.
  • f2 is the CCALF filter coefficient of the target pixel position
  • f0, f1, f3, and f4 are the CCALF filter coefficients of each adjacent pixel position.
  • the CCALF filter coefficient f0 at the pixel position A1 (that is, the pixel position directly above) is the same as the CCALF filter coefficient f0 at the pixel position A8 (that is, the pixel position in the second row directly below).
  • the CCALF filter coefficient f1 at the pixel position A2 (that is, the left pixel position) is the same as the CCALF filter coefficient f1 at the pixel position A7 (that is, the lower right pixel position).
  • the CCALF filter coefficient f3 at the pixel position A4 (that is, the right pixel position) is the same as the CCALF filter coefficient f3 at the pixel position A5 (that is, the lower left pixel position).
  • the design of the CCALF filter coefficients is simplified, and the number of CCALF filter coefficients in the CCALF filter coefficient set is reduced.
  • the CCALF filter coefficients at any pixel position can be set to be the same.
  • the CCALF filter coefficients have symmetry (for example, axial symmetry or center symmetry), the CCALF filter coefficients No restrictions.
  • the second case see FIG. 6F, which is a schematic diagram of adjacent pixel positions of the target pixel position.
  • the pixel position B7 is the target pixel position.
  • the CCALF filter coefficient set includes: the CCALF filter coefficient of the second row pixel position (pixel position B1) directly above the target pixel position, and the upper left pixel position of the target pixel position (pixel position B2) CCALF filter coefficient, the CCALF filter coefficient of the pixel position directly above the target pixel position (pixel position B3), the CCALF filter coefficient of the upper right pixel position (pixel position B4) of the target pixel position, the second column from the left of the target pixel position.
  • the CCALF filter coefficient at pixel position B1 is f0
  • the CCALF filter coefficient at pixel position B2 is f1
  • the CCALF filter coefficient at pixel position B3 is f2
  • the CCALF filter coefficient at pixel position B4 is f2.
  • the filter coefficient is f3, the CCALF filter coefficient at pixel position B5 is f4, the CCALF filter coefficient at pixel position B6 is f5, the CCALF filter coefficient at pixel position B7 is f6, the CCALF filter coefficient at pixel position B8 is f7, and the CCALF filter coefficient at pixel position B9 is f7.
  • the filter coefficient is f8, the CCALF filter coefficient at pixel position B10 is f9, the CCALF filter coefficient at pixel position B11 is f10, the CCALF filter coefficient at pixel position B12 is f11, and the CCALF filter coefficient at pixel position B13 is f12.
  • the CCALF filter coefficients of each pixel position are different
  • f6 is the CCALF filter coefficient of the target pixel position
  • f0-f5 f7-f12 are the CCALF filter coefficients of each adjacent pixel position, respectively.
  • the CCALF filter coefficient at pixel position B1 is f0
  • the CCALF filter coefficient at pixel position B2 is f1
  • the CCALF filter coefficient at pixel position B3 is f2
  • the CCALF filter coefficient at pixel position B4 is f2.
  • the CCALF filter coefficient is f3, the CCALF filter coefficient at pixel position B5 is f4, the CCALF filter coefficient at pixel position B6 is f5, the CCALF filter coefficient at pixel position B7 is f6, the CCALF filter coefficient at pixel position B8 is f5, and the CCALF filter coefficient at pixel position B9 is f5.
  • the CCALF filter coefficient is f4, the CCALF filter coefficient at pixel position B10 is f3, the CCALF filter coefficient at pixel position B11 is f2, the CCALF filter coefficient at pixel position B12 is f1, and the CCALF filter coefficient at pixel position B13 is f0.
  • the CCALF filter coefficient f0 at the pixel position B1 (the second row pixel position directly above) is the same as the CCALF filter coefficient f0 at the pixel position B13 (the second row pixel position directly below).
  • the CCALF filter coefficient f1 at the pixel position B2 (the upper left pixel position) is the same as the CCALF filter coefficient f1 at the pixel position B12 (the lower right pixel position).
  • the CCALF filter coefficient f2 at the pixel position B3 (the pixel position directly above) is the same as the CCALF filter coefficient f2 at the pixel position B11 (the pixel position directly below).
  • the CCALF filter coefficient f3 at the pixel position B4 (upper right pixel position) is the same as the CCALF filter coefficient f3 at the pixel position B10 (lower left pixel position).
  • the CCALF filter coefficient f4 at the pixel position B5 (the second column pixel position on the left) is the same as the CCALF filter coefficient f4 at the pixel position B9 (the second column pixel position on the right).
  • the CCALF filter coefficient f5 at the pixel position B6 (left pixel position) is the same as the CCALF filter coefficient f5 at the pixel position B8 (right pixel position).
  • the design of the CCALF filter coefficients is simplified, and the number of CCALF filter coefficients in the CCALF filter coefficient set is reduced.
  • the CCALF filter coefficient at pixel position B1 is f0
  • the CCALF filter coefficient at pixel position B2 is f1
  • the CCALF filter coefficient at pixel position B3 is f2
  • the CCALF filter coefficient at pixel position B4 is f2.
  • the CCALF filter coefficient is f1
  • the CCALF filter coefficient at pixel position B5 is f4
  • the CCALF filter coefficient at pixel position B6 is f5
  • the CCALF filter coefficient at pixel position B7 is f6
  • the CCALF filter coefficient at pixel position B8 is f5
  • the CCALF filter coefficient at pixel position B9 is f5.
  • the CCALF filter coefficient is f4, the CCALF filter coefficient at pixel position B10 is f3, the CCALF filter coefficient at pixel position B11 is f2, the CCALF filter coefficient at pixel position B12 is f3, and the CCALF filter coefficient at pixel position B13 is f0.
  • the CCALF filter coefficient f0 at the pixel position B1 (the second row pixel position directly above) is the same as the CCALF filter coefficient f0 at the pixel position B13 (the second row pixel position directly below).
  • the CCALF filter coefficient f1 at the pixel position B2 (upper left pixel position) is the same as the CCALF filter coefficient f1 at the pixel position B4 (upper right pixel position).
  • the CCALF filter coefficient f2 at the pixel position B3 (the pixel position directly above) is the same as the CCALF filter coefficient f2 at the pixel position B11 (the pixel position directly below).
  • the CCALF filter coefficient f4 at the pixel position B5 (the second column pixel position on the left) is the same as the CCALF filter coefficient f4 at the pixel position B9 (the second column pixel position on the right).
  • the CCALF filter coefficient f5 at the pixel position B6 (left pixel position) is the same as the CCALF filter coefficient f5 at the pixel position B8 (right pixel position).
  • the CCALF filter coefficient f3 at the pixel position B10 (lower left pixel position) is the same as the CCALF filter coefficient f3 at the pixel position B12 (lower right pixel position).
  • the design of the CCALF filter coefficients is simplified, and the number of CCALF filter coefficients in the CCALF filter coefficient set is reduced.
  • the CCALF filter coefficients at any pixel position can be set to be the same.
  • the CCALF filter coefficients are not Do restrictions.
  • the CCALF filter coefficient set can include: the CCALF filter coefficient of the pixel position directly above the target pixel position (ie pixel position C1), and the left pixel position of the target pixel position (ie pixel The CCALF filter coefficient of the position C2), the CCALF filter coefficient of the pixel position directly below the target pixel position (ie pixel position C4), the CCALF filter coefficient of the lower right pixel position of the target pixel position (ie pixel position C5), The CCALF filter coefficient of the second row pixel position directly below the target pixel position (ie, pixel position C6).
  • the CCALF filter coefficient at pixel position C1 is f0
  • the CCALF filter coefficient at pixel position C2 is f4
  • the CCALF filter coefficient at pixel position C3 is f1
  • the CCALF filter coefficient at pixel position C4 is f1.
  • the filter coefficient is f2
  • the CCALF filter coefficient at the pixel position C5 is f5
  • the CCALF filter coefficient at the pixel position C6 is f3.
  • the CCALF filter coefficients of each pixel position are different
  • f1 is the CCALF filter coefficient of the target pixel position
  • f0, f2, f3, f4, and f5 are the CCALF filter coefficients of each adjacent pixel position.
  • the CCALF filter coefficient at pixel position C1 is f0
  • the CCALF filter coefficient at pixel position C2 is f4
  • the CCALF filter coefficient at pixel position C3 is f1
  • the CCALF filter coefficient at pixel position C4 is f1.
  • the CCALF filter coefficient is f2
  • the CCALF filter coefficient at the pixel position C5 is f4
  • the CCALF filter coefficient at the pixel position C6 is f3.
  • the CCALF filter coefficient f4 at the pixel position C2 (left side pixel position) is the same as the CCALF filter coefficient f4 at the pixel position C5 (lower right side pixel position).
  • the CCALF filter coefficients at any pixel position can be set to be the same.
  • the CCALF filter coefficients have symmetry (for example, axial symmetry or center symmetry), the CCALF filter coefficients No restrictions.
  • FIG. 6M is a schematic diagram of adjacent pixel positions of the target pixel position.
  • the pixel position D3 can be the target pixel position.
  • the CCALF filter coefficient set can include: the CCALF filter coefficient of the pixel position directly above the target pixel position (ie pixel position D1), and the left pixel position of the target pixel position (ie pixel position D2). ) CCALF filter coefficient, the CCALF filter coefficient of the right pixel position of the target pixel position (ie pixel position D4), and the CCALF filter coefficient of the pixel position directly below the target pixel position (ie pixel position D5).
  • the CCALF filter coefficient at pixel position D1 is f0
  • the CCALF filter coefficient at pixel position D2 is f1
  • the CCALF filter coefficient at pixel position D3 is f2
  • the CCALF filter coefficient at pixel position D4 is f2.
  • the filter coefficient is f3, and the CCALF filter coefficient at the pixel position D5 is f4.
  • the CCALF filter coefficients of each pixel position are different, f2 is the CCALF filter coefficient of the target pixel position, and f0, f1, f3, and f4 are the CCALF filter coefficients of each adjacent pixel position.
  • Embodiment 14 In the above embodiment, the reconstruction value of the luminance component of the target pixel position, the CCALF filter coefficient of the target pixel position, the luminance component reconstruction value of the adjacent pixel position and the CCALF filter coefficient of the adjacent pixel position can be based on Perform filtering processing based on CCALF to obtain the chrominance component offset value of the current pixel position. In a possible implementation manner, a transform operation can be performed on the CCALF filter coefficients of adjacent pixel positions to obtain the transformed CCALF filter coefficients of the adjacent pixel positions.
  • the CCALF-based filtering process is performed, Get the chrominance component offset value of the current pixel position.
  • the above-mentioned transformation operation is specifically: a rotation transformation operation; or, a vertical flip transformation operation; or, a diagonal flip transformation operation.
  • the CCALF filter coefficients of adjacent pixel positions are rotated and transformed.
  • the above methods are just a few examples, and there is no restriction on this.
  • f D (k, s) represents the CCALF filter coefficient of the pixel position (k, s) after the diagonal flip transformation operation
  • f(s, k) represents the pixel position (s ,k) CCALF filter coefficient
  • f V (k, s) represents the CCALF filter coefficient of the pixel position (k, s) after the vertical flip transformation operation
  • f(k, Ks-1) represents the pixel position (k, Ks-1) before the vertical flip transformation operation
  • the CCALF filter coefficient is the CCALF filter coefficient.
  • f R (k,s) represents the CCALF filter coefficient of the pixel position (k,s) after the rotation transformation operation
  • f(Ks-1,k) represents the CCALF of the pixel position (Ks-1,k) before the rotation transformation operation Filter coefficient.
  • f D (k, s) represents the CCALF filter coefficient of the pixel position (k, s) before the diagonal flip transformation operation
  • f(s, k) represents the pixel position (s, k) after the diagonal flip transformation operation
  • f V (k, s) represents the CCALF filter coefficient of the pixel position (k, s) before the vertical flip transformation operation
  • f(k, Ks-1) represents the pixel position (k, Ks-1) after the vertical flip transformation operation
  • the CCALF filter coefficient
  • f R (k,s) represents the CCALF filter coefficient of the pixel position (k,s) before the rotation transformation operation
  • f(Ks-1,k) represents the CCALF of the pixel position (Ks-1,k) after the rotation transformation operation Filter coefficient.
  • Embodiment 15 The following describes the implementation process of the foregoing embodiment in combination with several specific application scenarios.
  • sequence-level syntax elements SPS level
  • frame-level syntax elements frame level
  • PPS level picture-level syntax elements
  • SPS level sequence-level syntax elements
  • the sequence-level syntax elements can be used to control the opening of CCALF
  • the sequence-level syntax elements can be used to control the closing of CCALF.
  • a frame-level syntax element to the encoded stream information
  • the opening of the CCALF can be controlled through the frame-level syntax element
  • the closing of the CCALF can be controlled through the frame-level syntax element.
  • image-level syntax element is used to control the turning on of CCALF
  • image-level syntax element is used to control the turning-off of CCALF.
  • Application scenario 2 The minimum granularity of the control of whether the CCALF filtering process is turned on can be controlled at the CTB level. Each CTB can have a flag to indicate whether the current processing unit is turned on CCALF.
  • CCALF's SPS-level control switch is independent of ALF's SPS control switch.
  • CCALF has a SPS-level first control switch
  • ALF has a SPS-level second control switch.
  • the first control switch controls the on or off of CCALF
  • the second control switch controls the on or off of ALF.
  • the first control switch can be used to control the CCALF to turn on, and the second control switch can be used to control the ALF to turn on.
  • the CCALF can be controlled to be turned on by the first control switch, and the ALF can be controlled to be turned off by the second control switch.
  • the first control switch can control the CCALF to turn off, and the second control switch to control the ALF to turn on.
  • the first control switch may be used to control the CCALF to be turned off, and the second control switch may be used to control the ALF to be turned off.
  • Application scenario 4 CCALF and ALF share a SPS-level control switch, that is, a SPS control switch controls the on and off of ALF and CCALF at the same time. For example, you can control CCALF to turn on and ALF to turn on through a control switch. Or, you can control CCALF to turn off and ALF to turn off through the control switch.
  • Embodiment 16 For the filtering process of ALF, a filter (such as a Wiener filter) can be used to perform the filtering operation, the purpose of which is to minimize the mean square error between the filtered signal and the original signal.
  • a filter such as a Wiener filter
  • two types of filters can be provided, a 5*5 size filter is suitable for chrominance components, and a 7*7 size filter is suitable for luminance components.
  • C6 is the center pixel position
  • C12 is the center pixel position
  • the remaining pixels are surrounding pixels.
  • the center pixel position is the pixel position to be filtered, and the surrounding pixel positions are used to filter the center pixel position.
  • D represents the Direction of the current processing unit
  • A represents the Activity (the overall gradient value, that is, the quantized value of the activity value) of the current processing unit.
  • this article does not limit it, as long as D and A can be obtained.
  • the filtering parameters carried in the code stream may involve: applying different filters to the luminance component and the chrominance component, and the filtering parameter information of the ALF is declared in the APS.
  • the filtering parameter information of the ALF is declared in the APS.
  • N is preferably 25
  • M is preferably 8
  • Controlling whether ALF is turned on can be controlled at multiple levels.
  • the control syntax can exist in the sequence-level parameter syntax, in the SLICE-level syntax, the frame-level syntax is intermediate, and the control of whether the ALF filtering process is turned on has the smallest granularity and can be controlled at the CTB level.
  • a CTB can have a flag to indicate whether the current processing unit is ALF enabled.
  • an embodiment of the application also proposes a decoding device, which is applied to the decoding end.
  • the device includes:
  • the determining module 811 is used to determine whether the ALF sequence-level control switch flag bit of the sequence-level parameter set SPS-level syntax indicates whether the current sequence allows ALF to be enabled;
  • the decoding module 812 is configured to decode the CCALF sequence-level control switch flag from the SPS-level grammar when the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled.
  • the decoding module 812 is also used to decode the CCALF sequence-level control switch flag from the SPS-level syntax if the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled and the current sequence has chrominance components.
  • the decoding module 812 is further configured to: when decoding the CCALF sequence-level control switch flag bit from the SPS-level grammar, if the CCALF general restriction information grammar indicates that CCALF is not allowed to be enabled, then determine the CCALF sequence-level control switch flag bit Is the first value; or, if the CCALF general restriction information syntax indicates that CCALF is allowed to be enabled, decode the CCALF sequence-level control switch flag from the SPS-level syntax to the second value; wherein, the first value It means that the current sequence does not allow CCALF to be enabled; the second value indicates that the current sequence allows CCALF to be enabled.
  • the decoding module 812 is further configured to: if the ALF sequence level control switch flag bit of the SPS level syntax indicates that the current sequence allows ALF to be enabled, and the PPS level syntax indicates that the ALF syntax exists in the image header, then decode the ALF image from the image header level syntax Head-level control switch flag bit; if the ALF image header-level control switch flag bit of the image header-level syntax indicates that the current image allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled , Decode the CCALF image header control switch flag bit from the image header syntax.
  • the decoding module 812 is further configured to: if the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the PPS-level syntax indicates that the ALF syntax exists in the slice header, then decode the ALF slice header-level control from the slice header-level syntax Switch flag bit; if the ALF header-level control switch flag bit of the header-level syntax indicates that the current film allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then The CCALF header-level control switch flag is decoded in the credit-level syntax.
  • the decoding module 812 is further configured to: if the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the image header, then decode the ALF from the image header-level syntax
  • the image header level control switch flag bit if the image header level grammar ALF image header level control switch flag bit indicates that the current image allows ALF to be enabled, and the CCALF sequence level control switch flag bit of the SPS level grammar indicates that the current sequence allows it to be enabled CCALF, decode the CCALF image header control switch flag bit from the image header syntax.
  • the decoding module 812 is further configured to: if the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the slice header, then decode the ALF slice header level from the slice header-level syntax Control switch flag bit; if the ALF film header-level control switch flag bit of the film header-level syntax indicates that the current film allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then Decode the CCALF credit-level control switch flag in the credit-level syntax.
  • an embodiment of the present application also proposes an encoding device, which is applied to the encoding end.
  • the device includes:
  • the determining module 821 is used to determine whether the ALF sequence-level control switch flag bit of the sequence-level parameter set SPS-level syntax indicates whether the current sequence allows ALF to be enabled;
  • the encoding module 822 is configured to encode the CCALF sequence-level control switch flag bit in the SPS-level grammar when the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled.
  • the encoding module 822 is also used to encode the CCALF sequence-level control switch flag in the SPS-level grammar if the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled and the current sequence has chrominance components. .
  • the encoding module 822 is further configured to: if the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence does not allow ALF to be enabled, then it is forbidden to encode the CCALF sequence-level control switch flag bit in the SPS-level grammar.
  • the encoding module 822 is further configured to: when encoding the CCALF sequence-level control switch flag bit in the SPS-level grammar, if the CCALF general restriction information grammar indicates that CCALF is not allowed to be enabled, the CCALF sequence-level control switch flag bit is The first value; or, if the general restriction information syntax of CCALF indicates that CCALF is allowed to be enabled, the CCALF sequence-level control switch flag is the second value; wherein, the first value indicates that the current sequence does not allow CCALF to be enabled ; The second value indicates that the current sequence allows CCALF to be enabled.
  • the encoding module 822 is also used to: if the ALF sequence level control switch flag bit of the SPS level syntax indicates that the current sequence allows ALF to be enabled, and the PPS level syntax indicates that the ALF syntax exists in the image header, then encode the ALF image in the image header level syntax Head-level control switch flag bit; if the ALF image header-level control switch flag bit of the image header-level syntax indicates that the current image allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled , Then encode the CCALF image header control switch flag bit in the image header syntax.
  • the encoding module 822 is also used for: if the ALF sequence-level control switch flag bit of the SPS-level grammar indicates that the current sequence allows ALF to be enabled, and the PPS-level grammar indicates that the ALF grammar exists in the credit, then encode the ALF credit-level control in the credit-level syntax.
  • Switch flag bit if the ALF film header-level control switch flag bit of the film header-level syntax indicates that the current film allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then The CCALF credit-level control switch flag is encoded in the credit-level syntax.
  • the encoding module 822 is also used to: if the ALF sequence level control switch flag of the SPS level syntax indicates that the current sequence allows ALF to be enabled, and the image header level syntax indicates that the ALF syntax exists in the image header, then encode ALF in the image header level syntax.
  • the image header level control switch flag bit if the image header level grammar ALF image header level control switch flag bit indicates that the current image allows ALF to be enabled, and the CCALF sequence level control switch flag bit of the SPS level grammar indicates that the current sequence allows it to be enabled CCALF, encode the CCALF image header control switch flag bit in the image header syntax.
  • the encoding module 822 is further configured to: if the ALF image header-level control switch flag bit of the image header-level syntax indicates that the current image does not allow ALF to be enabled, it is forbidden to encode the CCALF image header-level control switch flag in the image header-level syntax. Bit.
  • the encoding module 822 is also used for: if the ALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows ALF to be enabled, and the image header-level syntax indicates that the ALF syntax exists in the film header, then encode the ALF film header level in the film header-level syntax Control switch flag bit; if the ALF film header-level control switch flag bit of the film header-level syntax indicates that the current film allows ALF to be enabled, and the CCALF sequence-level control switch flag bit of the SPS-level syntax indicates that the current sequence allows CCALF to be enabled, then The CCALF credit-level control switch flag is encoded in the credit-level syntax.
  • the encoding module 822 is further configured to: if the ALF header-level control switch flag bit of the credit-level syntax indicates that the current slice does not allow ALF to be enabled, then it is forbidden to encode the CCALF credit-level control switch flag bit in the credit-level syntax.
  • the decoding end device ie, video decoder
  • the schematic diagram of the hardware architecture can be specifically shown in FIG. 8C.
  • the machine-readable storage medium 832 stores machine executable instructions that can be executed by the processor 831;
  • the processor 831 is used to execute the machine executable Instructions to implement the methods disclosed in the above examples of this application.
  • the processor 831 is configured to execute machine executable instructions to implement the following steps:
  • the CCALF sequence-level control switch flag bit of the sequence-level parameter set SPS-level syntax indicates that the current sequence allows ALF to be enabled
  • the CCALF sequence-level control switch flag bit is decoded from the SPS-level syntax.
  • the encoding end device ie, video encoder
  • the schematic diagram of the hardware architecture can be specifically shown in FIG. 8D. It includes: a processor 841 and a machine-readable storage medium 842, wherein: the machine-readable storage medium 842 stores machine-executable instructions that can be executed by the processor 841; the processor 841 is used to execute the machine-executable Instructions to implement the methods disclosed in the above examples of this application.
  • the processor 841 is configured to execute machine executable instructions to implement the following steps:
  • the CCALF sequence-level control switch flag bit of the sequence-level parameter set SPS-level grammar indicates that the current sequence allows ALF to be enabled, then the CCALF sequence-level control switch flag bit is encoded in the SPS-level grammar.
  • an embodiment of the application also provides a machine-readable storage medium having a number of computer instructions stored on the machine-readable storage medium.
  • the computer instructions When the computer instructions are executed by a processor, the present invention can be realized. Apply the method disclosed in the above example.
  • the aforementioned machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device, and may contain or store information, such as executable instructions, data, and so on.
  • the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard drive), solid state drive, any type of storage disk (Such as CD, DVD, etc.), or similar storage media, or a combination of them.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
  • the functions are divided into various units and described separately. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and/or hardware.
  • embodiments of the present application may be provided as methods, systems, or computer program products.
  • This application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware.
  • the embodiments of the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请提供一种编码、解码方法、装置及其设备,该方法可以包括:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则在所述SPS级语法中编码CCALF序列级控制开关标志位。通过本申请的技术方案,能够提高编码性能。

Description

编码、解码方法、装置及其设备 技术领域
本申请涉及编解码技术领域,尤其是涉及一种编码、解码方法、装置及其设备。
背景技术
为了达到节约空间的目的,视频图像都是经过编码后才传输的,完整的视频编码方法可以包括预测、变换、量化、熵编码、滤波等过程。其中,预测编码可以包括帧内编码和帧间编码。进一步的,帧间编码是利用视频时间域的相关性,使用邻近已编码图像的像素预测当前像素,以达到有效去除视频时域冗余的目的。帧内编码是指利用视频空间域的相关性,使用当前帧图像的已经编码块的像素预测当前像素,以达到去除视频空域冗余的目的。
在相关技术中,环路滤波用于减少图像的块效应或者图像效果不佳等问题,用来改善图像的质量,而CCALF作为环路滤波的一种实现方式,可以采用CCALF来实现环路滤波。但是,相关技术中的CCALF的滤波效果不佳,编码性能比较差。
发明内容
本申请提供一种编码、解码方法、装置及其设备,能够提高编码性能。
本申请提供一种编码方法,所述方法包括:
若序列级参数集SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则在所述SPS级语法中编码CCALF序列级控制开关标志位。
本申请提供一种解码方法,所述方法包括:
若序列级参数集SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则从所述SPS级语法中解码CCALF序列级控制开关标志位。
本申请提供一种编码装置,所述装置包括:
确定模块,用于确定序列级参数集SPS级语法的ALF序列级控制开关标志位,是否表示当前序列允许启用ALF;
编码模块,用于当SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF时,在所述SPS级语法中编码CCALF序列级控制开关标志位。
本申请提供一种解码装置,所述装置包括:
确定模块,用于确定序列级参数集SPS级语法的ALF序列级控制开关标志位,是否表示当前序列允许启用ALF;
解码模块,用于当SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF时,则从所述SPS级语法中解码CCALF序列级控制开关标志位。
本申请提供一种编码端设备,包括:处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;
所述处理器用于执行机器可执行指令,以实现如下步骤:
若序列级参数集SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则在所述SPS级语法中编码CCALF序列级控制开关标志位。
本申请提供一种解码端设备,包括:处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;
所述处理器用于执行机器可执行指令,以实现如下步骤:
若序列级参数集SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则从所述SPS级语法中解码CCALF序列级控制开关标志位。
由以上技术方案可见,本申请实施例中,在复杂度较低的情况下,可以获得较高性能的提升。高层语法的设计,提供CCALF使用的灵活性。提高CCALF的环路滤波的准确性,提高CCALF的环路滤波效果,提高编码性能,使当前处理单元的重构值更接近原始像素。
附图说明
图1是编解码框架的示意图;
图2是本申请一种实施方式中的编码方法的流程图;
图3是本申请一种实施方式中的解码方法的流程图;
图4是本申请一种实施方式中的编解码方法的流程图;
图5A-图5D是本申请一些实施方式中的CCALF滤波处理的示意图;
图6A-图6N是本申请一些实施方式中的相邻像素位置的示意图;
图7是本申请一种实施方式中的ALF的相邻像素位置的示意图;
图8A是本申请一种实施方式中的解码装置的结构示意图;
图8B是本申请一种实施方式中的编码装置的结构示意图;
图8C是本申请一种实施方式中的解码端设备的硬件结构图;
图8D是本申请一种实施方式中的编码端设备的硬件结构图。
具体实施方式
在本申请实施例中使用的术语仅仅是出于描述特定实施例的目的,而非限制本申请。本申请实施例和权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其它含义。还应当理解,本文中使用的术语“和/或”是指包含一个或多个相关联的列出项目的任何或所有可能组合。还应当理解,尽管在本申请实施例可能采用术语第一、第二、第三等来描述各种信息,但是,这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,此外,所使用的词语“如果”可以被解释成为“在……时”,或“当……时”,或“响应于确定”。
本申请实施例提出一种编码、解码方法、装置及其设备,可以涉及如下概念:
编解码框架:参见图1所示,为编解码框架的示意图。可以使用编解码框架实现本申请实施例的编码端处理流程,可以使用编解码框架实现本申请实施例的解码端处理流程。示例性的,参见图1所示,完整的编解码框架可以包括但不限于:预测,变换,量化,熵编码器,反变换、反量化、重建、环内滤波、参考图像缓冲器等模块,预测可以分为帧内预测和帧间预测(即运动估计/运动补偿)。在编码端,通过这些模块之间的配合,可以实现编码端处理流程,在解码端,通过这些模块之间的配合,可以实现解码端处理流程。
帧内预测:利用视频空间域的相关性,使用当前块的已编码块进行预测,以达到去除视频空域冗余的目的。帧内预测规定了多种预测模式,每种预测模式对应一种纹理方向(DC模式除外),例如,若图像纹理呈现水平状排布,则水平预测模式可以更好的预测图像信息。
帧间预测:基于视频时域的相关性,由于视频序列包含有较强的时域相关性,使用邻近已编码图像像素预测当前图像的像素,可以达到有效去除视频时域冗余的目的。视频编码标准帧间预测部分都采用了基于块的运动补偿技术,主要原理是为当前图像的每一个像素块在之前已编码图像中寻找一个最佳匹配块,该过程称为运动估计(Motion Estimation,ME)。
变换:在视频编码过程中,变换是指将以空间域中像素形式描述的图像转换至变换域的图像,并以变换系数的形式来表示。由于绝大多数图像都含有较多平坦区域和缓慢变化的区域,因此,适当的变换过程,可以使图像能量在空间域的分散分布,转换为在变换域的相对集中分布,从而能够去除信号之间的频域相关性,配合量化过程,可以有效压缩码流。
环路滤波:环路滤波用于减少图像的块效应或者图像效果不佳等问题,用来改善图像质量。例如,环路滤波可以包括但不限于去块滤波(Deblocking filter),SAO(Sample Adaptive Offset,样点自适应补偿)滤波,ALF(Adaptive Loop Filter,自适应环路滤波器)滤波,CCALF(Cross-Component Adaptive Loop Filter,跨分量自适应环路滤波器)滤波等。
ALF的基本原理:通过滤波器使滤波后的重建图像块的像素值更接近于其原始像素的像素值。CCALF的基本原理:通过对应亮度值的滤波,获得色度重建块(一般已经经过ALF滤波后的色度值)的补偿像素值,使其更接近于色度原始图像块的像素值。
标记位编码(flag coding):在视频编码中,存在很多模式。对于某个块,可能采用其中一种模式。为了表示采用何种模式,每个块需要通过编码对应的标记位来进行标记。比如说,针对编码端来说,通过编码端决策,确定该标记位的值,然后对标记位的值进行编码传递到解码端。针对解码端来说,通过解析标记位的值,确定对应模式是否启用。
序列级参数集(SPS,sequence parameter set):该集合存在确定整个视频序列(即多帧视频图像)中是否允许某些工具(方法)开关的标记位。若标记位为1,则视频序列中允许启用对应工具(方法);否则,该工具(方法)无法在该视频序列的编码过程中启用。
图像参数集(PPS,picture parameter set):该集合中存在确定某个图片中是否允许某些工具(方法)开关的标记位。若该标记位为1,则该图片中允许启用对应工具(方法);否则,该工具(方法)无法在该图片的编码过程中 启用。
图像头(picture header):针对某一帧图像的共同信息,不同于图像参数集(可被不同图像使用),图像头中保存的是仅针对当前图像的共同信息。例如,当当前图像包含多个slice时,所述多个slice可以通用图像头中的信息。图像头存在确定当前图像中是否允许某些工具(方法)开关的标记位。若标记位为1,则当前图像允许启用对应工具(方法);否则,该工具(方法)无法在当前图像的编码过程中启用。
片头(Slice header):一帧图像可以包含1个slice或多个slice。针对每个slice,在该slice的头信息中,存在确定slice中是否允许某些工具(方法)开关的标记位。若标记位为1,则slice中允许启用对应工具(方法);否则,该工具(方法)无法在该slice的编码过程中启用。
高层语法:用于表示是否允许启用某些工具(方法),即通过高层语法允许启用某些工具(方法),或者禁止启用某些工具(方法)。示例性的,参见上述介绍,高层语法可以是序列参数集级的高层语法,或者图像参数集级的高层语法,或者片头级的高层语法,或者图像头级的高层语法,对此高层语法不做限制,只要能够实现上述功能即可。
率失真原则(Rate-Distortion Optimized):评价编码效率的有两大指标:码率和PSNR(Peak Signal to Noise Ratio,峰值信噪比),比特流越小,则压缩率越大,PSNR越大,则重建图像质量越好,在模式选择时,判别公式实质上也就是对二者的综合评价。例如,模式对应的代价:J(mode)=D+λ*R,其中,D表示Distortion(失真),通常可以使用SSE指标来进行衡量,SSE是指重建图像块与源图像的差值的均方和;λ是拉格朗日乘子,R就是该模式下图像块编码所需的实际比特数,包括编码模式信息、运动信息、残差等所需的比特数总和。
相关技术中,环路滤波用于减少图像的块效应或者图像效果不佳等问题,用来改善图像质量,CCALF是环路滤波的一种实现方式,可以采用CCALF实现环路滤波。但是,相关技术的CCALF的滤波效果不佳,编码性能比较差。针对上述发现,针对CCALF的滤波过程,本申请实施例中提出一种编解码方法,能够提高CCALF的滤波效果,提高编码性能。
以下结合具体实施例,对本申请实施例中的编解码方法进行详细说明。
实施例1:本申请实施例中提出一种编码方法,可以应用于编码端,该方法可以包括:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则在SPS级语法中编码CCALF序列级控制开关标志位,CCALF序列级控制开关标志位表示当前序列允许启用CCALF,或者,CCALF序列级控制开关标志位表示当前序列不允许启用CCALF。
示例性的,若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列存在色度分量,则在SPS级语法中编码CCALF序列级控制开关标志位。
示例性的,若SPS级语法的ALF序列级控制开关标志位表示当前序列不允许启用ALF,则禁止在SPS级语法中编码CCALF序列级控制开关标志位。比如说,不需要在SPS级语法中编码CCALF序列级控制开关标志位,直接表示当前序列不允许启用CCALF。
参见图2所示,为该编码方法的流程示意图,可以应用于编码端,该方法可以包括:
步骤201,判断SPS级语法的ALF序列级控制开关标志位是否表示当前序列允许启用ALF。如果是,则可以执行步骤202;如果否,则可以执行步骤204。
步骤202,判断当前序列是否存在色度分量。
如果是,则可以执行步骤203;如果否,则可以执行步骤204。
步骤203,在SPS级语法中编码CCALF序列级控制开关标志位。
步骤204,禁止在SPS级语法中编码CCALF序列级控制开关标志位。
示例性的,在SPS级语法中编码CCALF序列级控制开关标志位时,若CCALF的通用限制信息语法表示不允许启用CCALF,则CCALF序列级控制开关标志位为第一取值。或者,若CCALF的通用限制信息语法表示允许启用CCALF,则CCALF序列级控制开关标志位为第二取值。比如说,第一取值表示当前序列不允许启用CCALF;第二取值表示当前序列允许启用CCALF。例如,第一取值可以为0,第二取值可以为1;或者,第一取值可以为1,第二取值可以为0;当然,上述只是示例,对此第一取值和第二取值不做限制。
以下结合几个具体应用场景,对本申请实施例的上述技术方案进行说明。
应用场景1:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则在SPS级语法中编码CCALF序列级控制开关标志位。
应用场景2:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列存在色度分量,则在SPS级语法中编码CCALF序列级控制开关标志位。
应用场景3:若SPS级语法的ALF序列级控制开关标志位表示当前序列不允许启用ALF,则禁止在SPS级语法中编码CCALF序列级控制开关标志位。
应用场景4:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列不存在色度 分量,则禁止在SPS级语法中编码CCALF序列级控制开关标志位。
应用场景5:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在图像头级语法中编码CCALF图像头级控制开关标志位。
示例性的,在图像头级语法中编码ALF图像头级控制开关标志位,可以包括:在图像头级语法中编码ALF图像头级语法信息,该ALF图像头级语法信息包括ALF图像头级控制开关标志位,当然,还可以包括其它与ALF有关的信息,对此不做限制。
示例性的,在图像头级语法中编码CCALF图像头级控制开关标志位,可以包括:在图像头级语法中编码CCALF图像头级语法信息,该CCALF图像头级语法信息包括CCALF图像头级控制开关标志位,当然,还可以包括其它与CCALF有关的信息,对此不做限制。
应用场景6:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列不允许启用CCALF,则禁止在图像头级语法中编码CCALF图像头级控制开关标志位。
应用场景7:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则禁止在图像头级语法中编码CCALF图像头级控制开关标志位。
示例性的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则无论SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,还是不允许启用CCALF,均禁止在图像头级语法中编码CCALF图像头级控制开关标志位。
应用场景8:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则可以在片头级语法中编码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则可以在片头级语法中编码CCALF片头级控制开关标志位。
示例性的,在片头级语法中编码ALF片头级控制开关标志位,可以包括:在片头级语法中编码ALF片头级语法信息,该ALF片头级语法信息包括ALF片头级控制开关标志位,当然,还可以包括其它与ALF有关的信息,对此不做限制。
示例性的,在片头级语法中编码CCALF片头级控制开关标志位,可以包括:在片头级语法中编码CCALF片头级语法信息,该CCALF片头级语法信息包括CCALF片头级控制开关标志位,当然,还可以包括其它与CCALF有关的信息,对此不做限制。
应用场景9:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则可以在片头级语法中编码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列不允许启用CCALF,则可以禁止在片头级语法中编码CCALF片头级控制开关标志位。
应用场景10:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则可以在片头级语法中编码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则可以禁止在片头级语法中编码CCALF片头级控制开关标志位。
示例性的,若片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则无论SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,还是不允许启用CCALF,均禁止在片头级语法中编码CCALF图像头级控制开关标志位。
应用场景11:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在图像头级语法中编码CCALF图像头级控制开关标志位。
应用场景12:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列不允许启用CCALF,则禁止在图像头级语法中编码CCALF图像头级控制开关标志位。
应用场景13:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则禁止在图像头级语法中编码CCALF图像头级控制开关标志位。
示例性的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则无论SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,还是不允许启用CCALF,均禁止在图像头级语法中编码CCALF图像头级控制开关标志位。
应用场景14:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则可以在片头级语法中编码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则可以在片头级语法中编码CCALF片头级控制开关标志位。
应用场景15:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则可以在片头级语法中编码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列不允许启用CCALF,则可以禁止在片头级语法中编码CCALF片头级控制开关标志位。
应用场景16:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则可以在片头级语法中编码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则可以禁止在片头级语法中编码CCALF片头级控制开关标志位。
示例性的,若片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则无论SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,还是不允许启用CCALF,均禁止在片头级语法中编码CCALF图像头级控制开关标志位。
由以上技术方案可见,本申请实施例中,在复杂度较低的情况下,可以获得较高性能的提升。高层语法的设计,提供CCALF使用的灵活性。提高CCALF的环路滤波的准确性,提高CCALF的环路滤波效果,提高编码性能,使当前处理单元的重构值更接近原始像素。在一些实施例中,当前处理单元可以是正在进行编码的区域。
实施例2:本申请实施例中提出一种解码方法,可以应用于解码端,该方法可以包括:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则从SPS级语法中解码CCALF序列级控制开关标志位,CCALF序列级控制开关标志位表示当前序列允许启用CCALF,或者,CCALF序列级控制开关标志位表示当前序列不允许启用CCALF。
示例性的,若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列存在色度分量,则从SPS级语法中解码CCALF序列级控制开关标志位。
示例性的,若SPS级语法的ALF序列级控制开关标志位表示当前序列不允许启用ALF,则禁止从SPS级语法中解码CCALF序列级控制开关标志位。比如说,不需要从SPS级语法中解码CCALF序列级控制开关标志位,直接确定当前序列不允许启用CCALF。
参见图3所示,为该解码方法的流程示意图,可以应用于解码端,该方法可以包括:
步骤301,判断SPS级语法的ALF序列级控制开关标志位是否表示当前序列允许启用ALF。如果是,则可以执行步骤302;如果否,则可以执行步骤304。
步骤302,判断当前序列是否存在色度分量。
如果是,则可以执行步骤303;如果否,则可以执行步骤304。
步骤303,从SPS级语法中解码CCALF序列级控制开关标志位。
步骤304,禁止从SPS级语法中解码CCALF序列级控制开关标志位。
示例性的,在从SPS级语法中解码CCALF序列级控制开关标志位时,若CCALF的通用限制信息语法表示不允许启用CCALF,则直接确定CCALF序列级控制开关标志位为第一取值;或者,若CCALF的通用限制信息语法表示允许启用CCALF,则从SPS级语法中解码CCALF序列级控制开关标志位为第二取值。比如说,第一取值表示当前序列不允许启用CCALF;第二取值表示当前序列允许启用CCALF。例如,第一取值可以为0,第二取值可以为1;或者,第一取值可以为1,第二取值可以为0;当然,上述只是示例。
以下结合几个具体应用场景,对本申请实施例的上述技术方案进行说明。
应用场景1:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则从SPS级语法中解码CCALF序列级控制开关标志位。
应用场景2:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列存在色度分量,则从SPS级语法中解码CCALF序列级控制开关标志位。
应用场景3:若SPS级语法的ALF序列级控制开关标志位表示当前序列不允许启用ALF,则禁止从SPS级语法中解码CCALF序列级控制开关标志位。
应用场景4:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列不存在色度分量,则禁止从SPS级语法中解码CCALF序列级控制开关标志位。
应用场景5:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF 语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从图像头级语法中解码CCALF图像头级控制开关标志位。
应用场景6:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列不允许启用CCALF,则禁止从图像头级语法中解码CCALF图像头级控制开关标志位。
应用场景7:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则禁止从图像头级语法中解码CCALF图像头级控制开关标志位。
示例性的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则无论SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,还是不允许启用CCALF,均禁止从图像头级语法中解码CCALF图像头级控制开关标志位。
应用场景8:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则可以从片头级语法中解码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则可以从片头级语法中解码CCALF片头级控制开关标志位。
应用场景9:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则可以从片头级语法中解码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列不允许启用CCALF,则可以禁止从片头级语法中解码CCALF片头级控制开关标志位。
应用场景10:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则可以从片头级语法中解码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则可以禁止从片头级语法中解码CCALF片头级控制开关标志位。
示例性的,若片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则无论SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,还是不允许启用CCALF,均禁止从片头级语法中解码CCALF图像头级控制开关标志位。
应用场景11:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则可以从图像头级语法中解码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则可以从图像头级语法中解码CCALF图像头级控制开关标志位。
应用场景12:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列不允许启用CCALF,则禁止从图像头级语法中解码CCALF图像头级控制开关标志位。
应用场景13:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位。进一步的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则禁止从图像头级语法中解码CCALF图像头级控制开关标志位。
示例性的,若图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则无论SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,还是不允许启用CCALF,均禁止从图像头级语法中解码CCALF图像头级控制开关标志位。
应用场景14:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则可以从片头级语法中解码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则可以从片头级语法中解码CCALF片头级控制开关标志位。
应用场景15:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则可以从片头级语法中解码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且SPS级语法的CCALF序列级控制开关标志位表示当前序列不允许启用CCALF,则可以禁止从片头级语法中解码CCALF片头级控制开关标志位。
应用场景16:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则可以从片头级语法中解码ALF片头级控制开关标志位。进一步的,若片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则可以禁止从片头级语法中解码CCALF片头级控制开关标志位。
示例性的,若片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则无论SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,还是不允许启用CCALF,均禁止从片头级语法中解码CCALF图像头级控制开关标志位。
由以上技术方案可见,本申请实施例中,在复杂度较低的情况下,可以获得较高性能的提升。高层语法的设计,提供CCALF使用的灵活性。提高CCALF的环路滤波的准确性,提高CCALF的环路滤波效果,提高编码性能,使当前处理单元的重构值更接近原始像素。在一些实施例中,当前处理单元可以是正在进行解码的区域。
实施例3:针对实施例1和实施例2,CCALF技术的序列级参数集(SPS)语法控制可以参见表1所示。sps_alf_enabled_flag表示ALF序列级控制开关标志位(也可以称为ALF序列级开关标志位),sps_ccalf_enabled_flag表示CCALF序列级控制开关标志位(也可以称为CCALF序列级开关标志位)。示例性的,ChromaArrayType表示当前序列的亮度色度格式,ChromaArrayType!=0表示当前序列存在色度分量。表1所示的SPS语法控制用于说明,在当前序列允许启用ALF,且当前序列存在色度分量时,才需要编码sps_ccalf_enabled_flag,其原因是CCALF技术是ALF技术的子集,且是针对色度分量进行的。
表1
Figure PCTCN2020115663-appb-000001
实施例4:针对实施例1和实施例2,CCALF技术的通用限制信息语法控制,可以参见表2所示。general_constraint_info表示通用限制信息语法。no_ccalf_constraint_flag为1,则表示sps_ccalf_enabled_flag为0,即通过no_ccalf_constraint_flag表示不允许启用CCALF。no_ccalf_constraint_flag为0,则表示无此限制,即不限制sps_ccalf_enabled_flag为0,即不需要通过no_ccalf_constraint_flag表示不允许启用CCALF。当然,数值0和数值1只是示例。
表2
Figure PCTCN2020115663-appb-000002
实施例5:针对实施例1和实施例2,CCALF技术的图像参数集(PPS)语法控制可以参见表3所示。alf_present_in_ph_flag表示PPS级语法,alf_present_in_ph_flag为1,表示与ALF相关(包括CCALF)的语法存在于图像头(picture header),即在图像头编码/解码相关信息,具体语法参见后续实施例的图像头语法表。alf_present_in_ph_flag为0,表示与ALF相关(包括CCALF)的语法存在于片头(slice header),即在片头编码/解码相关信息,具体语法参见后续实施例的片头语法表。当然,上述数值0和数值1只是一个示例,例如,alf_present_in_ph_flag为0表示与ALF相关(包括CCALF)的语法存在于图像头,alf_present_in_ph_flag为1表示与ALF相关(包括CCALF)的语法存在于片头。
表3
Figure PCTCN2020115663-appb-000003
实施例6:针对实施例1和实施例2,图像头中与ALF(包括CCALF)相关的语法可以参见表4所示。sps_alf_enabled_flag表示ALF序列级控制开关标志位,alf_present_in_ph_flag表示ALF相关的语法存在于图像头或片头(本例中存在于图像头),pic_alf_enabled_flag表示ALF图像头级控制开关标志位,sps_ccalf_enabled_flag表示CCALF序列级控制开关标志位,pic_cross_component_alf_cb_enabled_flag和/或pic_cross_component_alf_cr_enabled_flag表示CCALF图像头级控制开关标志位。比如说,CCALF图像头级控制开关标志位可以包括pic_cross_component_alf_cb_enabled_flag和/或pic_cross_component_alf_cr_enabled_flag。
表4
Figure PCTCN2020115663-appb-000004
参见表4所示,在sps_alf_enabled_flag且alf_present_in_ph_flag为1时,在图像头中编码/解码ALF在图像头的相关语法。在确定编码/解码ALF在图像头的相关语法时,可以通过判断sps_ccalf_enabled_flag来判断是否编码/解码CCALF在图像头的相关语法。
示例性的,ALF在图像头的相关语法,可以包括但不限于:
pic_alf_enabled_flag:表示该图像中的块是否允许进行ALF;
pic_num_alf_aps_ids_luma:表示该图像中的块亮度ALF滤波系数的套数;
pic_alf_aps_id_luma[i]:表示该图像中的块中第i套亮度ALF滤波系数的索引值;
pic_alf_chroma_idc:表示该图像中cb或cr是否允许进行ALF;
pic_alf_aps_id_chroma:表示该图像中的块中色度ALF滤波系数的索引值;
以及,CCALF在图像头的相关语法。
示例性的,CCALF在图像头的相关语法,可以包括但不限于:
pic_cross_component_alf_cb_enabled_flag:表示图像中的块是否允许进行cb分量的ccalf;
pic_cross_component_alf_cb_aps_id:表示该图像中的块进行cb分量的ccalf时所采用的滤波系数索引值;
pic_cross_component_alf_cr_enabled_flag:表示图像中的块是否允许进行cr分量的ccalf;
pic_cross_component_alf_cr_aps_id:表示该图像中的块进行cr分量的ccalf时所采用的滤波系数索引值。
实施例7:针对实施例1和实施例2,片头中与ALF(包括CCALF)相关的语法可以参见表5所示。sps_alf_enabled_flag表示ALF序列级控制开关标志位,alf_present_in_ph_flag表示ALF相关的语法存在于图像头或片头(本例中存在于片头),slice_alf_enabled_flag表示ALF片头级控制开关标志位,sps_ccalf_enabled_flag表示CCALF序列级控制开关标志位,slice_cross_component_alf_cb_enabled_flag和/或slice_cross_component_alf_cr_enabled_flag表示CCALF片头级控制开关标志位。比如说,CCALF片头级控制开关标志位可以包括slice_cross_component_alf_cb_enabled_flag和/或slice_cross_component_alf_cr_enabled_flag。
表5
Figure PCTCN2020115663-appb-000005
参见表5所示,在sps_alf_enabled_flag为1且alf_present_in_ph_flag为0时,在片头中编码/解码ALF在片头的相关语法。在确定编码/解码在片头的相关语法时,可以通过判断sps_ccalf_enabled_flag来判断是否编码/解码CCALF在片头的相关语法。
示例性的,ALF在片头的相关语法,可以包括但不限于:
slice_alf_enabled_flag:表示该片中的块是否允许进行ALF;
slice_num_alf_aps_ids_luma:表示该片中的块亮度ALF滤波系数的套数;
slice_alf_aps_id_luma[i]:表示该片中的块中第i套亮度ALF滤波系数的索引值;
slice_alf_chroma_idc:表示该片中cb或cr是否允许进行ALF;
slice_alf_aps_id_chroma:表示该片中的块中色度ALF滤波系数的索引值;
以及,CCALF在片头的相关语法。
示例性的,CCALF在片头的相关语法,可以包括但不限于:
slice_cross_component_alf_cb_enabled_flag:表示片中的块是否允许进行cb分量的ccalf;
slice_cross_component_alf_cb_aps_id:表示该片中的块进行cb分量的ccalf时所采用的滤波系数索引值;
slice_cross_component_alf_cr_enabled_flag:表示该片中的块是否允许进行cr分量的ccalf;
slice_cross_component_alf_cr_aps_id:表示该片中的块进行cr分量的ccalf时所采用的滤波系数索引值。
实施例8:针对实施例1和实施例2,与实施例5不同的是,在CCALF技术的图像头语法中,pic_alf_enabled_present_flag表示图像头语法,pic_alf_enabled_present_flag为1,表示与ALF相关(包括CCALF)的语法存在于图像头(picture header),即在图像头编码/解码相关信息,具体语法参见后续实施例的图像头语法表。pic_alf_enabled_present_flag为0,表示与ALF相关(包括CCALF)的语法存在于片头(slice header),即在片头编码/解码相关信息,具体语法参见后续实施例的片头语法表。当然,上述数值0和数值1只是一个示例,例如,pic_alf_enabled_present_flag为0表示与ALF相关(包括CCALF)的语法存在于图像头,pic_alf_enabled_present_flag为1表示与ALF相关(包括CCALF)的语法存在于片头。
在实施例8中,与上述实施例5不同的是,没有PPS级的参数alf_present_in_ph_flag,替代该PPS级的参数的 是在图像头进行编码的参数pic_alf_enabled_present_flag。示例性的,pic_alf_enabled_present_flag与alf_present_in_ph_flag表示的含义相同。
实施例9:针对实施例1和实施例2,图像头中与ALF(包括CCALF)相关的语法可以参见表6所示。sps_alf_enabled_flag表示ALF序列级控制开关标志位,pic_alf_enabled_present_flag表示ALF相关的语法存在于图像头或片头(本例中存在于图像头),pic_alf_enabled_flag表示ALF图像头级控制开关标志位,sps_ccalf_enabled_flag表示CCALF序列级控制开关标志位,pic_cross_component_alf_cb_enabled_flag和/或pic_cross_component_alf_cr_enabled_flag表示CCALF图像头级控制开关标志位。
表6
Figure PCTCN2020115663-appb-000006
参见表6所示,在sps_alf_enabled_flag且pic_alf_enabled_present_flag为1时,在图像头中编码/解码ALF在图像头的相关语法。在确定编码/解码ALF在图像头的相关语法时,可以通过判断sps_ccalf_enabled_flag来判断是否编码/解码CCALF在图像头的相关语法。
示例性的,ALF在图像头的相关语法,可以参见实施例6所示,在此不再重复赘述。
示例性的,CCALF在图像头的相关语法,可以参见实施例6所示,在此不再重复赘述。
实施例10:针对实施例1和实施例2,片头中与ALF(包括CCALF)相关的语法可以参见表7所示。sps_alf_enabled_flag表示ALF序列级控制开关标志位,pic_alf_enabled_present_flag表示ALF相关的语法存在于图像头或片头(本例中存在于片头),slice_alf_enabled_flag表示ALF片头级控制开关标志位,sps_ccalf_enabled_flag表示CCALF序列级控制开关标志位,slice_cross_component_alf_cb_enabled_flag和/或slice_cross_component_alf_cr_enabled_flag表示CCALF片头级控制开关标志位。
表7
Figure PCTCN2020115663-appb-000007
参见表7所示,在sps_alf_enabled_flag为1且pic_alf_enabled_present_flag为0时,在片头中编码/解码ALF在片头的相关语法。在确定编码/解码ALF在片头的相关语法时,可以通过判断sps_ccalf_enabled_flag来判断是否编码/解码CCALF在片头的相关语法。
示例性的,ALF在片头的相关语法,可以参见实施例7所示,在此不再重复赘述。
示例性的,CCALF在片头的相关语法,可以参见实施例7所示,在此不再重复赘述。
在上述实施例3-实施例10中,u(1)表示采用1个比特进行编解码,u(n)表示n位的无符号整数,采用n个比特进行编解码,当然,u(n)只是一个示例,对此不做限制。
示例性的,上述实施例3-实施例10可以任意组合,如实施例3和实施例4可以组合;实施例3、实施例5-实施例7可以组合;实施例3、实施例8-实施例10可以组合;实施例3-实施例7可以组合;实施例3、实施例4、实施例8-实施例10可以组合;实施例3、实施例5和实施例6可以组合;实施例3、实施例5和实施例7可以组合;实施例3、实施例8和实施例9可以组合;实施例3、实施例8和实施例10可以组合。当然,上述只是几个组合的示例,实施例3-实施例10之间的任意至少两个实施例,均可以进行组合实现相关过程。
实施例11:基于实施例1-实施例10,若根据CCALF控制开关标志位确定针对当前处理单元启用CCALF,还可以执行图4所示的编解码流程。示例性的,若当前处理单元对应的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则确定针对当前处理单元启用CCALF;或者,若当前处理单元对应的CCALF图像头级控制开关标志位表示当前图像允许启用CCALF,则确定针对当前处理单元启用CCALF;或者,若当前处理单元对应的CCALF片头级控制开关标志位表示当前片允许启用CCALF,则确定针对当前处理单元启用CCALF;或者,若当前处理单元对应的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,且当前处理单元对应的CCALF图像头级控制开关标志位表示当前图像允许启用CCALF,则确定针对当前处理单元启用CCALF;或者,若当前处理单元对应的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,且当前处理单元对应的CCALF片头级控制开关标志位表示当前片允许启用CCALF,则确定针对当前处理单元启用CCALF。当然,上述只是几个示例,对此不做限制。示例性的,在针对当前处理单元启用CCALF时,针对编码端或者解码端来说,可以采用图4所示的编解码流程,该编解码过程可以包括:
步骤401,获取当前处理单元的每个像素位置的亮度分量重构值和色度分量重构值。
示例性的,环路滤波可以包括但不限于去块滤波,SAO滤波,ALF滤波,CCALF滤波等,在环路滤波过程中,可以执行去块滤波,SAO滤波,ALF滤波,CCALF滤波中的至少一个,且对去块滤波,SAO滤波,ALF滤波,CCALF滤波等滤波操作的顺序不做限制。
例如,可以执行去块滤波,SAO滤波,ALF滤波,CCALF滤波等操作,且执行顺序可以为:去块滤波,SAO滤波,ALF滤波,CCALF滤波;或者,去块滤波,SAO滤波,CCALF滤波,ALF滤波;或者,去块滤波,CCALF滤波,SAO滤波,ALF滤波;或者,CCALF滤波,去块滤波,SAO滤波,ALF滤波。当然,上述只是滤波顺序的几个示例,对此不做限制。
又例如,可以执行SAO滤波,ALF滤波,CCALF滤波等操作,且执行顺序可以为:SAO滤波,ALF滤波,CCALF滤波;或者,SAO滤波,CCALF滤波,ALF滤波;或者,CCALF滤波,SAO滤波,ALF滤波。当然,上述只是滤波顺序的几个示例,对此不做限制。
又例如,可以执行去块滤波,SAO滤波,CCALF滤波等操作,且执行顺序可以为:去块滤波,SAO滤波,CCALF滤波;或者,去块滤波,CCALF滤波,SAO滤波;或者,CCALF滤波,去块滤波,SAO滤波。当然,上述只是滤波顺序的几个示例,对此不做限制。
当然,上述方式只是从去块滤波,SAO滤波,ALF滤波,CCALF滤波中选择至少一个滤波方式实现环路滤波的示例,环路滤波还可以包括其它类型的滤波方式,对此不做限制。
本实施例中,针对CCALF滤波的实现方式,CCALF滤波可以是环路滤波的首个滤波方式,即,在步骤401中,亮度分量重构值是未经过滤波的亮度分量重构值,色度分量重构值是未经过滤波的色度分量重构值。或者,CCALF滤波可以位于去块滤波的后面,即,在步骤401中,亮度分量重构值是去块滤波后的亮度分量重构值,色度分量重构值是去块滤波后的色度分量重构值。或者,CCALF滤波可以位于SAO滤波的后面,即,在步骤401中,亮度分量重构值是SAO滤波后的亮度分量重构值,色度分量重构值是SAO滤波后的色度分量重构值。或者,CCALF滤波可以位于ALF滤波的后面,即,在步骤401中,亮度分量重构值是ALF滤波后的亮度分量重构值,色度分量重构值是ALF滤波后的色度分量重构值。
示例性的,CCALF滤波和ALF滤波还可以同时执行,如在SAO滤波后,基于SAO滤波后的亮度分量重构值和色度分量重构值,进行CCALF滤波和ALF滤波。或者,在去块滤波后,基于去块滤波后的亮度分量重构值和色度分量重构值,进行CCALF滤波和ALF滤波。或者,基于未经过滤波的亮度分量重构值和色度分量重构值,进行CCALF滤波和ALF滤波。
无论采用哪些滤波方式实现环路滤波,滤波方式的顺序是什么,在执行CCALF滤波时,均可以获取当前处理单元的每个像素位置的亮度分量重构值和色度分量重构值,例如,每个像素位置的SAO滤波后的亮度分量重构值,每个像素位置的SAO滤波后的色度分量重构值。
步骤402,针对当前处理单元的当前像素位置(即色度分量重构值的像素位置),确定当前像素位置关联的当前处理单元的目标像素位置(即亮度分量重构值的像素位置)。
示例性的,可以将当前处理单元的色度分量重构值的像素位置称为当前像素位置,将当前处理单元的亮度分量重构值的像素位置称为目标像素位置,当前像素位置与该当前像素位置关联的目标像素位置可以相同,也可以不同。例如,当前像素位置为像素位置a1,与该当前像素位置关联的目标像素位置为像素位置a1。又例如,当前像素位置为像素位置a1,与该当前像素位置关联的目标像素位置为像素位置a2。
示例性的,若当前处理单元所在图像的采样率是4:2:0的格式,则当前像素位置与该当前像素位置关联的目标像素位置可以不同。若当前处理单元所在图像的采样率是4:4:4的格式,则当前像素位置与该当前像素位置关联的目标像素位置可以相同。
综上所述,可以基于当前处理单元所在图像的采样率,确定当前像素位置关联的目标像素位置,对此确定方式不做限制。当然,上述方式只是示例,对此不做限制,只要能够确定当前像素位置关联的目标像素位置即可。
示例性的,假设需要采用CCALF对当前处理单元的像素位置b1的色度分量重构值进行补偿,则将像素位置b1作为当前像素位置,并确定当前像素位置关联的目标像素位置,如目标像素位置为像素位置b2,像素位置b2与像素位置b1可以相同,也可以不同。
步骤403,基于目标像素位置的亮度分量重构值和目标像素位置的相邻像素位置的亮度分量重构值,进行基于CCALF的滤波处理,得到当前像素位置的色度分量偏移值。
示例性的,可以获取当前处理单元的CCALF滤波系数集合;获取目标像素位置的CCALF滤波系数,从CCALF滤波系数集合中获取目标像素位置的相邻像素位置的CCALF滤波系数。然后,可以基于该目标像素位置的亮度分量重构值,该目标像素位置的CCALF滤波系数,该目标像素位置的相邻像素位置的亮度分量重构值和该相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,得到当前像素位置的色度分量偏移值。
示例性的,可以将采用CCALF进行滤波处理时的滤波系数称为CCALF滤波系数。
步骤404,利用当前像素位置的色度分量重构值和当前像素位置的色度分量偏移值,获得当前像素位置的目标色度分量重构值。例如,通过当前像素位置的色度分量偏移值对当前像素位置的色度分量重构值进行补偿,得到当前像素位置的目标色度分量重构值。
以下结合几个具体情况,对步骤403和步骤404的处理过程进行说明。
情况一,参见图5A所示,为CCALF滤波处理的示意图,色度分量重构值包括第一色度分量重构值Cb和第二色度分量重构值Cr,第一CCALF用于获得第一色度分量重构值Cb对应的第一色度分量偏移值I 1,第二CCALF用 于获得第二色度分量重构值Cr对应的第二色度分量偏移值I 2。在上述应用场景下,参见图5A所示,I 0为目标像素位置的亮度分量重构值(即Luma)和目标像素位置的相邻像素位置的亮度分量重构值(即Luma),将目标像素位置的亮度分量重构值和相邻像素位置的亮度分量重构值输入给第一CCALF和第二CCALF。
第一CCALF包括目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数,因此,第一CCALF可以基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,对此滤波处理过程不做限制,得到当前像素位置的第一色度分量偏移值I 1
第二CCALF包括目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数,因此,第二CCALF可以基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,对此滤波处理过程不做限制,得到当前像素位置的第二色度分量偏移值I 2
示例性的,第一CCALF中的目标像素位置的CCALF滤波系数与第二CCALF中的目标像素位置的CCALF滤波系数,可以相同,也可以不同。第一CCALF中的相邻像素位置的CCALF滤波系数与第二CCALF中的相邻像素位置的CCALF滤波系数,可以相同,也可以不同。第一CCALF的滤波处理方式与第二CCALF的滤波处理方式可以相同,也可以不同。
在得到当前像素位置的第一色度分量偏移值I 1后,可以利用第一色度分量重构值Cb与第一色度分量偏移值I 1,获得当前像素位置的第一目标色度分量重构值Cb’,例如,将第一色度分量重构值Cb与第一色度分量偏移值I 1的和,作为第一目标色度分量重构值Cb’。
在得到当前像素位置的第二色度分量偏移值I 2后,可以利用第二色度分量重构值Cr与第二色度分量偏移值I 2,获得当前像素位置的第二目标色度分量重构值Cr’,例如,将第二色度分量重构值Cr与第二色度分量偏移值I 2的和,作为第二目标色度分量重构值Cr’。
综上所述,可以得到当前像素位置的目标色度分量重构值,即Cb’和Cr’。
情况二,参见图5B所示,为CCALF滤波处理的示意图,色度分量重构值包括第一色度分量重构值Cb和第二色度分量重构值Cr,CCALF用于获得色度分量偏移值,该色度分量偏移值作为第一色度分量重构值Cb对应的第一色度分量偏移值I 1,基于该色度分量偏移值获得第二色度分量重构值Cr对应的第二色度分量偏移值I 2
在上述应用场景下,参见图5B所示,I 0可以为目标像素位置的亮度分量重构值(即Luma)和目标像素位置的相邻像素位置的亮度分量重构值(即Luma),可以将目标像素位置的亮度分量重构值和相邻像素位置的亮度分量重构值输入给CCALF(即联合CCALF)。
CCALF包括目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数,因此,CCALF可以基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,对此滤波处理过程不做限制,得到当前像素位置的第一色度分量偏移值I 1
然后,根据第一色度分量偏移值I 1获取当前像素位置的第二色度分量偏移值I 2,例如,第二色度分量偏移值I 2可以为第一色度分量偏移值I 1乘以系数w。示例性的,针对编码端来说,系数w可以任意配置,对此不做限制。针对解码端来说,编码端可以通过码流将系数w传输给解码端,解码端从码流中解析系数w,即解码端的系数w与编码端的系数w相同。
在得到当前像素位置的第一色度分量偏移值I 1后,可以利用第一色度分量重构值Cb与第一色度分量偏移值I 1,获得当前像素位置的第一目标色度分量重构值Cb’,例如,将第一色度分量重构值Cb与第一色度分量偏移值I 1的和,作为第一目标色度分量重构值Cb’。
在得到当前像素位置的第二色度分量偏移值I 2后,可以利用第二色度分量重构值Cr与第二色度分量偏移值I 2,获得当前像素位置的第二目标色度分量重构值Cr’,例如,将第二色度分量重构值Cr与第二色度分量偏移值I 2的和,作为第二目标色度分量重构值Cr’。
综上所述,可以得到当前像素位置的目标色度分量重构值,即Cb’和Cr’。
情况三,参见图5C所示,为CCALF和ALF联合滤波处理的示意图,色度分量重构值包括第一色度分量重构值Cb和第二色度分量重构值Cr,第一CCALF用于获得第一色度分量重构值Cb对应的第一色度分量偏移值I 1,第二CCALF用于获得第二色度分量重构值Cr对应的第二色度分量偏移值I 2。在上述应用场景下,I 0为目标像素位置的亮度分量重构值(即Luma)和目标像素位置的相邻像素位置的亮度分量重构值(即Luma),将目标像素位置的亮度分量重构值和相邻像素位置的亮度分量重构值输入给第一CCALF和第二CCALF。
第一CCALF包括目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数,因此,第一CCALF可以基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,对此滤波处理过程不做限制,得到当前像素位置的第一色度分量偏移值I 1
第二CCALF包括目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数,因此,第二CCALF可以基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相 邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,对此滤波处理过程不做限制,得到当前像素位置的第二色度分量偏移值I 2
在情况一中,直接将目标像素位置的亮度分量重构值作为目标像素位置的目标亮度分量重构值。与情况一不同的是,在情况三中,基于目标像素位置的亮度分量重构值和ALF亮度滤波系数,进行基于ALF的滤波处理,得到目标像素位置的目标亮度分量重构值。
参见图5C所示,可以将目标像素位置的亮度分量重构值和相邻像素位置的亮度分量重构值输入给第一ALF,第一ALF用于对亮度分量重构值进行滤波处理。第一ALF可以包括目标像素位置的ALF亮度滤波系数和相邻像素位置的ALF亮度滤波系数,因此,第一ALF可以基于目标像素位置的亮度分量重构值,目标像素位置的ALF亮度滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的ALF亮度滤波系数,进行基于ALF的滤波处理,对此滤波处理过程不做限制,最终得到目标像素位置的目标亮度分量重构值。
情况一中,根据色度分量重构值与色度分量偏移值确定目标色度分量重构值。与情况一不同的是,情况三中,基于当前像素位置的色度分量重构值和ALF色度滤波系数,进行基于ALF的滤波处理,得到当前像素位置的滤波处理后的色度分量重构值;例如,基于当前像素位置的色度分量重构值和当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的色度分量重构值和当前像素位置的相邻像素位置的ALF色度滤波系数,进行基于ALF的滤波处理,得到当前像素位置的滤波处理后的色度分量重构值。然后,根据滤波处理后的色度分量重构值和当前像素位置的色度分量偏移值,获得当前像素位置的目标色度分量重构值。
参见图5C所示,将当前像素位置的第一色度分量重构值Cb和当前像素位置的相邻像素位置的第一色度分量重构值Cb输入给第二ALF。第二ALF包括当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的ALF色度滤波系数,因此,第二ALF可以基于当前像素位置的第一色度分量重构值Cb,当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的第一色度分量重构值Cb,当前像素位置的相邻像素位置的ALF色度滤波系数进行基于ALF的滤波处理,得到滤波处理后的第一色度分量重构值。然后,将滤波处理后的第一色度分量重构值与第一色度分量偏移值I 1的和,作为第一目标色度分量重构值Cb’。
将当前像素位置的第二色度分量重构值Cr和当前像素位置的相邻像素位置的第二色度分量重构值Cr输入给第二ALF。第二ALF包括当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的ALF色度滤波系数,因此,第二ALF可以基于当前像素位置的第二色度分量重构值Cr,当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的第二色度分量重构值Cr,当前像素位置的相邻像素位置的ALF色度滤波系数进行基于ALF的滤波处理,得到滤波处理后的第二色度分量重构值。然后,可以将滤波处理后的第二色度分量重构值与第二色度分量偏移值I 2的和,作为第二目标色度分量重构值Cr’。
示例性的,第二ALF对第一色度分量重构值Cb进行滤波处理的方式,与对第二色度分量重构值Cr进行滤波处理的方式,二者可以相同,也可以不同,对此不做限制。
综上所述,可以得到当前像素位置的目标色度分量重构值,即第一目标色度分量重构值Cb’和第二目标色度分量重构值Cr’,并得到目标像素位置的目标亮度分量重构值。
情况四,参见图5D所示,为CCALF和ALF联合滤波处理的示意图,色度分量重构值包括第一色度分量重构值Cb和第二色度分量重构值Cr,CCALF用于获得色度分量偏移值,该色度分量偏移值作为第一色度分量重构值Cb对应的第一色度分量偏移值I 1,基于该色度分量偏移值获得第二色度分量重构值Cr对应的第二色度分量偏移值I 2。I 0可以为目标像素位置的亮度分量重构值和目标像素位置的相邻像素位置的亮度分量重构值,可以将目标像素位置的亮度分量重构值和相邻像素位置的亮度分量重构值输入给CCALF(即联合CCALF)。
CCALF包括目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数,因此,可以基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,得到当前像素位置的第一色度分量偏移值I 1。根据第一色度分量偏移值I 1获取当前像素位置的第二色度分量偏移值I 2,如第二色度分量偏移值I 2为第一色度分量偏移值I 1乘以系数w。
与情况二不同的是,在情况四中,基于目标像素位置的亮度分量重构值和ALF亮度滤波系数,进行基于ALF的滤波处理,得到目标像素位置的目标亮度分量重构值。参见图5D所示,可以将目标像素位置的亮度分量重构值和相邻像素位置的亮度分量重构值输入给第一ALF。第一ALF包括目标像素位置的ALF亮度滤波系数和相邻像素位置的ALF亮度滤波系数,因此,第一ALF可以基于目标像素位置的亮度分量重构值,目标像素位置的ALF亮度滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的ALF亮度滤波系数,进行基于ALF的滤波处理,对此滤波处理过程不做限制,得到目标像素位置的目标亮度分量重构值。
在情况四中,基于当前像素位置的色度分量重构值和ALF色度滤波系数,进行基于ALF的滤波处理,得到当前像素位置的滤波处理后的色度分量重构值;例如,基于当前像素位置的色度分量重构值和当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的色度分量重构值和当前像素位置的相邻像素位置的ALF色度滤波系数,进行基于ALF的滤波处理,得到当前像素位置的滤波处理后的色度分量重构值。然后,根据滤波处理后的色度分量重构值和当前像素位置的色度分量偏移值,获得当前像素位置的目标色度分量重构值。
参见图5D所示,将当前像素位置的第一色度分量重构值Cb和当前像素位置的相邻像素位置的第一色度分量重构值Cb输入给第二ALF。第二ALF包括当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的ALF色度滤波系数,因此,第二ALF可以基于当前像素位置的第一色度分量重构值Cb,当前像素位置的ALF色度滤波 系数,当前像素位置的相邻像素位置的第一色度分量重构值Cb,当前像素位置的相邻像素位置的ALF色度滤波系数进行基于ALF的滤波处理,得到滤波处理后的第一色度分量重构值。然后,将滤波处理后的第一色度分量重构值与第一色度分量偏移值I 1的和,作为第一目标色度分量重构值Cb’。
将当前像素位置的第二色度分量重构值Cr和当前像素位置的相邻像素位置的第二色度分量重构值Cr输入给第二ALF。第二ALF包括当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的ALF色度滤波系数,因此,第二ALF可以基于当前像素位置的第二色度分量重构值Cr,当前像素位置的ALF色度滤波系数,当前像素位置的相邻像素位置的第二色度分量重构值Cr,当前像素位置的相邻像素位置的ALF色度滤波系数进行基于ALF的滤波处理,得到滤波处理后的第二色度分量重构值。然后,可以将滤波处理后的第二色度分量重构值与第二色度分量偏移值I 2的和,作为第二目标色度分量重构值Cr’。
综上所述,可以得到当前像素位置的目标色度分量重构值,即第一目标色度分量重构值Cb’和第二目标色度分量重构值Cr’,并得到目标像素位置的目标亮度分量重构值。
在上述实施例中,针对情况三和情况四来说,CCALF和ALF共存,即采用CCALF和ALF联合滤波。针对情况一和情况二来说,CCALF可以独立于ALF,即,当ALF关闭的情况下,仍然可以采用CCALF对色度分量重构值进行补偿,得到目标色度分量重构值。
在上述实施例中,均是基于目标像素位置的亮度分量重构值,采用CCALF得到色度分量偏移值,然后利用色度分量偏移值对当前像素位置的色度分量重构值进行补偿,得到当前像素位置的目标色度分量重构值。示例性的,当ALF开启时,对至少一个像素位置(即当前像素位置)执行ALF的环路滤波操作,再将ALF后的的重构值加上色度分量偏移值(基于目标像素位置的亮度分量重构值得到),得到当前像素位置的目标色度分量重构值。
由以上技术方案可见,本申请实施例中,能够基于目标像素位置的亮度分量重构值和目标像素位置的相邻像素位置的亮度分量重构值,进行基于CCALF的滤波处理,得到当前像素位置的色度分量偏移值,并利用当前像素位置的色度分量重构值和当前像素位置的色度分量偏移值,获得当前像素位置的目标色度分量重构值,提高CCALF的环路滤波的准确性,提高CCALF的环路滤波效果,提高编码性能,使当前处理单元的重构值更接近原始像素。
实施例12:在实施例11中,需要根据目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理。为了得到目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数,可以采用如下方式实现:
步骤s11、编码端和解码端均维护CCALF滤波系数列表,该CCALF滤波系数列表可以包括至少一个CCALF滤波系数集合。针对该CCALF滤波系数列表中的每个CCALF滤波系数集合来说,该CCALF滤波系数集合可以包括多个CCALF滤波系数。
针对每个CCALF滤波系数集合来说,CCALF滤波系数集合包括目标像素位置的CCALF滤波系数(即一个目标像素位置的CCALF滤波系数)和目标像素位置的相邻像素位置的CCALF滤波系数(如多个相邻像素位置的CCALF滤波系数)。在此情况下,可以从CCALF滤波系数集合中获取目标像素位置的CCALF滤波系数和相邻像素位置的CCALF滤波系数。
针对每个CCALF滤波系数集合来说,CCALF滤波系数集合可以包括目标像素位置的相邻像素位置的CCALF滤波系数(如多个相邻像素位置的CCALF滤波系数),但是未包括目标像素位置的CCALF滤波系数。在此情况下,可以从CCALF滤波系数集合中获取相邻像素位置的CCALF滤波系数。针对目标像素位置的CCALF滤波系数,可以将预设数值作为目标像素位置的CCALF滤波系数,或采用其它方式获取目标像素位置的CCALF滤波系数,对此不做限制,只是CCALF滤波系数集合未包括目标像素位置的CCALF滤波系数。
在一种可能的实施方式中,编码端和解码端可以预先配置CCALF滤波系数列表,只要编码端的CCALF滤波系数列表与解码端的CCALF滤波系数列表相同即可。例如,预先在编码端配置CCALF滤波系数列表A,并在解码端配置CCALF滤波系数列表A。
在另一种可能的实施方式中,编码端可以获取CCALF滤波系数列表,对此获取方式不做限制,只要能够获取到CCALF滤波系数列表即可。然后,编码端通过码流将CCALF滤波系数列表发送给解码端,解码端可以从码流中解析出CCALF滤波系数列表。
示例性的,CCALF滤波系数列表可以是帧级的CCALF滤波系数列表,即,针对一帧图像中的所有图像块,共用同一个帧级的CCALF滤波系数列表。在此基础上,编码端通过码流携带帧级的CCALF滤波系数列表,解码端从码流中解析帧级的CCALF滤波系数列表。解码端在得到CCALF滤波系数列表后,可以在本地存储CCALF滤波系数列表。
示例性的,CCALF滤波系数列表可以是序列级(SPS)的CCALF滤波系数列表,即针对多帧图像中的所有图像块,共用同一个序列级的CCALF滤波系数列表。在此基础上,编码端通过码流携带序列级的CCALF滤波系数列表,解码端从码流中解析序列级的CCALF滤波系数列表。解码端在得到CCALF滤波系数列表后,可以在本地存储CCALF滤波系数列表。
示例性的,CCALF滤波系数列表可以是自适应参数集(Adaptive Parameter Set,APS)级的CCALF滤波系数列表,即,针对多帧图像中的所有图像块,共用同一个自适应参数集级的CCALF滤波系数列表。在此基础上,编码端通过码流携带自适应参数集级的CCALF滤波系数列表,解码端从码流中解析自适应参数集级的CCALF滤波系数列表。解码端在得到自适应参数集级的CCALF滤波系数列表后,可以在本地存储CCALF滤波系数列表。
针对自适应参数集级的CCALF滤波系数列表的情况,可以存在至少一个自适应参数集级的CCALF滤波系数列表,从至少一个自适应参数集级的CCALF滤波系数列表中选择一个自适应参数集级的CCALF滤波系数列表,作为图像级或者slice级的CCALF滤波系数列表。
当然,上述方式只是示例,对此不做限制,如CCALF滤波系数列表还可以是图像参数集(PPS)级的CCALF滤波系数列表,或片级(SLICE或者TILE)的CCALF滤波系数列表。
无论是哪个级别的CCALF滤波系数列表,只要编码端和解码端均维护有CCALF滤波系数列表,且编码端的CCALF滤波系数列表与解码端的CCALF滤波系数列表相同即可。
步骤s12、获取当前处理单元的CCALF滤波系数集合。例如,针对编码端和解码端来说,均从当前处理单元的CCALF滤波系数列表中获取当前处理单元的CCALF滤波系数集合。
示例性的,若CCALF滤波系数列表是帧级的CCALF滤波系数列表,则可以根据帧级的CCALF滤波系数列表确定当前处理单元的CCALF滤波系数列表。比如说,可以将当前处理单元所在帧的CCALF滤波系数列表,确定为当前处理单元的CCALF滤波系数列表。
示例性的,若CCALF滤波系数列表是序列级的CCALF滤波系数列表,则可以根据序列级的CCALF滤波系数列表确定当前处理单元的CCALF滤波系数列表。比如说,可以将当前处理单元所在序列的CCALF滤波系数列表,确定为当前处理单元的CCALF滤波系数列表。
若CCALF滤波系数列表是自适应参数集级的CCALF滤波系数列表,则根据自适应参数集级的CCALF滤波系数列表确定当前处理单元的CCALF滤波系数列表。如将当前处理单元所在自适应参数集的CCALF滤波系数列表,确定为当前处理单元的CCALF滤波系数列表。
示例性的,针对编码端来说,确定当前处理单元是否启动CCALF滤波操作,对此确定方式不做限制。若当前处理单元启动CCALF滤波操作,则从当前处理单元的CCALF滤波系数列表中获取当前处理单元的CCALF滤波系数集合。例如,针对CCALF滤波系数列表中的每个CCALF滤波系数集合,编码端可以确定该CCALF滤波系数集合对应的率失真代价值,对此确定方式不做限制。将最小的率失真代价值对应的CCALF滤波系数集合,作为当前处理单元的CCALF滤波系数集合。编码端在向解码端发送针对当前处理单元的编码比特流时,该编码比特流中可以携带CCALF滤波系数集合的指示信息。例如,若当前处理单元未启动CCALF滤波操作,则CCALF滤波系数集合的指示信息用于指示当前处理单元未启动CCALF滤波操作。或者,若当前处理单元启动CCALF滤波操作,则CCALF滤波系数集合的指示信息用于指示当前处理单元启动CCALF滤波操作,且该指示信息用于指示当前处理单元的CCALF滤波系数集合在CCALF滤波系数列表中的索引值。针对解码端来说,获取当前处理单元的编码比特流,并从该编码比特流中获取CCALF滤波系数集合的指示信息。若该指示信息用于指示当前处理单元未启动CCALF滤波操作,则解码端不需要执行CCALF滤波操作。若该指示信息用于指示当前处理单元启动CCALF滤波操作,且指示当前处理单元的CCALF滤波系数集合在CCALF滤波系数列表中的索引值,则解码端基于该指示信息从当前处理单元的CCALF滤波系数列表中获取当前处理单元的CCALF滤波系数集合,例如,将CCALF滤波系数列表中与该索引值对应的CCALF滤波系数集合作为当前处理单元的CCALF滤波系数集合。然后,解码端基于当前处理单元的CCALF滤波系数集合执行CCALF滤波操作。
步骤s13、获取目标像素位置的CCALF滤波系数,并从当前处理单元的CCALF滤波系数集合中获取目标像素位置的相邻像素位置的CCALF滤波系数。例如,若CCALF滤波系数集合包括目标像素位置的CCALF滤波系数,则从当前处理单元的CCALF滤波系数集合中获取目标像素位置的CCALF滤波系数。或者,若CCALF滤波系数集合未包括目标像素位置的CCALF滤波系数,则将预设数值作为目标像素位置的CCALF滤波系数,或采用其它方式获取目标像素位置的CCALF滤波系数,对此不做限制,能够得到目标像素位置的CCALF滤波系数即可。示例性的,在得到目标像素位置的CCALF滤波系数,相邻像素位置的CCALF滤波系数后,就可以基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,得到当前像素位置的色度分量偏移值,具体实现过程可以参见上述实施例。
在上述实施例中,在通过码流传输CCALF滤波系数列表(如帧级的CCALF滤波系数列表,或序列级的CCALF滤波系数列表,或自适应参数集级的CCALF滤波系数列表)时,该CCALF滤波系数列表包括至少一个CCALF滤波系数集合,针对每个CCALF滤波系数集合,可以包括至少一个CCALF滤波系数。示例性的,针对CCALF滤波系数集合中的每个CCALF滤波系数:该CCALF滤波系数为0,或2的N次方,或2的N次方的相反数,N为0或小于第一阈值的正整数;和/或,该CCALF滤波系数位于第二阈值与第三阈值之间。
例如,为了减少滤波过程中的乘法操作,用移位代替乘法操作,可以对CCALF滤波系数进行限制,将CCALF滤波系数限制为0,或2的N次方(即幂次方),或2的N次方的相反数,第一阈值可以根据经验进行配置,对此不做限制,如第一阈值为5、6等。基于此,CCALF滤波系数可以为0,1,2,4,8,16,32,64,-1,-2,-4,-8,-16,-32,-64等。综上所述,针对CCALF滤波系数集合中的每个CCALF滤波系数,均需要满足上述限制关系。
又例如,将CCALF滤波系数限制在第二阈值与第三阈值之间,第二阈值和第三阈值均可以根据经验进行配置,对此不做限制,例如,第二阈值可以为负值,第三阈值可以为正值,如第二阈值可以为-64,第三阈值可以为64,这样,可以将CCALF滤波系数限制在[-64,64]的范围内,如第二阈值可以为-63,第三阈值可以为63,这样,可以将CCALF滤波系数限制在[-63,63]的范围内,如第二阈值可以为-127,第三阈值可以为127,这样,可以将CCALF滤波系数限制在[-127,127]的范围内,如第二阈值可以为-32,第三阈值可以为32,这样,可以将CCALF滤波系数限制在[-32,32]的范围内。当然,上述只是几个示例,对此不做限制。综上所述,针对CCALF滤波系数集合中的每个 CCALF滤波系数,均需要满足上述限制关系。
又例如,将CCALF滤波系数限制为0,或2的N次方,或2的N次方的相反数,N为0或小于第一阈值的正整数,并将CCALF滤波系数限制在第二阈值与第三阈值之间,如第一阈值为6,第二阈值可以为-63,第三阈值可以为63,则CCALF滤波系数可以为0,1,2,4,8,16,32,-1,-2,-4,-8,-16,-32,即每个CCALF滤波系数均需要满足上述限制关系。
在上述实施例中,在通过码流传输CCALF滤波系数列表时,该CCALF滤波系数列表包括至少一个CCALF滤波系数集合,针对每个CCALF滤波系数集合,包括至少一个CCALF滤波系数。在码流传输CCALF滤波系数集合中的每个CCALF滤波系数时,采用定长码编码方式对CCALF滤波系数的映射值(如CCALF滤波系数为2的N次方时,映射值为N+1)进行编码,且采用定长码解码方式对CCALF滤波系数的映射值进行解码。例如,针对编码端来说,采用定长码编码方式对CCALF滤波系数的映射值进行编码,将编码后的映射值添加到码流,从而固定编码比特开销,减少比特开销。针对解码端,采用定长码解码方式对CCALF滤波系数的映射值进行解码,得到解码后的映射值,并将映射值转换为CCALF滤波系数,例如,将映射值N+1转换为2的N次方,而2的N次方为CCALF滤波系数。
在上述实施例中,在通过码流传输CCALF滤波系数列表时,该CCALF滤波系数列表包括至少一个CCALF滤波系数集合,针对每个CCALF滤波系数集合,包括至少一个CCALF滤波系数。针对CCALF滤波系数集合中的每个CCALF滤波系数:若CCALF滤波系数不为0,则码流中可以包括CCALF滤波系数的指示信息r1和指示信息r2,该指示信息r1用于指示CCALF滤波系数的幅值,该指示信息r2用于指示CCALF滤波系数的符号位。
例如,针对编码端来说,在需要传输CCALF滤波系数时,当CCALF滤波系数非零时,分离CCALF滤波系数的符号位和CCALF滤波系数的幅值,如针对CCALF滤波系数-32来说,CCALF滤波系数的符号位为负(-),CCALF滤波系数的幅值为32,针对CCALF滤波系数32来说,CCALF滤波系数的符号位为正(+),CCALF滤波系数的幅值为32。基于此,编码端在码流中添加指示信息r1和指示信息r2,指示信息r1用于指示CCALF滤波系数的幅值(如32),指示信息r2可以为一个比特位,用于表示正负的符号位。
针对解码端来说,在解码CCALF滤波系数时,先从码流中解析出指示信息r1,基于指示信息r1确定CCALF滤波系数的幅值(如32)。当CCALF滤波系数的幅值非零时,再从码流中解析出指示信息r2,基于指示信息r2确定CCALF滤波系数的符号位。然后,将CCALF滤波系数的幅值和CCALF滤波系数的符号位,组成CCALF滤波系数。
综上所述,针对编码端来说,CCALF滤波系数的编码方式可以包括:在CCALF滤波系数为2的N次方(或2的N次方的相反数)的情况下,对CCALF滤波系数的幅值进行映射,映射值为N+1,如CCALF滤波系数为2的3次方(或2的3次方的相反数),则映射值为4。然后,采用定长码编码方式对映射值4进行编码,定长码的长度取决于CCALF滤波系数的最大范围,比如当N最大为7时,定长码的长度需要M比特进行编码,如M可以为3。此外,在码流中添加一个比特位,用于表示CCALF滤波系数的正负的符号位。示例性的,当CCALF滤波系数为0时,无需进行映射过程,直接在码流中编码CCALF滤波系数。
针对解码端来说,CCALF滤波系数的解码方式可以包括:在从码流中解码CCALF滤波系数时,采用定长码解码方式对码流中的CCALF滤波系数进行解码,得到映射值(即N+1),然后,将映射值转换为2的N次方,例如,若映射值为4,则将映射值转换为2的3次方,即8。然后,从码流中解析出CCALF滤波系数的正负的符号位,若为正的符号位,则CCALF滤波系数为8,若为负的符号位,则CCALF滤波系数为-8,至此得到CCALF滤波系数。
此外,若解码端从码流中解析出0,则可以直接确定CCALF滤波系数为0。
综上所述,参数值(即CCALF滤波系数)可以仅为2的n次方(这样乘法则可以通过移位实现,硬件实现复杂度低),具体的,可以仅为如下系数中的之一:{-64,-32,-16,-8,-4,-2,-1,0,1,2,4,8,16,32,64}。为了节省系数编码的代价,通过{-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7}分别进行一一对应索引,即索引值-7表示-64,索引值0表示0,索引值7表示64。为了表示索引值,还可以通过定长3比特编码绝对值,1个标志位编码表示符号位,具体过程参见上述实施例。
实施例13:在实施例11和实施例12中,可以涉及CCALF滤波系数集合,CCALF滤波系数集合包括目标像素位置的CCALF滤波系数和目标像素位置的相邻像素位置的CCALF滤波系数,或者,CCALF滤波系数集合包括目标像素位置的相邻像素位置的CCALF滤波系数。以下结合几个具体情况,对CCALF滤波系数集合中的CCALF滤波系数进行说明。
情况一,参见图6A所示,为目标像素位置的相邻像素位置的示意图。像素位置A3为目标像素位置,CCALF滤波系数集合包括:目标像素位置的正上侧像素位置(即像素位置A1)的CCALF滤波系数,目标像素位置的左侧像素位置(即像素位置A2)的CCALF滤波系数,目标像素位置的右侧像素位置(即像素位置A4)的CCALF滤波系数,目标像素位置的正下侧像素位置(即像素位置A6)的CCALF滤波系数,目标像素位置的左下侧像素位置(即像素位置A5)的CCALF滤波系数,目标像素位置的右下侧像素位置(即像素位置A7)的CCALF滤波系数,目标像素位置的正下侧第二行像素位置(即像素位置A8)的CCALF滤波系数。
示例性的,参见图6A所示,为3x2的形状,对于每个色度分量,最多有4组滤波系数值。由于最多有2个色度分量,因此,最多有8组CCALF的滤波系数值。
在一种可能的实施方式中,参见图6B所示,像素位置A1的CCALF滤波系数为f0,像素位置A2的CCALF 滤波系数为f1,像素位置A3的CCALF滤波系数为f2,像素位置A4的CCALF滤波系数为f3,像素位置A5的CCALF滤波系数为f4,像素位置A6的CCALF滤波系数为f5,像素位置A7的CCALF滤波系数为f6,像素位置A8的CCALF滤波系数为f7。综上所述,每个像素位置的CCALF滤波系数均不同,f2为目标像素位置的CCALF滤波系数,f0,f1,f3,f4,f5,f6,f7分别为各相邻像素位置的CCALF滤波系数。
在另一种可能的实施方式中,参见图6C所示,像素位置A1的CCALF滤波系数为f0,像素位置A2的CCALF滤波系数为f1,像素位置A3的CCALF滤波系数为f2,像素位置A4的CCALF滤波系数为f3,像素位置A5的CCALF滤波系数为f4,像素位置A6的CCALF滤波系数为f5,像素位置A7的CCALF滤波系数为f6,像素位置A8的CCALF滤波系数为f0。综上所述,f2为目标像素位置的CCALF滤波系数,f0,f1,f3,f4,f5,f6分别为各相邻像素位置的CCALF滤波系数,像素位置A1(即正上侧像素位置)的CCALF滤波系数f0与像素位置A8(即正下侧第二行像素位置)的CCALF滤波系数f0可以相同。
在上述方式中,通过将像素位置A1与像素位置A8的CCALF滤波系数设置为相同,从而简化CCALF滤波系数的设计,减少CCALF滤波系数集合中的CCALF滤波系数数量。
在另一种可能的实施方式中,参见图6D所示,像素位置A1的CCALF滤波系数为f0,像素位置A2的CCALF滤波系数为f1,像素位置A3的CCALF滤波系数为f2,像素位置A4的CCALF滤波系数为f1,像素位置A5的CCALF滤波系数为f3,像素位置A6的CCALF滤波系数为f4,像素位置A7的CCALF滤波系数为f3,像素位置A8的CCALF滤波系数为f0。f2为目标像素位置的CCALF滤波系数,f0,f1,f3,f4分别为各相邻像素位置的CCALF滤波系数。像素位置A1(即正上侧像素位置)的CCALF滤波系数f0与像素位置A8(即正下侧第二行像素位置)的CCALF滤波系数f0相同。像素位置A2(即左侧像素位置)的CCALF滤波系数f1与像素位置A4(即右侧像素位置)的CCALF滤波系数f1相同。像素位置A5(即左下侧像素位置)的CCALF滤波系数f3与像素位置A7(即右下侧像素位置)的CCALF滤波系数f3相同。在上述方式中,通过将不同像素位置的CCALF滤波系数设置为相同,从而简化CCALF滤波系数的设计,减少CCALF滤波系数集合中的CCALF滤波系数数量。
在另一种可能的实施方式中,参见图6E所示,像素位置A1的CCALF滤波系数为f0,像素位置A2的CCALF滤波系数为f1,像素位置A3的CCALF滤波系数为f2,像素位置A4的CCALF滤波系数为f3,像素位置A5的CCALF滤波系数为f3,像素位置A6的CCALF滤波系数为f4,像素位置A7的CCALF滤波系数为f1,像素位置A8的CCALF滤波系数为f0。f2为目标像素位置的CCALF滤波系数,f0,f1,f3,f4分别为各相邻像素位置的CCALF滤波系数。像素位置A1(即正上侧像素位置)的CCALF滤波系数f0与像素位置A8(即正下侧第二行像素位置)的CCALF滤波系数f0相同。像素位置A2(即左侧像素位置)的CCALF滤波系数f1与像素位置A7(即右下侧像素位置)的CCALF滤波系数f1相同。像素位置A4(即右侧像素位置)的CCALF滤波系数f3与像素位置A5(即左下侧像素位置)的CCALF滤波系数f3相同。在上述方式中,通过将不同像素位置的CCALF滤波系数设置为相同,从而简化CCALF滤波系数的设计,减少CCALF滤波系数集合中的CCALF滤波系数数量。
当然,上述几种方式只是示例,可以将任意像素位置的CCALF滤波系数设置为相同,例如,只要相同的CCALF滤波系数具有对称性(例如,轴对称或中心对称)即可,对此CCALF滤波系数不做限制。
情况二,参见图6F所示,为目标像素位置的相邻像素位置的示意图。像素位置B7为目标像素位置,CCALF滤波系数集合包括:目标像素位置的正上侧第二行像素位置(像素位置B1)的CCALF滤波系数,目标像素位置的左上侧像素位置(像素位置B2)的CCALF滤波系数,目标像素位置的正上侧像素位置(像素位置B3)的CCALF滤波系数,目标像素位置的右上侧像素位置(像素位置B4)的CCALF滤波系数,目标像素位置的左侧第二列像素位置(像素位置B5)的CCALF滤波系数,目标像素位置的左侧像素位置(像素位置B6)的CCALF滤波系数,目标像素位置的右侧像素位置(像素位置B8)的CCALF滤波系数,目标像素位置的右侧第二列像素位置(像素位置B9)的CCALF滤波系数,目标像素位置的左下侧像素位置(像素位置B10)的CCALF滤波系数,目标像素位置的正下侧像素位置(像素位置B11)的CCALF滤波系数,目标像素位置的右下侧像素位置(像素位置B12)的CCALF滤波系数,目标像素位置的正下侧第二行像素位置(像素位置B13)的CCALF滤波系数。
在一种可能的实施方式中,参见图6G所示,像素位置B1的CCALF滤波系数为f0,像素位置B2的CCALF滤波系数为f1,像素位置B3的CCALF滤波系数为f2,像素位置B4的CCALF滤波系数为f3,像素位置B5的CCALF滤波系数为f4,像素位置B6的CCALF滤波系数为f5,像素位置B7的CCALF滤波系数为f6,像素位置B8的CCALF滤波系数为f7,像素位置B9的CCALF滤波系数为f8,像素位置B10的CCALF滤波系数为f9,像素位置B11的CCALF滤波系数为f10,像素位置B12的CCALF滤波系数为f11,像素位置B13的CCALF滤波系数为f12。综上所述,每个像素位置的CCALF滤波系数均不同,f6为目标像素位置的CCALF滤波系数,f0-f5,f7-f12分别为各相邻像素位置的CCALF滤波系数。
在另一种可能的实施方式中,参见图6H所示,像素位置B1的CCALF滤波系数为f0,像素位置B2的CCALF滤波系数为f1,像素位置B3的CCALF滤波系数为f2,像素位置B4的CCALF滤波系数为f3,像素位置B5的CCALF滤波系数为f4,像素位置B6的CCALF滤波系数为f5,像素位置B7的CCALF滤波系数为f6,像素位置B8的CCALF滤波系数为f5,像素位置B9的CCALF滤波系数为f4,像素位置B10的CCALF滤波系数为f3,像素位置B11的CCALF滤波系数为f2,像素位置B12的CCALF滤波系数为f1,像素位置B13的CCALF滤波系数为f0。综上所述,像素位置B1(正上侧第二行像素位置)的CCALF滤波系数f0与像素位置B13(正下侧第二行像素位置)的CCALF滤波系数f0相同。像素位置B2(左上侧像素位置)的CCALF滤波系数f1与像素位置B12(右下侧像素位置)的CCALF滤波系数f1相同。像素位置B3(正上侧像素位置)的CCALF滤波系数f2与像素位置B11(正下侧像素位置)的CCALF滤波系数f2相同。像素位置B4(右上侧像素位置)的CCALF滤波系数f3与像素位置B10(左下侧像素位置)的CCALF滤波系数f3相同。像素位置B5(左侧第二列像素位置)的CCALF滤波系数f4与像素位置 B9(右侧第二列像素位置)的CCALF滤波系数f4相同。像素位置B6(左侧像素位置)的CCALF滤波系数f5与像素位置B8(右侧像素位置)的CCALF滤波系数f5相同。通过将不同像素位置的CCALF滤波系数设为相同,简化CCALF滤波系数设计,减少CCALF滤波系数集合的CCALF滤波系数数量。
在另一种可能的实施方式中,参见图6I所示,像素位置B1的CCALF滤波系数为f0,像素位置B2的CCALF滤波系数为f1,像素位置B3的CCALF滤波系数为f2,像素位置B4的CCALF滤波系数为f1,像素位置B5的CCALF滤波系数为f4,像素位置B6的CCALF滤波系数为f5,像素位置B7的CCALF滤波系数为f6,像素位置B8的CCALF滤波系数为f5,像素位置B9的CCALF滤波系数为f4,像素位置B10的CCALF滤波系数为f3,像素位置B11的CCALF滤波系数为f2,像素位置B12的CCALF滤波系数为f3,像素位置B13的CCALF滤波系数为f0。综上所述,像素位置B1(正上侧第二行像素位置)的CCALF滤波系数f0与像素位置B13(正下侧第二行像素位置)的CCALF滤波系数f0相同。像素位置B2(左上侧像素位置)的CCALF滤波系数f1与像素位置B4(右上侧像素位置)的CCALF滤波系数f1相同。像素位置B3(正上侧像素位置)的CCALF滤波系数f2与像素位置B11(正下侧像素位置)的CCALF滤波系数f2相同。像素位置B5(左侧第二列像素位置)的CCALF滤波系数f4与像素位置B9(右侧第二列像素位置)的CCALF滤波系数f4相同。像素位置B6(左侧像素位置)的CCALF滤波系数f5与像素位置B8(右侧像素位置)的CCALF滤波系数f5相同。像素位置B10(左下侧像素位置)的CCALF滤波系数f3与像素位置B12(右下侧像素位置)的CCALF滤波系数f3相同。通过将不同像素位置的CCALF滤波系数设为相同,简化CCALF滤波系数设计,减少CCALF滤波系数集合的CCALF滤波系数数量。
当然,上述几种方式只是示例,可以将任意像素位置的CCALF滤波系数设置为相同,例如,只要相同的CCALF滤波系数具有对称性(例如轴对称或中心对称)即可,对此CCALF滤波系数不做限制。
情况三,参见图6J所示,为目标像素位置的相邻像素位置的示意图。像素位置C3可以为目标像素位置,CCALF滤波系数集合,可以包括:该目标像素位置的正上侧像素位置(即像素位置C1)的CCALF滤波系数,该目标像素位置的左侧像素位置(即像素位置C2)的CCALF滤波系数,该目标像素位置的正下侧像素位置(即像素位置C4)的CCALF滤波系数,该目标像素位置的右下侧像素位置(即像素位置C5)的CCALF滤波系数,该目标像素位置的正下侧第二行像素位置(即像素位置C6)的CCALF滤波系数。
在一种可能的实施方式中,参见图6K所示,像素位置C1的CCALF滤波系数为f0,像素位置C2的CCALF滤波系数为f4,像素位置C3的CCALF滤波系数为f1,像素位置C4的CCALF滤波系数为f2,像素位置C5的CCALF滤波系数为f5,像素位置C6的CCALF滤波系数为f3。综上所述,每个像素位置的CCALF滤波系数均不同,f1为目标像素位置的CCALF滤波系数,f0,f2,f3,f4,f5分别为各相邻像素位置的CCALF滤波系数。
在另一种可能的实施方式中,参见图6L所示,像素位置C1的CCALF滤波系数为f0,像素位置C2的CCALF滤波系数为f4,像素位置C3的CCALF滤波系数为f1,像素位置C4的CCALF滤波系数为f2,像素位置C5的CCALF滤波系数为f4,像素位置C6的CCALF滤波系数为f3。像素位置C2(左侧像素位置)的CCALF滤波系数f4与像素位置C5(右下侧像素位置)的CCALF滤波系数f4相同。通过将不同像素位置的CCALF滤波系数设为相同,简化CCALF滤波系数设计,减少CCALF滤波系数集合的CCALF滤波系数数量。
当然,上述几种方式只是示例,可以将任意像素位置的CCALF滤波系数设置为相同,例如,只要相同的CCALF滤波系数具有对称性(例如,轴对称或中心对称)即可,对此CCALF滤波系数不做限制。
情况四,参见图6M所示,为目标像素位置的相邻像素位置的示意图。像素位置D3可以为目标像素位置,CCALF滤波系数集合,可以包括:目标像素位置的正上侧像素位置(即像素位置D1)的CCALF滤波系数,目标像素位置的左侧像素位置(即像素位置D2)的CCALF滤波系数,目标像素位置的右侧像素位置(即像素位置D4)的CCALF滤波系数,目标像素位置的正下侧像素位置(即像素位置D5)的CCALF滤波系数。
在一种可能的实施方式中,参见图6N所示,像素位置D1的CCALF滤波系数为f0,像素位置D2的CCALF滤波系数为f1,像素位置D3的CCALF滤波系数为f2,像素位置D4的CCALF滤波系数为f3,像素位置D5的CCALF滤波系数为f4。
综上所述,每个像素位置的CCALF滤波系数均不同,f2为目标像素位置的CCALF滤波系数,f0,f1,f3,f4分别为各相邻像素位置的CCALF滤波系数。
实施例14:在上述实施例中,可以基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,得到当前像素位置的色度分量偏移值。在一种可能的实施方式中,可以对相邻像素位置的CCALF滤波系数进行变换操作,得到相邻像素位置的变换后CCALF滤波系数。然后,基于目标像素位置的亮度分量重构值,目标像素位置的CCALF滤波系数,相邻像素位置的亮度分量重构值和相邻像素位置的变换后CCALF滤波系数,进行基于CCALF的滤波处理,得到当前像素位置的色度分量偏移值。
示例性的,上述变换操作具体为:旋转变换操作;或者,垂直翻转变换操作;或者,对角翻转变换操作。例如,对相邻像素位置的CCALF滤波系数进行旋转变换操作。或者,对相邻像素位置的CCALF滤波系数进行垂直翻转变换操作。或者,对相邻像素位置的CCALF滤波系数进行对角翻转变换操作。当然,上述方式只是几个示例,对此不做限制。例如,可以基于亮度的梯度参数(对梯度参数的计算方式不做限制),确定是否对CCALF滤波系数进行变换操作(几何变换映射),若是,对相邻像素位置的CCALF滤波系数进行变换操作。
例如,在对CCALF滤波系数进行对角翻转变换操作时,可以采用公式1实现:
f D(k,s)=f(s,k)     公式1
在对CCALF滤波系数进行垂直翻转变换操作时,可以采用公式2实现:
f V(k,s)=f(k,K-s-1)     公式2
在对CCALF滤波系数进行旋转变换操作时,可以采用公式3实现:
f R(k,s)=f(K-s-1,k)    公式3
在上述公式中,f D(k,s)表示对角翻转变换操作后的像素位置(k,s)的CCALF滤波系数,f(s,k)表示对角翻转变换操作前的像素位置(s,k)的CCALF滤波系数。f V(k,s)表示垂直翻转变换操作后的像素位置(k,s)的CCALF滤波系数,f(k,K-s-1)表示垂直翻转变换操作前的像素位置(k,K-s-1)的CCALF滤波系数。f R(k,s)表示旋转变换操作后的像素位置(k,s)的CCALF滤波系数,f(K-s-1,k)表示旋转变换操作前的像素位置(K-s-1,k)的CCALF滤波系数。
或者,f D(k,s)表示对角翻转变换操作前的像素位置(k,s)的CCALF滤波系数,f(s,k)表示对角翻转变换操作后的像素位置(s,k)的CCALF滤波系数。f V(k,s)表示垂直翻转变换操作前的像素位置(k,s)的CCALF滤波系数,f(k,K-s-1)表示垂直翻转变换操作后的像素位置(k,K-s-1)的CCALF滤波系数。f R(k,s)表示旋转变换操作前的像素位置(k,s)的CCALF滤波系数,f(K-s-1,k)表示旋转变换操作后的像素位置(K-s-1,k)的CCALF滤波系数。
在上述公式中,K可以为CCALF的滤波器尺寸,0<=k<=K-1,k,s均为像素位置的坐标,例如,(0,0)表示左上角,(K-1,K-1)表示右下角。
实施例15:以下结合几个具体应用场景,对上述实施例的实现过程进行说明。
应用场景1:在编码流信息中,可以增加序列级语法元素(SPS级),或者帧级语法元素(frame级),或者图像级语法元素(PPS级),控制CCALF的开启和关闭。比如说,通过在编码流信息中增加序列级语法元素,以通过该序列级语法元素控制CCALF的开启,或者,通过该序列级语法元素控制CCALF的关闭。又例如,通过在编码流信息中增加帧级语法元素,以通过该帧级语法元素控制CCALF的开启,或者,通过该帧级语法元素控制CCALF的关闭。又例如,通过在编码流信息中增加图像级语法元素,以通过该图像级语法元素控制CCALF的开启,或者,通过该图像级语法元素控制CCALF的关闭。
应用场景2:CCALF滤波过程是否开启的控制最小颗粒度,可以在CTB层级进行控制,每一个CTB都可以有一个标志位表示当前处理单元是否开启CCALF。
应用场景3:CCALF的SPS级的控制开关,独立于ALF的SPS的控制开关。比如说,CCALF具有SPS级的第一控制开关,ALF具有SPS的第二控制开关,通过第一控制开关控制CCALF的开启或者关闭,通过第二控制开关控制ALF的开启或者关闭。
例如,可以通过第一控制开关控制CCALF开启,通过第二控制开关控制ALF开启。或者,可以通过第一控制开关控制CCALF开启,通过第二控制开关控制ALF关闭。或者,可以通过第一控制开关控制CCALF关闭,通过第二控制开关控制ALF开启。或者,可以通过第一控制开关控制CCALF关闭,通过第二控制开关控制ALF关闭。
应用场景4:CCALF和ALF共用一个SPS级的控制开关,即一个SPS的控制开关同时控制ALF和CCALF的开启与关闭。例如,可以通过控制开关控制CCALF开启,并控制ALF开启。或者,可以通过控制开关控制CCALF关闭,并控制ALF关闭。
实施例16:针对ALF的滤波过程,可以采用滤波器(如维纳滤波器)进行滤波操作,其目的是使得滤波信号与原始信号之间的均方误差最小。参见图7所示,可以提供两种形状的滤波器,5*5大小的滤波器适用于色度分量,7*7大小的滤波器适用于亮度分量。5*5大小的滤波器中,C6为中心像素位置,7*7大小的滤波器中,C12为中心像素位置,其余像素为周围像素。中心像素位置为待滤波像素位置,利用周围像素位置来对中心像素位置进行滤波。
对于亮度分量来说,对于不同的小块使用不同的滤波器,因此,可以将这些小块进行分类,以区分小块要使用哪一个滤波器,如,基于方向性D和活动值A的量化值计算得出。
示例性的,对于亮度分量来说,每个4*4的小块被分为25个种类,类别为ClassIDX(包含信息:小块中主方向以及主方向与其垂直方向上梯度和的差,以及垂直与水平方向梯度和),计算方式如下:C=5D+A,而C就表示25个种类中的某个种类,从而得到小块要使用哪一个滤波器。D表示当前处理单元的Direction(方向性),A表示当前处理单元的Activity(整体梯度值大小,即活动值的量化值)。关于D和A的确定方式,本文不做限制,只要能得到D和A即可。示例性的,D=0,1,2,3,4,A=0,1,2,3,4,故C的取值为0到24,即25个分类索引。
对于色度分量来说,无需块分类,对每个色度分量应用单个ALF系数集,对此不做限制。
示例性的,针对码流中携带的滤波参数,可以涉及:对亮度分量和色度分量应用不同的滤波器,ALF的滤波参数信息在APS中进行声明。在一个APS中至多N组亮度滤波系数(N优选为25)和clip索引信息,以及,至多M组色度滤波系数(M优选为8)和clip索引信息被声明。控制ALF是否开启可以多层级进行控制,控制语法可以存在于序列级参数语法中,SLICE级语法中,帧级语法中等,ALF滤波过程是否开启的控制最小颗粒度,可以在CTB层级进行控制,每一个CTB都可以有一个标志位表示当前处理单元是否开启ALF。
基于与上述方法同样的申请构思,本申请实施例还提出一种解码装置,所述装置应用于解码端,参见图8A所示,为所述装置的结构图,所述装置包括:
确定模块811,用于确定序列级参数集SPS级语法的ALF序列级控制开关标志位,是否表示当前序列允许启用ALF;
解码模块812,用于当SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF时,则从所述SPS级语法中解码CCALF序列级控制开关标志位。
所述解码模块812还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,当前序列存在色度分量,从SPS级语法中解码CCALF序列级控制开关标志位。
所述解码模块812还用于:从所述SPS级语法中解码CCALF序列级控制开关标志位时,若CCALF的通用限制信息语法表示不允许启用CCALF,则确定所述CCALF序列级控制开关标志位为第一取值;或者,若CCALF的通用限制信息语法表示允许启用CCALF,则从所述SPS级语法中解码CCALF序列级控制开关标志位为第二取值;其中,所述第一取值表示当前序列不允许启用CCALF;所述第二取值表示当前序列允许启用CCALF。
所述解码模块812还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位;若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从所述图像头级语法中解码CCALF图像头级控制开关标志位。
所述解码模块812还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则从片头级语法中解码ALF片头级控制开关标志位;若所述片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从所述片头级语法中解码CCALF片头级控制开关标志位。
所述解码模块812还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位;若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从所述图像头级语法中解码CCALF图像头级控制开关标志位。
所述解码模块812还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则从片头级语法中解码ALF片头级控制开关标志位;若所述片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从所述片头级语法中解码CCALF片头级控制开关标志位。
基于与上述方法同样的申请构思,本申请实施例还提出一种编码装置,所述装置应用于编码端,参见图8B所示,为所述装置的结构图,所述装置包括:
确定模块821,用于确定序列级参数集SPS级语法的ALF序列级控制开关标志位,是否表示当前序列允许启用ALF;
编码模块822,用于当SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF时,在所述SPS级语法中编码CCALF序列级控制开关标志位。
所述编码模块822还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列存在色度分量,则在SPS级语法中编码CCALF序列级控制开关标志位。
所述编码模块822还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列不允许启用ALF,则禁止在所述SPS级语法中编码CCALF序列级控制开关标志位。
所述编码模块822还用于:在所述SPS级语法中编码CCALF序列级控制开关标志位时,若CCALF的通用限制信息语法表示不允许启用CCALF,则所述CCALF序列级控制开关标志位为第一取值;或者,若CCALF的通用限制信息语法表示允许启用CCALF,则所述CCALF序列级控制开关标志位为第二取值;其中,所述第一取值表示当前序列不允许启用CCALF;所述第二取值表示当前序列允许启用CCALF。
所述编码模块822还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位;若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在所述图像头级语法中编码CCALF图像头级控制开关标志位。
所述编码模块822还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则在片头级语法中编码ALF片头级控制开关标志位;若所述片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在所述片头级语法中编码CCALF片头级控制开关标志位。
所述编码模块822还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位;若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在所述图像头级语法中编码CCALF图像头级控制开关标志位。
所述编码模块822还用于:若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF, 禁止在所述图像头级语法中编码CCALF图像头级控制开关标志位。
所述编码模块822还用于:若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则在片头级语法中编码ALF片头级控制开关标志位;若所述片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在所述片头级语法中编码CCALF片头级控制开关标志位。
所述编码模块822还用于:若所述片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则禁止在所述片头级语法中编码CCALF片头级控制开关标志位。
基于与上述方法同样的申请构思,本申请实施例提供的解码端设备(即视频解码器),从硬件层面而言,其硬件架构示意图具体可以参见图8C所示。包括:处理器831和机器可读存储介质832,其中:所述机器可读存储介质832存储有能够被所述处理器831执行的机器可执行指令;所述处理器831用于执行机器可执行指令,以实现本申请上述示例公开的方法。例如,所述处理器831用于执行机器可执行指令,以实现如下步骤:
若序列级参数集SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则从所述SPS级语法中解码CCALF序列级控制开关标志位。
基于与上述方法同样的申请构思,本申请实施例提供的编码端设备(即视频编码器),从硬件层面而言,其硬件架构示意图具体可以参见图8D所示。包括:处理器841和机器可读存储介质842,其中:所述机器可读存储介质842存储有能够被所述处理器841执行的机器可执行指令;所述处理器841用于执行机器可执行指令,以实现本申请上述示例公开的方法。例如,所述处理器841用于执行机器可执行指令,以实现如下步骤:
若序列级参数集SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则在所述SPS级语法中编码CCALF序列级控制开关标志位。
基于与上述方法同样的申请构思,本申请实施例还提供一种机器可读存储介质,所述机器可读存储介质上存储有若干计算机指令,所述计算机指令被处理器执行时,能够实现本申请上述示例公开的方法。其中,上述机器可读存储介质可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本申请实施例可提供为方法、系统、或计算机程序产品。本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一个方框或者多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其它可编程数据处理设备上,使得在计算机或者其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (29)

  1. 一种解码方法,其特征在于,所述方法包括:
    若序列级参数集SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则从所述SPS级语法中解码CCALF序列级控制开关标志位。
  2. 根据权利要求1所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列存在色度分量,则从所述SPS级语法中解码CCALF序列级控制开关标志位。
  3. 根据权利要求1或2所述的方法,其特征在于,
    从所述SPS级语法中解码CCALF序列级控制开关标志位时,若CCALF的通用限制信息语法表示不允许启用CCALF,则确定所述CCALF序列级控制开关标志位为第一取值;或者,
    若CCALF的通用限制信息语法表示允许启用CCALF,则从所述SPS级语法中解码CCALF序列级控制开关标志位为第二取值;
    其中,所述第一取值表示当前序列不允许启用CCALF;
    所述第二取值表示当前序列允许启用CCALF。
  4. 根据权利要求1所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位;
    若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从所述图像头级语法中解码CCALF图像头级控制开关标志位。
  5. 根据权利要求1所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则从片头级语法中解码ALF片头级控制开关标志位;
    若所述片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从所述片头级语法中解码CCALF片头级控制开关标志位。
  6. 根据权利要求1所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则从图像头级语法中解码ALF图像头级控制开关标志位;
    若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从所述图像头级语法中解码CCALF图像头级控制开关标志位。
  7. 根据权利要求1所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则从片头级语法中解码ALF片头级控制开关标志位;
    若所述片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则从所述片头级语法中解码CCALF片头级控制开关标志位。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,若根据CCALF控制开关标志位确定针对当前处理单元启用CCALF,所述方法还包括:
    获取当前处理单元的每个像素位置的亮度分量重构值和色度分量重构值;
    针对当前处理单元的当前像素位置,确定所述当前像素位置关联的所述当前处理单元的目标像素位置;
    获取当前处理单元的CCALF滤波系数集合;
    获取所述目标像素位置的CCALF滤波系数,从所述CCALF滤波系数集合中获取所述目标像素位置的相邻像素位置的CCALF滤波系数;
    基于所述目标像素位置的亮度分量重构值,所述目标像素位置的CCALF滤波系数,所述相邻像素位置的亮度分量重构值和所述相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,得到所述当前像素位置的色度分量偏移值;
    利用所述当前像素位置的色度分量重构值和所述当前像素位置的色度分量偏移值,获得所述当前像素位置的目标色度分量重构值。
  9. 根据权利要求8所述的方法,其特征在于,所述CCALF滤波系数集合,包括:
    目标像素位置的正上侧像素位置的CCALF滤波系数;
    目标像素位置的左侧像素位置的CCALF滤波系数;
    目标像素位置的右侧像素位置的CCALF滤波系数;
    目标像素位置的正下侧像素位置的CCALF滤波系数;
    目标像素位置的左下侧像素位置的CCALF滤波系数;
    目标像素位置的右下侧像素位置的CCALF滤波系数;
    目标像素位置的正下侧第二行像素位置的CCALF滤波系数。
  10. 根据权利要求8所述的方法,其特征在于,针对所述CCALF滤波系数集合中的CCALF滤波系数:所述CCALF滤波系数为0,或2的N次方,或2的N次方的相反数,N为0或小于第一阈值的正整数;和/或,所述CCALF滤波系数位于第二阈值与第三阈值之间。
  11. 根据权利要求8-10任一项所述的方法,其特征在于,采用定长码解码方式对所述CCALF滤波系数集合中的CCALF滤波系数的映射值进行解码。
  12. 一种编码方法,其特征在于,所述方法包括:
    若序列级参数集SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,则在所述SPS级语法中编码CCALF序列级控制开关标志位。
  13. 根据权利要求12所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且当前序列存在色度分量,则在所述SPS级语法中编码CCALF序列级控制开关标志位。
  14. 根据权利要求12所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列不允许启用ALF,则禁止在所述SPS级语法中编码CCALF序列级控制开关标志位。
  15. 根据权利要求12或13所述的方法,其特征在于,在所述SPS级语法中编码CCALF序列级控制开关标志位时,若CCALF的通用限制信息语法表示不允许启用CCALF,则所述CCALF序列级控制开关标志位为第一取值;或者,若CCALF的通用限制信息语法表示允许启用CCALF,则所述CCALF序列级控制开关标志位为第二取值;
    其中,所述第一取值表示当前序列不允许启用CCALF;
    所述第二取值表示当前序列允许启用CCALF。
  16. 根据权利要求12所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位;
    若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在所述图像头级语法中编码CCALF图像头级控制开关标志位。
  17. 根据权利要求12所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且PPS级语法表示ALF语法存在于片头,则在片头级语法中编码ALF片头级控制开关标志位;
    若所述片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在所述片头级语法中编码CCALF片头级控制开关标志位。
  18. 根据权利要求12所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于图像头,则在图像头级语法中编码ALF图像头级控制开关标志位;
    若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在所述图像头级语法中编码CCALF图像头级控制开关标志位。
  19. 根据权利要求16或18所述的方法,其特征在于,
    若所述图像头级语法的ALF图像头级控制开关标志位表示当前图像不允许启用ALF,则禁止在所述图像头级语法中编码CCALF图像头级控制开关标志位。
  20. 根据权利要求12所述的方法,其特征在于,
    若SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF,且图像头级语法表示ALF语法存在于片头,则在片头级语法中编码ALF片头级控制开关标志位;
    若所述片头级语法的ALF片头级控制开关标志位表示当前片允许启用ALF,且所述SPS级语法的CCALF序列级控制开关标志位表示当前序列允许启用CCALF,则在所述片头级语法中编码CCALF片头级控制开关标志位。
  21. 根据权利要求17或20所述的方法,其特征在于,
    若所述片头级语法的ALF片头级控制开关标志位表示当前片不允许启用ALF,则禁止在所述片头级语法中编码CCALF片头级控制开关标志位。
  22. 根据权利要求12-21任一项所述的方法,其特征在于,若根据CCALF控制开关标志位确定针对当前处理单元启用CCALF,所述方法还包括:
    获取当前处理单元的每个像素位置的亮度分量重构值和色度分量重构值;
    针对当前处理单元的当前像素位置,确定所述当前像素位置关联的所述当前处理单元的目标像素位置;
    获取当前处理单元的CCALF滤波系数集合;
    获取所述目标像素位置的CCALF滤波系数,从所述CCALF滤波系数集合中获取所述目标像素位置的相邻像素位置的CCALF滤波系数;
    基于所述目标像素位置的亮度分量重构值,所述目标像素位置的CCALF滤波系数,所述相邻像素位置的亮度分量重构值和所述相邻像素位置的CCALF滤波系数,进行基于CCALF的滤波处理,得到所述当前像素位置的色度分量偏移值;
    利用所述当前像素位置的色度分量重构值和所述当前像素位置的色度分量偏移值,获得所述当前像素位置的目标色度分量重构值。
  23. 根据权利要求22所述的方法,其特征在于,所述CCALF滤波系数集合,包括:
    目标像素位置的正上侧像素位置的CCALF滤波系数;
    目标像素位置的左侧像素位置的CCALF滤波系数;
    目标像素位置的右侧像素位置的CCALF滤波系数;
    目标像素位置的正下侧像素位置的CCALF滤波系数;
    目标像素位置的左下侧像素位置的CCALF滤波系数;
    目标像素位置的右下侧像素位置的CCALF滤波系数;
    目标像素位置的正下侧第二行像素位置的CCALF滤波系数。
  24. 根据权利要求22所述的方法,其特征在于,针对所述CCALF滤波系数集合中的CCALF滤波系数:所述 CCALF滤波系数为0,或2的N次方,或2的N次方的相反数,N为0或小于第一阈值的正整数;和/或,所述CCALF滤波系数位于第二阈值与第三阈值之间。
  25. 根据权利要求22-24任一项所述的方法,其特征在于,采用定长码编码方式对所述CCALF滤波系数集合中的CCALF滤波系数的映射值进行编码。
  26. 一种解码装置,其特征在于,所述装置包括:
    确定模块,用于确定序列级参数集SPS级语法的ALF序列级控制开关标志位,是否表示当前序列允许启用ALF;
    解码模块,用于当SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF时,则从所述SPS级语法中解码CCALF序列级控制开关标志位。
  27. 一种编码装置,其特征在于,所述装置包括:
    确定模块,用于确定序列级参数集SPS级语法的ALF序列级控制开关标志位,是否表示当前序列允许启用ALF;
    编码模块,用于当SPS级语法的ALF序列级控制开关标志位表示当前序列允许启用ALF时,在所述SPS级语法中编码CCALF序列级控制开关标志位。
  28. 一种解码端设备,其特征在于,包括:处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;
    所述处理器用于执行机器可执行指令,以实现权利要求1-11任一所述的解码方法。
  29. 一种编码端设备,其特征在于,包括:处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;
    所述处理器用于执行机器可执行指令,以实现权利要求12-25任一所述的编码方法。
PCT/CN2020/115663 2020-01-13 2020-09-16 编码、解码方法、装置及其设备 WO2021143177A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/792,205 US11962768B2 (en) 2020-01-13 2020-09-16 Encoding method and apparatus, decoding method and apparatus, and devices therefor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010033536.9A CN113132724B (zh) 2020-01-13 2020-01-13 编码、解码方法、装置及其设备
CN202010033536.9 2020-01-13

Publications (1)

Publication Number Publication Date
WO2021143177A1 true WO2021143177A1 (zh) 2021-07-22

Family

ID=74036797

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/115663 WO2021143177A1 (zh) 2020-01-13 2020-09-16 编码、解码方法、装置及其设备

Country Status (3)

Country Link
US (1) US11962768B2 (zh)
CN (4) CN112135132B (zh)
WO (1) WO2021143177A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11563963B2 (en) 2020-05-19 2023-01-24 Qualcomm Incorporated Determining whether to code picture header data of pictures of video data in slice headers

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109600611A (zh) * 2018-11-09 2019-04-09 北京达佳互联信息技术有限公司 环路滤波方法、环路滤波装置、电子设备和可读介质
CN109691102A (zh) * 2016-08-31 2019-04-26 高通股份有限公司 跨分量滤波器

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9001883B2 (en) * 2011-02-16 2015-04-07 Mediatek Inc Method and apparatus for slice common information sharing
CN102857746B (zh) * 2011-06-28 2017-03-29 中兴通讯股份有限公司 环路滤波编解码方法及装置
JP5868157B2 (ja) * 2011-12-14 2016-02-24 日本電信電話株式会社 画像処理方法/装置,映像符号化方法/装置,映像復号方法/装置およびそれらのプログラム
EP3395073A4 (en) * 2016-02-04 2019-04-10 Mediatek Inc. VIDEO ENCODING METHOD AND APPARATUS USING NON-LOCAL ADAPTIVE LOOP FILTERS
US11095922B2 (en) * 2016-08-02 2021-08-17 Qualcomm Incorporated Geometry transformation-based adaptive loop filtering
CN113132739B (zh) 2019-12-31 2022-11-01 杭州海康威视数字技术股份有限公司 边界强度确定、编解码方法、装置及其设备

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109691102A (zh) * 2016-08-31 2019-04-26 高通股份有限公司 跨分量滤波器
CN109600611A (zh) * 2018-11-09 2019-04-09 北京达佳互联信息技术有限公司 环路滤波方法、环路滤波装置、电子设备和可读介质

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A. M. KOTRA (HUAWEI), S. ESENLIK (HUAWEI), B. WANG (HUAWEI), H. GAO (HUAWEI), E. ALSHINA (HUAWEI): "CE5-related: High level syntax modifications for CCALF", 17. JVET MEETING; 20200107 - 20200117; BRUSSELS; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-Q0253 ; m51848, 30 December 2019 (2019-12-30), XP030222988 *
C.-Y. CHEN, A. SEGALL: "Description of Core Experiment 5 (CE5): Cross-component adaptive loop filtering", 16. JVET MEETING; 20191001 - 20191011; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-P2025 ; m51522, 12 October 2019 (2019-10-12), XP030218459 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11563963B2 (en) 2020-05-19 2023-01-24 Qualcomm Incorporated Determining whether to code picture header data of pictures of video data in slice headers

Also Published As

Publication number Publication date
US20230104806A1 (en) 2023-04-06
CN113132724A (zh) 2021-07-16
CN113132724B (zh) 2022-07-01
CN112135133A (zh) 2020-12-25
CN112135133B (zh) 2022-03-01
US11962768B2 (en) 2024-04-16
CN112135131B (zh) 2022-03-01
CN112135131A (zh) 2020-12-25
CN112135132A (zh) 2020-12-25
CN112135132B (zh) 2022-03-01

Similar Documents

Publication Publication Date Title
JP6748749B2 (ja) 再構成された画像のサンプルのセットのための補償オフセットを復号するための方法および装置
JP2020018024A (ja) ビデオ符号化方法、ビデオ復号方法、ビデオエンコーダ、及びビデオデコーダ
CN112995663B (zh) 视频编码的方法、视频解码的方法及相应装置
WO2022179504A1 (zh) 编解码方法、装置及其设备
WO2020143585A1 (zh) 视频编码器、视频解码器及相应方法
WO2021190518A1 (zh) 解码、编码、编解码方法、装置及其设备
WO2021143177A1 (zh) 编码、解码方法、装置及其设备
CN113132739B (zh) 边界强度确定、编解码方法、装置及其设备
CN111263166B (zh) 一种视频图像预测方法及装置
CN117616751A (zh) 动态图像组的视频编解码
WO2023197230A1 (zh) 滤波方法、编码器、解码器以及存储介质
WO2024192733A1 (zh) 视频编解码方法、装置、设备、系统、及存储介质
TW202420809A (zh) 視頻編碼系統中顯式模式混合的方法和裝置
JP2024149789A (ja) 符号化復号方法、装置及びそのデバイス
EP4268460A1 (en) Temporal filter
GB2509706A (en) Encoding or decoding a scalable video sequence using inferred SAO parameters

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20914214

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20914214

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20914214

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.03.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20914214

Country of ref document: EP

Kind code of ref document: A1