KR20110099554A - Qp deciding method of h.264/avc encoder using complexity of frame - Google Patents
Qp deciding method of h.264/avc encoder using complexity of frame Download PDFInfo
- Publication number
- KR20110099554A KR20110099554A KR1020100018642A KR20100018642A KR20110099554A KR 20110099554 A KR20110099554 A KR 20110099554A KR 1020100018642 A KR1020100018642 A KR 1020100018642A KR 20100018642 A KR20100018642 A KR 20100018642A KR 20110099554 A KR20110099554 A KR 20110099554A
- Authority
- KR
- South Korea
- Prior art keywords
- complexity
- quantization parameter
- frame
- scene change
- image
- 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/134—Methods 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/136—Incoming video signal characteristics or properties
- H04N19/14—Coding unit complexity, e.g. amount of activity or edge presence estimation
-
- 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/107—Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
-
- 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/114—Adapting the group of pictures [GOP] structure, e.g. number of B-frames between two anchor frames
-
- 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/134—Methods 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/146—Data rate or code amount at the encoder output
- H04N19/147—Data rate or code amount at the encoder output according to rate distortion criteria
-
- 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/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
Abstract
본 영상의 복잡도를 이용한 H.264/AVC 부호화기의 양자화 파라미터 결정 방법에 관한 것으로서, 비디오 영상이 입력되는 단계, 비디오 영상에 대한 화면의 복잡도를 계산하는 단계, 비디오 영상의 실제 생성 비트와 GOP 할당비트의 비율을 이용하여 목표 비트를 산출하는 단계, 화면의 복잡도와 목표비트를 이용하여 초기 양자화 파라미터를 산출하는 단계, 장면전환이 이루어졌는지를 파악하는 단계, 장면전환이 이루어졌다고 판단되면 목표비트를 산출하는 단계, 목표 비트와 영상 내의 복잡도를 이용하여 장면전환 양자화 파라미터를 결정하는 단계를 포함한다. 이에 의해, 초기 양자화 파라미터와 장면전환 양자화 파라미터를 별도로 결정하도록 함으로써, 초기 비디오 입력시와 장면전환 등의 급격한 화질 변환시 비트율 제어 효율이 저하되는 것을 방지할 수 있으며, 영상 전체의 화질이 향상된다.A method for determining a quantization parameter of an H.264 / AVC encoder using the complexity of the video, the method comprising: inputting a video image, calculating a screen complexity for the video image, actual generation bits and GOP allocation bits of the video image Calculating the target bit using the ratio of the ratio, calculating the initial quantization parameter using the complexity of the screen and the target bit, determining whether the scene change has been performed, and calculating the target bit when the scene change has been determined. And determining the scene change quantization parameter using the target bit and the complexity in the image. As a result, by determining the initial quantization parameter and the scene change quantization parameter separately, it is possible to prevent the bit rate control efficiency from being degraded during the initial video input and the sudden image quality conversion such as the scene change, thereby improving the image quality of the entire image.
Description
본 발명은 영상의 복잡도를 이용한 H.264/AVC 부호화기의 양자화 파라미터 결정 방법에 관한 것으로서, 초기 양자화 파라미터와, 장면전환시 양자화 파라미터를 적응적으로 선택함으로써, 비트율 제어의 효율을 향상시킬 수 있도록 하는 영상의 복잡도를 이용한 H.264/AVC 부호화기의 양자화 파라미터 결정 방법에 관한 것이다. The present invention relates to a method for determining a quantization parameter of an H.264 / AVC coder using image complexity. The present invention provides a method for adaptively selecting an initial quantization parameter and a quantization parameter during scene change, thereby improving efficiency of bit rate control. The present invention relates to a method for determining a quantization parameter of an H.264 / AVC encoder using image complexity.
근래에 하드웨어가 고도화되고 소비자가 고화질 서비스를 원하면서 ITU-T와 MPEG에서는 공동으로 H.264/AVC라는 고성능 압축 효율을 갖는 동영상 부호화 표준을 정의하였다. H.264/AVC 동영상 표준의 새로운 기술은 이전에 정의된 H.263, MPEG-4등과 유사한 압축 구조를 가지지만 압축효율을 최대한 향상시켰다. H.264/AVC는 입력된 현재 영상이 인트라 프레임인 경우, 인트라 예측 과정을 통해 최적의 모드로 결정된 예측 화소와 현재 영상과의 차분치를 DCT 변환 및 양자화하여 양자화 계수를 얻고, 얻어진 양자화 계수는 엔트로피 부호화 과정을 거쳐 복호기에 전송된다. Recently, as hardware is advanced and consumers want high-definition service, ITU-T and MPEG have jointly defined a video coding standard with high-performance compression efficiency called H.264 / AVC. The new technology of the H.264 / AVC video standard has a similar compression structure as previously defined H.263, MPEG-4, etc., but maximizes the compression efficiency. H.264 / AVC obtains the quantization coefficient by DCT transforming and quantizing the difference between the prediction pixel determined as the optimal mode and the current image through intra prediction, and the obtained quantization coefficient is entropy. It is transmitted to the decoder after the encoding process.
이러한 압축 기술을 이용해 실시간 영상 전송 효율을 높아지고, 기존보다 높은 부호화 효율로 인해 보다 좋은 화질의 영상 전송을 가능하게 되었다. 물론 채널 대역이 충분히 커서 압축하지 않은 본래의 영상정보를 그대로 전송할 수 있다면 이러한 기술이 그다지 효율적이지 못하겠지만, 현재로서는 전송 채널의 제한으로 인해 충분히 큰 정보를 한 번에 전송하는 것은 불가능하다. 따라서 높은 부호화 효율을 가진 압축 기술로 정보를 압축하여 전송하면 보다 좋은 화질의 정보를 실시간으로 받아 볼 수 있다. By using this compression technology, the real-time video transmission efficiency is increased, and the higher coding efficiency than the conventional one enables higher quality video transmission. Of course, if the channel band is large enough to transmit the original uncompressed image information, such a technique may not be very efficient, but at present, it is impossible to transmit sufficiently large information at once due to the limitation of the transmission channel. Therefore, by compressing and transmitting information using a compression technique having high coding efficiency, it is possible to receive better quality information in real time.
이때 보통 채널의 용량은 일정한 크기의 정보를 전송할 수 있게 되어 있으나, 영상 정보는 한 화면마다 각기 다른 정보량을 가지게 된다. 이에 따라, 일정한 채널 용량에 맞춰서 각각의 화면 정보를 전송할 필요가 있다. 이것이 비트율 제어 알고리즘이 필요한 이유이다. 비트율 제어는 기본적으로 채널 용량이 허용하는 비트량과 영상이 가지고 있는 비트량과 화질을 고려하여 최적의 부호화 성능을 가지고도록 하는데 목적을 둔다. 영상의 화질과 압축률을 조절하는 가장 효율적인 방법은 양자화 파라미터를 이용하는 것이다. 이것을 조절하여 영상의 비트량을 목표비트에 가깝게 맞추면서 화질을 개선하는 것이 비트율 제어의 전체 흐름이다. In this case, although the capacity of a normal channel is capable of transmitting information of a certain size, the image information has a different amount of information for each screen. Accordingly, it is necessary to transmit each screen information in accordance with a constant channel capacity. This is why a bit rate control algorithm is needed. Bit rate control basically aims to have an optimal encoding performance in consideration of the amount of bits allowed by the channel capacity and the amount of bits and image quality of the video. The most efficient way to control the image quality and compression rate is to use quantization parameters. The overall flow of bit rate control is to adjust this to improve the image quality while making the bit amount of the image close to the target bit.
비트율 제어는 크게 다음의 과정을 통해 부호화 과정이 이루어진다. 먼저 목표비트가 구해지고 다음으로 양자화 파라미터가 결정되며 RDO과정을 통해 MAD(mean of absolute differential)값이 산출되고 부호화가 이루어진다. 이때 목표비트는 버퍼상태와 채널용량을 고려하여 목표비트가 결정되고, 양자화 파라미터는 예측된 MAD값과 목표비트를 이용하여 산출된다. Bit rate control is largely performed through the following process. First, the target bit is obtained, then the quantization parameter is determined, and a mean of absolute differential (MAD) value is calculated and encoded through an RDO process. In this case, the target bit is determined in consideration of the buffer state and the channel capacity, and the quantization parameter is calculated using the predicted MAD value and the target bit.
이러한 H.264/AVC의 비트율 제어 알고리즘은 몇까지의 문제점을 가지고 있다. 첫 번째로 I-프레임과 첫 P-프레임을 위한 비트율 제어 알고리즘이 존재하지 않아 임의로 정해진 고정 양자화 파라미터를 사용하고 있는 점이다. 이는 초기 양자화 파라미터를 적절하게 선택하지 못할 경우 전체적인 비트율 제어 효율의 저하를 가져오는 원인으로 작용한다. 따라서 I-프레임을 위한 적응적인 양자화 파라미터 선택 알고리즘을 통해 비트율 제어 효율을 향상시키도록 하였다. The bit rate control algorithm of H.264 / AVC has some problems. First, there is no bit rate control algorithm for the I-frame and the first P-frame. This causes a reduction in overall bit rate control efficiency if the initial quantization parameter is not properly selected. Therefore, the adaptive quantization parameter selection algorithm for I-frame improves the rate control efficiency.
다음은 MAD 예측을 위해 사용되는 선형 모델에 의한 문제점이다. 보통 선형모델을 통해 예측된 MAD는 비교적 실제 MAD와 유사한 값을 갖게 되는데 장면전환과 같은 급격한 화질 변화가 일어날 경우 매우 큰 오차를 가지게 된다. 예측 MAD의 오차는 결과적으로 비트율 제어를 위한 양자화 파라미터 결정에도 영향을 주게 되므로 장면전환을 위한 새로운 알고리즘의 도입이 필요하다. The following is the problem due to the linear model used for MAD prediction. In general, the MAD predicted by the linear model has a relatively similar value to the actual MAD, and there is a very large error when a sudden change in image quality such as a scene change occurs. Since the error of the predictive MAD also affects the quantization parameter determination for the bit rate control, it is necessary to introduce a new algorithm for scene transition.
본 발명의 목적은, 첫 프레임과, 장면전환시 별도의 양자화 파라미터를 결정하도록 함으로써, 비트율 제어 효율을 향상시킬 수 있도록 하는 영상의 복잡도를 이용한 H.264/AVC 부호화기의 양자화 파라미터 결정 방법에 관한 것이다. An object of the present invention relates to a method of determining a quantization parameter of an H.264 / AVC coder using the complexity of an image to improve bit rate control efficiency by determining a first frame and a separate quantization parameter when changing a scene. .
본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 당업자에게 명확하게 이해되어질 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects not mentioned can be clearly understood by those skilled in the art from the following description.
상기 목적은, 비디오 영상이 입력되는 단계; 화면의 복잡도를 계산하는 단계; 실제 생성 비트와 GOP 할당비트의 비율을 이용하여 목표 비트를 산출하는 단계; 및, 상기 화면의 복잡도와 목표비트를 이용하여 초기 양자화 파라미터를 산출하는 단계;를 포함하는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법에 의해 달성된다. The object is the step of inputting a video image; Calculating the complexity of the screen; Calculating a target bit using a ratio of the actual generation bit to the GOP allocation bit; And calculating an initial quantization parameter using the complexity of the screen and the target bit. The method of claim 1 is achieved by the method of determining a quantization parameter of an H.264 / AVC encoder.
본 영상의 복잡도를 이용한 H.264/AVC 부호화기의 양자화 파라미터 결정 방법에 따르면, 초기 양자화 파라미터와 장면전환 양자화 파라미터를 별도로 결정하도록 함으로써, 초기 비디오 입력시와 장면전환 등의 급격한 화질 변환시 비트율 제어 효율이 저하되는 것을 방지할 수 있다. 또한, 초기 양자화 파라미터로 부호화시 영상의 평균 화질에 근접한 영상으로 부호화되었으며, 이때, 영상의 평균 화질이 가장 효율적인 것을 확인하였다. 또한, 장면전환 양자화 파라미터로 부호화시 장면 전환 이후 영상들의 평균 화질에 근접한 영상으로 부호화되었으며, 이에 따라, 기존 비트율 제어 기법의 문제점인 조기 목표비트 고갈의 문제가 해결되어 영상 전체의 화질이 향상되었다. According to the method of determining the quantization parameter of the H.264 / AVC encoder using the complexity of the image, the initial quantization parameter and the scene change quantization parameter are determined separately, thereby improving the bit rate control efficiency during the initial video input and the sudden image quality conversion such as the scene change. The fall can be prevented. In addition, the first quantization parameter is encoded as an image that is close to the average image quality of the image. At this time, it is confirmed that the average image quality is most efficient. In addition, when encoding with the scene change quantization parameter, the image is encoded to be close to the average quality of the images after the scene change. Accordingly, the problem of early target bit depletion, which is a problem of the existing bit rate control scheme, is solved, thereby improving the quality of the entire image.
도 1은 본 발명에 따른 H.264/AVC 부호화기의 구성도,
도 2는 복잡도가 구해지는 원리를 매크로블록에 표시한 모식도,
도 3은 본 발명에 따른 H.264/AVC 부호화기에서 양자화 파라미터를 결정하는 과정을 보인 흐름도이다. 1 is a block diagram of an H.264 / AVC encoder according to the present invention,
2 is a schematic diagram showing a principle in which complexity is obtained in a macroblock;
3 is a flowchart illustrating a process of determining a quantization parameter in an H.264 / AVC encoder according to the present invention.
그러면 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. DETAILED DESCRIPTION Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art may easily implement the present invention.
도 1은 본 발명에 따른 H.264/AVC 부호화기의 구성도이다.1 is a block diagram of an H.264 / AVC encoder according to the present invention.
H.264/AVC 부호화기는, 비트율 제어기(10), 장면전환 검출기(20), 양자화기(30), DCT 변환기(40), 엔트로피 부호화기(50), 역양자화기(60), IDCT 변환기(40), 영상 메모리(80), 움직임 예측기(90)를 포함한다. The H.264 / AVC coder includes a
이러한 부호화기에는, 비디오 카메라 또는 캠코더 등을 통해 들어오는 프레임 또는 격행 주사에 의한 필드 영상이 입력된다. 필드 영상은 TV 신호의 영상포맷으로써 널리 사용되고 있는 격행 주사를 지원한다. 격행 주사란 화소 라인들을 짝수 라인과 홀수 라인으로 나누어, 즉 필드신호 2 개로 나누어 주사하는 방식이다. In such an encoder, a frame image input by a frame or a parallel scan that is input through a video camera or a camcorder is input. Field video supports perforation scanning, which is widely used as the video format of TV signals. A parallel scan is a scheme in which pixel lines are divided into even lines and odd lines, that is, divided into two field signals.
하나의 프레임은 "상위 필드"(한 프레임을 구성하는 두 개의 필드 중 공간적으로 위에 위치하는 필드)와, "하위필드"(한 프레임을 구성하는 두 개의 필드 중 공간적으로 아래에 위치하는 필드)의 2 개의 필드로 구성된다. One frame is composed of the "parent field" (the spatially located one of the two fields constituting one frame) and the "subfield" (the spatially located one of the two fields constituting one frame). It consists of two fields.
비트율 제어기(10)는 전송되는 프레임의 비트율을 제어하며, 화면의 종류와 특성에 따라 부호화 작업으로 생기는 복원 화면의 결함이 인간의 눈에 민감하게 인식되는 부분에는 많은 비트를 할당하고, 인간의 눈에 쉽게 인식되지 않는 부분에서는 상대적으로 적은 비트를 할당하여 전체적으로 좋은 화질을 느낄 수 있도록 조절하는 역할을 수행한다. The
본 발명에 따른 비트율 제어기(10)는, 비디오가 입력되기 시작하는 초기에 필요한 초기 양자화 파라미터와, 장면전환시에 필요한 장면전환 양자화 파라미터를 적응적으로 결정하여 양자화기(30)에 제공한다. The
비트율 제어기(10)에서 초기 양자화 파라미터를 결정하는 과정을 상세히 설명하면 다음과 같다. The process of determining the initial quantization parameter in the
먼저, 비트율 제어기(10)는, 초기 양자화 파라미터를 결정하기 위해, 입력된 영상에 대해 화면이 가지고 있는 복잡한 정도를 산출하며, 이는 하기의 수학식 1에 표기된 화면내의 복잡도 계산 방법을 이용하여 산출한다. First, in order to determine the initial quantization parameter, the
여기서, Ix ,y,z는 k번째 프레임에서 (x,y)위치의 픽셀값, Gf(k)은 k번째 프레임의 프레임복잡도, M,N은 프레임의 가로, 세로 크기를 의미한다.Here, I x , y, z are pixel values of the (x, y) position in the k-th frame, G f (k) is the frame complexity of the k-th frame, M, N is the horizontal and vertical size of the frame.
수학식 1은, 도 2에 도시된 바와 같이, 하나의 프레임에 포함된 다수의 매크로블록내의 각 픽셀 간의 관계를 복잡도로 나타낸 것이다. Equation 1 shows, as shown in FIG. 2, a relationship between pixels in a plurality of macroblocks included in one frame in complexity.
그런 다음, 비트율 제어기(10)는, 초기 양자화 파라미터 결정을 위한 목표 비트를 설정한다. 목표비트는 선택 양자화 파라미터의 부호화로 생성되는 실제 생성비트와, GOP 할당비트의 비율을 이용하여 결정하며, 이는 수학식 2로 나타낸 바와 같다. The
여기서, 는 비트율, NGOP는 GOP전체의 프레임수, NtotalP는 GOP전체에서 P프레임의 총 수를 의미하며, Fr은 프레임율을 의미한다.here, Is the bit rate, N GOP is the number of frames of the entire GOP, N totalP is the total number of P frames in the GOP, and Fr is the frame rate.
이렇게 목표비트가 결정되면, 다음의 수학식 3을 이용하여 초기 양자화 파라미터를 산출할 수 있으며, 산출된 초기 양자화 파라미터는 양자화기(30)로 전달된다. When the target bit is determined in this way, an initial quantization parameter may be calculated using Equation 3 below, and the calculated initial quantization parameter is transferred to the
여기서, QP(k)는 k번째 프레임에서의 양자화 파라미터 값을 의미한다. 양자화 파라미터는 '1'부터 '51'사이의 값을 갖는다.Here, QP (k) means the quantization parameter value in the k-th frame. The quantization parameter has a value between '1' and '51'.
한편, 비트율 제어기(10)에서 장면전환 양자화 파라미터를 산출하는 과정은 다음과 같다. Meanwhile, the process of calculating the scene change quantization parameter in the
먼저, 비트율 제어기(10)에서 장면전환 양자화 파라미터를 산출하기 위해서는 장면전환이 이루어졌는지를 파악해야 하며, 이는 장면전환 검출기(20)에서 이루어진다. 장면전환 검출기(20)는, 장면전환이 이루어졌는지 여부를 판단하기 위해, 영상 내의 복잡도 비와, 차분 값을 구한다. 여기서 복잡도 비는 이전 영상과 현재 영상의 비를 이용하며, 수학식 4로 나타낼 수 있다.First, in order to calculate the scene change quantization parameter in the
여기서, Gf(k)는 k번째 프레임에서의 복잡도를 나타내며, Gf(k-1)은 k-1번째 프레임에서의 복잡도를 나타낸다.Here, G f (k) represents the complexity in the k th frame, and G f (k-1) represents the complexity in the k-1 th frame.
그리고 차분 값은 이전 영상의 열 복잡도와 현재 영상의 열 복잡도를 차분하여 구하며, 이는 다음의 수학식 5로 나타낼 수 있다. The difference value is obtained by differentially calculating the thermal complexity of the previous image and the thermal complexity of the current image, which can be represented by Equation 5 below.
여기서 GMB,R(j,k)는 매크로블록단의 복잡도 GMB(i,j,k)에서 가로열들을 합산한 값으로 가로열 복잡도를 나타내며, M,N은 프레임의 가로, 세로 크기를 의미한다.Here, GMB, R (j, k) is the sum of columns in the macroblock complexity G MB (i, j, k), which represents the column complexity, and M and N are the horizontal and vertical size of the frame. do.
장면전환 검출기(20)는, 복잡도 비와 차분 값 각각에 대해 설정된 임계치를 가지고 있으며, 복잡도 비와 차분 값이 각각 다음의 수학식 6의 조건을 만족할 경우 장면 전환이 이루어졌다고 판단한다. The
여기서, GF , ratio(k)는 k번째 프레임과 k-1번째 프레임의 복잡도비를 나타내며, GF , diff(k)는 k번째 프레임과 k-1번째 프레임의 복잡도 차를 의미한다.Here, G F , ratio (k) denotes a complexity ratio between the k th frame and the k-1 th frame, and G F , diff (k) denotes a difference in complexity between the k th frame and the k-1 th frame.
장면전환 검출기(20)에서 장면 전환이 이루어졌다고 판단되면, 비트율 제어기(10)는 장면전환 양자화 파라미터의 결정을 위한 목표비트를 설정한다. 장면전환 양자화 파라미터 결정을 위한 목표비트는, 가용비트를 고려하여, 장면전환시 생성비트의 평균과, 인터프레임의 생성비트의 평균을 이용하여 산출하며, 수학식 7로 나타낼 수 있다. When the
여기서, Fr은 프레임율, NcodeP는 부호화된 P프레임의 수를 의미하며, NGOP는 GOP전체의 프레임수, b(ni)는 i번째 프레임의 실제 발생 비트를 의미한다.Here, Fr denotes a frame rate, N codeP denotes the number of encoded P frames, N GOP denotes the number of frames of the entire GOP, and b (n i ) denotes the actual occurrence bit of the i-th frame.
이렇게 산출된 목표 비트와, 영상 내의 복잡도를 수학식 3에 적용하여 장면전환 양자화 파라미터를 결정한다. 결정된 장면전환 양자화 파라미터는 양자화기(30)로 제공된다. The target bit calculated as described above and the complexity in the image are applied to Equation 3 to determine the scene change quantization parameter. The determined scene change quantization parameter is provided to the
DCT(Discrete Cosine Transform) 변환기는, 공간 도메인의 동영상 정보를 주파수 도메인 데이터로 변환하며, 이산 코사인 변환(DCT: Discrete Cosine Transform)을 수행하여 매크로블록 단위로 DCT 계수 블록을 생성한다. The DCT (Discrete Cosine Transform) transformer converts the video information of the spatial domain into frequency domain data and performs Discrete Cosine Transform (DCT) to generate DCT coefficient blocks in macroblock units.
양자화기(30)는 DCT 변환기(40)에서 출력된 DCT 계수 블록을 양자화하며, 이때, 양자화기(30)는 비트율 제어기(10)로부터 제공받은 초기 양자화 파라미터, 장면전환 양자화 파라미터 등의 양자화 파라미터를 프레임별로 제공받아 DCT 계수 블록을 양자화한다. The
엔트로피 부호화기(50)는 발생 빈도가 높은 부호에 대해서는 부호당 기준치보다 짧은 비트를 할당하고, 발생 빈도가 낮은 부호에 대해서는 부호당 기준치보다 긴 비트를 할당하여 전체적으로 부호의 평균길이가 원래 신호가 지니고 있는 정보량의 엔트로피에 가깝도록 하는 역할을 한다. 엔트로피 부호화 방식은 Exponential Golomb 코드, VLC(Variable Length Coding), CAVLC(Context Adaptive Variable Length Coding), CABAC(Context Adaptive Binary Arithmetic Coding) 등의 부호화 방식을 사용할 수 있다. The
역양자화기(60)는 현재 프레임이 후속 모션추정/보상에 필요한 경우, 양자화된 스펙트럼 계수에 대해 역양자화를 수행한다.
DCT 역변환기(70)는 DCT 변환기(40)의 동작을 역으로 수행하여, 역양자화기(60)의 출력으로부터 역DCT 변환을 통해 역차이 매크로블록이 생성된다. The DCT
역양자화기(60) 및 DCT 역변환기(70)에 의해, 비디오 비트스트림에서 오버헤드 정보(각종 헤더 정보, 스타트 코드 등)가 제거되고 순수한 데이터 정보를 디코딩한 후, 역양자화 및 역 DCT 과정을 거쳐 원래 화면의 픽셀 값을 복원한다. The
움직임 예측기(90)는, 현재 프레임이 인터 프레임(예를 들어 P프레임일 경우)이라면, 영상 메모리(80)에 버퍼링되어 있는 이전 프레임의 재구성된 프레임인 기준 프레임에 대한, 현재 프레임내 매크로블록의 모션을 추정하고 보상한다. 움직임 예측기(90)에서 보상된 현재 프레임의 매크로블록(예측 매크로블록)과 원래의 현재 프레임의 매크로블록간의 차이분이 DCT 변환기(40)로 제공된다.If the current frame is an inter frame (e.g., a P frame), the
영상 메모리(80)는, 일정한 전송율을 가지는 전송 채널로 균일하게 전송하기 위해, 출력 데이터를 일시적으로 저장하여 완충하는 역할을 한다.The
이러한 구성에 의한 부호화기에서 영상 입력 초기와 장면전환시 각각 양자화 파라미터를 결정하는 과정을 도 3을 참조하여 설명하면 다음과 같다. The process of determining the quantization parameters for the initial image input and the scene change in the encoder having such a configuration will be described below with reference to FIG. 3.
먼저, 비디오 영상이 입력되면(S300), 비트율 제어기(10)는 초기 양자화 파라미터의 산출을 위한 목표비트를 산출한다. 비트율 제어기(10)는, 입력된 비디오 영상에 대한 화면의 복잡도를 계산하고(S305), 입력된 비디오 영상의 실제 생성 비트와 GOP 할당비트의 비율을 이용하여 목표 비트를 산출한다(S310). 그런 다음, 산출된 화면의 복잡도와 목표 비트를 이용하여 초기 양자화 파라미터를 산출하고(S315), 산출된 초기 양자화 파라미터를 양자화기(30)로 전달한다(S320).First, when a video image is input (S300), the
한편, 비디오 영상이 입력되는 동안, 비트율 제어기(10)는 실시간으로 목표비트를 산출하여 전송되는 프레임의 비트율을 지속적으로 제어한다. 이때, 비트율 제어기(10)는 장면전환시 양자화기(30)에서 장면전환 양자화 파라미터를 결정할 수 있도록 목표비트를 산출하여 제공한다. 먼저, 비트율 제어기(10)는 장면전환 검출기(20)로부터 장면전환이 이루어졌는지에 대한 정보를 제공받는다. 장면전환 검출기(20)에서는 복잡도 비와 차분 값을 산출하고(S325), 두 값이 미리 설정된 임계치에 대한 조건을 만족하였는지를 판단한다(S330). 두 값이 조건을 만족하였으면, 장면전환 검출기(20)는 장면이 전환된 것으로 판단하고, 이를 비트율 제어기(10)로 제공한다. 비트율 제어기(10)에서는, 장면 전환시 생성비트의 평균과, 인터프레임의 생성비트의 평균을 이용하여 목표비트를 산출한다(340). 그런 다음, 비트율 제어기(10)에서는, 영상 내의 복잡도와 목표 비트를 이용하여 장면전환 양자화 파라미터를 산출하고(S350), 산출된 장면전환 양자화 파라미터를 양자화기(30)로 전달한다(S360). Meanwhile, while the video image is input, the
만약, 복잡도 비와 차분 값이 조건을 만족하지 못하여 장면전환 검출기(20)에서 장면전환이 이루어지지 아니한 것으로 판단된 경우, 비트율 제어기(10)는 종래와 마찬가지로 가용비트와 버퍼 할당비트를 이용하여 목표비트를 산출한다(S335).If the complexity ratio and the difference value do not satisfy the condition and the
이를 위해, 먼저 비트율 제어기(10)는 수학식 8을 이용하여 GOP(group of picture)의 할당비트를 구한 다음, 수학식 9를 이용하여 가용비트를 구한다.To this end, first, the
여기서 는 비트율을 의미하고, Fr는 프레임율을 나타낸다. NGOP와 Np ,r은 각각 전체의 프레임수와 부호화되지 않은 P-프레임수를 의미하며, b(ni -1)은 i-1번째 프레임의 실제 발생 비트를 의미하며, Np ,r은 부호화되지 않은 P프레임수를 의미한다.here Denotes a bit rate, and F r denotes a frame rate. N GOP and N p , r represent the total number of frames and the number of unencoded P-frames, respectively, and b (n i -1 ) represents the actual occurrence bits of the i-1th frame, N p , r Denotes the number of unencoded P frames.
그런 다음, 비트율 제어기(10)는, 버퍼상태를 고려한 버퍼 할당비트를 수학식 10을 이용하여 산출한다. 이렇게 구해진 가용비트와 버퍼 할당비트의 가중치 합을 통해, 수학식 11을 이용하여 목표비트가 산출된다. Then, the
여기서, 는 목표 버퍼 레벨, Bc(ni)는 실제 버퍼 점유율을 의미한다.here, Is the target buffer level, B c (n i ) means the actual buffer occupancy.
β는 가중치 값을 의미하는 것으로, 보통 0.5값을 갖는다.β means a weight value and usually has a value of 0.5.
그런 다음, 비트율 제어기(10)는 예측 MAD(mean of absolute differential)를 산출한다(S345). MAD는 양자화 파라미터가 결정된 후 ROD(Rate Distortion Optimization)과정을 통해서 구하여 지므로, 이전 영상의 MAD를 이용하여 현재 영상의 MAD를 예측해야 한다. 이를 위한 MAD예측 알고리즘으로 선형 알고리즘이 사용되며, 수학식 12는 예측 MAD를 산출하기 위한 선형 모델에 관한 수식이다. Then, the
여기서, a1,a2는 선형 모델 파라미터로 각 매크로블록을 부호화 해나감에 따라 갱신되며, 초기값은 각각 1과 0이다.Here, a 1 and a 2 are linear model parameters, and are updated as each macroblock is encoded. The initial values are 1 and 0, respectively.
이렇게 산출된 목표비트와 예측 MAD를 이용하여 비트율 제어를 위한 양자화 파라미터가 결정되어진다(S355). 다음의 수학식 13은 비트와 영상의 왜곡도에 관한 수학적 알고리즘을 통해 산출되어진 식이다.The quantization parameter for bit rate control is determined using the calculated target bit and the predicted MAD (S355). Equation 13 below is an equation calculated through a mathematical algorithm relating to the degree of distortion of bits and images.
여기서, R은 부호화에 필요한 목표 비트를 의미하고, X1,X2는 각각 이차원 비트율-왜곡 모델의 1차, 2차 계수값을 의미한다.Here, R denotes a target bit required for encoding, and X 1 and X 2 denote primary and secondary coefficient values of the two-dimensional bit rate-distortion model, respectively.
그런 다음, 산출된 양자화 파라미터는 양자화기(30)로 제공되고(S360), ROD(Rate Distortion Optimization) 과정을 통해 MAD(Mean of Absolute Differential)값이 산출되고 부호화가 이루어진다. Then, the calculated quantization parameter is provided to the quantizer 30 (S360), and a value of Mean of Absolute Differential (MAD) is calculated and encoded through a rate distortion optimization (ROD) process.
이상에서 본 발명의 바람직한 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the preferred embodiments of the present invention have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improvements of those skilled in the art using the basic concepts of the present invention defined in the following claims are also provided. It belongs to the scope of rights.
Claims (8)
상기 비디오 영상에 대한 화면의 복잡도를 계산하는 단계;
상기 비디오 영상의 실제 생성 비트와 GOP 할당비트의 비율을 이용하여 목표 비트를 산출하는 단계; 및,
상기 화면의 복잡도와 목표비트를 이용하여 초기 양자화 파라미터를 산출하는 단계;를 포함하는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법. Inputting a video image;
Calculating a complexity of a screen for the video image;
Calculating a target bit using a ratio of an actual generation bit and a GOP allocation bit of the video image; And,
Calculating an initial quantization parameter using the complexity of the screen and a target bit; and a method of determining a quantization parameter of an H.264 / AVC encoder.
상기 화면의 복잡도는, 하기의 수학식 1을 이용하여 산출되는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법.
(수학식 1)
여기서, Ix,y,z는 k번째 프레임에서 (x,y)위치의 픽셀값, Gf(k)은 k번째 프레임의 프레임복잡도, M,N은 프레임의 가로, 세로 크기를 의미함.The method of claim 1,
The complexity of the screen is calculated using the following Equation 1 quantization parameter determination method of the H.264 / AVC encoder.
(Equation 1)
Where I x, y, z is the pixel value at position (x, y) in the kth frame, G f (k) is the frame complexity of the kth frame, and M, N are the horizontal and vertical dimensions of the frame.
상기 목표비트는, 선택 양자화 파라미터의 부호화로 생성되는 실제 생성비트와, GOP 할당비트의 비율을 이용하여 결정하며, 하기의 수학식 2를 이용하여 산출되는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법.
(수학식 2)
여기서, 는 비트율, NGOP는 GOP전체의 프레임수, NtotalP는 GOP전체에서 P프레임의 총 수를 의미하며, Fr은 프레임율을 의미함.The method of claim 1,
The target bit is determined by using a ratio between actual generation bits generated by encoding a selective quantization parameter and GOP allocation bits, and is calculated using Equation 2 below. Quantization Parameter Determination Method.
(2)
here, Is the bit rate, N GOP is the total number of frames in the GOP, N totalP is the total number of P frames in the GOP, and Fr is the frame rate.
상기 초기 양자화 파라미터는, 하기의 수학식 3을 이용하여 결정되는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법.
[수학식 3]
여기서, QP(k)는 k번째 프레임에서의 양자화 파라미터 값을 의미함. The method of claim 1,
The initial quantization parameter is a method of determining a quantization parameter of the H.264 / AVC coder, characterized in that using the following equation (3).
[Equation 3]
Here, QP (k) means the quantization parameter value in the k-th frame.
장면전환이 이루어졌는지를 파악하는 단계;
상기 장면전환이 이루어졌다고 판단되면, 목표비트를 산출하는 단계; 및,
상기 목표 비트와, 영상 내의 복잡도를 상기 수학식 3에 적용하여 장면전환 양자화 파라미터를 결정하는 단계;를 더 포함하는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법. The method of claim 4, wherein
Determining whether a scene change has been made;
If it is determined that the scene change has been made, calculating a target bit; And,
And determining the scene change quantization parameter by applying the target bit and the complexity in the image to Equation 3. The method of claim 1, further comprising: determining a scene transition quantization parameter.
상기 장면전환은, 영상 내의 복잡도 비와, 차분 값을 이용하여 판단되며, 상기 복잡도 비는 하기의 수학식 4에 표시된 바와 같이, 이전 영상과 현재 영상의 비를 이용하여 산출되고, 상기 차분 값은 하기의 수학식 5에 표시된 바와 같이 이전영상의 열 복잡도와 현재 영상의 열 복잡도를 차분하여 산출되는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법.
(수학식 4)
(수학식 5)
여기서, Gf(k)는 k번째 프레임에서의 복잡도, Gf(k-1)은 k-1번째 프레임에서의 복잡도를 나타내며, GMB,R(j,k)는 매크로블록단의 복잡도 GMB(i,j,k)에서 가로열들을 합산한 값으로 가로열 복잡도를 나타내며, M,N은 프레임의 가로, 세로 크기를 의미함.The method of claim 5, wherein
The scene change is determined using a complexity ratio in the image and a difference value, and the complexity ratio is calculated using a ratio of a previous image and a current image, as shown in Equation 4 below, and the difference value is A method of determining a quantization parameter of an H.264 / AVC encoder, characterized by calculating the difference between the thermal complexity of the previous image and the thermal complexity of the current image, as shown in Equation 5 below.
(4)
(5)
Here, G f (k) represents the complexity in the k-th frame, G f (k-1) represents the complexity in the k-1th frame, and GMB, R (j, k) represents the complexity of the macroblock stage G MB The sum of the columns in (i, j, k) represents the column complexity, and M and N represent the horizontal and vertical size of the frame.
상기 복잡도 비와 차분 값이 하기의 수학식 6의 조건을 만족할 경우 장면 전환이 이루어졌다고 판단하는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법.
(수학식 6)
여기서, GF , ratio(k)는 k번째 프레임과 k-1번째 프레임의 복잡도비를 나타내며, GF , diff(k)는 k번째 프레임과 k-1번째 프레임의 복잡도 차를 의미함.The method according to claim 6,
If the complexity ratio and the difference value satisfies the condition of Equation 6 below, it is determined that the scene change is made.
(6)
Here, G F , ratio (k) denotes the complexity ratio of the k th frame and the k-1 th frame, and G F , diff (k) denotes the complexity difference between the k th frame and the k-1 th frame.
상기 장면전환이 이루어졌다고 판단되면, 가용비트를 고려하여, 장면전환시 생성비트의 평균과, 인터프레임의 생성비트의 평균을 이용하여 목표비트를 산출하며, 상기 목표비트는 하기의 수학식 7로 표시되는 것을 특징으로 하는 H.264/AVC 부호화기의 양자화 파라미터 결정 방법.
(수학식 7)
여기서, Fr은 프레임율, NcodeP는 부호화된 P프레임의 수를 의미하며, NGOP는 GOP전체의 프레임수, b(ni)는 ni번째 프레임의 실제 발생 비트를 의미함.
The method of claim 5, wherein
If it is determined that the scene change has been made, the target bit is calculated using the average of the generation bits during the scene change and the average of the generation bits of the interframe in consideration of the available bits. A method for determining a quantization parameter of an H.264 / AVC encoder, characterized by being displayed.
(Equation 7)
Where Fr is the frame rate, N codeP is the number of encoded P frames, N GOP is the number of frames of the entire GOP, and b (ni) is the actual occurrence bit of the ni-th frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100018642A KR101086724B1 (en) | 2010-03-02 | 2010-03-02 | ?? Deciding Method of H.264/AVC Encoder using Complexity of Frame, and H.264/AVC Encoder implementing the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100018642A KR101086724B1 (en) | 2010-03-02 | 2010-03-02 | ?? Deciding Method of H.264/AVC Encoder using Complexity of Frame, and H.264/AVC Encoder implementing the same |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20110099554A true KR20110099554A (en) | 2011-09-08 |
KR101086724B1 KR101086724B1 (en) | 2011-11-24 |
Family
ID=44952402
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020100018642A KR101086724B1 (en) | 2010-03-02 | 2010-03-02 | ?? Deciding Method of H.264/AVC Encoder using Complexity of Frame, and H.264/AVC Encoder implementing the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101086724B1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014119917A1 (en) * | 2013-01-30 | 2014-08-07 | 재단법인 다차원 스마트 아이티 융합시스템 연구단 | Method for determining bit rate and apparatus therefor |
CN108271024A (en) * | 2013-12-28 | 2018-07-10 | 同济大学 | Image coding, coding/decoding method and device |
CN113973205A (en) * | 2021-10-21 | 2022-01-25 | 重庆邮电大学 | Code rate control bit distribution method based on video content characteristics and storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10362307B2 (en) | 2016-09-09 | 2019-07-23 | Hanwha Techwin Co., Ltd. | Quantization parameter determination method and image capture apparatus |
-
2010
- 2010-03-02 KR KR1020100018642A patent/KR101086724B1/en not_active IP Right Cessation
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014119917A1 (en) * | 2013-01-30 | 2014-08-07 | 재단법인 다차원 스마트 아이티 융합시스템 연구단 | Method for determining bit rate and apparatus therefor |
US9548078B2 (en) | 2013-01-30 | 2017-01-17 | Center For Integrated Smart Sensors Foundation | Method for determining bit rate and apparatus therefor |
CN108271024A (en) * | 2013-12-28 | 2018-07-10 | 同济大学 | Image coding, coding/decoding method and device |
CN108271024B (en) * | 2013-12-28 | 2021-10-26 | 同济大学 | Image coding and decoding method and device |
CN113973205A (en) * | 2021-10-21 | 2022-01-25 | 重庆邮电大学 | Code rate control bit distribution method based on video content characteristics and storage medium |
Also Published As
Publication number | Publication date |
---|---|
KR101086724B1 (en) | 2011-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101971909B1 (en) | Apparatus and method for coding/decoding image selectivly using descrete cosine/sine transtorm | |
TWI399097B (en) | System and method for encoding video, and computer readable medium | |
KR101538704B1 (en) | Method and apparatus for coding and decoding using adaptive interpolation filters | |
JP4391809B2 (en) | System and method for adaptively encoding a sequence of images | |
US8325797B2 (en) | System and method of reduced-temporal-resolution update for video coding and quality control | |
KR100850706B1 (en) | Method for adaptive encoding and decoding motion image and apparatus thereof | |
US8331449B2 (en) | Fast encoding method and system using adaptive intra prediction | |
KR101362590B1 (en) | Image processing device and method | |
EP2141927A1 (en) | Filters for video coding | |
US20070098078A1 (en) | Method and apparatus for video encoding/decoding | |
US20080069211A1 (en) | Apparatus and method for encoding moving picture | |
KR101282193B1 (en) | Method for Rate Control of Video Encoder using Kalman Filter and FIR Filter | |
CN103460700A (en) | Method for decoding image in intra prediction mode | |
JP2001145113A (en) | Device and method for image information conversion | |
JP4391810B2 (en) | System and method for adaptively encoding a sequence of images | |
CN1938728A (en) | Method and apparatus for encoding a picture sequence using predicted and non-predicted pictures which each include multiple macroblocks | |
KR101086724B1 (en) | ?? Deciding Method of H.264/AVC Encoder using Complexity of Frame, and H.264/AVC Encoder implementing the same | |
JP2008219205A (en) | Picture information encoder and picture information encoding method | |
WO2011064926A1 (en) | Image coding device, image decoding device, image coding method, and image decoding method | |
JP2008004984A (en) | Image processor and method, program, and recording medium | |
KR20040079084A (en) | Method for adaptively encoding motion image based on the temperal complexity and apparatus thereof | |
KR20080004855A (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 | |
JP5136470B2 (en) | Moving picture coding apparatus and moving picture coding method | |
KR101774237B1 (en) | Method for coding image using adaptive coding structure selection and system for coding image using the method | |
KR100832872B1 (en) | Method and apparatus for image coding efficiency improvement using geometric transformation |
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: 20141114 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20151111 Year of fee payment: 5 |
|
LAPS | Lapse due to unpaid annual fee |