KR100896978B1 - The Motion Vector Prediction Method and The Mode Prediction Method and Recording Medium Thereof in Fast MPEG-2 to H.264/AVC Transcoding - Google Patents

The Motion Vector Prediction Method and The Mode Prediction Method and Recording Medium Thereof in Fast MPEG-2 to H.264/AVC Transcoding Download PDF

Info

Publication number
KR100896978B1
KR100896978B1 KR1020070061035A KR20070061035A KR100896978B1 KR 100896978 B1 KR100896978 B1 KR 100896978B1 KR 1020070061035 A KR1020070061035 A KR 1020070061035A KR 20070061035 A KR20070061035 A KR 20070061035A KR 100896978 B1 KR100896978 B1 KR 100896978B1
Authority
KR
South Korea
Prior art keywords
mode
motion vector
macroblock
prediction
information
Prior art date
Application number
KR1020070061035A
Other languages
Korean (ko)
Other versions
KR20080047954A (en
Inventor
정제창
진순종
김원기
Original Assignee
한양대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한양대학교 산학협력단 filed Critical 한양대학교 산학협력단
Publication of KR20080047954A publication Critical patent/KR20080047954A/en
Application granted granted Critical
Publication of KR100896978B1 publication Critical patent/KR100896978B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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
    • H04N19/513Processing of motion vectors

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

1. 청구범위에 기재된 발명이 속한 기술분야1. TECHNICAL FIELD OF THE INVENTION

본 발명은 MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 움직임 벡터 예측 방법 및 모드 예측 방법과 상기 각 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 관한 것임.The present invention relates to a motion vector prediction method and a mode prediction method in fast transcoding from MPEG-2 to H.264 / AVC, and to a computer-readable recording medium having recorded thereon a program for realizing each of the above methods.

2. 발명이 해결하려고 하는 기술적 과제2. The technical problem to be solved by the invention

본 발명은 MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 고속 트랜스코딩에 사용되는 H.264 매크로블록에 대응되는 최적의 움직임 벡터를 예측하고 최적의 모드를 예측하는, MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 움직임 벡터 예측 방법 및 모드 예측 방법과 상기 각 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는데 그 목적이 있음.According to the present invention, an optimum corresponding to H.264 macroblocks used for fast transcoding based on macroblock type information, coded block pattern information, and motion vector information extracted from the macroblock header information by decoding the MPEG-2 encoded bit stream A computer-readable program recording the motion vector prediction method and the mode prediction method in MPEG-2 to H.264 / AVC, which predicts the motion vector and predicts the optimal mode. The purpose is to provide a record medium.

3. 발명의 해결방법의 요지3. Summary of Solution to Invention

본 발명은 움직임 벡터 예측 방법에 있어서, MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 단계; 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 임의의 프레임과 참조 프레임간의 거리를 정하는 단계; 상기 정한 거리 정보를 이용하여 포워드 예측에 따른 움직임 벡터값, 백워드 예측에 따른 움직임 벡터값, 패스트 백워드 예측에 따른 움직임 벡터값 및 제로 예측에 따른 움직임 벡터값을 계산하는 단계; 및 상기 계산한 움직임 벡터값들 중에서 최소의 움직임 비용을 갖는 움직임 벡터를 최적의 움직임 벡터로 판정하는 단계를 포함함.A motion vector prediction method comprising: extracting macroblock type information, encoded block pattern information, and motion vector information from macroblock header information by decoding a bit stream encoded by MPEG-2; Determining a distance between an arbitrary frame and a reference frame based on the extracted macroblock type information, coded block pattern information, and motion vector information; Calculating a motion vector value according to forward prediction, a motion vector value based on backward prediction, a motion vector value based on fast backward prediction, and a motion vector value based on zero prediction using the determined distance information; And determining a motion vector having a minimum motion cost among the calculated motion vector values as an optimal motion vector.

4. 발명의 중요한 용도4. Important uses of the invention

본 발명은 비디오 트랜스코딩 등에 이용됨.The present invention is used for video transcoding and the like.

MPEG-2, H.264/AVC, 고속 트랜스코딩, 매크로블록(MB), 음직임 벡터 예측, 모드 예측 MPEG-2, H.264 / AVC, Fast Transcoding, Macroblock (MB), Speech Vector Prediction, Mode Prediction

Description

MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 움직임 벡터 예측 방법과 모드 예측 방법 및 기록매체{The Motion Vector Prediction Method and The Mode Prediction Method and Recording Medium Thereof in Fast MPEG-2 to H.264/AVC Transcoding}Motion Vector Prediction Method and The Mode Prediction Method and Recording Medium Thereof in Fast MPEG-2 to H.264 / in Fast Transcoding from MP-2 to H.264 / ACC AVC Transcoding}

도 1은 본 발명에서 제시하는 알고리즘이 적용되는 트랜스코더에 대한 일실시예 구성도이고,1 is a configuration diagram of an embodiment of a transcoder to which the algorithm proposed in the present invention is applied.

도 2는 본 발명에서 제시하는 임의의 프레임과 참조 프레임간의 거리를 정하기 위한 일실시예 설명도이고,2 is an exemplary diagram for determining a distance between an arbitrary frame and a reference frame according to the present invention.

도 3은 본 발명에서 제시하는 백워드 움직임 벡터(BwdMV), 도미넌트 매크로블록(Dominant MB) 및 움직임 벡터 오프셋(OffsetMV)에 대한 일실시예 설명도이고,3 is a diagram illustrating an embodiment of a backward motion vector (BwdMV), a dominant macroblock (Dominant MB), and a motion vector offset (OffsetMV) according to the present invention.

도 4는 본 발명에 따른 MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 움직임 벡터 예측 방법에 대한 일실시예 흐름도이고,4 is a flowchart illustrating a motion vector prediction method in fast transcoding from MPEG-2 to H.264 / AVC according to the present invention.

도 5는 본 발명에 따른 MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 모드 예측 방법에 대한 일실시예 흐름도이고,5 is a flowchart illustrating a mode prediction method in fast transcoding from MPEG-2 to H.264 / AVC according to the present invention.

도 6a 내지 도 6d는 본 발명의 RD 성능에 대한 일실시예 그래프이다.6A-6D are graphs of one embodiment of RD performance of the present invention.

본 발명은 MPEG-2에서 H.264/AVC로의 고속 트랜스코딩 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 관한 것으로, 더욱 상세하게는 MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 고속 트랜스코딩에 사용되는 H.264 매크로블록에 대응되는 최적의 움직임 벡터를 예측하고 최적의 모드를 예측하는, MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 움직임 벡터 예측 방법 및 모드 예측 방법과 상기 각 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 관한 것이다.The present invention relates to a fast transcoding method from MPEG-2 to H.264 / AVC and a computer readable recording medium having recorded thereon a program for realizing the method. More specifically, the present invention relates to a bit stream encoded in MPEG-2. Predicts the optimal motion vector corresponding to the H.264 macroblock used for fast transcoding based on the macroblock type information, the coded block pattern information, and the motion vector information extracted from the macroblock header information by decoding The present invention relates to a motion vector prediction method and a mode prediction method in high-speed transcoding from MPEG-2 to H.264 / AVC, and to a computer-readable recording medium having recorded thereon a program for realizing each method.

비디오 트랜스코딩(transcoding)이란 부호화된 비디오 스트림의 특성, 예컨대 비트율, 프레임율, 공간적 해상도 및 부호화 표준 등을 다른 특성으로 변환하는 기술을 의미하며, 본 발명에서는 MPEG-2로 부호화된 비트 스트림에 대해 H.264/AVC로 고속 트랜스코딩하는 것을 그 기술 대상으로 한다.Video transcoding refers to a technique for converting characteristics of an encoded video stream, for example, bit rate, frame rate, spatial resolution, and encoding standard, to other characteristics. High-speed transcoding in H.264 / AVC is the subject of the technique.

최근에 네트워크의 발달에 힘입어 사용자는 언제, 어디서나 실시간으로 다양한 콘텐츠를 제공받을 수 있게 되었는데, 한편으로는 콘텐츠 제공업체 측에서는 서로 다른 이기종의 다양한 네트워크 종류로 인해 서로 동일한 내용의 동영상 콘텐츠에 대해서도 각 네트워크의 프로토콜에 적합하게 서로 다른 포맷의 동영상 콘텐츠를 각각 제작해야 되는 문제가 있었다.Recently, thanks to the development of the network, users can receive various contents in real time anytime and anywhere. On the other hand, the content providers have different networks for different video contents of the same contents due to different heterogeneous network types. There was a problem in that each of the video content in different formats to produce a protocol suitable for the.

예를 들어, 디지털 위성방송, 디지털 유선방송 등과 같은 디지털 방송 시스 템에서는 동영상 표준으로서 MPEG-2를 이미 널리 사용하고 있지만, 최근에는 동영상 부호화율, 화질 등이 보다 우수한 H.264/AVC가 네트워크, 단말기 등에 점진적으로 채택되고 있다. 이는 기존에 MPEG-2로 제작된 콘텐츠가 사장될 뿐더러 이기종 네트워크 표준에 적합한 각각의 콘텐츠 제작에 상당한 비용이 소모되고 있는 형편이다.For example, in digital broadcasting systems such as digital satellite broadcasting and digital cable broadcasting, MPEG-2 has already been widely used as a video standard, but recently, H.264 / AVC, which has better video coding rate and image quality, It is gradually adopted in terminals and the like. This not only causes the contents of MPEG-2 contents to be killed, but also generates considerable costs for producing each of the contents conforming to heterogeneous network standards.

위와 같은 문제점이 대두됨에 따라 MPEG-2에서 H.264/AVC로 트랜스코딩하는 기술이 제안되었으며, 사용자에게 실시간적으로 동영상 콘텐츠를 제공할 수 있도록 고속으로 트랜스코딩하는 기술이 각광받고 있다.As the above problems arise, a technique for transcoding from MPEG-2 to H.264 / AVC has been proposed, and a technique for transcoding at high speed so as to provide video content to a user in real time has been in the spotlight.

MPEG-2에서 H.264/AVC로 트랜스코딩하는 것에 관한 종래 기술을 살펴보면, "IEEE Int'l Conference Multimedia & Expo, Toranto Canada, July 2006"에서 제시된 "Motion and Mode Mapping for MPEG-2 to H.264/AVC Transcoding"[이하 "종래 기술 1"이라 함]과, "IEEE Int'l Symp. Circuits Syst., Kobe, Japan, May 2005"에서 제시된 "Fast mode decision and motion estimation for H.264 with a focus on MPEG-2/H.264 transcoding"[이하 "종래 기술2"라 함]이 있다.Looking at the prior art on transcoding from MPEG-2 to H.264 / AVC, the "Motion and Mode Mapping for MPEG-2 to H." presented in "IEEE Int'l Conference Multimedia & Expo, Toranto Canada, July 2006". 264 / AVC Transcoding "(hereinafter referred to as" prior art 1 ") and" Fast mode decision and motion estimation for H.264 with a "presented in" IEEE Int'l Symp. Circuits Syst., Kobe, Japan, May 2005 ". focus on MPEG-2 / H.264 transcoding "(hereinafter referred to as" prior art 2 ").

상기 종래 기술1에는 MPEG-2 방송 콘텐츠를 H.264 베이스라인(baseline)으로 변환하는 트랜스코딩 알고리즘이 제시되어 있는데, 특히 MPEG-2 B slice의 움직임 벡터를 H.264 P slice의 움직임 벡터로 매핑(mapping)함으로서 그 트랜스코딩 복잡도를 줄였다.In the prior art 1, a transcoding algorithm for converting MPEG-2 broadcast content into an H.264 baseline is proposed. In particular, a motion vector of an MPEG-2 B slice is mapped to a motion vector of an H.264 P slice. Mapping reduces the transcoding complexity.

상기 종래 기술2에는 이웃 모드들의 정보(Neighboring modes information), residue 정보 및 왜곡(distortion) 정보를 이용해 빠른 모드를 결정하고, MPEG-2의 움직임 벡터를 이용해 빠른 움직임 벡터를 예측하는 알고리즘이 제시되어 있다.In the prior art 2, an algorithm for determining a fast mode using neighboring modes information, residue information, and distortion information, and predicting a fast motion vector using a motion vector of MPEG-2 is presented. .

그러나 상기와 같은 종래 기술들은 율 왜곡(rate-distortion)의 트레이드오프(tradeoff) 관점에서 최적의 성능을 구현하는데 무리가 있다. 특히, 이러한 종래 기술들에서는 단지 움직임 벡터간 매핑만을 수행하며, 이는 정교하지 못한 움직임 벡터 이용으로 인한 비트율 증가 및 화질 저하를 초래하는 문제점이 있다.However, such prior arts are difficult to implement optimal performance in terms of tradeoff of rate-distortion. In particular, these prior arts only perform mapping between motion vectors, which has a problem of increasing bit rate and degrading image quality due to inaccurate motion vector use.

본 발명은 상기와 같은 문제점을 해결하고 상기와 같은 요구에 부응하기 위하여 제안된 것으로, MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 고속 트랜스코딩에 사용되는 H.264 매크로블록에 대응되는 최적의 움직임 벡터를 예측하고 최적의 모드를 예측하는, MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 움직임 벡터 예측 방법 및 모드 예측 방법과 상기 각 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는데 그 목적이 있다.The present invention has been proposed to solve the above problems and to meet the above requirements, and includes macroblock type information, coded block pattern information, and motion extracted from macroblock header information by decoding an MPEG-2 encoded bit stream. A motion vector prediction method in fast transcoding from MPEG-2 to H.264 / AVC, which predicts an optimal motion vector corresponding to H.264 macroblocks used for fast transcoding based on vector information and predicts an optimal mode. And a computer-readable recording medium having recorded thereon a mode prediction method and a program for realizing each of the above methods.

본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있으며, 본 발명의 실시예에 의해 보다 분명하게 알게 될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.Other objects and advantages of the present invention can be understood by the following description, and will be more clearly understood by the embodiments of the present invention. Also, it will be readily appreciated that the objects and advantages of the present invention may be realized by the means and combinations thereof indicated in the claims.

상기의 목적을 달성하기 위한 본 발명의 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 움직임 벡터를 예측하는 방법은, 움직임 벡터 예측 방법에 있어서, MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 단계; 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 임의의 프레임과 참조 프레임간의 거리를 정하는 단계; 상기 정한 거리 정보를 이용하여 포워드 예측에 따른 움직임 벡터값, 백워드 예측에 따른 움직임 벡터값, 패스트 백워드 예측에 따른 움직임 벡터값 및 제로 예측에 따른 움직임 벡터값을 계산하는 단계; 및 상기 계산한 움직임 벡터값들 중에서 최소의 움직임 비용을 갖는 움직임 벡터를 최적의 움직임 벡터로 판정하는 단계를 포함한다.In order to achieve the above object, a method of predicting a motion vector in H.264 / AVC transcoding in MPEG-2 according to the present invention is a motion vector prediction method, which decodes a bit stream encoded in MPEG-2. Extracting macroblock type information, coded block pattern information, and motion vector information from the macroblock header information; Determining a distance between an arbitrary frame and a reference frame based on the extracted macroblock type information, coded block pattern information, and motion vector information; Calculating a motion vector value according to forward prediction, a motion vector value based on backward prediction, a motion vector value based on fast backward prediction, and a motion vector value based on zero prediction using the determined distance information; And determining a motion vector having a minimum motion cost among the calculated motion vector values as an optimal motion vector.

또한, 상기 본 발명의 방법은, 상기 판정한 움직임 벡터에 대해 정제 과정(Refinement Step)을 수행하여 최종적인 움직임 벡터를 결정하는 단계를 더 포함한다.The method may further include determining a final motion vector by performing a refinement step on the determined motion vector.

한편, 본 발명의 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 모드를 예측하는 방법은, 모드 예측 방법에 있어서, I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드를 정하는 단계; MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 단계; 및 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 상기 정한 I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드 중에서 하나 이상의 모드를 H.264 매크로블록 모드로서 예측하는 단계를 포함한다.On the other hand, the method of predicting the mode for high-speed transcoding in MPEG-2 according to the present invention in H.264 / AVC is, in the mode prediction method, I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode. Determining a Mode4 mode, a Mode5 mode, a Mode6 mode, and a Mode7 mode; Decoding the MPEG-2 encoded bit stream to extract macroblock type information, encoded block pattern information, and motion vector information from the macroblock header information; And from among the I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode, Mode4 mode, Mode5 mode, Mode6 mode and Mode7 mode based on the extracted macroblock type information, coded block pattern information and motion vector information. Predicting one or more modes as H.264 macroblock mode.

한편, 본 발명은, 프로세서를 구비한 트랜스코더에, MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 기능; 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 임의의 프레임과 참조 프레임간의 거리를 정하는 기능; 상기 정한 거리 정보를 이용하여 포워드 예측에 따른 움직임 벡터값, 백워드 예측에 따른 움직임 벡터값, 패스트 백워드 예측에 따른 움직임 벡터값 및 제로 예측에 따른 움직임 벡터값을 계산하는 기능; 및 상기 계산한 움직임 벡터값들 중에서 최소의 움직임 비용을 갖는 움직임 벡터를 최적의 움직임 벡터로 판정하는 기능을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공한다.On the other hand, the present invention provides a transcoder equipped with a processor, the function of decoding the MPEG-2 encoded bit stream to extract macroblock type information, encoded block pattern information and motion vector information from the macroblock header information; Determining a distance between an arbitrary frame and a reference frame based on the extracted macroblock type information, coded block pattern information, and motion vector information; Calculating a motion vector value according to forward prediction, a motion vector value based on backward prediction, a motion vector value based on fast backward prediction, and a motion vector value based on zero prediction using the determined distance information; And a computer readable recording medium having recorded thereon a program for realizing a function of determining a motion vector having a minimum motion cost among the calculated motion vector values as an optimal motion vector.

한편, 본 발명은, 프로세서를 구비한 트랜스코더에, I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드를 정하는 기능; MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 기능; 및 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 상기 정한 I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드 중에서 하나 이상의 모드를 H.264 매크로블록 모드로서 예측하는 기능을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공한다.On the other hand, the present invention, a transcoder equipped with a processor, the function to determine the I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode, Mode4 mode, Mode5 mode, Mode6 mode and Mode7 mode; Extracting macroblock type information, encoded block pattern information, and motion vector information from macroblock header information by decoding a bit stream encoded by MPEG-2; And from among the I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode, Mode4 mode, Mode5 mode, Mode6 mode and Mode7 mode based on the extracted macroblock type information, coded block pattern information and motion vector information. A computer readable recording medium having recorded thereon a program for realizing the function of predicting one or more modes as an H.264 macroblock mode.

상술한 목적, 특징 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해 질 것이며, 그에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 또한, 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에 그 상세한 설명을 생략하기로 한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명하기로 한다.The above objects, features and advantages will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, whereby those skilled in the art may easily implement the technical idea of the present invention. There will be. In addition, in describing the present invention, when it is determined that the detailed description of the known technology related to the present invention may unnecessarily obscure the gist of the present invention, the detailed description thereof will be omitted. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에서 제시하는 알고리즘이 적용되는 트랜스코더에 대한 일실시예 구성도이다.1 is a configuration diagram of an embodiment of a transcoder to which the algorithm proposed in the present invention is applied.

도 1에 도시된 바와 같이, 본 발명에서 제시하는 알고리즘, 예컨대 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 움직임 벡터를 예측하는 알고리즘 및 모드를 예측하는 알고리즘이 적용되는 트랜스코더는, MPEG-2 디코더(MPEG-2 Decoder)(11), 움직임 벡터/모드 예측부(Motion Vector and Mode Mapping Unit)(12), 포스트 신호처리부(Post Processing Unit)(13), 프레임 예측부(Inter/Intra Prediction Unit)(14), DCT 양자화부(15), DCT 역양자화부(16), 블록킹현상 제거필터(Deblocking Filter)(17) 및 엔트로피 부호화기(Entropy Coding Unit)(18)를 포함한다.As shown in FIG. 1, a transcoder to which an algorithm proposed in the present invention, such as an algorithm for predicting a motion vector and an algorithm for predicting a mode, is applied in fast transcoding from MPEG-2 to H.264 / AVC, MPEG-2 Decoder 11, Motion Vector and Mode Mapping Unit 12, Post Processing Unit 13, Frame Prediction Inter / An intra prediction unit 14, a DCT quantizer 15, a DCT dequantizer 16, a deblocking filter 17, and an entropy coding unit 18 are included.

특히, 본 발명에서는 상기 트랜스코더에서 MPEG-2로 부호화된 비트 스트림을 H.264/AVC로 부호화되는 비트 스트림으로 고속 트랜스코딩하는데 있어, 트랜스코딩 복잡도 감소 및 율 왜곡 비용 최적화를 위해 상기 움직임 벡터/모드 예측부(12)가 MPEG-2 디코더(11)에서 MPEG-2로 부호화된 비트 스트림(MPEG-2 Bitstream)을 복호화하여 매크로블록 헤더정보(MPEG-2 MB Information)로부터 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보 등을 토대로, H.264 매크로블록에 대응되는 최적의 움직임 벡터를 예측하고 최적의 모드를 예측한다.In particular, in the present invention, in the fast transcoding of the MPEG-2 encoded bit stream into the H.264 / AVC encoded bit stream in the transcoder, the motion vector / in order to reduce the transcoding complexity and optimize the rate distortion cost. Macro block type information extracted by the mode prediction unit 12 from the MPEG-2 decoder 11 by decoding the MPEG-2 encoded bit stream (MPEG-2 Bitstream) from the macroblock header information (MPEG-2 MB Information), Based on the coding block pattern information and the motion vector information, an optimal motion vector corresponding to the H.264 macroblock is predicted and an optimal mode is predicted.

한편, 상기 트랜스코더에서는 H.264 베이스라인(baseline)의 특성에 적합하게 MPEG-2 비트 스트림 중 아이 프레임(I frame)[이하 "I 프레임"이라 함]을 H.264 비트 스트림의 아이 슬라이스(I slices)[이하 "I 슬라이스"라 함]로 트랜스코딩하고, MPEG-2 비트 스트림 중 피 프레임(P frame)[이하 "P 프레임"이라 함]과 비 프레임(B frame)[이하 "B 프레임"이라 함]을 H.264 비트 스트림의 피 슬라이스(P slices)[이하 "P 슬라이스"라 함]로 트랜스코딩한다. 덧붙여, 상기 트랜스코더에 있어 공지의 구성요소에 대한 상세한 설명은 본 발명의 요지를 흐릴 수 있다고 판단되어져 이에 관한 설명은 생략하기로 하며, 이하 본 발명의 움직임 벡터를 예측하는 알고리즘에 대해 상세히 설명하기로 한다.Meanwhile, in the transcoder, an I frame (hereinafter referred to as an "I frame") of the MPEG-2 bit stream is selected as an eye slice of the H.264 bit stream in accordance with the characteristics of the H.264 baseline. I slices) (hereinafter referred to as "I slices"), and P frames (hereinafter referred to as "P frames") and B frames (hereinafter referred to as "B frames") of the MPEG-2 bit stream. Transcode into P slices (hereinafter referred to as "P slices") of the H.264 bit stream. In addition, a detailed description of known components in the transcoder is considered to obscure the gist of the present invention, and thus description thereof will be omitted. Hereinafter, an algorithm for predicting a motion vector of the present invention will be described in detail. Shall be.

도 2는 본 발명에서 제시하는 임의의 프레임과 참조 프레임간의 거리를 정하기 위한 일실시예 설명도이다.2 is a diagram illustrating an embodiment for determining a distance between an arbitrary frame and a reference frame according to the present invention.

본 발명의 움직임 벡터를 예측하는 알고리즘에 있어 임의의 프레임(frame)과 참조 프레임(reference frame)간의 거리를 도 2와 같이 정한다.In the algorithm for predicting the motion vector of the present invention, a distance between an arbitrary frame and a reference frame is determined as shown in FIG. 2.

하나의 프레임, 예컨대 첫 번째 P 프레임과 이 P 프레임의 포워드(forward) 방향에 속하는 참조 프레임인 I 프레임 또는 다음 P 프레임간의 거리를 InputFwdDistance(인풋포워드디스턴스)[이하 "InputFwdDistance"라 함]라고 정의한다. 마찬가지로, B 프레임(예컨대 첫 번째 B 프레임인 B1 프레임 또는 두 번째 B 프레임인 B2 프레임)과 이러한 각 B 프레임의 포워드 방향에 속하는 참조 프레임인 I 프레임 또는 P 프레임간의 거리도 InputFwdDistance라고 정의한다.The distance between one frame, for example, the first P frame and an I frame or a next P frame that is a reference frame belonging to the forward direction of the P frame, is defined as InputFwdDistance (hereinafter referred to as "InputFwdDistance"). . Similarly, the distance between a B frame (for example, a B1 frame which is a first B frame or a B2 frame which is a second B frame) and an I frame or a P frame which is a reference frame belonging to the forward direction of each of these B frames is also defined as InputFwdDistance.

그리고 B 프레임과 이 B 프레임의 백워드(backward) 방향에 속하는 참조 프레임간의 거리, 예컨대 B1 프레임과 P 프레임간의 거리, B2 프레임과 P 프레임간의 거리를 InputBwdDistance(인풋백워드디스턴스)[이하 "InputBwdDistance"라 함]라고 정의한다.The distance between the B frame and the reference frame belonging to the backward direction of the B frame, for example, the distance between the B1 frame and the P frame, and the distance between the B2 frame and the P frame, is inputBwdDistance (hereinafter referred to as “InputBwdDistance”). Is defined.

도 2를 참조하여 예를 들면, MPEG-2 비트 스트림의 GOP(Group of Pictures) 구조가 "M=3"인 경우에는 P 프레임의 InputFwdDistance는 "3"이고, 첫 번째 B 프레임인 B1 프레임의 InputFwdDistance는 "1" 및 InputBwdDistance는 "2"이고, 두 번째 B 프레임인 B2 프레임의 InputFwdDistance는 "2" 및 InputBwdDistance는 "1"이 된다.Referring to FIG. 2, for example, when the GOP (Group of Pictures) structure of the MPEG-2 bit stream is "M = 3", the InputFwdDistance of the P frame is "3", and the InputFwdDistance of the B1 frame, which is the first B frame. Is " 1 " and InputBwdDistance is " 2 ", InputFwdDistance is " 2 " and InputBwdDistance is " 1 "

다음으로, 상기와 같이 임의의 프레임과 참조 프레임간의 거리를 정한 상태에서, 하기에서 설명하는 본 발명의 포워드 예측(Forward Predictor)에 따른 움직임 벡터값, 백워드 예측(Backward Predictor)에 따른 움직임 벡터값 및 패스트 백워드 예측(Fast Backward Predictor)에 따른 움직임 벡터값과, 공지의 제로 예측(Zero Predictor)에 따른 움직임 벡터값을 계산한다. 여기서, 공지의 제로 예측 은 예측 벡터를 (0, 0)으로 그냥 처리해서 계산하는 것이다.Next, in the state where the distance between the arbitrary frame and the reference frame is determined as described above, the motion vector value according to the forward predictor of the present invention and the motion vector value according to the backward prediction And a motion vector value according to Fast Backward Predictor and a motion vector value according to known Zero Predictor. Here, known zero prediction is calculated by simply processing the prediction vector as (0, 0).

먼저, 본 발명의 포워드 예측(Forward Predictor)에 따른 움직임 벡터값을 다음의 [수학식 1]과 같이 계산한다.First, a motion vector value according to the forward predictor of the present invention is calculated as in Equation 1 below.

즉, B 프레임과 P 프레임의 매크로블록이 인터 매크로블록(Inter Macroblock)에 속한 경우에는, 이 매크로블록이 갖는 포워드 움직임 벡터(Forward Motion Vector)를 "FwdMV"라고 정의하고 포워드 예측에 따른 움직임 벡터값을 "FwdPredMV"라고 정의하고서, 상기 포워드 움직임 벡터[FwdMV]를 InputFwdDistance로 나눠서 포워드 예측에 따른 움직임 벡터값[FwdPredMV]을 계산한다.That is, when the macroblocks of the B frame and the P frame belong to an inter macroblock, the forward motion vector of the macroblock is defined as "FwdMV", and the motion vector value according to the forward prediction is defined. Is defined as "FwdPredMV", and the motion vector value [FwdPredMV] according to forward prediction is calculated by dividing the forward motion vector [FwdMV] by InputFwdDistance.

FwdPredMV = FwdMV / InputFwdDistanceFwdPredMV = FwdMV / InputFwdDistance

그리고 본 발명의 백워드 예측(Backward Predictor)에 따른 움직임 벡터값을 다음의 [수학식 2]와 같이 계산한다.And the motion vector value according to the backward prediction (Backward Predictor) of the present invention is calculated as shown in [Equation 2].

BwdPredMV = {BwdMV + DominPMV - OffsetMV} / InputFwdDistanceBwdPredMV = {BwdMV + DominPMV-OffsetMV} / InputFwdDistance

상기 [수학식 2]에서, 백워드 예측에 따른 움직임 벡터값을 계산하는데 요구되는 파라미터, 예컨대 "DominPMV" 및 "OffsetMV"에 대해 도 3을 참조하여 먼저 살펴보기로 한다.In Equation 2, parameters required for calculating a motion vector value according to backward prediction, for example, "DominPMV" and "OffsetMV", will be described first with reference to FIG. 3.

도 3은 본 발명에서 제시하는 백워드 움직임 벡터(BwdMV), 도미넌트 매크로 블록(Dominant MB) 및 움직임 벡터 오프셋(OffsetMV)에 대한 일실시예 설명도이다.3 is a diagram illustrating an embodiment of a backward motion vector (BwdMV), a dominant macro block (Dominant MB), and a motion vector offset (OffsetMV) according to the present invention.

도 3에 도시된 바와 같이, 상기 [수학식 2]의 "DominPMV"는 해당 백워드 움직임 벡터[BwdMV]가 나타내는 위치에서 가장 도미넌트(Dominant, 우세)한 매크로블록[이하 "도미넌트 매크로블록(Dominant MB)"이라 함]의 움직임 벡터를 의미한다. 본 발명에서는 매크로블록의 위치가 가장 많이 겹치는 P 프레임의 매크로블록을 도미넌트 매크로블록[Dominant MB]으로 설정한다. 여기서, 움직임 벡터 오프셋(OffsetMV)은 백워드 움직임 벡터[BwdMV]의 위치와 도미넌트 매크로블록[Dominant MB]의 위치간의 차이값을 나타낸다.As shown in FIG. 3, "DominPMV" in [Equation 2] is the most dominant macroblock at the position indicated by the corresponding backward motion vector [BwdMV] (hereinafter, referred to as "dominant MB block"). ) "Means a motion vector. In the present invention, the macroblock of the P frame in which the positions of the macroblocks overlap most is set as a dominant macroblock [Dominant MB]. Here, the motion vector offset OffsetMV represents a difference value between the position of the backward motion vector [BwdMV] and the position of the dominant macroblock [Dominant MB].

그렇다면, 상기 [수학식 2]로 돌아가서, B 프레임이 속한 인터 매크로블록(Inter Macroblock)이 백워드 예측을 했던 경우에는[예컨대 MPEG-2로 부호화된 비트 스트림 상에서], 이 매크로블록이 갖는 백워드 움직임 벡터(Backward Motion Vector)를 "BwdMV"라고 정의하고 백워드 예측에 따른 움직임 벡터값을 "BwdPredMV"라고 정의하고서, 상기 백워드 움직임 벡터[BwdMV]와 도미넌트 매크로블록[Dominant MB]의 움직임 벡터[DominPMV]를 더하고 이 더한값에서 움직임 벡터 오프셋[OffsetMV]을 뺀값을 InputFwdDistance로 나눠서 백워드 예측에 따른 움직임 벡터값[BwdPredMV]을 계산한다.Then, returning to Equation 2, if the Inter Macroblock to which the B frame belongs has backward prediction (for example, on a bit stream encoded by MPEG-2), the backward of this macroblock is present. A motion vector is defined as "BwdMV" and a motion vector value according to backward prediction is defined as "BwdPredMV", and the motion vector of the backward motion vector [BwdMV] and the dominant macroblock [Dominant MB] is defined. DominPMV] is added and the value obtained by subtracting the motion vector offset [OffsetMV] is divided by InputFwdDistance to calculate the motion vector value [BwdPredMV] according to the backward prediction.

그리고 본 발명의 패스트 백워드 예측(Fast Backward Predictor)에 따른 움직임 벡터값을 다음의 [수학식 3]과 같이 계산한다.Then, the motion vector value according to the fast backward prediction (Fast Backward Predictor) of the present invention is calculated as shown in Equation 3 below.

즉, 백워드 움직임 벡터[BwdMV]를 이용해 패스트 백워드 예측에 따른 움직임 벡터[FastBwdPredMV]를 계산할 수 있는데, 상기 백워드 움직임 벡터[BwdMV]를 InputBwdDistance로 나눈값에 음수를 취해서 패스트 백워드 예측에 따른 움직임 벡터[FastBwdPredMV]를 계산한다.In other words, the motion vector [FastBwdPredMV] according to the fast backward prediction can be calculated using the backward motion vector [BwdMV]. Compute the motion vector [FastBwdPredMV].

FastBwdPredMV = - (BwdMV / InputBwdDistance)FastBwdPredMV =-(BwdMV / InputBwdDistance)

그리고 공지의 제로 예측(Zero Predictor)에 따른 움직임 벡터값도 계산한다.In addition, a motion vector value according to a known zero predictor is also calculated.

이후, 상기와 같이 계산한 포워드 예측에 따른 움직임 벡터값, 백워드 예측에 따른 움직임 벡터값, 패스트 백워드 예측에 따른 움직임 벡터값 및 제로 예측에 따른 움직임 벡터값 중에서 최소의 움직임 비용(motion cost)을 갖는 움직임 벡터를 최적의 움직임 벡터로 판정(예측)한다[best predictor]. 여기서, 움직임 비용은 움직임 벡터가 (x,y)일 때에 현재 부호화하려는 부분과 탐색 영역 내부에 있는 (x,y) 위치에서 블록을 뺀, 예컨대 부호화해야 되는 픽셀에 대한 비용을 의미하며, 최소 움직임 비용을 찾는 과정은 블록 내부에 픽셀×픽셀로 빼서 절대값을 씌워서 더한 결과 중에서 그 결과값이 가장 작은 (x,y)를 찾아서 움직임 벡터로 선택하는 것이다.Then, the minimum motion cost among the motion vector value according to the forward prediction, the motion vector value according to the backward prediction, the motion vector value according to the fast backward prediction, and the motion vector value according to the zero prediction calculated as described above. The best predictor is determined as a motion vector having the optimal motion vector. Here, the motion cost refers to the cost of the pixel to be encoded, for example, by subtracting the block from the portion to be encoded and the (x, y) position inside the search region when the motion vector is (x, y), and the minimum motion The process of finding the cost is to find the (x, y) with the smallest result by selecting pixels x pixels and subtracting the absolute value, and selecting the motion vector.

부가적으로, 상기와 같이 판정(예측)한 움직임 벡터에 대해 정제 과정(Refinement Step)을 거칠 수 있는데, 최적의 움직임 벡터의 위치에서 보편적으로 사용되는 공지의 작은 다이아몬드 탐색 패턴(SDSP; Small Diamond Search Pattern) 등을 이용하여 이 움직임 벡터를 보다 정확하게 정제해 예측할 수도 있 다. 여기서, 정제 과정은 주변 위치, 예컨대 다이아몬드 패턴에 맞게 (x,y)를 이동시킨 비용을 몇 번에 걸쳐 구해서 최적의 위치를 찾는 것이다.In addition, a refinement step may be performed on the motion vectors determined (predicted) as described above, and a known small diamond search pattern (SDSP) commonly used at the position of the optimal motion vector may be used. Patterns can be used to refine and predict this motion vector more accurately. Here, the refining process is to find the optimal position by several times finding the cost of moving (x, y) to the peripheral position, for example, the diamond pattern.

앞서 도 1 내지 도 3을 참조해 설명했던 본 발명의 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 움직임 벡터를 예측하는 알고리즘은 도 4와 같은 플로우를 따른다.The algorithm for predicting a motion vector in fast transcoding to H.264 / AVC in MPEG-2 according to the present invention described with reference to FIGS. 1 to 3 follows the flow as shown in FIG. 4.

도 4는 본 발명에 따른 MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 움직임 벡터 예측 방법에 대한 일실시예 흐름도이며, 앞서 구체적인 설명을 전술했기에 그 상세한 설명은 생략하기로 한다.FIG. 4 is a flowchart illustrating a motion vector prediction method in fast transcoding from MPEG-2 to H.264 / AVC according to the present invention.

먼저, MPEG-2로 부호화된 비트 스트림(MPEG-2 Bitstream)을 복호화하여(401), 매크로블록 헤더정보(MPEG-2 MB Information)로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출한다(402).First, by decoding a MPEG-2 encoded bit stream (MPEG-2 Bitstream) (401), macroblock type information, encoded block pattern information, and motion vector information are extracted from macroblock header information (MPEG-2 MB Information). (402).

이후, 상기 추출한 매크로블록 헤더정보를 토대로 임의의 프레임과 참조 프레임간의 거리를 정한다(403). 예컨대, 하나의 프레임과 이 프레임의 포워드 방향에 속하는 참조 프레임간의 거리를 "InputFwdDistance"로 정의하고, B 프레임에 대해서는 B 프레임과 이 B 프레임의 백워드 방향에 속하는 참조 프레임간의 거리를 "InputBwdDistance"로 정의한다.Thereafter, a distance between an arbitrary frame and a reference frame is determined based on the extracted macroblock header information (403). For example, the distance between one frame and the reference frame belonging to the forward direction of this frame is defined as "InputFwdDistance", and for the B frame, the distance between the B frame and the reference frame belonging to the backward direction of this B frame is referred to as "InputBwdDistance". define.

그런 후, 본 발명에서 제시하는 [수학식 1]을 사용해 포워드 예측(Forward Predictor)에 따른 움직임 벡터값을, [수학식 2]를 사용해 백워드 예측(Backward Predictor)에 따른 움직임 벡터값을, [수학식 3]을 사용해 패스트 백워드 예측(Fast Backward Predictor)에 따른 움직임 벡터값을 계산하고, 공지의 제로 예 측(Zero Predictor)에 따른 움직임 벡터값을 계산한다(404).Then, the motion vector value according to the forward predictor (Forward Predictor) using [Equation 1] proposed in the present invention, the motion vector value according to the backward prediction (Backward Predictor) using [Equation 2], [ Equation 3] is used to calculate a motion vector value according to Fast Backward Predictor, and calculates a motion vector value according to a known zero predictor (404).

그런 후, 상기 계산한 포워드 예측에 따른 움직임 벡터값, 백워드 예측에 따른 움직임 벡터값, 패스트 백워드 예측에 따른 움직임 벡터값 및 제로 예측에 따른 움직임 벡터값 중에서 최소의 움직임 비용(motion cost)을 갖는 움직임 벡터를 최적의 움직임 벡터로 판정(예측)한다[best predictor](405).Then, the minimum motion cost among the calculated motion vector values according to the forward prediction, the motion vector values according to the backward prediction, the motion vector values according to the fast backward prediction, and the motion vector values according to the zero prediction are determined. The predicted motion vector is determined (predicted) as an optimal motion vector [best predictor] (405).

부가적으로, 상기와 같이 판정(예측)한 움직임 벡터에 대해 정제 과정(Refinement Step)을 거칠 수 있는데, 최적의 움직임 벡터의 위치에서 보편적으로 사용되는 공지의 작은 다이아몬드 탐색 패턴(SDSP; Small Diamond Search Pattern) 등을 이용하여 상기 판정한 움직임 벡터를 보다 정확하게 정제해 결정할 수도 있다(406).In addition, a refinement step may be performed on the motion vectors determined (predicted) as described above, and a known small diamond search pattern (SDSP) commonly used at the position of the optimal motion vector may be used. The determined motion vector may be more accurately refined and determined using a pattern) (406).

한편, 이하 본 발명의 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 모드를 예측하는 알고리즘에 대해 상세히 설명하기로 한다.Meanwhile, an algorithm for predicting mode in fast transcoding to MPEG-2 according to the present invention will be described in detail.

도 1에 도시된 트랜스코더의 MPEG-2 디코더(11)에서 복호화한 MPEG-2 비트 스트림으로부터 매크로블록 헤더정보를 추출할 수 있는데, 이 매크로블록 헤더정보에는 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보 등이 포함되어 있다.Macroblock header information can be extracted from the MPEG-2 bit stream decoded by the MPEG-2 decoder 11 of the transcoder shown in FIG. 1, which includes macroblock type information, coded block pattern information, and the like. Motion vector information and the like are included.

상기 매크로블록 타입정보를 통해, 매크로블록이 참조 프레임으로부터 예측을 하였는지의 여부[Intra 또는 Inter]와, 움직임 벡터의 값이 (0, 0)인지의 여부[MC 또는 No-MC]와, 포워드 움직임 예측(Forward) 또는 백워드 움직임 예 측(Backward) 또는 인터폴레이티드(양방향) 움직임 예측(Interpolated)인지의 여부 등을 알 수 있다. 여기서, 프레임 구조, 예컨대 I 프레임, P 프레임 및 B 프레임에 따라 서로 다른 가지 수의 매크로블록 타입정보를 갖는다.Through the macroblock type information, whether the macroblock predicted from the reference frame [Intra or Inter], whether the value of the motion vector is (0, 0) [MC or No-MC], and forward motion It is possible to know whether it is a forward or backward motion prediction or an interpolated (bidirectional) motion prediction. Here, different types of macroblock type information are provided according to frame structures, for example, I frames, P frames, and B frames.

그리고 상기 부호화 블록 패턴정보를 통해, 매크로블록 내의 8×8 블록의 부호화 여부[Coded 또는 NotCoded] 등을 알 수 있다.The coded block pattern information may determine whether 8 × 8 blocks in a macroblock are encoded [Coded or NotCoded].

앞서 언급한 MPEG-2의 매크로블록 타입정보, 부호화 블록 패턴정보는 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 H.264의 매크로블록 모드 예측(선택)에 주요한 정보를 제공한다. 이러한 매크로블록 타입정보, 부호화 블록 패턴정보를 토대로 본 발명에서는 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어서의 최적의 모드를 예측(선택)한다.The aforementioned macroblock type information and encoded block pattern information of MPEG-2 provide important information for macroblock mode prediction (selection) of H.264 in high-speed transcoding from MPEG-2 to H.264 / AVC. Based on such macroblock type information and coded block pattern information, the present invention predicts (selects) an optimal mode for high-speed transcoding from MPEG-2 to H.264 / AVC.

그럼, 본 발명의 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 모드를 예측하는 알고리즘을 도 5를 참조하여 설명하기로 한다.Next, an algorithm for predicting a mode in high-speed transcoding in MPEG-2 of the present invention to H.264 / AVC will be described with reference to FIG. 5.

도 5는 본 발명에 따른 MPEG-2에서 H.264/AVC로의 고속 트랜스코딩에서 모드 예측 방법에 대한 일실시예 흐름도이다.5 is a flowchart illustrating a mode prediction method in fast transcoding from MPEG-2 to H.264 / AVC according to the present invention.

먼저, 본 발명에서 사용하는 모드에 대해 다음과 같이 정한다(501).First, the mode used in the present invention is determined as follows (501).

H.264의 인트라 매크로블록 모드(Intra Macroblock Mode) 중 인트라 16×16 예측 모드를 "I16MB 모드"로, 인트라 4×4 예측 모드를 "I4MB 모드"로 정하고, 인터 예측 모드를 정한다. 여기서, 인터 예측 모드는 가변 블록 사이즈 움직임 추정 방식(variable block size motion estimation)을 사용하는 H.264의 특성에 따라 다양한 모드를 가질 수 있는데, 선택 가능한 블록 크기로는 "SKIP", "16×16", "16× 8" 및 "8×8"이 있으며, 이에 대응해 각각 "SKIP 모드", "Mode1 모드", "Mode2 모드" 및 "Mode3 모드"로 정하고, 아울러 "P8x8 모드"도 정한다. 여기서, "P8x8 모드"에 있어서는 각각의 8×8 크기의 서브 매크로블록(sub-macroblock)에 대해 "8×8", "8×4", "4×8" 및 "4×4" 크기의 인터 예측이 가능하며, 이에 대응해 각각 "Mode4 모드", "Mode5 모드", "Mode6 모드" 및 "Mode7 모드"로 정한다.In the intra macroblock mode of H.264, the intra 16x16 prediction mode is set to "I16MB mode", the intra 4x4 prediction mode is set to "I4MB mode", and the inter prediction mode is determined. Here, the inter prediction mode may have various modes according to the characteristics of H.264 using variable block size motion estimation. The selectable block sizes are “SKIP” and “16 × 16”. And "16x8" and "8x8", correspondingly to "SKIP mode", "Mode1 mode", "Mode2 mode" and "Mode3 mode", and "P8x8 mode". In the " P8x8 mode ", the " 8x8 ", " 8x4 ", " 4x8 " and " 4x4 " sizes for each 8x8 sub-macroblock, respectively. Inter prediction is possible, and correspondingly, "Mode4 mode", "Mode5 mode", "Mode6 mode" and "Mode7 mode" are respectively determined.

상기와 같이 각 모드를 정한 상태에서, MPEG-2로 부호화된 비트 스트림(MPEG-2 Bitstream)을 복호화하여(502), 매크로블록 헤더정보(MPEG-2 MB Information)로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출한다(503).With each mode determined as described above, the MPEG-2 encoded bit stream (MPEG-2 Bitstream) is decoded (502), and the macroblock type information and the encoding block from the macroblock header information (MPEG-2 MB Information). Pattern information and motion vector information are extracted (503).

상기 추출한 매크로블록 헤더정보를 토대로 모드 예측을 다음과 같이 수행한다.Based on the extracted macroblock header information, mode prediction is performed as follows.

즉, 상기 트랜스코딩 대상 MPEG-2 프레임 중 I 프레임에 대해서는 인터 예측 모드를 제외하고서 I4MB 모드와 I16MB 모드만을 H.264 매크로블록 모드로서 예측(고려)한다(504).That is, the I frame of the transcoding target MPEG-2 frame is predicted (considered) as the H.264 macroblock mode only in the I4MB mode and the I16MB mode except the inter prediction mode.

한편, 상기 트랜스코딩 대상 MPEG-2 프레임 중 P 프레임 또는 B 프레임에 대해서는 P 프레임 또는 B 프레임의 매크로블록이 인트라 부호화 매크로블록(Intra Coded Macroblock)인 경우에는 I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드 및 Mode3 모드를 H.264 매크로블록 모드로서 예측(고려)한다(505). 예컨대, 트랜스코딩 대상인 MPEG-2 비트 스트림 상에서는 인트라 매크로블록임에도 불구하고 H.264에서 인터 예측을 수행하는 이유는 H.264와 MPEG-2의 인트라 예측 개념이 기본적으로 상이하며, 특히 전술했던 본 발명의 움직임 벡터 예측 알고리즘을 통해 움직임 추정에 걸리는 시간을 최대한 단축했기에 모드 예측에 따른 추가적인 시간이 적게 소요되고 이로 인한 성능 향상이 두드러지기 때문이다.Meanwhile, for the P frame or the B frame of the transcoding target MPEG-2 frame, when the macroblock of the P frame or the B frame is an intra coded macroblock, I16MB mode, I4MB mode, SKIP mode, and Mode1 mode. Mode 2 and mode 3 are predicted (considered) as an H.264 macroblock mode (505). For example, the reason for performing inter prediction in H.264 despite being an intra macroblock on the MPEG-2 bit stream to be transcoded is fundamentally different from the concept of intra prediction in H.264 and MPEG-2. Since the time required for motion estimation is reduced as much as possible through the motion vector prediction algorithm, the additional time required for the mode prediction is less, and the performance improvement due to this is noticeable.

한편, 상기 트랜스코딩 대상 MPEG-2 프레임의 매크로블록이 MPEG-2 비트 스트림 상에서 SKIP 모드인 경우에는 SKIP 모드, Mode1 모드, Mode2 모드 및 Mode3 모드를 H.264 매크로블록 모드로서 예측(고려)한다(506). 예컨대 MPEG-2 프레임의 매크로블록이 SKIP 모드라는 것은 부호화할 정보가 거의 없는 블록임을 의미하기 때문이다.On the other hand, when the macroblock of the transcoding target MPEG-2 frame is the SKIP mode on the MPEG-2 bit stream, the SKIP mode, the Mode1 mode, the Mode2 mode, and the Mode3 mode are predicted (considered) as the H.264 macroblock mode ( 506). For example, the macroblock of the MPEG-2 frame is the SKIP mode because it means that the block has little information to be encoded.

한편, 상기 트랜스코딩 대상 MPEG-2 프레임의 매크로블록이 움직임 추정 비부호화 매크로블록(MC, Not Coded Macroblock)인 경우에는 SKIP 모드, Mode1 모드, Mode2 모드 및 Mode3 모드를 H.264 매크로블록 모드로서 예측(고려)한다(507). 예컨대 MPEG-2 프레임의 매크로블록이 움직임 추정 비부호화 매크로블록이라는 것은 인터 예측을 한 후에 부호화할 정보가 거의 없는 블록을 의미하기 때문이다.On the other hand, if the macroblock of the transcoding target MPEG-2 frame is a motion estimation uncoded macroblock (MC), the SKIP mode, Mode1 mode, Mode2 mode, and Mode3 mode are predicted as H.264 macroblock mode. (Consider) (507). For example, a macroblock of an MPEG-2 frame is a motion estimation uncoded macroblock because it means a block having little information to be encoded after inter prediction.

한편, 상기 트랜스코딩 대상 MPEG-2 프레임의 매크로블록이 움직임 비추정 인터 부호화 매크로블록(No-MC, Inter Coded Macroblock)인 경우에는 I4MB 모드, I16MB 모드, SKIP 모드, Mode1 모드, Mode2 모드 및 Mode3 모드를 H.264 매크로블록 모드로서 예측(고려)한다(508). 예컨대 MPEG-2 프레임의 매크로블록이 움직임 비추정 인터 부호화 매크로블록이라는 것은 현재 블록이 어느 정도 부호화할 정보가 있다는 것을 의미하기 때문이다.On the other hand, if the macroblock of the transcoding target MPEG-2 frame is a motion non-prediction inter coded macroblock (No-MC), the I4MB mode, the I16MB mode, the SKIP mode, the Mode1 mode, the Mode2 mode, and the Mode3 mode. Predict (consider) H.264 macroblock mode (508). For example, the fact that a macroblock of an MPEG-2 frame is a motion non-prediction inter-encoding macroblock means that the current block has information to be encoded to some extent.

한편, 상기 트랜스코딩 대상 MPEG-2 프레임의 매크로블록이 움직임 추정 부 호화 매크로블록(MC Coded Macroblock)인 경우에는 모든 가능한 모드 예측을 수행한다(509). 예컨대 MPEG-2 프레임의 매크로블록이 움직임 추정 부호화 매크로블록이라는 것은 복잡한 영역이라 판단되어지기 때문이다.Meanwhile, when the macroblock of the transcoding target MPEG-2 frame is a motion coded macroblock (MC Coded Macroblock), all possible mode prediction is performed (509). For example, it is determined that a macroblock of an MPEG-2 frame is a motion estimation encoded macroblock as a complex region.

덧붙여, 상기 H.264 매크로블록 모드 예측 결과 중에서 I16MB 모드의 율 왜곡 비용(rate-distortion cost)을 계산하여, 이 I16MB 모드의 율 왜곡 비용이 다른 인터 예측의 율 왜곡 비용보다 크면 상기 H.264 매크로블록 모드 예측 결과 중 I4MB 모드를 제외시키는 것이 바람직하다.In addition, the rate-distortion cost of the I16MB mode is calculated from the H.264 macroblock mode prediction result, and if the rate distortion cost of the I16MB mode is greater than the rate distortion cost of other inter prediction, the H.264 macro It is preferable to exclude the I4MB mode from the block mode prediction result.

전술한 바와 같이, H.264 모드 예측을 수행하는데 있어 자연 영상에 관해서는 대부분의 매크로블록이 인터 예측의 비용보다 인트라 예측의 비용이 더 많이 드는 것을 알 수 있다. 또한, 인트라 예측의 경우에 있어서 I4MB 모드의 복잡도가 I16MB 모드의 복잡도보다 더 크다. 이러한 점에 착안해, 본 발명에서는 I16MB 모드의 율 왜곡 비용(rate-distortion cost)이 다른 인터 예측의 율 왜곡 비용보다 크다면 I4MB 모드를 스킵(skip)하였으며, 이로서 인트라 예측에 있어서의 I4MB 모드의 복잡도를 감소시킬 수 있다.As described above, in performing the H.264 mode prediction, it can be seen that most macroblocks have a higher cost of intra prediction than a cost of inter prediction. In addition, in the case of intra prediction, the complexity of the I4MB mode is greater than that of the I16MB mode. With this in mind, the present invention skips the I4MB mode if the rate-distortion cost of the I16MB mode is greater than the rate distortion cost of the other inter predictions, thereby reducing the I4MB mode of intra prediction. Complexity can be reduced.

다음의 [표 1]은 상기 설명했던 트랜스코딩 대상 MPEG-2 프레임의 매크로블록에 대해 선택(예측)되는 H.264 모드를 정리한 것이다.[Table 1] below summarizes the H.264 mode selected (predicted) for the macroblock of the transcoding target MPEG-2 frame.

Macroblock type of MPEG-2Macroblock type of MPEG-2 macroblock candidate in H.264/AVCmacroblock candidate in H.264 / AVC Intra Coded MBIntra Coded MB I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode SKIP MBSKIP MB SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode MC, Not Coded MBMC, Not Coded MB SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode No-MC, Inter Coded MBNo-MC, Inter Coded MB I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode MC, Inter Coded MBMC, Inter Coded MB All possible modesAll possible modes

도 6a 내지 도 6d는 본 발명의 RD 성능에 대한 일실시예 그래프이며, 일반적으로 RD 성능 비교에 널리 사용되는 HD급(1280×720 [p], 59.97 [fps], 300 [frames])의 쉴즈(shields) 영상 및 스톡홀름(stockholm) 영상을 사용하였다.6A to 6D are graphs showing one embodiment of RD performance of the present invention, and shields of HD class (1280 × 720 [p], 59.97 [fps], 300 [frames]) which are generally used for comparing RD performance. (shields) images and stockholm images were used.

도 6a에는 쉴즈(shields) 영상에 관해 "탐색 영역 32"를 설정해 기존 알고리즘과 본 발명에서 제시한 알고리즘 각각의 RD 성능 그래프가 도시되어 있으며, 도 6b에는 쉴즈(shields) 영상에 관해 "탐색 영역 64"를 설정해 기존 알고리즘과 본 발명에서 제시한 알고리즘 각각의 RD 성능 그래프가 도시되어 있으며, 도 6c에는 스톡홀름(stockholm) 영상에 관해 "탐색 영역 32"를 설정해 기존 알고리즘과 본 발명에서 제시한 알고리즘 각각의 RD 성능 그래프가 도시되어 있으며, 도 6d에는 스톡홀름(stockholm) 영상에 관해 "탐색 영역 64"를 설정해 기존 알고리즘과 본 발명에서 제시한 알고리즘 각각의 RD 성능 그래프가 도시되어 있다. FIG. 6A shows the RD performance graphs of the conventional algorithm and the algorithm proposed by the present invention by setting the "search area 32" with respect to the shield image, and FIG. 6B shows the "search area 64" with respect to the shield image. RD performance graphs of the existing algorithms and the algorithms proposed by the present invention are shown, and FIG. 6C shows the search area 32 for the stockholm image. An RD performance graph is shown, and FIG. 6D shows an RD performance graph of each of the existing algorithm and the algorithm proposed in the present invention by setting a "search area 64" with respect to a stockholm image.

그리고 상기 쉴즈(shields) 영상 및 스톡홀름(stockholm) 영상에 대해 QP를 28에서 40까지 "4" 단위로 살펴보았으며, H.264의 RDO 기능을 수행하면서 풀 디코딩을 한 후에 인코딩한 실험 결과와 비교하였다.In addition, the shields image and the stockholm image were examined by QP from 28 to 40 in units of "4", and compared with experimental results encoded after full decoding while performing the RDO function of H.264. It was.

다음의 [표 2]는 탐색 영역이 "32"인 경우를 나타낸다.Table 2 below shows a case where the search area is "32."

Figure 112007044964862-pat00001
Figure 112007044964862-pat00001

다음의 [표 3]은 탐색 영역이 "64"인 경우를 나타낸다.Table 3 below shows a case where the search area is "64".

Figure 112007044964862-pat00002
Figure 112007044964862-pat00002

상기 [표 2] 및 [표 3]과 도 6a 내지 도 6d를 통해 알 수 있듯이, 풀디코딩을 한 후에 인코딩을 수행하는 기존 알고리즘보다 본 발명의 알고리즘이 시간적인 측면에서 탐색 영역 32인 경우에 평균 74.6%가 줄었고 탐색 영역 64인 경우에 평균 88.7%가 줄어드는 것을 확인할 수 있다. 더군다나, 본 발명의 RD 성능은 풀디코딩을 한 후에 인코딩을 수행하는 기존 알고리즘의 성능과 거의 차이가 없음을 확인할 수 있다. 이는 본 발명이 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 기존 알고리즘에 비해 시간적으로나 RD 성능적으로나 매우 효율적인 알고리즘임을 알 수 있다.As can be seen from the above [Table 2] and [Table 3] and FIGS. 6A to 6D, the average of the algorithm of the present invention is a search region 32 in terms of time rather than the conventional algorithm that performs encoding after full decoding. You can see that 74.6% is reduced and 88.7% is reduced in the case of 64 search areas. Furthermore, it can be seen that the RD performance of the present invention is hardly different from that of the conventional algorithm that performs encoding after full decoding. It can be seen that the present invention is a very efficient algorithm in terms of time and RD performance compared to the existing algorithm in high-speed transcoding from MPEG-2 to H.264 / AVC.

전술한 바와 같은 본 발명은 MPEG-2 콘텐츠 등을 H.264/AVC 콘텐츠로 변환하는데 있어 그 성능이 매우 우수하며, 비디오, 동영상 등과 같은 스트리밍 데이터를 실시간적으로 전송, 저장 등과 같은 서비스를 수행하는데 있어 시스템 복잡도를 상당히 감소시키는 잇점 등이 있다.As described above, the present invention has excellent performance in converting MPEG-2 contents into H.264 / AVC contents, and performs services such as transmitting and storing streaming data such as video and video in real time. The benefit is that it significantly reduces system complexity.

상술한 바와 같은 본 발명의 방법은 프로그램으로 구현되어 컴퓨터로 읽을 수 있는 형태로 기록매체(씨디롬, 램, 롬, 플로피 디스크, 하드 디스크, 광자기 디스크 등)에 저장될 수 있다. 이러한 과정은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있으므로 더 이상 상세히 설명하지 않기로 한다.As described above, the method of the present invention may be implemented as a program and stored in a recording medium (CD-ROM, RAM, ROM, floppy disk, hard disk, magneto-optical disk, etc.) in a computer-readable form. Since this process can be easily implemented by those skilled in the art will not be described in more detail.

이상에서 설명한 본 발명은, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니다.The present invention described above is capable of various substitutions, modifications, and changes without departing from the technical spirit of the present invention for those skilled in the art to which the present invention pertains. It is not limited by the drawings.

상기와 같은 본 발명은 트랜스코더, 예컨대 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어서의 복잡도를 상당히 감소시키는 효과가 있다.The present invention as described above has the effect of significantly reducing the complexity in high speed transcoding from transcoder such as MPEG-2 to H.264 / AVC.

또한, 본 발명은 MPEG-2의 움직임 벡터정보 등과 같은 매크로블록 헤더정보를 효율적으로 재사용하여 율 왜곡 비용에 최적화된 움직임 벡터를 예측하는 효과가 있다.In addition, the present invention has an effect of predicting a motion vector optimized for rate distortion cost by efficiently reusing macroblock header information such as motion vector information of MPEG-2.

또한, 본 발명은 MPEG-2에서 H.264/AVC로 고속 트랜스코딩하는데 있어 적은 시간을 소요하면서도 월등한 RD 성능을 낼 수 있는 효과가 있다.In addition, the present invention has the effect that it can take excellent time to transcode from MPEG-2 to H.264 / AVC while achieving superior RD performance.

Claims (18)

움직임 벡터 예측 방법에 있어서,In the motion vector prediction method, MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 단계;Decoding the MPEG-2 encoded bit stream to extract macroblock type information, encoded block pattern information, and motion vector information from the macroblock header information; 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 임의의 프레임과 참조 프레임간의 거리를 정하는 단계;Determining a distance between an arbitrary frame and a reference frame based on the extracted macroblock type information, coded block pattern information, and motion vector information; 상기 정한 거리 정보를 이용하여 포워드 예측에 따른 움직임 벡터값, 백워드 예측에 따른 움직임 벡터값, 패스트 백워드 예측에 따른 움직임 벡터값 및 제로 예측에 따른 움직임 벡터값을 계산하는 단계; 및Calculating a motion vector value according to forward prediction, a motion vector value based on backward prediction, a motion vector value based on fast backward prediction, and a motion vector value based on zero prediction using the determined distance information; And 상기 계산한 움직임 벡터값들 중에서 최소의 움직임 비용을 갖는 움직임 벡터를 최적의 움직임 벡터로 판정하는 단계Determining a motion vector having a minimum motion cost among the calculated motion vector values as an optimal motion vector 를 포함하는 움직임 벡터 예측 방법.Motion vector prediction method comprising a. 제 1 항에 있어서,The method of claim 1, 상기 판정한 움직임 벡터에 대해 정제 과정(Refinement Step)을 수행하여 최종적인 움직임 벡터를 결정하는 단계Determining a final motion vector by performing a refinement step on the determined motion vector; 를 더 포함하는 움직임 벡터 예측 방법.Motion vector prediction method further comprising. 제 2 항에 있어서,The method of claim 2, 상기 판정한 움직임 벡터에 대해 수행하는 정제 과정은,The refining process performed on the determined motion vector, 상기 판정한 움직임 벡터의 위치에서 작은 다이아몬드 탐색 패턴(SDSP; Small Diamond Search Pattern)을 이용하여 움직임 벡터를 정제하는 것을 특징으로 하는 움직임 벡터 예측 방법.And a motion vector is refined using a small diamond search pattern (SDSP) at the position of the determined motion vector. 제 1 항 내지 제 3 항 중 어느 한 항에 있어서,The method according to any one of claims 1 to 3, 상기 임의의 프레임과 참조 프레임간의 거리를 정하는 과정은,The process of determining the distance between the arbitrary frame and the reference frame, 하나의 프레임과 상기 하나의 프레임의 포워드 방향에 속하는 참조 프레임간의 거리를 "InputFwdDistance"로 정의하고, B 프레임에 대해서는 B 프레임과 상기 B 프레임의 백워드 방향에 속하는 참조 프레임간의 거리를 "InputBwdDistance"로 정의하는 것을 특징으로 하는 움직임 벡터 예측 방법.The distance between one frame and the reference frame belonging to the forward direction of the one frame is defined as "InputFwdDistance", and for the B frame, the distance between the B frame and the reference frame belonging to the backward direction of the B frame is referred to as "InputBwdDistance". Motion vector prediction method, characterized in that it is defined. 제 4 항에 있어서,The method of claim 4, wherein 상기 포워드 예측에 따른 움직임 벡터값["FwdPredMV"]을 계산하는 과정은, 다음의 [수학식 1]을 사용하여 계산하는 것을 특징으로 하는 움직임 벡터 예측 방법.The process of calculating the motion vector value ["FwdPredMV"] according to the forward prediction is calculated using Equation 1 below. [수학식 1][Equation 1] FwdPredMV = FwdMV / InputFwdDistanceFwdPredMV = FwdMV / InputFwdDistance 여기서, "FwdMV"는 매크로블록이 갖는 포워드 움직임 벡터를 나타냄.Here, "FwdMV" represents a forward motion vector of the macroblock. 제 4 항에 있어서,The method of claim 4, wherein 상기 백워드 예측에 따른 움직임 벡터값["BwdPredMV"]을 계산하는 과정은, 다음의 [수학식 2]를 사용하여 계산하는 것을 특징으로 하는 움직임 벡터 예측 방법.The process of calculating the motion vector value ["BwdPredMV"] according to the backward prediction is calculated using Equation 2 below. [수학식 2][Equation 2] BwdPredMV = {BwdMV + DominPMV - OffsetMV} / InputFwdDistanceBwdPredMV = {BwdMV + DominPMV-OffsetMV} / InputFwdDistance 여기서, "DominPMV"는 해당 백워드 움직임 벡터["BwdMV"]가 나타내는 위치에서 가장 도미넌트(Dominant, 우세)한 매크로블록(이하, 도미넌트 매크로블록[Dominant MB]이라 함)의 움직임 벡터를 나타내고, 움직임 벡터 오프셋["OffsetMV"]은 백워드 움직임 벡터["BwdMV"]의 위치와 도미넌트 매크로블록[Dominant MB]의 위치간의 차이값을 나타냄.Here, "DominPMV" represents a motion vector of a dominant macroblock (hereinafter, referred to as a dominant macroblock [Dominant MB]) at the position indicated by the corresponding backward motion vector ["BwdMV"]. The vector offset ["OffsetMV"] represents the difference between the position of the backward motion vector ["BwdMV"] and the position of the dominant macroblock [Dominant MB]. 제 6 항에 있어서,The method of claim 6, 상기 패스트 백워드 예측에 따른 움직임 벡터값["FastBwdPredMV"]을 계산하 는 과정은, 다음의 [수학식 3]을 사용하여 계산하는 것을 특징으로 하는 움직임 벡터 예측 방법.The process of calculating the motion vector value ["FastBwdPredMV"] according to the fast backward prediction is calculated using the following Equation (3). [수학식 3][Equation 3] FastBwdPredMV = - (BwdMV / InputBwdDistance)FastBwdPredMV =-(BwdMV / InputBwdDistance) 프로세서를 구비한 트랜스코더에,In a transcoder with a processor, MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 기능;Extracting macroblock type information, encoded block pattern information, and motion vector information from macroblock header information by decoding a bit stream encoded by MPEG-2; 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 임의의 프레임과 참조 프레임간의 거리를 정하는 기능;Determining a distance between an arbitrary frame and a reference frame based on the extracted macroblock type information, coded block pattern information, and motion vector information; 상기 정한 거리 정보를 이용하여 포워드 예측에 따른 움직임 벡터값, 백워드 예측에 따른 움직임 벡터값, 패스트 백워드 예측에 따른 움직임 벡터값 및 제로 예측에 따른 움직임 벡터값을 계산하는 기능; 및Calculating a motion vector value according to forward prediction, a motion vector value based on backward prediction, a motion vector value based on fast backward prediction, and a motion vector value based on zero prediction using the determined distance information; And 상기 계산한 움직임 벡터값들 중에서 최소의 움직임 비용을 갖는 움직임 벡터를 최적의 움직임 벡터로 판정하는 기능A function of determining a motion vector having a minimum motion cost among the calculated motion vector values as an optimal motion vector 을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for realizing this. 제 8 항에 있어서,The method of claim 8, 상기 판정한 움직임 벡터에 대해 정제 과정(Refinement Step)을 수행하여 최종적인 움직임 벡터를 결정하는 기능A function of determining a final motion vector by performing a refinement step on the determined motion vector 을 더 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium that records a program for further realization. 모드 예측 방법에 있어서,In the mode prediction method, I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드를 정하는 단계;Determining an I16MB mode, an I4MB mode, a SKIP mode, a Mode1 mode, a Mode2 mode, a Mode3 mode, a Mode4 mode, a Mode5 mode, a Mode6 mode, and a Mode7 mode; MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 단계; 및Decoding the MPEG-2 encoded bit stream to extract macroblock type information, encoded block pattern information, and motion vector information from the macroblock header information; And 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 상기 정한 I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드 중에서 하나 이상의 모드를 H.264 매크로블록 모드로서 예측하는 단계One of I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode, Mode4 mode, Mode5 mode, Mode6 mode and Mode7 mode based on the extracted macroblock type information, coded block pattern information and motion vector information Predicting the above mode as an H.264 macroblock mode 를 포함하는 모드 예측 방법.Mode prediction method comprising a. 제 10 항에 있어서,The method of claim 10, 상기 H.264 매크로블록 모드를 예측하는 단계는,Predicting the H.264 macroblock mode, 트랜스코딩 대상 MPEG-2 프레임 중 I 프레임에 대해서는 인터 예측 모드를 제외하고서 I4MB 모드와 I16MB 모드만을 H.264 매크로블록 모드로서 예측하는 것을 특징으로 하는 모드 예측 방법.A mode prediction method comprising predicting only I4MB mode and I16MB mode as an H.264 macroblock mode except for I frame among MPEG-2 frames to be transcoded. 제 10 항에 있어서,The method of claim 10, 상기 H.264 매크로블록 모드를 예측하는 단계는,Predicting the H.264 macroblock mode, 트랜스코딩 대상 MPEG-2 프레임 중 P 프레임 또는 B 프레임에 대해서는 P 프레임 또는 B 프레임의 매크로블록이 인트라 부호화 매크로블록(Intra Coded Macroblock)인 경우에는 I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드 및 Mode3 모드를 H.264 매크로블록 모드로서 예측하는 것을 특징으로 하는 모드 예측 방법.For P or B frames among the MPEG-2 frames to be transcoded, if the macroblock of the P frame or the B frame is an intra coded macroblock, I16MB mode, I4MB mode, SKIP mode, Mode1 mode, and Mode2 mode And predicting Mode3 mode as an H.264 macroblock mode. 제 10 항에 있어서,The method of claim 10, 상기 H.264 매크로블록 모드를 예측하는 단계는,Predicting the H.264 macroblock mode, 트랜스코딩 대상 MPEG-2 프레임의 매크로블록이 MPEG-2 비트 스트림 상에서 SKIP 모드인 경우에는 SKIP 모드, Mode1 모드, Mode2 모드 및 Mode3 모드를 H.264 매크로블록 모드로서 예측하는 것을 특징으로 하는 모드 예측 방법.When the macroblock of the MPEG-2 frame to be transcoded is the SKIP mode on the MPEG-2 bit stream, the mode prediction method comprising predicting the SKIP mode, the Mode1 mode, the Mode2 mode, and the Mode3 mode as the H.264 macroblock mode. . 제 10 항에 있어서,The method of claim 10, 상기 H.264 매크로블록 모드를 예측하는 단계는,Predicting the H.264 macroblock mode, 트랜스코딩 대상 MPEG-2 프레임의 매크로블록이 움직임 추정 비부호화 매크로블록(MC, Not Coded Macroblock)인 경우에는 SKIP 모드, Mode1 모드, Mode2 모드 및 Mode3 모드를 H.264 매크로블록 모드로서 예측하는 것을 특징으로 하는 모드 예측 방법.When the macroblock of the transcoding target MPEG-2 frame is a motion estimation uncoded macroblock (MC), the SKIP mode, Mode1 mode, Mode2 mode, and Mode3 mode are predicted as H.264 macroblock mode. Mode prediction method. 제 10 항에 있어서,The method of claim 10, 상기 H.264 매크로블록 모드를 예측하는 단계는,Predicting the H.264 macroblock mode, 트랜스코딩 대상 MPEG-2 프레임의 매크로블록이 움직임 비추정 인터 부호화 매크로블록(No-MC, Inter Coded Macroblock)인 경우에는 I4MB 모드, I16MB 모드, SKIP 모드, Mode1 모드, Mode2 모드 및 Mode3 모드를 H.264 매크로블록 모드로서 예측하는 것을 특징으로 하는 모드 예측 방법.If the macroblock of the MPEG-2 frame to be transcoded is a motion non-prediction inter coded macroblock (No-MC), the I4MB mode, the I16MB mode, the SKIP mode, the Mode1 mode, the Mode2 mode, and the Mode3 mode are set to H. 264 A mode prediction method characterized in that the prediction as a macroblock mode. 제 10 항에 있어서,The method of claim 10, 상기 H.264 매크로블록 모드를 예측하는 단계는,Predicting the H.264 macroblock mode, 트랜스코딩 대상 MPEG-2 프레임의 매크로블록이 움직임 추정 부호화 매크로블록(MC Coded Macroblock)인 경우에는 I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드를 H.264 매크로블록 모드로서 예측하는 것을 특징으로 하는 모드 예측 방법.If the macroblock of the MPEG-2 frame to be transcoded is an MC coded macroblock, I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode, Mode4 mode, Mode5 mode, Mode6 mode And predicting Mode7 mode as an H.264 macroblock mode. 제 10 항 내지 제 16 항 중 어느 한 항에 있어서,The method according to any one of claims 10 to 16, 상기 H.264 매크로블록 모드 예측 결과 중에서 I16MB 모드의 율 왜곡 비용(rate-distortion cost)을 계산하여, 상기 I16MB 모드의 율 왜곡 비용이 다른 인터 예측의 율 왜곡 비용보다 크면 상기 H.264 매크로블록 모드 예측 결과 중 I4MB 모드를 제외시키는 것을 특징으로 하는 모드 예측 방법.The rate-distortion cost of the I16MB mode is calculated from the H.264 macroblock mode prediction result, and if the rate distortion cost of the I16MB mode is greater than the rate distortion cost of another inter prediction, the H.264 macroblock mode Mode prediction method, characterized in that the I4MB mode is excluded from the prediction result. 프로세서를 구비한 트랜스코더에,In a transcoder with a processor, I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드를 정하는 기능;A function of determining the I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode, Mode4 mode, Mode5 mode, Mode6 mode and Mode7 mode; MPEG-2로 부호화된 비트 스트림을 복호화하여 매크로블록 헤더정보로부터 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 추출하는 기능; 및Extracting macroblock type information, encoded block pattern information, and motion vector information from macroblock header information by decoding a bit stream encoded by MPEG-2; And 상기 추출한 매크로블록 타입정보, 부호화 블록 패턴정보 및 움직임 벡터정보를 토대로 상기 정한 I16MB 모드, I4MB 모드, SKIP 모드, Mode1 모드, Mode2 모드, Mode3 모드, Mode4 모드, Mode5 모드, Mode6 모드 및 Mode7 모드 중에서 하나 이상의 모드를 H.264 매크로블록 모드로서 예측하는 기능One of I16MB mode, I4MB mode, SKIP mode, Mode1 mode, Mode2 mode, Mode3 mode, Mode4 mode, Mode5 mode, Mode6 mode and Mode7 mode based on the extracted macroblock type information, coded block pattern information and motion vector information Function to predict the above modes as H.264 macroblock mode 을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for realizing this.
KR1020070061035A 2006-11-27 2007-06-21 The Motion Vector Prediction Method and The Mode Prediction Method and Recording Medium Thereof in Fast MPEG-2 to H.264/AVC Transcoding KR100896978B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20060117818 2006-11-27
KR1020060117818 2006-11-27

Publications (2)

Publication Number Publication Date
KR20080047954A KR20080047954A (en) 2008-05-30
KR100896978B1 true KR100896978B1 (en) 2009-05-14

Family

ID=39664244

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070061035A KR100896978B1 (en) 2006-11-27 2007-06-21 The Motion Vector Prediction Method and The Mode Prediction Method and Recording Medium Thereof in Fast MPEG-2 to H.264/AVC Transcoding

Country Status (1)

Country Link
KR (1) KR100896978B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017101349A1 (en) * 2015-12-14 2017-06-22 乐视控股(北京)有限公司 Real-time transcoding method and device with encoding information inheritance

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
HUE051313T2 (en) 2009-10-01 2021-03-01 Sk Telecom Co Ltd Method and apparatus for encoding/decoding image using variable-sized macroblocks
KR101330218B1 (en) * 2012-01-04 2013-11-18 경상대학교산학협력단 Video encoder, video encoding method and video deconing method
KR101353289B1 (en) * 2012-07-06 2014-01-27 인텔렉추얼디스커버리 주식회사 Transcoding method using Bitrate-Distortion cost and Transcoder using the same

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030014697A (en) * 2000-06-09 2003-02-19 제너럴 인스트루먼트 코포레이션 Video size conversion and transcoding from mpeg-2 to mpeg-4
KR20050062836A (en) * 2003-12-18 2005-06-28 학교법인 대양학원 Transcoding method and apparatus
KR20050091369A (en) * 2004-03-12 2005-09-15 학교법인 대양학원 Video transcoding method and apparatus, and motion vector interpolation method
KR20060093743A (en) * 2005-02-22 2006-08-25 엘지전자 주식회사 Method and apparatus of video transcoding and pvr of using the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030014697A (en) * 2000-06-09 2003-02-19 제너럴 인스트루먼트 코포레이션 Video size conversion and transcoding from mpeg-2 to mpeg-4
KR20050062836A (en) * 2003-12-18 2005-06-28 학교법인 대양학원 Transcoding method and apparatus
KR20050091369A (en) * 2004-03-12 2005-09-15 학교법인 대양학원 Video transcoding method and apparatus, and motion vector interpolation method
KR20060093743A (en) * 2005-02-22 2006-08-25 엘지전자 주식회사 Method and apparatus of video transcoding and pvr of using the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017101349A1 (en) * 2015-12-14 2017-06-22 乐视控股(北京)有限公司 Real-time transcoding method and device with encoding information inheritance

Also Published As

Publication number Publication date
KR20080047954A (en) 2008-05-30

Similar Documents

Publication Publication Date Title
JP6042470B2 (en) Adaptive motion resolution for video coding
KR101521336B1 (en) Template matching for video coding
Huang et al. Fast decision of block size, prediction mode, and intra block for H. 264 intra prediction
Tourapis et al. Direct mode coding for bipredictive slices in the H. 264 standard
EP2202985B1 (en) An interframe prediction encoding/decoding method and apparatus
EP1618744B1 (en) Video transcoding
RU2497303C2 (en) Video coding using conversion more than 4×4 and 8×8
WO2012124497A1 (en) Image processing device and method
WO2010135609A1 (en) Adaptive picture type decision for video coding
JP2011211734A (en) Method and apparatus for encoding hybrid intra-inter coded block
MX2014008479A (en) Image processing device and method.
WO2013013298A1 (en) Method and system for efficient video transcoding using coding modes, motion vectors and residual information
Yeh et al. Predictive texture synthesis-based intra coding scheme for advanced video coding
KR100896978B1 (en) The Motion Vector Prediction Method and The Mode Prediction Method and Recording Medium Thereof in Fast MPEG-2 to H.264/AVC Transcoding
KR20060132962A (en) Motion estimation and segmentation for video data
Sarwer et al. Fast sum of absolute transformed difference based 4× 4 intra-mode decision of H. 264/AVC video coding standard
Yang et al. Description of video coding technology proposal by Huawei Technologies & Hisilicon Technologies
Lin et al. FITD: Fast Intra Transcoding from H. 264/AVC to high efficiency video coding based on DCT coefficients and prediction modes
KR20100059038A (en) Intra prediction method for fast mode decision in h.264
Kim et al. Basic prediction techniques in modern video coding standards
Nguyen et al. Efficient coding unit size selection for HEVC downsizing transcoding
Kao et al. A high-performance VLSI architecture for intra prediction and mode decision in H. 264/AVC video encoding
Chen et al. A condition-based intra prediction algorithm for H. 264/AVC
KR100718468B1 (en) Method and device for video down-sampling transcoding
WO2015015404A2 (en) A method and system for determining intra mode decision in h.264 video coding

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

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20140401

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee