DC coefficient signaling at small quantization step sizes

11575913 · 2023-02-07

Assignee

Inventors

Cpc classification

International classification

Abstract

Described tools and techniques relate to signaling for DC coefficients at small quantization step sizes. The techniques and tools can be used in combination or independently. For example, a tool such as a video encoder or decoder processes a VLC that indicates a DC differential for a DC coefficient, a FLC that indicates a value refinement for the DC differential, and a third code that indicates the sign for the DC differential. Even with the small quantization step sizes, the tool uses a VLC table with DC differentials for DC coefficients above the small quantization step sizes. The FLCs for DC differentials have lengths that vary depending on quantization step size.

Claims

1. A method comprising: receiving encoded data in a bitstream; and decoding the encoded data to reconstruct a picture, including, for a block of the picture: determining a quantization step size that applies for the block based on one or more syntax elements in the bitstream; decoding a variable length code (VLC) for a DC differential for a DC coefficient of the block, the DC differential representing a difference between the DC coefficient and a DC predictor for the DC coefficient of the block, wherein the decoding the VLC uses a VLC table that includes different VLC values that are associated with different values for DC differentials, such that the decoding the VLC yields a value for the DC differential for the DC coefficient of the block; checking whether the quantization step size that applies for the block is one of a set of small quantization step sizes; reconstructing the DC differential, including using the value for the DC differential for the DC coefficient of the block as a base absolute value or as a final absolute value depending on whether the quantization step size that applies for the block is one of the set of small quantization step sizes; computing the DC predictor; and combining the DC differential and the DC predictor.

2. The method of claim 1, wherein the quantization step size that applies for the block is one of the set of small quantization step sizes if the quantization step size that applies for the block is 1 or 2.

3. The method of claim 1, wherein the decoding the encoded data further includes: determining that the quantization step size that applies for the block is one of the set of small quantization step sizes; and decoding a fixed length code (FLC) that indicates a refinement value for the DC differential for the DC coefficient of the block, wherein the reconstructing the DC differential uses the base absolute value, the refinement value, and a sign value.

4. The method of claim 3, wherein the FLC has a length that varies depending on the quantization step size that applies for the block.

5. The method of claim 4, wherein: if the quantization step size that applies for the block is 1, the length of the FLC is 2; and if the quantization step size that applies for the block is 2, the length of the FLC is 1.

6. The method of claim 1, wherein the decoding the encoded data further includes: determining that the quantization step size that applies for the block is not one of the set of small quantization step sizes, wherein the reconstructing the DC differential uses the final absolute value and a sign value.

7. The method of claim 1, wherein the VLC table further includes: a VLC associated with a zero value.

8. The method of claim 1, wherein the block is an intra-coded block.

9. The method of claim 1, wherein the quantization step size that applies for the block is indicated at least in part by a picture-layer syntax element for the picture and at least in part by a differential quantization syntax element that adjusts the quantization step size for a macroblock that includes the block.

10. One or more computer-readable memory devices storing computer-executable instructions for causing one or more processing units, when programmed thereby, to perform operations comprising: receiving encoded data in a bitstream; and decoding the encoded data to reconstruct a picture, including, for a block of the picture: determining a quantization step size that applies for the block based on one or more syntax elements in the bitstream; decoding a variable length code (VLC) for a DC differential for a DC coefficient of the block, the DC differential representing a difference between the DC coefficient and a DC predictor for the DC coefficient of the block, wherein the decoding the VLC uses a VLC table that includes different VLC values that are associated with different values for DC differentials, such that the decoding the VLC yields a value for the DC differential for the DC coefficient of the block; checking whether the quantization step size that applies for the block is one of a set of small quantization step sizes; reconstructing the DC differential, including using the value for the DC differential for the DC coefficient of the block as a base absolute value or as a final absolute value depending on whether the quantization step size that applies for the block is one of the set of small quantization step sizes; computing the DC predictor; and combining the DC differential and the DC predictor.

11. The one or more computer-readable memory devices of claim 10, wherein the quantization step size that applies for the block is one of the set of small quantization step sizes if the quantization step size that applies for the block is 1 or 2.

12. The one or more computer-readable memory devices of claim 10, wherein the decoding the encoded data further includes: determining that the quantization step size that applies for the block is one of the set of small quantization step sizes; and decoding a fixed length code (FLC) that indicates a refinement value for the DC differential for the DC coefficient of the block, wherein the reconstructing the DC differential uses the base absolute value, the refinement value, and a sign value.

13. The one or more computer-readable memory devices of claim 12, wherein the FLC has a length that varies depending on the quantization step size that applies for the block.

14. The one or more computer-readable memory devices of claim 10, wherein the decoding the encoded data further includes: determining that the quantization step size that applies for the block is not one of the set of small quantization step sizes, wherein the reconstructing the DC differential uses the final absolute value and a sign value.

15. The one or more computer-readable memory devices of claim 10, wherein the VLC table further includes a VLC associated with a zero value.

16. The one or more computer-readable memory devices of claim 10, wherein the block is an intra-coded block.

17. A computer system comprising: a buffer configured to receive encoded data in a bitstream; and a decoder configured to decode the encoded data to reconstruct a picture by performing operations that include, for a block of the picture: determining a quantization step size that applies for the block based on one or more syntax elements in the bitstream; decoding a variable length code (VLC) for a DC differential for a DC coefficient of the block, the DC differential representing a difference between the DC coefficient and a DC predictor for the DC coefficient of the block, wherein the decoding the VLC uses a VLC table that includes different VLC values that are associated with different values for DC differentials, such that the decoding the VLC yields a value for the DC differential for the DC coefficient of the block; checking whether the quantization step size that applies for the block is one of a set of small quantization step sizes; reconstructing the DC differential, including using the value for the DC differential for the DC coefficient of the block as a base absolute value or as a final absolute value depending on whether the quantization step size that applies for the block is one of the set of small quantization step sizes; computing the DC predictor; and combining the DC differential and the DC predictor.

18. The computer system of claim 17, wherein the operations further include: determining that the quantization step size that applies for the block is one of the set of small quantization step sizes; and decoding a fixed length code (FLC) that indicates a refinement value for the DC differential for the DC coefficient of the block, wherein the reconstructing the DC differential uses the base absolute value, the refinement value, and a sign value.

19. The computer system of claim 18, wherein the FLC has a length that varies depending on the quantization step size that applies for the block.

20. The computer system of claim 17, wherein the operations further include: determining that the quantization step size that applies for the block is not one of the set of small quantization step sizes, wherein the reconstructing the DC differential uses the final absolute value and a sign value.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 is a chart showing a staircase I/O function for a scalar quantizer according to the prior art.

(2) FIGS. 2a and 2b are charts showing classifiers and thresholds for scalar quantizers according to the prior art.

(3) FIG. 3 is a chart showing a staircase I/O function for a DZ+UTQ according to the prior art.

(4) FIGS. 4a and 4b are charts showing classifiers and thresholds for DZ+UTQs according to the prior art.

(5) FIG. 5 is a chart showing reconstruction points for different reconstruction rules for a given pdf shape according to the prior art.

(6) FIG. 6 is a chart showing adjustments to a classifier for a scalar quantizer according to the prior art.

(7) FIG. 7 is a block diagram showing block-based intra-compression according to the prior art.

(8) FIG. 8 is a block diagram of a suitable computing environment in which several described embodiments may be implemented.

(9) FIGS. 9 and 10 are block diagrams of a video encoder system and a video decoder system, respectively, in conjunction with which several described embodiments may be implemented.

(10) FIGS. 11A-11D are diagrams for different syntax layers of a bitstream.

(11) FIG. 12 is a listing of DC differential decoding pseudocode.

DETAILED DESCRIPTION

(12) Described embodiments relate to techniques and tools for signaling DC coefficients at small quantization step sizes. The various techniques and tools can be used in combination or independently.

I. Computing Environment

(13) FIG. 8 illustrates a generalized example of a suitable computing environment (800) in which several of the described embodiments may be implemented. The computing environment (800) is not intended to suggest any limitation as to scope of use or functionality, as the techniques and tools may be implemented in diverse general-purpose or special-purpose computing environments.

(14) With reference to FIG. 8, the computing environment (800) includes at least one processing unit (810) and memory (820). In FIG. 8, this most basic configuration (830) is included within a dashed line. The processing unit (810) executes computer-executable instructions and may be a real or a virtual processor. In a multi-processing system, multiple processing units execute computer-executable instructions to increase processing power. The memory (820) may be volatile memory (e.g., registers, cache, RAM), non-volatile memory (e.g., ROM, EEPROM, flash memory, etc.), or some combination of the two. The memory (820) stores software (880) implementing an encoder and/or decoder with special signaling of DC coefficients at small quantization step sizes.

(15) A computing environment may have additional features. For example, the computing environment (800) includes storage (840), one or more input devices (850), one or more output devices (860), and one or more communication connections (870). An interconnection mechanism (not shown) such as a bus, controller, or network interconnects the components of the computing environment (800). Typically, operating system software (not shown) provides an operating environment for other software executing in the computing environment (800), and coordinates activities of the components of the computing environment (800).

(16) The storage (840) may be removable or non-removable, and includes magnetic disks, magnetic tapes or cassettes, CD-ROMs, DVDs, or any other medium which can be used to store information and which can be accessed within the computing environment (800). The storage (840) stores instructions for the software (880) implementing the encoder and/or decoder.

(17) The input device(s) (850) may be a touch input device such as a keyboard, mouse, pen, or trackball, a voice input device, a scanning device, or another device that provides input to the computing environment (800). For audio or video encoding, the input device(s) (850) may be a sound card, video card, TV tuner card, or similar device that accepts audio or video input in analog or digital form, or a CD-ROM or CD-RW that reads audio or video samples into the computing environment (800). The output device(s) (860) may be a display, printer, speaker, CD-writer, or another device that provides output from the computing environment (800).

(18) The communication connection(s) (870) enable communication over a communication medium to another computing entity. The communication medium conveys information such as computer-executable instructions, audio or video input or output, or other data in a modulated data signal. A modulated data signal is a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media include wired or wireless techniques implemented with an electrical, optical, RF, infrared, acoustic, or other carrier.

(19) The techniques and tools can be described in the general context of computer-readable media. Computer-readable media are any available media that can be accessed within a computing environment. By way of example, and not limitation, with the computing environment (800), computer-readable media include memory (820), storage (840), communication media, and combinations of any of the above.

(20) The techniques and tools can be described in the general context of computer-executable instructions, such as those included in program modules, being executed in a computing environment on a target real or virtual processor. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The functionality of the program modules may be combined or split between program modules as desired in various embodiments. Computer-executable instructions for program modules may be executed within a local or distributed computing environment.

II. Video Encoder and Decoder

(21) FIG. 9 is a block diagram of a generalized video encoder system (900), and FIG. 10 is a block diagram of a video decoder system (1000), in conjunction with which various described embodiments may be implemented.

(22) The relationships shown between modules within the encoder and decoder indicate the main flow of information in the encoder and decoder; other relationships are not shown for the sake of simplicity. In particular, FIGS. 9 and 10 usually do not show side information indicating the encoder settings, modes, tables, etc. used for a video sequence, frame, macroblock, block, etc. Such side information is sent in the output bitstream, typically after entropy encoding of the side information. The format of the output bitstream can be a Windows Media Video version 9 or other format.

(23) The encoder (900) and decoder (1000) are block-based and use a 4:2:0 macroblock format, with each macroblock including four 8×8 luminance blocks (at times treated as one 16×16 macroblock) and two 8×8 chrominance blocks. Alternatively, the encoder (900) and decoder (1000) are object-based, use a different macroblock or block format, or perform operations on sets of pixels of different size or configuration than 8×8 blocks and 16×16 macroblocks.

(24) Depending on implementation and the type of compression desired, modules of the encoder or decoder can be added, omitted, split into multiple modules, combined with other modules, and/or replaced with like modules. In alternative embodiments, encoders or decoders with different modules and/or other configurations of modules perform one or more of the described techniques.

(25) A. Video Encoder

(26) FIG. 9 is a block diagram of a general video encoder system (900) that can perform joint entropy coding and bitstream formation operations for variable-size transform information. The encoder system (900) receives a sequence of video frames including a current frame (905), and produces compressed video information (995) as output. Particular embodiments of video encoders typically use a variation or supplemented version of the generalized encoder (900).

(27) The encoder system (900) compresses predicted frames and key frames. For the sake of presentation, FIG. 9 shows a path for key frames through the encoder system (900) and a path for forward-predicted frames. Many of the components of the encoder system (900) are used for compressing both key frames and predicted frames. The exact operations performed by those components can vary depending on the type of information being compressed.

(28) A predicted frame (also called p-frame, b-frame for bi-directional prediction, or inter-coded frame) is represented in terms of prediction (or difference) from one or more other frames. A prediction residual is the difference between what was predicted and the original frame. In contrast, a key frame (also called an I-frame or intra-coded frame) is compressed without reference to other frames.

(29) If the current frame (905) is a forward-predicted frame, a motion estimator (910) estimates motion of macroblocks or other sets of pixels of the current frame (905) with respect to a reference frame, which is a reconstructed previous frame (925) buffered in the frame store (920). In alternative embodiments, the reference frame is a later frame or the current frame is bi-directionally predicted. The motion estimator (910) can estimate motion by pixel, ½ pixel, ¼ pixel, or other increments, and can switch the precision of the motion estimation on a frame-by-frame basis or other basis. The precision of the motion estimation can be the same or different horizontally and vertically. The motion estimator (910) outputs as side information motion information (915) such as motion vectors. A motion compensator (930) applies the motion information (915) to the reconstructed previous frame (925) to form a motion-compensated current frame (935). The prediction is rarely perfect, however, and the difference between the motion-compensated current frame (935) and the original current frame (905) is the prediction residual (945). Alternatively, a motion estimator and motion compensator apply another type of motion estimation/compensation.

(30) For DC coefficients at small quantization step sizes, the encoder signals DC coefficients using a syntax and code tables such as those described below. In particular, the encoder uses the code tables and produces an output bitstream in compliance with the syntax below.

(31) A frequency transformer (960) converts the spatial domain video information into frequency domain (i.e., spectral) data. For block-based video frames, the frequency transformer (960) applies a DCT or variant of DCT to blocks of the pixel data or prediction residual data, producing blocks of DCT coefficients. Alternatively, the frequency transformer (960) applies another conventional frequency transform such as a Fourier transform or uses wavelet or subband analysis. In embodiments in which the encoder uses spatial extrapolation (not shown in FIG. 9) to encode blocks of key frames, the frequency transformer (960) can apply a re-oriented frequency transform such as a skewed DCT to blocks of prediction residuals for the key frame. The frequency transformer (960) applies an 8×8, 8×4, 4×8, or other size frequency transforms (e.g., DCT) to prediction residuals for predicted frames.

(32) A quantizer (970) then quantizes the blocks of spectral data coefficients. The quantizer applies uniform, scalar quantization to the spectral data with a step-size that varies on a frame-by-frame basis or other basis. Alternatively, the quantizer applies another type of quantization to the spectral data coefficients, for example, a non-uniform, vector, or non-adaptive quantization, or directly quantizes spatial domain data in an encoder system that does not use frequency transformations. In addition to adaptive quantization, the encoder (900) can use frame dropping, adaptive filtering, or other techniques for rate control.

(33) If a given macroblock in a predicted frame has no information of certain types (e.g., no motion information for the macroblock and no residual information), the encoder (900) may encode the macroblock as a skipped macroblock. If so, the encoder signals the skipped macroblock in the output bitstream of compressed video information (995).

(34) When a reconstructed current frame is needed for subsequent motion estimation/compensation, an inverse quantizer (976) performs inverse quantization on the quantized spectral data coefficients. An inverse frequency transformer (966) then performs the inverse of the operations of the frequency transformer (960), producing a reconstructed prediction residual (for a predicted frame) or reconstructed samples (for an intra-coded frame). If the frame (905) being encoded is an intra-coded frame, then the reconstructed samples form the reconstructed current frame (not shown). If the frame (905) being encoded is a predicted frame, the reconstructed prediction residual is added to the motion-compensated predictions (935) to form the reconstructed current frame. The frame store (920) buffers the reconstructed current frame for use in predicting a next frame. In some embodiments, the encoder applies a deblocking filter to the reconstructed frame to adaptively smooth discontinuities between the blocks of the frame.

(35) The entropy coder (980) compresses the output of the quantizer (970) as well as certain side information (e.g., motion information (915), spatial extrapolation modes, quantization step size). Typical entropy coding techniques include arithmetic coding, differential coding, Huffman coding, run length coding, LZ coding, dictionary coding, and combinations of the above. The entropy coder (980) typically uses different coding techniques for different kinds of information (e.g., DC coefficients, AC coefficients, different kinds of side information), and can choose from among multiple code tables within a particular coding technique.

(36) The entropy coder (980) puts compressed video information (995) in the buffer (990). A buffer level indicator is fed back to bit rate adaptive modules. The compressed video information (995) is depleted from the buffer (990) at a constant or relatively constant bit rate and stored for subsequent streaming at that bit rate. Therefore, the level of the buffer (990) is primarily a function of the entropy of the filtered, quantized video information, which affects the efficiency of the entropy coding. Alternatively, the encoder system (900) streams compressed video information immediately following compression, and the level of the buffer (990) also depends on the rate at which information is depleted from the buffer (990) for transmission.

(37) Before or after the buffer (990), the compressed video information (995) can be channel coded for transmission over the network. The channel coding can apply error detection and correction data to the compressed video information (995).

(38) B. Video Decoder

(39) FIG. 10 is a block diagram of a general video decoder system (1000). The decoder system (1000) receives information (1095) for a compressed sequence of video frames and produces output including a reconstructed frame (1005). Particular embodiments of video decoders typically use a variation or supplemented version of the generalized decoder (1000).

(40) The decoder system (1000) decompresses predicted frames and key frames. For the sake of presentation, FIG. 10 shows a path for key frames through the decoder system (1000) and a path for forward-predicted frames. Many of the components of the decoder system (1000) are used for decompressing both key frames and predicted frames. The exact operations performed by those components can vary depending on the type of information being decompressed.

(41) A buffer (1090) receives the information (1095) for the compressed video sequence and makes the received information available to the entropy decoder (1080). The buffer (1090) typically receives the information at a rate that is fairly constant over time, and includes a jitter buffer to smooth short-term variations in bandwidth or transmission. The buffer (1090) can include a playback buffer and other buffers as well. Alternatively, the buffer (1090) receives information at a varying rate. Before or after the buffer (1090), the compressed video information can be channel decoded and processed for error detection and correction.

(42) The entropy decoder (1080) entropy decodes entropy-coded quantized data as well as entropy-coded side information (e.g., motion information (1015), spatial extrapolation modes, quantization step size), typically applying the inverse of the entropy encoding performed in the encoder. Entropy decoding techniques include arithmetic decoding, differential decoding, Huffman decoding, run length decoding, LZ decoding, dictionary decoding, and combinations of the above. The entropy decoder (1080) frequently uses different decoding techniques for different kinds of information (e.g., DC coefficients, AC coefficients, different kinds of side information), and can choose from among multiple code tables within a particular decoding technique.

(43) If the frame (1005) to be reconstructed is a forward-predicted frame, a motion compensator (1030) applies motion information (1015) to a reference frame (1025) to form a prediction (1035) of the frame (1005) being reconstructed. For example, the motion compensator (1030) uses a macroblock motion vector to find a macroblock in the reference frame (1025). A frame buffer (1020) stores previous reconstructed frames for use as reference frames. The motion compensator (1030) can compensate for motion at pixel, ½ pixel, ¼ pixel, or other increments, and can switch the precision of the motion compensation on a frame-by-frame basis or other basis. The precision of the motion compensation can be the same or different horizontally and vertically. Alternatively, a motion compensator applies another type of motion compensation. The prediction by the motion compensator is rarely perfect, so the decoder (1000) also reconstructs prediction residuals.

(44) When the decoder needs a reconstructed frame for subsequent motion compensation, the frame store (1020) buffers the reconstructed frame for use in predicting a next frame. In some embodiments, the encoder applies a deblocking filter to the reconstructed frame to adaptively smooth discontinuities between the blocks of the frame.

(45) An inverse quantizer (1070) inverse quantizes entropy-decoded data. In general, the inverse quantizer applies uniform, scalar inverse quantization to the entropy-decoded data with a step-size that varies on a frame-by-frame basis or other basis. Alternatively, the inverse quantizer applies another type of inverse quantization to the data, for example, a non-uniform, vector, or non-adaptive inverse quantization, or directly inverse quantizes spatial domain data in a decoder system that does not use inverse frequency transformations.

(46) An inverse frequency transformer (1060) converts the quantized, frequency domain data into spatial domain video information. For block-based video frames, the inverse frequency transformer (1060) applies an IDCT or variant of IDCT to blocks of the DCT coefficients, producing pixel data or prediction residual data for key frames or predicted frames, respectively. Alternatively, the frequency transformer (1060) applies another conventional inverse frequency transform such as a Fourier transform or uses wavelet or subband synthesis. In embodiments in which the decoder uses spatial extrapolation (not shown in FIG. 10) to decode blocks of key frames, the inverse frequency transformer (1060) can apply a re-oriented inverse frequency transform such as a skewed IDCT to blocks of prediction residuals for the key frame. The inverse frequency transformer (1060) applies an 8×8, 8×4, 4×8, or other size inverse frequency transforms (e.g., IDCT) to prediction residuals for predicted frames.

(47) The decoder (1000) processes DC coefficient information when quantization step sizes are small, for example, as described below.

III. Example Bitstream Syntax and Semantics

(48) An example bitstream includes information for a sequence of compressed progressive video frames or other pictures. The bitstream is organized into several hierarchical layers that are decoded by a decoder such as the decoder (1000) of FIG. 10. The highest layer is the sequence layer, which has information for the overall sequence of frames. Additionally, each compressed video frame is made up of data that is structured into three hierarchical layers. From top to bottom the layers are: picture, macroblock, and block.

(49) FIG. 11A is a syntax diagram for the sequence layer (1100), which includes a sequence header (1110) followed by data for the picture layer (see FIG. 11B). The sequence header (1110) includes several sequence-level elements that are processed by the decoder and used to decode the sequence, including a macroblock quantization (DQUANT) element (1111) and quantizer specifier (QUANTIZER) element (1112). DQUANT (1111) is a 2-bit field that indicates whether or not the quantization step size can vary within a frame. There are three possible values for DQUANT. If DQUANT=0, then the only one quantization step size (i.e. the frame quantization step size) can be used per frame. If DQUANT=1 or 2, then it is possible to quantize each of the macroblocks in the frame differently.

(50) The QUANTIZER (1112) is a 2-bit fixed length code [“FLC”] field that indicates the quantizer used for the sequence. The quantizer types are encoded according to the following Table 2.

(51) TABLE-US-00002 TABLE 2 Quantizer Specification FLC Quantizer specification 00 Quantizer implicitly specified at frame level 01 Quantizer explicitly specified at frame level 10 5 QP deadzone quantizer used for all frames 11 3 QP deadzone quantizer used for all frames

(52) FIG. 11B is a syntax diagram for the picture layer (1120) for a progressive intra-frame [“progressive I-frame”]. Syntax diagrams for other pictures, such as P-frames and B-frames have many similar syntax elements. The picture layer (1120) includes a picture header (1130) followed by data for the macroblock layer. The picture header (1130) includes several picture-level elements that are processed by the decoder and used to decode the corresponding frame. Some of those elements are only present if their presence is signaled or implied by a sequence-level element or a preceding picture-level element.

(53) For example, the picture header (1130) includes an intra transform DCT table (DCTDCTAB) element (1137). This field is present in P pictures and baseline I pictures (X8IF=0). DCTDCTAB (1137) is a 1-bit field that signals which of two sets of VLC tables is used to decode the transform DC coefficients in intra-coded blocks. If DCTDCTAB=0, then the low motion VLC tables (one for luminance DC, one for chrominance DC) are used. If DCTDCTAB=1 then the high motion VLC tables (one for luminance DC, one for chrominance DC) are used. The transform DC VLC tables are listed below.

(54) The picture header (1130) includes a picture quantizer index (PQINDEX) element (1131). PQINDEX (1131) is a 5-bit field that signals the quantizer scale index for the entire frame. It is present in all picture types. If the implicit quantizer is used (signaled by sequence field QUANTIZER=00, see Table 2 above) then PQINDEX specifies both the picture quantizer scale (PQUANT) and the quantizer (3QP or 5QP deadzone) used for the frame. Table 3 shows how PQINDEX is translated to PQUANT and the quantizer for implicit mode.

(55) TABLE-US-00003 TABLE 3 PQINDEX to PQUANT/Quantizer Deadzone Translation (Implicit Quantizer) Quantizer PQINDEX PQUANT Deadzone 0 NA NA 1 1 3 QP 2 2 3 QP 3 3 3 QP 4 4 3 QP 5 5 3 QP 6 6 3 QP 7 7 3 QP 8 8 3 QP 9 6 5 QP 10 7 5 QP 11 8 5 QP 12 9 5 QP 13 10 5 QP 14 11 5 QP 15 12 5 QP 16 13 5 QP 17 14 5 QP 18 15 5 QP 19 16 5 QP 20 17 5 QP 21 18 5 QP 22 19 5 QP 23 20 5 QP 24 21 5 QP 25 22 5 QP 26 23 5 QP 27 24 5 QP 28 25 5 QP 29 27 5 QP 30 29 5 QP 31 31 5 QP

(56) If the quantizer is signaled explicitly at the sequence or frame level (signaled by sequence field QUANTIZER=01, 10 or 11, see Table 2 above) then PQINDEX is translated to the picture quantizer step size PQUANT as indicated by Table 4.

(57) TABLE-US-00004 TABLE 4 PQINDEX to PQUANT Translation (Explicit Quantizer) PQUANT PQUANT 3QP 5QP PQINDEX Deadzone Deadzone 0 NA NA 1 1 1 2 2 1 3 3 1 4 4 2 5 5 3 6 6 4 7 7 5 8 8 6 9 9 7 10 10 8 11 11 9 12 12 10 13 13 11 14 14 12 15 15 13 16 16 14 17 17 15 18 18 16 19 19 17 20 20 18 21 21 19 22 22 20 23 23 21 24 24 22 25 25 23 26 26 24 27 27 25 28 28 26 29 29 27 30 30 29 31 31 31

(58) Alternatively, instead of the translation shown in Table 4, PQUANT is equal to PQINDEX for all values of PQINDEX from 1 through 31 when the quantizer is signaled explicitly at the sequence or frame level.

(59) The picture header (1130) also includes a half QP step (HALFQP) element (1134) and picture quantizer type (PQUANTIZER) element (1135). HALFQP (1034) is a 1-bit field present if PQINDEX (1033) is less than or equal to 8. HALFQP (1134) allows the picture quantizer to be expressed in half step increments over the low PQUANT range. If HALFQP=1 then the picture quantizer step size is PQUANT+½. If HALFQP=0 then the picture quantizer step size is PQUANT. Therefore, if the 3QP deadzone quantizer is used then half step sizes are possible up to PQUANT=9 (i.e., PQUANT=1, 1.5, 2, 2.5 . . . 8.5, 9) and then only integer step sizes are allowable above PQUANT=9. For the 5QP deadzone quantizer, half step sizes are possible up to PQUANT=7 (i.e., 1, 1.5, 2, 2.5 . . . 6.5, 7).

(60) PQUANTIZER (1135) is a 1-bit field present in all frame types if the sequence level field QUANTIZER=01 (see Table 2 above). In this case, the quantizer used for the frame is specified by PQUANTIZER. If PQUANTIZER=0 then the 5QP deadzone quantizer is used for the frame. If PQUANTIZER=1 then the 3QP deadzone quantizer is used.

(61) The picture header (1130) further includes a macroblock quantization (VODPQUANT) field (1136). VODPQUANT (1136) may be used to adjust quantization step sizes for macroblocks (e.g., macroblocks at one or more edges of a frame, or on a per macroblock basis). For additional detail about VODPQUANT (1136), see U.S. patent application Ser. No. 10/623,195, filed Jul. 18, 2003.

(62) FIG. 11C is a macroblock-layer (1140) bitstream syntax diagram for progressive I-frames. The bitstream syntax for the macroblock layer of P-pictures and B-pictures contain many elements in common. Data for a macroblock consists of a macroblock header (1150) followed by block-layer data.

(63) FIG. 11D is an intra-coded block-layer (1160) bitstream syntax diagram. The block-layer data includes a transform DC coefficient (DCCOEF) element (1161), an escape transform DC coefficient (DCCOEFESC) element (1162), and a transform DC sign (DCSIGN) element (1163).

(64) The DCCOEF (1161) field is only present in intra-coded blocks. This is a variable-length codeword that encodes a transform DC differential. The transform DC decoding process is described further below. One of two sets of code tables is used to encode the DC differentials (the table is signaled in the DCTDCTAB (1137) field in the picture header as described above). The DC VLC tables are also listed below.

(65) The DCCOEFESC (1162) field is only present in intra-coded blocks and only if DCCOEF decodes to the escape code. The size of DCCOEFESC field can be 8, 9 or 10 bits depending on the quantization step size of the block.

(66) DCSIGN (1163) is a 1-bit value that indicates the sign of the DC differential. If DCSIGN=0 then the DC differential is positive. If DCSIGN=1 then the DC differential is negative.

IV. Example Decoding and Dequantization of DC Coefficients for Intra Blocks

(67) For typical intra-coded blocks, a decoder such as the decoder (1000) of FIG. 10 decodes coefficients, performs inverse quantization, and performs an inverse transform.

(68) A. Decoding DC Differentials

(69) The DC coefficient is coded differentially with respect to an already-decoded DC coefficient neighbor. This section describes the process used to decode the bitstream to obtain the DC differential.

(70) FIG. 11D shows the bitstream elements used to encode/decode the DC differential. DCCOEF is decoded using one of two sets of VLC tables (one for low motion and one for high motion). Each set of VLC tables includes a table for DC differentials for luminance blocks and a table for DC differentials for chrominance blocks. The table is specified by the DCTDCTAB (1137) field in the picture header. Based on the value of DCTDCTAB, one of the VLC tables listed below is used to decode DCCOEF. This will yield either: 1) zero, or 2) the absolute value of the DC differential, or 3) the escape code.

(71) If DCCOEF decodes to zero, the value of the DC differential is also zero. Otherwise, further decoding is done to determine the value of the DC differential. If DCCOEF decodes to the escape code, the absolute value of the DC differential is encoded in the DCCOEFESC field. The size of the DCCOEFESC field is 8, 9 or 10 bits depending on the quantization step size of the block. The sign of the DC differential is obtained from the DCSIGN field. FIG. 12 lists pseudocode to illustrate the DC differential decoding process.

(72) B. DC Differential VLC Tables

(73) 1. Low-motion VLC Tables

(74) TABLE-US-00005 TABLE 5 Low-motion Luminance DC Differential VLC Table DC Differential VLC Codeword VLC Size 0 1 1 1 1 2 2 1 4 3 1 5 4 5 5 5 7 5 6 8 6 7 12 6 8 0 7 9 2 7 10 18 7 11 26 7 12 3 8 13 7 8 14 39 8 15 55 8 16 5 9 17 76 9 18 108 9 19 109 9 20 8 10 21 25 10 22 155 10 23 27 10 24 154 10 25 19 11 26 52 11 27 53 11 28 97 12 29 72 13 30 196 13 31 74 13 32 198 13 33 199 13 34 146 14 35 395 14 36 147 14 37 387 14 38 386 14 39 150 14 40 151 14 41 384 14 42 788 15 43 789 15 44 1541 16 45 1540 16 46 1542 16 47 3086 17 48 197581 23 49 197577 23 50 197576 23 51 197578 23 52 197579 23 53 197580 23 54 197582 23 55 197583 23 56 197584 23 57 197585 23 58 197586 23 59 197587 23 60 197588 23 61 197589 23 62 197590 23 63 197591 23 64 197592 23 65 197593 23 66 197594 23 67 197595 23 68 197596 23 69 197597 23 70 197598 23 71 197599 23 72 197600 23 73 197601 23 74 197602 23 75 197603 23 76 197604 23 77 197605 23 78 197606 23 79 197607 23 80 197608 23 81 197609 23 82 197610 23 83 197611 23 84 197612 23 85 197613 23 86 197614 23 87 197615 23 88 197616 23 89 197617 23 90 197618 23 91 197619 23 92 197620 23 93 197621 23 94 197622 23 95 197623 23 96 197624 23 97 197625 23 98 197626 23 99 197627 23 100 197628 23 101 197629 23 102 197630 23 103 197631 23 104 395136 24 105 395137 24 106 395138 24 107 395139 24 108 395140 24 109 395141 24 110 395142 24 111 395143 24 112 395144 24 113 395145 24 114 395146 24 115 395147 24 116 395148 24 117 395149 24 118 395150 24 ESCAPE 395151 24

(75) TABLE-US-00006 TABLE 6 Low-motion Chroma DC Differential VLC Table DC Differential VLC Codeword VLC Size 0 0 2 1 1 2 2 5 3 3 9 4 4 13 4 5 17 5 6 29 5 7 31 5 8 33 6 9 49 6 10 56 6 11 51 6 12 57 6 13 61 6 14 97 7 15 121 7 16 128 8 17 200 8 18 202 8 19 240 8 20 129 8 21 192 8 22 201 8 23 263 9 24 262 9 25 406 9 26 387 9 27 483 9 28 482 9 29 522 10 30 523 10 31 1545 11 32 1042 11 33 1043 11 34 1547 11 35 1041 11 36 1546 11 37 1631 11 38 1040 11 39 1629 11 40 1630 11 41 3256 12 42 3088 12 43 3257 12 44 6179 13 45 12357 14 46 24713 15 47 49424 16 48 3163208 22 49 3163209 22 50 3163210 22 51 3163211 22 52 3163212 22 53 3163213 22 54 3163214 22 55 3163215 22 56 3163216 22 57 3163217 22 58 3163218 22 59 3163219 22 60 3163220 22 61 3163221 22 62 3163222 22 63 3163223 22 64 3163224 22 65 3163225 22 66 3163226 22 67 3163227 22 68 3163228 22 69 3163229 22 70 3163230 22 71 3163231 22 72 3163232 22 73 3163233 22 74 3163234 22 75 3163235 22 76 3163236 22 77 3163237 22 78 3163238 22 79 3163239 22 80 3163240 22 81 3163241 22 82 3163242 22 83 3163243 22 84 3163244 22 85 3163245 22 86 3163246 22 87 3163247 22 88 3163248 22 89 3163249 22 90 3163250 22 91 3163251 22 92 3163252 22 93 3163253 22 94 3163254 22 95 3163255 22 96 3163256 22 97 3163257 22 98 3163258 22 99 3163259 22 100 3163260 22 101 3163261 22 102 3163262 22 103 3163263 22 104 6326400 23 105 6326401 23 106 6326402 23 107 6326403 23 108 6326404 23 109 6326405 23 110 6326406 23 111 6326407 23 112 6326408 23 113 6326409 23 114 6326410 23 115 6326411 23 116 6326412 23 117 6326413 23 118 6326414 23 ESCAPE 6326415 23

(76) 2. High-motion Tables

(77) TABLE-US-00007 TABLE 7 High-motion Luminance DC Differential VLC Table DC Differential VLC Codeword VLC Size 0 2 2 1 3 2 2 3 3 3 2 4 4 5 4 5 1 5 6 3 5 7 8 5 8 0 6 9 5 6 10 13 6 11 15 6 12 19 6 13 8 7 14 24 7 15 28 7 16 36 7 17 4 8 18 6 8 19 18 8 20 50 8 21 59 8 22 74 8 23 75 8 24 11 9 25 38 9 26 39 9 27 102 9 28 116 9 29 117 9 30 20 10 31 28 10 32 31 10 33 29 10 34 43 11 35 61 11 36 413 11 37 415 11 38 84 12 39 825 12 40 824 12 41 829 12 42 171 13 43 241 13 44 1656 13 45 242 13 46 480 14 47 481 14 48 340 14 49 3314 14 50 972 15 51 683 15 52 6631 15 53 974 15 54 6630 15 55 1364 16 56 1951 16 57 1365 16 58 3901 17 59 3895 17 60 3900 17 61 3893 17 62 7789 18 63 7784 18 64 15576 19 65 15571 19 66 15577 19 67 31140 20 68 996538 25 69 996532 25 70 996533 25 71 996534 25 72 996535 25 73 996536 25 74 996537 25 75 996539 25 76 996540 25 77 996541 25 78 996542 25 79 996543 25 80 1993024 26 81 1993025 26 82 1993026 26 83 1993027 26 84 1993028 26 85 1993029 26 86 1993030 26 87 1993031 26 88 1993032 26 89 1993033 26 90 1993034 26 91 1993035 26 92 1993036 26 93 1993037 26 94 1993038 26 95 1993039 26 96 1993040 26 97 1993041 26 98 1993042 26 99 1993043 26 100 1993044 26 101 1993045 26 102 1993046 26 103 1993047 26 104 1993048 26 105 1993049 26 106 1993050 26 107 1993051 26 108 1993052 26 109 1993053 26 110 1993054 26 111 1993055 26 112 1993056 26 113 1993057 26 114 1993058 26 115 1993059 26 116 1993060 26 117 1993061 26 118 1993062 26 ESCAPE 1993063 26

(78) TABLE-US-00008 TABLE 8 High-motion Chroma DC Differential VLC Table DC Differential VLC Codeword VLC Size 0 0 2 1 1 2 2 4 3 3 7 3 4 11 4 5 13 4 6 21 5 7 40 6 8 48 6 9 50 6 10 82 7 11 98 7 12 102 7 13 166 8 14 198 8 15 207 8 16 335 9 17 398 9 18 412 9 19 669 10 20 826 10 21 1336 11 22 1596 11 23 1598 11 24 1599 11 25 1654 11 26 2675 12 27 3194 12 28 3311 12 29 5349 13 30 6621 13 31 10696 14 32 10697 14 33 25565 15 34 13240 14 35 13241 14 36 51126 16 37 25560 15 38 25567 15 39 51123 16 40 51124 16 41 51125 16 42 25566 15 43 51127 16 44 51128 16 45 51129 16 46 102245 17 47 204488 18 48 13087304 24 49 13087305 24 50 13087306 24 51 13087307 24 52 13087308 24 53 13087309 24 54 13087310 24 55 13087311 24 56 13087312 24 57 13087313 24 58 13087314 24 59 13087315 24 60 13087316 24 61 13087317 24 62 13087318 24 63 13087319 24 64 13087320 24 65 13087321 24 66 13087322 24 67 13087323 24 68 13087324 24 69 13087325 24 70 13087326 24 71 13087327 24 72 13087328 24 73 13087329 24 74 13087330 24 75 13087331 24 76 13087332 24 77 13087333 24 78 13087334 24 79 13087335 24 80 13087336 24 81 13087337 24 82 13087338 24 83 13087339 24 84 13087340 24 85 13087341 24 86 13087342 24 87 13087343 24 88 13087344 24 89 13087345 24 90 13087346 24 91 13087347 24 92 13087348 24 93 13087349 24 94 13087350 24 95 13087351 24 96 13087352 24 97 13087353 24 98 13087354 24 99 13087355 24 100 13087356 24 101 13087357 24 102 13087358 24 103 13087359 24 104 26174592 25 105 26174593 25 106 26174594 25 107 26174595 25 108 26174596 25 109 26174597 25 110 26174598 25 111 26174599 25 112 26174600 25 113 26174601 25 114 26174602 25 115 26174603 25 116 26174604 25 117 26174605 25 118 26174606 25 ESCAPE 26174607 25

(79) C. Computing DC Predictors

(80) The quantized DC value for a current block is obtained by adding a DC predictor to the DC differential. The DC predictor is obtained from one of the previously decoded adjacent blocks, which may be labeled candidate predictors A (from the block immediately above and to the left of the current block), B (from the block immediately above the current block), and C (from the block immediately to the left of the current block). The values for A, B and C are the quantized DC values for the respective adjacent blocks.

(81) In some cases there are missing adjacent blocks. If the current block is in the first block row of the frame, there are no A or B (and possibly no C). If the current block is in the first block column in the frame, there are no A and C (and possibly no B) blocks. For these cases the DC predictor is set to:
DCPredictor=(1024+(DCStepSize>>1))/DCStepSize,
where DCStepSize is a value described below.

(82) Otherwise, a prediction direction is formed based on the values of A, B and C, and either the B or C predictor is chosen. The prediction direction is calculated as follows. If the absolute value of (A−B) is less than or equal to the absolute value of (A−C), then the prediction is made from the left (C is the predictor). Otherwise, the prediction is made from the top (B is the predictor).

(83) The quantized DC coefficient is then calculated by adding the DC differential and the DC predictor as follows:
DCCoeffQ=DCPredictor+DCDifferential

(84) D. Inverse-Quantization for Baseline I-Frame Pictures

(85) In each macroblock of a picture frame, the decoder decodes a DC coefficient and set of AC coefficients, which were each quantized at the encoder. These quantized transform coefficients are dequantized for a baseline I-Frame picture as described below.

(86) 1. DC Inverse-Quantization

(87) The quantized DC coefficient (DCCoeffQ) is reconstructed by performing the following de-quantization operation:
DCCoefficient=DCCoeffQ*DCStepSize

(88) The value of DCStepSize is based on the value of PQUANT as follows:

(89) For PQUANT equal to 1 or 2:
DCStepSize=2*PQUANT

(90) For PQUANT equal to 3 or 4:
DCStepSize=8
For PQUANT greater than or equal to 5:
DCStepSize=PQUANT/2+6

(91) 2. Inverse AC Coefficient Quantization

(92) AC coefficients are separately decoded. Depending on whether the 3-QP or 5-QP deadzone quantizer is used, the non-zero quantized AC coefficients are inverse quantized according to the following formula:
dequant_coeff=quant_coeff*double_quant(if 3-QP deadzone quantizer), or
dequant_coeff=quant_coeff*double_quant+sign(quant_coeff)*quant_scale (if 5-QP deadzone quantizer)

(93) where:

(94) quant_coeff is the quantized coefficient

(95) dequant_coeff is the inverse quantized coefficient

(96) double_quant=2*PQUANT+HalfStep

(97) quant_scale=PQUANT

(98) PQUANT is encoded in the picture layer as described above. HalfStep is encoded in the picture layer as via the HALFQP element as described above.

V. Signaling for DC Coefficients with Small Quantization Step Sizes, Theory

(99) In the implementation described in detail above, the range for differential DC coefficients becomes larger as the quantization step size becomes smaller. For example, the range for a quantization step size of 2 is twice as large as the range for a quantization step size of 4. Further, the range for quantization step size of 1 is four times the range for quantization step size of 4. A VLC table used to directly encode/decode the differential DC coefficient for such small step sizes would need to be very large and would impose excessive memory requirements in some cases (e.g., in small footprint devices). Further, as the lowest quantization step sizes are infrequently or rarely used in practical encoding scenarios, the cost of this additional memory requirement would not be justified.

(100) The problem of excessively large VLC tables for very small quantization sizes is addressed in this implementation by designing the VLC tables to accommodate the range of differential DC coefficients when the quantization step size is 4. Then, for smaller quantization step sizes (e.g., 1 and 2), a multistage approach is used to signal the differential. DC coefficient. More specifically, at a quantization step size of 2, a standard VLC table is used to decode a base VLC for the differential DC coefficient. An additional 1-bit code is also decoded, and this is used to refine the value of the differential DC coefficient. At a quantization step size of 1, a standard VLC table again is used to decode a base VLC for the differential DC coefficient. An additional 2-bit code is also decoded and used to refine the value of the differential DC coefficient.

(101) When the base VLC represents the escape code, a further FLC is used to signal the differential DC coefficient. The size of the FLC changes with the quantization step size. For example, the FLC is 8 bits for quantization steps sizes over 2, and 9 and 10 bits for quantization step sizes of 2 and 1, respectively. This reduces bit rate for the escape code FLCs for higher quantization step sizes.

(102) Having described and illustrated the principles of our invention, it will be recognized that the various embodiments can be modified in arrangement and detail without departing from such principles. It should be understood that the programs, processes, or methods described herein are not related or limited to any particular type of computing environment, unless indicated otherwise. Various types of general purpose or specialized computing environments may be used with or perform operations in accordance with the teachings described herein. Elements of embodiments shown in software may be implemented in hardware and vice versa.

(103) In view of the many possible embodiments to which the principles of our invention may be applied, we claim as our invention all such embodiments as may come within the scope and spirit of the following claims and equivalents thereto.