A chroma prediction method, comprising: obtaining luma information and chroma information of a to-be-processed image block, first processing information, and second processing information, wherein the first processing information is used to indicate a downsampling processing manner used for a luma component of the to-be-processed image block, and the second processing information is used to indicate a downsampling processing manner used for a chroma component of the to-be-processed image block; reconstructing a transient luma block of the to-be-processed image block based on the luma information of the to-be-processed image block, wherein resolution of the transient luma block is determined by using a sampling format of the to-be-processed image block and the first processing information; obtaining a prediction block of a transient chroma block of the to-be-processed image block based on the resolution of the transient luma block, the sampling format of the to-be-processed image block, and the second processing information, wherein obtaining the prediction block of the transient chroma block comprises, determining a resolution of the transient chroma block based on the sampling format of the to-be-processed image block and the second processing information; when the resolution of the transient chroma block is different from the resolution of the transient luma block, adjusting the resolution of the transient luma block, so that resolution of the adjusted transient luma block is the same as the resolution of the transient chroma block, and using the adjusted transient luma block as a target block of the transient chroma block, or when the resolution of the transient chroma block is the same as the resolution of the transient luma block, maintaining the resolution of the transient luma block, and using the transient luma block as a target block of the transient chroma block; and obtaining the prediction block of the transient chroma block based on the target block of the transient chroma block. obtaining luma information and chroma information of a to-be-processed image block, first processing information, and second processing information, wherein the first processing information is used to indicate a downsampling processing manner used for a luma component of the to-be-processed image block, and the second processing information is used to indicate a downsampling processing manner used for a chroma component of the to-be-processed image block; reconstructing a transient luma block of the to-be-processed image block based on the luma information of the to-be-processed image block, wherein resolution of the transient luma block is determined by using a sampling format of the to-be-processed image block and the first processing information; obtaining a prediction block of a transient chroma block of the to-be-processed image block based on the resolution of the transient luma block, the sampling format of the to-be-processed image block, and the second processing information, wherein obtaining the prediction block of the transient chroma block comprises, determining a resolution of the transient chroma block based on the sampling format of the to-be-processed image block and the second processing information; when the resolution of the transient chroma block is different from the resolution of the transient luma block, adjusting the resolution of the transient luma block, so that resolution of the adjusted transient luma block is the same as the resolution of the transient chroma block, and using the adjusted transient luma block as a target block of the transient chroma block, or when the resolution of the transient chroma block is the same as the resolution of the transient luma block, maintaining the resolution of the transient luma block, and using the transient luma block as a target block of the transient chroma block; and obtaining the prediction block of the transient chroma block based on the target block of the transient chroma block. determining a resolution of the transient chroma block based on the sampling format of the to-be-processed image block and the second processing information; when the resolution of the transient chroma block is different from the resolution of the transient luma block, adjusting the resolution of the transient luma block, so that resolution of the adjusted transient luma block is the same as the resolution of the transient chroma block, and using the adjusted transient luma block as a target block of the transient chroma block, or when the resolution of the transient chroma block is the same as the resolution of the transient luma block, maintaining the resolution of the transient luma block, and using the transient luma block as a target block of the transient chroma block; and obtaining the prediction block of the transient chroma block based on the target block of the transient chroma block.