Method for picture prediction, encoder, and decoder
A method for picture prediction, an encoder, and a decoder are provided. The method includes the following. An initial predicted value of a colour component to-be-predicted of a current block in a picture is obtained through a prediction model. The initial predicted value is filtered and a target predicted value of the colour component to-be-predicted of the current block is obtained.
1. A method for picture prediction, implemented in a decoder and comprising:
obtaining an initial predicted value of a colour component to-be-predicted of a current block in a picture through a prediction model; and
filtering the initial predicted value and obtaining a target predicted value of the colour component to-be-predicted of the current block;
wherein filtering the initial predicted value and obtaining the target predicted value of the colour component to-be-predicted of the current block comprises:
filtering the initial predicted value by using a preset processing mode, wherein the preset processing mode comprises value modification; and
obtaining the target predicted value according to a result of the filtering;
wherein before filtering the initial predicted value by using the preset processing mode, the method further comprises:
performing characteristic statistics on at least one colour component of the current block;
wherein filtering the initial predicted value by using the preset processing mode, comprises:
filtering the initial predicted value according to the result of the characteristic statistics by using the preset processing mode.
2. The method of claim 1 , further comprising:
determining, according to a colour component to-be-referenced of the current block, a reference value of the colour component to-be-predicted of the current block.
3. A method for picture prediction, implemented in an encoder and comprising:
obtaining an initial predicted value of a colour component to-be-predicted of a current block in a picture through a prediction model; and
filtering the initial predicted value and obtaining a target predicted value of the colour component to-be-predicted of the current block,
wherein filtering the initial predicted value and obtaining the target predicted value of the colour component to-be-predicted of the current block comprises:
filtering the initial predicted value by using a preset processing mode, wherein the preset processing mode comprises value modification; and
obtaining the target predicted value according to a result of the filtering;
wherein before filtering the initial predicted value by using the preset processing mode, the method further comprises:
performing characteristic statistics on at least one colour component of the current block;
wherein filtering the initial predicted value by using the preset processing mode, comprises:
filtering the initial predicted value according to the result of the characteristic statistics by using the preset processing mode.
4. The method of claim 3 , further comprising:
determining, according to a colour component to-be-referenced of the current block, a reference value of the colour component to-be-predicted of the current block.
5. An encoder comprising a memory and a processor, wherein
the memory is configured to store computer programs than can be run on the processor; and
the processor when running the computer programs is configured to:
obtain an initial predicted value of a colour component to-be-predicted of a current block in a picture through a prediction model; and
filter the initial predicted value and obtain a target predicted value of the colour component to-be-predicted of the current block,
wherein the processor configured to filter the initial predicted value and obtaining the target predicted value of the colour component to-be-predicted of the current block is configured to:
filter the initial predicted value by using a preset processing mode, wherein the preset processing mode comprises value modification; and
obtain the target predicted value according to a result of the filtering;
wherein before filter the initial predicted value by using the preset processing mode, the processor is further configured to perform characteristic statistics on at least one colour component of the current block;
wherein the processor configured to filter the initial predicted value by using the preset processing mode is further configured to:
filter the initial predicted value according to the result of the characteristic statistics by using the preset processing mode.
6. The encoder of claim 5 , wherein the processor is further configured to:
determine, according to a colour component to-be-referenced of the current block, a reference value of the colour component to-be-predicted of the current block.
7. A decoder comprising a memory and a processor, wherein
the memory is configured to store computer programs than can be run on the processor; and
the processor when running the computer programs is configured to:
obtain an initial predicted value of a colour component to-be-predicted of a current block in a picture through a prediction model; and
filter the initial predicted value and obtain a target predicted value of the colour component to-be-predicted of the current block,
wherein the processor configured to filter the initial predicted value and obtaining the target predicted value of the colour component to-be-predicted of the current block is configured to:
filter the initial predicted value by using a preset processing mode, wherein the preset processing mode comprises value modification; and
obtain the target predicted value according to a result of the filtering;
wherein before filter the initial predicted value by using the preset processing mode, the processor is further configured to perform characteristic statistics on at least one colour component of the current block;
wherein the processor configured to filter the initial predicted value by using the preset processing mode is further configured to:
filter the initial predicted value according to the result of the characteristic statistics by using the preset processing mode.
8. The decoder of claim 7 , wherein the processor is further configured to:
determine, according to a colour component to-be-referenced of the current block, a reference value of the colour component to-be-predicted of the current block.