Intra prediction signaling
A decoder may receive, from a bitstream for a block, a residual block of samples, a first component, and a second component. The decoder may determine reference samples for intra prediction of the block. The decoder may generate a prediction of the block from the reference samples based on a ratio of the first component to the second component. The ratio determines a prediction angle. The decoder may generate a decoded block from the prediction of the block and the residual block.
1 . A method comprising:
decoding, from a bitstream for intra prediction of a block:
a first value of a first component of a quotient; and
a second value of a second component of the quotient;
receiving, from the bitstream, a residual block of samples for the block;
determining reference samples for intra prediction of the block;
determining an intra prediction angle based on the quotient, of the first value of the component divided by the second value of the second component, corresponding to a tangent of the intra prediction angle from a plurality of intra prediction angles;
generating, based on the determined intra prediction angle, a prediction of the block from the reference samples; and
generating a decoded block from the prediction of the block and the residual block.
2 . The method of claim 1 , wherein:
the first value of the first component is along a horizontal axis; and
the second value of the second component is along a vertical axis.
3 . The method of claim 1 , wherein the decoding the first and second values of the first and second components further comprises receiving a coding unit syntax comprising:
a quadrant parameter indicating a range of angles, for the intra prediction angle, corresponding to the plurality of intra prediction angles; and
a precision parameter indicating a quantity of angles in the range of angles.
4 . The method of claim 3 , wherein the coding unit syntax further comprise a non-prediction component, and wherein:
the first value of the first component is determined as a value of the non-prediction component; and
the second value of the second component is determined based on the precision parameter, wherein the sign of the second component is based on the quadrant parameter.
5 . The method of claim 4 , wherein the value of the precision parameter is the logarithm in base two of the absolute value of the second value of the second component.
6 . The method of claim 1 , wherein the intra prediction angle is in a direction of a line having a slope equal to the quotient.
7 . The method of claim 3 , wherein:
based on the quadrant parameter indicating the range of angles is in a horizonal direction, the first component is a vertical component and the second component is a horizontal component; or
based on the quadrant parameter indicating the range of angles is in a vertical direction, the first component is a horizontal component and the second component is a vertical component.
8 . The method of claim 3 , wherein the quadrant parameter comprises a binary value indicating whether the range of angles is in a horizontal direction or a vertical direction.
9 . A decoder comprising:
one or more processors; and
memory storing instructions that, when executed by the one or more processors, cause the decoder to:
decode, from a bitstream for intra prediction of a block:
a first value of a first component of a quotient; and
a second value of a second component of the quotient;
receive, from the bitstream, a residual block of samples for the block;
determine reference samples for intra prediction of the block;
determine an intra prediction angle based on the quotient, of the first value of the component divided by the second value of the second component, corresponding to a tangent of the intra prediction angle from a plurality of intra prediction angles;
generate, based on the determined intra prediction angle, a prediction of the block from the reference samples; and
generate a decoded block from the prediction of the block and the residual block.
10 . The decoder of claim 9 , wherein:
the first value of the first component is along a horizontal axis; and
the second value of the second component is along a vertical axis.
11 . The decoder of claim 9 , wherein the decoding the first and second values of the first and second components further comprises receiving a coding unit syntax comprising:
a quadrant parameter indicating a range of angles, for the intra prediction angle, corresponding to the plurality of intra prediction angles; and
a precision parameter indicating a quantity of angles in the range of angles.
12 . The decoder of claim 11 , wherein the coding unit syntax further comprise a non-prediction component, and wherein:
the first value of the first component is determined as a value of the non-prediction component; and
the second value of the second component is determined based on the precision parameter, wherein the sign of the second component is based on the quadrant parameter.
13 . The decoder of claim 9 , wherein the intra prediction angle is in a direction of a line having a slope equal to the quotient.
14 . The decoder of claim 11 , wherein:
based on the quadrant parameter indicating the range of angles is in a horizonal direction, the first component is a vertical component and the second component is a horizontal component; or
based on the quadrant parameter indicating the range of angles is in a vertical direction, the first component is a horizontal component and the second component is a vertical component.
15 . The decoder of claim 11 , wherein the quadrant parameter comprises a binary value indicating whether the range of angles is in a horizontal direction or a vertical direction.
16 . A non-transitory computer-readable medium storing instructions that, when executed by one or more processors of a decoder, cause the decoder to:
decode, from a bitstream for intra prediction of a block:
a first value of a first component of a quotient; and
a second value of a second component of the quotient;
receive, from the bitstream, a residual block of samples for the block;
determine reference samples for intra prediction of the block;
determine an intra prediction angle based on the quotient, of the first value of the component divided by the second value of the second component, corresponding to a tangent of the intra prediction angle from a plurality of intra prediction angles;
generate, based on the determined intra prediction angle, a prediction of the block from the reference samples; and
generate a decoded block from the prediction of the block and the residual block.
17 . The non-transitory computer-readable medium of claim 16 , wherein the intra prediction angle is in a direction of a line having a slope equal to the quotient.
18 . The non-transitory computer-readable medium of claim 16 , wherein the decoding the first and second values of the first and second components further comprises receiving a coding unit syntax comprising:
a quadrant parameter indicating a range of angles, for the intra prediction angle, corresponding to the plurality of intra prediction angles; and
a precision parameter indicating a quantity of angles in the range of angles.
19 . The non-transitory computer-readable medium of claim 18 , wherein the coding unit syntax further comprise a non-prediction component, and wherein:
the first value of the first component is determined as a value of the non-prediction component; and
the second value of the second component is determined based on the precision parameter, wherein the sign of the second component is based on the quadrant parameter.
20 . The non-transitory computer-readable medium of claim 18 , wherein the quadrant parameter comprises a binary value indicating whether the range of angels is in a horizontal direction or a vertical direction.