Apparatus and method for coding image
According to one embodiment of the present document, an in-loop filtering procedure in an image/video coding procedure may comprise a cross-component adaptive loop filtering procedure. CCALF, according to the present embodiment, can increase the accuracy of in-loop filtering.
1. A decoding apparatus for image decoding, the decoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
acquire image information including prediction-related information and residual information through a bitstream;
derive transform coefficients based on the residual information;
generate residual samples based on the transform coefficients;
generate prediction samples based on the prediction-related information;
generate reconstructed samples based on the prediction samples and the residual samples, the reconstructed samples including reconstructed luma samples and reconstructed chroma samples;
derive adaptive loop filter (ALF) coefficients for an ALF process of the reconstructed chroma samples;
generate filtered reconstructed chroma samples based on the reconstructed chroma samples and the ALF filter coefficients;
derive cross-component filter coefficients for cross-component filtering; and
generate modified filtered reconstructed chroma samples based on the reconstructed luma samples, the filtered reconstructed chroma samples, and the cross-component filter coefficients,
wherein
the image information includes a sequence parameter set (SPS), and slice header information,
the SPS includes ALF enabled flag related to whether the ALF process is enabled,
based on a value of the ALF enabled flag being 1, the SPS includes a cross-component adaptive loop filter (CCALF) enabled flag related to whether the cross-component filtering is available,
based on a determination that a value of the ALF enabled flag in the SPS is 1, the slice header information includes an ALF enabled flag related to whether the ALF is enabled,
based on a determination that a value of the ALF enabled flag included in the slice header information is 1 and a value of the CCALF enabled flag included in the SPS is 1, the slice header information includes information on whether the CCALF is enabled for the filtered reconstructed chroma samples,
based on a value of the information on whether the CCALF is enabled for the filtered reconstructed chroma samples being 1, the slice header information includes identification (ID) information of an adaptation parameter set (APS) associated with the CCALF for the filtered reconstructed chroma samples,
ALF data included in the APS includes information related to a number of the cross-component filters for the Cb color component and information related to a number of cross-component filters for the Cr component,
based on the information related to the number of the cross-component filters for the Cb color component, the ALF data includes information on absolute values of the cross-component filter coefficients for the Cb color component and information on signs of the cross-component filter coefficients for the Cb color component, and
based on information related to the number of the cross-component filters for the Cr color component, the ALF data includes information on absolute values of the cross-component filter coefficients for the Cr color component and information on signs of the cross-component filter coefficients for the Cr color component, and
wherein the prediction-related information specifies whether a current block is coded in inter prediction mode or intra predication mode.
2. An encoding apparatus for image encoding, the encoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
derive prediction samples for a current block;
generate prediction-related information based on the prediction samples;
generate residual samples for the current block;
derive transform coefficients based on a transform process for the residual samples;
generate residual information based on the transform coefficients;
generate reconstructed samples based on the residual samples and the prediction samples, the reconstructed samples including reconstructed luma samples and reconstructed chroma samples;
generate information related to an adaptive loop filter (ALF) and information related to a cross-component ALF (CCALF) for the reconstructed samples; and
encode image information including the residual information, the prediction-related information, the ALF related information, and the CCALF related information,
wherein
the image information includes a sequence parameter set (SPS) and slice header information,
the SPS includes ALF enabled flag related to whether the ALF process is enabled,
based on a value of the ALF enabled flag being 1, the SPS includes a CCALF enabled flag related to whether the CCALF is available,
based on a determination that a value of the ALF enabled flag in the SPS is 1, the slice header information includes an ALF enabled flag related to whether the ALF is enabled,
based on a determination that a value of the ALF enabled flag included in the slice header information is 1 and a value of the CCALF enabled flag included in the SPS is 1, the slice header information includes information on whether the CCALF is enabled for the filtered reconstructed chroma samples, and
based on a value of the information on whether the CCALF is enabled for the filtered reconstructed chroma samples being 1, the slice header information includes identification (ID) information of an adaptation parameter set (APS) associated with the CCALF for the filtered reconstructed chroma samples,
ALF data included in the APS includes information related to a number of the cross-component filters for the Cb color component and information related to a number of cross-component filters for the Cr component,
based on the information related to the number of the cross-component filters for the Cb color component, the ALF data includes information on absolute values of the cross-component filter coefficients for the Cb color component and information on signs of the cross-component filter coefficients for the Cb color component, and
based on information related to the number of the cross-component filters for the Cr color component, the ALF data includes information on absolute values of the cross-component filter coefficients for the Cr color component and information on signs of the cross-component filter coefficients for the Cr color component, and
wherein the prediction-related information specifies whether the current block is coded in inter prediction mode or intra predication mode.
3. An apparatus for storing data for an image, the apparatus comprising:
at least one processor configured to obtain a bitstream for the image, wherein the bitstream is generated based on deriving prediction samples for a current block, generating prediction-related information based on the prediction samples, generating residual samples for the current block, deriving transform coefficients based on a transform process for the residual samples, generating residual information based on the transform coefficients, generating reconstructed samples based on the residual samples and the prediction samples, the reconstructed samples including reconstructed luma samples and reconstructed chroma samples, generating information related to an adaptive loop filter (ALF) and information related to a cross-component ALF (CCALF) for the reconstructed samples and encoding image information to generate the bitstream, wherein the image information includes the residual information, the prediction-related information, the ALF related information, and the CCALF related information,
a storage medium configured to store the data comprising the bitstream,
wherein
the image information includes a sequence parameter set (SPS) and slice header information,
the SPS includes ALF enabled flag related to whether the ALF process is enabled,
based on a value of the ALF enabled flag being 1, the SPS includes a CCALF enabled flag related to whether the CCALF is available,
based on a determination that a value of the ALF enabled flag in the SPS is 1, the slice header information includes an ALF enabled flag related to whether the ALF is enabled,
based on a determination that a value of the ALF enabled flag included in the slice header information is 1 and a value of the CCALF enabled flag included in the SPS is 1, the slice header information includes information on whether the CCALF is enabled for the filtered reconstructed chroma samples, and
based on a value of the information on whether the CCALF is enabled for the filtered reconstructed chroma samples being 1, the slice header information includes identification (ID) information of an adaptation parameter set (APS) associated with the CCALF for the filtered reconstructed chroma samples,
ALF data included in the APS includes information related to a number of the cross-component filters for the Cb color component and information related to a number of cross-component filters for the Cr component,
based on the information related to the number of the cross-component filters for the Cb color component, the ALF data includes information on absolute values of the cross-component filter coefficients for the Cb color component and information on signs of the cross-component filter coefficients for the Cb color component, and
based on information related to the number of the cross-component filters for the Cr color component, the ALF data includes information on absolute values of the cross-component filter coefficients for the Cr color component and information on signs of the cross-component filter coefficients for the Cr color component, and
wherein the prediction-related information specifies whether the current block is coded in inter prediction mode or intra predication mode.