KR20090030778A - Apparatus and method for multi-pass encoding - Google Patents
Apparatus and method for multi-pass encoding Download PDFInfo
- Publication number
- KR20090030778A KR20090030778A KR1020070096317A KR20070096317A KR20090030778A KR 20090030778 A KR20090030778 A KR 20090030778A KR 1020070096317 A KR1020070096317 A KR 1020070096317A KR 20070096317 A KR20070096317 A KR 20070096317A KR 20090030778 A KR20090030778 A KR 20090030778A
- Authority
- KR
- South Korea
- Prior art keywords
- frame
- encoding
- quantization coefficient
- bit amount
- image data
- 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/146—Data rate or code amount at the encoder output
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
Abstract
Description
본 발명은 멀티패스 인코딩을 수행하는 장치 및 그 방법에 관한 것으로, 더욱 상세하게는 비트레이트(bitrate) 제어가 가능한 멀티 패스 인코딩 장치 및 그 방법에 관한 것이다.The present invention relates to an apparatus and a method for performing multipath encoding, and more particularly, to a multipath encoding apparatus and a method capable of bitrate control.
멀티미디어 데이터는 내부적으로 음성 데이터와 영상 데이터 두 가지로 이루어진다. 일반적으로, 멀티미디어 서비스 시 이와 같은 음성 데이터와 영상 데이터는 비트스트림 형태로 처리되어 정해진 비트레이트에 따라 네트워크상에서 송수신 된다. 비트레이트는 1초에 해당하는 멀티미디어 데이터가 얼마나 많은 비트(bit)를 포함하는 지를 의미한다. 따라서 비트레이트가 클수록 동영상은 더 많은 비트를 가지게 되어 고화질을 얻을 수 있으나, 그러기 위해서는 그만큼의 고용량이 필요하다.Multimedia data is internally composed of audio data and video data. In general, in a multimedia service, such audio data and video data are processed in a bitstream form and transmitted and received on a network according to a predetermined bitrate. Bitrate means how many bits (bits) the multimedia data corresponding to one second. Thus, the larger the bitrate, the more bits the video has and the higher the quality, but that requires a higher amount of capacity.
일반적으로 멀티미디어 데이터의 영상데이터를 비트스트림 형태로 인코딩하는 방식은 I 프레임(Infra Frame)과 P 프레임(Predictive Frame)이 있다. In general, a method of encoding image data of multimedia data in the form of a bit stream includes an I frame (Infra Frame) and a P frame (Predictive Frame).
I 프레임은 독립적인 프레임으로 다른 이미지들의 참조 없이 스스로 압축과 복원할 수 있는 프레임으로서, 제작 중 데이터스트림의 어느 위치에든 올 수 있으며, 데이터의 임의 접근이 가능하다. 이러한 I 프레임은 원본 소스로부터 직접 압축되어 온 전체화면으로 화질이 좋은 특징이 있지만, 그에 따른 용량도 큰 단점이 있다. I-frames are independent frames that can be compressed and reconstructed on their own without reference to other images. They can come anywhere in the datastream during production and allow arbitrary access to the data. The I frame is a full screen image compressed directly from the original source, but has a good quality, but also has a large disadvantage.
P 프레임은 전후 프레임간의 변화량을 토대로 인코딩 또는 디코딩을 수행한다. 즉, 연속되는 이미지들 사이에서 전체 이미지가 바뀌는 것이 아니라 이미지의 블록들이 옆으로 이동한 점에 착안하여, 이전의 I 프레임 정보와 이전의 P 프레임의 정보를 이용하여 인코딩과 디코딩을 수행한다. 따라서, I 프레임에 비해 상대적으로 용량이 작다. The P frame performs encoding or decoding based on the amount of change between front and rear frames. That is, focusing on the fact that the blocks of the image are moved sideways instead of changing the entire image among successive images, encoding and decoding are performed using the information of the previous I frame information and the previous P frame. Therefore, the capacity is relatively small compared to the I frame.
이때, 네트워크상에서 멀티미디어 서비스를 제공하기 위해 영상 데이터의 비트레이트를 제어하는 방법으로는 CBR(Constant Bit Rate)와 VBR(Variable Bit Rate)가 있다.At this time, as a method of controlling the bit rate of the video data to provide a multimedia service on the network, there are a constant bit rate (CBR) and a variable bit rate (VBR).
CBR는 고정된 비트만을 사용하기 때문에 네트워크 전송 효율이 높다. 그러나 움직임이 많은 영상의 경우 I 프레임이 손상되어 화질저하가 발생한다. 따라서, 움직임이 많은 스포츠, 액션 영화 등과 같은 동영상에는 사용상 부적절하다.Since CBR uses only fixed bits, network transmission efficiency is high. However, in case of moving images, I frame is damaged and image quality deteriorates. Therefore, it is inappropriate for use in a moving video such as sports, action movies, and the like.
VBR는 화면의 움직임에 따라 비트레이트가 가변적으로 변화하므로 CBR 방식에 비해 더 좋은 화질을 만들어 낼 수 있어 더 효율적이다. 그러나 화면이 바뀌는 장면이거나 화면에 정보가 많을 경우, 순간 비트레이트가 피크(Peak)되어 패킷이 유실되거나 다른 데이터 통신에 영향을 줄 수 있다. VBR is more efficient because it can produce better image quality than CBR method because the bitrate changes variably according to screen movement. However, when the scene changes or there is a lot of information on the screen, the bitrate may peak at a moment, causing a packet loss or other data communication.
즉, 네트워크상의 한정된 대역폭 내에서 멀티미디어 데이터 전송 시 순간 비 트레이트가 피크가 되면 패킷 전송 에러가 발생하게 되어 멀티미디어 데이터의 패킷 손실이 발생하여 화질 저하가 발생하게 된다. In other words, if the instantaneous non-peak peaks during multimedia data transmission within a limited bandwidth on the network, a packet transmission error occurs, resulting in packet loss of multimedia data and deterioration in image quality.
이러한 문제를 해결하기 위해 종래에는 멀티 패스 인코딩 기술이 개발되어 왔다. 멀티 패스 인코딩은 먼저 제1 인코더를 통해 영상 데이터의 제1 인코딩을 수행한 후, 제1 인코딩 수행 결과를 이용하여 제2 인코더를 통해 영상 데이터의 2 인코딩을 수행하는 방법이다. In order to solve this problem, a multi-pass encoding technique has been developed. Multi-pass encoding is a method of first encoding image data through a first encoder and then performing two encodings of image data through a second encoder using a first encoding result.
이와 같은 멀티 패스 인코딩은 비트레이트의 고른 분포와 고른 화질의 인코딩이 가능하지만, 제1 인코딩이 모두 완료된 이후에 제2 인코딩을 하게됨으로써 인코딩 처리 시간이 증가되는 문제가 있다.Such multi-pass encoding enables even distribution of bitrates and encoding of even image quality, but there is a problem in that encoding processing time is increased by performing a second encoding after all of the first encoding is completed.
따라서, 본 발명이 이루고자 하는 기술적 과제는 멀티 패스 인코딩 시 인코딩 소요 시간을 단축할 수 있는 멀티 패스 인코딩 장치 및 그 방법을 제공하는 것이다. Accordingly, an object of the present invention is to provide a multi-pass encoding apparatus and method for reducing encoding time required for multi-pass encoding.
위에서 기술한 바와 같은 과제를 이루기 위하여, 본 발명의 특징에 따른 복수의 프레임으로 구성되는 원본 영상 데이터를 멀티 패스 인코딩하는 장치는, 상기 원본 영상 데이터를 입력받아 제1 인코딩을 수행하는 제1 인코더, 상기 제1 인코딩 결과로부터 검출된 프레임별 비트량에 따라 프레임별 양자화계수를 설정하는 비트레이트 제어부, 상기 원본 영상 데이터를 상기 제1 인코딩이 시작된 시점으로부터 제1 시간 지연하여 출력하는 입력 지연부 및 상기 입력 지연부로부터 출력되는 영상 데이터를 상기 설정된 양자화계수를 적용하여 제2 인코딩을 수행하는 제2 인코더를 포함한다.In order to achieve the above-described problem, the apparatus for multi-pass encoding the original image data consisting of a plurality of frames according to an aspect of the present invention, the first encoder receiving the original image data to perform a first encoding, A bit rate controller configured to set a quantization coefficient for each frame according to the amount of bits for each frame detected from the first encoding result, an input delay unit for outputting the original image data by delaying a first time from a time point at which the first encoding starts; And a second encoder configured to perform second encoding on the image data output from the input delay unit by applying the set quantization coefficient.
또한, 본 발명의 다른 특징에 따른 복수의 프레임으로 구성되는 원본 영상 데이터를 멀티 패스 인코딩하는 방법은, 상기 원본 영상 데이터를 첫 번째 프레임부터 순차적으로 제1 인코딩한 결과 생성된 비트스트림을 이용하여 프레임별 비트량을 검출하는 단계, 상기 프레임별 비트량과 기준 비트량을 비교하여, 그 비교 결과에 따라 각 프레임의 양자화계수를 설정하여 저장하는 단계 및 상기 첫 번째 프레임이 상기 제1 인코딩되기 시작한 시점으로부터 제1 시간이 경과한 후, 상기 설 정된 양자화계수를 적용하여 상기 원본 영상 데이터를 첫 번째 프레임부터 순차적으로 제2 인코딩하는 단계를 포함한다.In addition, according to another aspect of the present invention, a method for multi-pass encoding original video data consisting of a plurality of frames includes a frame using a bitstream generated as a result of first encoding the original video data sequentially from the first frame. Detecting a bit amount for each frame, comparing the bit amount for each frame with a reference bit amount, setting and storing a quantization coefficient of each frame according to a result of the comparison, and a time point at which the first frame starts to be encoded And after the first time elapses from the second frame, sequentially encoding the original image data from the first frame by applying the set quantization coefficient.
이와 같은 본 발명의 실시예에 의하면 안정적인 멀티미디어 데이터 전송이 가능하며, 이와 같은 멀티미디어 데이터를 인코딩함에 있어서 인코딩 소요 시간을 단축할 수 있는 효과가 있다.According to the exemplary embodiment of the present invention, stable multimedia data transmission is possible, and encoding time can be shortened in encoding such multimedia data.
아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.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. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present invention, and like reference numerals designate like parts throughout the specification.
명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "…부", "…기", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.Throughout the specification, when a part is said to "include" a certain component, it means that it can further include other components, without excluding other components unless specifically stated otherwise. In addition, the terms “… unit”, “… unit”, “module”, etc. described in the specification mean a unit that processes at least one function or operation, which may be implemented by hardware or software or a combination of hardware and software. have.
이하, 첨부된 도면을 참조하여 본 발명에 대해서 상세히 설명하도록 한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 실시예에 따른 멀티 패스 인코딩 장치의 블록도 이다.1 is a block diagram of a multi-pass encoding apparatus according to an embodiment of the present invention.
도 1에서 나타낸 바와 같이, 본 발명의 실시예에 따른 멀티 패스 인코딩 장치는 제1 인코더(100), 버퍼(110), 비트레이트 제어부(120), 입력 지연부(130) 및 제2 인코더(140)를 포함한다. As shown in FIG. 1, a multi-pass encoding apparatus according to an embodiment of the present invention may include a
제1 인코더(100)는 입력되는 원본 영상 데이터를 압축하여 비트스트림 형식으로 인코딩한다. 이때, 원본 영상 데이터는 복수의 프레임으로 구성되며, 제1 인코더(100)는 이전 프레임 영상의 움직임 예측 및 보정을 이용하여 현재 프레임 영상 데이터를 인코딩한다. 또한, 제1 인코더(100)는 인코딩된 비트스트림을 버퍼(110)로 출력한다.The
제1 인코더(100)의 상세한 구성 및 그 동작에 대해서는 이후 도 3을 참조하여 설명하도록 한다.A detailed configuration and operation of the
버퍼(110)는 제1 인코더(100)를 통해 인코딩된 비트스트림을 저장하고 있다. 이때, 버퍼(110)는 제1 인코더(100)에서 출력되는 비트스트림을 '퍼스트 인-퍼스트 아웃'(FIFO: First In-First Out, 이하 'FIFO'라고 함) 방식으로 저장한다.The
비트레이트 제어부(120)는 입력되는 원본 영상 데이터가 통신 채널 또는 저장 매체로 안정적으로 전송될 수 있도록 인코딩하기 위해 원본 영상 데이터의 인코딩 시 비트레이트를 제어한다. The
구체적으로, 비트레이트 제어부(120)는 제1 인코더(100)에 영상 데이터가 입력되어 인코딩이 수행된지 일정 시간이 경과한 후 제2 인코더(140)에 영상 데이터가 입력되도록 제어한다.In detail, the
그리고 비트레이트 제어부(120)는 제2 인코더(140)의 양자화 계수를 설정하고, 제1 인코더(100)에 비해 일정 시간이 지연되어 제2 인코더(140)에 입력되는 영상 데이터를 설정된 양자화계수를 이용하여 인코딩하도록 제어하는 역할을 한다. The
이때, 비트레이트 제어부(120)는 버퍼(110)에 저장된 비트스트림의 비트량과 제1 인코더(100)에서 설정된 양자화계수를 이용하여 이용하여 제2 인코더(140)의 양자화에 적용될 각 프레임별 양자화 계수를 계산한다.In this case, the
구체적으로, 비트레이트 제어부(120)는 제2 인코더(140)의 양자화계수를 설정함에 있어서, 현재 제2 인코더(140)에 입력되는 프레임의 양자화 단계 직전까지의 비트스트림의 비트량과 버퍼(110)에 저장된 현재 프레임에 대응되는 프레임의 비트스트림의 비트량을 이용하여 현재 제2 인코더(140)에 입력되는 프레임의 양자화계수를 계산한다. 즉, 버퍼(110)에 저장된 대응되는 프레임의 비트스트림의 비트량을 얻기위해 제1 인코더(100)에서 설정되었던 양자화계수 값을 이용하여 제2 인코더(140)에서 적용될 현재 프레임의 양자화계수를 계산한다.Specifically, in setting the quantization coefficient of the
입력 지연부(130)는 제1 인코더(100)로 원본 영상 데이터가 입력되는 시점으로부터 일정 시간이 경과한 후 제2 인코더(140)로 원본 영상 데이터가 입력되도록 처리한다. 여기서, 일정 시간은 복수의 프레임으로 구성되는 원본 영상 데이터에서 적어도 하나의 프레임이 제1 인코더(100)를 통해 인코딩되는데 걸리는 시간보다 긴 시간인 것이 바람직하다. The
본 발명의 실시예에 따른 입력 지연부(130)는 입력되는 원본 영상 데이터를 FIFO 방식으로 임시 저장하였다가 일정 시간이 경과하면 임시 저장되어 있던 영상 데이터를 첫 번째 프레임부터 순차적으로 제2 인코더(140)로 출력한다. The
예를 들어, 원본 영상 데이터가 n개의 프레임으로 구성되는 경우, 입력 지연부(130)에는 원본 영상 데이터의 첫 번째 프레임이 입력되는 시점부터 일정 시간이 경과하는 동안 i번째 프레임까지의 영상 데이터가 임시 저장된다. 이때, 입력 지연부(130)는 적어도 i개의 프레임의 영상 데이터가 저장될 수 있는 용량 이상의 용량을 가진다.For example, when the original image data is composed of n frames, the
그리고 입력 지연부(130)는 일정 시간이 되면 임시 저장된 영상 데이터를 첫 번째 프레임부터 순차적으로 제2 인코더(140)로 출력한다. 이때, 입력 지연부(130)는 임시 저장되었던 영상 데이터를 첫 번째 프레임부터 순차적으로 제2 인코더(140)로 출력함과 동시에 원본 영상 데이터의 i+1번째 프레임부터 n 번째 프레임까지 순차적으로 입력받아 임시 저장한다. 그리고 입력 지연부(130)는 i번째 프레임이 출력된 후 이어서 i+1번째 프레임부터 n 번째 프레임까지 순차적으로 제2 인코더(140)로 출력한다. 결과적으로, 원본 영상 데이터의 각 프레임이 제2 인코더(140)에 입력되는 시점은 제1 인코더(100)에 비해 i개의 프레임이 입력되는 시간만큼 지연된다. The
또한, 입력 지연부(130)는 원본 영상 데이터가 입력된 시점부터 일정 시간이 경과한 후 원본 영상 데이터를 제2 인코더(140)로 출력하기 위한 타이머(미도시)를 자체적으로 포함할 수 있다. In addition, the
제2 인코더(140)는 입력되는 영상 데이터를 압축하여 비트스트림 형식으로 인코딩한다. 이때, 제2 인코더(140)는 비트레이트 제어부(120)에서 계산되어 설정 된 각 프레임별 양자화계수를 적용하여 입력되는 영상 데이터를 양자화한다. 이와 같이, 제2 인코더(140)를 통해 인코딩된 영상 데이터의 비트스트림은 네트워크 상의 통신 채널을 통해 송신되거나 저장매체로 전송된다.The
도 2는 본 발명의 실시예에 따른 비트레이트 제어부를 나타내는 블록도이다.2 is a block diagram illustrating a bit rate controller according to an exemplary embodiment of the present invention.
도 2에서 나타낸 바와 같이, 비트레이트 제어부(120)는 비트량 검출모듈(121), 양자화계수 생성모듈(122), 메모리(123)를 포함한다.As shown in FIG. 2, the
비트량 검출모듈(121)은 버퍼(110)에 저장되어 있는 영상 데이터의 비트스트림을 검출하여 각 프레임별 비트량을 추출하고, 추출된 프레임별 비트량을 양자화계수 생성모듈(122)로 전달한다. 이때, 비트량 검출모듈(121)은 버퍼(110)에 FIFO 방식으로 저장되어 있는 영상 데이터의 비트스트림을 프레임 단위로 실시간으로 검출하여 비트량을 계산한다. 또한, 비트량 검출모듈(121)은 계산된 프레임별 비트량을 메모리(미도시)에 순차적으로 저장해둘 수 있다. The bit
한편, 비트량 검출모듈(121)은 버퍼(110)에 저장된 비트스트림이 일정량 이상이 되면 비트스트림을 검출하여 비트량을 계산하는 것도 가능하다. 즉, 비트량 검출모듈(121)은 일정 시간 동안 버퍼(110)에 비트스트림이 저장된 이후 프레이별비트스트림을 순차적으로 검출할 수 있다.Meanwhile, the bit
이후, 설명의 편의상 비트량 검출모듈(121)에서 계산된 각 프레임별 비트량을 '제1 인코딩 결과 값'이라 지칭하도록 한다.Hereinafter, for convenience of description, the bit amount of each frame calculated by the bit
양자화계수 생성모듈(122)은 프레임별 제1 인코딩 결과 값을 각각 기준 비트량과 비교하여, 기준 비트량을 초과하는 비트량을 가진 프레임의 양자화계수를 재 설정한다. 그리고 양자화계수 생성모듈(122)은 재설정된 양자화계수를 포함한 프레임별 양자화계수의 테이블을 생성하여 메모리(123)에 저장한다.The quantization
구체적으로, 양자화계수 생성모듈(122)은 비트량 검출모듈(121)에서 전달된 각 프레임별 제1 인코딩 결과 값이 기준 비트량을 초과하는 프레임의 경우 제2 인코더(140)에서 적용될 양자화계수를 계산하게 된다.Specifically, the quantization
즉, 양자화계수 생성모듈(122)은 비트량 검출모듈(121)로부터 전달되는 프레임별 제1 인코딩 결과 값을 확인하여, 현재 제2 인코더(140)에 입력되는 프레임과 대응되는 프레임의 제1 인코딩 결과 값을 기준 비트량과 비교한다. 그리고 양자화계수 생성모듈(122)은 기준 비트량과 비교한 결과 제1 인코딩 결과 값이 기준 비트량을 초과하는 경우, 제2 인코더(140)에서 현재 프레임의 양자화단계 직전까지의 비트스트림의 비트량과 제1 인코더(100)에서 제1 인코딩 결과를 얻기 위해 적용한 양자화계수를 이용하여 현재 제2 인코더(140)에 입력되는 프레임의 양자화계수를 계산한다.That is, the quantization
한편, 양자화계수 생성모듈(122)은 현재 제2 인코더(140)에 입력되는 프레임의 제1 인코딩 결과 값이 기준 비트량 이하인 경우 제1 인코더(100)에서 해당 프레임에 적용되었던 양자화계수를 제2 인코더(140)에서도 적용할 수 있다.Meanwhile, if the first encoding result of the frame currently input to the
즉, 양자화계수 생성모듈(122)은 제1 인코더(100)에서 양자화에 적용된 프레임별 양자화계수를 참조하여 제2 인코더(140)의 양자화계수를 계산 및 설정하여 양자화계수 테이블을 생성한다. That is, the quantization
이때, 양자화계수 생성모듈(122)에서 계산되는 제1 인코딩 결과 값이 기준 비트량을 초과하는 프레임의 양자화계수는, 제1 인코더(100)에서 해당 프레임에 적용되었던 양자화계수보다 큰 값으로 설정된다. 즉, 해당 프레임의 최종 비트량이 목표 비트량(기준 비트량 이하)을 만족할 수 있도록 계산된다. In this case, the quantization coefficient of the frame in which the first encoding result calculated by the quantization
여기서, 기준 비트량은 영상 데이터가 통신 채널을 통해 전송되거나 전송 매체에 전달되는데 필요한 대역폭에 적대될 수 있는 비트량 범위를 초과하지 않는 최대 비트량을 의미한다. 일반적으로, 전송될 영상 데이터의 비트량이 최대 비트량을 초과할 경우, 전송될 데이터가 유실되거나 전송 에러가 발생하게되어 멀티미디어 서비스의 품질이 떨어지게 된다. Here, the reference bit amount means a maximum bit amount that does not exceed a range of bit amounts that may be hostile to the bandwidth required for image data to be transmitted through a communication channel or transmitted to a transmission medium. In general, when the bit amount of the image data to be transmitted exceeds the maximum bit amount, the data to be transmitted is lost or a transmission error occurs, thereby degrading the quality of the multimedia service.
따라서, 본 발명의 실시예에 따른 양자화계수 생성모듈(122)은 기준 비트량을 초과하는 비트량을 가진 특정 프레임의 비트량이 기준 비트량 이하가 되도록 계산한다.Accordingly, the quantization
메모리(123)에는 양자화계수 생성모듈(122)에서 설정된 프레임별 양자화계수가 저장되어 있다. 이때, 양자화계수 생성모듈(122)에서 설정된 양자화계수는 제2 인코더(140)의 양자화에 적용되며, 각 프레임에 따라 설정된 양자화계수가 매칭된 테이블 형태로 저장될 수 있다.The
한편, 본 발명의 실시예에서는 입력 지연부(130)가 제1 인코더(100)에 원본 영상 데이터의 첫 번째 프레임이 입력된 후 일정 시간이 경과하면 제2 인코더(140)로 영상 데이터를 출력하는 것을 나타내었다. 그런데, 또 다른 실시예로는 비트레이트 제어부(120)가 타이밍 제어모듈(미도시)을 포함하여, 일정 시간이 경과한 후 입력 지연부(130)로 영상 데이터 출력 지시를 하는 것도 가능하다.Meanwhile, in the embodiment of the present invention, the
즉, 타이밍 제어모듈(미도시)은 버퍼(110)에 적어도 하나의 프레임의 비트스트림이 저장되는 시점에 입력 지연부(130)로 영상 데이터 출력을 지시할 수 있다.That is, the timing control module (not shown) may instruct the
도 3은 도 1에서 나타낸 제1 인코더의 구성을 나타내는 블록도이다.3 is a block diagram illustrating a configuration of a first encoder illustrated in FIG. 1.
도 3에서 나타낸 바와 같이, 제1 인코더(100)는 변환기(101), 양자화기(102), 코더(103), 역양자화기(104), 역변환기(105), 움직임 추정기(106) 및 움직임 보상기(107)를 포함한다.As shown in FIG. 3, the
본 발명의 실시예에서, 제1 인코더(100)로 입력되는 원본 영상 데이터는 매 프레임마다 매크로블록(macroblock) 단위로 분할되어 변환기(101)로 입력된다.In the exemplary embodiment of the present invention, the original image data input to the
변환기(101)는 움직임 보상된 영상 데이터와 입력되는 현재 원본 영상 데이터의 연산(108) 결과를 입력받아 이산 코사인 변환(Discrete cosine transform, 이하 'DCT'라고 지칭함)을 수행한다. 이때, 움직임 보상처리된 영상데이터는 이전 프레임의 영상 데이터를 참조하여 얻어진다.The
양자화기(102)는 DCT를 거친 영상 데이터를 양자화 처리한다. 이때, 양자화기(102)는 매프레임마다 설정된 양자화계수를 적용하여 양자화를 수행한다. 즉, 도 3에서 나타내지 않았지만 양자화기(102)는 각 프레임별 양자화계수의 테이블을 저장하고 있는 메모리(미도시)를 따로 포함할 수 있다. 이때, 양자화계수는 일정 값으로 고정되거나 최적화된 값으로 갱신되어 저장될 수 있다.The
코더(103)는 양자화된 영상 데이터의 압축 효율을 향상시키기위해 엔트로피 코딩을 수행하여 영상 데이터를 비트스트림으로 변환한다. 이때, 코더(103)의 엔트로피 코딩의 결과인 각 프레임별 비트스트림은 버퍼(110)에 FIFO 방식으로 저장된 다.The
역양자화기(104)는 양자화된 영상 데이터를 역양자화한다.
또한, 역변환기(105)는 역양자화된 영상데이터를 역DCT변환을 수행하여 영상 데이터를 복원한다.Also, the
이때, 역변환기(105)를 통해 복원된 현재 프레임의 영상 데이터와 이전 프레임의 움직임 보상된 영상 데이터는 결합(109)되어 그 결과 영상 데이터가 움직임 추정기(106)와 움직임 보상기(107)로 출력된다.In this case, the image data of the current frame reconstructed by the
움직임 추정기(106)는 현재 입력되는 원본 영상 데이터와 결합(109) 결과 영상 데이터를 입력받아 움직임 예측을 위한 움직임 벡터와 디퍼렌셜 이미지를 출력한다.The
움직임 보상기(107)는 결합(109) 결과 영상 데이터와 움직임 추정기(106)를 통해 출력된 디퍼렌셜 이미지를 입력받아 움직임을 보상한다.The
도 4는 도 1에서 나타낸 제2 인코더의 구성을 나타내는 블록도이다.4 is a block diagram illustrating a configuration of a second encoder illustrated in FIG. 1.
본 발명의 실시예에 따른 제2 인코더(140)는 변환기(141), 양자화기(142), 코더(143), 역양자화기(144), 역변환기(145), 움직임 추정기(146) 및 움직임 보상기(147)를 포함한다.The
이때, 도 4에서 나타낸 양자화기(142)에서 양자화에 적용하기 위해 참조하는 각 프레임별 양자화계수가 다른 것을 제외하고 제2 인코더(140)의 각 구성 및 그 동작은 제1 인코더(100)과 동일하므로 중복되는 설명은 생략하기로 한다.In this case, each configuration and operation of the
변환기(141)는 입력 지연부(130)로부터 출력되는 현재 원본 영상 데이터와 움직임 보상된 영상 데이터의 연산(148) 결과를 입력받아 DCT를 수행한다. 이때, 입력되는 원본 영상 데이터는 동일한 프레임의 원본 영상 데이터가 제1 인코더(100)로 입력된 시점에서 일정 시간이 지연된 후 입력된다.The
양자화기(142)는 DCT를 거친 영상 데이터를 양자화 처리한다. 이때, 양자화기(142)는 입력되는 각 프레임의 영상 데이터를 양자화함에 있어서 메모리(123)에 저장되어 있는 양자화계수 테이블을 참조한다. The
즉, 양자화기(142)는 프레임별 비트량이 기준 비트량을 초과하는 특정 프레임의 경우 제1 인코더(100)의 양자화기(102)에서 특정 프레임에 적용한 양자화계수보다 상대적으로 크게 재설정된 양자화계수를 적용하여 양자화를 수행한다. 결과적으로, 제2 인코더(140)에서는 현재 인코딩할 프레임의 영상 데이터의 비트레이트를 예측하여 인코딩을 수행할 수 있다.That is, the
제2 인코더(140)의 나머지 구성들은 제1 인코더(100)에서 상응하는 구성들과 동일한 동작을 수행한다.The remaining components of the
이하, 도 5 및 도 6을 참조하여 본 발명의 실시예에 따른 멀티패스 인코딩 방법을 설명하도록 한다. 아래에서는, 제1 인코더(100)를 통한 인코딩 과정을 제1 인코딩이라 지칭하고, 제2 인코더(140)를 통한 인코딩 과정을 제2 인코딩이라 지칭하도록 한다. Hereinafter, a multipath encoding method according to an embodiment of the present invention will be described with reference to FIGS. 5 and 6. Hereinafter, an encoding process through the
도 5는 본 발명의 실시예에 따른 양자화계수 생성 방법을 나타내는 순서도이다.5 is a flowchart illustrating a method of generating a quantization coefficient according to an embodiment of the present invention.
먼저, 비트레이트 제어부(120)의 비트량 검출모듈(121)은 버퍼(110)로부터 프레임별 비트량을 검출한다(S200). 이때, 버퍼(110)에 저장된 비트스트림은 제1 인코딩을 통해 얻어진 적어도 하나의 프레임의 비트스트림이며, 복수의 프레임인 경우 FIFO 방식으로 저장되어 있다. 따라서, 비트량 검출모듈(121)은 제1 인코딩을 통해 얻어지는 각 프레임별 비트량을 먼저 인코딩된 프레임부터 순차적으로 검출할 수 있다. First, the bit
그런 다음, 비트레이트 제어부(120)의 양자화계수 생성모듈(122)은 검출된 각 프레임별 비트량을 기설정된 기준 비트량과 비교한다(S210). 이때, 검출되는 프레임별 비트량은 순차적으로 기준 비트량과 비교된다. 여기서, 기준 비트량은 통신 채널의 대역폭 내에서 안정적으로 멀티미디어 서비스가 가능한 최대 비트량이다.Next, the quantization
그러면, 양자화계수 생성모듈(122)은 검출된 비트량이 기준 비트량 이하인 프레임의 경우 해당 프레임의 양자화계수를 기설정된 양자화계수로 설정한다(S220). 이때, 기설정된 양자화계수는 제1 인코딩 과정에서 적용된 양자화계수와 동일하거나, 제2 인코딩시 기설정된 기준 양자화계수 또는 양자화계수의 평균 값 등으로 설정될 수 있다. In operation S220, the quantization
또한, 양자화계수 생성모듈(122)은 검출된 프레임 비트량이 기준 비트량을 초과하는 경우 목표 비트량을 달성하기 위한 양자화계수를 재설정한다(S230). 이때, 목표 비트량은 기준 비트량 이하의 비트량으로서, 통신 채널의 대역폭에 안정적으로 영상 데이터를 적재할 수 있는 크기의 비트량이다. 또한, 재설정되는 양자화계수는 앞서 제1 인코딩 과정에서 적용된 양자화계수에 비해 상대적으로 큰 값으로 설정된다.In addition, when the detected frame bit amount exceeds the reference bit amount, the quantization
그런 다음, 양자화계수 생성모듈(122)은 앞선 두 단계 S220 또는 S230에서 설정된 각각의 양자화계수 값을 이용하여 제2 인코딩에 적용될 양자화계수 테이블을 생성하여 메모리(123)에 저장한다(S240). 이때, 양자화계수 테이블에는 각 프레임별 양자화계수가 저장되며, 이는 실시간으로 업데이트가 가능하다.Next, the quantization
이후, 이와 같이 생성된 양자화계수 테이블을 참조하여 제2 인코더(140)의 양자화가 수행된다.Thereafter, the quantization of the
도 6은 본 발명의 실시예에 따른 멀티 패스 인코딩 방법을 나타내는 순서도 이다.6 is a flowchart illustrating a multi-pass encoding method according to an embodiment of the present invention.
먼저, 제1 인코더(100) 및 입력 지연부(130)로 원본 영상 데이터가 동시에 입력된다(S300). 이때, 입력 지연부(130)는 입력되는 영상 데이터를 프레임별로 순차적으로 임시 저장한다.First, original image data is simultaneously input to the
그런 다음, 제1 인코더(100)는 입력되는 영상 데이터를 인코딩하여 버퍼(110)에 순차적으로 저장한다(S310). 이때, 제1 인코더(100)는 인코딩된 비트스트림을 FIFO 방식으로 첫 번째 프레임부터 마지막 프레임까지 저장한다.Next, the
그런 후, 비트레이트 제어부(120)는 제2 인코더(140)에 적용될 양자화계수를 설정하여 저장한다(S320). 이때, 비트레이트 제어부(120)는 버퍼(110)에 저장된 인코딩된 비트스트림의 각 프레임별 비트량을 검출하여 제2 인코더(140)에 적용될 양자화계수를 계산한다. 또한, 비트레이트 제어부(120)는 버퍼(110)에 저장되는 프레임별 비트량을 먼저 인코딩된 프레임부터 순차적으로 검출하여 실시간으로 양자화계수를 설정한다.Thereafter, the
그런 다음, 입력 지연부(130)는 원본 영상 데이터의 첫 번째 프레임의 입력 시점으로부터 일정 시간이 경과한 후 입력 지연부(130)로 영상 데이터 출력한다(S330). 이때, 일정 시간은 비트레이트 제어부(120)에서 버퍼(110)로부터 적어도 한 프레임의 비트스트림이 검출할 수 있는 시간이다. Then, the
이때, 입력 지연부(130)는 일정 시간동안 저장되어 있던 영상 데이터를 제2 인코더(140)로 출력함과 동시에 원본 영상 데이터를 순차적으로 입력받아 저장을 수행한다. In this case, the
예를 들어, 입력 지연부(130)는 일정 시간동안 입력되는 원본 영상 데이터의 첫 번째 프레임부터 i번째 프레임까지 저장한 상태에서 비트레이트 제어부(120)의 영상 출력 지시를 받으면, 첫 번째 프레임부터 순차적으로 제2 인코더(140)로 출력한다. 이와 동시에 입력 지연부(130)는 지속적으로 i+1번째 프레임의 영상 데이터를 입력받아 저장한다. 즉, 입력 지연부(130)가 저장된 영상 데이터의 첫 번째 프레임을 제2 인코더(140)로 출력하는 시점에 제1 인코더(100) 및 입력 지연부(130)는 원본 영상 데이터의 i+1번째 프레임을 입력받는다.For example, when the
그런 다음, 제2 인코더(140)는 메모리(123)에 저장되어 있는 양자화계수를 양자화단계에 적용하여 입력되는 영상 데이터를 인코딩한다(S340). Then, the
이때, 제2 인코더(100)를 통해 인코딩되는 영상데이터의 각 프레임은 제1 인코더(100)를 통해 인코딩되는 시점보다 일정 시간 지연되어 인코딩된다. 즉, 제1 인코더(100)에서 일정 시간 앞서 인코딩된 프레임 비트량을 통해 제2 인코더(140)의 인코딩 시 필요한 정보를 예측할 수 있다. 따라서, 본 발명의 실시예에 따르면 입력되는 영상 데이터의 각 프레임별 비트량을 제어함과 동시에 제2 인코딩 결과를 제1 인코딩 시간으로부터 약 일정 시간 후 얻을 수 있어 멀티 패스 인코딩의 소요시간을 단축할 수 있다.In this case, each frame of the image data encoded by the
이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the 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.
도 1은 본 발명의 실시예에 따른 멀티 패스 인코딩 장치의 블록도 이다.1 is a block diagram of a multi-pass encoding apparatus according to an embodiment of the present invention.
도 2는 본 발명의 실시예에 따른 비트레이트 제어부를 나타내는 블록도 이다.2 is a block diagram illustrating a bit rate controller according to an exemplary embodiment of the present invention.
도 3은 도 1에서 나타낸 제1 인코더의 구성을 나타내는 블록도 이다.3 is a block diagram illustrating a configuration of a first encoder illustrated in FIG. 1.
도 4는 도 1에서 나타낸 제2 인코더의 구성을 나타내는 블록도 이다.4 is a block diagram illustrating a configuration of a second encoder illustrated in FIG. 1.
도 5는 본 발명의 실시예에 따른 양자화계수 생성방법을 나타내는 순서도 이다.5 is a flowchart illustrating a method of generating a quantization coefficient according to an embodiment of the present invention.
도 6은 본 발명의 실시예에 따른 멀티 패스 인코딩 방법을 나타내는 순서도 이다.6 is a flowchart illustrating a multi-pass encoding method according to an embodiment of the present invention.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020070096317A KR100918499B1 (en) | 2007-09-21 | 2007-09-21 | Apparatus and method for multi-pass encoding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020070096317A KR100918499B1 (en) | 2007-09-21 | 2007-09-21 | Apparatus and method for multi-pass encoding |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20090030778A true KR20090030778A (en) | 2009-03-25 |
KR100918499B1 KR100918499B1 (en) | 2009-09-24 |
Family
ID=40697028
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020070096317A KR100918499B1 (en) | 2007-09-21 | 2007-09-21 | Apparatus and method for multi-pass encoding |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100918499B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101145399B1 (en) * | 2010-02-26 | 2012-05-15 | 한국전자통신연구원 | Apparatus and Method for High-speed Multi-pass Encoding |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005011255A2 (en) * | 2003-06-26 | 2005-02-03 | Thomson Licensing S.A. | Multipass video rate control to match sliding window channel constraints |
KR100909541B1 (en) * | 2004-06-27 | 2009-07-27 | 애플 인크. | Multi-pass video encoding method |
-
2007
- 2007-09-21 KR KR1020070096317A patent/KR100918499B1/en not_active IP Right Cessation
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101145399B1 (en) * | 2010-02-26 | 2012-05-15 | 한국전자통신연구원 | Apparatus and Method for High-speed Multi-pass Encoding |
Also Published As
Publication number | Publication date |
---|---|
KR100918499B1 (en) | 2009-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7072393B2 (en) | Multiple parallel encoders and statistical analysis thereof for encoding a video sequence | |
JP5180294B2 (en) | Buffer-based rate control that utilizes frame complexity, buffer level, and intra-frame location in video encoding | |
KR101644208B1 (en) | Video encoding using previously calculated motion information | |
US7170938B1 (en) | Rate control method for video transcoding | |
JP5384694B2 (en) | Rate control for multi-layer video design | |
JP5350404B2 (en) | Early macroblock delta QP decision | |
US5870146A (en) | Device and method for digital video transcoding | |
US20190342551A1 (en) | Rate control | |
US20060018378A1 (en) | Method and system for delivery of coded information streams, related network and computer program product therefor | |
KR20030073254A (en) | Method for adaptive encoding motion image based on the temperal and spatial complexity and apparatus thereof | |
US8948242B2 (en) | Encoding device and method and multimedia apparatus including the encoding device | |
US20130322516A1 (en) | Systems and methods for generating multiple bitrate streams using a single encoding engine | |
KR100601615B1 (en) | Apparatus for compressing video according to network bandwidth | |
US20090310672A1 (en) | Method and System for Rate Control in a Video Encoder | |
US20180184089A1 (en) | Target bit allocation for video coding | |
JPWO2003084243A1 (en) | Image compression encoding apparatus and method, and program | |
KR100594056B1 (en) | H.263/MPEG Video Encoder for Effective Bits Rate Control and Its Control Method | |
JP4042597B2 (en) | Image encoding apparatus and method, program, and recording medium | |
US7428339B2 (en) | Pseudo-frames for MPEG-2 encoding | |
KR100918499B1 (en) | Apparatus and method for multi-pass encoding | |
KR20110024574A (en) | Integrated video encoding method and apparatus | |
US20090290636A1 (en) | Video encoding apparatuses and methods with decoupled data dependency | |
CA2737913C (en) | Video streaming apparatus with quantization and method thereof | |
JP4089753B2 (en) | Image compression encoding apparatus and method, program, and recording medium | |
KR20030083109A (en) | apparatus for transcoding bit rate |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
N231 | Notification of change of applicant | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20120904 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20130904 Year of fee payment: 5 |
|
LAPS | Lapse due to unpaid annual fee |