Image encoding/decoding method and device
An image prediction method according to the present invention may comprise: identifying a reference pixel region designated for obtaining correlation information; determining a reference pixel processing configuration on the basis of determination of the availability of the reference pixel region; and performing intra prediction according to the determined reference pixel processing. As described above, performing intra prediction on the basis of the availability of a reference pixel according to the present invention can improve encoding performance.
1. A method of decoding an image, comprising:
obtaining, from a bitstream, first information indicating whether a color copy mode is supported;
determining, in case the first information indicates that the color copy mode is supported, whether the color copy mode is applied for a current chroma block in the image;
down-sampling a luma block corresponding to the current chroma block in response to the determination that the color copy mode is applied for the current chroma block;
deriving correlation information for the color copy mode based on a pre-determined reference region; and
predicting the current chroma block by applying the correlation information to the down-sampled luma block,
wherein the reference region includes at least one of a neighboring region of the current chroma block or a neighboring region of the luma block, and
wherein a number of reference pixel lines belonging to the reference region used for the deriving of the correlation information is adaptively determined based on whether the current chroma block is located on a boundary of a maximum coding block.
2. The method of claim 1 , wherein the down-sampling of the luma block is performed using a first pixel of the luma block corresponding to a current pixel of the current chroma block and a plurality of neighboring pixels adjacent to the first pixel.
3. The method of claim 2 , wherein the neighboring pixels include at least one of a right neighboring pixel, a bottom neighboring pixel or a bottom-right neighboring pixel.
4. The method of claim 1 , wherein the correlation information is derived using only some of pixels in the reference region.
5. The method of claim 4 , wherein the correlation information at least one weighting parameter and at least one offset parameter.
6. The method of claim 5 , wherein a number of the correlation information to be applied to the down-sampled luma block is greater than or equal to 3.
7. A method of encoding an image, comprising:
determining whether a color copy mode is supported and encoding first information indicating whether the color copy mode is supported;
determining, in case the color copy mode is supported, whether the color copy mode is applied for a current chroma block in the image;
down-sampling a luma block corresponding to the current chroma block in response to the determination that the color copy mode is applied for the current chroma block;
determining correlation information for the color copy mode based on a pre-determined reference region; and
predicting the current chroma block by applying the correlation information to the down-sampled luma block,
wherein the reference region includes at least one of a neighboring region of the current chroma block or a neighboring region of the luma block, and
wherein a number of reference pixel lines belonging to the reference region used for the deriving of the correlation information is adaptively determined based on whether the current chroma block is located on a boundary of a maximum coding block.
8. A non-transitory computer readable medium having stored thereon instructions that when executed by a processor perform a method, comprising:
obtaining, from a bitstream, first information indicating whether a color copy mode is supported;
determining, in case the first information indicates that the color copy mode is supported, whether the color copy mode is applied for a current chroma block in an image;
down-sampling a luma block corresponding to the current chroma block in response to the determination that the color copy mode is applied for the current chroma block;
deriving correlation information for the color copy mode based on a pre-determined reference region; and
predicting the current chroma block by applying the correlation information to the down-sampled luma block,
wherein the reference region includes at least one of a neighboring region of the current chroma block or a neighboring region of the luma block, and
wherein a number of reference pixel lines belonging to the reference region used for the deriving of the correlation information is adaptively determined based on whether the current chroma block is located on a boundary of a maximum coding block.
9. A non-transitory computer readable recording medium storing a bitstream generated by a method of encoding an image, the method comprising:
determining whether a color copy mode is supported and encoding first information indicating whether the color copy mode is supported;
determining, in case the color copy mode is supported, whether the color copy mode is applied for a current chroma block in the image;
down-sampling a luma block corresponding to the current chroma block in response to the determination that the color copy mode is applied for the current chroma block;
determining correlation information for the color copy mode based on a pre-determined reference region; and
predicting the current chroma block by applying the correlation information to the down-sampled luma block,
wherein the reference region includes at least one of a neighboring region of the current chroma block or a neighboring region of the luma block, and
wherein a number of reference pixel lines belonging to the reference region used for the deriving of the correlation information is adaptively determined based on whether the current chroma block is located on a boundary of a maximum coding block.