WO1999005649A1 - Adaptive entropy encoding/decoding - Google Patents

Adaptive entropy encoding/decoding Download PDF

Info

Publication number
WO1999005649A1
WO1999005649A1 PCT/JP1998/003290 JP9803290W WO9905649A1 WO 1999005649 A1 WO1999005649 A1 WO 1999005649A1 JP 9803290 W JP9803290 W JP 9803290W WO 9905649 A1 WO9905649 A1 WO 9905649A1
Authority
WO
WIPO (PCT)
Prior art keywords
blocks
level
run
bitstream
dimensional array
Prior art date
Application number
PCT/JP1998/003290
Other languages
French (fr)
Inventor
Thiow Keng Tan
Sheng Mei Shen
Original Assignee
Matsushita Electric Industrial Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co., Ltd. filed Critical Matsushita Electric Industrial Co., Ltd.
Publication of WO1999005649A1 publication Critical patent/WO1999005649A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/005Statistical coding, e.g. Huffman, run length coding

Definitions

  • the present invention relates to a method for multi state variable length coding of multi zoned quantized DCT coefficients and apparatus therefor, which is useful in the field of digital still image and video coding where the data compression is achieved by transform coding.
  • This technology will be used in next generation digital products such digital cameras and video recorders.
  • the compression of the input signal is achieved by transforming the spatial domain information into an alternate domain such as the discrete cosine transform, DCT.
  • Figure 1 illustrates the block diagram of a typical transform coder.
  • the input is operated in blocks for processing.
  • a macroblock structure of six blocks is used. This comprises of four luminance blocks and two chrominance blocks.
  • a block size of 8 pixels wide by 8 pixels high is normally used due to the limitations in implementation of larger DCT transform operations.
  • intra frame coding the blocks are processed directly.
  • inter frame coding the blocks are first motion compensated by subtracting the motion compensated prediction formed in unit 8.
  • the input or the prediction difference blocks are then passed to the DCT unit 1, where they are transformed into the DCT domain.
  • These DCT coefficients are then passed to the Quantization (Q) unit 2, where a quantization process reduces the resolution of the coefficients.
  • Q Quantization
  • VLC Variable Length Coding
  • VLD Variable Length Decoding
  • IQ Inverse Quantization
  • IDCT Inverse Discrete Cosine Transform
  • the reconstructed blocks are then placed into the frame memory unit 12, where the output image is obtained.
  • the encoder there is a duplication of units 10, 11, 12 and 13. These are collectively referred to as the local decoder which mimics the operations of the decoder.
  • the picture in the frame memory unit 7, is used for the motion compensation of the next picture.
  • the motion vectors are estimated in the motion detection unit 9.
  • the motion compensation unit 8, uses these information to form the motion compensated prediction.
  • the transform operation compacts the energy of the information into several key DCT coefficients. These coefficients are then quantized into levels to reduce the information further. The quantized levels are then zig-zag scanned and the run-level event coded by variable length coding.
  • the variable length coding part relies on entropy coding techniques to compress the information. This process is lossless.
  • Figure 2 further shows the detail process of the variable length coding.
  • the macroblock is passed to the Coded Block Pattern unit 21, where the blocks are checked to determine if they contain non-zero coefficients. This information is coded in a coded representation within the bitstream.
  • the blocks that contain non-zero coefficients are then passed to the Zig-Zag Scan unit 22, where the coefficients in the two dimensional array is scanned into a one dimensional array using the order of the zig-zag scan as shown in figure 4.
  • the one dimensional array of coefficients are then passed to the Run Level Event Scanning unit 23, where the individual coefficients are grouped into events comprising of an initial run of zero or more consecutive zero coefficients terminated by a nonzero coefficients referred to as level. These events are then entropy coded using the Variable Length Coding unit 24, and the binary representation of the events placed in the bitstream.
  • the run and level events are entropy coded to reduce the number of bits required to represent them.
  • the efficiency of the entropy coding depends on the probability of occurrence of each event. The higher the entropy (the more flat the probability distribution of the events), the lower the efficiency. Therefore the goal is to obtain probability distributions where a few events occur very frequently while others hardly occur.
  • all the events are coded using the same variable length table. The table has to represent all possible events. In a large block there are events with long runs and small levels as well as short run and big levels. The probability distribution of the events is rather flat and not concentrated on a few events.
  • the problem to be solve is how to group the information into events that have probability distribution that are skewed is such a way that it would improve the entropy coding gain.
  • This disclosure improves the coding efficiency of the variable length coding of the coefficients in a block based transform coder.
  • the improvement above is achieved by the following means.
  • the events to be coded occur at different locations in the block. It is well known that the DCT coefficients are mainly packed into the lower coefficients. This means that events with short runs and large levels usually occur at the beginning of the scan and events with long runs and small levels usually occur at the end of the scan. Therefore a means of solving the above problem is to have several tables that are designed so that they contain only the events that have higher probabilities during that state of the scan.
  • the event to be encoded now carries not only the run and level information but also the information that tells the state such that the appropriate table is used for the next entropy coding. Since the information that tells the table to be used is for the next event, the table to be used for the first event is unknown. Therefore in this invention it is necessary to send an additional information prior to the first event called the initial state pattern that indicates the initial table to be used.
  • the zig-zag scan does not capture the clustering of the coefficients in an efficient manner. Therefore the block is further segmented into smaller units called zones. As different zones have different energy content, the tables are designed such that they match the events of the zones.
  • Figure 1 is a block diagram of a typical transform coder and decoder according to the prior art.
  • Figure 2 is a block diagram of a variable length coding unit according to the prior art.
  • Figure 3 is a block diagram of a multi-state, multi-zone variable length coding apparatus according to the present invention.
  • Figure 4 is a diagram showing a zig-zag scan pattern of a macroblock.
  • Figure 5 is a diagram showing another scan pattern of a macroblock.
  • Figure 6 is a block diagram of a multi-state, multi-zone variable length decoding apparatus according to the present invention.
  • Figure 7 is a flow chart showing steps for coding a macroblock.
  • Figure 8 is a flow chart showing steps for coding a zone in the macroblock.
  • Figure 9 is a diagram of a bitstream of an intra coded macroblock data.
  • Figure 10 is a diagram of a bitstream of an inter coded macroblock data.
  • the invention is based on the entropy coding and decoding of the quantized transform coding.
  • Figure 3 illustrates an apparatus for a multi state variable length coding of multi zoned quantized DCT coefficients, according to the present invention.
  • This apparatus is included in the VLC block in Figure 1.
  • the macroblock containing blocks of quantized levels of DCT coefficients is first passed to the Coded Block Pattern unit 31, where the blocks are checked to determine if they contain non-zero coefficients. This information is coded in a coded representation within the bitstream.
  • the blocks that contain non-zero coefficients are then passed to the zone partitioning and zone scanning unit 32, where the coefficients in the two dimensional array is partitioned in groups hereafter referred to as zones.
  • the zones are shown in Figure 5.
  • Zone 1 is a horizontal zone covering positions 1-7.
  • Zone 2 is a vertical zone covering positions 8-14.
  • Zone 3 is a first diagonal zone covering positions 15-42.
  • Zone 4 is a second diagonal zone covering positions 43-63.
  • the coefficients in each zone are then scanned into one-dimensional arrays.
  • the position numbers shown in Figure 5 also indicates the order of the scan.
  • the one- dimensional arrays of coefficients are then passed to the initial state pattern and next state unit 33, where the monotonic states of the coefficients are determined based on the subsequent coefficients within the zone.
  • the initial states of all the zones are then gathered in this unit . to form the initial state pattern.
  • the initial state pattern is coded in a coded representation within the bitstream.
  • the one-dimensional arrays of coefficients and states are then passed to the run level next event scanning unit 34, where the individual coefficients are grouped into events comprising of the triplet (RUN, LEVEL, NEXT).
  • the run indicates zero or more consecutive zero coefficients terminated by a nonzero coefficients referred to as level.
  • Next refers to the state of the next event.
  • These events are then entropy coded using the variable length coding unit 35, and the binary representation of the events placed in the bitstream.
  • the triplets from each zone is encoded by several tables. The choice of the first table to use is determined by the initial state pattern. The choice of the subsequent tables to use is determined by the next state encoded in the last encoded event.
  • Figure 6 illustrates an apparatus for a multi state variable length decoding of multi zoned quantized DCT coefficients, according to the present invention. This apparatus is included in the VLD block in Figure 1.
  • the bitstream received in the decoder is passed to the coded block pattern decoder unit 41, where the coded representation of the information regarding which blocks in the macroblock that have non-zero coefficients is extracted.
  • the process then continues with the initial state pattern decoder unit 42, where the coded representation of the information regarding the initial states of each zone is extracted. Using this initial state information the process then proceed to decode the variable length codes of the (RUN, LEVEL, NEXT) triplets in variable length decoding unit 43.
  • the zero and the non-zero quantized levels are passed to the Inverse zone scanning and block forming unit 45, where the block of two-dimensional quantized level is reconstructed. This process is repeated for the rest of the blocks that are coded to give the macroblock.
  • the same structure is used for all types of pictures whether they are full pictures (intra coded) or residual pictures (motion compensated pictures of inter coded). Blocks in intra coded pictures are referred to as l-Blocks and blocks in motion compensated pictures are referred to as P-Blocks or B-Blocks.
  • the coded block pattern consists of a symbol that indicate which of the six blocks in the macroblock contain non-zero coefficients. This symbol is sometimes separated into two parts: the coded block pattern for the luminance blocks and the coded block pattern for the chrominance blocks.
  • the VLC for a typical CBPY is in the following Table 1.
  • the symbol of the chrominance Coded Block Pattern is a two bit unsigned integer (b 5 b 6 ).
  • the bit b j 1, if the i-th block has at least one non-zero coefficients, otherwise b
  • 0.
  • the (CBPC) is typically coded together with the macroblock type symbol.
  • the l-Block structure is new. It comprises of a DC component and four zones, zone 1 to zone 4.
  • the DC component (INTRADC) is encoded separately from the rest of the coefficients. It is coded using two quantities. The first indicates the size of the DC component and the second indicates its value.
  • the coding of the four zones is new. A zone is present if indicated by initial state pattern.
  • the DCT coefficients in an 8x8 intra block are divided into DC and four zones.
  • the coefficients in each zone are scanned into a one-dimensional array in the order as shown in Figure 5.
  • the four zone scanning is used to match the instantaneous power of an 8x8 DCT coefficient block. By matching the instantaneous power instead of the average power as in Zig-Zag Scan, the coding efficiency is improved.
  • the P- or B-Block structure consists of a single zone including positions 0-63, as shown in Fig. 4. This zone is zig-zag scanned in the scan order as given by the position numbers shown in Fig. 4.
  • the decoder After decoding the DC information, the decoder then checks the coded block pattern. If the block is coded then it extracts the initial state pattern (ISP) from the bitstream. Using this initial state pattern information the decoder then proceeds to extract the information for the events in the zones that are present, as indicated by the ISP, using the appropriate tables.
  • ISP initial state pattern
  • the decoder decodes the initial state pattern and then the zone using the appropriate tables.
  • Figure 7 shows a flowchart of the steps carried out by the above syntax, which is for decoding a block. The steps in Figure 7 are described below.
  • step #1 it is detected whether the block is an intra block.
  • step #2 since the block is not an intra block, but is an inter block, an initial state pattern for inter block is decoded.
  • step #3 a zone is decoded.
  • step #4 since the block is an intra block, it is detected whether the block is a luminance block or a chrominance block.
  • step #5 since the block is a luminance block, the DC size of the luminance is decoded using a table.
  • step #6 it is detected whether or not the DC size of the luminance is greater than zero. If the DC size is equal to zero, program advances to step #11.
  • step #7 since the DC size of the luminance is greater than zero, a DC differential value is decoded.
  • step #8 since the block is a chrominance block, the DC size of the chrominance is decoded using a table.
  • step #9 it is detected whether or not the DC size of the chrominance is greater than zero. If the DC size is equal to zero, program advances to step #11.
  • step #10 since the DC size of the chrominance is greater than zero, a DC differential value is decoded.
  • step #11 it is detected whether or not a block is coded. If not, the program ends.
  • step #12 since the block is coded, initial state pattern for intra block is decoded.
  • step #13 it is detected whether or not the initial state pattern of the zone is coded. If not coded, the program goes to step #15.
  • step #14 since the initial state pattern of the zone is coded, a zone is decoded.
  • step #15 it is detected whether or not all the zones are decoded. If yes, the program goes to end, and if not, the program returns to step #13.
  • Steps #3 and #14 are each for decoding a zone, and the detail thereof is described later in connection with Figure 8.
  • the initial state pattern for l-blocks is given by the symbol (s ⁇ SaS ⁇ .
  • the initial state of zone j ISPi[j] is given by s r
  • a state of 0 indicates that the zone contains all zeros and is not coded.
  • Zones 1 and 2 that contain nonzero coefficients can begin in state 1, 2 or 3.
  • Zones 3 and 4 that contain non-zero coefficients can begin n state 1 or 2.
  • VLC variable length codes
  • Table 2 VLC table for Initial State Pattern for l-Blocks.
  • the initial state pattern for P-blocks and B-Blocks is given by the symbol (s .
  • a state of 0 indicates that the zone contains all zeros and is not coded otherwise the zone contains non-zero coefficients and can begin in state 1, 2 or 3.
  • VLC variable length codes
  • Table 3 VLC table for Initial State Pattern for P-Blocks and B-Blocks.
  • the coefficients in each zone are encoded by using multiple 3D VLC tables.
  • the 3D symbols in each VLC table have the following form:
  • RUN is used to indicate the number of initial zero coefficients and LEVEL is used to indicate the level of the coefficient that terminates the zeros.
  • NEXT is used to indicate which VLC table should be used to encode or decode the next 3D symbol.
  • a series of (RUN,, LEVEL,) pair is generated by scanning the DCT blocks. Then NEXT, is determined as follows. If there are n pairs in a zone,
  • BOUNDi represents the amount of the maximum coefficient found in the zone.
  • (s 1 , s2, s3, s4) is (3, 1, 2, 2), and this combination is searched in Table 2 to obtain the corresponding VLC.
  • the combination (3, 1, 2, 2) is found at 125 th row to obtain VLC (111110011).
  • This VLC (111110011) represents the initial state pattern ISPi, and is stored in block 54c in Fig. 9 as ISPi. The steps for using the initial state pattern ISPi during the decoding process is described.
  • ISPi is read.
  • ISPi (111110011) is read.
  • a row with (111110011) is found under VLC in Table 2 to obtain (s1, s2, s3, s4) is (3, 1, 2, 2).
  • the first data 3 is used for selecting an appropriate Table for translating the first data in the horizontal zone 1.
  • the second data 1 is used for selecting an appropriate Table for translating the first data in the vertical zone 2.
  • the third data 2 is used for selecting an appropriate Table for translating the first data in the diagonal zone 3.
  • the fourth data 2 is used for selecting an appropriate Table for translating the first data in the diagonal zone 4.
  • Zone 1 and 2 jointly use three VLC tables corresponding to three states, while Zone 3 and Zone 4 shared two VLC tables corresponding to two states.
  • the inter DCT has only Zone 1 with three VLC tables corresponding to three states.
  • the first symbol (NEXT,, RUN,, LEVEL,) is encoded by the VLC table indicated by the Initial State Pattern, ISPi.
  • the next symbol is encoded by the state NEXTi.., VLC table.
  • For intra DCT symbols in Zone 1 and 2 (NEXT,, RUN,, LEVEL,) is encoded by the VLC tables in Tables 9-11.
  • For intra DCT symbols in Zone 3 and 4 (NEXT,, RUN,, LEVEL,) is encoded by the state NEXT,.., VLC table in Table 12-13.
  • the first symbol is encoded by the VLC table indicated by the Initial State Pattern, ISPp.
  • the next symbol (NEXT,, RUN,, LEVEL,), is encoded by the state NEXT,., VLC table in Table 14-16.
  • FIG. 8 shows a flowchart of the steps carried out by the above syntax, which is for decoding a zone. The steps in Figure 8 are described below.
  • step #21 it is detected whether the block is an intra block.
  • step #22 since the block is an intra block, an initial state pattern of the current intra block is set.
  • step #23 it is detected whether the zone is either a horizontal or a vertical zone, or either a first or a second diagonal zone.
  • step #24 since the zone is either a horizontal or a vertical zone, it is further detected whether the state is at the end of zone (EOZ) or not. If the state is at the end of zone, the program ends.
  • EOZ end of zone
  • step #25 since the zone is not at the end of zone, the triplet (RUN, LEVEL, NEXT) for the horizontal/vertical zone is obtained.
  • step #26 the data NEXT is set for decoding the next coefficient, and returns to step #24.
  • step #27 since the zone is either a first or a second diagonal zone, it is further detected whether the state is at the end of zone (EOZ) or not. If the state is at the end of zone, the program ends.
  • EOZ end of zone
  • step #28 since the zone is not at the end of zone, the triplet (RUN, LEVEL, NEXT) for the diagonal zone is obtained.
  • step #29 the data NEXT is set for decoding the next coefficient, and returns to step #27.
  • step #30 since the block is not an intra block, but is an inter block, an initial state pattern of the current inter block is set.
  • step #31 it is detected whether the state is at the end of zone (EOZ) or not. If the state is at the end of zone, the program ends. In step #32, since the zone is not at the end of zone, the triplet (RUN, LEVEL, NEXT) for the inter zone is obtained.
  • step #33 the data NEXT is set for decoding the next coefficient, and returns to step #31.
  • the data NEXT is set for decoding the next coefficient, and returns to step #31.
  • HV_TCOEFF(state, NEXT,, RUN,, LEVEL,) is a 3D VLC for the symbol (NEXT,, RUN,, LEVEL,) from the horizontal-vertical zone intra VLC table indexed by the state.
  • the D_TCOEFF(state, NEXT,, RUN,, LEVEL,) is a 3D VLC for the symbol (NEXT, RUN, LEVEL) from the intra diagonal zone VLC table indexed by the state.
  • TCOEFF (state, NEXT,, RUN,, LEVEL,) is a 3D VLC for the symbol (NEXT,, RUN,, LEVEL,) from the horizontal-vertical zone inter VLC table indexed by the state.
  • the first symbol in each zone is always encoded by the VLC table indicated by the ISP. Subsequent symbols are encoded by other tables indexed by NEXT of the current symbol. Because of the manor that NEXT, is determined, NEXTi is a monotonic non-increasing function of i. This limits how VLC table Transitions can be made.
  • Fig. 9 shows a data structure of a bitstream for an intra macroblock.
  • the bitstream has a plurality of macroblock header information areas 51a and a plurality of macroblock data areas 51b appearing alternately.
  • the macroblock header information area 51a has a macroblock coding type identifier area 52a and a coded block pattern area 52b.
  • the macroblock data area 51b has four luminance block areas 53a, 53b, 53c and 53d, and two chrominance block areas 53e and 53f.
  • the luminance block area 53a has a luminance DC size area 54a, a DC differential value area 54b, an intra block initial state pattern (ISPi) area 54c and four zone data areas 54d, 54e, 54f and 54g.
  • the zone data area 54d is for the horizontal zone
  • the zone data area 54e is for the vertical zone
  • the zone data area 54f is for the first diagonal area
  • the zone data area 54g is for the second diagonal area.
  • a plurality of sections 55 are provided, each section 55 containing RUN, LEVEL and NEXT data.
  • RUN and LEVEL data are used for obtaining a coefficient data using an appropriate table designated by the NEXT data in the previous section 55, or by data in ISPi area 54c if the present section is the first section in the zone.
  • the NEXT data is used for designating an appropriate table to be used in obtaining the coefficient data in the next section.
  • the chrominance block 53f has a chrominance DC size area 56a, a DC differential value area 56b, an intra block initial state pattern (ISPi) area 56c and four zone data areas 56d, 56e, 56f and 56g.
  • the zone data area 56d is for the horizontal zone
  • the zone data area 56e is for the vertical zone
  • the zone data area 56f is for the first diagonal area
  • the zone data area 56g is for the second diagonal area.
  • a plurality of sections 57 are provided, each section 57 containing RUN, LEVEL and NEXT data.
  • RUN and LEVEL data are used for obtaining a coefficient data using an appropriate table designated by the NEXT data in the previous section 57, or by data in ISPi area 56c if the present section is the first section in the zone.
  • the NEXT data is used for designating an appropriate table to be used in obtaining the coefficient data in the next section.
  • chrominance block 53f is constructed in the same arrangement.
  • Fig. 10 shows a data structure of a bitstream for an inter macroblock. As shown in the first row of Fig. 10, the bitstream has a plurality of macroblock header information areas 61a and a plurality of macroblock data areas 61b appearing alternately.
  • the macroblock header information area 61a has a macroblock coding type identifier area 62a, a coded block pattern area 62b, and a motion vectors area 62c.
  • the macroblock data area 61b has four luminance block areas 63a, 63b, 63c and 63d, and two chrominance block areas 63e and 63f.
  • the luminance block area 63a has an inter block initial state pattern (ISPp) area 64a and a zone data area 64b.
  • ISPp inter block initial state pattern
  • the zone data area 64b is for the single zone shown in Fig.
  • each section 65 containing RUN, LEVEL and NEXT data.
  • RUN and LEVEL data are used for obtaining a coefficient data using an appropriate table designated by the NEXT data in the previous section 65, or by data in
  • ISPp area 64a if the present section is the first section in the zone.
  • the NEXT data is used for designating an appropriate table to be used in obtaining the coefficient data in the next section.
  • the escape sequence is a
  • ESC+NEXT+RUN+LEVEL+SIGN where ESC is 10 bits, NEXT is a 2 bit unsigned integer, RUN is a 3 bit unsigned integer, LEVEL is a 2 bits unsigned integer, SIGN is a 1 bit unsigned integer.
  • the escape sequence is a
  • ESC + NEXT + RUN + LEVEL + SIGN where ESC is 6 bits, NEXT is a 2 bit unsigned integer, RUN is a 3 bit unsigned integer, LEVEL is an 8 bit unsigned integer, SIGN is a 1 bit unsigned integer.
  • the escape sequence is a
  • ESC + NEXT + RUN + SIGN where ESC is 10 bits, NEXT is 1 a bit unsigned integer, RUN is a 5 bit unsigned integer, SIGN is a 1 bit unsigned integer.
  • the escape sequence is a
  • ESC+NEXT+RUN+LEVEL+SIGN where ESC is 7 bits, NEXT is a 2 bit unsigned integer, RUN is a 5 bit unsigned integer, LEVEL is an 8 bit unsigned integer, SIGN is a 1 bit unsigned integer.
  • the escape sequence is a
  • ESC + NEXT + RUN + SIGN where ESC is 9 bits, NEXT is a 1 bit unsigned integer, RUN is a 6 bit unsigned integer, SIGN is a 1 bit unsigned integer.
  • the escape sequence is a
  • ESC+NEXT+RUN+LEVEL+SIGN where ESC is 8 bits, NEXT is 2 bit unsigned integer, RUN is a 6 bit unsigned integer, LEVEL is 1 bit unsigned integer, SIGN is a 1 bit unsigned integer.
  • the escape sequence is a
  • ESC+NEXT+RUN+LEVEL+SIGN where ESC is 6 bits, NEXT is a 2 bit unsigned integer, RUN is a 6 bit unsigned integer, LEVEL is a 8 bit unsigned integer, SIGN is a 1 bit unsigned integer.
  • the effect of the invention is the reduction of the bits required to represent the original uncompressed signal. This higher compression achieved would enable products of high compression to be made. It would also all more information to be transmitted over a channel of a fixed bandwidth.

Abstract

The blocks of coefficients are divided into a plurality of zones best fitting the energy distribution of the transform. The coefficients in these zones are then group into triplets comprising of run, level and next symbols. The run symbol indicates the number of consecutive zero coefficients prior to the non-zero coefficients in the scanning order. The level indicates the value of the non-zero coefficient. The next symbol indicates the state of the zone. Each zone has a plurality of states. These states are classified based on the subsequent coefficients in the scan. A separate table is designed for the entropy coding of the triplets in each of the state. Depending on the state of the zone, the appropriate table to use for the variable length coding of the next triplet. Since the state of the zone prior to the decoding of the first triplet is unknown, it is necessary to insert into the bitstream a symbol that indicates the initial state of the zones, which is the Initial State Pattern. The Initial State Pattern indicates the state and the table to be used for the decoding of the first triplet in each zone.

Description

ADAPTIVE ENTROPY ENCODING/DECODING
DESCRIPTION
Technical Field
The present invention relates to a method for multi state variable length coding of multi zoned quantized DCT coefficients and apparatus therefor, which is useful in the field of digital still image and video coding where the data compression is achieved by transform coding. This technology will be used in next generation digital products such digital cameras and video recorders.
Background Art
In still image and video coding methods such as the JPEG and MPEG standards, the compression of the input signal is achieved by transforming the spatial domain information into an alternate domain such as the discrete cosine transform, DCT.
Figure 1 illustrates the block diagram of a typical transform coder. The input is operated in blocks for processing. A macroblock structure of six blocks is used. This comprises of four luminance blocks and two chrominance blocks. A block size of 8 pixels wide by 8 pixels high is normally used due to the limitations in implementation of larger DCT transform operations. In intra frame coding, the blocks are processed directly. In inter frame coding, the blocks are first motion compensated by subtracting the motion compensated prediction formed in unit 8. The input or the prediction difference blocks are then passed to the DCT unit 1, where they are transformed into the DCT domain. These DCT coefficients are then passed to the Quantization (Q) unit 2, where a quantization process reduces the resolution of the coefficients. These coefficients are then passed to the Variable Length Coding (VLC) unit 3, where the quantized coefficients are entropy coded into binary coded representations and packed into the bitstream and transmitted to the decoder. In the decoder the bitstream is passed to the Variable Length Decoding (VLD) unit 4, where the bitstream is unpacked and the binary coded representations are restored to the quantized transform coefficients. These coefficients are passed to the Inverse Quantization (IQ) unit 10, where the coefficients are reconstructed to their original resolution. These coefficients are then passed to the Inverse Discrete Cosine Transform (IDCT) unit 11, where the spatial domain pixels are recovered. In inter coding the step of adding the motion compensated prediction from unit 13, to the blocks is done. The reconstructed blocks are then placed into the frame memory unit 12, where the output image is obtained. In the encoder there is a duplication of units 10, 11, 12 and 13. These are collectively referred to as the local decoder which mimics the operations of the decoder. The picture in the frame memory unit 7, is used for the motion compensation of the next picture. The motion vectors are estimated in the motion detection unit 9. The motion compensation unit 8, uses these information to form the motion compensated prediction.
In the above coding scheme, the transform operation compacts the energy of the information into several key DCT coefficients. These coefficients are then quantized into levels to reduce the information further. The quantized levels are then zig-zag scanned and the run-level event coded by variable length coding. In the above process only the quantization process introduces loss into the coding process. The variable length coding part relies on entropy coding techniques to compress the information. This process is lossless.
Figure 2 further shows the detail process of the variable length coding. The macroblock is passed to the Coded Block Pattern unit 21, where the blocks are checked to determine if they contain non-zero coefficients. This information is coded in a coded representation within the bitstream. The blocks that contain non-zero coefficients are then passed to the Zig-Zag Scan unit 22, where the coefficients in the two dimensional array is scanned into a one dimensional array using the order of the zig-zag scan as shown in figure 4. The one dimensional array of coefficients are then passed to the Run Level Event Scanning unit 23, where the individual coefficients are grouped into events comprising of an initial run of zero or more consecutive zero coefficients terminated by a nonzero coefficients referred to as level. These events are then entropy coded using the Variable Length Coding unit 24, and the binary representation of the events placed in the bitstream.
The above process is repeated for each of the blocks that contain non-zero coefficients. And the total process itself is repeated for all the macroblocks in the picture.
In the prior art described above, the run and level events are entropy coded to reduce the number of bits required to represent them. The efficiency of the entropy coding depends on the probability of occurrence of each event. The higher the entropy (the more flat the probability distribution of the events), the lower the efficiency. Therefore the goal is to obtain probability distributions where a few events occur very frequently while others hardly occur. In the prior art, all the events are coded using the same variable length table. The table has to represent all possible events. In a large block there are events with long runs and small levels as well as short run and big levels. The probability distribution of the events is rather flat and not concentrated on a few events.
Therefore the problem to be solve is how to group the information into events that have probability distribution that are skewed is such a way that it would improve the entropy coding gain.
Disclosure Of Invention This disclosure improves the coding efficiency of the variable length coding of the coefficients in a block based transform coder. The improvement above is achieved by the following means.
The events to be coded (such as the DCT coefficients) occur at different locations in the block. It is well known that the DCT coefficients are mainly packed into the lower coefficients. This means that events with short runs and large levels usually occur at the beginning of the scan and events with long runs and small levels usually occur at the end of the scan. Therefore a means of solving the above problem is to have several tables that are designed so that they contain only the events that have higher probabilities during that state of the scan. In order to allow the classification and the selection of the tables, the event to be encoded now carries not only the run and level information but also the information that tells the state such that the appropriate table is used for the next entropy coding. Since the information that tells the table to be used is for the next event, the table to be used for the first event is unknown. Therefore in this invention it is necessary to send an additional information prior to the first event called the initial state pattern that indicates the initial table to be used.
Furthermore the zig-zag scan does not capture the clustering of the coefficients in an efficient manner. Therefore the block is further segmented into smaller units called zones. As different zones have different energy content, the tables are designed such that they match the events of the zones.
Brief Description Of Drawings
Figure 1 is a block diagram of a typical transform coder and decoder according to the prior art.
Figure 2 is a block diagram of a variable length coding unit according to the prior art.
Figure 3 is a block diagram of a multi-state, multi-zone variable length coding apparatus according to the present invention.
Figure 4 is a diagram showing a zig-zag scan pattern of a macroblock.
Figure 5 is a diagram showing another scan pattern of a macroblock.
Figure 6 is a block diagram of a multi-state, multi-zone variable length decoding apparatus according to the present invention.
Figure 7 is a flow chart showing steps for coding a macroblock.
Figure 8 is a flow chart showing steps for coding a zone in the macroblock.
Figure 9 is a diagram of a bitstream of an intra coded macroblock data. Figure 10 is a diagram of a bitstream of an inter coded macroblock data.
Best Mode for Carrying Out the Invention
The invention is based on the entropy coding and decoding of the quantized transform coding.
Figure 3 illustrates an apparatus for a multi state variable length coding of multi zoned quantized DCT coefficients, according to the present invention. This apparatus is included in the VLC block in Figure 1. The macroblock containing blocks of quantized levels of DCT coefficients is first passed to the Coded Block Pattern unit 31, where the blocks are checked to determine if they contain non-zero coefficients. This information is coded in a coded representation within the bitstream. The blocks that contain non-zero coefficients are then passed to the zone partitioning and zone scanning unit 32, where the coefficients in the two dimensional array is partitioned in groups hereafter referred to as zones. The zones are shown in Figure 5. Zone 1 is a horizontal zone covering positions 1-7. Zone 2 is a vertical zone covering positions 8-14. Zone 3 is a first diagonal zone covering positions 15-42. Zone 4 is a second diagonal zone covering positions 43-63. The coefficients in each zone are then scanned into one-dimensional arrays. The position numbers shown in Figure 5 also indicates the order of the scan. The one- dimensional arrays of coefficients are then passed to the initial state pattern and next state unit 33, where the monotonic states of the coefficients are determined based on the subsequent coefficients within the zone. The initial states of all the zones are then gathered in this unit. to form the initial state pattern. The initial state pattern is coded in a coded representation within the bitstream. The one-dimensional arrays of coefficients and states are then passed to the run level next event scanning unit 34, where the individual coefficients are grouped into events comprising of the triplet (RUN, LEVEL, NEXT). The run indicates zero or more consecutive zero coefficients terminated by a nonzero coefficients referred to as level. Next refers to the state of the next event. These events are then entropy coded using the variable length coding unit 35, and the binary representation of the events placed in the bitstream. In the variable length coding unit the triplets from each zone is encoded by several tables. The choice of the first table to use is determined by the initial state pattern. The choice of the subsequent tables to use is determined by the next state encoded in the last encoded event.
The above process is repeated for each of zones that contain non-zero coefficients. This in turn is repeated for each of the blocks that contain non-zero zones. And the total process itself is repeated for all the macroblocks in the picture.
Figure 6 illustrates an apparatus for a multi state variable length decoding of multi zoned quantized DCT coefficients, according to the present invention. This apparatus is included in the VLD block in Figure 1.
The bitstream received in the decoder is passed to the coded block pattern decoder unit 41, where the coded representation of the information regarding which blocks in the macroblock that have non-zero coefficients is extracted. The process then continues with the initial state pattern decoder unit 42, where the coded representation of the information regarding the initial states of each zone is extracted. Using this initial state information the process then proceed to decode the variable length codes of the (RUN, LEVEL, NEXT) triplets in variable length decoding unit 43.
These codes are then translated in the run level next event translator unit 44, to give the appropriate number of zeros, the non-zero quantized level and the state of the next triplet. The state of the next triplet is used by the variable length decoding unit to decode the next variable length code from the bitstream. This process is repeated for all zones within the block that are coded.
The zero and the non-zero quantized levels are passed to the Inverse zone scanning and block forming unit 45, where the block of two-dimensional quantized level is reconstructed. This process is repeated for the rest of the blocks that are coded to give the macroblock. The same structure is used for all types of pictures whether they are full pictures (intra coded) or residual pictures (motion compensated pictures of inter coded). Blocks in intra coded pictures are referred to as l-Blocks and blocks in motion compensated pictures are referred to as P-Blocks or B-Blocks. (1) Coded Block Pattern
The coded block pattern consists of a symbol that indicate which of the six blocks in the macroblock contain non-zero coefficients. This symbol is sometimes separated into two parts: the coded block pattern for the luminance blocks and the coded block pattern for the chrominance blocks. The symbol of the luminance Coded Block Pattern (CBPY) is a four bit unsigned integer (b1b2b3b4). The bit b, = 1, if the i-th block has at least one non-zero coefficients, otherwise b, = 0. The VLC for a typical CBPY is in the following Table 1.
Figure imgf000013_0001
Figure imgf000014_0001
Table 1 VLC table for CBPY.
The symbol of the chrominance Coded Block Pattern (CBPC) is a two bit unsigned integer (b5b6). The bit bj = 1, if the i-th block has at least one non-zero coefficients, otherwise b| = 0. The (CBPC) is typically coded together with the macroblock type symbol. (2) Block and Zone
The l-Block structure is new. It comprises of a DC component and four zones, zone 1 to zone 4. The DC component (INTRADC) is encoded separately from the rest of the coefficients. It is coded using two quantities. The first indicates the size of the DC component and the second indicates its value. The coding of the four zones is new. A zone is present if indicated by initial state pattern. The DCT coefficients in an 8x8 intra block are divided into DC and four zones. The coefficients in each zone are scanned into a one-dimensional array in the order as shown in Figure 5. The four zone scanning is used to match the instantaneous power of an 8x8 DCT coefficient block. By matching the instantaneous power instead of the average power as in Zig-Zag Scan, the coding efficiency is improved.
The P- or B-Block structure consists of a single zone including positions 0-63, as shown in Fig. 4. This zone is zig-zag scanned in the scan order as given by the position numbers shown in Fig. 4.
The following pseudo-c syntax illustrates the coded representation of the bitstream that describes the block.
When decoding the information of the i-th block, the decoder checks to see if the current block being decoded is and intra coded block. If it is, the decoder then checks to see if the block is a luminance (i<4) or a chrominance (i > = 4) block. It then extracts the DC size and differential value based on the appropriate luminance or chrominance table.
After decoding the DC information, the decoder then checks the coded block pattern. If the block is coded then it extracts the initial state pattern (ISP) from the bitstream. Using this initial state pattern information the decoder then proceeds to extract the information for the events in the zones that are present, as indicated by the ISP, using the appropriate tables.
In the case where the block is not an l-block, the decoder decodes the initial state pattern and then the zone using the appropriate tables.
Syntax No. of bits Mnemonic
Figure imgf000016_0001
Figure 7 shows a flowchart of the steps carried out by the above syntax, which is for decoding a block. The steps in Figure 7 are described below.
In step #1, it is detected whether the block is an intra block.
In step #2, since the block is not an intra block, but is an inter block, an initial state pattern for inter block is decoded.
In step #3, a zone is decoded.
In step #4, since the block is an intra block, it is detected whether the block is a luminance block or a chrominance block.
In step #5, since the block is a luminance block, the DC size of the luminance is decoded using a table.
In step #6, it is detected whether or not the DC size of the luminance is greater than zero. If the DC size is equal to zero, program advances to step #11.
In step #7, since the DC size of the luminance is greater than zero, a DC differential value is decoded.
In step #8, since the block is a chrominance block, the DC size of the chrominance is decoded using a table.
In step #9, it is detected whether or not the DC size of the chrominance is greater than zero. If the DC size is equal to zero, program advances to step #11.
In step #10, since the DC size of the chrominance is greater than zero, a DC differential value is decoded.
In step #11, it is detected whether or not a block is coded. If not, the program ends.
In step #12, since the block is coded, initial state pattern for intra block is decoded. In step #13, it is detected whether or not the initial state pattern of the zone is coded. If not coded, the program goes to step #15.
In step #14, since the initial state pattern of the zone is coded, a zone is decoded. In step #15, it is detected whether or not all the zones are decoded. If yes, the program goes to end, and if not, the program returns to step #13.
Steps #3 and #14 are each for decoding a zone, and the detail thereof is described later in connection with Figure 8. (3) Initial State Pattern for l-Blocks
The initial state pattern for l-blocks (ISPi) is given by the symbol (s^SaS^. The initial state of zone j ISPi[j] is given by sr A state of 0 indicates that the zone contains all zeros and is not coded. Zones 1 and 2 that contain nonzero coefficients can begin in state 1, 2 or 3. Zones 3 and 4 that contain non-zero coefficients can begin n state 1 or 2. The index is calculated by the following formula, index = 36s! + 9s2 + 3s3 + s4.
The following table gives the variable length codes (VLC) associated with each possible ISPi.
Figure imgf000018_0001
Figure imgf000019_0001
Figure imgf000020_0001
Figure imgf000021_0001
Table 2 VLC table for Initial State Pattern for l-Blocks.
(4) Initial State Pattern for P-Blocks and B-Blocks
The initial state pattern for P-blocks and B-Blocks (ISPp) is given by the symbol (s . A state of 0 indicates that the zone contains all zeros and is not coded otherwise the zone contains non-zero coefficients and can begin in state 1, 2 or 3. The following table gives the variable length codes (VLC) associated with each possible ISPp.
Figure imgf000021_0002
Table 3 VLC table for Initial State Pattern for P-Blocks and B-Blocks.
(5) Zone
The coefficients in each zone are encoded by using multiple 3D VLC tables. The 3D symbols in each VLC table have the following form:
NEXT RUN LEVEL
RUN is used to indicate the number of initial zero coefficients and LEVEL is used to indicate the level of the coefficient that terminates the zeros. NEXT is used to indicate which VLC table should be used to encode or decode the next 3D symbol.
A series of (RUN,, LEVEL,) pair is generated by scanning the DCT blocks. Then NEXT, is determined as follows. If there are n pairs in a zone,
{(RUN,, LEVEL, )| i = 1,..,n}, the state transition, NEXT, is computed in two steps. First, the least upper bound on {LEVELk | k = i + 1,...,n} is computed recursively by
BOUND, = max (LEVELI + 1, BOUND, + 1), i = n-1, ..., 1. with BOUNDn = 0. Then BOUND, is converted to NEXT, by using Table 4-5 for intra blocks and Table 6 for inter blocks.
Figure imgf000022_0001
Table 4. Conversion table for horizontal-vertical (zone 1 and 2) intra DCT symbols.
Figure imgf000022_0002
Table 5. Conversion table for diagonal (zone 3 and 4) intra DCT symbols.
Figure imgf000023_0001
Table 6. Conversion table for inter DCT symbols.
As apparent from the above, BOUNDi represents the amount of the maximum coefficient found in the zone.
The steps for obtaining the initial state pattern ISPi during the coding process is described.
In the horizontal zone 1, if the maximum, BOUNDi, of the coefficients contained therein is 15, NEXTi = 3 is obtained from Table 4. In the vertical zone 2, if the maximum, BOUNDi, of the coefficients contained therein is 15, NEXTi = 3 is obtained from Table 4. In the diagonal zone 3, if the maximum, BOUNDi, of the coefficients contained therein is 12, NEXTi = 2 is obtained from Table 5. In the diagonal zone 4, if the maximum, BOUNDi, of the coefficients contained therein is 23, NEXTi = 2 is obtained from Table 5. These four values of NEXTi are used as s1, s2, s3, s4 in Table 2. In the above example, (s 1 , s2, s3, s4) is (3, 1, 2, 2), and this combination is searched in Table 2 to obtain the corresponding VLC. In Table 2, the combination (3, 1, 2, 2) is found at 125th row to obtain VLC (111110011). This VLC (111110011) represents the initial state pattern ISPi, and is stored in block 54c in Fig. 9 as ISPi. The steps for using the initial state pattern ISPi during the decoding process is described.
First, from the block 54c in Fig. 9, ISPi is read. According to the above example, ISPi (111110011) is read. Then, a row with (111110011) is found under VLC in Table 2 to obtain (s1, s2, s3, s4) is (3, 1, 2, 2).
The first data 3 is used for selecting an appropriate Table for translating the first data in the horizontal zone 1. The second data 1 is used for selecting an appropriate Table for translating the first data in the vertical zone 2. The third data 2 is used for selecting an appropriate Table for translating the first data in the diagonal zone 3. The fourth data 2 is used for selecting an appropriate Table for translating the first data in the diagonal zone 4.
To reduce the number of intra DCT VLC entries, Zone 1 and 2 jointly use three VLC tables corresponding to three states, while Zone 3 and Zone 4 shared two VLC tables corresponding to two states. In contrast, the inter DCT has only Zone 1 with three VLC tables corresponding to three states. The first symbol (NEXT,, RUN,, LEVEL,) is encoded by the VLC table indicated by the Initial State Pattern, ISPi. The next symbol is encoded by the state NEXTi.., VLC table. For intra DCT symbols in Zone 1 and 2, (NEXT,, RUN,, LEVEL,) is encoded by the VLC tables in Tables 9-11. For intra DCT symbols in Zone 3 and 4, (NEXT,, RUN,, LEVEL,) is encoded by the state NEXT,.., VLC table in Table 12-13.
Similarly for inter DCT, the first symbol is encoded by the VLC table indicated by the Initial State Pattern, ISPp. The next symbol (NEXT,, RUN,, LEVEL,), is encoded by the state NEXT,., VLC table in Table 14-16.
Syntax No. of Mnemoni bits c
Zone(j.blockType) { if (blockType == intra) { state = I S Pi [j] ; if (j = --ι || j = = 2) { i = 1; while(state != EOZ) {
HV_TCOEFF(state, NEXT,, RUN,, LEVEL,); 2-20 3D VLC state = NEXT,; i + +; } } else { i = 1; while(state != EOZ) {
D_TCOEFF(state, NEXT,, RUN,, LEVEL,); 2-22 3D VLC state = NEXT,; i + + ;
}
} } else { state = ISPp; i = 1; while(state != EOZ) {
Figure imgf000026_0001
Figure 8 shows a flowchart of the steps carried out by the above syntax, which is for decoding a zone. The steps in Figure 8 are described below. In step #21, it is detected whether the block is an intra block.
In step #22, since the block is an intra block, an initial state pattern of the current intra block is set.
In step #23, it is detected whether the zone is either a horizontal or a vertical zone, or either a first or a second diagonal zone.
In step #24, since the zone is either a horizontal or a vertical zone, it is further detected whether the state is at the end of zone (EOZ) or not. If the state is at the end of zone, the program ends.
In step #25, since the zone is not at the end of zone, the triplet (RUN, LEVEL, NEXT) for the horizontal/vertical zone is obtained.
In step #26, the data NEXT is set for decoding the next coefficient, and returns to step #24.
In step #27, since the zone is either a first or a second diagonal zone, it is further detected whether the state is at the end of zone (EOZ) or not. If the state is at the end of zone, the program ends.
In step #28, since the zone is not at the end of zone, the triplet (RUN, LEVEL, NEXT) for the diagonal zone is obtained.
In step #29, the data NEXT is set for decoding the next coefficient, and returns to step #27.
In step #30, since the block is not an intra block, but is an inter block, an initial state pattern of the current inter block is set.
In step #31, it is detected whether the state is at the end of zone (EOZ) or not. If the state is at the end of zone, the program ends. In step #32, since the zone is not at the end of zone, the triplet (RUN, LEVEL, NEXT) for the inter zone is obtained.
In step #33, the data NEXT is set for decoding the next coefficient, and returns to step #31. For intra DCT coefficients, the
HV_TCOEFF(state, NEXT,, RUN,, LEVEL,) is a 3D VLC for the symbol (NEXT,, RUN,, LEVEL,) from the horizontal-vertical zone intra VLC table indexed by the state. The D_TCOEFF(state, NEXT,, RUN,, LEVEL,) is a 3D VLC for the symbol (NEXT, RUN, LEVEL) from the intra diagonal zone VLC table indexed by the state.
For inter DCT coefficients, the
TCOEFF(state, NEXT,, RUN,, LEVEL,) is a 3D VLC for the symbol (NEXT,, RUN,, LEVEL,) from the horizontal-vertical zone inter VLC table indexed by the state.
In general, the first symbol in each zone is always encoded by the VLC table indicated by the ISP. Subsequent symbols are encoded by other tables indexed by NEXT of the current symbol. Because of the manor that NEXT, is determined, NEXTi is a monotonic non-increasing function of i. This limits how VLC table Transitions can be made.
Figure imgf000028_0001
Table 7. VLC table transition for inter zone and intra horizontal-vertical zones.
Figure imgf000028_0002
Table 8. VLC table transitions for intra diagonal zones.
Fig. 9 shows a data structure of a bitstream for an intra macroblock. As shown in the first row of Fig. 9, the bitstream has a plurality of macroblock header information areas 51a and a plurality of macroblock data areas 51b appearing alternately. The macroblock header information area 51a has a macroblock coding type identifier area 52a and a coded block pattern area 52b.
The macroblock data area 51b has four luminance block areas 53a, 53b, 53c and 53d, and two chrominance block areas 53e and 53f.
The luminance block area 53a has a luminance DC size area 54a, a DC differential value area 54b, an intra block initial state pattern (ISPi) area 54c and four zone data areas 54d, 54e, 54f and 54g. The zone data area 54d is for the horizontal zone, the zone data area 54e is for the vertical zone, the zone data area 54f is for the first diagonal area, and the zone data area 54g is for the second diagonal area. In each of the zone data area, a plurality of sections 55 are provided, each section 55 containing RUN, LEVEL and NEXT data. RUN and LEVEL data are used for obtaining a coefficient data using an appropriate table designated by the NEXT data in the previous section 55, or by data in ISPi area 54c if the present section is the first section in the zone. The NEXT data is used for designating an appropriate table to be used in obtaining the coefficient data in the next section.
Other luminance blocks 53b, 53c and 53d are constructed in the same arrangement. The chrominance block 53f has a chrominance DC size area 56a, a DC differential value area 56b, an intra block initial state pattern (ISPi) area 56c and four zone data areas 56d, 56e, 56f and 56g. The zone data area 56d is for the horizontal zone, the zone data area 56e is for the vertical zone, the zone data area 56f is for the first diagonal area, and the zone data area 56g is for the second diagonal area. In each of the zone data area, a plurality of sections 57 are provided, each section 57 containing RUN, LEVEL and NEXT data. RUN and LEVEL data are used for obtaining a coefficient data using an appropriate table designated by the NEXT data in the previous section 57, or by data in ISPi area 56c if the present section is the first section in the zone. The NEXT data is used for designating an appropriate table to be used in obtaining the coefficient data in the next section.
Other chrominance block 53f is constructed in the same arrangement.
Fig. 10 shows a data structure of a bitstream for an inter macroblock. As shown in the first row of Fig. 10, the bitstream has a plurality of macroblock header information areas 61a and a plurality of macroblock data areas 61b appearing alternately.
The macroblock header information area 61a has a macroblock coding type identifier area 62a, a coded block pattern area 62b, and a motion vectors area 62c.
The macroblock data area 61b has four luminance block areas 63a, 63b, 63c and 63d, and two chrominance block areas 63e and 63f. The luminance block area 63a has an inter block initial state pattern (ISPp) area 64a and a zone data area 64b.
The zone data area 64b is for the single zone shown in Fig.
4. In the zone data area 64b, a plurality of sections 65 are provided, each section 65 containing RUN, LEVEL and NEXT data. RUN and LEVEL data are used for obtaining a coefficient data using an appropriate table designated by the NEXT data in the previous section 65, or by data in
ISPp area 64a if the present section is the first section in the zone. The NEXT data is used for designating an appropriate table to be used in obtaining the coefficient data in the next section.
Other luminance blocks 63b, 63c and 63d and chrominance blocks 63e and 63f are constructed in the same arrangement. (6) Intra Horizontal-Vertical Zone (Zone 1 and Zone 2) DCT VLC Tables
(6.1) State 1 Intra VLC Table
No escape sequence is necessary as the table contains all the possible event in this state.
Figure imgf000032_0001
Table 9. VLC table for State 1 intra horizontal-vertical zone
(6.2) State 2 Intra VLC Table
The escape sequence is
ESC+NEXT+RUN+LEVEL+SIGN, where ESC is 10 bits, NEXT is a 2 bit unsigned integer, RUN is a 3 bit unsigned integer, LEVEL is a 2 bits unsigned integer, SIGN is a 1 bit unsigned integer.
Figure imgf000032_0002
Figure imgf000033_0001
Table 10 VLC table for State 2 intra horizontal-vertical zone
(6.3) State 3 Intra VLC Table
The escape sequence is
ESC + NEXT + RUN + LEVEL + SIGN, where ESC is 6 bits, NEXT is a 2 bit unsigned integer, RUN is a 3 bit unsigned integer, LEVEL is an 8 bit unsigned integer, SIGN is a 1 bit unsigned integer.
Figure imgf000033_0002
Figure imgf000034_0001
Figure imgf000035_0001
Figure imgf000036_0001
Table 11 VLC table for State 3 intra horizontal-vertical zone.
(6.7) Diagonal Zone (Zone 3 and Zone 4) Intra DCT
VLC Tables
(6.7.1) State 1 Intra VLC Table
The escape sequence is
ESC + NEXT + RUN + SIGN, where ESC is 10 bits, NEXT is 1 a bit unsigned integer, RUN is a 5 bit unsigned integer, SIGN is a 1 bit unsigned integer.
Figure imgf000036_0002
Figure imgf000037_0001
Table 12. VLC table for State 1 intra diagonal zone
(6.7.2) State 2 Intra VLC Table
The escape sequence is
ESC+NEXT+RUN+LEVEL+SIGN, where ESC is 7 bits, NEXT is a 2 bit unsigned integer, RUN is a 5 bit unsigned integer, LEVEL is an 8 bit unsigned integer, SIGN is a 1 bit unsigned integer.
Figure imgf000037_0002
Figure imgf000038_0001
Figure imgf000039_0001
Table 13. VLC table for State 2 intra diagonal zone
(6.8) Inter (Zone 1) DCT VLC Tables
(6.8.1) State 1 Inter VLC Table
The escape sequence is
ESC + NEXT + RUN + SIGN, where ESC is 9 bits, NEXT is a 1 bit unsigned integer, RUN is a 6 bit unsigned integer, SIGN is a 1 bit unsigned integer.
Figure imgf000039_0002
Figure imgf000040_0001
Table 14 VLC table for State 1 inter DCT coefficients.
(6.8.2) State 2 Inter VLC Table
The escape sequence is
ESC+NEXT+RUN+LEVEL+SIGN, where ESC is 8 bits, NEXT is 2 bit unsigned integer, RUN is a 6 bit unsigned integer, LEVEL is 1 bit unsigned integer, SIGN is a 1 bit unsigned integer.
Figure imgf000040_0002
Figure imgf000041_0001
Table 15 VLC table for State 2 inter DCT coefficients. (6.8.3) State 3 Inter VLC Table
The escape sequence is
ESC+NEXT+RUN+LEVEL+SIGN, where ESC is 6 bits, NEXT is a 2 bit unsigned integer, RUN is a 6 bit unsigned integer, LEVEL is a 8 bit unsigned integer, SIGN is a 1 bit unsigned integer.
Figure imgf000042_0001
Figure imgf000043_0001
Figure imgf000044_0001
Table 16. VLC table for State 3 inter DCT Coefficients
The effect of the invention is the reduction of the bits required to represent the original uncompressed signal. This higher compression achieved would enable products of high compression to be made. It would also all more information to be transmitted over a channel of a fixed bandwidth.

Claims

CLAIMS 1. A method for encoding still and moving pictures into a binary bitstream of coded representation comprising the steps of: segmenting the luminance and chrominance planes of the pictures into a plurality of blocks of two dimensional array of pixels; grouping sets of co-sited blocks of two dimensional array of pixels from the luminance and chrominance planes into macroblocks; transforming the blocks of two dimensional arrays of pixels into an alternate domain to obtain blocks of two dimensional array of transform coefficients; quantizing the blocks of two dimensional array of transform coefficients to obtain blocks of two dimensional array of quantized levels; inserting the coded representation of the coded block pattern symbol into the bitstream to indicate which of the blocks within the macroblock have non-zero quantized levels; segmenting the blocks that have non-zero quantized levels into a DC quantized level and a plurality of zones; inserting the coded representation of the DC quantized level into the bitstream; scanning the quantized levels into one dimensional arrays and forming (RUN, LEVEL) pairs of for each run of zero levels terminated by a non-zero level; classifying these (RUN, LEVEL) pairs into states depending on the subsequent (RUN, LEVEL) pairs within the zones; inserting the coded representation of the initial state pattern symbol into the bitstream to indicate the first states of the zones of the blocks within the macroblocks; forming (RUN, LEVEL, NEXT) triplets from the (RUN,
LEVEL) pairs and the state of the next (RUN, LEVEL); encoding and inserting into the bitstream the coded representation of the first (RUN, LEVEL, NEXT) triplet by entropy coding using a state table indicated by the initial state pattern; and encoding and inserting into the bitstream the coded representations of the remaining (RUN, LEVEL, NEXT) triplets each by entropy coding using a state table indicated by the next symbol of the triplet last encoded;
2. A method for decoding still and moving pictures from a binary bitstream of coded representation comprising the steps of: extracting the coded representation of the coded block pattern symbol from the bitstream to deduce which of the blocks within the macroblock have non-zero quantized levels; extracting the coded representation of the DC quantized level from the bitstream; extracting the coded representation of the initial state pattern symbol into the bitstream to deduce the first states of the zones of the blocks within the macroblocks; extracting from the bitstream and decoding the coded representation of the first (RUN, LEVEL, NEXT) triplet by entropy decoding using a state table indicated by the initial state pattern; extracting from the bitstream and decoding the coded representations of the remaining (RUN, LEVEL, NEXT) triplets each by entropy decoding using a state table indicated by the next symbol of the triplet last decoded; recovering the quantized levels from the (RUN, LEVEL, NEXT) triplets and inverse scanning the quantized levels into a plurality of zones; reconstructing the plurality of zones into blocks of two dimensional quantized levels; inverse quantizing the blocks of two dimensional array of quantized levels to obtain blocks of two dimensional array of transform coefficients; inverse transforming the blocks of two dimensional arrays of transform coefficients back to the spatial domain to obtain blocks of two dimensional array of pixels; ungrouping the macroblocks into sets of co-sited blocks of two dimensional array of pixels in the luminance and chrominance planes; reconstructing the luminance and chrominance planes of the pictures from the plurality of blocks of two dimensional array of pixels;
3. A method for encoding motion compensated moving pictures into a binary bitstream of coded representation comprising the steps of: segmenting the luminance and chrominance planes of the pictures into a plurality of blocks of two dimensional array of pixels; grouping sets of co-sited blocks of two dimensional array of pixels from the luminance and chrominance planes into macroblocks; reducing the temporal redundancy in the macroblocks by subtracting the motion compensated prediction macroblocks from the previous reconstructed picture; transforming the blocks of two dimensional arrays of motion compensated residuals into an alternate domain to obtain blocks of two dimensional array of transform coefficients; quantizing the blocks of two dimensional array of transform coefficients to obtain blocks of two dimensional array of quantized levels; inserting the coded representation of the coded block pattern symbol into the bitstream to indicate which of the blocks within the macroblock have non-zero quantized levels; scanning the quantized levels into one dimensional arrays and forming (RUN, LEVEL) pairs of for each run of zero levels terminated by a non-zero level; classifying these (RUN, LEVEL) pairs into states depending on the subsequent (RUN, LEVEL) pairs within the blocks; inserting the coded representation of the initial state pattern symbol into the bitstream to indicate the first states of the blocks within the macroblocks; forming (RUN, LEVEL, NEXT) triplets from the (RUN, LEVEL) pairs and the state of the next (RUN, LEVEL); encoding and inserting into the bitstream the coded representation of the first (RUN, LEVEL, NEXT) triplet by entropy coding using a state table indicated by the initial state pattern; and encoding and inserting into the bitstream the coded representations of the remaining (RUN, LEVEL, NEXT) triplets each by entropy coding using a state table indicated by the next symbol of the triplet last encoded;
4. A method for decoding motion compensated moving pictures from a binary bitstream of coded representation comprising the steps of extracting the coded representation of the coded block pattern symbol from the bitstream to deduce which of the blocks within the macroblock have non-zero quantized levels; extracting the coded representation of the initial state pattern symbol into the bitstream to deduce the first states of the zones of the blocks within the macroblocks; extracting from the bitstream and decoding the coded representation of the first (RUN, LEVEL, NEXT) triplet by entropy decoding using a state table indicated by the initial state pattern; extracting from the bitstream and decoding the coded representations of the remaining (RUN, LEVEL, NEXT) triplets each by entropy decoding using a state table indicated by the next symbol of the triplet last decoded; recovering the quantized levels from the (RUN, LEVEL, NEXT) triplets and inverse scanning the quantized levels into blocks of two dimensional quantized levels; inverse quantizing the blocks of two dimensional array of quantized levels to obtain blocks of two dimensional array of transform coefficients; inverse transforming the blocks of two dimensional arrays of transform coefficients back to the spatial domain to obtain blocks of two dimensional array of motion compensated residuals; adding the motion compensated prediction macroblocks from the previous reconstructed picture to recover the macroblocks of two dimensional array of pixels; ungrouping the macroblocks into sets of co-sited blocks of two dimensional array of pixels in the luminance and chrominance planes; and reconstructing the luminance and chrominance planes of the picture from the plurality of blocks of two dimensional array of pixels.
5. A method of encoding still and moving pictures according to claim 1, wherein a plurality of zones comprises: a first zone comprising the first row of AC quantized levels; a second zone comprising the first column of AC quantized levels; a third zone comprising the AC quantized levels not in the first nor second zones and where the row indexes are less than or equal to the column indexes; and a fourth zone comprising the AC quantized levels not in the first, second nor third zones.
6. A method of encoding still and moving pictures according to claim 1, wherein the quantized levels within the plurality of zones are scanned according to a predetermined order (Fig. 5).
7. A method of encoding still and moving pictures according to claim 1, wherein the coded representation of the initial state pattern symbol for the zones are formed according to a predetermined table (2).
8. A method of decoding still and moving pictures according to claim 2, wherein a plurality of zones comprises: a first zone comprising the first row of. AC quantized levels; a second zone comprising the first column of AC quantized levels; a third zone comprising the AC quantized levels not in the first nor second zones and where the row indexes are less than or equal to the column indexes; and a fourth zone comprising the AC quantized levels not in the first, second nor third zones.
9. A method of decoding still and moving pictures according to claims 2, wherein the quantized levels within the plurality of zones are scanned according to a predetermined order (Fig. 5).
10. A method of decoding still and moving pictures according to claim 2, wherein the coded representation of the initial state pattern symbol for the zones are formed according to a predetermined table (2).
11. A method of encoding motion compensated moving pictures according to claim 3, wherein the coded representation of the initial state pattern symbol for coded blocks are formed according to a predetermined table (3).
12. A method of decoding motion compensated moving pictures according to claim 4, wherein the coded representation of the initial state pattern symbol for coded blocks are formed according to a predetermined table (3).
13. An apparatus for encoding still and moving pictures into a binary bitstream of coded representation comprising: means for segmenting the luminance and chrominance planes of the pictures into a plurality of blocks of two dimensional array of pixels; means for grouping sets of co-sited blocks of two dimensional array of pixels from the luminance and chrominance planes into macroblocks; means for transforming the blocks of two dimensional arrays of pixels into an alternate domain to obtain blocks of two dimensional array of transform coefficients; means for quantizing the blocks of two dimensional array of transform coefficients to obtain blocks of two dimensional array of quantized levels; means for inserting the coded representation of the coded block pattern symbol into the bitstream to indicate which of the blocks within the macroblock have non-zero quantized levels; means for segmenting the blocks that have non-zero quantized levels into a DC quantized level and a plurality of zones; means for inserting the coded representation of the DC quantized level into the bitstream; means for scanning the quantized levels into one dimensional arrays and forming (RUN, LEVEL) pairs of for each run of zero levels terminated by a non-zero level; means for classifying these (RUN, LEVEL) pairs into states depending on the subsequent (RUN, LEVEL) pairs within the zones; means for inserting the coded representation of the initial state pattern symbol into the bitstream to indicate the first states of the zones of the blocks within the macroblocks; means for forming (RUN, LEVEL, NEXT) triplets from the (RUN, LEVEL) pairs and the state of the next (RUN, LEVEL); means for encoding and inserting into the bitstream the coded representation of the first (RUN, LEVEL, NEXT) triplet by entropy coding using a state table indicated by the initial state pattern; and means for encoding and inserting into the bitstream the coded representations of the remaining (RUN, LEVEL, NEXT) triplets each by entropy coding using a state table indicated by the next symbol of the triplet last encoded;
14. An apparatus for decoding still and moving pictures from a binary bitstream of coded representation comprising: means for extracting the coded representation of the coded block pattern symbol from the bitstream to deduce which of the blocks within the macroblock have non-zero quantized levels; means for extracting the coded representation of the DC quantized level from the bitstream; means for extracting the coded representation of the initial state pattern symbol into the bitstream to deduce the first states of the zones of the blocks within the macroblocks; means for extracting from the bitstream and decoding the coded representation of the first (RUN, LEVEL, NEXT) triplet by entropy decoding using a state table indicated by the initial state pattern; means for extracting from the bitstream and decoding the coded representations of the remaining (RUN, LEVEL, NEXT) triplets each by entropy decoding using a state table indicated by the next symbol of the triplet last decoded; means for recovering the quantized levels from the (RUN, LEVEL, NEXT) triplets and inverse scanning the quantized levels into a plurality of zones; means for reconstructing the plurality of zones into blocks of two dimensional quantized levels; means for inverse quantizing the blocks of two dimensional array of quantized levels to obtain blocks of two dimensional array of transform coefficients; means for inverse transforming the blocks of two dimensional arrays of transform coefficients back to the spatial domain to obtain blocks of two dimensional array of pixels; means for ungrouping the macroblocks into sets of co- sited blocks of two dimensional array of pixels in the luminance and chrominance planes; means for reconstructing the luminance and chrominance planes of the pictures from the plurality of blocks of two dimensional array of pixels;
15. An apparatus for encoding motion compensated moving pictures into a binary bitstream of coded representation comprising: means for segmenting the luminance and chrominance planes of the pictures into a plurality of blocks of two dimensional array of pixels; means for grouping sets of co-sited blocks of two dimensional array of pixels from the luminance and chrominance planes into macroblocks; means for reducing the temporal redundancy in the macroblocks by subtracting the motion compensated prediction macroblocks from the previous reconstructed picture; means for transforming the blocks of two dimensional arrays of motion compensated residuals into an alternate domain to obtain blocks of two dimensional array of transform coefficients; means for quantizing the blocks of two dimensional array of transform coefficients to obtain blocks of two dimensional array of quantized levels; means for inserting the coded representation of the coded block pattern symbol into the bitstream to indicate which of the blocks within the macroblock have non-zero quantized levels; means for scanning the quantized levels into one dimensional arrays and forming (RUN, LEVEL) pairs of for each run of zero levels terminated by a non-zero level; means for classifying these (RUN, LEVEL) pairs into states depending on the subsequent (RUN, LEVEL) pairs within the blocks; means for inserting the coded representation of the initial state pattern symbol into the bitstream to indicate the first states of the blocks within the macroblocks; means for forming (RUN, LEVEL, NEXT) triplets from the (RUN, LEVEL) pairs and the state of the next (RUN, LEVEL); means for encoding and inserting into the bitstream the coded representation of the first (RUN, LEVEL, NEXT) triplet by entropy coding using a state table indicated by the initial state pattern; and means for encoding and inserting into the bitstream the coded representations of the remaining (RUN, LEVEL, NEXT) triplets each by entropy coding using a state table indicated by the next symbol of the triplet last encoded; 16. An apparatus for decoding motion compensated moving pictures from a binary bitstream of coded representation comprising the steps of means for extracting the coded representation of the coded block pattern symbol from the bitstream to deduce which of the blocks within the macroblock have non-zero quantized levels; means for extracting the coded representation of the initial state pattern symbol into the bitstream to deduce the first states of the zones of the blocks within the macroblocks; means for extracting from the bitstream and decoding the coded representation of the first (RUN, LEVEL, NEXT) triplet by entropy decoding using a state table indicated by the initial state pattern; means for extracting from the bitstream and decoding the coded representations of the remaining (RUN, LEVEL, NEXT) triplets each by entropy decoding using a state table indicated by the next symbol of the triplet last decoded; means for recovering the quantized levels from the (RUN, LEVEL, NEXT) triplets and inverse scanning the quantized levels into blocks of two dimensional quantized levels; means for inverse quantizing the blocks of two dimensional array of quantized levels to obtain blocks of two dimensional array of transform coefficients; means for inverse transforming the blocks of two dimensional arrays of transform coefficients back to the spatial domain to obtain blocks of two dimensional array of motion compensated residuals; means for adding the motion compensated prediction macroblocks from the previous reconstructed picture to recover the macroblocks of two dimensional array of pixels; means for ungrouping the macroblocks into sets of co- sited blocks of two dimensional array of pixels in the luminance and chrominance planes; and means for reconstructing the luminance and chrominance planes of the picture from the plurality of blocks of two dimensional array of pixels.
PCT/JP1998/003290 1997-07-23 1998-07-23 Adaptive entropy encoding/decoding WO1999005649A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP23165697 1997-07-23
JP9/231656 1997-07-23

Publications (1)

Publication Number Publication Date
WO1999005649A1 true WO1999005649A1 (en) 1999-02-04

Family

ID=16926922

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1998/003290 WO1999005649A1 (en) 1997-07-23 1998-07-23 Adaptive entropy encoding/decoding

Country Status (2)

Country Link
TW (1) TW376655B (en)
WO (1) WO1999005649A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006008605A1 (en) * 2004-07-09 2006-01-26 Nokia Corporation Method and system for entropy encoding and decoding of a scalable video bit stream
US9172963B2 (en) 2010-11-01 2015-10-27 Qualcomm Incorporated Joint coding of syntax elements for video coding
US10772082B2 (en) 2007-12-20 2020-09-08 Optis Wireless Technology, Llc Control channel signaling using a common signaling field for transport format, redundancy version, and new data indicator

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2252021A (en) * 1991-01-11 1992-07-22 Sony Broadcast & Communication Data compression
US5369405A (en) * 1992-05-19 1994-11-29 Goldstar Co., Ltd. Coefficient generation apparatus for variable length decoder
US5461422A (en) * 1994-05-23 1995-10-24 Industrial Technology Research Institute Quantizer with automatic pre-threshold
EP0750426A2 (en) * 1995-06-22 1996-12-27 Canon Kabushiki Kaisha Image processing apparatus, data processing apparatus and method therefor
WO1998000807A1 (en) * 1996-07-03 1998-01-08 Motorola Inc. Method and apparatus for scanning of transform coefficients

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2252021A (en) * 1991-01-11 1992-07-22 Sony Broadcast & Communication Data compression
US5369405A (en) * 1992-05-19 1994-11-29 Goldstar Co., Ltd. Coefficient generation apparatus for variable length decoder
US5461422A (en) * 1994-05-23 1995-10-24 Industrial Technology Research Institute Quantizer with automatic pre-threshold
EP0750426A2 (en) * 1995-06-22 1996-12-27 Canon Kabushiki Kaisha Image processing apparatus, data processing apparatus and method therefor
WO1998000807A1 (en) * 1996-07-03 1998-01-08 Motorola Inc. Method and apparatus for scanning of transform coefficients

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006008605A1 (en) * 2004-07-09 2006-01-26 Nokia Corporation Method and system for entropy encoding and decoding of a scalable video bit stream
US7664176B2 (en) 2004-07-09 2010-02-16 Nokia Corporation Method and system for entropy decoding for scalable video bit stream
US10772082B2 (en) 2007-12-20 2020-09-08 Optis Wireless Technology, Llc Control channel signaling using a common signaling field for transport format, redundancy version, and new data indicator
US11477767B2 (en) 2007-12-20 2022-10-18 Optis Wireless Technology, Llc Control channel signaling using a common signaling field for transport format, redundancy version, and new data indicator
US9172963B2 (en) 2010-11-01 2015-10-27 Qualcomm Incorporated Joint coding of syntax elements for video coding

Also Published As

Publication number Publication date
TW376655B (en) 1999-12-11

Similar Documents

Publication Publication Date Title
JP4113114B2 (en) DCT compression using GOLOMB-RICE coding
KR100946600B1 (en) An apparatus and method for encoding digital image data in a lossless manner
AU2002316546B2 (en) Lossless intraframe encoding using golomb-rice
EP0850540B1 (en) Transmission and reception of encoded video pictures
EP0833517B1 (en) Fixed or adaptive deinterleaved transform coding for image coding and intra coding of video
US8401321B2 (en) Method and apparatus for context adaptive binary arithmetic coding and decoding
JP3967405B2 (en) Image signal encoding method
JP2004531995A5 (en)
EP2317476B1 (en) Multimedia signature coding and decoding
US7630563B2 (en) System and method for decoding digital image and audio data in a lossless manner
CN101132534A (en) Context-based adaptive variable length coding for adaptive block transforms
US6084913A (en) Method for compressing dynamic image information and system and device therefor
WO1999005649A1 (en) Adaptive entropy encoding/decoding
KR100359813B1 (en) Alternative Double Scan For Video Coding And Decoding
WO2002013539A1 (en) Sub-optimal variable length coding
Chung et al. Lossless Compression of Bayer Color Filter Array Images
JPH1198506A (en) Encoding and decoding method using variable length code and its device
JPH05219358A (en) Compressed picture data extraction device
Ayyagari A bitplane coding algorithm for still and video image compression
KR20030062036A (en) Device for processing image signal and method thereof
JPH1022831A (en) Method and device for entropy coding for classified coefficient level

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): CN KR SG US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 09446900

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: KR

NENP Non-entry into the national phase

Ref country code: CA

122 Ep: pct application non-entry in european phase