KR101337410B1 - bit-rate control method for a macro-block - Google Patents

bit-rate control method for a macro-block Download PDF

Info

Publication number
KR101337410B1
KR101337410B1 KR1020100133005A KR20100133005A KR101337410B1 KR 101337410 B1 KR101337410 B1 KR 101337410B1 KR 1020100133005 A KR1020100133005 A KR 1020100133005A KR 20100133005 A KR20100133005 A KR 20100133005A KR 101337410 B1 KR101337410 B1 KR 101337410B1
Authority
KR
South Korea
Prior art keywords
block
value
bit
calculating
bit generation
Prior art date
Application number
KR1020100133005A
Other languages
Korean (ko)
Other versions
KR20120071455A (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 KR1020100133005A priority Critical patent/KR101337410B1/en
Publication of KR20120071455A publication Critical patent/KR20120071455A/en
Application granted granted Critical
Publication of KR101337410B1 publication Critical patent/KR101337410B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/184Methods 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 bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors

Abstract

본 발명은 ISDB-T 및 디지털 시네마용 마스터링 시스템의 비디오 부호화기의 H.264 부호화 시스템에서 비트 발생 가능성을 블록간 평균과 분산으로 예측하여 블록에 대한 비트율 제어량을 결정하는 방법이다.
상기 동영상 부호기에서 대블록을 위한 비트율 제어 방법은 초기화 이후, 16x16 블록의 움직임 벡터를 예측하는 단계와, 상기 16x16 블록의 움직임 벡터 예측 결과에서 각 4x4 블록의 평균과 분산을 계산하는 단계와, 가우시안 분포에서 사용하는 상기 평균과 분산 정보를 사용하여 비트 발생 예측치를 계산하는 단계와, 상기 비트 발생 예측치와 상기 분산을 곱함으로써 비트 발생량의 강도를 계산하는 단계와. 상기 비트 발생량의 강도에 기초하여 양자화 계수 제어값을 구하는 단계와, 상기 양자화 계수 제어값에 따라 영상에 대한 비트율을 제어하는 단계를 포함한다.
이러한 본 발명은 동영상 부호화에서 첫 번째 16x16 블록 연산만으로 P 및 B 프레임에서 I 블록을 제외한 블록 모드에 대한 비트율 제어량을 고속으로 결정할 수 있으므로 비트율 제어를 위한 이산 여현 연산(DCT)과 양자화 연산 혹은 Two-pass 비트율 제어등이 필요 없기 때문에 연산량이 획기적으로 감소하고 이에 따라 계산 시간을 획기적으로 줄일 수 있다.
The present invention is a method for determining a bit rate control amount for a block by predicting bit generation probability by inter-block average and variance in an H.264 encoding system of a video encoder of an ISDB-T and a digital cinema mastering system.
In the video encoder, a method of controlling a bit rate for a large block includes, after initialization, predicting a motion vector of a 16x16 block, calculating an average and a variance of each 4x4 block in the motion vector prediction result of the 16x16 block, and Gaussian distribution. Calculating a bit generation prediction value using the average and the variance information used in the step of calculating a strength of a bit generation amount by multiplying the bit generation prediction value and the variance; Obtaining a quantization coefficient control value based on the intensity of the bit generation amount, and controlling a bit rate of an image according to the quantization coefficient control value.
In the present invention, since the bit rate control amount for the block mode except for the I blocks in the P and B frames can be determined at high speed by only the first 16x16 block operation in video encoding, the discrete cosine operation (DCT) and quantization operation or two- Since the pass bit rate control is not necessary, the computation amount is drastically reduced, and the computation time can be drastically reduced.

Description

동영상 부호기의 대블록에 대한 비트율 제어 방법{bit-rate control method for a macro-block}Bit-rate control method for a macro-block}

본 발명은 ISDB-T 및 디지털 시네마용 마스터링 시스템의 비디오 부호화기에서 비트 발생 가능성을 예측하여 블록에 대한 양자화 계수를 더하거나 빼서 영상에 대한 비트율을 제어하는 방법으로, 보다 상세하게는 각 블록간 평균과 분산으로 수행되는 비트 발생 가능성을 예측 하여 이 정보를 사용, 비트율을 제어하는 방법으로서, 실시간 동영상 부호화를 위해 별도의 비트율 산정을 위한 이산 여현부호화 및 양자화 과정등을 전혀 거치지 않는 비트율 제어 방법에 관한 것이다.The present invention is a method of controlling the bit rate of an image by adding or subtracting quantization coefficients for a block by predicting the possibility of bit generation in a video encoder of an ISDB-T and a digital cinema mastering system. A method of controlling bit rate by using this information by predicting the possibility of bit generation performed by variance. The present invention relates to a bit rate control method that does not undergo discrete cosine coding and quantization for separate bit rate calculation for real-time video encoding. .

디지털 시네마, 고화질 텔레비전, 주문형 동영상(VOD) 수신기, MPEG(Moving Picture Experts Group) 영상을 지원하는 퍼스널 컴퓨터, 게임기, 지상파 디지털 방송 수신기, 디지털 위성 방송 수신기 및 케이블 텔레비전(CATV) 등에서 사용되는 디지털 영상 데이터는 영상 자체의 특성과 아날로그 신호를 디지털화하는 과정에서 데이터량이 크게 늘어나기 때문에 그대로 사용되기보다는 효율적인 압축방법에 의해 압축된다.Digital video data used in digital cinema, high-definition television, video-on-demand (VOD) receivers, personal computers that support moving picture experts group (MPEG) video, game consoles, terrestrial digital broadcast receivers, digital satellite broadcast receivers, and cable television (CATV) Compression is compressed by an efficient compression method rather than being used as it increases the amount of data in the process of digitizing the analog signal and the characteristics of the image itself.

디지털 영상 데이터의 압축은 크게 3가지 방법을 이용하고 있다. 시간적인 중복성(temporal redundancy)을 줄이는 방법과 공간적인 중복성(spatial redundancy)을 줄이는 방법 그리고 발생 부호의 통계적 특성을 이용하여 줄이는 방법이 주로 이용된다. 이중에서 시간적인 중복성을 줄이는 대표적인 방법이 바로 움직임 추정 및 보상 방법으로서 MPEG, H.264 등 대부분의 동영상 압축 표준안에서 사용되고 있다.The compression of digital image data uses three methods. A method of reducing temporal redundancy, a method of reducing spatial redundancy, and a method of reducing using statistical characteristics of generated codes are mainly used. Among them, a representative method of reducing temporal redundancy is motion estimation and compensation, which is used in most video compression standards such as MPEG and H.264.

대부분의 동영상 표준안은 현재 화면의 특정 부분에 대해 이전 또는 이후의 기준 화면으로부터 가장 유사한 부분을 찾고, 두 부분의 차이 성분만을 전송하는 방식이며 이때 많은 경우, 대블록 단위 (Macroblock) 단위로 연산을 수행하기 때문에 블록 단위의 동영상 압축 방식이 동영상 압축에 있어 가장 대표적인 알고리즘이다. Most video standards find the most similar part from the previous or subsequent reference screen for a specific part of the current screen, and transmit only the difference component of the two parts. In many cases, operations are performed in units of macroblocks. Therefore, block-based video compression is the most representative algorithm for video compression.

블록 단위 추정방법은 영상을 일정한 크기의 블록으로 분할하고 이전 영상의 탐색 영역내에서 현재 영상의 블록과 가장 잘 정합되는 블록을 찾는 방법이다. 찾은 블록과 현재 영상블록과의 차를 움직임 벡터라고 하는데 이를 부호화하여 처리한다. 두 블록간의 정합계산에는 여러 가지 정합함수들이 사용될 수 있는데 가장 많이 사용되는 것은 두 블록간 화소들 차의 절대값을 모두 합한 값인 SAD(Sum of Absolute Difference)이다.The block unit estimation method divides an image into blocks of a predetermined size and finds a block that best matches a block of the current image in a search region of a previous image. The difference between the found block and the current video block is called a motion vector, which is encoded and processed. Various matching functions can be used to calculate the matching between two blocks. The most commonly used is sum of absolute difference (SAD), which is a sum of absolute values of the difference between pixels between two blocks.

기존 동영상 코덱과는 달리 H.264 코덱의 경우에는 SAD 위주의 탐색 방법 대신 RDO(Rate Distortion Optimization)에 기반한 Cost 함수를 통해 탐색을 수행한다. H.264에서 사용하는 Cost 함수는 기존의 SAD 값에 부호화된 계수의 개수에 라그랑지안 멀티플라이어를 곱한 것의 합으로 이루어진 Rate-Distortion Cost (RD-Cost)를 사용하여 탐색을 하게 된다. 따라서, H.264의 RD-Cost를 구하기 위해서는 SAD가 아닌 SSD(Sum of Squared Difference)가 사용되는 경우가 많으며 이 때문에 기존 SAD를 사용하는 비디오 코덱과는 RD 부분에서 다른 특성을 나타낸다.Unlike the existing video codec, the H.264 codec searches through the Cost function based on Rate Distortion Optimization (RDO) instead of the SAD-oriented search method. The Cost function used in H.264 searches using the Rate-Distortion Cost (RD-Cost), which is the sum of the number of encoded coefficients multiplied by the Lagrangian multiplier. Therefore, in order to obtain RD-Cost of H.264, SSD (Sum of Squared Difference) is often used instead of SAD. Therefore, RD-COST is different from that of video codec using SAD.

또한, H.264 동영상 부호화에서는 압축효율과 높은 화질을 동시에 얻기 위하여 기존의 동영상 부호화에서는 16 대 16 대블록 혹은 8 대 8 대블록 단위로 부호화를 수행한 것과 달리, 모두 8가지의 서로 다른 블록화 모드를 가지고 각각의 블록중에서 최소 값을 가지는 모드를 선택하도록 구성되어 있다.In addition, in the H.264 video encoding, in order to simultaneously obtain compression efficiency and high image quality, the eight video block modes are all different from the conventional video encoding, which is performed in units of 16 to 16 large blocks or 8 to 8 large blocks. It is configured to select the mode having the minimum value among each block with.

그러나 8가지의 서로 다른 블록화 모드를 결정하기 위해서 각 모드에 대하여 각종 부호화 연산이 모두 독립적으로 수행될 뿐만 아니라, 화질 개선과 비트 절감을 위한 블록 단위 비트율 제어를 할 경우, 기존의 블록 모드 결정 결과는 모두 새롭게 결정된 양자화 계수에 의해 다시 결정되어야 하므로 엄청난 계산량 증가를 가져오게 된다.However, in order to determine eight different blocking modes, not only all the encoding operations are performed independently for each mode, but also when the block rate control is performed for the improvement of image quality and the bit reduction, the conventional block mode decision result is All must be re-determined by the newly determined quantization coefficients, resulting in a tremendous amount of computation.

그러므로 실시간 동영상 부호화를 이루기 위해서는 블록 단위 비트율 제어에 있어 효율적인 알고리즘을 적용하여 모드 결정 및 블록 단위 비트율 제어에 의한 연산 증가를 최소로 줄이면서 화질 저하를 피할 수 있어야 한다. Therefore, in order to achieve real-time video encoding, an efficient algorithm should be applied to block-level bit rate control to reduce image quality while minimizing operation increase by mode determination and block-level bit rate control.

따라서, 본 발명은 상술한 종래의 문제점을 해결하기 위한 것으로서, 본 발명이 이루고자 하는 기술적 과제는 ISDB-T 및 디지털 시네마용 마스터링 시스템의 비디오 부호화기에서 비트 발생 가능성 예측 방법에 의하여 블록 단위 비트율 결정을 빠르게 수행하기 위한 방법을 제공함을 목적으로 한다.Accordingly, an aspect of the present invention is to solve the above-described problems, and a technical problem to be solved by the present invention is to determine a block rate in a video encoder of an ISDB-T and a digital cinema mastering system. Its purpose is to provide a method to perform quickly.

또한, 본 발명은 ISDB-T 및 디지털 시네마용 마스터링 시스템의 비디오 부호화기에서 비트 발생 가능성 예측 방법을 통해 비트율 제어를 병렬적으로 수행하면서 고 화질의 영상을 부호화 할 수 있는 방법을 제공함을 목적으로 한다.Another object of the present invention is to provide a method for encoding a high quality image while performing bit rate control in parallel through a bit probability prediction method in a video encoder of an ISDB-T and a digital cinema mastering system. .

상기 목적을 달성하기 위한 본 발명의 일 측면에 따라, 동영상 부호기에서 대블록을 위한 비트율 제어 방법은 초기화 이후, 16x16 블록의 움직임 벡터를 예측하는 단계와, 상기 16x16 블록의 움직임 벡터 예측 결과에서 각 4x4 블록의 평균과 분산을 계산하는 단계와, 가우시안 분포에서 사용하는 상기 평균과 분산 정보를 사용하여 비트 발생 예측치를 계산하는 단계와, 상기 비트 발생 예측치와 상기 분산을 곱함으로써 비트 발생량의 강도를 계산하는 단계와. 상기 비트 발생량의 강도에 기초하여 양자화 계수 제어값을 구하는 단계와, 상기 양자화 계수 제어값에 따라 영상에 대한 비트율을 제어하는 단계를 포함한다.According to an aspect of the present invention for achieving the above object, a method of controlling a bit rate for a large block in a video encoder after the initialization step of predicting the motion vector of the 16x16 block, each 4x4 in the motion vector prediction result of the 16x16 block Calculating a mean and variance of the block, calculating a bit generation prediction value using the mean and variance information used in the Gaussian distribution, and calculating the strength of the bit generation amount by multiplying the bit generation prediction value and the variance. With the steps. Obtaining a quantization coefficient control value based on the intensity of the bit generation amount, and controlling a bit rate of an image according to the quantization coefficient control value.

본 발명에 따르면, 동영상 부호화에서 첫 번째 16x16 블록 연산만으로 P 및 B 프레임에서 I 블록을 제외한 블록 모드에 대한 비트율 제어량을 고속으로 결정할 수 있으므로 비트율 제어를 위한 이산 여현 연산(DCT)과 양자화 연산 혹은 Two-pass 비트율 제어등이 필요 없기 때문에 연산량이 획기적으로 감소하고 이에 따라 계산 시간을 획기적으로 줄일 수 있다.According to the present invention, since the bit rate control amount for the block mode except for the I blocks in the P and B frames can be determined at high speed only by the first 16x16 block operation in the video encoding, the discrete cosine operation (DCT) and the quantization operation for the bit rate control or two Since there is no need for -pass bit rate control, the amount of computation is greatly reduced, and computation time can be drastically reduced.

도 1은 본 발명에 적용되는 ISDB-T 및 디지털 시네마용 마스터링 시스템의 비디오 부호화기의 H.264 부호화 시스템에 대한 블록도이다.
도 2는 H.264 비디오 코덱에서 사용되는 대블록 분할 모드를 나타내는 것으로, 본 발명에 적용되는 H.264 블록 모드를 설명하기 위한 다이어그램이다.
도 3은 비트 발생 가능성 예측을 위한 DCT 및 확률밀도 함수의 유사성에 대한 개념도이다.
도 4는 본 발명의 실제 구현에 따르는 비트 발생 가능성 예측을 이용한 블록에 대한 비트율 제어 방법을 설명하기 위한 순서도이다.
1 is a block diagram of an H.264 encoding system of a video encoder of an ISDB-T and a digital cinema mastering system according to the present invention.
2 is a diagram illustrating a large block division mode used in an H.264 video codec, and is a diagram for explaining an H.264 block mode applied to the present invention.
3 is a conceptual diagram of the similarity between a DCT and a probability density function for predicting bit probability.
4 is a flowchart illustrating a method of controlling a bit rate for a block using bit probability prediction according to an actual implementation of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다. While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다. The terms first, second, A, B, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. When a component is referred to as being "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that other components may be present in between. Should be. On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the contextual meaning of the related art and are to be interpreted as either ideal or overly formal in the sense of the present application Do not.

이하, 본 발명에 따른 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

본 발명은 상술한 목적을 달성하기 위해 ISDB-T 및 디지털 시네마용 마스터링 시스템의 동영상 부호화기에서 비트 발생 가능성의 정의에 의한 비트 발생 가능성 예측 방법을 도출하고 이에 의하여 블록 단위 비트율 결정을 수행하기 위한 알고리즘을 서술한다.In order to achieve the above object, the present invention derives a bit probability prediction method by definition of bit probability in a video encoder of an ISDB-T and a digital cinema mastering system, thereby performing a block rate determination. Describes this.

이하, 본 발명에 따른 실시 예에 의한 H.264 동영상 부호화기를 위한 비트 발생 가능성 예측 방법과 이를 적용한 블록 단위 비트율 제어 방법을 첨부한 도면을 참조하여 상세히 설명하기로 한다.Hereinafter, a method of predicting bit probability for an H.264 video encoder according to an embodiment of the present invention and a method of controlling a bit rate of a block unit to which the same is applied will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 적용되는 디지털 시네마용 마스터링 시스템의 동영상 부호화기(H.264 and MPEG-4 Video Compression : Video Coding for Next-Generation Multimedia', Iain E. G. Richardson, Wiley, 2003)에 대한 블록도를 나타낸다.FIG. 1 is a block diagram of a video encoder (H.264 and MPEG-4 Video Compression: Video Coding for Next-Generation Multimedia ', Iain EG Richardson, Wiley, 2003) of a mastering system for a digital cinema applied to the present invention. Indicates.

도 1에 도시된 동영상 부호화기는 2개의 데이터흐름 경로, 즉 “포워드(forward)” 경로(외쪽에서 오른쪽으로) 및 “재구성(reconstruction)” 경로(오른쪽에서 왼쪽으로)를 포함한다. The video encoder shown in FIG. 1 includes two dataflow paths, a "forward" path (outward to right) and a "reconstruction" path (right to left).

포워드 경로에서 입력 프레임 또는 필드 Fn(101-1)는 대블록 단위로 처리된다. 각 대블록은 인트라 모드 또는 인터 모드로 부호화되며, 대블록에서의 각 블록에 대해, 예측 블록 PRED(도 1에서는 'P'로 표시)(143)는 재구성된 픽처 샘플들에 기초하여 형성된다. In the forward path, the input frame or field F n 101-1 is processed in units of blocks. Each large block is encoded in an intra mode or an inter mode, and for each block in the large block, a predictive block PRED (denoted as 'P' in FIG. 1) 143 is formed based on reconstructed picture samples.

인트라 모드(135)에서, PRED는 이전에 부호화되고 복호화되어 재구성된 현재의 슬라이스에서의 샘플들(도 1에서 uF'n(157)로 표시, 비필터링된 샘플들은 PRED를 형성하기 위해 사용됨)로부터 형성된다(132, 134).In intra mode 135, the PRED is taken from samples in the current slice that were previously coded, decoded, and reconstructed ( denoted as uF'n 157 in FIG. 1, unfiltered samples are used to form the PRED). Are formed (132, 134).

인터 모드(123)에서, PRED는 리스트 0 및/또는 리스트 1 기준 픽처들의 집합으로부터 선택된 하나 또는 두 개의 기준 픽처(들)로부터 움직임 추정기(Motion Estimation: ME)(112) 및 움직임 보상기(Motion Compensation: MC)(122)에 의해 움직임-보상된 예측에 의해 형성된다. In inter mode 123, PRED is a motion estimator (ME) 112 and a motion compensation: from one or two reference picture (s) selected from a set of list 0 and / or list 1 reference pictures. Formed by motion-compensated prediction by MC (122).

도 1에서, 기준 픽처는 이전의 부호화된 픽처 F'n -1(102-1)(101-1)이지만, 각 대블록 분할(인터 모드에서)를 위한 예측 기준은 이미 부호화되고, 재구성되어 필터링된 과거 또는 미래의 픽처(표시 순서상)의 선택으로부터 선택될 수 있다. 예측 PRED는 잔여 (차이) 블록 Dn을 생성하도록 감산기(102)에서 현재의 블록으로부터 차감되는데, 상기 Dn은 재오더링(reorder)되고(108) 엔트로피 부호화되는(110), 양자화 변환 계수들의 집합 X(107)를 제공하기 위해 변환기(104)에서 변환되고 양자화기(106)에서 양자화된다. 엔트로피-부화화된 계수들은 대블록 내의 각 블록을 복호화하는데 필요한 보조 정보(예측 모드들, 양자화 계수, 움직임 벡터 정보 등)와 함께, 전송 또는 저장을 위해 네트워크 적응 계층(Network Abstraction Layer: NAL)에 전달되는 압축된 비트스트림을 형성한다. In Fig. 1, the reference picture is the previous coded picture F ' n -1 (102-1) 101-1, but the prediction criteria for each large block division (in inter mode) are already coded, reconstructed and filtered Can be selected from a selection of past or future pictures (in the display order). The predictive PRED is subtracted from the current block in subtractor 102 to produce a residual (difference) block D n , where D n is reordered (108) and entropy coded (110). Transformed at converter 104 and quantized at quantizer 106 to provide X 107. Entropy-encoded coefficients, along with auxiliary information (prediction modes, quantization coefficients, motion vector information, etc.) needed to decode each block in a large block, are added to a Network Abstraction Layer (NAL) for transmission or storage. Form a compressed bitstream to be delivered.

대블록의 각 블록을 부호화하고 전송할 뿐 아니라, 부호화기는 추가적인 예측들을 위한 기준을 제공하기 위해 각 블록을 복호화한다(재구성한다). 계수들 X는 차이 블록 D'n을 생성하기 위해 스케일링(역양자화기(152)에서)되고, 역변환된다(역변환기(154)에서). 예측 블록 PRED는 재구성된 블록 uF'n(원래 블록의 복호화된 블록; u는 비필터링됨을 나타냄)(157)을 생성하기 위해 D'n에 더해진다. 필터(158)는 블록킹 왜곡(blocking distortion) 효과를 감소하기 위해 적용되며, 재구성된 기준 픽처는 일련의 블록 F'n(161)로부터 생성된다. In addition to encoding and transmitting each block of the large block, the encoder decodes (reconstructs) each block to provide a reference for further predictions. The coefficients X are scaled (in inverse quantizer 152) and inverse transformed (in inverse transformer 154) to produce a difference block D ' n . Prediction block PRED is added to D' n to produce reconstructed block uF ' n (decoded block of original block; u indicates unfiltered) 157. Filter 158 is applied to reduce the blocking distortion effect, and the reconstructed reference picture is generated from a series of blocks F ′ n 161.

특히, 움직임 추정기(112)는 정화소 단위의 움직임 벡터를 추정하는 정화소 추정기와, 찾아낸 정화소의 움직임 벡터를 근거로 하여 최적의 반화소 및 1/4 화소 단위의 움직임 벡터를 추정하는 부화소 추정기로 구성된다. In particular, the motion estimator 112 includes a refiner estimator for estimating a motion vector of a refinery unit and a subpixel estimator for estimating an optimal half pixel and a motion vector of a quarter pixel unit based on the found motion vector of the refinery unit. do.

한편, 전술한 바와 같이, H.264 동영상 부호화에서는 압축효율과 높은 화질을 동시에 얻기 위하여 기존의 동영상 부호화에서와 달리, 모두 8가지의 서로 다른 블록화 모드를 가지고 각각의 블록중에서 최소 값을 가지는 모드를 선택하도록 구성되어 있다.On the other hand, as described above, in order to simultaneously obtain compression efficiency and high image quality, in H.264 video encoding, unlike the conventional video encoding, all 8 different blocking modes and modes having the minimum value in each block are used. It is configured to choose.

도 2는 H.264 비디오 코덱에서 사용되는 대블록 분할 모드를 나타내는 것으로, 본 발명에 적용되는 H.264 블록 모드를 설명하기 위한 다이어그램이다.2 is a diagram illustrating a large block division mode used in an H.264 video codec, and is a diagram for explaining an H.264 block mode applied to the present invention.

도 2에 도시된 바와 같이, H.264 동영상 부호화에서는 16 x 16 대블록, 16 x 8 대블록, 8 x 16 대블록, 8 x 8 대블록 8 x 4 대블록 4 x 8 대블록, 및 4 대 4 대블록의 8가지 블록 모드를 포함한다. As shown in FIG. 2, in H.264 video encoding, 16 x 16 large blocks, 16 x 8 large blocks, 8 x 16 large blocks, 8 x 8 large blocks, 8 x 4 large blocks, 4 x 8 large blocks, and 4 Eight block modes of four to four blocks are included.

이하, 본 발명에 의한 비트 발생 가능성 예측 방법 및 예측된 비트 발생 가능성을 사용한 디지털 시네마용 마스터링 시스템의 동영상 부호화기의 블록 단위 비트율 제어 방법에 대해 설명하기로 한다. Hereinafter, a method of controlling a bit rate of a video encoder of a digital cinema mastering system using the predicted bit probability predictive method and the predicted bit probability will be described.

먼저, 본 발명의 이해를 돕기 위하여 종래 기술과 본 발명의 차이점을 살펴보기로 한다. First, the difference between the prior art and the present invention will be described in order to help understanding of the present invention.

종래에는 비트 발생 가능성이라는 개념 대신 부호화 블록 패턴(Coded Block Pattern: CBP) 도출을 위해 4x4 DCT 및 양자화를 수행하고 그 결과를 통해 CBP를 구한 뒤 이를 사용하여 P 프레임에서 스킵(SKIP) 모드 혹은 B 프레임에서 다이렉트(Direct) 모드 판정에 이용하였다. 그리고 도 2에서 나타난 나머지 모드에 대해서는 정화소 및 부화소 추정을 수행하고 그에 따른 레이트 왜곡(Rate Distortion) 연산을 수행하여 최소의 레이트 왜곡 값을 가지는 모드를 선택하는 방식이었다.Conventionally, 4x4 DCT and quantization are performed to derive a coded block pattern (CBP) instead of the concept of bit likelihood, and the CBP is obtained through the result, and then the skipped (SKIP) mode or the B frame is used in the P frame. Was used for direct mode determination. For the remaining modes shown in FIG. 2, a refinement and a subpixel estimation are performed, and a rate distortion calculation is performed to select a mode having a minimum rate distortion value.

반면에, 본 발명에서는, 첫 번째 16x16 모드 정화소 및 부화소 추정이 끝난 후 별도의 DCT 연산 및 양자화 연산을 수행하지 않고 추정을 통해 결정된 블록에 대하여 평균값과 분산을 구한 후 이를 통해 비트 발생 가능성 값을 예측하고 예측된 비트 발생 가능성값을 가지고 블록간 비트율 제어를 위한 제어 값을 결정한다. On the other hand, in the present invention, after the first 16x16 mode refiner and the subpixel estimation are finished, the average value and the variance of the block determined by the estimation are calculated without performing a separate DCT operation and quantization operation, and then, the bit probability value is obtained through this. The control value for bit rate control between blocks is determined by predicting and predicting bit probability.

본 발명의 대블록에 대한 비트율 제어 방법을 도 3 및 도 4를 참조하여 설명한다. A bit rate control method for a large block of the present invention will be described with reference to FIGS. 3 and 4.

도 4를 참조하면, 먼저, 단계 402에서 대블록 부호화를 위한 초기화가 수행된다. 이어서, 단계 404에서 16x16 블록의 움직임 벡터(Motion Vector: MV)를 예측한다. 이어서, 단계 406에서 16x16 블록의 움직임 벡터 예측 결과에서 각 4x4 블록의 평균과 분산을 계산한다. 이 때, 각 4x4 블록의 평균과 분산은 CBP(Coded Block Pattern)를 이용한다. CBP는 한 블록에 대해 DCT를 수행한 결과인 계수(Coefficient)값이 모두 0인지 아닌지를 나타낸다. 상기 CBP는 대블록 타입이 인트라(Intra)인 경우에는 첫번째 값을 인트라DC로 설정하며 이 값을 제외한 나머지 계수값을 기준으로 CBP를 결정하게 된다. 만약 계수값이 모두 0일 때에는 CBP는 0이며, 그렇지 않은 경우에는 1이 된다.Referring to FIG. 4, first, initialization for large block encoding is performed in step 402. Next, in step 404, a motion vector (MV) of a 16 × 16 block is predicted. Next, in step 406, the average and variance of each 4x4 block are calculated from the motion vector prediction result of the 16x16 block. At this time, the average and variance of each 4x4 block uses a CBP (Coded Block Pattern). The CBP indicates whether the coefficient values, which are the result of performing the DCT on one block, are all zero or not. When the large block type is Intra, the CBP sets the first value to IntraDC and determines the CBP based on the remaining coefficient values except for this value. If the counts are all zeros, the CBP is zero, otherwise it is 1.

일반적으로 CBP(Coded Block Pattern)은 다음과 같이 결정된다.In general, the CBP (Coded Block Pattern) is determined as follows.

도 4를 참조하면, 먼저, 단계 402에서 대블록 부호화를 위한 초기화가 수행된다. 이어서, 단계 404에서 16x16 블록의 움직임 벡터(Motion Vector: MV)를 예측한다. 이어서, 단계 406에서 16x16 블록의 움직임 벡터 예측 결과에서 각 4x4 블록의 평균과 분산을 계산한다. 이 때, 각 4x4 블록의 평균과 분산은 CBP(Coded Block Pattern)를 이용한다. CBP는 한 블록에 대해 DCT를 수행한 결과인 계수(Coefficient)값이 모두 0인지 아닌지를 나타낸다. 상기 CBP는 대블록 타입이 인트라(Intra)인 경우에는 첫번째 값을 인트라 DC로 설정하며 이 값을 제외한 나머지 계수값을 기준으로 CBP를 결정하게 된다. 만약 계수값이 모두 0일 때에는 CBP는 0이며, 그렇지 않은 경우에는 1이 된다.Referring to FIG. 4, first, initialization for large block encoding is performed in step 402. Next, in step 404, a motion vector (MV) of a 16 × 16 block is predicted. Next, in step 406, the average and variance of each 4x4 block are calculated from the motion vector prediction result of the 16x16 block. At this time, the average and variance of each 4x4 block uses a CBP (Coded Block Pattern). The CBP indicates whether the coefficient values, which are the result of performing the DCT on one block, are all zero or not. When the large block type is Intra, the CBP sets the first value to intra DC and determines the CBP based on the remaining coefficient values except for this value. If the counts are all zeros, the CBP is zero, otherwise it is 1.

일반적으로 CBP(Coded Block Pattern)은 다음과 같이 결정된다.In general, the CBP (Coded Block Pattern) is determined as follows.

먼저

Figure 112010085048088-pat00001
를 움직임 보상된 4x4 화소 데이터의 DCT 결과라고 하면, 이때 CBP는
Figure 112010085048088-pat00002
의 한 요소를 수학식 1과 같은 양자화 과정을 통해 결정된다.first
Figure 112010085048088-pat00001
Is the DCT result of the motion-compensated 4x4 pixel data, where CBP
Figure 112010085048088-pat00002
One element of is determined through a quantization process such as Equation 1.

Figure 112010085048088-pat00003
Figure 112010085048088-pat00003

수학식 1에서 i, j는

Figure 112010085048088-pat00004
의 i 번째 열 요소, j 번째 행 요소를 나타내는 첨자이며
Figure 112010085048088-pat00005
는 양자화된
Figure 112010085048088-pat00006
의 i 번째 열 요소, j 번째 행 요소 이며
Figure 112010085048088-pat00007
는 양자화 되기 전
Figure 112010085048088-pat00008
의 i 번째 열 요소, j 번째 행 요소 이며 QP는 H.264의 양자화 계수이다.
Figure 112010085048088-pat00009
는 QP, i, j의 함수로서 양자화 계수에 12을 더한 것을 6으로 나눈 나머지와 i, j의 요소에 따라 결정되는 양자화 함수이며 f는 양자화 레벨 오프셋 값이다. In Equation 1 i, j is
Figure 112010085048088-pat00004
The ith column element of, the jth row element of the subscript
Figure 112010085048088-pat00005
Is quantized
Figure 112010085048088-pat00006
The i th column element, the j th row element, and
Figure 112010085048088-pat00007
Before quantization
Figure 112010085048088-pat00008
Is the i th column element, the j th row element, and QP is the quantization coefficient of H.264.
Figure 112010085048088-pat00009
Is a function of QP, i, and j, which is a quantization function determined according to the remainder of quantization coefficient plus 12 divided by 6 and the elements of i and j, and f is a quantization level offset value.

수학식 1에서 양자화 계수가 하나라도 0이 아니면 4x4 블록의 CBP값은 1이 되며 그렇지 않으면 0이다. In Equation 1, if any one of the quantization coefficients is not 0, the CBP value of the 4x4 block is 1, otherwise it is 0.

비트 발생 가능성 예측은 DCT 연산의 결과를 2차원 확률 밀도 함수의 결과로 생각하고 평균과 분산으로 비트 발생 가능성을 도 3과 같이 예측하는 것이다.The bit likelihood prediction is to consider the result of the DCT operation as a result of the two-dimensional probability density function, and to predict the likelihood of the bit occurrence by the mean and the variance as shown in FIG.

도 3은 본 발명에서 1차원 DCT 출력값과 가우시안 확률 밀도 함수와의 비교를 통하여, 주파수/분산값(X)과 DCT출력값(Y)이 교차되는 가장 높은 값을 가지는 부분은 평균 혹은 DCT의 DC 성분을 도시하는 그래프도로서, 비트 발생 가능성 예측을 위한 DCT 및 확률밀도 함수의 유사성에 대한 개념도이다.FIG. 3 shows a comparison between the one-dimensional DCT output value and the Gaussian probability density function in the present invention, where the portion having the highest value at which the frequency / variance value (X) and the DCT output value (Y) intersect is the average or DC component of the DCT. Is a graph showing the similarity between the DCT and the probability density function for predicting bit probability.

도 3에 도시한 바와 같이, 1 차원 DCT 출력값과 가우시안 확률밀도 함수와의 비교 X, Y 가 교차되는 가장 높은 값을 가지는 부분은 평균 혹은 DCT의 DC 성분이 된다.As shown in Fig. 3, the comparison between the one-dimensional DCT output value and the Gaussian probability density function has the highest value where X and Y intersect the average or DC component of the DCT.

이때 평균의 경우는 4x4 DCT 연산의 DC 성분과 같은 값이며 DC 성분을 제외한 나머지 AC 성분의 경우 분산값이 적응적으로 결정되는 임계(Threshold) 값을 넘어가면 CBP를 1, 그렇지 않으면 0으로 예측한다.In this case, the average value is the same as the DC component of the 4x4 DCT operation. For the other AC components except the DC component, the CBP is predicted to be 1 if the variance exceeds an adaptively determined threshold value, and 0 otherwise. .

평균은 수학식 2과 같이 계산되며 분산은 수학식 3과 같이 계산된다.The average is calculated as in Equation 2 and the variance is calculated as in Equation 3.

Figure 112010085048088-pat00010
Figure 112010085048088-pat00010

Figure 112010085048088-pat00011
Figure 112010085048088-pat00011

수학식 2과 3에서

Figure 112010085048088-pat00012
는 단위 4x4 블록에서 시간 t-k, i 번째 열과 j 번째 행에서의 화소 값이며
Figure 112010085048088-pat00013
Figure 112010085048088-pat00014
를 통해 예측된 4x4 블록의 i 번째 열과 j 번째 행에서의 화소 값이다. 비트 발생 가능성 예측은 수학식 4와 같이 수행되며 예측된 비트 발생 가능성인
Figure 112010085048088-pat00015
가 0이 아니면 1의 값을 가진다. In Equations 2 and 3
Figure 112010085048088-pat00012
Is the pixel value in the time tk, the i th column and the j th row in the unit 4x4 block
Figure 112010085048088-pat00013
The
Figure 112010085048088-pat00014
Pixel values in the i th column and the j th row of the 4x4 block predicted through. Bit likelihood prediction is performed as shown in Equation 4, and the predicted bit likelihood
Figure 112010085048088-pat00015
If is not 0, it has a value of 1.

단계 406에서 각 4x4 블록의 평균과 분산을 계산한 후, 단계 408에서 해당 프레임이 P 프레임인지 B 프레임인 지를 판단하고, P 프레임에 대해서는 단계 410으로 진행하여 다음 수학식 4와 같이 비트 발생 예측치를 구하고, B 프레임에 대해서는 단계 412으로 진행하여 다음 수학식 5와 같이 비트 발생 예측치를 구한다.After calculating the average and the variance of each 4x4 block in step 406, it is determined in step 408 whether the frame is a P frame or a B frame, and proceeds to step 410 for the P frame to estimate the bit generation as shown in Equation 4 below. For the B frame, the process proceeds to step 412 to obtain a bit generation prediction value as shown in Equation 5 below.

Figure 112010085048088-pat00016
Figure 112010085048088-pat00016

수학식 4에서

Figure 112010085048088-pat00017
Figure 112010085048088-pat00018
이면 1, 그렇지 않으면 0의 값을 갖는 단위 계단 함수이며 θ는 비트 발생 가능성 예측을 위해 도입된 임계값(Threshold)로서 최소 자승법에 의해 2.5에서 3.5 사이로 구해진다.In Equation 4,
Figure 112010085048088-pat00017
The
Figure 112010085048088-pat00018
Is a unit step function with a value of 1, otherwise 0, and [theta] is a threshold introduced for predicting the probability of occurrence of bits, and is obtained from 2.5 to 3.5 by the least square method.

이때 P-픽처에서는 수학식 4를 사용하여 비트 발생 예측치를 구하나 B-Picture 에서는 수학식 4를 전부 사용하지 않고 수학식 4의 간략형인 수학식 5를 사용한다.In this case, the P-picture obtains a bit generation prediction value using Equation 4, but the B-Picture does not use Equation 4 but uses Equation 5, which is a simplified form of Equation 4.

Figure 112010085048088-pat00019
Figure 112010085048088-pat00019

B-픽처의 경우 수학식 5만을 사용하여도 97% 이상의 높은 적중률로 비트 발생 예측시 대 블록의 비트가 발생하지 않는 다는 것을 결정할 수 있다. P-픽처의 경우에는 수학식 5만을 사용할 경우 적중률이 50%를 겨우 넘기나 수학식 4를 사용할 경우 75% 이상의 적중률을 나타내므로 수학식 4를 사용하여 비트 발생 예측시 대 블록의 비트가 발생하지 않는 다는 것을 판정한다. For the B-picture, even using only Equation 5, it can be determined that a bit of a large block does not occur when predicting bit generation with a high hit ratio of 97% or more. In the case of the P-picture, the hit rate is only 50% when using only Equation 5, or 75% or more when using Equation 4. Determine if it is.

비트 발생 예측시 대 블록의 비트가 발생하지 않는다고 판정될 경우는 두 가지로서, 비트가 발생하지 않음에도 비트가 발생한다고 판정하는 판정하는 경우와 비트가 발생함에도 비트가 발생하지 않는다고 판정하는 경우이다. 전자의 경우에는 부호화 과정에서 SKIP/Direct 모드로 정정 되므로 문제가 없으나 후자의 경우에는 화질을 나쁘게 만들므로 수학식 4에서는 임계값 θ를 엄격히 도입하여 판정하도록 한다.There are two cases in which it is determined that a bit of a large block does not occur when predicting bit generation, that is, a case in which it is determined that a bit occurs even though no bit occurs, and a case in which a bit does not occur even when a bit occurs. In the former case, there is no problem because the image is corrected in the SKIP / Direct mode in the encoding process, but in the latter case, the image quality is deteriorated.

이와 같이, 가우시안 분포에서 사용하는 평균과 분산 정보만을 사용하여 비트 발생 가능성을 예측할 수 있으며 이 경우 DCT를 사용하는 경우보다 약 50%의 연산량으로 비트 발생 가능성을 예측할 수 있으므로 부호화 속도는 10~20% 정도 빨라진다.As such, the probability of bit generation can be predicted using only the average and variance information used in the Gaussian distribution, and in this case, the probability of bit generation can be predicted by about 50% of the computation amount compared to the case of using DCT. It's faster.

이렇게 비트 발생 가능성이 예측되면, 어느 정도의 비트가 발생되는가를 예측해야 한다. 다시 말해, 비트 발생 예측치가 계산된 후, 단계 414에서 비트 발생 강도가 계산된다. When the likelihood of bit generation is predicted, it is necessary to predict how many bits are generated. In other words, after the bit generation prediction is calculated, the bit generation strength is calculated in step 414.

구체적으로, 비트 발생 가능성이 예측될 경우, 수학식 2와 수학식 3에서 나타난

Figure 112010085048088-pat00020
값과
Figure 112010085048088-pat00021
값을 사용하여 비트 발생량의 강도를 계산한다. 이 때 수학식 5에서 계산된
Figure 112010085048088-pat00022
값은 실제 이산 여현 변환(DCT) 및 양자화 과정에서 DC 성분에 대한 값이 된다. 이 값과 각 4x4 블록의
Figure 112010085048088-pat00023
값을 합한 것을 곱한 값을 비트 발생량의 강도로 놓는다.Specifically, when the probability of bit occurrence is predicted, the equations shown in Equations 2 and 3
Figure 112010085048088-pat00020
Value and
Figure 112010085048088-pat00021
The value is used to calculate the strength of the bit generation amount. At this time,
Figure 112010085048088-pat00022
The value becomes a value for the DC component during the actual discrete cosine transform (DCT) and quantization process. Of this value and each 4x4 block
Figure 112010085048088-pat00023
Multiply the sum of the values by the strength of the bit generation amount.

Figure 112010085048088-pat00024
Figure 112010085048088-pat00024

수학식 6에서

Figure 112010085048088-pat00025
는 비트 발생량의 강도이다. 일반적으로, DC 값이 높은 경우라 하더라도 4x4 블록에서의 분산 값인
Figure 112010085048088-pat00026
값이 작을 경우 비트 발생량은 극히 작아 대체로 32bit 이하의 값을 가지게 된다. 그러나, 블록내 복잡도가 높아 수백 비트의 값을 나타내는 경우는 대체로
Figure 112010085048088-pat00027
값과
Figure 112010085048088-pat00028
값의 곱이 매우 크게 나타나는 경우이다. In Equation (6)
Figure 112010085048088-pat00025
Is the strength of the bit generation amount. In general, even if the DC value is high,
Figure 112010085048088-pat00026
If the value is small, the bit generation amount is extremely small and usually has a value of 32 bits or less. However, if the complexity in the block is high and represents hundreds of bits,
Figure 112010085048088-pat00027
Value and
Figure 112010085048088-pat00028
This is the case when the product of the values is very large.

비트 발생 강도의 계산 후, 단계 416에서 양자화 계수 제어값이 계산된다. 비트 발생량의 강도

Figure 112010085048088-pat00029
는 양자화 계수의 QP의 반 비례 함수이므로 QP값이 높아지면 비트 발생량의 강도는 작아지며 QP 값이 높아지면 비트 발생량의 강도는 커진다. 그러므로, 비트 발생량의 강도에 비례하여 QP 값을 높여 주도록 하면, 블록 단위의 비트 발생량은 작아지게 된다. 이때, 블록 단위의 제어 값의 경우 급격한 양자화 계수의 상승은 전체적인 화질 저하의 원인이 되므로 최대 2가 되도록 하며 다음 수학식에 의해 결정한다.After calculating the bit generation intensity, a quantization coefficient control value is calculated in step 416. Strength of bit generation
Figure 112010085048088-pat00029
Is an anti-proportional function of the QP of the quantization coefficients. Therefore, as the QP value increases, the intensity of the bit generation amount decreases, and when the QP value increases, the strength of the bit generation amount increases. Therefore, if the QP value is increased in proportion to the strength of the bit generation amount, the bit generation amount in units of blocks becomes small. In this case, in the case of the control value in units of blocks, the sudden increase in the quantization coefficient causes the overall deterioration of image quality, so that the maximum value is 2 and is determined by the following equation.

Figure 112010085048088-pat00030
Figure 112010085048088-pat00030

수학식 7에서

Figure 112010085048088-pat00031
는 양자화 계수의 제어 값이다.In equation (7)
Figure 112010085048088-pat00031
Is the control value of the quantization coefficient.

양자화 계수 제어값이 계산된 후, 단계 418에서 대 블록의 양자화 계수가 다음 수학식 8과 같이 결정된다. After the quantization coefficient control value is calculated, in step 418, the quantization coefficient of the large block is determined as in Equation 8 below.

Figure 112010085048088-pat00032
Figure 112010085048088-pat00032

수학식 8에서 t는 대블록에 대한 인덱스 값으로 t는 현재 블록의 인덱스를 나타내며, t-1은 이전 블록에 대한 인덱스 값을 나타낸다. In Equation 8, t represents an index value for a large block, t represents an index of the current block, and t-1 represents an index value of the previous block.

한편, 비트 발생량의 강도가 약한 경우에는 양자화 계수가 적절하거나 너무 큰 값을 가지고 있는 경우이므로 이 경우에는 양자화 계수에 대한 제어 값의 발생 빈도를 통해 음의 양자화 계수 제어 값을 발생 시킨다. 즉, 가 0이 되는 경우가 너무 많은 경우에는 수학식 9와 같이 음의 양자화 계수를 발생시키는 조건을 준다. On the other hand, when the intensity of the bit generation amount is weak, the quantization coefficient is appropriate or has a value that is too large. In this case, the negative quantization coefficient control value is generated through the frequency of generating the control value for the quantization coefficient. That is, when is too many cases, 0 gives a condition for generating a negative quantization coefficient as shown in Equation (9).

Figure 112010085048088-pat00033
Figure 112010085048088-pat00033

수학식 9에서

Figure 112010085048088-pat00034
Figure 112010085048088-pat00035
는 임의의 양수로
Figure 112010085048088-pat00036
의 관계를 만족하며
Figure 112010085048088-pat00037
는 Delta-Dirac 함수로 x가 0이 아니면 0, 0이면 1인 값이다. 예를 들어 최근 10개의
Figure 112010085048088-pat00038
가 연속으로 0의 값을
Figure 112010085048088-pat00039
+1 개 가지게 되면
Figure 112010085048088-pat00040
는 -1의 값을 가지게 된다. 그런데 그 다음 블록에서도
Figure 112010085048088-pat00041
가 0이면 음의 값이 나올 조건을 계속 만족하게 되므로 연속으로
Figure 112010085048088-pat00042
는 음의 값이 된다. In Equation (9)
Figure 112010085048088-pat00034
and
Figure 112010085048088-pat00035
Is a random positive number
Figure 112010085048088-pat00036
Satisfying the relationship
Figure 112010085048088-pat00037
Is a Delta-Dirac function, where x is 0 if it is nonzero, and 1 if it is 0. For example, the last 10
Figure 112010085048088-pat00038
Successively returns a value of 0
Figure 112010085048088-pat00039
When you have +1
Figure 112010085048088-pat00040
Has a value of -1. But in the next block
Figure 112010085048088-pat00041
Is 0, it will continue to satisfy the condition that negative value will come out.
Figure 112010085048088-pat00042
Is negative.

Figure 112010085048088-pat00043
가 0 혹은 음의 값을 가지게 될 조건들은 비트량 발생 확률 이외에도 전체 슬라이스 혹은 전체 프레임에 할당되어야 할 비트량의 조건과 관계가 있으므로 비트량 발생 예측치에 의한 제어 조건은 이것으로 충분하다.
Figure 112010085048088-pat00043
The condition that will have a value of 0 or negative is related to the condition of the bit amount to be allocated to the whole slice or the entire frame in addition to the probability of generating the bit amount, so the control condition by the bit amount generation prediction value is sufficient.

즉, 각 블록에서 비트가 많이 발생 할 것으로 예측되어 양자화 계수값이 올라가, 이것이 누적되어 어느 정도 높은 값을 가지게 되면 자연히 제어 값인

Figure 112010085048088-pat00044
가 0이 되고 이것이 연속으로 나타날 확률이 높아지므로
Figure 112010085048088-pat00045
가 음의 값을 가질 확률이 높아진다. 또한
Figure 112010085048088-pat00046
가 음의 값을 가지게 되면 자연히 대 블록의 처리에 따라,
Figure 112010085048088-pat00047
가 내려가기 시작하여 높은 비트 발생 예측 강도가 나타날 때 까지 양자화 계수가 낮은 값을 가질 수 있도록 하여 전체적인 화질을 향상시키도록 한다.In other words, it is predicted that a lot of bits are generated in each block, so that the quantization coefficient value increases, and when it accumulates and has a high value, it is naturally a control value.
Figure 112010085048088-pat00044
Becomes 0 and the probability of this appearing consecutively increases
Figure 112010085048088-pat00045
Has a higher probability of having a negative value. Also
Figure 112010085048088-pat00046
Has a negative value, naturally according to the processing of large blocks,
Figure 112010085048088-pat00047
The quantization coefficient can have a low value until it starts to go down until a high bit generation prediction strength appears, thereby improving the overall picture quality.

이후 단계 420에서 CBP가 모두 0인지의 여부에 따라 스킵/다이렉트 모드를 판정하고, 단계 430에서 움직임 예측을 수행하고 단계 424에서 움직임 보상을 수행한다. Thereafter, in step 420, the skip / direct mode is determined according to whether the CBP is all zeros, motion prediction is performed in step 430, and motion compensation is performed in step 424.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다. It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the present invention as defined by the following claims It can be understood that

Claims (6)

동영상에 대한 부호화에 있어서,
대블록의 움직임 벡터를 예측하는 단계;
상기 대블록의 움직임 벡터에 대한 예측 결과에 기반하여 상기 대블록을 분할한 분할 블록의 평균과 분산을 산출하는 단계;
상기 대블록이 포함되는 대상 프레임이 P프레임인 경우와 B프레임인 경우를 구별하여 상기 분할 블록의 평균과 분산에 기반하는 서로 다른 알고리즘을 이용함으로써 비트 발생 예측치를 산출하는 단계;
상기 비트 발생 예측치와 상기 분할 블록의 분산을 이용하여 비트 발생량의 강도를 산출하는 단계;
상기 비트 발생량의 강도에 반비례하고, 최대값을 2로 하는 양자화 계수 제어값을 산출하는 단계; 및
상기 양자화 계수 제어값을 이용하여 상기 대블록에 대한 양자화 계수를 산출하는 단계를 포함하는 동영상 부호기의 대블록에 대한 비트율 제어 방법.
In encoding for video,
Predicting a motion vector of the large block;
Calculating an average and a variance of the divided block obtained by dividing the large block based on a prediction result of the motion vector of the large block;
Calculating a bit generation prediction value by using different algorithms based on the mean and the variance of the divided blocks by distinguishing a case where the target frame including the large block is a P frame and a B frame;
Calculating an intensity of a bit generation amount using the bit generation prediction value and the variance of the partition block;
Calculating a quantization coefficient control value which is inversely proportional to the intensity of the bit generation amount and whose maximum value is 2; And
And calculating a quantization coefficient for the large block by using the quantization coefficient control value.
청구항 1에 있어서,
상기 비트 발생 예측치를 산출하는 단계는
상기 대상 프레임이 P프레임인 경우,
수학식
Figure 112013075728052-pat00052
에 의해 상기 비트 발생 예측치를 산출하고,
상기 대상 프레임이 B프레임인 경우,
수학식
Figure 112013075728052-pat00053
에 의해 상기 비트 발생 예측치를 산출하는 것(여기서,
Figure 112013075728052-pat00054
은 분할 블록의 평균,
Figure 112013075728052-pat00055
는 분할 블록의 분산, QP는 양자화 계수,
Figure 112013075728052-pat00056
는 QP, i, j의 함수로서 양자화 계수에 12을 더한 것을 6으로 나눈 나머지와 i, j의 요소에 따라 결정되는 양자화 함수, f는 양자화 레벨 오프셋 값,
Figure 112013075728052-pat00057
Figure 112013075728052-pat00058
이면 1, 그렇지 않으면 0의 값을 갖는 단위 계단 함수이며, 는 비트 발생 가능성 예측을 위해 도입된 임계값(Threshold)로서 최소 자승법에 의해 2.5에서 3.5 사이로 구해짐)을 특징으로 하는 동영상 부호기의 대블록에 대한 비트율 제어 방법.
The method according to claim 1,
Computing the bit generation prediction value
If the target frame is a P frame,
Equation
Figure 112013075728052-pat00052
Calculating the bit generation prediction value by
If the target frame is a B frame,
Equation
Figure 112013075728052-pat00053
Calculating the bit generation prediction value by
Figure 112013075728052-pat00054
Is the average of the split blocks,
Figure 112013075728052-pat00055
Is the variance of the split block, QP is the quantization coefficient,
Figure 112013075728052-pat00056
Is a function of QP, i, and j is a quantization function determined by the remainder of quantization coefficient plus 12 divided by 6 and the elements of i and j, f is the quantization level offset value,
Figure 112013075728052-pat00057
The
Figure 112013075728052-pat00058
Is a unit step function with a value of 1, otherwise 0, and is a large block of a video encoder characterized by a threshold introduced for predicting the probability of bit occurrence, obtained from 2.5 to 3.5 by the least-squares method. Bit rate control method for.
청구항 2에 있어서,
상기 비트 발생 예측치를 산출하는 단계는
가우시안 분포에 기반하는 상기 분할 블록의 평균과 분산을 이용하여 상기 비트 발생 예측치를 산출하는 것을 특징으로 하는 동영상 부호기의 대블록에 대한 비트율 제어 방법.
The method according to claim 2,
Computing the bit generation prediction value
And calculating the bit generation prediction value using the mean and the variance of the partition block based on a Gaussian distribution.
청구항 1에 있어서,
상기 양자화 계수 제어값을 산출하는 단계는
수학식
Figure 112013075728052-pat00059
에 의해 상기 양자화 계수 제어값을 산출하는 것(여기서,
Figure 112013075728052-pat00060
는 비트 발생량의 강도, 및 는 미리 설정된 값)을 특징으로 하는 동영상 부호기의 대블록에 대한 비트율 제어 방법.
The method according to claim 1,
Computing the quantization coefficient control value
Equation
Figure 112013075728052-pat00059
Calculating the quantization coefficient control value by
Figure 112013075728052-pat00060
Is a strength of the bit generation amount, and is a predetermined value).
청구항 1에 있어서,
상기 양자화 계수를 산출하는 단계는
수학식
Figure 112013075728052-pat00061
에 의해 상기 양자화 계수를 산출하는 것(
Figure 112013075728052-pat00062
는 양자화 계수 제어값, t는 현재 대블록의 인덱스, t-1은 이전 대블록의 인덱스)을 특징으로 하는 동영상 부호기의 대블록에 대한 비트율 제어 방법.
The method according to claim 1,
The calculating of the quantization coefficient
Equation
Figure 112013075728052-pat00061
Calculating the quantization coefficient by
Figure 112013075728052-pat00062
Quantization coefficient control value, t is the index of the current large block, t-1 is the index of the previous large block) bit rate control method for a large block of the video encoder.
청구항 1에 있어서,
상기 양자화 계수를 산출하는 단계는,
상기 양자화 계수 제어값이 상기 비트 발생량의 강도에 반비례하는 특성에 기반하여 상기 양자화 계수를 산출하는 것을 특징으로 하는 동영상 부호기의 대블록에 대한 비트율 제어 방법.
The method according to claim 1,
Computing the quantization coefficients,
And calculating the quantization coefficient based on a property in which the quantization coefficient control value is inversely proportional to the strength of the bit generation amount.
KR1020100133005A 2010-12-23 2010-12-23 bit-rate control method for a macro-block KR101337410B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100133005A KR101337410B1 (en) 2010-12-23 2010-12-23 bit-rate control method for a macro-block

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100133005A KR101337410B1 (en) 2010-12-23 2010-12-23 bit-rate control method for a macro-block

Publications (2)

Publication Number Publication Date
KR20120071455A KR20120071455A (en) 2012-07-03
KR101337410B1 true KR101337410B1 (en) 2013-12-05

Family

ID=46706436

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100133005A KR101337410B1 (en) 2010-12-23 2010-12-23 bit-rate control method for a macro-block

Country Status (1)

Country Link
KR (1) KR101337410B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10664958B2 (en) 2017-06-16 2020-05-26 Hanwha Techwin Co., Ltd. Method of adjusting bitrate of image and image capturing apparatus, and method of generating bitrate-adjusted image

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070034869A (en) * 2005-09-26 2007-03-29 삼성전자주식회사 Apparatus and method for controlling bit rate of video encoder
KR20070050335A (en) * 2005-11-10 2007-05-15 한국전자통신연구원 An estimation method for cbp and a block mode decision method using estimated cbp on a moving picture encoding system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070034869A (en) * 2005-09-26 2007-03-29 삼성전자주식회사 Apparatus and method for controlling bit rate of video encoder
KR20070050335A (en) * 2005-11-10 2007-05-15 한국전자통신연구원 An estimation method for cbp and a block mode decision method using estimated cbp on a moving picture encoding system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10664958B2 (en) 2017-06-16 2020-05-26 Hanwha Techwin Co., Ltd. Method of adjusting bitrate of image and image capturing apparatus, and method of generating bitrate-adjusted image

Also Published As

Publication number Publication date
KR20120071455A (en) 2012-07-03

Similar Documents

Publication Publication Date Title
KR100703200B1 (en) Intra-coding apparatus and method
KR101177031B1 (en) Method and apparatus for minimizing number of reference pictures used for inter-coding
US8184699B2 (en) Method of reducing computations in intra-prediction and mode decision processes in a digital video encoder
US20050114093A1 (en) Method and apparatus for motion estimation using variable block size of hierarchy structure
KR100842558B1 (en) Determining method of block mode, and the apparatus therefor video encoding
JP4529615B2 (en) Encoding apparatus, encoding method, encoding method program, and recording medium recording the encoding method program
US20120128070A1 (en) Video Encoding Method for Encoding Division Block, Video Decoding Method for Decoding Division Block, and Recording Medium for Implementing the Same
US8149918B2 (en) Method of estimating coded block pattern and method of determining block mode using the same for moving picture encoder
JP2007089035A (en) Moving image encoding method, apparatus, and program
JP2006513636A (en) Fast mode decision making for inter-frame coding
WO2010135609A1 (en) Adaptive picture type decision for video coding
JP2006025428A (en) Method or device for coding sequence of source image
US20050129125A1 (en) Method and apparatus for pitcure compression using variable block of arbitrary size
KR100905059B1 (en) The method and apparatus for block mode decision using predicted bit generation possibility in video coding
KR100845303B1 (en) Video compressing encoding device based on feed-back structure for a fast encoding and Decision method of optimal mode
WO2015015436A2 (en) System and method for performing optimal temporal predictive mode decision in h.264 video coding
US8654844B1 (en) Intra frame beating effect reduction
KR100785773B1 (en) An estimation method for CBP and a block mode decision method using estimated CBP on a moving picture encoding system
JP5708490B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
KR101337410B1 (en) bit-rate control method for a macro-block
CN113163199B (en) H265-based video rapid prediction method, rapid coding method and system
JP5136470B2 (en) Moving picture coding apparatus and moving picture coding method
KR20170077621A (en) Method and Apparatus of removal of Flickering artifact for Video compression
WO2015015404A2 (en) A method and system for determining intra mode decision in h.264 video coding
KR20040093253A (en) 16x16 intra luma prediction mode determining method and apparatus

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: 20161027

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee