Systems and methods for smooth mode predictions
The various implementations described herein include methods and systems for encoding and decoding video. In one aspect, a method of video decoding includes receiving video data that includes a first block from a video bitstream, where the first block is encoded in a smooth mode. The method further includes identifying a set of reference samples for the first block and deriving a first prediction value for the first block. The method also includes deriving a refined first prediction value for the first block using a weighted sum of a first reference sample of the set of reference samples and the first prediction value and decoding the first block based on the refined first prediction value.
1 . A method of video decoding performed at a computing system having memory and one or more processors, the method comprising:
receiving video data comprising a plurality of blocks, including a first block, from a video bitstream, wherein the first block is encoded in one of a plurality of smooth modes;
when the first block is encoded in a horizontal smooth mode of the plurality of smooth modes:
identifying a first set of reference samples for the first block that includes a top-right sample and a left sample;
deriving a first prediction value for the first block by applying a linear interpolation using the top-right sample;
deriving a refined first prediction value for the first block using a first weighted sum of the left sample and the first prediction value, wherein neither a first weight for the left sample nor a second weight for the first prediction value is equal to zero, and wherein the first and second weights are based on dimensions of the first block; and
decoding the first block based on the refined first prediction value; and
when the first block is encoded in a vertical smooth mode of the plurality of smooth modes:
identifying a second set of reference samples for the first block that includes a bottom-left sample and a top sample;
deriving a second prediction value for the first block by applying a second linear interpolation using the bottom-left sample; and
deriving a refined second prediction value for the first block using a second weighted sum of the top sample and the second prediction value, wherein weights of the second weighted sum are non-zero and based on the dimensions of the first block; and
decoding the first block based on the refined second prediction value.
2 . The method of claim 1 , further comprising:
when the first block is encoded in a combined smooth mode of the plurality of smooth modes:
deriving the first prediction value and the second prediction value for the first block;
deriving the refined first prediction value and the refined second prediction value for the first block;
deriving a combined prediction value using a weighted sum of the refined first prediction value and the refined second prediction value; and
decoding the first block using the combined prediction value.
3 . The method of claim 1 , wherein the first prediction value for the first block is derived using a weighted sum of a left reference sample and a top reference sample.
4 . The method of claim 1 , further comprising filtering the first set of reference samples to identify the left sample.
5 . The method of claim 1 , further comprising identifying the top sample by filtering the second set of reference samples.
6 . The method of claim 1 , wherein the dimensions of the first block comprise a height of the first block and a width of the first block.
7 . The method of claim 1 , further comprising deriving the first and second weights using a scaling factor based on the dimensions of the first block.
8 . The method of claim 1 , wherein deriving the first prediction value for the first block comprises applying the second linear interpolation using the top-right sample and the left sample.
9 . The method of claim 1 , wherein deriving the second prediction value for the first block comprises applying the linear interpolation using the bottom-left sample and the top sample.
10 . A method of video encoding performed at a computing system having memory and one or more processors, the method comprising:
receiving video data comprising a plurality of blocks, including a first block;
when the first block is to be encoded in a horizontal smooth mode of a plurality of smooth modes:
identifying a first set of reference samples for the first block that includes a top-right sample and a left sample;
deriving a first prediction value for the first block by applying a linear interpolation using the top-right sample;
deriving a refined first prediction value for the first block using a first weighted sum of the left sample and the first prediction value, wherein neither a first weight for the left sample nor a second weight for the first prediction value is equal to zero, and wherein the first and second weights are based on dimensions of the first block; and
encoding the first block based on the refined first prediction value; and
when the first block is to be encoded in a vertical smooth mode of the plurality of smooth modes:
identifying a second set of reference samples for the first block that includes a bottom-left sample and a top sample;
deriving a second prediction value for the first block by applying a second linear interpolation using the bottom-left sample; and
deriving a refined second prediction value for the first block using a second weighted sum of the top sample and the second prediction value, wherein weights of the second weighted sum are non-zero and based on the dimensions of the first block; and
encoding the first block based on the refined second prediction value.
11 . The method of claim 10 , further comprising, when the first block is to be encoded in a combined smooth mode of the plurality of smooth modes:
deriving the first prediction value and the second prediction value for the first block;
deriving the refined first prediction value and the refined second prediction value for the first block;
deriving a combined prediction value using a weighted sum of the refined first prediction value and the refined second prediction value; and
encoding the first block using the combined prediction value.
12 . The method of claim 10 , further comprising filtering the first set of reference samples to identify the left sample.
13 . The method of claim 10 , further comprising identifying the top sample by filtering the second set of reference samples.
14 . The method of claim 10 , wherein the dimensions of the first block comprise a height of the first block and a width of the first block.
15 . The method of claim 10 , further comprising deriving the first and second weights using a scaling factor based on the dimensions of the first block.
16 . The method of claim 10 , wherein deriving the first prediction value for the first block comprises applying the second linear interpolation using the top-right sample and the left sample.
17 . The method of claim 10 , wherein deriving the second prediction value for the first block comprises applying the linear interpolation using the bottom-left sample and the top sample.
18 . A non-transitory computer-readable storage medium storing one or more instructions that, when executed by a processor, cause a computing system to perform a video bitstream generation method, the video bitstream generation method comprising:
receiving video data comprising a plurality of blocks, including a first block;
when the first block is to be encoded in a horizontal smooth mode of a plurality of smooth modes:
identifying a first set of reference samples for the first block that includes a top-right sample and a left sample;
deriving a first prediction value for the first block by applying a linear interpolation using the top-right sample;
deriving a refined first prediction value for the first block using a first weighted sum of the left sample and the first prediction value, wherein neither a first weight for the left sample nor a second weight for the first prediction value is equal to zero, and wherein the first and second weights are based on dimensions of the first block; and
encoding the first block based on the refined first prediction value;
when the first block is to be encoded in a vertical smooth mode of the plurality of smooth modes:
identifying a second set of reference samples for the first block that includes a bottom-left sample and a top sample;
deriving a second prediction value for the first block by applying a second linear interpolation using the bottom-left sample; and
deriving a refined second prediction value for the first block using a second weighted sum of the top sample and the second prediction value, wherein weights of the second weighted sum are non-zero and based on the dimensions of the first block; and
encoding the first block based on the refined second prediction value; and
transmitting a video bitstream comprising the encoded first block.
19 . The non-transitory computer-readable storage medium of claim 18 , wherein the video bitstream generation method further comprises, when the first block is to be encoded in a combined smooth mode of the plurality of smooth modes:
deriving the first prediction value and the second prediction value for the first block;
deriving the refined first prediction value and the refined second prediction value for the first block;
deriving a combined prediction value using a weighted sum of the refined first prediction value and the refined second prediction value; and
encoding the first block using the combined prediction value.
20 . The non-transitory computer-readable storage medium of claim 18 , wherein the video bitstream generation method further comprises filtering the first set of reference samples to identify the left sample.