# US 5,706,002 A · Method and apparatus for evaluating the syntax elements for DCT coefficients of a video decoder

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

- Number: US 5,706,002 A
- Document ID: US5706002A
- Status: Granted
- Kind: A
- Application number: 08/604,631
- Filed: 1996-02-21
- Granted: 1998-01-06
- Earliest claimed: 1996-02-21
- Assignees: David Sarnoff Research Center, Inc.
- Inventors: Paul Harquail Meehan; Paul Joseph Panaro
- Web page: https://patentgrep.com/patent/US5706002A

## CPC

- H04N 17/004: {for digital television systems}
- G06F 17/147: {Discrete orthonormal transforms, e.g. discrete cosine transform, discrete sine transform, and variations therefrom, e.g. modified discrete cosine transform, integer transforms approximating the discrete cosine transform (G06F17/145 takes precedence)}
- H04N 19/61: in combination with predictive coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and apparatus for creating and using a test bitstream to evaluate a video decoder. The test bitstream contains a plurality of variable length code and/or escape sequences (combination of escape code, run length code and/or level code) for testing the video decoder's ability to decode syntax elements for discrete cosine transform (DCT) coefficients. The method of fabricating the test bitstream requires the selection of the proper DCT coefficients, run and quantizer product to produce a valid test bitstream for exercising all possible test levels without causing an overflow condition. The method selects a test level and a desired DCT coefficient and then computes for an appropriate quantizer product. In turn, the quantizer product is used to compute a quantizer scale and a run. This method is repeated for all desired test levels and the resulting level/run pairs and quantizer scales are encoded into the test bitstream.

## Claims

### Claim 1

A method of evaluating a video decoder, comprising the steps of:
(a) sending a bitstream to the video decoder, where said bitstream comprises a plurality of run/level pairs, where each run/level pair having a run and a level, and quantizer scales selected to exercise a plurality of test levels to cause the video decoder to produce output values which are within an inverse discrete cosine transform (IDCT) output range of the video decoder, where said runs and quantizer scales are computed from a quantizer product;
(b) decoding said bitstream using the video decoder; and
(c) observing a response from the video decoder corresponding to said bitstream to evaluate the video decoder's decoding of said plurality of run/level pairs and quantizer scales, where said response is an output from the video decoder in decoding said bitstream.

### Claim 2 (depends on 1)

The method of claim 1, wherein said quantizer product is computed in accordance with:
F"v!u!=(((QFv!u!*2)+Sign(QFv!u!))*Ww!v!u!*quantizer.sub.-- scale/32;
where u, v are coordinates in a transform domain, F"v!u! is a desired DCT coefficient, QFv!u! is said test level, Sign is a positive or negative sign of said test level and Ww!v!u! is a quantization matrix.

### Claim 3 (depends on 2)

The method of claim 2, wherein said quantization matrix is defined as:
quant.sub.-- matrix(run)=run+1;
where "run" is a coordinate in accordance with a zigzag order of run length coding.

### Claim 4 (depends on 2)

The method of claim 2, wherein a maximum value of said desired DCT coefficient is calculated in accordance with: ##EQU3## where u, v are coordinates in the transform domain and H.sub.jk u!v! is an 8 by 8 matrix where an only non-zero entry is H.sub.jk j!k!=1.

### Claim 5

The method of forming a bitstream for evaluating a video decoder comprising the steps of:
(a) selecting a test level to be tested;
(b) selecting a desired discrete cosine transform (DCT) coefficient;
(c) computing a quantizer product;
(d) computing a quantizer scale and run from said quantizer product; and
(e) encoding said test level, run and quantizer scale into the bitstream.

### Claim 6 (depends on 5)

The method of claim 5, further comprising the step of:
(f) repeating steps (a) through (e) for all test levels within a test range.

### Claim 7 (depends on 5)

The method of claim 5, wherein said desired DCT coefficient is selected to produce an inverse discrete cosine transform (IDCT) output value that is within a range -384, +383!.

### Claim 8 (depends on 5)

The method of claim 5, wherein a maximum value of said desired DCT coefficient is calculated in accordance with: ##EQU4## where u, v are coordinates in a transform domain and H.sub.jk u!v! is an 8 by 8 matrix where an only non-zero entry is H.sub.jk j!k!=1.

### Claim 9 (depends on 8)

The method of claim 8, where said ##EQU5## approximately equal to 0.24 and said max(abs(IDCT output value)) is equal to 383.

### Claim 10 (depends on 5)

The method of claim 5, wherein a plurality of said desired DCT coefficients are selected for a single DCT block, where a maximum value of each of said desired DCT coefficients is calculated, where a sum of squares of said desired DCT coefficients must be less than or equal to the square of the max(abs(IDCT output value)).

### Claim 11 (depends on 5)

The method of claim 5, wherein said quantizer product is selected in accordance with:
F"v!u!=(((QFv!u!*2)+Sign(QFv!u!))*Ww!v!u!*quantizer.sub.-- scale/32;
where u, v are coordinates in a transform domain, F"v!u! is said desired DCT coefficient, QFv!u! is said test level, Sign is a positive or negative sign of said test level and Ww!v!u! is a quantization matrix.

### Claim 12 (depends on 11)

The method of claim 11, wherein said quantization matrix is defined as:
quant.sub.-- matrix(run)=run+1;
where "run" is a coordinate in accordance with a zigzag order of run length coding.

### Claim 13

A bitstream for testing a video decoder comprising:
an encoded run/level pair and a quantizer scale selected to exercise a test level to cause the video decoder to produce an output value which is within an inverse discrete cosine transform (IDCT) output range of the video decoder, where said encoded run/level pair and quantizer scale are selected by selecting a desired discrete cosine transform (DCT) coefficient and computing a quantizer product.

### Claim 14 (depends on 13)

The bitstream of claim 13, wherein said quantizer product is selected in accordance with:
F"v!u!=(((QFv!u!*2)+Sign(QFv!u!))*Ww!v!u!*quantizer.sub.-- scale/32;
where u, v are coordinates in a transform domain, F"v!u! is said desired DCT coefficient, QFv!u! is said test level, Sign is the positive or negative sign of said test level and Ww!v!u! is a quantization matrix.

### Claim 15 (depends on 14)

The bitstream of claim 14, wherein said quantization matrix is defined as:
quant.sub.-- matrix(run)=run+1;
where "run" is a coordinate in accordance with a zigzag order of run length coding.

### Claim 16 (depends on 13)

The bitstream of claim 13, wherein a maximum value of said desired DCT coefficient is calculated in accordance with: ##EQU6## where u, v are coordinates in the transform domain and H.sub.jk u!v! is an 8 by 8 matrix where an only non-zero entry is H.sub.jk j!k!=1.

### Claim 17 (depends on 13)

The bitstream of claim 13, wherein a plurality of said desired DCT coefficients are selected for a single DCT block, where a maximum value of each of said desired DCT coefficients is calculated where a sum of squares of said desired DCT coefficients must be less than or equal to the square of the max(abs(IDCT output value)).

### Claim 18

An apparatus for testing a video decoder comprising:
means for generating a bitstream, where said bitstream comprises an encoded run/level pair and a quantizer scale selected to exercise a test level to cause the video decoder to produce output values which are within an inverse discrete cosine transform (IDCT) output range of the video decoder, where said encoded run/level pair and quantizer scale are selected by selecting a desired discrete cosine transform (DCT) coefficient and computing a quantizer product;
means, coupled to said generating means, for sending said bitstream to the video decoder; and
means, coupled to the video decoder, for observing a response for the video decoder corresponding to said bitstream to evaluate the video decoder, where said response is an output from the video decoder in decoding said bitstream.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein said generating means comprises a general purpose computer having a memory for storing said bitstream.

### Claim 20 (depends on 18)

The apparatus of claim 18, wherein said quantizer product is selected in accordance with:
F"v!u!=(((QFv!u!*2)+Sign(QFv!u!))*Ww!v!u!*quantizer.sub.-- scale/32;
where u, v are coordinates in the transform domain, F"v!u! is said desired DCT coefficient, QFv!u! is said test level, Sign is the positive or negative sign of said test level and Ww!v!u! is a quantization matrix.
