KR100801967B1 - Encoder and decoder for Context-based Adaptive Variable Length Coding, methods for encoding and decoding the same, and a moving picture transmission system using the same - Google Patents
Encoder and decoder for Context-based Adaptive Variable Length Coding, methods for encoding and decoding the same, and a moving picture transmission system using the same Download PDFInfo
- Publication number
- KR100801967B1 KR100801967B1 KR1020060063696A KR20060063696A KR100801967B1 KR 100801967 B1 KR100801967 B1 KR 100801967B1 KR 1020060063696 A KR1020060063696 A KR 1020060063696A KR 20060063696 A KR20060063696 A KR 20060063696A KR 100801967 B1 KR100801967 B1 KR 100801967B1
- Authority
- KR
- South Korea
- Prior art keywords
- block
- frame
- target block
- variable length
- value
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/573—Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
본 발명은 프레임으로 이루어진 영상 데이터를 부호화하는 인코더, 복호화하는 디코더 및 이를 위한 인코딩 방법과 디코딩 방법에 관한 것이다. 본 발명에 따른 문맥 기반 적응적 가변 길이 부호화하는 방법(CAVLC)은, 상기 프레임의 대상 블록에 대한 일련의 변환계수에서 트레일링 1(trailing ones)의 개수(T1s)와 0이 아닌 계수들의 수(NumCoeff)를 구하는 단계; 상기 대상 블록의 인접 블록에서 0이 아닌 계수들의 수(NumCoeff)와 이전 프레임에서 대상 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수들의 수(NumCoeff)로부터 가변길이 부호화표를 정하는 단계; 및 상기 선택된 가변 길이 부호화표와 상기 일련의 변환 계수에서 상기 트레일링 1의 개수(T1s)와 0이 아닌 계수들의 수(NumCoeff)로부터 대상 블록에 대한 코드값을 얻는 단계를 구비한다. 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법을 이용하면 보다 효율적으로 부호화를 수행할 수 있다.The present invention relates to an encoder for encoding image data consisting of frames, a decoder for decoding, and an encoding method and a decoding method therefor. In the context-based adaptive variable length coding method (CAVLC) according to the present invention, the number of trailing ones T1s and the number of nonzero coefficients in a series of transform coefficients for the target block of the frame Num Coeff); Determining a variable length coding table from the number NumCoeff of the nonzero coefficients in the neighboring block of the target block and the number NumCoeff of the nonzero coefficients in the block at the same position as the target block in the previous frame; And obtaining a code value for the target block from the number T1s of trailing 1 and the number NumCoeff of the nonzero coefficients in the selected variable length coding table and the series of transform coefficients. The context-based adaptive variable length coding method according to the present invention can perform encoding more efficiently.
CAVLC, H.264, MPEG-4 AVC, 가변길이 부호화 표 CAVLC, H.264, MPEG-4 AVC, Variable Length Coding Table
Description
도 1 은 일반적으로 사용되는 동영상 송수신 시스템을 개략적으로 나타낸 도면이다. 1 is a diagram schematically illustrating a video transmission and reception system that is generally used.
도 2 는 종래의 H.264 방식의 인코더에서 인코딩을 수행하는 과정을 나타내는 개략적인 블록도이다. 2 is a schematic block diagram illustrating a process of performing encoding in a conventional H.264 encoder.
도 3 은 H.264 방식의 인코더에서 부호화를 위해서 4 x 4 크기의 블록을 지그재그 방식으로 스캐닝하는 순서를 나타내는 도면이다. FIG. 3 is a diagram illustrating a zigzag scanning sequence of a 4 × 4 block for encoding in an H.264 encoder.
도 4 는 H.264 인코더에서 생성된 비트스트림을 디코딩하여 동영상을 재구성하는 디코더에서 디코딩을 수행하는 과정을 개략적으로 나타낸 블록도이다. 4 is a block diagram schematically illustrating a process of performing decoding in a decoder for reconstructing a video by decoding a bitstream generated by an H.264 encoder.
도 5 는 한 프레임을 구성하는 블록의 배치관계를 나타낸 도면이다. 5 is a diagram illustrating an arrangement relationship of blocks constituting one frame.
도 6 은 H.264 방식에서 주파수 변환을 수행하기 위해 사용하는 H 행렬을 나타낸다.6 shows an H matrix used for performing frequency conversion in the H.264 scheme.
도 7 은 본 발명에서 n-k 번째 프레임과 n 번째 프레임에서 블록의 위치를 나타내는 도면이다. 7 is a view showing the position of a block in the n-k th frame and n th frame in the present invention.
도 8 은 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법에서 한 블록을 부호화하는 과정을 나타내는 순서도이다.8 is a flowchart illustrating a process of encoding a block in the context-based adaptive variable length coding method according to the present invention.
도 9 는 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법에서 상기 트레일링 1의 개수와 0이 아닌 계수들의 수를 부호화하는 단계를 상세히 나타낸 순서도이다. 9 is a flowchart illustrating in detail the steps of encoding the number of trailing 1 and the number of non-zero coefficients in the context-based adaptive variable length encoding method according to the present invention.
도 10 은 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법에서 가변 길이 부호화표를 정하는 단계를 상세히 나타낸 순서도이다. 10 is a flowchart showing in detail a step of determining a variable length coding table in the context-based adaptive variable length coding method according to the present invention.
도 11 은 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법으로 복호화된 비트스트림에서 데이터를 복호화하는 단계를 나타낸 순서도이다. 11 is a flowchart illustrating a step of decoding data in a decoded bitstream by the context-based adaptive variable length coding method according to the present invention.
도 12 는 본 발명의 예시적인 실시예에서 대상 블록, 인접 블록과 이전 프레임에서 블록과의 관계 및 이들 블록에서 부호화 정보를 나타내는 도면이다. 12 is a diagram illustrating a relationship between a target block, neighboring blocks, and blocks in a previous frame, and encoding information in these blocks in an exemplary embodiment of the present invention.
<도면의 주요부분에 대한 부호의 설명><Description of the symbols for the main parts of the drawings>
12, 14: 영상 처리부 20: 프레임 내의 블록12, 14: image processing unit 20: block in the frame
16, 18: 모니터 30: 인코더16, 18: monitor 30: encoder
31: n번째 프레임 저장부 32: 합산기31: n-th frame storage unit 32: summer
34: 주파수 변환부 36: 양자화부34: frequency converter 36: quantization unit
38: 재정렬부 40: 엔트로피 부호화부38: reordering unit 40: entropy coding unit
42: 역양자화부 44: 역변환부42: inverse quantization unit 44: inverse transform unit
46: 합산기 50: 프레임 내 선택부46: summer 50: selection in frame
52: n-1번째 프레임 저장부 52: n-1th frame storage unit
54: 움직임 보상부 56: 움직임 예상부54: motion compensation unit 56: motion estimation unit
60: 필터부 62: 재구성된 n번째 프레임 저장부60: filter unit 62: reconstructed n-th frame storage unit
100: 디코더 110: 엔트로피 복호화부100: decoder 110: entropy decoding unit
112: 재정렬부 114: 역양자화부112: rearrangement unit 114: inverse quantization unit
116: 역변환부 118: 합산기116: inverse transform unit 118: summer
120: 필터 122: 재구성된 프레임 저장부120: filter 122: reconstructed frame storage unit
124: 프레임내 예상부 126: 움직임 보상부124: intra frame prediction unit 126: motion compensation unit
128: 비교 프레임 저장부128: comparison frame storage
208: 대상 블록의 위쪽 블록 210: 대상 블록의 왼쪽 블록208: upper block of the target block 210: left block of the target block
212: 대상 블록212: target block
본 발명은 프레임으로 이루어진 영상 데이터를 부호화하는 인코더, 복호화하는 디코더 및 이를 위한 인코딩 방법과 디코딩 방법에 관한 것으로, 구체적으로는 문맥 기반 적응적 가변 길이 부호화(CAVLC)를 사용하는 인코더, 디코더, 이를 위한 인코딩 방법과 디코딩 방법에 관한 것이다. 더욱 구체적으로는 프레임을 구성하는 블록을 문맥 기반 적응적 가변 길이 부호화할 때 이전 프레임에서 인코딩되는 블록과 동일한 위치의 블록과 현재 프레임에서 인코딩되는 블록과 인접한 위치에 있는 블록의 부호화 정보를 이용하는 인코더, 디코더, 이를 위한 인코딩 방법과 디코딩 방법에 관한 것이다. The present invention relates to an encoder for decoding image data consisting of frames, a decoder for decoding, and an encoding method and decoding method for the same. Specifically, an encoder, a decoder for using context-based adaptive variable length coding (CAVLC), and The present invention relates to an encoding method and a decoding method. More specifically, when context-based adaptive variable length encoding of a block constituting a frame, an encoder using encoding information of a block at the same position as the block encoded in the previous frame and a block adjacent to the block encoded in the current frame; A decoder, an encoding method and a decoding method for the same.
개인용 컴퓨터, 무선 장치, 감시 장치, 화상 회의 시스템과 디지털 방송용 셋탑 박스(set-top box) 등의 디지털 장비에서는 영상 데이터를 포함하는 멀티미디어 데이터를 송수신한다. 따라서, 이러한 디지털 장비에서 영상 데이터를 효율적으로 송수신하는 것이 갈수록 중요해지고 있다. Digital devices such as personal computers, wireless devices, surveillance devices, video conferencing systems, and digital broadcasting set-top boxes transmit and receive multimedia data including video data. Therefore, the efficient transmission and reception of image data in such digital equipment is becoming increasingly important.
도 1 에서는 동영상 전송 시스템의 일례를 나타낸다. A측 단말기는 모니터(16)와 영상 처리부(12)로 구성되고, B측 단말기 역시 모니터(18)와 영상 처리부(12,14)로 구성된다. A측 단말기의 모니터(18)에 표시되는 영상은 영상 처리부(12)에 의해서 압축되고 부호화되어 인터넷(10)을 통해 B측 단말기의 영상 처리부(14)로 전달된다. 이때, A측 단말기의 모니터(16)에 나타난 동영상의 한 블록(20)은 영상 처리부(14)의 인코더 및 영상 처리부(14)의 디코더에 따라서 A측 단말기에 나타난 블록(20)과 동일할 수도 있고 더 조악할 수도 있다. B측 단말기에서도 반대의 과정을 밟아 동영상을 A측 단말기로 전송할 수 있다. 1 shows an example of a video transmission system. The terminal A side is composed of the
현재 사용되고 있는 다양한 영상 압축 기법에서는 연속되는 영상의 프레임에서 데이터의 시간적, 공간적 중복성(redundancy)을 최대한 제거하는 방법이 사용되고 있다. 이러한 방법으로 한 프레임 내에서 데이터의 중복성을 제거하는 방법과 여러 프레임에 걸친 데이터의 중복성을 제거하는 방법이 사용되고 있다. Various image compression techniques are currently used to remove the temporal and spatial redundancy of data in the frames of successive images. In this way, a method of removing redundancy of data in one frame and a method of removing redundancy of data over several frames are used.
한 프레임 내의 데이터의 중복성을 제거하는 방법을 예로 들어보면, 복수의 블록으로 구성된 한 프레임에서 대상 블록 한 개를 인코딩할 때 이전에 이미 인코딩한 블록으로부터 대상 블록을 예상하고, 예상된 블록과 대상 블록과의 차이만을 인코딩하는 방법이 있다. 대상 블록을 예상하는 방법에서는 각 프레임에서 각 픽셀은 동일한 방향과 크기로 이동한다고 가정한다. As an example of how to remove redundancy of data within one frame, when encoding a target block in a frame composed of multiple blocks, the target block is expected from a previously encoded block, and the expected block and the target block are encoded. There is a way to encode only the difference from. The method of predicting the target block assumes that each pixel moves in the same direction and size in each frame.
이와 같이 구해진 예상된 블록과 실제 대상 블록과의 차이값에 대한 블록(이하 '차이값 블록'이라 칭함)을 주파수 영역으로 변환시킨다. 이와 같은 주파수 영역으로 변환하기 위해 자주 사용하는 것이 이산 코사인 변환(Discrete Cosine Transform: DCT)이다. 동일한 용도로 H.264와 같은 표준에서는 이산 코사인 변환의 행렬을 정수 형태로 변형한 행렬을 사용한다. 이러한 주파수 영역으로의 변환에 의해서 일차적으로 차이값에 대한 블록의 압축이 이루어진다. A block (hereinafter, referred to as a 'difference value block') for a difference value between the expected block and the actual target block thus obtained is converted into a frequency domain. A frequently used discrete cosine transform (DCT) for this frequency domain is the Discrete Cosine Transform (DCT). For the same purpose, standards such as H.264 use matrices of discrete cosine transforms transformed into integers. This conversion to the frequency domain primarily compresses the block to the difference.
이어서, 변환된 블록은 특정한 양자화 스텝으로 양자화된다. 양자화 스텝의 크기가 클수록 큰 양자화 오차(quantization error)가 발생하므로, 인코더에서는 적절한 양자화 스텝을 산출해서 변환된 블록을 양자화시킨다. 이와 같이 양자화 과정에서도 압축이 이루어지지만 이는 손실성 압축(lossy compression)이다. The transformed block is then quantized in a specific quantization step. The larger the size of the quantization step, the larger the quantization error. Therefore, the encoder calculates an appropriate quantization step to quantize the transformed block. In this way, compression is also performed in the quantization process, but this is lossy compression.
이와 같이 양자화된 블록을 스캐닝하여 변환 계수의 비트열로 만든 다음 이 비트열을 엔트로피 부호화기(entropy coder)에 의해서 비트스트림으로 만든다. 이 과정에서 양자화된 블록은 더욱 압축된다. 이러한 엔트로피 부호화기에서 많이 사용하는 방법은 가장 자주 발생하는 코드 워드는 짧은 비트열로, 드물게 발생하는 코드 워드는 긴 비트열로 나타내는 가변 길이 부호화(Variable Length Coding)이 다. The quantized block is scanned to form a bit string of transform coefficients, and then the bit string is bitstreamed by an entropy coder. In this process, the quantized block is further compressed. The most frequently used method of entropy encoder is variable length coding in which the most frequently occurring code words are short bit strings and the rarely occurring code words are long bit strings.
위에서 살펴본 단계를 밟아 영상을 압축하는 기술로는 H.264, 즉 MPEG-4 AVC 방식이 있다. H.264에서 영상압축이 이루어지는 과정을 도 2와 관련하여 살펴보면 다음과 같다. 도 2는 H.264 인코더(30)의 블록도이다. 인코더(30)에서 동영상의 n번째 프레임이 n 번째 프레임 저장부(31)로부터 인코더(30)로 입력된다. 이 프레임(31)은 16x16 픽셀 크기의 매크로블록 단위로 처리된다. 각 매크로블록은 프레임 내 모드(intra mode)와 프레임간 모드(inter mode) 중 하나에 의해 인코딩된다. 어느 모드를 사용하거나 예상 매크로블록 P가 생성된다. 프레임 내 모드의 경우, 현재 프래임 Fn을 변환부(34)와 양자화부(36)에서 처리한 다음, 처리된 프레임을 역양자화부(42)와 역변환부(44)를 통하여 재구성한 프레임(uF'n)을 생성하고 이로부터 매크로블록 P를 생성한다. 프레임간 모드에서 매크로블록 P는 하나 이상의 비교 프레임(F'n -1)과 현재의 프레임(Fn)을 바탕으로 움직임 예상부(motion estimation section)(56)에서 현재 프레임의 움직임을 예측하고 움직임 보상부(motion compensation unit)(54)에서 현재 프레임의 움직임을 보상함으로써 생성된다. 프레임간 모드를 사용할지 프레임 내 모드를 사용할지 여부는 프레임내 예상 선택부(50)에 의해 결정된다. As a technique for compressing an image by following the above-described steps, there is H.264, or MPEG-4 AVC. Looking at the process of image compression in H.264 in relation to Figure 2 as follows. 2 is a block diagram of an H.264
도 2에 나타난 바와 같이, 이렇게 예상된 매크로블록 P와 현재의 프레임(Fn)의 매크로블록을 감산기(32)에 입력하여 차이값 매크로블록(Dn)을 구한다. 이어서 차이값 매크로블록(Dn)은 주파수 영역 변환부(34)에 의해 DCT 변환된 다음, 양자화 부(36)에서 일정한 양자화 스텝(Qstep)으로 양자화된다. As shown in FIG. 2, the macroblock P thus predicted and the macroblock of the current frame Fn are input to the
이렇게 양자화된 매크로블록은 재정렬부(38)에서 도 3에 나타난 순서와 같이 지그재그 방식으로 스캔되어 양자화된 변환 계수들이 차례대로 정렬된다. 이어서, 이렇게 정렬된 일련의 변환 계수는 엔트로피 부호화기(40)에 의해 부호화된 다음 비트스트림의 형태로 출력된다. The quantized macroblock is scanned in a zigzag manner in the order shown in FIG. 3 by the
한편, 인코더에서 역변환부(44)와 역양자화부(42)에 의해 재구성된 프레임(uF'n)은 필터(60)를 통과한 뒤 재구성된 프레임(F'n)으로 저장되어 다른 프레임의 인코딩을 위해 추후에 사용될 수 있다. 상기 필터(60)는 재구성된 프레임(uF'n)의 매크로블록 사이에 생기는 왜곡 현상을 완화시키기 위한 디블록킹 필터이다. Meanwhile, the frame uF'n reconstructed by the
도 4는 H.264 인코더에서 생성된 비트스트림을 디코딩하여 동영상을 재구성하는 과정을 나타내었다. 디코더(100)에 비트스트림이 입력되면 엔트로피 복호화부(110)에서 매크로블록의 변환계수를 재구성한다. 이렇게 재구성된 변환계수는 재정렬부(112)에서 매크로블록의 형태로 재구성된다. 디코더(100)에서 이렇게 재구성된 매크로블록은 역양자화부(114)와 역변환부(116)를 거쳐 차이값 매크로블록(D'n)이 생성된다. 이러한 차이값 매크로블록(D'n)과 예상된 매크로블록 P가 합산기(118)에서 합쳐져서 재구성된 매크로블록(uF'n)이 생성된다. 이렇게 재구성된 매크로블록(uF'n)은 프레임 내 모드에서 예상 매크로블록 P를 생성하기 위해서 사용된다. 또한, 매크로블록(uF'n)은 디블록킹 필터를 거쳐 프레임(F'n)을 생성한다.4 illustrates a process of reconstructing a video by decoding a bitstream generated by an H.264 encoder. When the bitstream is input to the
위에서 살펴본 엔트로피 부호화기(40)와 엔트로피 복호화기(110)에서 사용하는 엔트로피 부호화 방법으로는 문맥 기반 적응적 가변 길이 부호화(CAVLC) 방식이 있다. 이 방식에서는 이미 부호화된 블록의 부호화 정보를 기반으로 복수의 가변 길이 부호화표(Variable Length Coding Table) 중 하나를 선택한다. 예를 들어, H.264에서는 Num-VLC0, Num-VLC1, Num-VLC2, FLC 등의 가변길이 부호화표를 사용한다. H.264 방식에서는 대상 블록을 부호화할 때, 이미 부호화된 왼쪽과 위쪽 인접 블록의 부호화 정보 중 0이 아닌 계수들의 수(NumCoeff)를 근거로 4개의 가변길이 부호화표 중에서 하나를 선택하여 대상블록에서 트레일링 1(trailing ones)의 수(T1s)와 0이 아닌 계수들의 수(NumCoeff)를 부호화하게 된다. As the entropy encoding method used by the
종래의 기술, 예를 들면 H.264에서 가변 길이 부호화표 중에서 하나를 선택하는 방법을 상세히 설명하면 다음과 같다. 한 프레임을 인코딩할 때 통상 왼쪽 위의 블록에서 오른쪽 아래 방향으로 인코딩되기 때문에 대상 블록을 인코딩할 때 이미 왼쪽이나 위쪽 블록은 인코딩되었으므로 이들 블록의 부호화 정보를 사용할 수 있다. 도 5는 한 프레임을 구성하는 블록의 배치관계를 나타낸 도면이다. 대상 블록(212)를 부호화하고자 할 때 왼쪽의 블록(210)과 위쪽의 블록(208)은 이미 부호화되어 있는 경우가 많다. H.264에서는 위쪽 블록(208)에서 0이 아닌 계수의 수가 NU이라고 하고, 왼쪽 블록(210)에서 0이 아닌 계수의 수가 NL이라 할 때, 대상 블록(212)에서 예상되는 0이 아닌 계수의 수(N)는 round(NL+NU)/2이다. H.264에서는 이렇게 예상된 대상 블록(212)에서 0이 아닌 계수의 수(N)를 근거로 아래의 표 1에 나타난 바와 같이 4개의 가변길이 부호화표 중에서 하나를 선택한다. A conventional technique, for example, a method of selecting one of variable length coding tables in H.264 will be described in detail as follows. When encoding a frame, since the upper left block is usually encoded in the lower right direction, the encoding information of these blocks can be used since the left or upper block is already encoded when the target block is encoded. 5 is a diagram illustrating an arrangement relationship of blocks constituting one frame. When the
H.264에서는 이와 같이 정해진 가변길이 부호화 표에서 실제 대상 블록(212)에 있는 0이 아닌 계수들의 수(NumCoeff)와 트레일링 1(trailing ones: T1s)의 개수(T1s)를 참조하여 대상 블록에 대한 비트스트림의 최초 부분 코드값(code word)를 얻는다. In H.264, in the variable length coding table defined in this way, the number of nonzero coefficients (NumCoeff) and the number of trailing ones (T1s) T1s in the
H.264에서는 이어서 트레일링 1의 부호를 부호화하고, 트레일링 1을 제외한 0이 아닌 계수의 크기를 부호화하며, 0이 아닌 마지막 계수의 앞에 위치하는 0의 갯수를 부호화하고, 마지막으로 이들 0의 위치를 부호화한다.H.264 then encodes the sign of trailing 1, encodes the magnitude of the nonzero coefficient except trailing 1, encodes the number of zeros that precede the last nonzero coefficient, and finally Encode the location.
종래의 H.264에서는 만약 대상 블록의 왼쪽이나 오른쪽 블록에 대한 부호화 정보 NL이나 NU 중 하나 이상을 대상 블록의 부호화시에 구할 수 없는 경우가 있다. 예를 들어 대상 블록과 인접 블록이 다른 슬라이스(slice)에 속해 있거나, 대상 블록이 프레임의 왼쪽 끝이나 위쪽 끝에 위치한 경우이다. 만약 NL을 얻을 수 없는 경우 N값은 NU로 정해진다. 반면, NU를 얻을 수 없는 경우 N값은 NL로 정해진다. 마지막으로, NU와 NL 모두 얻을 수 없는 경우, N값은 0으로 설정된다. In conventional H.264, at least one of encoding information N L or N U for the left or right block of the target block may not be obtained at the time of encoding the target block. For example, the target block and the adjacent block belong to different slices, or the target block is located at the left end or top end of the frame. If N L is not obtained, the value of N is set to N U. On the other hand, when N U cannot be obtained, the value of N is set to N L. Finally, if neither N U nor N L can be obtained, the value of N is set to zero.
그러나, H.264를 비롯한 동영상 관련 표준에서 문맥 기반 적응적 가변 길이 부호화를 사용하여 엔트로피 부호화할 때, 부호화 대상 블록에 있는 0이 아닌 계수의 수(N)를 예상하기 위해서 현재의 프레임 내에서 대상 블록의 위쪽이나 왼쪽에 위치한 블록에서 0이 아닌 계수(NU, NL)만을 고려하기 때문에 대상블록에 있을 것으로 예상되는 0이 아닌 계수의 수(N)에 대한 적중도가 높지 않다는 문제점이 있다. 따라서, 종래의 동영상 관련 표준에서 문맥 기반 적응적 가변 길이 부호화할 때 최적의 가변길이 부호화표를 사용하지 않게 되어 엔트로피 부호화의 효율이 떨어지는 문제점이 있었다. However, when entropy encoding using context-based adaptive variable-length coding in video-related standards, including H.264, objects within the current frame to predict the number of non-zero coefficients (N) in the block to be encoded. Since only non-zero coefficients (N U , N L ) are considered in blocks located above or to the left of the block, there is a problem in that the hit ratio for the number N of non-zero coefficients expected to be in the target block is not high. Therefore, the conventional video related standard does not use the optimal variable length coding table when context-based adaptive variable length coding, there is a problem that the efficiency of entropy coding is inferior.
본 발명은 동영상을 포함한 데이터를 문맥 기반 적응성 가변 길이 부호화할 때 보다 효율이 높은 가변길이 부호화표를 선택할 수 있는 인코딩 방법 및 디코딩 방법, 이러한 방법을 이용하는 인코더 및 디코더, 그리고 이를 이용한 동영상 전송 시스템을 제공하는 것을 목적으로 한다. The present invention provides an encoding method and decoding method for selecting a variable length encoding table that is more efficient when context-based adaptive variable length encoding of data including a video, an encoder and a decoder using the method, and a video transmission system using the same. It aims to do it.
아울러, 본 발명은 동영상을 포함한 데이터를 문맥 기반 적응성 가변 길이 부호화할 때 부호화하는 프레임의 대상 블록의 인근 블록에 대한 부호화 정보뿐만 아니라 이전 프레임의 부호화 정보까지 고려하여 보다 효율적인 가변길이 부호화표를 선택할 수 있는 방법을 제공하는 것을 목적으로 한다. In addition, the present invention can select a more efficient variable length encoding table in consideration of encoding information of a previous frame as well as encoding information of a neighboring block of a target block of a frame to be encoded when context-based adaptive variable length encoding of data including a video is performed. The purpose is to provide a way.
아울러, 본 발명은 문맥 기반 적응성 가변 길이 부호화의 효율을 더욱 높여 보다 적은 비트수로 동일한 데이터를 압축해서 송신할 수 있는 방법, 이러한 데이터를 디코딩하는 방법, 이를 이용한 인코더 및 디코더, 그리고 동영상 전송 시스템을 제공하는 것을 목적으로 한다. In addition, the present invention provides a method for compressing and transmitting the same data with a smaller number of bits by further improving the efficiency of context-based adaptive variable length coding, a method of decoding such data, an encoder and decoder using the same, and a video transmission system. It aims to provide.
본 발명의 원리Principles of the Invention
본 발명은 동영상 프레임의 한 블록을 문맥 기반 적응적 가변 길이 부호화할 때 대상 블록과 인접 프레임 사이에만 상관성이 높은 것이 아니고, 이전 프레임에서 동일하거나 인접한 위치의 블록과도 상관성이 높다는 원리를 사용한다. 즉, 본 발명은 동영상의 현재 프레임의 한 블록을 부호화할 때 현재 프레임에서의 블록에 대한 부호화 정보만 고려할 뿐만 아니라 이전 프레임에서 부호화하고자 하는 블록과 동일하거나 인접한 위치에 있는 블록의 부호화 정보도 고려해서 대상 블록의 부호화를 수행한다. 여기서 현재 프레임과 이전 프레임의 블록의 위치는 블록의 움직임 벡터를 고려하지 않은 각 프레임에서 블록의 물리적인 위치를 의미한다.The present invention uses the principle that when context-based adaptive variable length coding of one block of a video frame is not only highly correlated between the target block and the adjacent frame, it is also highly correlated with the block of the same or adjacent position in the previous frame. That is, the present invention not only considers encoding information of a block in a current frame when encoding a block of a current frame of a video, but also considers encoding information of a block located at the same or adjacent position as a block to be encoded in a previous frame. The encoding of the target block is performed. Here, the positions of the blocks of the current frame and the previous frame refer to the physical positions of the blocks in each frame without considering the motion vectors of the blocks.
이러한 부호화의 방법은 특히 현재 프레임의 부호화 대상 블록의 인접 블록에 대한 부호화정보를 얻을 수 없을 경우에도 유효하다. 즉, 부호화 대상 블록의 인접 블록이 다른 슬라이스에 속해 있어서 인접 블록에 대한 부호화 정보에 접근할 수 없거나 프레임의 가장자리에 위치하여 사용할 수 있는 인접 블록이 제한적일 때, 부호화하려는 대상 블록과 상관성이 높은 이전 프레임의 블록을 사용함으로써 보다 효율적으로 문맥 기반 적응적 가변 길이 부호화를 수행할 수 있는 것이다. This method of encoding is particularly effective even when encoding information for an adjacent block of the encoding target block of the current frame cannot be obtained. That is, when the neighboring block of the encoding target block belongs to another slice and thus the encoding information on the neighboring block cannot be accessed or the neighboring block available at the edge of the frame is limited, the previous frame having a high correlation with the target block to be encoded By using blocks of, it is possible to perform context-based adaptive variable length coding more efficiently.
본 발명에 따른 인코더 및 인코딩 방법Encoder and Encoding Method According to the Invention
이와 같은 원리를 이용하는 본 발명에 따른 인코더를 구체적으로 살펴보면, 본 발명에 따른 인코더는 제 1 프레임과 후속하는 제 2 프레임을 포함하는 데이터의 양자화된 변환 계수를 문맥 기반 적응적 가변 길이 부호화(CAVLC)한다. 본 발명에 따른 인코더는 이전 프레임 부호화 정보 저장부와 문맥 기반 적응적 가변 길이 부호화부를 포함하고 있다.Looking specifically at an encoder according to the present invention using such a principle, the encoder according to the present invention performs context-based adaptive variable length coding (CAVLC) on a quantized transform coefficient of data including a first frame and a subsequent second frame. do. The encoder according to the present invention includes a previous frame encoding information storage unit and a context-based adaptive variable length encoder.
본 명세서의 상세한 설명과 청구범위에서 "후속"한다는 의미는 시간적으로 후라는 의미이지만 반드시 바로 뒤라는 의미는 아니다. 즉, 제 2 프레임이 제 1 프레임에 후속한다는 의미는 인코딩이나 디코딩할 때 제 1 프레임이 제 2 프레임보다 먼저 인코딩이나 디코딩된다는 것을 의미한다. 따라서, 본 발명에 따른 인코더에서 동영상의 제 1 프레임이 N1 번째 프레임이고, 제 2 프레임이 N2 번째 프레임이라고 하면, N1 < N2 의 관계가 성립한다. 바람직하게, N1 프레임은 N2 프레임을 디코딩할 때 전술한 P 프레임을 생성하기 위해서 사용하는 비교 프레임(reference frame)이다. 물론 N1 + 1 = N2의 관계를 만족할 수도 있다. 즉, 제 2 프레임이 제 1 프레임 바로 뒤의 프레임일 수도 있다.In the description and claims of this specification, "following" means later in time, but not necessarily immediately after. That is, the meaning that the second frame follows the first frame means that when encoding or decoding, the first frame is encoded or decoded before the second frame. Thus, the first frame of the movie N 1 th frame in the encoder according to the invention, when said second frame is N 2-th frame, is established a relationship of N 1 <N 2. Preferably, N 1 frame is N 2 A reference frame used to generate the above-described P frame when decoding a frame. Of course, the relationship of N 1 + 1 = N 2 may be satisfied. That is, the second frame may be a frame immediately after the first frame.
마찬가지로 본 명세서의 상세한 설명과 청구범위에서 "이전" 프레임이란 대상 프레임에 대해서 시간적으로 앞이라는 의미이지 반드시 바로 전의 프레임을 의미하는 것은 아니다. 즉, 본 명세서의 상세한 설명과 청구범위에서 "이전 프레임"은 대상 프레임에 대해 시간적으로 선행하는 대상 프레임보다 먼저 인코딩 또는 디코딩되는 모든 프레임을 지칭한다. Likewise, in the description and claims of this specification, a "previous" frame means temporally ahead of the target frame, but not necessarily the immediately preceding frame. That is, in the description and claims herein, "previous frame" refers to all frames that are encoded or decoded prior to the target frame that temporally precedes the target frame.
상기 이전 프레임 부호화 정보 저장부는 상기 제 1 프레임을 문맥 기반 적응적 가변 길이 부호화하면서 얻어지는 부호화 정보를 저장한다. 이러한 부호화 정보 저장부는 통상의 램이나 고속의 캐시 등 제 1 프레임의 부호화 정보를 저장하기 위한 어떠한 데이터 저장장치로도 구성될 수 있다. 바람직하게, 상기 제 1 프레임의 부호화 정보는 행렬의 형태로 이전 프레임 부호화 정보 저장부에 저장될 수 있다. The previous frame encoding information storage unit stores encoding information obtained while context-based adaptive variable length encoding of the first frame. The encoded information storage unit may be configured with any data storage device for storing encoded information of the first frame, such as a normal RAM or a high speed cache. Preferably, the encoding information of the first frame may be stored in a previous frame encoding information storage unit in the form of a matrix.
상기 부호화 정보는 블록을 부호화하는 과정에서 필요한 정보를 의미한다. 구체적으로, 본 발명이 적용되는 문맥 기반 적응적 가변 길이 부호화에서 부호화 정보는 (i) 블록에서 0이 아닌 계수의 수, (ii) 블록에서 트레일링 1의 수, (iii) 트레일링 1의 부호, 및 (iv) 0이 아닌 계수 앞에 있는 0의 총 개수를 포함한다. 본 발명에서는 이러한 부호화 정보 중의 하나 이상을 사용한다. 바람직하게는 본 발명에 따른 인코더에서는 부호화 정보 중 블록에서 0이 아닌 계수의 수(NumCoeff)를 사용한다. The encoding information refers to information necessary in the process of encoding a block. Specifically, in context-based adaptive variable length coding to which the present invention is applied, encoding information includes (i) the number of nonzero coefficients in a block, (ii) the number of trailing 1 in the block, and (iii) the sign of trailing 1 , And (iv) the total number of zeros before the nonzero coefficient. In the present invention, one or more of such encoded information is used. Preferably, the encoder according to the present invention uses the number NumCoeff of the non-zero coefficient in the block of the encoding information.
또한, 상기 문맥 기반 적응적 가변 길이 부호화부는 상기 이전 프레임 부호화 정보 저장부에 저장된 상기 부호화 정보를 감안하여 제 2 프레임을 문맥 기반 적응적 가변 길이 부호화한다. 바람직하게, 상기 문맥 기반 적응적 가변 길이 부호화부는 상기 저장된 부호화 정보를 감안하여 참조값을 생성하고, 이 참조값에 근거하여 부호화를 수행하게 된다. 상기 문맥 기반 적응적 가변 길이 부호화부는 현재 프레임에서 부호화하고자 하는 대상 블록의 인접 블록도 감안하여 문맥 기반 적응적 가변 길이 부호화를 수행할 수 있다. In addition, the context-based adaptive variable length encoding unit context-based adaptive variable length encoding of the second frame in consideration of the encoding information stored in the previous frame encoding information storage unit. Preferably, the context-based adaptive variable length encoder generates a reference value in consideration of the stored encoding information, and performs encoding based on the reference value. The context-based adaptive variable length encoder may perform context-based adaptive variable length coding in consideration of adjacent blocks of a target block to be encoded in the current frame.
바람직하게, 상기 인코더는 각 프레임을 복수의 블록으로 나누기 위한 블록 분할부; 상기 분할된 블록의 데이터값을 주파수 영역으로 변환하기 위한 주파수 변환부; 및 주파수 영역으로 변환된 상기 블록의 데이터값을 양자화하기 위한 양자화부를 더욱 구비한다. Preferably, the encoder includes a block divider for dividing each frame into a plurality of blocks; A frequency converter for converting the data value of the divided block into a frequency domain; And a quantization unit for quantizing data values of the block transformed into the frequency domain.
상기 블록 분할부는 바람직하게 이미 본 기술분야에서 공지된 방법을 사용하여 적절한 크기의 블록으로 분할할 수 있다. 블록 분할부는 각 프레임을 일정한 4x4 크기의 블록으로 분할할 수도 있고, 압축 효율을 더욱 향상시키기 위해 가변적으로 블록의 크기를 정할 수 있다. 일반적으로 가변적인 블록 크기를 사용할 때에는 프레임에서 변화가 많은 부위는 작은 크기의 블록으로 나누고, 변화가 적은 부위는 더 큰 크기의 블록으로 나눈다. The block divider can preferably be divided into blocks of a suitable size using methods already known in the art. The block divider may divide each frame into blocks having a constant 4x4 size, and may variably size the blocks to further improve compression efficiency. In general, when a variable block size is used, a large portion of the frame is divided into smaller blocks, and a small portion of the frame is divided into larger blocks.
상기 인코더의 주파수 변환부는 시간 영역의 정보를 주파수 영역으로 변환한다. 이러한 목적으로 사용되는 변환으로는 퓨리에 변환이나 이산 코사인 변환(DCT) 등이 있다. 본 발명과 같은 인코더에서 이들 주파수 변환은 정확한 수치로 변환될 수도 있지만, 바람직하게는 연산속도를 증가시키고 연산량을 감소시키기 위해 근접치를 사용할 수도 있다. 예를 들어, H.264에서는 이산 코사인 변환의 행렬을 정수의 형태로 단순화시킨 도 6에 도시된 바와 같은 H 행렬을 사용한다. 이와 같은 정수 형태의 주파수 변환 행렬에 대한 역행렬 역시 정수로 표시되므로 변환된 후 역변환된 값이 원래 값과 불일치하는 문제점을 제거할 수 있다. The frequency converter of the encoder converts the information in the time domain into the frequency domain. Transforms used for this purpose include a Fourier transform, a discrete cosine transform (DCT), and the like. In an encoder such as the present invention, these frequency transforms may be converted to exact figures, but preferably, proximity values may be used to increase the computation speed and reduce the computation amount. For example, H.264 uses an H matrix as shown in FIG. 6, which simplifies the matrix of discrete cosine transform into an integer form. Since the inverse of the integer frequency conversion matrix is also expressed as an integer, the problem that the inversely converted value after the conversion is inconsistent with the original value can be eliminated.
양자화부에서는 일정한 양자화 스텝의 크기로 변환 계수를 양자화시킬 수 있다. 양자화 스텝의 크기가 작으면 보다 정확하게 변환 계수를 양자화시켜 양자화 오차(quantization error)를 감소시킬 수 있다는 장점이 있는 반면, 양자화된 데이 터의 크기가 증가한다는 단점이 있다. 따라서, 바람직하게 양자화부에서는 이러한 장단점을 감안하여 적절한 크기의 양자화 스텝을 결정한다. 예를 들어, H.264에서 양자화하기 위해 사용하는 양자화 스텝(Qstep)은 아래의 표 2와 같다. 각 양자화 스텝(Qstep)에 대해서는 0 에서 51까지의 양자화 파라미터(Quantization Parameter: QP)가 부여되어 있다. 각 양자화 스텝은 약 12%씩 증가한다. The quantization unit can quantize the transform coefficients with a predetermined quantization step size. Smaller quantization steps have the advantage of reducing quantization errors by quantizing the transform coefficients more accurately, while increasing the size of the quantized data. Accordingly, the quantization unit preferably determines quantization steps of appropriate size in consideration of these advantages and disadvantages. For example, the quantization step (Qstep) used for quantization in H.264 is shown in Table 2 below. For each quantization step Qstep, a quantization parameter QP of 0 to 51 is provided. Each quantization step is increased by about 12%.
바람직하게, 인코더는 각 프레임의 블록 단위로 변환, 양자화 및 부호화를 수행하게 된다. 전술한 바와 같이 각 블록은 일률적으로 4x4 크기의 블록일 수도 있고, 프레임의 구성에 따라 여러 크기의 블록을 사용할 수도 있다. Preferably, the encoder performs transformation, quantization, and encoding on a block basis of each frame. As described above, each block may be a block of 4x4 size uniformly, or blocks of various sizes may be used according to the structure of the frame.
바람직하게, 상기 부호화 정보는 이미 부호화된 블록에서 0이 아닌 계수들의 수(NumCoeff)이다. 예를 들어, 아래의 표 3과 같은 4x4 픽셀 크기의 블록에서 0이 아닌 계수들은 3, -1, -1, 1, 1 이므로, 이 블록에서 0이 아닌 계수들의 수(NumCoeff)는 5가 된다. Preferably, the encoding information is the number NumCoeff of nonzero coefficients in a block that is already encoded. For example, in a 4x4 pixel block, such as Table 3 below, the nonzero coefficients are 3, -1, -1, 1, 1, so the number of nonzero coefficients (NumCoeff) in this block is 5. .
바람직하게, 주파수 변환하고 양자화된 제 1 프레임의 블록의 0이 아닌 계수들의 수(NumCoeff)가 이전 프레임 부호화 정보 저장부가 저장된 후 제 2 프레임의 블록을 부호화할 때 사용하게 된다. 더욱 바람직하게, 본 발명에서는 제 1 프레임의 블록 중에서 제 2 프레임에서 부호화하고자 하는 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수들의 수(NumCoeff)를 제 2 프레임 내의 부호화하고자 하는 블록에 인접한 블록의 0이 아닌 계수들의 수(NumCoeff)와 함께 고려하여 상기 참조값(N)을 결정한다. Preferably, the number NumCoeff of the non-zero coefficients of the block of the first frame of frequency transform and quantization is used when encoding the block of the second frame after the previous frame encoding information storage unit is stored. More preferably, in the present invention, the number of non-zero coefficients NumCoeff in the block at the same position as the block to be encoded in the second frame among the blocks of the first frame is determined by the block adjacent to the block to be encoded in the second frame. The reference value N is determined in consideration with the number of nonzero coefficients NumCoeff.
바람직하게 상기 참조값(N)은 제 1 프레임의 블록 중에서 제 2 프레임에서 부호화하고자 하는 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수들의 수(Np)와 제 2 프레임 내의 부호화하고자 하는 블록에 인접한 블록의 0이 아닌 계수들의 수로부터 도출되는, 제 2 프레임의 부호화하고자 하는 대상 블록에 존재할 것으로 예상되는 0이 아닌 계수들의 수(NumCoeff)이다. Preferably, the reference value (N) is a block adjacent to the block to be encoded in the second frame and the number N of nonzero coefficients in the block at the same position as the block to be encoded in the second frame among the blocks of the first frame. NumCoeff is the number of nonzero coefficients expected to be present in the target block to be encoded of the second frame, derived from the number of nonzero coefficients of.
바람직하게, 상기 제 2 프레임의 부호화하고자 하는 블록의 인접하는 블록이란 제 2 프레임의 블록을 인코딩하는 순서를 감안할 때 부호화하고자 하는 블록보다 먼저 부호화되는 블록이다. 예컨대, H.264의 경우 대상블록의 왼쪽 블록과 위쪽 블록이 인접한 블록에 해당한다. Preferably, the adjacent block of the block to be encoded of the second frame is a block that is encoded before the block to be encoded in consideration of the order of encoding the blocks of the second frame. For example, in the case of H.264, the left block and the upper block of the target block correspond to adjacent blocks.
참조값 N, 부호화 정보 NL, 부호화 정보 NU와 부호화 정보 NP의 관계를 도 7과 관련하여 살펴본다. NL은 대상 블록과 같은 프레임(n번째 프레임)에서 대상 프레임의 왼쪽에 위치한 블록에서 0이 아닌 계수들의 수(NumCoeff)이고, NU은 대상 블록과 같은 프레임(n번째 프레임)에서 대상 블록의 위쪽에 위치한 블록에서 0이 아닌 계수들의 수(NumCoeff)이며, NP는 이전 프레임(n-k 번째 프레임, 단 k ≥ 1)에서 대상 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수들의 수(NumCoeff)이다. 바람직하게, 상기 참조값 N, 즉 부호화 대상 블록에서 예상되는 0이 아닌 계수들의 수(N)는 다음과 같은 수식에 의해 정해진다. A relationship between a reference value N, encoded information N L , encoded information N U, and encoded information N P will be described with reference to FIG. 7. N L is the number of nonzero coefficients (NumCoeff) in the block located to the left of the target frame in the same frame as the target block (nth frame), and N U is the number of target blocks in the same frame as the target block (nth frame) The number of nonzero coefficients (NumCoeff) in the upper block, N P is the number of nonzero coefficients (NumCoeff) in the block at the same position as the target block in the previous frame (nk th frame, where k ≥ 1) to be. Preferably, the reference value N, that is, the number N of non-zero coefficients expected in the encoding target block is determined by the following equation.
단, α와 β는 2α+β=1의 관계를 만족시키는 양의 실수이다.However, α and β are positive real numbers that satisfy the relationship of 2α + β = 1.
대상 블록의 인접 프레임에 대한 부호화 정보를 얻을 수 없는 경우가 있다. 본 발명에 따른 인코더에서 출력되는 비트스트림은 슬라이스 단위로 구성될 수 있다. 슬라이스란 가변 크기의 블록을 사용하지 않을 때 더 빠는 속도로 프레임을 스캔을 할 수 있도록 일련의 블록을 묶어서 구성하는 단위이다. 따라서, 한 프레임은 복수의 슬라이스로 구성된다. 하나의 슬라이스는 그 자체가 하나의 단위가 되어 인코딩 및 디코딩되며, 해당 슬라이스 내의 블록을 인코딩하거나 디코딩할 때 디블록킹 필터를 위한 일부의 파라이터를 제외하고는 다른 슬라이스 내의 정보없이 해당 슬라이스 내의 정보만으로 슬라이스 내의 블록을 인코딩하거나 디코딩할 수 있다. 따라서, 대상 블록과 인접 프레임이 다른 슬라이스 내에 위치하면 대상 블록을 디코딩할 때 인접 프레임의 부호화 정보를 얻을 수 없는 경우가 있다. 또한, 대상 블록이 프레임의 가장자리에 위치하는 경우에는 인접 프레임이 아예 없는 경우도 있다. In some cases, the encoding information for the adjacent frame of the target block cannot be obtained. The bitstream output from the encoder according to the present invention may be configured in units of slices. A slice is a unit that organizes a series of blocks so that a frame can be scanned at a faster speed when a variable size block is not used. Thus, one frame is composed of a plurality of slices. One slice is itself encoded and decoded into one unit, and when encoding or decoding a block within that slice, only one piece of information within that slice is stored without any information in the other slice, except for some parameters for the deblocking filter. A block within a slice can be encoded or decoded. Therefore, when the target block and the adjacent frame are located in different slices, encoding information of the adjacent frame may not be obtained when decoding the target block. In addition, when the target block is located at the edge of the frame, there may be no adjacent frame at all.
이와 같은 이유로, NU를 대상 블록의 부호화시에 얻을 수 없는 경우, 상기 참조값, 즉 부호화 대상 블록에서 예상되는 0이 아닌 계수들의 수(N)는 다음과 같은 식으로 구해진다. For this reason, when N U cannot be obtained at the time of encoding the target block, the reference value, that is, the number N of non-zero coefficients expected in the encoding target block is obtained as follows.
단, NL은 대상 블록의 왼쪽에 위치한 블록에서 0이 아닌 계수들의 수이고, NP는 이전 프레임에서 대상 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수들의 수이고,α와 β는 2α+β=1의 관계를 만족시키는 양의 실수이다. Where N L is the number of nonzero coefficients in the block located to the left of the target block, N P is the number of nonzero coefficients in the block at the same position as the target block in the previous frame, and α and β are 2α + It is a positive real number that satisfies the relationship of β = 1.
반대로, NL를 대상 블록의 부호화시에 얻을 수 없는 경우, 상기 참조값, 즉 부호화 대상 블록에서 예상되는 0이 아닌 계수들의 수(N)는 다음과 같은 식으로 구해진다. On the contrary, when N L is not obtained at the time of encoding the target block, the reference value, that is, the number N of non-zero coefficients expected in the encoding target block is obtained as follows.
단, NU은 대상 블록의 위쪽에 위치한 블록에서 0이 아닌 계수들의 수이며, NP는 이전 프레임에서 대상 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수들의 수이고,α와 β는 2α+β=1의 관계를 만족시키는 양의 실수이다. Where N U is the number of nonzero coefficients in the block located above the target block, N P is the number of nonzero coefficients in the block at the same position as the target block in the previous frame, and α and β are 2α + It is a positive real number that satisfies the relationship of β = 1.
만약 NU와 NL을 대상 블록의 부호화시에 얻을 수 없는 경우, 상기 참조값, 즉 부호화 대상 블록에서 예상되는 0이 아닌 계수들의 수(N)는 Np로 정해진다. If N U and N L are not obtained at the time of encoding the target block, the reference value, that is, the number N of non-zero coefficients expected in the encoding target block is determined as Np.
바람직하게, 본 발명에서는 이러한 N 값을 기반으로 본 발명에 따른 인코더의 엔트로피 부호화기는 복수의 가변 부호화 표 중에서 하나를 선택해서 부호화를 수행하게 된다. 예를 들어, 본 발명을 H.264 인코더에 적용하면, 상기 N 값을 바탕으로 4개의 참조표인 가변 부호화 표 Num-VLC0, Num-VLC1, Num-VLC2, FLC 중의 하나를 선택해서 부호화할 수 있다. N 값에 따른 가변 부호화 표의 선택은 이미 표 1 에서 살펴본 방식을 그대로 사용할 수도 있고 이에 변형을 가할 수도 있다. Preferably, in the present invention, the entropy encoder of the encoder according to the present invention selects one of a plurality of variable encoding tables and performs encoding based on the N value. For example, when the present invention is applied to an H.264 encoder, one of four reference tables, Num-VLC0, Num-VLC1, Num-VLC2, and FLC, can be selected and encoded based on the N value. have. Selection of the variable coding table according to the N value may use the method described in Table 1 as it is or may be modified.
상기 가변 부호화 표 Num-VLC0, Num-VLC1와 Num-VLC2는 각각 다음의 표 4, 표 5와 표 6과 같이 주어질 수 있다. 여기서 NumCoeff는 블록에서 0이 아닌 계수의 수이고, T1s는 트레일링 1의 갯수를 의미한다. The variable coding tables Num-VLC0, Num-VLC1 and Num-VLC2 may be given as Tables 4, 5 and 6, respectively. Where NumCoeff is the number of nonzero coefficients in the block, and T1s is the number of trailing ones.
FLC는 6비트의 xxxxyy 형태로 주어질 수 있다. 여기서 xxxx는 0이 아닌 계수의 수(NumCoeff)에서 1을 뺀 값을 이진으로 표시한 값이고, yy는 트레일링 1의 갯수를 나타낸다. 이때, 0이 아닌 계수의 수(NumCoeff)가 0인 경우에는 000011 코드값이 사용된다. FLC can be given in the form of 6-bit xxxxyy. Where xxxx is a binary representation of the number of non-zero coefficients (NumCoeff) minus 1, and yy represents the number of trailing ones. In this case, when the number NumCoeff of the non-zero coefficient is 0, the 000011 code value is used.
전술한 바와 같이, 식 1 내지 3 을 적용해서 N 값을 계산할 때, 상기 α와 β의 값은 상기 양자화부에서 상기 블록의 데이터값을 양자화할 때 사용하는 양자화 스텝의 크기(Qstep)에 따라 달라지는 것이 바람직하다. 더욱 바람직하게, 상기 양자화부는 양자화 스텝 (또는 양자화 파라미터 QP에 대해서) 아래의 표 7과 같은 α와 β의 값을 사용한다.As described above, when calculating N values by applying
본 발명에 따른 인코더는 입력 프레임 기억부, 기준 프레임 기억부, 움직임 예상 및 보상부, 감산기, 변환부, 양자화부 및 부호화부를 더욱 포함할 수 있다. 상기 입력 프레임 기억부는 상기 인코더로 입력되는 대상 프레임의 데이터를 저장하는 역할을 한다. 기준 프레임 기억부는 대상 프레임의 이전 프레임의 데이터를 저장하는 역할을 수행한다. 움직임 예상 및 보상부는 상기 대상 프레임의 블록에 대하여 가장 근접한 이전 프레임의 블록을 선정한다. 상기 감산기는 상기 움직임 예상 및 보상부에서 구해진 이전 프레임의 블록과 상기 대상 프레임의 블록과의 차이값 블록을 구한다. 이어서, 상기 변환부는 상기 감산기에서 얻어진 상기 차이값 블록을 주파수 영역으로 변환한다. 이어지는 양자화부는 상기 주파수 영역으로 변환된 블록에 대하여 소정의 양자 스텝 크기(Qstep)로 양자화한다. 마지막으로, 상기 부호화부는 상기 양자화부에서 양자화된 블록을 문맥 기반 적응성 가변 길이 부호화(CAVLC)한다. The encoder according to the present invention may further include an input frame memory, a reference frame memory, a motion estimation and compensation unit, a subtractor, a transformer, a quantizer, and an encoder. The input frame storage unit stores data of a target frame input to the encoder. The reference frame storage unit stores data of a previous frame of the target frame. The motion estimation and compensation unit selects a block of the previous frame closest to the block of the target frame. The subtractor obtains a difference block between the block of the previous frame and the block of the target frame obtained by the motion estimation and compensation unit. Subsequently, the converter converts the difference block obtained in the subtractor into a frequency domain. The subsequent quantization unit quantizes the block transformed into the frequency domain with a predetermined quantum step size (Qstep). Finally, the encoder performs context-based adaptive variable length coding (CAVLC) on the quantized block in the quantizer.
이하에서는 복수의 프레임으로 이루어진 동영상 데이터를 문맥 기반 적응적 가변 길이 부호화하는 방법에 대하여 설명하도록 한다. 도 8에 도시된 바와 같이, 일반적인 문맥 기반 적응적 가변 길이 부호화 방법에서는 일련의 변환계수에서 트레일링 1(trailing ones)의 개수(T1s)와 0이 아닌 계수들의 수(NumCoeff)를 부호화하는 단계(252); 각 트레일링 1의 부호(플러스 또는 마이너스)를 부호화하는 단계(254); 각 0이 아닌 계수들의 크기를 부호화하는 단계(256); 상기 일련의 변환계수에서 마지막 0이 아닌 계수 앞에 있는 0인 계수의 수를 부호화하는 단계(258); 및 상기 0이 아닌 계수들의 위치를 부호화하는 단계(260)를 밟는다. Hereinafter, a method of context-based adaptive variable length encoding of video data consisting of a plurality of frames will be described. As shown in FIG. 8, in the general context-based adaptive variable length encoding method, encoding the number of trailing ones (T1s) and the number of nonzero coefficients (NumCoeff) in a series of transform coefficients ( 252); Encoding (254) the sign (plus or minus) of each trailing 1; Encoding 256 the magnitude of each non-zero coefficient; Encoding (258) a number of coefficients of zero in front of the last non-zero coefficient in the series of transform coefficients; And encoding (260) the positions of the non-zero coefficients.
본 발명에 따른 문맥 기반 적응적 가변 길이 부호화 방법에서는 상기 트레일링 1의 개수(T1s)와 0이 아닌 계수들의 수(NumCoeff)를 부호화하는 단계(252)가 도 9와 같은 세부적인 단계를 밟아서 진행한다. 우선 상기 일련의 변환계수에서 트레일링 1(trailing ones)의 개수(T1s)와 0이 아닌 계수들의 수(NumCoeff)를 결정한다(282). 여기서, 0이 아닌 계수들의 수는 상기 대상 블록의 인접 블록에서 0이 아닌 계수들의 수(NumCoeff)와 이전 프레임에서 대상 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수들의 수(NumCoeff)로부터 결정된다. 이를 통해 상기 블록을 부호화하기 위한 가변 길이 부호화표를 결정한다(284). 마지막으로, 상기 선택된 가변 길이 부호화표와 상기 일련의 변환 계수에서 상기 트레일링 1의 개수와 0이 아닌 계수들의 수로부터 대상 블록에 대한 코드값(code word)을 얻는다(286). In the context-based adaptive variable length coding method according to the present invention, the
바람직하게, 상기 본 발명에 따른 문맥 기반 적응적 가변 길이 부호화 방법에서 상기 인접 블록은 프레임의 블록을 부호화하는 순서에서 대상 블록보다 먼저 부호화되는 블록이다. 더욱 바람직하게, 상기 인접 블록은 대상 블록의 왼쪽 블록과 위쪽 블록이다. Preferably, in the context-based adaptive variable length coding method according to the present invention, the neighboring block is a block coded before the target block in the order of encoding the blocks of the frame. More preferably, the adjacent block is the left block and the upper block of the target block.
상기 가변 길이 부호화표를 정하는 단계(284)는, 도 10에 나타난 바와 같이 상기 대상 블록의 왼쪽 블록에서 0이 아닌 계수들의 수 NL를 얻는 단계(302); 상기 대상 블록의 위쪽 블록에서 0이 아닌 계수들의 수 NU 를 얻는 단계(304); 상기 이전 프레임에서 대상 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수들의 수 NP 를 얻는 단계(306); 참조값 N을 연산하는 단계(308); 및 상기 N의 값에 근거하여 사용할 가변 길이 부호화표를 선택하는 단계(310)를 포함한다.Determining the variable length coding table 284 includes: obtaining (302) the number N L of nonzero coefficients in the left block of the target block as shown in FIG. Obtaining (304) the number N U of nonzero coefficients in the upper block of the target block; Obtaining the number N P of non-zero coefficients in the block in the same location as the current block in the previous frame (306); Calculating a reference value N (308); And selecting 310 a variable length encoding table to be used based on the value of N.
여기서 참조값 N을 연산하는 단계(308)에서는 전술한 바와 같이 NU값과 NL값을 얻을 수 있는지 여부에 따라 수학식 1 내지 3을 사용하거나 N = NP로 설정한다. In
본 발명에 따른 디코더Decoder according to the invention
다음으로, 본 발명에 따른 문맥 기반 적응적 가변 길이 부호화(CAVLC)된 비트스트림을 해독하는 디코더는 비트스트림을 수신하는 입력부, 복호화 정보 저장부, 및 엔트로피 복호화기를 포함할 수 있다. Next, a decoder for decoding a context-based adaptive variable length coded (CAVLC) bitstream according to the present invention may include an input unit for receiving the bitstream, a decoding information storage unit, and an entropy decoder.
구체적으로, 상기 디코더의 입력부는 복수의 블록으로 구성되는 제 1 프레임과 후속하는 제 2 프레임에 대한 비트스트림을 수신한다. 상기 디코더의 입력부는 프레임 버퍼를 구비하여 정해진 수만큼의 프레임을 저장할 수 있다. Specifically, the input unit of the decoder receives a bitstream for a first frame and a subsequent second frame composed of a plurality of blocks. The input unit of the decoder may include a frame buffer to store a predetermined number of frames.
바람직하게 본 발명에 따른 디코더는 상기 제 2 프레임의 대상 블록과 동일한 위치에 있는 제 1 프레임의 블록의 부호화 정보와 이미 해독된 제 2 프레임의 인접 블록의 부호화 정보를 이용하여 상기 제 2 프레임의 대상 블록을 디코딩하는 엔트로피 복호화기를 포함한다. Preferably, the decoder according to the present invention uses the encoding information of the block of the first frame at the same position as the target block of the second frame and the encoding information of the adjacent block of the already decoded second frame. And an entropy decoder that decodes the block.
또한, 상기 디코더의 복호화 정보 저장부는 상기 엔트로피 복호화기를 통해서 제 1 프레임의 블록을 디코딩하면서 생성되는 복호화 정보를 저장한다. 복호화 정보는 이미 인코더에서와 마찬가지로 (i) 블록에서 0이 아닌 계수의 수, (ii) 블록에서 트레일링 1의 수, (iii) 트레일링 1의 부호, 및 (iv) 0이 아닌 계수 앞에 있는 0의 총 개수를 포함한다. 바람직하게는 본 발명에 따른 디코더에서는 복호화 정보 중에서 블록에서 0이 아닌 계수의 수를 사용한다. The decoding information storage unit of the decoder stores decoding information generated while decoding the block of the first frame through the entropy decoder. The decoding information is already in front of (i) the number of nonzero coefficients in the block, (ii) the number of trailing ones in the block, (iii) the sign of the trailing one, and (iv) the nonzero coefficients in the block. Contains the total number of zeros. Preferably, the decoder according to the present invention uses the number of nonzero coefficients in a block among the decoding information.
인코더에서와 마찬가지로 디코더에서도 상기 인접 블록은 대상 블록의 왼쪽에 위치한 블록과 위쪽에 위치한 블록인 것이 바람직하다. As in the encoder, in the decoder, the adjacent block is preferably a block located on the left side and a block located on the upper side of the target block.
아울러, 이미 인코더에서 살펴본 바와 같이, 디코더에서도 대상 블록을 부호화하기 위한 참조값 N은 NL과 NU값을 모두 얻을 수 있을 때에는 수학식 1을, NU값을 얻을 수 없을 때에는 수학식 2를, NL 값을 얻을 수 없을 때에는 수학식 3을, 마지막으로 NL값과 NU값을 모두 얻을 수 없을 때에는 N이 NP값으로 설정된다. In addition, as already seen in the encoder, the reference value N for encoding the target block in the decoder may be represented by
바람직하게 인코더의 엔트로피 부호화기는 디코더의 엔트로피 복호화기와 동일한 수의 가변 부호화 표를 갖고 있다. 예컨대, H.264와 같은 경우 인토더와 디코더는 전술한 표 4 내지 6에 나타난 4개의 참조표인 가변 부호화 표 Num-VLC0, Num-VLC1, Num-VLC2과 6비트의 xxxxyy 형태를 갖는 FLC를 포함한다. Preferably, the entropy encoder of the encoder has the same number of variable coding tables as the entropy decoder of the decoder. For example, in the case of H.264, the intoder and the decoder may include the FLC having the six-bit xxxxyy form and the variable coding tables Num-VLC0, Num-VLC1, Num-VLC2, which are the four reference tables shown in Tables 4 to 6 described above. Include.
바람직하게, 상기 디코더의 엔트로피 복호화기는 상기 N 값이 0이나 1인 경우 Num-VLC0를 사용하고, 상기 N 값이 2 또는 3이면 Num-VLC1을 사용하고, 상기 N 값이 4 내지 7이면 Num-VLC2를 사용하며, 상기 N 값이 8 이상이면 FLC를 사용한다. Preferably, the entropy decoder of the decoder uses Num-VLC0 when the N value is 0 or 1, uses Num-VLC1 when the N value is 2 or 3, and Num- when the N value is 4 to 7. VLC2 is used, and FLC is used when the N value is 8 or more.
이하에서는 문맥 기반 적응적 가변 길이 부호화된 비트스트림을 디코딩하는 방법에 대하여 설명한다. 도 11에 나타난 바와 같이, 본 발명에 따른 문맥 기반 적응적 가변 길이 부호화된 비트스트림을 디코딩하는 방법은, 상기 비트스트림이 나타내는 대상 블록의 인접 블록에서 0이 아닌 계수의 수와 이전 프레임에서 상기 대상 블록과 동일한 위치에 있는 블록에서 0이 아닌 계수로부터 사용할 참조표를 선택하는 단계(400); 상기 비트스트림의 최초 부분과 상기 참조표를 사용하여 상기 대상 블록에서 0이 아닌 계수의 수와 트레일링 1(trailing ones)의 수를 복호화하는 단계(402); 상기 비트스트림의 비트로부터 트레일링 1의 부호를 복호화하는 단계(404); 상기 비트스트림의 비트로부터 트레일링 1을 제외한 0이 아닌 계수의 크기를 복호화하는 단계(406); 마지막 0이 아닌 계수의 앞에 위치하는 0의 계수의 수를 복호화하는 단계(408); 및 상기 마지막 0이 아닌 계수의 앞에 위치하는 0인 계수의 위치를 복호화하는 단계(410)를 포함한다. Hereinafter, a method of decoding a context-based adaptive variable length coded bitstream will be described. As shown in FIG. 11, the method for decoding a context-based adaptive variable length coded bitstream according to the present invention includes the number of nonzero coefficients in an adjacent block of a target block represented by the bitstream and the target in a previous frame. Selecting (400) a lookup table to use from nonzero coefficients in the block at the same location as the block; Decoding (402) a number of nonzero coefficients and a number of trailing ones in the target block using the first portion of the bitstream and the lookup table; Decoding (404) the sign of trailing 1 from the bits of the bitstream; Decoding (406) non-zero coefficient magnitudes except trailing 1 from the bits of the bitstream; Decoding (408) the number of coefficients of zero located before the last non-zero coefficient; And decoding 410 the position of the zero coefficient that is located before the last non-zero coefficient.
바람직하게 본 발명에 따른 문맥 기반 적응적 가변 길이 부호화된 비트스트림을 디코딩하는 방법에서 상기 참조표에는 Num-VLC0, Num-VLC1, Num-VLC2, FLC의 4가지가 있다. Preferably, in the method for decoding a context-based adaptive variable length coded bitstream according to the present invention, the reference table includes four types of Num-VLC0, Num-VLC1, Num-VLC2, and FLC.
또한, 바람직하게 본 발명에 따른 문맥 기반 적응적 가변 길이 부호화된 비트스트림을 디코딩하는 방법에서는 전술한 바와 같이 수학식 1 내지 3을 사용하거나 N=Np로 설정되는 N값에 의하여 사용할 참조표를 결정한다.In addition, preferably in the method for decoding a context-based adaptive variable length coded bitstream according to the present invention, as described above, the reference table to be used is determined by using
본 발명에 따른 동영상 전송 시스템Video transmission system according to the present invention
본 발명에 따른 동영상 전송 시스템은 위에서 살펴본 인코더 및 디코더의 구성을 이용한다. 구체적으로 살펴보면, 본 발명에 따른 동영상 데이터를 송수신하는 동영상 전송 시스템은, 동영상 데이터를 일련의 루틴을 통하여 압축하여 비트스트림의 형태로 전송하는 인코더와 상기 인코더로부터 수신된 비트스트림을 또 다른 일련의 루틴을 통하여 해독하여 동영상 데이터를 재구성하는 디코더를 포함한다. The video transmission system according to the present invention uses the configuration of the encoder and decoder described above. Specifically, a video transmission system for transmitting and receiving video data according to the present invention includes an encoder for compressing video data through a series of routines and transmitting the video data in the form of a bitstream and another series of bitstreams received from the encoder. It includes a decoder to decode through to reconstruct the video data.
나아가, 본 발명에 따른 동영상 전송 시스템의 인코더는 동영상의 프레임의 한 블록을 부호화할 때 상기 블록의 인접 블록의 부호화 정보와 이전 프레임의 동일한 위치에 있는 블록의 부호화 정보를 이용하여 부호화한다. Furthermore, the encoder of the video transmission system according to the present invention encodes a block of a video frame by using the encoding information of the adjacent block of the block and the encoding information of the block at the same position of the previous frame.
아울러, 본 발명에 따른 동영상 전송 시스템의 디코더는 상기 블록의 인접 블록의 부호화 정보와 이전 프레임에서 동일한 위치에 있는 블록의 부호화 정보를 이용하여 비트스트림을 재구성한다. In addition, the decoder of the video transmission system according to the present invention reconstructs a bitstream using encoding information of an adjacent block of the block and encoding information of a block located at the same position in a previous frame.
본 발명의 Of the present invention 실시예Example
이하에서는 본 발명의 바람직한 일 실시예를 도면과 관련하여 설명하도록 한다. 이러한 실시예는 본 발명의 한 태양에 불과한 것이며 본 발명의 권리범위를 제한하는 것으로 이해해서는 안 될 것이다. Hereinafter, a preferred embodiment of the present invention will be described with reference to the drawings. This embodiment is only an aspect of the present invention and should not be understood as limiting the scope of the present invention.
본 실시예에서는 본 발명의 기술적 사상을 H.264에 적용하였다. 본 실시예에서는 모든 블록의 크기가 4x4 픽셀로 정해져 있으며, n-1 번째 프레임의 부호화 정보를 n번째 프레임의 부호화에 사용한다고 가정하였다. 또한, 대상 블록을 양자화할 때 양자화 파라미터(QP)는 20으로 설정하였다(이때 양자화 스텝의 크기 Qstep는 6.5이다). 따라서, 전술한 표 7를 이용하면 α값은 0.145이고 β값은 0.71이다. In this embodiment, the technical idea of the present invention is applied to H.264. In the present embodiment, it is assumed that all blocks have a size of 4x4 pixels, and that encoding information of the n-1th frame is used for encoding the nth frame. In addition, when quantizing the target block, the quantization parameter QP is set to 20 (the size Qstep of the quantization step is 6.5). Therefore, using Table 7, the α value is 0.145 and the β value is 0.71.
먼저 본 발명의 일 실시예에 따라 프레임을 인코딩하는 과정에 대하여 설명하도록 한다. 먼저, 인코더는 n-1번째 프레임의 각 4x4 픽셀 크기의 차이값 블록에 대해서 도 6 에 나타난 H 행렬을 이용해 주파수 변환한다. 이렇게 변환된 행렬에 대해서 6.5 크기의 양자화 스텝을 이용해서 양자화한다. 이와 같이 얻어진 양자화 블록에 대해서 문맥 기반 적응적 가변 길이 부호화하는 과정에서 얻어지는 각 블록의 0이 아닌 계수들의 수(NumCoeff)에 대한 정보를 메모리에 저장한다.First, a process of encoding a frame according to an embodiment of the present invention will be described. First, the encoder frequency-transforms the difference block of 4x4 pixel size of the n-1 th frame using the H matrix shown in FIG. The transformed matrix is quantized using a 6.5 quantization step. For the quantization block thus obtained, information about the number NumCoeff of non-zero coefficients of each block obtained in the context-based adaptive variable length encoding process is stored in a memory.
n-1 번째 프레임의 인코딩이 끝난 다음 n 번째 프레임을 인코딩할 때 n-1 프레임을 인코딩할 때의 과정을 그대로 반복한다. n 번째 프레임에서 부호화하는 과정을 구체적으로 설명하면 다음과 같다.After encoding the n-1th frame and then encoding the nth frame, the process of encoding the n-1 frame is repeated as it is. A process of encoding in the n-th frame will be described in detail as follows.
n-1 번째 프레임의 블록(506)을 부호화할 때에는 위쪽 블록(502)와 왼쪽 블록(504)가 이미 부호화되어 있고, 그 과정에서 얻어진 블록들에서 0이 아닌 계수들의 수를 각각 NU=3, NL=2이고, n-1 프레임에서 블록(506)과 동일한 위치에 있는 블록(500)의 0이 아닌 계수들의 수를 Np = 0 이라고 가정한다. When encoding
따라서, 수학식 1에 의해서 블록(506)의 참조값 N을 구하면 round(0.145 x 5 +0.71 x 0) = 1 이 된다. 상기 표 1 에 기재되어 있는 바와 같이, N=1의 값에 대해 사용하는 가변길이 부호화표는 표 4에 주어진 바와 같은 Num-VLC0이 된다. 이를 종래기술과 비교하면, 종래기술에서는 N = round(NL+NU)/2 의 식에서 N값이 3이 되므로 동일한 블록(506)을 부호화하기 위해 Num-VLC1을 사용하게 된다. 따라서, 본 발명의 실시예와 종래의 H.264에서는 상이한 가변길이 부호화표를 사용하게 된다.Therefore, when the reference value N of the
n번째 프레임에서 부호화하고자 하는 블록(506)에 대한 행렬이 다음의 표 8와 같이 주어진다. A matrix for the
위의 표 8의 블록을 도 3에 나타난 순서와 같이 스캔닝하면 0, 3, 0, 1, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0의 비트열이 얻어진다. 이 행렬에서 0이 아닌 계수는 3, 1, -1, -1, 1 이므로, 0이 아닌 계수의 수(NumCoeff)는 5가 된다. 아울러, 트레일링 1은 1, -1, -1, 1이 있으나, 이중에서 세 개까지만 고려되므로 트레일링 1의 수(T1s)는 3개가 된다. 표 8의 블록에 대해서 표 4에 주어진 Num-VLC0을 찾아보면, 코드값은 0001011이 되고, 이 코드값이 비트스트림의 최초 코드값이 된다. Scanning the blocks in Table 8 above in the order shown in Figure 3, 0, 3, 0, 1, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 A bit string of is obtained. The nonzero coefficients in this matrix are 3, 1, -1, -1, and 1, so the number of nonzero coefficients (NumCoeff) is 5. In addition, trailing 1 has 1, -1, -1, 1, but since only three of them are considered, the number of trailing 1 (T1s) is three. Looking at Num-VLC0 given in Table 4 for the block of Table 8, the code value is 0001011, and this code value is the first code value of the bitstream.
다음으로, 마지막 트레일링 1의 값은 양의 부호를 가지므로 0의 코드값이 부여되고, 나머지 두 개의 트레일링 1은 음의 값을 가지므로 1의 코드값이 부여된다. 따라서, 트레일링 1의 부호에 따른 비트열은 011이 된다. Next, since the last trailing 1 value has a positive sign, a code value of 0 is assigned, and the other two trailing 1 have a negative value, so a code value of 1 is given. Accordingly, the bit string corresponding to the sign of trailing 1 is 011.
3개의 트레일링 1의 앞에 오는 0이 아닌 계수는 1이므로 Level_VLC0 표를 사용해서 코드값은 1이 된다. 다음으로 0이 아닌 계수는 3이므로 Level_VLC1 표를 사용해서 코드값은 0010이 된다. 이와 같이, Level_VLC 표를 사용하여 계수의 크기에 대한 비트열을 생성하는 방법에 대해서는 H.264 표준에 상세히 설명되어 있으므로 구체적인 설명을 생략하도록 한다. The nonzero coefficient before the three trailing ones is 1, so the code value is 1 using the Level_VLC0 table. The next nonzero coefficient is 3, so the code value is 0010 using the Level_VLC1 table. As described above, a method of generating a bit string for coefficient sizes using the Level_VLC table is described in detail in the H.264 standard, and thus a detailed description thereof will be omitted.
이어서, 마지막 트레일링 1의 앞에 있는 0의 수에 대해 부호화한다. 마지막 트레일링 1 앞의 비트열은 0, 3, 0, 1, -1, -1, 0 이므로, 총 3개의 0인 계수가 있다. 이를 별도의 가변길이 부호화표를 이용해서 부호화하면 111의 값이 지정된다. 0인 계수의 수에 대해서 비트열을 생성하는 방법에 대해서는 역시 H.264 표준에 상세히 설명되어 있으므로 구체적인 설명을 생략하도록 한다. Next, we code for the number of zeros before the last trailing one. Since the bit stream before the last trailing 1 is 0 , 3, 0 , 1, -1, -1, 0 , there are a total of 3 coefficients. When this is encoded using a separate variable length encoding table, a value of 111 is designated. The method of generating a bit string for the number of coefficients that are zero is also described in detail in the H.264 standard, and thus a detailed description thereof will be omitted.
다음으로, 트레일링 1의 앞에 위치한 0의 위치를 부호화하면 101101이 된다. 0인 아닌 계수의 앞에 있는 0인 계수에 대한 비트열을 생성하는 방법에 대해서는 역시 H.264 표준에 상세히 설명되어 있으므로 구체적인 설명을 생략하도록 한다.Next, if the position of 0 located before trailing 1 is encoded, 101101 is obtained. The method of generating a bit string for a zero coefficient before a nonzero coefficient is also described in detail in the H.264 standard, so a detailed description thereof will be omitted.
이러한 과정을 표 8의 블록에 대해서 얻어지는 비트스트림은 밟아 최종적으로 얻어지는 0001011 011 10010 111 101101 이 된다. The bitstream obtained with respect to the block shown in Table 8 is subjected to this process, resulting in 0001011 011 10010 111 101101.
이하에서는, 이와 같이 인코더에서 송신된 비트스트림을 디코더에서 수신해서 복호화하는 실시예에 대하여 설명하도록 한다. 본 발명의 실시예에 따른 디코더에서는 n-1번째 프레임에 대해서 이미 복호화를 끝내고 n-1 번째 프레임의 각 블록에 대한 복호화 정보, 즉 0이 아닌 계수의 수(Np)를 메모리에 저장하고 추후 n번째 프레임의 복호화시에 사용한다. Hereinafter, an embodiment of receiving and decoding a bitstream transmitted from an encoder in the decoder will be described. In the decoder according to the embodiment of the present invention, the decoding has already been completed for the n-1th frame, and the decoding information for each block of the n-1th frame, that is, the number N non-zero coefficients (N p ) is stored in the memory. Used to decode the nth frame.
n 번째 대상 프레임의 대상 블록(506)을 복호화할 때, 이미 n-1 번째 프레임의 블록(500)에 대해서 복화화되어 Np값이 얻어진 상태이다. 마찬가지로, 대상 블록(506)의 위쪽 블록(502)과 왼쪽 블록(504)도 복호화되어 0이 아닌 계수의 수(NU, NL)가 구해져 있는 상태이다. 따라서, 블록(506)을 복호화할 때 NU = 3, NL = 2, NP = 0 을 알 수 있고, 다른 비트스트림을 통해 양자화 파라미터(QP)가 엔트로피 복호화기에 전달되어 있다. 따라서, 수학식 1로부터 참조값(N)을 계산할 수 있다. 이렇게 계산된 값은 인코더에서와 마찬가지로 1이다. When decoding the
이렇게 얻어진 참조값으로부터 블록(506)의 복호화에 사용할 가변길이 부호화표가 Num-VLC0 으로 정해진다. 그러면, 0001011 이라는 최초 비트열에서 0이 아닌 계수의 수(NumCoeff)와 트레일링 1의 수(T1s)가 얻어진다. 위와 같은 비트열에서는 트레일링 1의 수가 3이므로, 그 다음 3개의 비트는 트레일링 1의 부호를 지칭하게 된다. 따라서, 0001011 011 으로부터 1, -1, -1의 비트열이 재구성된다. From the reference value thus obtained, the variable length coding table to be used for decoding the
이어지는 비트열은 0이 아닌 계수의 크기를 나타내므로 이어지는 0이 아닌 비트의 크기는 1과 3이 된다. 즉, 0001011 011 10010 으로부터 3, 1, -1, -1, 1의 비트열이 재구성된다. 다음의 111 비트는 상기 열의 마지막 1 앞에 있는 0의 수가 3개라는 것의 의미하고, 101101는 이들 0의 위치에 대하여 알려준다. 그 결과 재구성되는 비트열은 디코더에서 부호화하였던 비트열과 같은 3, 0, 1, -1, -1, 0, 1이 된다. 마지막 1 다음의 나머지 9개의 비트는 0으로 채워지게 된다. The subsequent bit strings represent the magnitudes of the nonzero coefficients, so the nonzero bit sizes are 1 and 3. That is, the bit strings of 3, 1, -1, -1, 1 are reconstructed from 0001011 011 10010. The next 111 bits means that the number of zeros before the last one of the column is three, and 101101 tells us about the location of these zeros. As a result, the reconstructed bit string is 3, 0, 1, -1, -1, 0, 1, which is the same as the bit string encoded by the decoder. The remaining nine bits after the last one are filled with zeros.
비록 위의 실시예에서는 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법을 H.264 방식에 적용하였지만, 본 발명은 H.264 방식에 한정되지 않고, 문맥 기반 적응성 가변 길이 부호화를 이용하여 복수의 프레임으로 구성된 데이터를 전송하기 위해 사용하는 다양한 방식의 압축 기술에 적용할 수 있다. Although in the above embodiment, the context-based adaptive variable length coding method according to the present invention is applied to the H.264 method, the present invention is not limited to the H.264 method, and a plurality of frames using the context-based adaptive variable length coding method are used. The present invention can be applied to various types of compression techniques used to transmit data consisting of data.
뿐만 아니라, 본 실시예에서는 H.264에서 정해진 가변길이 부호화표를 이용하였지만, H.264 표준과 다른 수의 가변길이 부호화표로 구성되거나 같은 수의 가변길이 부호화표를 사용하더라도 코드값이 상이한 가변길이 부호화표를 물론 사용할 수도 있다. In addition, in the present embodiment, the variable length coding table specified in H.264 is used. However, even if the variable length coding table is composed of a number of variable length coding tables different from the H.264 standard or the same number of variable length coding tables is used, variable lengths having different code values are different. The encoding table can of course also be used.
본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법을 이용하면 보다 효율적으로 부호화를 수행할 수 있다. 본 발명에 따른 방법을 이용하면 대상 블록에서 예상되는 0이 아닌 계수의 수(N)를 보다 정확하게 예측할 수 있어 보다 효율적으로 문맥 기반 적응성 가변 길이 부호화 및 복호화를 할 수 있다. 다음의 표 9는 종래의 H.264에 의해 부호화되었을 때 예측된 0이 아닌 계수의 수에 대한 정확도와 본 발명에 따라 부호화되었을 때 예측된 0이 아닌 계수의 수에 대한 정확도를 여러가지 테스트 영상과 양자화 파라미터(QP)에 대하여 비교한 것이다. The context-based adaptive variable length coding method according to the present invention can perform encoding more efficiently. The method according to the present invention can more accurately predict the number N of non-zero coefficients expected in the target block, thereby enabling more efficient context-based adaptive variable length encoding and decoding. Table 9 below shows the accuracy of the predicted number of nonzero coefficients when encoded by the conventional H.264 and the predicted number of nonzero coefficients when encoded according to the present invention. Comparisons are made with respect to the quantization parameter (QP).
위의 표 9에서 알 수 있는 바와 같이, 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법은 종래의 H.264에 비하여 참조값(N)을 예상하는 정확도가 현저하게 우수함을 알 수 있다.As can be seen from Table 9, the context-based adaptive variable length coding method according to the present invention can be seen that the accuracy of predicting the reference value (N) is significantly superior to the conventional H.264.
이와 같은 정확도에 따라 낮은 비트 전송 대역폭을 이용하여 동일한 동영상을 전송할 수 있다. 아래의 표 10은 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법을 사용하였을 때와 종래의 H.264에 따른 문맥 기반 적응성 가변 길이 부호화 방법을 사용하였을 때 필요한 비트 전송 대역폭을 나타낸다. According to this accuracy, the same video can be transmitted using a low bit transmission bandwidth. Table 10 below shows the bit transmission bandwidth required when the context-based adaptive variable length coding method according to the present invention is used and when the context-based adaptive variable length coding method according to the conventional H.264 is used.
위의 표 10에서 알 수 있듯이, 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법을 이용하면 보다 낮은 비트 전송 대역폭을 이용해 동일한 내용의 동영상을 전송할 수 있다는 것을 확인할 수 있다. 따라서, 본 발명에 따른 문맥 기반 적응성 가변 길이 부호화 방법을 이용하면 보다 높은 압축율로 동영상을 전송할 수 있게 된다.As shown in Table 10 above, it can be seen that using the context-based adaptive variable length coding method according to the present invention, it is possible to transmit a video having the same content using a lower bit transmission bandwidth. Therefore, by using the context-based adaptive variable length coding method according to the present invention, a video can be transmitted at a higher compression rate.
Claims (44)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020060063696A KR100801967B1 (en) | 2006-07-07 | 2006-07-07 | Encoder and decoder for Context-based Adaptive Variable Length Coding, methods for encoding and decoding the same, and a moving picture transmission system using the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020060063696A KR100801967B1 (en) | 2006-07-07 | 2006-07-07 | Encoder and decoder for Context-based Adaptive Variable Length Coding, methods for encoding and decoding the same, and a moving picture transmission system using the same |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20080004855A KR20080004855A (en) | 2008-01-10 |
KR100801967B1 true KR100801967B1 (en) | 2008-02-12 |
Family
ID=39215441
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020060063696A KR100801967B1 (en) | 2006-07-07 | 2006-07-07 | Encoder and decoder for Context-based Adaptive Variable Length Coding, methods for encoding and decoding the same, and a moving picture transmission system using the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100801967B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010002148A2 (en) * | 2008-07-04 | 2010-01-07 | 에스케이텔레콤 주식회사 | Video encoding and decoding apparatus and method |
KR101284559B1 (en) | 2011-12-22 | 2013-07-11 | 광주과학기술원 | Media compression and transport method using graphic processing units and apparatus for implementing same |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106101718B (en) * | 2010-01-12 | 2019-04-16 | Lg电子株式会社 | The processing method and equipment of vision signal |
KR101362441B1 (en) * | 2010-07-16 | 2014-02-18 | 인텔렉추얼디스커버리 주식회사 | Apparatus and Method of Multi-level Quantization for Quad-tree based Macroblock Coding |
KR101442127B1 (en) | 2011-06-21 | 2014-09-25 | 인텔렉추얼디스커버리 주식회사 | Apparatus and Method of Adaptive Quantization Parameter Encoding and Decoder based on Quad Tree Structure |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20050011734A (en) * | 2002-03-22 | 2005-01-29 | 리얼네트웍스 인코포레이티드 | Context-adaptive vlc video transform coefficients encoding/decoding methods and apparatuses |
KR20060082609A (en) * | 2005-01-13 | 2006-07-19 | 삼성전자주식회사 | Context adaptive variable length coding apparatus and method thereof |
-
2006
- 2006-07-07 KR KR1020060063696A patent/KR100801967B1/en not_active IP Right Cessation
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20050011734A (en) * | 2002-03-22 | 2005-01-29 | 리얼네트웍스 인코포레이티드 | Context-adaptive vlc video transform coefficients encoding/decoding methods and apparatuses |
KR20060082609A (en) * | 2005-01-13 | 2006-07-19 | 삼성전자주식회사 | Context adaptive variable length coding apparatus and method thereof |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010002148A2 (en) * | 2008-07-04 | 2010-01-07 | 에스케이텔레콤 주식회사 | Video encoding and decoding apparatus and method |
WO2010002148A3 (en) * | 2008-07-04 | 2010-04-22 | 에스케이텔레콤 주식회사 | Video encoding and decoding apparatus and method |
KR101501568B1 (en) * | 2008-07-04 | 2015-03-12 | 에스케이 텔레콤주식회사 | video encoding, decoding apparatus and method |
KR101284559B1 (en) | 2011-12-22 | 2013-07-11 | 광주과학기술원 | Media compression and transport method using graphic processing units and apparatus for implementing same |
Also Published As
Publication number | Publication date |
---|---|
KR20080004855A (en) | 2008-01-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6526869B2 (en) | Adaptive Coding of Prediction Error in Hybrid Video Coding | |
KR101622450B1 (en) | Video encoding and decoding using transforms | |
EP1529401B1 (en) | System and method for rate-distortion optimized data partitioning for video coding using backward adaptation | |
EP2311266B1 (en) | Video coding with coding of the locations of significant coefficients in a block of coefficients | |
EP1435063B1 (en) | Method and system for context-based adaptive binary arithmetic coding | |
JP4308138B2 (en) | Context-based adaptive variable length coding for adaptive block transform | |
US7738554B2 (en) | DC coefficient signaling at small quantization step sizes | |
EP1033036B1 (en) | Adaptive entropy coding in adaptive quantization framework for video signal coding systems and processes | |
KR0129558B1 (en) | Adaptive variable length coding method and apparatus | |
US20060232452A1 (en) | Method for entropy coding and decoding having improved coding efficiency and apparatus for providing the same | |
US20040213345A1 (en) | Multi-resolution video coding and decoding | |
EP2262269A2 (en) | Skip macroblock coding | |
US5848195A (en) | Selection of huffman tables for signal encoding | |
WO2004038921A2 (en) | Method and system for supercompression of compressed digital video | |
JP2009531997A (en) | Method and system for encoding and decoding information related to video compression | |
US11677964B2 (en) | DC coefficient signaling at small quantization step sizes | |
KR20060122684A (en) | Method for encoding and decoding video signal | |
KR100801967B1 (en) | Encoder and decoder for Context-based Adaptive Variable Length Coding, methods for encoding and decoding the same, and a moving picture transmission system using the same | |
US20070047639A1 (en) | Rate-distortion video data partitioning using convex hull search | |
EP1720356A1 (en) | A frequency selective video compression | |
EP1841235A1 (en) | Video compression by adaptive 2D transformation in spatial and temporal direction | |
WO2009031904A2 (en) | Method for alternating entropy coding | |
WO2001017268A1 (en) | Scalable coding | |
EP1768416A1 (en) | Frequency selective video compression and quantization | |
KR20000031283A (en) | Image coding device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20121211 Year of fee payment: 6 |
|
FPAY | Annual fee payment |
Payment date: 20131211 Year of fee payment: 7 |
|
FPAY | Annual fee payment |
Payment date: 20141218 Year of fee payment: 8 |
|
FPAY | Annual fee payment |
Payment date: 20151217 Year of fee payment: 9 |
|
LAPS | Lapse due to unpaid annual fee |