KR20040062109A - Method for moving picture coding - Google Patents

Method for moving picture coding Download PDF

Info

Publication number
KR20040062109A
KR20040062109A KR1020020088431A KR20020088431A KR20040062109A KR 20040062109 A KR20040062109 A KR 20040062109A KR 1020020088431 A KR1020020088431 A KR 1020020088431A KR 20020088431 A KR20020088431 A KR 20020088431A KR 20040062109 A KR20040062109 A KR 20040062109A
Authority
KR
South Korea
Prior art keywords
frame
encoding
frames
encoded
video
Prior art date
Application number
KR1020020088431A
Other languages
Korean (ko)
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 KR1020020088431A priority Critical patent/KR20040062109A/en
Publication of KR20040062109A publication Critical patent/KR20040062109A/en

Links

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/136Incoming video signal characteristics or properties
    • 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/17Methods 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/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Abstract

PURPOSE: A method for coding motion pictures is provided to safely control transmission bit rate by advancing the picture signal coding while dividing the picture encoding bit rate to I and P frames. CONSTITUTION: A method for coding motion pictures includes the steps of carrying out intra coding of a first I frame and next P frames(S801,S802). Among macro blocks of the first I frame, those proper for transmission bit rate are intra coded in the spiral direction. In the P frames, the macro blocks for which coding is carried out centering the I frame are coded by motion compensation, and intra coding is carried out for the macro blocks extended spirally with respect to coded macro blocks. If the number of coded macro blocks is equal to that of all macro blocks in a single image frame, following image frames are coded by motion compensation by inter mode.

Description

동영상 부호화 방법{METHOD FOR MOVING PICTURE CODING}Video encoding method {METHOD FOR MOVING PICTURE CODING}

본 발명은 동영상 부호화 방법에 관한 것으로, 보다 구체적으로는 영상 신호를 부호화할 때, 각각의 영상 프레임 별로 분산되도록 부호화를 진행하여 전송함으로써 안정된 전송 비트율을 유지할 수 있는 동영상 부호화 방법에 관한 것이다.The present invention relates to a video encoding method, and more particularly, to a video encoding method capable of maintaining a stable transmission bit rate by encoding and transmitting a video signal so as to be distributed for each video frame.

현재, 그리고 미래의 통신 환경은 유선과 무선의 영역 구분이나, 지역 국가의 구분을 초월할 만큼 급변하고 있으며, 특히 IMT-2000 등으로 대별되는 미래 통신 환경은 영상과 음성은 물론 사용자가 필요로 하는 다양한 정보를 실시간으로, 또는 종합적으로 제공하는 환경으로 구축되어 가는 추세이다.The current and future communication environments are rapidly changing beyond the distinction between wired and wireless areas and regional countries. In particular, future communication environments, such as IMT-2000, require users as well as video and audio. The trend is to build an environment that provides various information in real time or comprehensively.

또한, 개인 휴대 통신 시스템의 발달은 현재 셀룰러폰이나 PCS등에서도 단순히 음성 통신만을 수행하던 차원에서 벗어나서 문자 정보의 전송은 물론, 개인 휴대 통신 단말기를 이용해서 무선으로 인터넷에 접속하거나, TV에서나 보던 동영상들을 송신할 수 있도록 개발되어지고 있다.In addition, the development of the personal mobile communication system is not only a voice communication in the cellular phone or PCS, but also to transmit text information as well as to access the Internet wirelessly using a personal mobile communication terminal, or to watch videos on TV It is being developed to transmit the data.

특히, 동영상을 디지털 데이터로 가공하여 실시간으로 전송하고 또 이 것을 수신하여 디스플레이 하는 디지털 텔레비전 시스템과, 실시간으로 전송되는 동영상을 IMT2000을 이용한 개인 휴대 단말기 등에서는 필수적인 요소로 자리 잡아 가고 있는 실정이다.In particular, a digital television system that processes a video into digital data, transmits the data in real time, receives the video, and displays the video, and the video transmitted in real time is becoming an essential element in a personal portable terminal using the IMT2000.

이것은 종래에는 휴대 단말기가 사람의 음성만을 송수신하도록 되어 있었으나, 멀티 미디어의 개발과 디지털 정보처리 기술의 발달로 인하여 음성, 영상등 다양한 정보들을 송신할 수 있게 되었다.In the related art, the portable terminal transmits and receives only human voice. However, due to the development of multimedia and the development of digital information processing technology, various information such as voice and video can be transmitted.

이와 같은 기술이 상용화될 수 있었던 것은 무엇보다도 아날로그 영상 신호를 양자화, 가변장부호화등 특수한 디지털 처리를 한 다음, 이를 디지털 정보에 포함시켜 송신하고, 수신되는 단말기에서는 이를 반대로 디코딩함으로써 빠른 전송 속도와 보다 풍부한 정보량을 송수신하도록 한 동영상 압축기술의 발달이 크게 기여하였다.Above all, this technology has been commercialized. First of all, the analog video signal is subjected to special digital processing such as quantization and variable length encoding, and then included in the digital information and transmitted. The development of video compression technology, which allows abundant information transmission and reception, contributed greatly.

최근 디지털 신호처리 기술의 발전에 힘입어 제한된 대역폭의 전송 채널을 통해 많은 양의 동영상 정보를 압축, 전송하는 방식들이 개발되어 왔으나, 전송 채널 상의 오류가 발생하면 복원 영상의 화질이 크게 저하되는 문제가 생긴다.Recently, with the development of digital signal processing technology, methods of compressing and transmitting a large amount of video information through a limited bandwidth transmission channel have been developed. However, if an error occurs on the transmission channel, the quality of the reconstructed image is greatly reduced. Occurs.

이때 제한된 대역폭을 최대한으로 이용하기 위해 오류 정정 부호를 사용하지 않고, 정상적으로 복원된 주변의 정보들로부터 잃어버린 정보를 보완하여 원 영상에 가깝게 복구하는 오류 은폐 기법들이 연구되고 있다.At this time, error concealment techniques have been studied to recover near to the original image by supplementing the lost information from the neighboring information that is normally restored without using an error correction code to maximize the limited bandwidth.

특히 MPEG(Moving Picture Experts Group)와 같은 경우 에러(error)가 발생하면 다음 동기 신호인 슬라이스 헤더를 찾을 때까지의 모든 정보를 손실하게 된다. 또한, 움직임 보상 부호화기법을 이용하기 때문에 손상된 부분의 영향이 이후 계속된 여러 장의 프레임에 걸쳐 계속된다.In particular, in the case of an MPEG (Moving Picture Experts Group), if an error occurs, all information until the next sync signal is found is lost. In addition, since the motion compensation encoding technique is used, the influence of the damaged portion is continued over the subsequent frames.

엠펙(MPEG) 또는 H.263의 압축 방식에서는 이전 부호화 영상으로부터 움직임을 판단하고 이를 보상하여 부호화를 진행하는데, 이와 같이 움직임 추정을 하는데많은 계산 량을 가지며 화질과 비트(bit)량에 직접적인 영향을 미치므로 매우 중요하다고 할 수 있다.In MPEG or H.263, the compression method determines the motion from the previous encoded video and compensates it for encoding. In this way, the motion estimation has a large amount of computation and directly affects the image quality and the amount of bits. It is very important because it is crazy.

따라서 움직임 판단(motion estimation) 과 움직임 보상(motion compensation) 값에 관한 많은 연구가 끊임없이 이루어 졌으며, 최근에는 모션 판단 값을 다이아몬드 서치 패턴(diamond search pattern)을 이용하여 풀 서치(full search)와 거의 비슷한 화질과 비트 량을 가지며 가장 범용 적으로 쓰이는 트리 스텝 서치(three step search) 방식이 사용되고 있다.Therefore, many studies on motion estimation and motion compensation values have been conducted continuously. Recently, the motion estimation values are almost similar to full search using a diamond search pattern. The most widely used three step search method, which has image quality and bit rate, is used.

특히, IMT-2000과 같은 음성과 영상을 송수신하는 영상 전화 시스템에서는 휴대 단말기에 장착된 카메라가 영상을 촬영한 뒤 이를 부호화하여 곧바로 다른 휴대 단말기에 송신하여 디스플레이 하도록 되어 있으므로 상기의 동영상 압축 및 움직임 추정을 위한 부호화 방식이 중요한 신호처리 방식이 된다.In particular, in a video telephone system for transmitting and receiving voice and video, such as IMT-2000, the camera mounted on the mobile terminal captures an image, encodes it, and sends it to another mobile terminal for display. The coding scheme for the circuit becomes an important signal processing scheme.

비디오 인코더는 입력 영상 신호를 I 프레임, P 프레임, B 프레임으로 구분하여 부호화를 진행하는데, 상기 I 프레임은 시간 예측 방법을 사용하지 않고, 자체내의 영상 프레임의 데이터 만을 가지고 영상을 예측한다. 독립적으로 부호화와 복호화를 할 수 있는 장점이 있지만 하나의 영상 프레임을 부호화하는 비트량이 매우 크다.The video encoder classifies an input video signal into I frames, P frames, and B frames, and encodes the input video signals without using a time prediction method. Although there is an advantage in that encoding and decoding can be performed independently, the amount of bits for encoding one image frame is very large.

상기 P 프레임은 시간적으로 이전에 부호화된 영상 프레임으로부터 현재 부호화되는 영상 프레임을 예측할 수 있도록, 즉 부호화될 매크로 블록과 이전 영상 프레임 내의 매크로 블록과의 차이 값만을 부호화하여 보낸다.The P frame is capable of predicting a video frame currently encoded from a previously encoded video frame in time, i.e., encoding only a difference value between a macroblock to be encoded and a macroblock in a previous video frame.

따라서, 상기 P 프레임은 I 프레임과 같이 독립적으로 부호화를 진행할 수없고, 이전 영상 프레임이 반드시 부호화 또는 복호화가 진행되어야만 정상적으로 복원이 가능하다.Accordingly, the P frame cannot be encoded independently like an I frame, and can be normally restored only when the previous video frame is encoded or decoded.

하지만, P 프레임은 I 프레임에 비하여 부호화 비트량이 매우 적다.However, P frames have a much smaller amount of encoded bits than I frames.

상기 B 프레임은 시간적으로 이전에 위치한 영상 프레임과 다음에 위치한 영상 프레임으로부터 예측을 진행한다. 상기 B 프레임이 상기 I 프레임이나 P 프레임에 비해서 더 효율적으로 영상을 압축할 수 있는 경우가 많지만, 일반적으로 휴대용 단말기나 실시간 영상 통화에서는 복잡성과 시간적 잠재성 때문에 사용하지 않는다.The B frame performs prediction from a video frame located before and a video frame located next in time. Although the B frame can compress the video more efficiently than the I frame or the P frame, it is generally not used because of the complexity and time potential in the portable terminal or real time video call.

따라서, 일반적으로는 영상 통화를 위해서는 인코더에서는 I 프레임으로 시작하여 P 프레임 순으로 부호화를 진행하여 압축을 하고, 이를 디코딩하여 디스플레이 한다.Therefore, in general, for video telephony, the encoder starts with I frames and proceeds with encoding in order of P frames, compresses them, decodes them, and displays them.

도 1은 종래 기술에 따른 동영상 인코더 시스템을 도시한 도면이다.1 is a view showing a video encoder system according to the prior art.

도 1에 도시된 바와 같이, 실제 물체를 촬영한 아날로그 비디오 신호가 들어오면 이를 디지털 변환한 후, 부호화하기 위하여 코딩 작업이 이루어진다. 디지털 비디오 신호로 변환된 영상 신호는 DCT(Discrete Cosine Transform: 1)에서 이산여현변환이 이루어지고, 주파수 형태로 변환된 영상 신호는 양자화부(3)에서 양자화 가된 다음 VLC(Variable Length Coding: 10)에서 엔트로피화 과정을 거쳐 외부로 송신된다.As shown in FIG. 1, when an analog video signal photographing a real object is received, a digital conversion is performed, and a coding operation is performed to encode the same. The video signal converted into a digital video signal is subjected to discrete cosine transform in DCT (Discrete Cosine Transform: 1), and the video signal converted into frequency form is quantized in quantization unit 3 and then VLC (Variable Length Coding: 10). ) Is transmitted to the outside through entropy process.

이때, 부호화되는 디지털 영상이 인터 모드(Inter mode)인 경우에는 모션 예측기(Motion Predict: 9)로부터 이전 영상을 예측할 수 있는 모션 벡터를 생성한다. 영상 프레임 들로부터 움직임을 추정할 수 있도록 부호화 영상을 외부로 송신하기 위한 엔트로피 과정과 함께 양자화한 영상 데이터를 다시 역양자화부(5)에서 역양자화하고, 그런 다음 역DCT(7)에서 역이산여현변환을 하여 재구성된 영상을 영상 메모리(8)에 저장한다.In this case, when the encoded digital image is in the inter mode, a motion vector capable of predicting the previous image is generated from a motion predictor 9. The dequantized image data is inversely quantized by the inverse quantization unit 5 together with an entropy process for transmitting an encoded image to the outside to estimate the motion from the image frames, and then inverse discrete cosine in the inverse DCT 7. The reconstructed image is stored in the image memory 8 by the conversion.

또한, 부호화되는 영상이 최초 영상으로서 상기 영상 메모리(8)에 저장되어 있는 것이 아닐 경우에는 인트라 예측을 위한 부호화를 진행하고, 이후 P 프레임에 대해서는 영상 프레임의 매크로 블록 단위로 움직임 추정을 실시하여 부호화를 진행한다.If the video to be encoded is not the first video and is not stored in the video memory 8, encoding is performed for intra prediction, and motion coding is performed for P frames by macroblock of the video frame. Proceed.

즉, 인코더에서는 최초 입력되는 영상을 인트라 영상 프레임으로 판단하여 영상 프레임 자체 내에서 예측을 진행하여 부호화를 진행하고, 이러한 인트라 영상 프레임이 부호화가 되고 이후 입력되는 영상 프레임은 이전에 부호화된 인트라 영상 프레임으로부터 움직임을 추정하여 부호화를 진행한다.That is, the encoder determines the first input image as an intra image frame, performs a prediction by encoding in the image frame itself, and then encodes the intra image frame, and then the input image frame is a previously encoded intra image frame. The motion is encoded by estimating the motion from.

이와 같은 절차는 디코더에서도 인코더와 마찬가지 방법으로 디코딩을 실시하여 화면을 재현하게 된다.In this process, the decoder performs decoding in the same manner as the encoder to reproduce the screen.

도 2는 종래 기술에 따라 부호화가 영상 시퀀스들을 도시한 도면이다.2 is a diagram illustrating image sequences of an encoding according to the prior art.

도 2에 도시된 바와 같이, 부호화된 영상 프레임 들은 시간에 따라 I 프레임부터 차례대로 P 프레임 들이 연속되는 하나의 시퀀스들로 디스플레이 된다.As illustrated in FIG. 2, the encoded image frames are displayed as one sequence in which P frames are successively sequentially from I frames over time.

카메라에서 촬영된 영상은 인코더에서 각각의 영상 프레임당 부호화가 진행된 후에, 비트스트림 형태로 외부로 전송된다. 이때, 전송 채널에서 에러가 발생할 가능성이 많으므로, I 프레임 이후 P 프레임 들을 계속 오도록 할 수 있지만, 발생될 오류 때문에 중간에 I 프레임 영상을 삽입하게 된다.The video captured by the camera is transmitted to the outside in the form of a bitstream after encoding of each video frame is performed by the encoder. In this case, since an error may occur in the transmission channel, P frames may continue to come after the I frame, but an I frame image is inserted in the middle due to an error to be generated.

I 프레임을 디코더에서 디코딩하고 이후 P 프레임에 대해서는 움직임 보상을 진행하기 때문에 에러가 발생할 경우에 에러 누적으로 인하여 화질 저하를 야기할 수 있다. 따라서, 중간에 I 프레임을 삽입함으로써 에러가 누적되지 않도록 한다.Since the I frame is decoded by the decoder and motion compensation is performed on the P frame later, image quality may be degraded due to error accumulation when an error occurs. Therefore, the error is not accumulated by inserting an I frame in the middle.

도 3은 종래 기술에 따라 QP 값이 13일 때 프레임당 전송비트율을 도시한 그래프이다.3 is a graph illustrating a transmission bit rate per frame when the QP value is 13 according to the related art.

도 3에 도시된 바와 같이, 휴대용 단말기를 통하여 화상을 전송하는 시스템에서 화면의 크기는 QCIF(176*144)를 사용하는데, 전송 비트율 조절을 하지 않고 QP를 13으로 했을 때, 부호화된 영상 프레임 들의 전송 비트율을 나타내었다.As shown in FIG. 3, the screen size is QCIF (176 * 144) in a system for transmitting an image through a portable terminal. When QP is 13 without adjusting the transmission bit rate, the encoded image frames The transmission bit rate is shown.

즉, 첫 번째 I 프레임에서는 전송 비트율이 18000bits/frame이고, 이후 P 프레임에 대해서는 전송 비트율이 4000~6000bits/frame 으로 일정하다.That is, the transmission bit rate is 18000 bits / frame in the first I frame, and the transmission bit rate is constant between 4000 and 6000 bits / frame for the P frame.

상기에서 설명한 바와 같이 I 프레임의 경우에는 부호화를 다른 참조 영상 프레임 없이 자체 내에서 부호화를 진행하기 때문에 영상 프레임당 비트량이 많고, 이후 뒤따라오는 P 프레임의 경우에는 상기 I 프레임의 부호화 정보를 이용하므로 비트량이 상대적으로 작다.As described above, in the case of an I frame, since the encoding is performed in itself without any other reference image frame, the amount of bits per image frame is large, and in the case of a subsequent P frame, the encoding information of the I frame is used. The amount is relatively small.

그러나, 상기와 같이 인코더에서는 I 프레임에 대하여 부호화를 진행하고, 다음에 계속되는 영상 프레임을 P 프레임으로 하여 부호화를 진행하지만, 전송중 오류 발생을 확인하기 위하여 중간에 I 프레임을 주기적으로 삽입하여 부호화를 진행한다.However, as described above, the encoder performs encoding on the I frame and encodes the video frame following the next P frame. However, in order to confirm an error during transmission, the encoder is periodically inserted to encode the I frame. Proceed.

영상 단말기에서는 채널당 전송되는 비트율이 크기 않기 때문에 전송 비트율조절이 양질의 화상을 구현하는 중요한 요인이 되는데, 상기와 같이 I 프레임의 삽입으로 인하여 P 프레임 전송때와 큰 편차를 가지면서 전송을 진행하게 되어 전송 비트율이 불안정한 문제가 있다.In the video terminal, since the bit rate transmitted per channel is not large, transmission bit rate adjustment becomes an important factor for implementing a good quality image. As described above, transmission is performed with a large deviation from P frame transmission due to the insertion of an I frame. There is a problem that the transmission bit rate is unstable.

도 4a 및 도 4b는 종래 기술에 따라 QP 값을 25로 하였을 때 프레임당 전송 비트율을 도시한 그래프로서, 도 4a에 도시된 바와 같이, QP 값을 크게 할 경우에는 고주파 성분을 감소 시켜 I 프레임에 대응하는 비트량을 감소시킬 수 있지만, QP의 증가로 인하여 화질이 크게 저하된다.4A and 4B are graphs showing the transmission bit rate per frame when the QP value is 25 according to the prior art. As shown in FIG. 4A, when the QP value is increased, the high frequency component is reduced to I frame. Although the corresponding bit amount can be reduced, the image quality is greatly degraded due to the increase in QP.

첫 번째 I 영상 프레임에 대하여 QP 값을 상기 도 3에서와 같이 13에서 25로 증가시킨 경우에는 영상 프레임의 비트량이 18232bit에서 1105bit로 크게 줄어드는 것을 볼 수 있다.When the QP value is increased from 13 to 25 for the first I image frame, it can be seen that the bit amount of the image frame is greatly reduced from 18232 bit to 1105 bit.

하지만, 도 4b에 도시된 바와 같이, 화질을 나타내는 Luminance PSNR 값은 첫 번째 I 프레임에 대하여 QP가 13일 때, Luminance PSNR 값이 31.5에서 QP가 25일 때, Luminance PSNR 값이 28.5로 크게 떨어져 다른 P 프레임 들에 비하여 화질이 현저히 떨어지고 있음을 볼 수 있다.However, as shown in FIG. 4B, the Luminance PSNR value indicating the picture quality is significantly different from the Luminance PSNR value to 28.5 when the Luminance PSNR value is 31.5 to QP 25 when the QP is 13 for the first I frame. It can be seen that the image quality is significantly lower than that of the P frames.

도 5는 종래 기술에 따라 영상 프레임을 스킵하는 경우의 프레임당 전송 비트율을 도시한 그래프로서, 도시된 바와 같이, QP 값을 낮게 유지하여 양질의 화질을 유지하면서, 전송 비트율을 조절하기 위하여 I 프레임을 부호화한 후에 뒤따라오는 영상 프레임에 대하여 부호화를 하지 않고, I 프레임에 사용된 bit량이 요구되는 평균 전송 비트율에 맞을 때까지 영상 프레임을 스킵한다.FIG. 5 is a graph illustrating a transmission bit rate per frame when skipping an image frame according to the prior art. As shown in FIG. 5, an I frame is used to adjust a transmission bit rate while maintaining a high quality image quality while maintaining a low QP value. After encoding the video frame, the video frame is skipped without encoding the subsequent video frame until the amount of bits used in the I frame meets the required average transmission bit rate.

이와 같이 전송 비트율을 맞추기 위한 방법은 I 프레임의 고화질 유지는 가능하지만, 스킵되는 영상 프레임 들로 인하여 디스플레이 되는 화면이 부자연스럽게 이어지는 문제가 있다.As described above, the method for adjusting the transmission bit rate can maintain the high quality of the I frame, but there is a problem in that the displayed screen is unnaturally continued due to skipped image frames.

도면에 도시된 바와 같이 첫 I 프레임 이후에 7개의 P 프레임이 스킵된 다음 P 프레임이 나오기 때문에 평균 전송 비트 량을 유지할 수는 있지만, 자연스러운 영상을 얻기는 어렵다.As shown in the figure, since seven P frames are skipped after the first I frame and then P frames are output, the average transmission bit amount can be maintained, but it is difficult to obtain a natural image.

본 발명은, 영상 신호를 부호화할 때 I 프레임과 P 프레임들에 영상 부호화 비트율을 분할하면서 부호화를 진행하여 전송 비트율을 안전하게 조절할 수 있는 동영상 부호화 방법을 제공함에 그 목적이 있다.An object of the present invention is to provide a video encoding method capable of safely controlling a transmission bit rate by performing encoding while dividing an image encoding bit rate into I frames and P frames when encoding a video signal.

도 1은 종래 기술에 따른 동영상 인코더 시스템을 도시한 도면.1 illustrates a video encoder system according to the prior art.

도 2는 종래 기술에 따라 부호화가 영상 시퀀스들을 도시한 도면.2 is a diagram illustrating image sequences encoded by a conventional technique.

도 3은 종래 기술에 따라 QP 값이 13일 때 프레임당 전송비트율을 도시한 그래프.3 is a graph showing a transmission bit rate per frame when the QP value is 13 according to the prior art.

도 4a 및 도 4b는 종래 기술에 따라 QP 값을 25로 하였을 때 프레임당 전송 비트율을 도시한 그래프.4A and 4B are graphs showing a transmission bit rate per frame when the QP value is 25 according to the prior art.

도 5는 종래 기술에 따라 영상 프레임을 스킵하는 경우의 프레임당 전송 비트율을 도시한 그래프.5 is a graph illustrating a transmission bit rate per frame when skipping an image frame according to the related art.

도 6은 본 발명에 따른 부호화가 영상 시퀀스들을 도시한 도면.6 is a diagram illustrating image sequences of an encoder according to the present invention.

도 7은 본 발명에 따른 P 프레임 내에서 인트라 매크로 블록이 나선형으로 퍼져 나가는 모습을 도시한 도면.FIG. 7 is a diagram illustrating an intra macroblock spirally spread within a P frame according to the present invention. FIG.

도 8은 본 발명에 따른 나선형 방향으로 부호화를 진행하는 과정을 나타낸 플로챠트.8 is a flowchart illustrating a process of encoding in a spiral direction according to the present invention.

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

1: DCT 3: 양자화부1: DCT 3: Quantizer

5: 역양자화부 7: 역DCT5: Inverse quantization department 7: Inverse DCT

8: 영상 메모리 9: 모션 예측기8: Image Memory 9: Motion Predictor

10: VLC10: VLC

상기한 목적을 달성하기 위한, 본 발명에 따른 동영상 부호화 방법은,In order to achieve the above object, a video encoding method according to the present invention,

입력되는 영상 신호에 대하여 첫 번째 I 프레임의 중심부 매크로 블록들에 대하여 인트라 부호화를 진행하는 단계;Performing intra encoding on the central macroblocks of the first I frame with respect to the input image signal;

상기 첫 번째 I 프레임 이후의 P 프레임에 대하여 차례로 나선 방향으로 매크로 블록들을 부호화하는 단계;Encoding macroblocks in a helical direction in sequence with respect to a P frame after the first I frame;

상기 부호화되는 매크로 블록의 개수와 하나의 영상 프레임의 총 매크로 블록수가 같은 가를 판단하는 단계; 및Determining whether the number of macro blocks to be encoded is equal to the total number of macro blocks in one image frame; And

상기 부호화되는 매크로 블록의 개수와 하나의 영상 프레임의 총 매크로 블록 수가 같은 경우에는 이후에 연속하는 영상 프레임에 대하여는 인터 모드에 의하여 움직임 보상으로 부호화를 진행하는 단계; 를 포함하는 것을 특징으로 한다.If the number of macroblocks to be encoded is equal to the total number of macroblocks of one video frame, encoding the subsequent video frames with motion compensation according to an inter mode; Characterized in that it comprises a.

여기서, 상기 첫 번째 I 프레임 이후의 부호화가 되는 P 프레임 들의 매크로 블록들은 인터 모드에 의한 움직임 보상과 인트라 모드에 의한 예측 부호화 과정을 동시에 진행하고, 상기 P 프레임에서는 상기 첫 번째 I 프레임에서 부호화가된 매크로 블록에 대해서는 움직임 보상에 의하여 부호화를 진행하는 것을 특징으로 한다.Here, the macroblocks of the P frames that are encoded after the first I frame are simultaneously subjected to the motion compensation by the inter mode and the prediction encoding by the intra mode. In the P frame, the macro blocks are encoded in the first I frame. The macroblock may be encoded by motion compensation.

그리고 상기 P 프레임에서는 상기 첫 번째 I 프레임에서 부호화가된 매크로 블록으로부터 확장된 새로운 부분의 매크로 블록들에 대해서는 인트라 모드에 의하여 부호화를 진행하며, 상기 첫 번째 I 프레임과 P 프레임의 부호화가 진행되지 않는 블록들에 대해서는 강제로 일정한 단일 색으로 부호화를 진행하여, P 프레임에서 부호화를 진행할 때 참조블록으로 사용되지 않도록 하는 것을 특징으로 한다.In the P frame, encoding of macroblocks of a new portion extended from the macroblock encoded in the first I frame is performed by intra mode, and encoding of the first I frame and the P frame is not performed. The blocks are forcibly encoded in a single color so that they are not used as reference blocks when encoding is performed in a P frame.

본 발명에 의하면, 부호화 비트율이 가장 큰 I 프레임의 비트량을 이후 계속되어 부호화 되는 P 프레임 들에 분배함으로써 전송 비트율을 안정화시켜 I 프레임 이후 급격한 비트량 감소를 방지하였다.According to the present invention, the bit rate of an I frame having the largest encoding bit rate is distributed to P frames that are subsequently encoded, thereby stabilizing the transmission bit rate to prevent a sudden decrease in bit amount after the I frame.

이하, 첨부한 도면에 의거하여 본 발명의 바람직한 실시 예를 자세히 설명하도록 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 6은 본 발명에 따른 부호화가 영상 시퀀스들을 도시한 도면이다.6 is a diagram illustrating encoding image sequences according to the present invention.

도 6에 도시된 바와 같이, 영상 프레임을 부호화할 때 첫 번째 I 프레임과 이후 뒤따르는 P 프레임 들을 차례대로 부호화를 진행하도록 하여 비트량을 조절하였다.As shown in FIG. 6, when encoding an image frame, the first I frame and subsequent P frames are sequentially encoded to adjust the bit amount.

즉, 첫 번 째 I 프레임을 구성하는 매크로 블록 중에서 중심부터 나선형으로차례대로 부호화를 진행한다. 차례대로 부호화 되는 매크로 블록들은 P 프레임 들을 따라 확장되어 일정개수의 P 프레임까지 계속된다. 바람직하게는 하나의 영상 프레임에 해당하는 매크로 블록 수가 될 때까지의 영상 프레임 들을 차례대로 중심부터 나선형 방향으로 확장해 나간다.That is, among macroblocks constituting the first I frame, encoding is sequentially performed from the center to the spiral. Macro blocks that are sequentially encoded are extended along P frames and continue up to a certain number of P frames. Preferably, the image frames are sequentially extended from the center to the spiral direction until the number of macro blocks corresponding to one image frame is reached.

이와 같이 부호화가 진행될 경우에는 I 프레임의 많은 비트량이 P 프레임 들에 분배되어 전체적으로 영상 프레임들간의 전송 비트율 편차가 감소되어 안정된 전송 비트율을 유지할 수 있다.When encoding is performed as described above, a large amount of bits of an I frame is distributed to P frames, thereby reducing transmission bit rate variation between image frames as a whole to maintain stable transmission bit rate.

사용자 입장에서도 영상 프레임 중심부터 차례로 확장되어 화면이 재현되므로 시각적으로 자연스러운 영상을 볼 수 있다.From the user's point of view, the screen is reproduced by expanding from the center of the image frame, so that visually natural images can be seen.

도 7은 본 발명에 따른 P 프레임 내에서 인트라 매크로 블록이 나선형으로 퍼져 나가는 모습을 도시한 도면이다.FIG. 7 is a diagram illustrating an intra macroblock spirally spread within a P frame according to the present invention.

도 7에 도시된 바와 같이, 첫 번째 I 프레임부터 이어지는 P 프레임 들에 따라 중심부터 차례로 나선형 모양으로 부호화가 진행되는 모습을 도시하였다.As shown in FIG. 7, the encoding proceeds in a spiral shape sequentially from the center according to the P frames starting from the first I frame.

전송 비트율에 따라 I 프레임과 P 프레임에서 나선형으로 확장되는 매크로 블록 수를 조절할 수 있다.According to the transmission bit rate, the number of macro blocks that spirally expand in I frames and P frames can be adjusted.

특히, P 프레임에서는 인트라 부호화와 인터 부호화를 동시에 진행하게되는데, 중심부에 부호화가 진행되고, 이후 P 프레임에서 확장되는 매크로 블록에 대해서는 인트라 부호화가 진행되고, 이전에 부호화가 진행된 매크로 블록에 대해서는 움직임 보상을 한다.In particular, in the P frame, intra encoding and inter encoding are performed at the same time. The encoding is performed at the center portion, and then the intra encoding is performed on the macroblock extended in the P frame, and the motion compensation is performed on the macroblock that has been previously encoded. Do it.

즉, 나선형으로 확장해 나가는 매크로 블록에 대해서는 하나의 영상 프레임에 포함되는 매크로 블록 수만큼 부호화가 진행될 때까지 인트라 부호화가 계속 진행되고, 이미 부호화가 완성된 매크로 블록에 대해서는 움직임 보상에 의하여 부호화를 진행한다.That is, intra coding continues to encode macro blocks extending in a spiral until the number of macro blocks included in one image frame is processed, and encoding is performed by motion compensation on macro blocks that have already been encoded. do.

즉, 첫 번째 영상 프레임(I 프레임)에 대하여 전송 비트율에 적당한 매크로 블록 수에 대하여 인트라 부호화가 진행되고, 이후 뒤따르는 P 프레임에 대하여 이전 I 프레임에서 부호화를 진행한 매크로 블록부터 나선형 방향으로 확장되도록 매크로 블록들을 인트라 부호화 한다. 하지만, 상기 I 프레임에서 부호화를 진행한 매크로 블록들에 대해서는 움직임 보상을 하여 부호화를 진행한다.That is, intra coding is performed on the number of macro blocks suitable for the transmission bit rate with respect to the first image frame (I frame), and then, in the subsequent P frame, the intra coding is extended in a spiral direction from the macro block that has been encoded in the previous I frame. Intra-encode macro blocks. However, encoding is performed by performing motion compensation on the macroblocks subjected to encoding in the I frame.

상기 P 프레임에서 새로이 인트라 부호화를 진행할 매크로 블록의 수는 마찬가지로 전송 비트율에 맞도록 정한다.The number of macro blocks to be newly intra coded in the P frame is similarly determined to match the transmission bit rate.

이렇게 부호화 매크로 블록들을 P 프레임들로부터 차례대로 확장하는 개수는 하나의 디스플레이 되는 화면 내에 존재하는 매크로 블록수의 총개수와 같을 때가 가장 바람직하다.It is most preferable that the number of coded macroblocks being sequentially expanded from P frames is equal to the total number of macroblocks existing in one displayed screen.

I 프레임과 P 프레임을 차례대로 부호화를 진행할 때 부호화가 진행된, 즉 나선형으로 확장된 매크로 블록수가 하나의 영상 프레임 내에 존재하는 총 매크로 블록수를 넘을 때 인트라와 인터의 혼합 부호화 과정을 멈추고, 이후에는 일반적인 P 프레임의 부호화같이 움직임 보상을 진행하여 부호화를 한다.When encoding the I frame and the P frame in sequence, the encoding process is stopped when the encoding proceeds, that is, when the number of macroblocks spirally expanded exceeds the total number of macroblocks existing in one image frame. As in general P frame encoding, motion compensation is performed to perform encoding.

도 8은 본 발명에 따른 나선형 방향으로 부호화를 진행하는 과정을 나타낸 플로챠트이다.8 is a flowchart illustrating a process of encoding in a spiral direction according to the present invention.

도 8에 도시된 바와 같이, 입력되는 영상 신호에 대하여 첫 번째 I 프레임의중심부 매크로 블록들에 대하여, 전송 비트율에 알맞은 매크로 블록들을 나선 방향으로 인트라 부호화를 진행한다(S801).As shown in FIG. 8, intra-encoding of macroblocks suitable for the transmission bit rate is performed in the spiral direction on macroblocks of the first I frame with respect to the input image signal (S801).

첫 번째 I 프레임의 중심부 매크로 블록들에 대하여 인트라 부호화가 진행되면, 이후 P 프레임 들에 대하여 부호화가 진행되는데, 상기 I 프레임 중심의 부호화가 진행된 매크로 블록에 대해서는 움직임 보상에 의하여 부호화를 하고, 부호화가된 매크로 블록을 중심으로 나선형으로 확장된 매크로 블록들에 대해서는 인트라 부호화를 진행한다(S802).When intra encoding is performed on the central macroblocks of the first I frame, encoding is performed on the P frames, and then encoding is performed by motion compensation on the macroblock where the encoding of the I frame center is performed. Intra encoding is performed on the macroblocks spirally extended around the macroblock (S802).

즉, 차례대로 확장되고 있는 매크로 블록에 대해서는 인트라 부호화를 하고, 기존에 부호화를 진행했던 매크로 블록에 대해서는 움직임 보상에 따른 부호화를 진행한다.In other words, intra-encoding is performed on macro blocks that are sequentially expanded, and encoding according to motion compensation is performed on macro blocks that have been previously encoded.

첫 번째 I 프레임부터 차례대로 P 프레임들의 매크로 블록들을 부호화 하면서 부호화된 매크로 블록의 개수와 화면내의 총 매크로 블록의 개수가 같은 경우, 또는 일정한 개수만큼 일괄적으로 매크로 블록들을 확장해나가는 경우에는 화면내의 총 매크로 블록 수보다 크게될 때까지 인트라 부호화와 인터 부호화를 동시에 진행한다(S803).When the macroblocks of P frames are sequentially encoded from the first I frame, the number of encoded macroblocks and the total number of macroblocks in the screen are the same, or when the macroblocks are collectively expanded by a certain number in the screen. Intra coding and inter coding are simultaneously performed until the total number of macroblocks is greater (S803).

I 프레임과 P 프레임들에 대하여 부호화가 진행된 매크로 블록의 개수가 화면내 총 매크로 블록수보다 같거나 큰 경우에는 시작을 위한 부호화 진행이 끝난 것을 의미하므로, 이후에 대해서는 움직임 보상을 진행하면서 부호화를 진행한다(S804).If the number of encoded macroblocks for the I frames and the P frames is equal to or larger than the total number of macroblocks in the screen, it means that the encoding process is started to begin. Therefore, the encoding is performed while the motion compensation is performed. (S804).

하지만, I 프레임과 P 프레임들에 대하여 부호화가 진행된 매크로 블록의 개수가 화면내 총 매크로 블록수보다 작은 경우에는 아직 화면 하나에 대해서 부호화가 진행되지 않음을 나타내는 것으로서 계속해서 P 프레임 들에 대하여 확장되는 영역에서는 인트라 부호화를 진행하고, 부호화가 진행됐던 매크로 블록에 대해서는 움직임 보상을 진행하여 부호화를 진행한다(S802).However, if the number of macroblocks coded for I frames and P frames is smaller than the total number of macroblocks in the picture, this indicates that the encoding has not been performed for one picture yet. In the region, intra encoding is performed, and motion compensation is performed on the macroblock in which encoding has been performed (S802).

그리고, I 프레임의 중심에서 부호화가 진행되는 매크로 블록이외의 영역은 강제적으로 회색으로 부호화를 진행하였다, 이것은 P 프레임에서 인트라 부호화 인터 부호화를 동시에 진행할 때, 회색 부분에 대하여 부호화를 진행하게 되면 부호화 비트량이 증가되기 때문이다.In addition, when the encoding is performed on the gray part while performing intra encoding inter encoding in the P frame at the same time, the encoding bit is forcibly encoded in the region other than the macro block where encoding is performed at the center of the I frame. This is because the amount is increased.

영상 신호에 대하여 부호화를 진행할 때, I 프레임의 많은 비트량 때문에 발생하는 전송 비트량 편차를 줄이기 위해서 I 프레임과 이후 P 프레임 들에 부호화 비트량을 분배하도록 하여 자연스러운 영상을 얻을 수 있는 이점이 있다.When encoding the video signal, there is an advantage in that a natural image can be obtained by distributing the encoding bit amount to the I frame and the subsequent P frames in order to reduce the transmission bit amount variation generated due to the large bit amount of the I frame.

이상에서 자세히 설명된 바와 같이, 본 발명은 부호화 하는 I 프레임 많음 부호화 비트량을 분배하기 위해 여러 개의 P 프레임 들에 나선 방향으로 차례대로 부호화가 진행되도록 하여 안정된 전송 비트량을 구현할 수 있는 효과가 있다.As described in detail above, the present invention has an effect that a stable transmission bit amount can be realized by sequentially encoding a plurality of P frames in a spiral direction in order to distribute the amount of encoding I frames. .

아울러, 전송되는 비트량의 크기도 I 프레임과 P 프레임 들에서 크게 편차가 나지 않아 일정한 전송 비트율을 요구하는 회로 스위치 네트워크 시스템에 효율적인 이점이 있다.In addition, the size of the transmitted bit amount does not vary greatly between the I frame and the P frame, which is an efficient advantage in a circuit switch network system requiring a constant transmission bit rate.

본 발명은 상기한 실시 예에 한정되지 않고, 이하 청구 범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 분야에서 통상의 지식을 가진자라면 누구든지 다양한 변경 실시가 가능할 것이다.The present invention is not limited to the above-described embodiments, and various changes can be made by those skilled in the art without departing from the gist of the present invention as claimed in the following claims.

Claims (5)

입력되는 영상 신호에 대하여 첫 번째 I 프레임의 중심부 매크로 블록들에 대하여 인트라 부호화를 진행하는 단계;Performing intra encoding on the central macroblocks of the first I frame with respect to the input image signal; 상기 첫 번째 I 프레임 이후의 P 프레임에 대하여 차례로 나선 방향으로 매크로 블록들을 부호화하는 단계;Encoding macroblocks in a helical direction in sequence with respect to a P frame after the first I frame; 상기 부호화되는 매크로 블록의 개수와 하나의 영상 프레임의 총 매크로 블록수가 같은 가를 판단하는 단계; 및Determining whether the number of macro blocks to be encoded is equal to the total number of macro blocks in one image frame; And 상기 부호화되는 매크로 블록의 개수와 하나의 영상 프레임의 총 매크로 블록 수가 같은 경우에는 이후에 연속하는 영상 프레임에 대하여는 인터 모드에 의하여 움직임 보상으로 부호화를 진행하는 단계;를 포함하는 것을 특징으로 하는 동영상 부호화 방법.And if the number of macroblocks to be encoded is equal to the total number of macroblocks in one video frame, encoding subsequent motion picture frames with motion compensation in inter mode. Way. 제 1 항에 있어서,The method of claim 1, 상기 첫 번째 I 프레임 이후의 부호화가 되는 P 프레임들의 매크로 블록들은 인터 모드에 의한 움직임 보상과 인트라 모드에 의한 예측 부호화 과정을 동시에 진행하는 것을 특징으로 하는 동영상 부호화 방법.The macroblocks of the P frames that are encoded after the first I frame are simultaneously subjected to the motion compensation in the inter mode and the prediction encoding in the intra mode. 제 1 항에 있어서,The method of claim 1, 상기 P 프레임에서는 상기 첫 번째 I 프레임에서 부호화가된 매크로 블록에대해서는 움직임 보상에 의하여 부호화를 진행하는 것을 특징으로 하는 동영상 부호화 방법.And the P frame is encoded by motion compensation on the macro block encoded in the first I frame. 제 1 항에 있어서,The method of claim 1, 상기 P 프레임에서는 상기 첫 번째 I 프레임에서 부호화가된 매크로 블록으로부터 확장된 새로운 부분의 매크로 블록들에 대해서는 인트라 모드에 의하여 부호화를 진행하는 것을 특징으로 하는 동영상 부호화 방법.In the P frame, the video encoding method according to the intra mode is performed on the macro blocks of the new portion extended from the macro block encoded in the first I frame. 제 1 항에 있어서,The method of claim 1, 상기 첫 번째 I 프레임과 P 프레임의 부호화가 진행되지 않는 블록들에 대해서는 강제로 일정한 단일 색으로 부호화를 진행하여, P 프레임에서 부호화를 진행할 때 참조블록으로 사용되지 않도록 하는 것을 특징으로 하는 동영상 부호화 방법.The video encoding method of claim 1, wherein the first I frame and the P frame that are not encoded are forcibly encoded in a single color so that they are not used as reference blocks when encoding is performed in the P frame. .
KR1020020088431A 2002-12-31 2002-12-31 Method for moving picture coding KR20040062109A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020020088431A KR20040062109A (en) 2002-12-31 2002-12-31 Method for moving picture coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020020088431A KR20040062109A (en) 2002-12-31 2002-12-31 Method for moving picture coding

Publications (1)

Publication Number Publication Date
KR20040062109A true KR20040062109A (en) 2004-07-07

Family

ID=37353562

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020020088431A KR20040062109A (en) 2002-12-31 2002-12-31 Method for moving picture coding

Country Status (1)

Country Link
KR (1) KR20040062109A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100945985B1 (en) * 2004-12-28 2010-03-09 닛본 덴끼 가부시끼가이샤 Moving picture encoding method, device using the same, and computer program
CN103796019A (en) * 2012-11-05 2014-05-14 北京勤能通达科技有限公司 Balanced-bitrate coding method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100945985B1 (en) * 2004-12-28 2010-03-09 닛본 덴끼 가부시끼가이샤 Moving picture encoding method, device using the same, and computer program
CN103796019A (en) * 2012-11-05 2014-05-14 北京勤能通达科技有限公司 Balanced-bitrate coding method
CN103796019B (en) * 2012-11-05 2017-03-29 北京勤能通达科技有限公司 A kind of balanced code check coded method

Similar Documents

Publication Publication Date Title
RU2322770C2 (en) Method and device for indication of quantizer parameters in video encoding system
US20040218672A1 (en) Video transmission system video transmission unit and methods of encoding decoding video data
JP3651706B2 (en) Video encoding device
EP1820350A1 (en) Method of coding and decoding moving picture
US6040875A (en) Method to compensate for a fade in a digital video input sequence
KR100770873B1 (en) Method and apparatus of controling bit rate in image encoding
KR20040062109A (en) Method for moving picture coding
KR100414339B1 (en) Device for encoding motion picture signals and encoding method
KR100627494B1 (en) Moving picture encoder and method for c0ding moving picture using the same
KR20040031949A (en) Method for moving picture encoding and decoding
KR100586103B1 (en) Method for moving picture coding
KR20040046320A (en) Method for moving picture coding
KR20040046055A (en) Method for electrical transmission bit rate control of moving picture
KR100626651B1 (en) Selective Fine Granular Scalable Coding Apparatus and Method thereof
KR20040039809A (en) Moving picture encoder and method for coding using the same
KR20040035012A (en) Moving picture codec and method for preventing of moving picture error
KR20040062110A (en) Moving picture encoder and method for coding using the same
KR100627493B1 (en) Moving picture encoder and method for coding using the same
KR20040032286A (en) Method for moving picture coding
KR20040031948A (en) Method for moving picture decoding
KR20040031868A (en) Method for coding moving picture
KR20040063599A (en) Method for moving picture coding
KR20040039808A (en) Method for prediction moving vector
KR20040031867A (en) Moving picture encoder and method for coding using the same
KR20040035015A (en) Method for selection of image signal code mode

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination