KR100202307B1 - Dct variable coder for mpeg-2 image compression - Google Patents

Dct variable coder for mpeg-2 image compression Download PDF

Info

Publication number
KR100202307B1
KR100202307B1 KR1019960080013A KR19960080013A KR100202307B1 KR 100202307 B1 KR100202307 B1 KR 100202307B1 KR 1019960080013 A KR1019960080013 A KR 1019960080013A KR 19960080013 A KR19960080013 A KR 19960080013A KR 100202307 B1 KR100202307 B1 KR 100202307B1
Authority
KR
South Korea
Prior art keywords
data
unit
block
memory
processor
Prior art date
Application number
KR1019960080013A
Other languages
Korean (ko)
Other versions
KR19980060650A (en
Inventor
김견수
장순화
김시중
Original Assignee
이계철
한국전기통신공사
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 이계철, 한국전기통신공사 filed Critical 이계철
Priority to KR1019960080013A priority Critical patent/KR100202307B1/en
Publication of KR19980060650A publication Critical patent/KR19980060650A/en
Application granted granted Critical
Publication of KR100202307B1 publication Critical patent/KR100202307B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/007Transform coding, e.g. discrete cosine transform
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • Multimedia (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

본 발명은 MPEG-2 표준에 따른 영상 부호화 장치의 DCT계수 가변장 부호화장치의 구조에 관한 것이다. 본 발명에서 제시한 구성은 ASIC이나 FPGA를 이용하여 구현하기에 적합하고, 고속으로 동작 가능하여 HDTV와 같은 응용에서도 이용이 가능하다. 따라서 핵심 ASIC으로 개발하여 다양한 성능을 가진 영상 부호화/복호화 장치를 구현하는데 이용될 수 있다. 본 발명의 구성은 DCT변환된 계수를 저장하는 매크로블록 메모리와; 상기 메모리로부터의 출력된 데이터를 카운트하기 위한 카운터부와; 상기 메모리로부터의 출력데이터를 블럭단위로 코딩패턴(CBP)를 결정하기 위한 CBP계산부와; 상기 메모리로부터의 DC데이터를 처리하기 위한 DC처리부와; 상기 메모리로부터의 AC데이터를 처리하기 위한 AC처리부와; 상기 DC처리부 및 AC처리부로부터의 데이터를 선택하여 출력부로 출력하는 멀티플렉서부; 및, 외부 시스템 제어부 및 가변장 부호화 제어부와 상기 카운터부 및 CBP계산부로부터의 제어신호를 입력하여 상기 DC처리부, AC처리부 및 멀티플렉서부를 제어하는 제어신호를 발생하는 내부제어부로 구성되는 것을 특징으로한다.The present invention relates to a structure of a DCT coefficient variable length encoding apparatus of an image encoding apparatus according to the MPEG-2 standard. The configuration proposed in the present invention is suitable to be implemented using an ASIC or an FPGA, and can be used at high speed because it can be operated at high speed. Therefore, it can be developed as a core ASIC and used to implement a video encoding / decoding device having various performances. The configuration of the present invention comprises a macroblock memory for storing DCT transformed coefficients; A counter unit for counting the output data from the memory; A CBP calculator configured to determine a coding pattern (CBP) on a block-by-block basis for the output data from the memory; A DC processor for processing DC data from the memory; An AC processor for processing AC data from the memory; A multiplexer unit for selecting data from the DC processor and the AC processor and outputting the data to an output unit; And an internal control unit for inputting control signals from an external system control unit, a variable length encoding control unit, and the counter unit and the CBP calculating unit to generate control signals for controlling the DC processing unit, the AC processing unit, and the multiplexer unit. .

Description

MPEG-2 영상압축을 위한 DCT계수 가변장 부호화장치DCT Coefficient Variable Length Coding Device for MPEG-2 Video Compression

본 발명은 영상 신호 압축알고리즘 중 MPEG-2 표준을 따르는 영상 부호화장치에 이용되는 가변장 부호화(VLC : Variable Length Coding)장치에 채용되는 DCT계수 부호화장치에 관한 것이다.The present invention relates to a DCT coefficient encoding apparatus employed in a variable length coding (VLC) apparatus used in a video encoding apparatus conforming to the MPEG-2 standard among video signal compression algorithms.

최근 들어 반도체 기술의 급격한 발달에 힘입어 신호처리 분야의 각 핵심 장치들이 기존의 대형 시스템이나 보드 수준에서 단일 ASIC(application specific integrated circuit) 칩으로 구현되는 추세이다. 이에 따라 고속 대용량의 하드웨어를 고집적 반도체(이하 VLSI) 구현에 접합하게 설계하는 것이 필요하다. 본 발명에서 제시하는 가변장 부호화장치의 구조는 시스템이나 보드 수준의 저속 대량의 하드웨어가 아니라 고속의 처리에 적합한 특수 구조에 관한 것으로 고속 영상 부호화기의 일부로써 효과적으로 채용될 수 있는 것이다.Recently, with the rapid development of semiconductor technology, each core device in the signal processing field is being implemented as a single application specific integrated circuit (ASIC) chip at the existing large system or board level. Accordingly, it is necessary to design high-capacity hardware to be bonded to a highly integrated semiconductor (VLSI) implementation. The structure of the variable length encoder proposed by the present invention is not a system or board-level low-volume hardware but a special structure suitable for high-speed processing, and can be effectively employed as part of a high-speed video encoder.

본 발명은 디지탈 TV, 고선명 텔레비젼(HDTV) 등에 응용될 수 있으며, 칩 면적을 줄이고 고속동작이 가능한 가변장 부호화장치의 VLSI 구현을 위한 하드웨어 구조를 제시하는 것을 과제로 한다.SUMMARY OF THE INVENTION An object of the present invention is to provide a hardware structure for VLSI implementation of a variable length coding apparatus that can be applied to digital TV, high definition television (HDTV), and the like, which reduces chip area and enables high-speed operation.

제1도는 DCT계수 가변장 부호화장치의 입출력 신호의 인터페이스.1 is an interface of an input / output signal of a DCT coefficient variable length encoder.

제2도는 DCT계수 부호화장치의 입출력 신호 정의도.2 is an input / output signal definition diagram of a DCT coefficient encoding apparatus.

제3도는 DCT계수 부호화장치의 상세 블럭도.3 is a detailed block diagram of a DCT coefficient encoding apparatus.

제4도는 가변장 코드 - dct_dc_size_luminance dct_dc_size _chrominanceFigure 4 Variable Length Code-dct_dc_size_luminance dct_dc_size _chrominance

제5도 내지 제8도는 DCT 계수 테이블5 to 8 show the DCT coefficient table

제9도는 ESCAPE 코드에 따른 run 및 level 의 코딩 테이블9 is a coding table of run and level according to ESCAPE code

제10도는 DCT계수 부호화부 상태도10 is a state diagram of the DCT coefficient encoder

제11도 내지 제18도는 DCT계수 부호화부 상태표11 to 18 show a state table of the DCT coefficient encoder.

제19도는 mux_sel 조건 테이블19. mux_sel Condition Table

제20도는 dc_dct_pred load신호 결정 조건 테이블20 is a dc_dct_pred load signal determination condition table

제21도는 DCT 메모리 블럭도21 is a DCT memory block diagram

제22도는 DCT계수 부호화부 타이밍도이다.22 is a timing diagram of the DCT coefficient encoder.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

1 : 내부제어기 2 : CBP계산부1: Internal controller 2: CBP calculation unit

3 : AC 선택처리부 4 : 차분기3: AC selection processing unit 4: next quarter

5 : AC 테이블 6 : DC테이블5: AC table 6: DC table

7 : DC부가부 8 : AC부가부7: DC addition part 8: AC addition part

9,10,11 : 멀티플렉서 12 : DC레지스터9,10,11: Multiplexer 12: DC register

13 : 백업 레지스터 14 : 이전블럭 DC레지스터13: Backup register 14: Previous block DC register

15 : 블럭카운터 16 : 픽셀카운터15: block counter 16: pixel counter

본 발명은 MPEG-2방식 영상 압축을 위한 DCT계수 부호화의 효과적인 하드웨어 구현 방법을 제시한다. 본 발명에서는 이의 효과적인 구현을 위해서 8개의 상태를 가지는 전용의 하드웨어 제어기를 제시한다.The present invention proposes an effective hardware implementation method of DCT coefficient coding for MPEG-2 video compression. The present invention proposes a dedicated hardware controller having eight states for its effective implementation.

상기 목적을 달성하기 위해 본 발명은;The present invention to achieve the above object;

DCT변환된 계수를 저장하는 매크로블록 메모리와;A macroblock memory for storing DCT transformed coefficients;

상기 메모리로부터의 출력된 데이터를 카운트하기 위한 카운터부와;A counter unit for counting the output data from the memory;

상기 메모리로부터의 출력데이터를 블럭단위로 코딩패턴(CBP)을 결정하기 위한 CBP계산부와;A CBP calculator for determining a coding pattern (CBP) on a block-by-block basis for output data from the memory;

상기 메모리로부터의 DC데이터를 처리하기 위한 DC처리부와;A DC processor for processing DC data from the memory;

상기 메모리로부터의 AC데이터를 처리하기 위한 AC처리부와;An AC processor for processing AC data from the memory;

상기 DC처리부 및 AC처리부로부터의 데이터를 선택하여 출력부로 출력하는 멀티플렉서부; 및,A multiplexer unit for selecting data from the DC processor and the AC processor and outputting the data to an output unit; And,

외부 시스템 제에부 및 가변장 부호화제어부와 상기 카운터부 및 CBP계산부로부터의 제어신호를 입력하여 상기 DC처리부, AC처리부 및 멀티플렉서부를 제어하는 제어신호를 발생하는 내부제어부(1)로 구성되는 것을 특징으로한다.And an internal control unit 1 for inputting control signals from an external system control unit and a variable length encoding control unit and the counter unit and the CBP calculating unit to generate control signals for controlling the DC processing unit, the AC processing unit and the multiplexer unit. To be characterized.

또한 상기 DC처리부는In addition, the DC processing unit

MB메모리로부터 데이터를 받아 들이는 DC레지스터(12)와;A DC register 12 which receives data from the MB memory;

인트라블럭 코딩시 이전블럭의 DC값을 저장하는 이전블럭DC레지스터(14)와;A previous block DC register 14 for storing the DC value of the previous block during intra block coding;

상기 DC레지스터(12) 및 이전블럭DC레지스터(14)로부터의 데이터를 감산하여 차분치를 출력하는 차분기(4,9)와;A divider (4, 9) for subtracting data from the DC register (12) and the previous block DC register (14) to output a difference value;

상기 차분기의 출력을 DC테이블(6)을 참조하여 가변장부호화하는 DC부가부(7)를 포함하는 것을 특징으로 한다.And a DC adding section 7 for variable length encoding the output of the difference with reference to the DC table 6.

또한, 상기 AC처리부는 AC계수를 판별하여 '0'의 갯수를 카운트하는 AC선택처리부(3)와;The AC processing unit may further include: an AC selection processing unit 3 for determining an AC coefficient and counting the number of '0's;

AC테이블(5)을 참조하여 AC계수를 가변장부호화하고, 부호(sign)비트와 EOB코드를 부가하는 AC부가부(8)를 포함하는 것을 특징으로 한다.It is characterized by including an AC adding section 8 for variable length encoding the AC coefficient with reference to the AC table 5 and adding a sign bit and an EOB code.

또한, 상기 카운터부는 블럭의 갯수를 카운터하여 저장하는 블럭카운터(15)와; 현재 블럭에서의 픽셀의 갯수를 카운터하여 저장하는 픽셀카운터(16)를 포함하는 것을 특징으로 한다.The counter unit may further include a block counter 15 for counting and storing the number of blocks; And a pixel counter 16 for counting and storing the number of pixels in the current block.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

제1도는 VLC DCT계수 부호화기의 인터페이스 신호들을 도시한다. 제2도는 DCT계수 부호화부에서 외부 모듈(시스템 콘트롤러 모듈, DCT 및 양자화/역양자화 모듈)로부터 받는 신호와 VLC 패커로 보내는 출력신호를 기술한다.1 shows interface signals of a VLC DCT coefficient encoder. 2 illustrates signals received from external modules (system controller module, DCT and quantization / dequantization module) and output signals to the VLC packer in the DCT coefficient encoder.

제3도는 DCT 계수 부호화장치의 상세 블럭도이다. 도시한 바와 같이 DCT계수 부호화장치는 콘트롤러, 메모리, 카운터, 레지스터, MUX 등으로 구성되어 있고, 그 역할은 다른 블럭으로부터 신호 및 데이터를 입력받아 CBP(Coded Block Pattern)을 결정하고 양자화된 DCT 계수들을 가변장 부호화하여 코딩된 데이터를 패커로 출력해 주는 부분으로써 입력된 DCT 계수는 CBP 계산부로 입력되며, 블럭 단위로 64개의 계수 중 '0'이 아닌 계수가 존재하는지를 체크하여 CBP 패턴을 결정한 후 그 결과를 VLC 콘트롤러로 출력해준다.3 is a detailed block diagram of the DCT coefficient encoding apparatus. As shown, the DCT coefficient encoding apparatus is composed of a controller, a memory, a counter, a register, a MUX, etc., and its role is to receive a signal and data from another block to determine a coded block pattern (CBP) and to apply quantized DCT coefficients. The DCT coefficient inputted to the packer is output to the packer by variable length coding, and the input DCT coefficient is input to the CBP calculation unit. After determining whether a coefficient other than '0' is present among 64 coefficients in block units, the CBP pattern is determined. Output the result to the VLC controller.

DCT계수의 부호화방법은 크게 두가지로 구분할 수 있는데 하나는 인트라 블럭의 DC계수에 대한 코딩이며, 다른 하나는 인트라 블럭의 AC계수 및 논-인트라 블럭의 AC계수에 대한 코딩이다.The coding method of the DCT coefficient can be classified into two types. One is coding for the DC coefficient of the intra block, and the other is coding for the AC coefficient of the intra block and the AC coefficient of the non-intra block.

1) 인트라 블럭 DC계수의 부호화 방법1) Coding Method of Intra Block DC Coefficient

인트라 블럭 DC계수의 부호화는 계수의 절대크기를 부호화하는 것이 아니라 이전 블럭의 DC값과 비교해서 그 차이만을 전송하며, 바로 이전 블럭의 계수 값을 갖고 있는 예측기를 이용한다. 예측기의 값은 intra_dc-precision에 따라 일정한 값으로 리셋(reset)되도록 되어 있는데 여기서는 128로 고정하여 사용하며, 다음과 같은 경우에 리셋한다.The encoding of the intra block DC coefficient does not encode the absolute size of the coefficient but transmits only the difference compared to the DC value of the previous block, and uses a predictor having the coefficient value of the previous block. The value of the predictor is reset to a certain value according to intra_dc-precision. In this case, it is fixed to 128 and used in the following case.

슬라이스의 시작에서 At the beginning of the slice

논-인트라 매크로 블럭이 디코딩될 때마다 Each time a non-intra macro block is decoded

매크로블럭이 skip될 때마다 (즉, macroblock_address_increment 1 인 경우) Whenever a macroblock is skipped (ie macroblock_address_increment 1)

일반적으로 인트라 코딩에서 DC계수의 크기는 AC계수와는 달리 매우 크기 때문에 AC계수와 같은 VLC테이블을 사용하는 것이 아니라 현재 블럭의 계수와 이전 블럭의 계수와의 차분(비트수)을 의미하는 size와 실재 차분을 나타내는 differential 값의 2부분으로 나누어서 코딩하도록 되어 있는데 만약In general, DC coefficients are very large in contrast to AC coefficients, so they do not use the same VLC table as AC coefficients. The code is divided into two parts of the differential value representing the actual difference.

size값이 '0'이면 그냥 size의 코드만을 전송하며, '0'이 아니면 코드뒤에 size의 비트수만큼 differential 값을 함께 전송한다.If the size value is '0', only the code of size is transmitted. If not, the differential value is transmitted with the number of bits of size after the code.

size는 제4도와 같이 휘도신호(luminance)와 색신호(chrominance)에 대한 것이 있으며, cc(colour component)에 따라 테이블을 선택하여 사용하도록 되어 있는데, cc는 0,1,2의 값을 가지며, 각각 Y, Cb, Cr을 의미한다.As shown in FIG. 4, the size is about luminance signal and chrominance, and the table is selected and used according to cc (colour component), where cc has values of 0, 1, and 2, respectively. Means Y, Cb and Cr.

2) AC계수의 부호화방법2) Coding method of AC coefficient

'0'이 아닌 양자화된 DCT계수의 절대값크기(level)와 현재 '0'이 아닌 계수의 앞에 오는 '0'의 갯수(run)의 조합인 (run, level)을 VLC 테이블도 제5도 내지 제8도에 의해 가변장부호화하며, 이 테이블에서 마지막 비트 's'는 level의 부호를 의미하는데 level이 양수이면 '0'이고 음수이면 '1'이다.The VLC table and FIG. 5 show a combination of the absolute level of the non-zero quantized DCT coefficients and the number of runs of zeros preceding the current nonzero coefficient. The variable bits are coded by FIG. 8, and the last bit 's' in this table means the sign of the level. If the level is positive, it is '0' and if it is negative, it is '1'.

run과 level의 가능한 조합들 중에서 도면에서의 가변장 코드로 표현할 수 없는 통계적으로 드문 조합들은 고정길이 부호화(즉 ESCAPE 코딩) 방법을 사용한다. 고정 길이 부호는 총 24 비트로 구성되는데, 고정길이 부호를 사용함을 나타내는 ESCAPE 코드(6비트), run length(0의 갯수)를 의마하는 run(6비트), 계수의 크기를 의미하는 signed_level(12비트)로 구성되어 있다.Among the possible combinations of run and level, statistically rare combinations that cannot be represented by variable-length code in the drawing use fixed length coding (ie, ESCAPE coding). Fixed-length code consists of 24 bits, ESCAPE code (6 bits) indicating the use of fixed length code, run (6 bits) indicating run length (number of 0), and signed_level (12 bits) indicating the magnitude of the coefficient. It consists of).

한 블럭의 부호화가 끝났을 경우 블럭의 끝을 의미하는 EOB(End of Block, 10)코드가 부가되며, 블럭의 계수가 모두 '0'일때, 즉 코딩되지 않는 블록(non coded block)일 경우 그 블럭은 코딩하지 않고 그냥 넘어간다. 따라서 EOB 코드도 없다.When the encoding of one block is finished, an end of block (EOB) code, which means the end of the block, is added, and when the block coefficients are all '0', that is, the non-coded block Just goes without coding. Therefore there is no EOB code.

다음에서는, 각각의 블럭에 대해 당해 분야의 통상의 지식을 가진자가 용이하게 실시할 수 있도록 개시한다.In the following, each block is disclosed to be easily implemented by those skilled in the art.

(1) 내부제어기(1) Internal controller

내부제어기(1)은 외부 블럭으로부터 sck2, vlck, coding_end_2, scan_data_en, mb_intra, cbp 등 각종 신호들을 입력받아 블럭내부에 필요한 신호 및 데이터를 전달/통제해주는 역할을 하는 부분으로써 출력되는 코드가 유효함을 알리는 data_en 신호를 출력부로 출력해주며, 한 매크로블럭의 코딩이 모두 끝났을 경우에는 코딩이 끝났음을 알리는 coding_end_3 신호를 VLC 제어장치로 출력해준다. 다음은 DCT계수 부호화부의 상태도로 나타낸 것을 설명한다.The internal controller 1 receives various signals such as sck2, vlck, coding_end_2, scan_data_en, mb_intra, cbp from the external block, and transmits / controls necessary signals and data inside the block. The notification outputs the data_en signal to the output unit, and when the coding of one macro block is completed, the coding_end_3 signal is output to the VLC controller indicating that the coding is completed. The following is a description of the state diagram of the DCT coefficient encoder.

DCT계수 부호화부 상태도는 제10도에서와 같이 RESET, IDLE, VLCK, SKIP 그리고 SH1부터 SH4까지 모두 8개의 상태로 구분되어 있으며, 각각의 상태는 입력신호의 발생여부에 따라 현재의 상태를 계속 유지하거나 다음 상태로 이동하도록 되어 있다.The state diagram of the DCT coefficient encoder is divided into eight states, such as RESET, IDLE, VLCK, SKIP, and SH1 to SH4, as shown in FIG. 10, and each state maintains its current state according to whether an input signal is generated. Or move to the next state.

먼저 IDLE상태는 코딩이 이루어지지 않는 상태로써 vlck가 '1'이 되기 전까지는 계속해서 현재의 상태를 유지한다. RESET상태는 DCT계수 부호화부 전체를 초기화시키는 상태로써 시스템을 처음 동작 시킬때 reset신호가 발생된다. 그리고 다시 IDLE상태로부터 VLC가 코딩하게될 매크로블럭마다 발생하는 클럭신호인 vlck가 입력되었을때 VLCK상태로 이동하며, vlck가 입력될때 mb_intra와 cbp도 함께 입력되어 660 sck2동안 유지된다. 그리고 vlck가 '0'으로 되면 VLCK에서 IDLE상태로 다시 돌아오며, coding_end_2신호가 발생하기 전까지 계속해서 현재 상태를 유지한다. 이때 만약 dc_dct_pred_reset신호가 발생하면 이전블럭DC레지스터를 리셋시키며, DCT계수의 가변장부호화를 시작하라는 신호인 coding_end_2를 움직임벡터 부호화부로부터 입력받았을때 다음 상태인 SH1으로 이동하게 된다.First, the IDLE state is not coded. The state remains until the vlck becomes '1'. The RESET state initializes the entire DCT coefficient encoder. The reset signal is generated when the system is first operated. When vlck, which is a clock signal generated for each macroblock to be coded by VLC from the IDLE state, is transferred to the VLCK state, when vlck is input, mb_intra and cbp are also inputted and maintained for 660 sck2. When vlck becomes '0', the VLCK returns to the IDLE state and remains in the current state until the coding_end_2 signal is generated. At this time, if the dc_dct_pred_reset signal is generated, the previous block DC register is reset, and when coding_end_2, which is a signal for starting variable-length encoding of the DCT coefficient, is input from the motion vector encoder, it moves to the next state SH1.

SH1에서는 blkclk, intra_load 그리고 back_load가 발생되며, 조건에 따라 read_1 또는 read_2 신호가 발생된다. SH1은 cbp값의 조건에 의해 SKIP 또는 SH2의 상태가 될 수 있는데 만약 cbp값 6비트중 현재 블럭에 해당되는 자리의 비트가 '0'이면 SKIP으로 이동한다. 그러나 아무런 코딩도 하지 않는 SKIP상태에서는 data_en 신호가 '0'이므로 데이터는 유효하지 않으며, coeffcnt 값에 의해 다음 상태인 SH3로 이동하도록 되어 있다. SH3 상태는 한 매크로블럭의 가변장부호화가 끝났음을 가변장 부호화기 제어장치로 알리는 신호인 coding_end_3 신호가 발생되는 상태이기도 하며, 다시 blkcnt 값이 5보다 작고 coeffcnt값이 63(이진수 111111)이면 SH1으로, blkcnt 값이 5(이진수 101)이면 SH4로 이동한다. 이에 대한 상태표는 제11도 내지 제18도에 걸쳐 설명되어 있다. 그리고 멀티플렉서의 선택조건은 제19도와 같다. 아울러 dc_dct_pred의 로드 신호는 제20도와 같다.In SH1, blkclk, intra_load, and back_load are generated, and a read_1 or read_2 signal is generated depending on a condition. SH1 can be in the state of SKIP or SH2 by the condition of cbp. If the bit of the corresponding block among the 6 bits of the cbp value is '0', it moves to SKIP. However, in the SKIP state without any coding, the data_en signal is '0', so the data is not valid. The coeffcnt value moves to the next state SH3. The SH3 state also generates a coding_end_3 signal, which signals to the variable length encoder controller that the variable length encoding of a macroblock is finished.If the blkcnt value is smaller than 5 and the coeffcnt value is 63 (binary 111111), the value is SH1. If blkcnt is 5 (binary 101), go to SH4. A state table for this is described in FIGS. 11 to 18. And the selection condition of the multiplexer is shown in FIG. In addition, the load signal of dc_dct_pred is shown in FIG. 20.

(2) CBP 계산부(2) CBP calculation unit

CBP계산부(2)는 한 매크로블럭에 해당하는 scan 데이터를 입력받아 블럭단위로 64개의 계수 중 '0'이 아닌 계수가 존재하는지를 체크하여 cbp를 결정한 후 그 결과를 가변장부호화 제어장치로 출력한다. cbp는 6비트로 표현되며, 6비트 각각의 자리는 6개 블럭의 코딩 여부를 의미하는 것으로써 코딩되지 않는 not coded block 일 경우는 '0', 코딩되는 coded block 일 경우는 '1'의 값을 갖게 된다.The CBP calculation unit 2 receives scan data corresponding to one macroblock and checks whether there is a coefficient other than '0' among 64 coefficients in block units to determine cbp, and then outputs the result to the variable length coding controller. do. cbp is represented by 6 bits, and each 6-bit place indicates whether or not 6 blocks are coded, and a value of '0' for an uncoded block that is not coded and a '1' for a coded block to be coded is represented. Will have

(3) MB 메모리(3) MB memory

도 21은 매크로블럭 메모리를 도시한다. 데이터 유효신호(scan_data_en)가 입력 될 동안 DCT블럭으로부터 scan 데이터를 입력받아 한 매크로블럭만큼 지연시키는 부분으로 한 매크로블럭에 대한 모든 코딩이 끝나야 하는 660 sck2 동안 scan 데이터를 입출력하기 위해서는 2개의 메모리가 필요하다.21 shows a macroblock memory. Receives scan data from DCT block and delays by one macro block while data valid signal (scan_data_en) is input. Two memories are required to input and output scan data during 660 sck2 when all coding for one macro block must be completed. Do.

(4) DC처리부(12,13,14)(4) DC processing section (12, 13, 14)

DC 레지스터(12)는 MB메모리로부터 scan 데이터를 받아 들이며, load 신호에 의해 데이터를 출력한다. 12비트 레지스터이다. 백업 레지스터(13)는 인트라 블럭 코딩시 이전 블럭의 DC 값을 이전블럭DC레지스터에 저장하기 위해 사용되며, load 신호에 의해 데이터를 출력한다. 이는 이전블럭DC 레지스터(14)의 이전 DC계수들(Y,Cb,Cr)을 저장하는 레지스터이다. 이전블럭DC 레지스터(14)는 인트라블럭코딩시 이전블럭의 DC값을 저장하는 부분으로써 기본값은 128이며, 로드신호에 의해 데이터를 출력한다.The DC register 12 receives scan data from the MB memory and outputs data by the load signal. It is a 12-bit register. The backup register 13 is used to store the DC value of the previous block in the previous block DC register during intra block coding, and outputs data by the load signal. This is a register that stores the previous DC coefficients Y, Cb and Cr of the previous block DC register 14. The previous block DC register 14 stores the DC value of the previous block during intrablock coding. The previous block DC register 14 outputs data by a load signal.

(5) AC 처리부(3,5,8)(5) AC processing unit (3,5,8)

AC선택처리부(3)은 입력계수가 인트라 블럭의 DC계수가 아니면서 그 값이 '0'인 경우에만 run 이 카운트되도록 하기위한 처리를 해주는 부분으로써 계수의 절대값(level) 및 sign 값을 AC 테이블(5) 및 AC 부가부(8)로 전달해주는 역할등을 한다. AC 테이블(5)는 AC계수를 런랭쓰 코딩하기위한 룩업테이블(LUT)이며, AC계수를 런랭쓰 코딩하기위한 구성의 하나로 표를 참조하여 코딩을 하고, Escape 코딩도 함께 이루어진다. 이에 의해 가변장부호화된 코드는 2-24비트의 길이를 가진다. AC 부가부(8)는 AC테이블에서 구해진 가변장부호화값에 부호 비트와 EOB 코드를 붙여주는 부분으로 출력 데이터는 26비트의 길이를 갖는다.The AC selection processing unit 3 is a part that processes to make the run count only when the input coefficient is not the DC coefficient of the intra block and its value is '0'. It serves to deliver to the table (5) and the AC additional unit (8). The AC table 5 is a look-up table (LUT) for run length coding the AC coefficient. The AC table 5 is coded with reference to the table as one of the configurations for run length coding of the AC coefficient. The variable length code thus has a length of 2-24 bits. The AC appender 8 attaches a sign bit and an EOB code to the variable length coded value obtained from the AC table. The output data has a length of 26 bits.

(8) 차분기(4)(8) Next quarter (4)

인트라블럭 DC계수 코딩시 현재 블럭의 DC계수값과 이전 블럭의 DC계수값간의 차분과 size 값을 계산해준다. 즉, 이전 블럭의 DC 계수와 현재 블럭의 DC계수를 입력으로하는 차분기로서 차분과 크기를 출력한다.In intrablock DC coefficient coding, the difference and size value between the DC coefficient of the current block and the DC coefficient of the previous block is calculated. That is, the difference and the magnitude are output as a difference inputting the DC coefficient of the previous block and the DC coefficient of the current block.

(9) DC 테이블(6)(9) DC table (6)

DC계수 코딩시 현재 블럭의 계수와 이전 블럭의 계수와의 차분(비트수)을 의미하는 size값을 테이블을 참조하여 코딩해준다.When coding the DC coefficient, the size value representing the difference (bit number) between the coefficient of the current block and the coefficient of the previous block is coded by referring to the table.

- VDCT_DC_L_TABLE : 차분기에서 계산한 출력인 size값을 입력으로하는 휘도(luminance) 룩업 테이블(LUT).-VDCT_DC_L_TABLE: Luminance lookup table (LUT) that inputs the size value which is the output calculated in the next quarter.

- VDCT_DC_C_TABLE : 차분기에서의 출력인 size 값을 입력으로하는 크로마(chrominance)의 룩업 테이블.-VDCT_DC_C_TABLE: A chroma lookup table that takes an input of the size value that is the output from the next quarter.

(10) DC 부가부(7)(10) DC attachment (7)

DC계수 코딩시 현재 블럭의 계수와 이전 블럭의 계수와의 실제 차분을 나타내는 차분값을 표를 참조하여 코딩해주는 부분으로써 만약 앞에서 계산된 size값이 '0'이면 그냥 size의 코드만을 전송하고 '0'이 아니면 size에 대한 코드 뒤에 size의 비트수만큼 차분값을 함께 전송한다. 가변장부호화된 코드의 길이는 가변적이며, 휘도성분의 경우는 2-20 비트, 크로마 성분의 경우는 2-21 비트의 길이를 갖는다.In the DC coefficient coding, the difference value representing the actual difference between the coefficient of the current block and the coefficient of the previous block is coded by referring to the table. If the previously calculated size value is '0', only the code of size is transmitted and the value is '0'. Otherwise, the code for size is passed along with the difference by the number of bits in size. The length of the variable-length coded code is variable and has a length of 2-20 bits for the luminance component and 2-21 bits for the chroma component.

차분기에서의 size 값이 '0'이면, size의 코드만을 전달하고, '0'이 아니면 size에 대한 코드뒤에 size의 비트 수 만큼 차분값과 함께 전달하는 역할을 한다.If the size value in the next quarter is '0', only the code of size is transferred, and if it is not '0', it plays the difference value with the number of bits of size after the code for size.

그외 MUX(9)는 이전블럭 DC레지스터(14)의 출력(이전 DC계수)들을 입력으로하는 멀티플렉서로 dc_dct_pred_REG에 저장되어 있는 3가지의 DC계수값(Y, Cb, Cr성분) 중 하나를 cc값을 이용하여 선택해준다(12비트). MUX(11)은 가변장부호화된 코드의 중 해당 data_len를 멀티플렉서의 선택(select)신호로 선택하여 출력부로 출력해준다(5비트). MUX(10)은 가변장부호화된 값들 중 해당 데이터를 멀티플렉서의 선택신호로 선택하여 패커로 출력해준다(32비트).The MUX 9 is a multiplexer that inputs the outputs (previous DC coefficients) of the previous block DC register 14 and inputs one of three DC coefficient values (Y, Cb, Cr components) stored in the dc_dct_pred_REG. Select using (12bit). The MUX 11 selects the corresponding data_len of the variable length coded code as a select signal of the multiplexer and outputs it to the output unit (5 bits). The MUX 10 selects the data among the variable length coded values as a selection signal of the multiplexer and outputs the data to the packer (32 bits).

또한 블럭카운터(15)는 블럭의 갯수를 저장하는 카운터이며 픽셀카운터(16)은 현재 블럭에서의 픽셀의 갯수를 저장하는 카운터이다.In addition, the block counter 15 is a counter that stores the number of blocks, and the pixel counter 16 is a counter that stores the number of pixels in the current block.

제22도는 전술한 DCT 계수 부호화기의 전체적인 동작을 타이밍 다이어그램으로 나타낸 것이다.22 is a timing diagram showing the overall operation of the above-described DCT coefficient encoder.

이상에서 기술한 바와 같이 본 발명은 가변장 부호화장치중 DCT계수 부호화를 위한 하드웨어 구현에 관한 VLSI구조로 고속처리가 가능하므로 디지탈 TV나 고선명TV와 같은 MPEG-2 표준을 이용하는 응용분야에서 효과적으로 이용될 수 있다. 그리고 이 회로는 FPGA나 ASIC으로 구현될 수 있으므로 MPEG-2의 부호화기중의 일부로 사용될 수 있다.As described above, the present invention can be effectively used in applications using the MPEG-2 standard such as digital TV or high definition TV, since the high-speed processing is possible with the VLSI structure for the hardware implementation of the DCT coefficient coding among the variable length coding apparatus. Can be. This circuit can be implemented as an FPGA or ASIC and can be used as part of the MPEG-2 encoder.

아울러 본 발명의 바람직한 실시예는 예시의 목적을 위해 개시된 것이며, 당업자라면 본 발명의 사상과 범위안에서 다양한 수정, 변경, 부가 등이 가능할 것이며, 이러한 수정 변경 등은 이하의 특허 청구의 범위에 속하는 것으로 보아야 할 것이다.In addition, a preferred embodiment of the present invention is disclosed for the purpose of illustration, those skilled in the art will be able to make various modifications, changes, additions, etc. within the spirit and scope of the present invention, such modifications and modifications belong to the following claims You will have to look.

Claims (4)

MPEG-2 영상압축을 위한 DCT계수 가변장 부호화장치에 있어서; 상기 부호화장치는; DCT변환된 계수를 지연저장하는 매크로블록 메모리와; 상기 메모리로부터의 출력된 데이터를 카운트하기 위한 카운터부와; 상기 메모리로부터의 출력데이터를 블럭단위로 코딩패턴(CBP)를 결정하기 위한 CBP계산부와; 상기 메모리로부터의 DC데이터를 처리하기 위한 DC처리부와; 상기 메모리로부터의 AC데이터를 처리하기 위한 AC처리부와; 상기 DC처리부 및 AC처리부로부터의 데이터를 선택하여 출력부로 출력하는 멀티플렉서부; 및, 외부 시스템 제어부 및 가변장부호화 제어부와 상기 카운터부 및 CBP계산부로부터의 제어신호를 입력하여 상기 DC처리부, AC처리부 및 멀티플렉서부를 제어하는 제어신호를 발생하는 내부제어부로 구성되는 것을 특징으로하는 DCT계수의 가변장 부호화장치.A DCT coefficient variable length encoding apparatus for MPEG-2 video compression; The encoder is; A macroblock memory for delay storing the DCT transformed coefficients; A counter unit for counting the output data from the memory; A CBP calculator configured to determine a coding pattern (CBP) on a block-by-block basis for the output data from the memory; A DC processor for processing DC data from the memory; An AC processor for processing AC data from the memory; A multiplexer unit for selecting data from the DC processor and the AC processor and outputting the data to an output unit; And an internal control unit configured to generate a control signal for controlling the DC processor, the AC processor, and the multiplexer by inputting control signals from an external system controller, a variable length coding controller, and the counter unit and the CBP calculator. Variable length coding device of DCT coefficients. 제1항에 있어서, 상기 DC처리부는 MB메모리로부터 데이터를 받아 들이는 DC레지스터와; 인트라블럭 코딩시 이전블럭의 DC값을 저장하는 이전블럭DC레지스터와; 상기 DC레지스터 및 이전블럭DC레지스터로부터의 데이터를 감산하여 차분치를 출력하는 차분기와; 상기 차분기의 출력을 DC테이블을 참조하여 가변장부호화하는 DC부가부를 포함하는 것을 특징으로하는 DCT계수의 가변장 부호화장치.2. The apparatus of claim 1, wherein the DC processing unit comprises: a DC register for receiving data from the MB memory; A previous block DC register for storing the DC value of the previous block during intra block coding; A divider for subtracting data from the DC register and the previous block DC register to output a difference value; And a DC adding unit for variable length encoding the output of the difference with reference to a DC table. 제1항에 있어서, 상기 AC처리부는 AC계수를 판별하여 '0'의 갯수를 카운트하는 AC선택처리부와; AC테이블를 참조하여 AC계수를 가변장부호화하고, 부호(sign)비트와 EOB코드를 부가하는 AC부가부를 포함하는 것을 특징으로하는 DCT계수의 가변장 부호화장치.2. The apparatus of claim 1, wherein the AC processing unit comprises: an AC selection processing unit for determining an AC coefficient and counting the number of '0's; A variable length coding apparatus for DCT coefficients, comprising: an AC appending section for variable length encoding the AC coefficient by referring to the AC table, and adding a sign bit and an EOB code. 제 1항에 있어서, 상기 카운터부는 블럭의 갯수를 카운터하여 저장하는 블록카운터와; 현재 블럭에서의 픽셀의 갯수를 카운터하여 저장하는 픽셀카운터를 포함하는 것을 특징으로하는 DCT계수의 가변장 부호화장치.The apparatus of claim 1, wherein the counter unit comprises: a block counter for counting and storing the number of blocks; And a pixel counter for counting and storing the number of pixels in the current block.
KR1019960080013A 1996-12-31 1996-12-31 Dct variable coder for mpeg-2 image compression KR100202307B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019960080013A KR100202307B1 (en) 1996-12-31 1996-12-31 Dct variable coder for mpeg-2 image compression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019960080013A KR100202307B1 (en) 1996-12-31 1996-12-31 Dct variable coder for mpeg-2 image compression

Publications (2)

Publication Number Publication Date
KR19980060650A KR19980060650A (en) 1998-10-07
KR100202307B1 true KR100202307B1 (en) 1999-06-15

Family

ID=19493366

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019960080013A KR100202307B1 (en) 1996-12-31 1996-12-31 Dct variable coder for mpeg-2 image compression

Country Status (1)

Country Link
KR (1) KR100202307B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100478293B1 (en) * 2002-01-02 2005-03-24 (주)씨앤에스 테크놀로지 Video Signal Encoding/Decoding Method

Also Published As

Publication number Publication date
KR19980060650A (en) 1998-10-07

Similar Documents

Publication Publication Date Title
US10666948B2 (en) Method, apparatus and system for encoding and decoding video data
KR0183688B1 (en) Image encoding method and device
ES2442851T3 (en) Method and system for context-based adaptive binary arithmetic coding
US7843998B2 (en) Method for improved entropy coding
US6219457B1 (en) Method and system for decoding data encoded in a variable length code word
US5774594A (en) Signal compression device
US7953285B2 (en) Method and circuit of high performance variable length coding and decoding for image compression
KR20150039582A (en) Video encoder and method of operating the same
US7873105B2 (en) Hardware implementation of optimized single inverse quantization engine for a plurality of standards
KR20000057295A (en) Image element processor for a memory management system using recompression
US7095448B2 (en) Image processing circuit and method for modifying a pixel value
EP2235952A1 (en) Vlc method and device
JP3153404B2 (en) Digital video bitstream coder
JP4945513B2 (en) Variable length decoding apparatus and moving picture decoding apparatus using the same
TW202415067A (en) Image coding and decoding method and device and storage medium
US6987811B2 (en) Image processor and image processing method
KR100197190B1 (en) Decoding circuit for run length codes
US7092446B2 (en) Compression-encoded data decoding apparatus
KR100202307B1 (en) Dct variable coder for mpeg-2 image compression
US6205250B1 (en) System and method for minimizing clock cycles lost to overhead data in a video decoder
US7801935B2 (en) System (s), method (s), and apparatus for converting unsigned fixed length codes (decoded from exponential golomb codes) to signed fixed length codes
US7103102B2 (en) Bit stream code lookup table for an MPEG-4 code word
US7447372B2 (en) System(s), method(s), and apparatus for decoding exponential Golomb codes
EP1298937A1 (en) Video encoding or decoding using recompression of reference frames
CN116828200B (en) Image processing method, processing device, equipment and medium

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130305

Year of fee payment: 15

FPAY Annual fee payment

Payment date: 20140304

Year of fee payment: 16

LAPS Lapse due to unpaid annual fee