# US 2012/0250758 A1 · Method and apparatus for frame memory compression

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0250758 A1
- Document ID: US20120250758A1
- Status: Published application
- Kind: A1
- Application number: 13/178,510
- Filed: 2011-07-08
- Published: 2012-10-04
- Earliest claimed: 2011-03-30
- Assignees: Industrial Technology Research Institute
- Inventors: Fan-Di Jou; Chih-Hsu Yen; Chun-Lung Lin; Tian-Jian Wu
- Web page: https://patentgrep.com/patent/US20120250758A1

## CPC

- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/126: Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/146: Data rate or code amount at the encoder output
- H04N 19/174: the region being a slice, e.g. a line of blocks or a group of blocks
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method for frame memory compression divides each of a plurality of image frames in a frame memory into a plurality of blocks for taking a block as a compression unit. It quantizes a plurality of pixel values inside the block according to a predefined parameter, thereby generating a quantized block and a plurality of removed bits from the binary representation of the plurality of pixel values. A predictor is used to produce a residual block for the quantized block. A variable length encoder takes the residual block as an input and produces a coded bitstream. A packing unit is used to take the coded bitstream and the number of removed bits generated by the quantizer as inputs, so as to produce an entire codeword sequence of the block that meets a target bit rate by using a structure called group of blocks (GOB) to flexibly share available spaces of the blocks in the same GOB.

## Claims

### Claim 1

A method for frame memory compression, adapted to a video processor at least including a quantizer, a predictor, a variable length encoder, and a packing unit, said method comprising:
dividing each of a plurality of image frames in a frame memory into a plurality of blocks for taking a block as a compression unit;
applying said quantizer to quantize a plurality of pixel values inside said block according to a predefined parameter, thereby generating a quantized block and a plurality of removed bits from a binary representation of said plurality of pixel values;
applying said predictor to produce a residual block for said quantized block;
applying said variable length encoder to take said residual block as an input and produce a coded bitstream; and
applying said packing unit to take said coded bitstream and said plurality of removed bits generated by said quantizer as inputs, so as to produce an entire codeword sequence of said block that meets a target bit rate by using a structure called group of blocks (GOB) to flexibly share available spaces of the blocks in the same GOB.

### Claim 2 (depends on 1)

The method as claimed in claim 1, wherein a GOB is a group of neighboring blocks of said block, and is a basic rate-control unit.

### Claim 3 (depends on 1)

The method as claimed in claim 1, wherein said quantizer quantizes said plurality of pixel values inside said block by removing said number of removed bits in an order of from the least significant bit to the most significant bit in the binary representation of each of said plurality of pixel values.

### Claim 4 (depends on 1)

The method as claimed in claim 1, wherein said predictor predicts said plurality of pixel values inside said block pixel-by-pixel in a special predetermined order, according to boundary data of said block.

### Claim 5 (depends on 1)

The method as claimed in claim 1, wherein said plurality of removed bits generated by said quantizer are kept for pixel compensation during said packing unit producing said entire codeword sequence.

### Claim 6 (depends on 1)

The method as claimed in claim 1, wherein said packing unit utilizes a remaining available space to compensate the quality of said coded bitstream by padding with said plurality of removed bits back to said remaining space of said coded bitstream bit-by-bit according to a padding order, until all the removed bits are used or a length of said coded bitstream reaches said target bit rate.

### Claim 7 (depends on 6)

The method as claimed in claim 6, wherein said padding order represents the importance of said plurality of removed bits, and a bit with a smaller padding order is more significant than that with a higher padding order.

### Claim 8 (depends on 1)

The method as claimed in claim 1, wherein said packing unit checks whether or not a length of said coded bitstream is less than the predefined target bit rate, and a cutting and a filling are performed when the length equals to or exceeds said target bit rate, a compensation is performed when the length is less than said target bit rate.

### Claim 9 (depends on 8)

The method as claimed in claim 8, wherein said cutting is operated by removing a (k+1)-th codeword used in said variable length encoder exceeding said target bit rate from said coded bitstream and choosing a best matched codeword to replace the (k+1)-th codeword, where k is a codeword index, such that the total length of k successive codewords used in said variable length encoder is smaller than said target bit rate, but the total length of the k+1 successive codewords used in said variable length encoder is larger than said target bit rate.

### Claim 10 (depends on 9)

The method as claimed in claim 9, wherein when a remaining space is available and there exists not yet encoded residuals inside said residual block, said filling is performed by recursively finding a plurality of matched codewords for the not yet encoded residuals, and when said remaining space is not sufficient to select a best matched codeword, said filling is performed by padding with a special bitstream.

### Claim 11

An apparatus for frame memory compression, adapted to a video processor with each of a plurality of image frames in a frame memory being divided into a plurality of blocks for taking a block as a compression unit, said apparatus comprising:
a quantizer for quantizing a plurality of pixels inside said block according to a quantization parameter, thereby generating a quantized block and a plurality of removed bits from a binary representation of said plurality of pixel values;
a predictor that uses two control inputs to produce a residual block, according to boundary data of said block and said quantized block;
a variable length coder that takes said residual block as an input and produce a coded bitstream by using a table-lookup method; and
a packing unit that takes said coded bitstream and said plurality of removed bits generated by said quantizer as inputs, so as to produce an entire codeword sequence of said block that meets a target bit rate by using a structure called group of blocks (GOB) to flexibly share available spaces of the blocks in the same GOB.

### Claim 12 (depends on 11)

The apparatus as claimed in claim 11, wherein said predictor uses one of said two control inputs to recognize a valid status of the boundary data, and the other control input is used to determine the status of a valid boundary.

### Claim 13 (depends on 12)

The apparatus as claimed in claim 12, wherein said the other control input selects a combination of three boundary status values, including referencing left and upper boundaries simultaneously, referencing only left boundary, and referencing only upper boundary.

### Claim 14 (depends on 11)

The apparatus as claimed in claim 11, wherein said packing unit further includes:
a right-shift register for right-shifting said plurality of removed bits into its most significant bits, and right-shifting said coded bitstream according to a prediction order;
a shrinking module that extract most significant T bits from said right-shift register and returns the most significant T bits to a register, where T is the bit length of said target bit rate;
a remaining-bit calculation module that computes a flag to indicate whether or not the length of said coded bitstream is greater than said target bit rate, and when said flag is true, said remaining-bit calculation module outputs a codeword index to inform which codeword for said block should be replaced, and a bit length to inform the length of an available remaining space in said register; and
a reconstruction module that outputs said entire codeword sequence from said register and a block length, according to said flag, said codeword index, said bit length and said target bit rate.

### Claim 15 (depends on 14)

The apparatus as claimed in claim 14, wherein when the length of said coded bitstream is greater than said target bit rate, said reconstruction module finds a best matched codeword for replacing the codeword corresponding to said codeword index.

### Claim 16 (depends on 14)

The apparatus as claimed in claim 14, wherein when the length of said best matched codeword is less than that of said available remaining space, said flag is set to false and said reconstruction module fills all the remaining bits in said register with zeros.

### Claim 17 (depends on 14)

The apparatus as claimed in claim 14, wherein when a total length of said coded bitstream and said plurality of removed bits is less than said target bit rate, said flag is set to false and said coded bitstream and said plurality of removed bits are all saved in said register.

### Claim 18 (depends on 14)

The apparatus as claimed in claim 14, wherein when the length of said coded bitstream is less than said target bit rate, but a total length of said coded bitstream and said plurality of removed bits is greater than said target bit rate, said flag is set to false and said coded bitstream and most significant u bits of said plurality of removed bits are saved in said register, where u equals to a difference between said target bit rate and the length of said coded bitstream.

### Claim 19 (depends on 11)

The apparatus as claimed in claim 11, wherein when the length of said coded bitstream equals to said target bit rate, said flag is set to false and said coded bitstream is all saved while said plurality of removed bits disappear completely.
