IP Library › Granted Patent US 11,405,646
Granted Patent B2
US 11,405,646 · App. 17/106,898 · Granted Aug 2, 2022

Efficient context model computation design in transform coefficient coding

Inventors: Jingning Han (Santa Clara, CA); James Zern (San Francisco, CA); Linfeng Zhang (Palo Alto, CA); Ching-Han Chiang (San Jose, CA); Yaowu Xu (Saratoga, CA)
Assignee: GOOGLE LLC
H04N19/60H04N19/129H04N19/13H04N19/184H04N19/88
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,405,646
App. No.
17/106,898
Granted
Aug 2, 2022
Kind
B2
Abstract

A processor is configured to maintain, for encoding current values related to the transform coefficients a first line buffer and a second line buffer. The current values are arranged along a current scan-order anti-diagonal line. The first line buffer includes first values of a first scan-order anti-diagonal line. The second line buffer includes second values of a second scan-order anti-diagonal line. The processor is further configured to interleave the first values and the second values in a destination buffer; select, using the destination buffer, a probability distribution for coding a current value of the current values; entropy encode, in a compressed bitstream, the current value using the probability distribution; and replace, for coding values of an immediately subsequent scan-order anti-diagonal line to the current scan-order anti-diagonal line, one of the second line buffer or the first line buffer with the current scan-order anti-diagonal line.

Claims (57)

1. An apparatus for encoding a transform block of transform coefficients, the apparatus comprising:

a processor configured to:

maintain, for encoding current values related to the transform coefficients a first line buffer and a second line buffer,

wherein the current values are arranged along a current scan-order anti-diagonal line of a scan order,

wherein the first line buffer includes first values of a first scan-order anti-diagonal line scanned immediately before the current scan-order anti-diagonal line, and

wherein the second line buffer includes second values of a second scan-order anti-diagonal line scanned immediately before the first scan-order anti-diagonal line;

interleave the first values of the first line buffer and the second values of the second line buffer in a destination buffer;

select, using the destination buffer, a probability distribution for coding a current value of the current values;

entropy encode, in a compressed bitstream, the current value using the probability distribution; and

replace, for coding values of an immediately subsequent scan-order anti-diagonal line to the current scan-order anti-diagonal line, one of the second line buffer or the first line buffer with the current scan-order anti-diagonal line.

2. The apparatus of claim 1 , wherein to interleave the first values of the first line buffer and the second values of the second line buffer in the destination buffer comprises to:

use a hardware instruction to interleave the first values and the second values in the destination buffer.

3. The apparatus of claim 2 , wherein the hardware instruction is one of unpackhi or unparcklo.

4. The apparatus of claim 2 , wherein the processor is further configured to:

calculate a respective cumulative sum for at least some locations of the destination buffer.

5. The apparatus of claim 4 , wherein to calculate the respective cumulative sum for the at least some locations of the destination buffer comprises to:

add a destination buffer value at a location of the at least some locations of the destination buffer to a cumulative sum corresponding to an immediately preceding location of the destination buffer.

6. The apparatus of claim 5 , wherein to determine, using the destination buffer, the probability distribution for coding the current value of the current scan-order anti-diagonal line comprises to:

calculate a difference between a first cumulative sum corresponding to a first location of the destination buffer and a second cumulative sum corresponding to a second location of the destination buffer, wherein the first cumulative sum and the second cumulative sum are selected based on a position of the current value; and

determine the probability distribution using the difference.

7. The apparatus of claim 6 , wherein a distance between the first location of the destination buffer and the second location of the destination buffer is related to a number of scan positions of already coded values of a template, wherein the template indicates, for a to-be-coded value, scan positions arranged, in the template, in at least two anti-diagonal lines.

8. An apparatus for decoding a transform block, the apparatus comprising:

a processor configured to:

store, in a first line buffer, first values of a first scan-order diagonal line scanned immediately before a current scan-order diagonal line of the transform block;

store, in a second line buffer, second values of a second scan-order diagonal line scanned immediately before the first scan-order diagonal line;

interleave the first values of the first line buffer and the second values of the second line buffer in a destination buffer;

select, using the destination buffer, a probability distribution for coding a current value of the current scan-order diagonal line;

entropy decode, from a compressed bitstream, the current value using the probability distribution; and

replace, for coding values of an immediately subsequent scan-order diagonal line to the current scan-order diagonal line, one of the second line buffer or the first line buffer with current values of the current scan-order diagonal line.

9. The apparatus of claim 8 , wherein to interleave the first values of the first line buffer and the second values of the second line buffer in the destination buffer comprises to:

use a hardware instruction to interleave the first values and the second values in the destination buffer.

10. The apparatus of claim 9 , wherein the hardware instruction is one of unpackhi or unparcklo.

11. The apparatus of claim 9 , wherein the processor is further configured to:

calculate a respective cumulative sum for at least some locations of the destination buffer.

12. The apparatus of claim 11 , wherein to calculate the respective cumulative sum for the at least some locations of the destination buffer comprises to:

add a destination buffer value at a location of the at least some locations of the destination buffer to a cumulative sum corresponding to an immediately preceding location of the destination buffer.

13. The apparatus of claim 12 , wherein to determine, using the destination buffer, the probability distribution for coding the current value of the current scan-order diagonal line comprises to:

calculate a difference between a first cumulative sum corresponding to a first location of the destination buffer and a second cumulative sum corresponding to a second location of the destination buffer, wherein the first cumulative sum and the second cumulative sum are selected based on a position of the current value; and

determine the probability distribution using the difference.

14. The apparatus of claim 13 , wherein a distance between the first location of the destination buffer and the second location of the destination buffer is related to a number of scan positions of already coded values of a template, wherein the template indicates, for a to-be-coded value, scan positions arranged, in the template, in at least two anti-diagonal lines.

15. A method for decoding a transform block, comprising:

storing, in a first line buffer, first values of a first scan-order diagonal line scanned immediately before a current scan-order diagonal line of the transform block;

storing, in a second line buffer, second values of a second scan-order diagonal line scanned immediately before the first scan-order diagonal line;

interleaving the first values of the first line buffer and the second values of the second line buffer in a destination buffer;

selecting, using the destination buffer, a probability distribution for coding a current value of the current scan-order diagonal line;

entropy decoding, from a compressed bitstream, the current value using the probability distribution; and

replacing, for coding values of an immediately subsequent scan-order diagonal line to the current scan-order diagonal line, one of the second line buffer or the first line buffer with current values of the current scan-order diagonal line.

16. The method of claim 15 , wherein interleaving the first values of the first line buffer and the second values of the second line buffer in the destination buffer comprises:

using a hardware instruction to interleave the first values and the second values in the destination buffer.

17. The method of claim 16 , wherein the hardware instruction is one of unpackhi or unparcklo.

18. The method of claim 16 , further comprising:

calculating a respective cumulative sum for at least some locations of the destination buffer.

19. The method of claim 18 , wherein calculating the respective cumulative sum for the at least some locations of the destination buffer comprises:

adding a destination buffer value at a location of the at least some locations of the destination buffer to a cumulative sum corresponding to an immediately preceding location of the destination buffer.

20. The method of claim 19 , wherein determining, using the destination buffer, the probability distribution for coding the current value of the current scan-order diagonal line comprises:

calculating a difference between a first cumulative sum corresponding to a first location of the destination buffer and a second cumulative sum corresponding to a second location of the destination buffer, wherein the first cumulative sum and the second cumulative sum are selected based on a position of the current value; and

determining the probability distribution using the difference.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 1, 2020
From: HAN, JINGNING; ZERN, JAMES; ZHANG, LINFENG; CHIANG, CHING-HAN; XU, YAOWU
To: GOOGLE LLC
Reel/Frame 054497/0706 →
Continuity (3)
Continuation 16693438 · Nov 25, 2019
Continuation In Part 15883323 · Jan 30, 2018
Related Publication 20210084336A1 · Mar 18, 2021