Systems and methods for end of block coding for 2D coefficients block with 1D transforms
The various implementations described herein include methods and systems for coding video. In one aspect, a method includes receiving a video bitstream comprising a plurality of blocks, including a current block. The method includes parsing, from the video bitstream, a plurality of one-dimensional (1D) transform coefficients corresponding to the current block. The method includes parsing, from the video bitstream, a maximum end-of-block (EOB) value for the plurality of 1D transform coefficients. The method includes deriving a two-dimensional (2D) transform block using the maximum EOB value and the plurality of 1D transform coefficients. The method also includes reconstructing the current block using the derived 2D transform block.
1 . A method of video decoding performed at a computing system having memory and one or more processors, the method comprising:
receiving a video bitstream comprising a plurality of blocks, the plurality of blocks including a current block;
parsing, from the video bitstream, a plurality of one-dimensional (1D) transform coefficients corresponding to the current block;
parsing, from the video bitstream, a maximum end-of-block (EOB) value for the plurality of 1D transform coefficients;
deriving a two-dimensional (2D) transform block using the maximum EOB value and the plurality of 1D transform coefficients, wherein the maximum EOB value is a 2D maximum EOB value for the 2D transform block, and wherein the maximum EOB value is derived using respective 1D EOB values for a set of lines of the current block; and
reconstructing the current block using the 2D transform block.
2 . The method of claim 1 , wherein each respective 1D EOB value indicates a position of a last non-zero coefficient in the corresponding line of the set of lines.
3 . The method of claim 2 , wherein transform coefficients with positions after the last non-zero coefficient are not signaled in the video bitstream.
4 . The method of claim 1 , wherein a 1D EOB value of the respective 1D EOB values is a delta value indicating a difference between a maximum EOB value for the corresponding line of the current block and a reference EOB value.
5 . The method of claim 4 , wherein the reference EOB value is an EOB value for a previous line of the set of lines.
6 . The method of claim 4 , wherein the reference EOB value is a maximum EOB value for the 2D transform block.
7 . The method of claim 1 , wherein parsing the maximum EOB value comprises entropy decoding the maximum EOB value using a context that is based on coded neighboring transform blocks.
8 . The method of claim 7 , wherein the context is selected based on a transform type of a transform used to generate the plurality of 1D transform coefficients.
9 . The method of claim 7 , wherein the context is selected based on an intra prediction mode used to encode the current block.
10 . The method of claim 7 , wherein the context is selected based on a size of the 2D transform block.
11 . The method of claim 10 , wherein the size of the 2D transform block comprises a block width.
12 . The method of claim 10 , wherein the size of the 2D transform block comprises a block height.
13 . The method of claim 1 , further comprising parsing a second maximum EOB value corresponding to a first subset of the plurality of 1D transform coefficients.
14 . The method of claim 13 , further comprising determining whether to derive the 2D transform block using one or multiple maximum EOB values based on an indicator signaled in the video bitstream.
15 . The method of claim 1 , further comprising:
parsing, from the video bitstream, a set of transform skip flags corresponding to lines of the current block, each transform skip flag of the set of transform skip flags indicating whether the respective corresponding line for the current block includes at least one non-zero transform coefficient; and
wherein the 2D transform block is derived based on the set of transform skip flags and the maximum EOB value.
16 . The method of claim 15 , wherein deriving the 2D transform block based on the set of transform skip flags comprises only decoding lines for the current block for which the set of transform skip flags indicates that at least one transform coefficient is non-zero.
17 . The method of claim 15 , wherein the set of transform skip flags comprises a 2D skip flag for the 2D transform block, wherein the 2D skip flag indicates whether the 2D transform block includes at least one non-zero transform coefficient.
18 . A computing system, comprising:
control circuitry;
memory; and
one or more sets of instructions stored in the memory and configured for execution by the control circuitry, the one or more sets of instructions comprising instructions for:
receiving video data comprising a plurality of blocks including a current block;
deriving a two-dimensional (2D) transform block corresponding to the current block;
deriving a plurality of one-dimensional (1D) transform coefficients corresponding to the 2D transform block;
deriving a maximum end-of-block (EOB) value, wherein the maximum EOB value is a 2D maximum EOB value for the 2D transform block, and wherein the maximum EOB value is derived using respective 1D EOB values for a set of lines of the current block;
signaling the plurality of 1D transform coefficients in a video bitstream; and
signaling the maximum EOB value in the video bitstream.
19 . A non-transitory computer-readable storage medium storing one or more instructions and a video bitstream that is generated by a video encoding method, the one or more instructions when executed by a processor, cause a computing system to perform the video encoding method, the video encoding method comprising:
deriving a two-dimensional (2D) transform block corresponding to a current block of video data;
deriving a plurality of one-dimensional (1D) transform coefficients corresponding to the 2D transform block;
deriving a maximum end-of-block (EOB) value using respective 1D EOB values for a set of lines of the current block, wherein the maximum EOB value is a 2D maximum EOB value for the 2D transform block; and
transmitting the video bitstream, wherein the video bitstream comprises the plurality of 1D transform coefficients in a video bitstream and the maximum EOB value.