KR20100016689A - Fast inter mode decision method in h.264 encoding - Google Patents

Fast inter mode decision method in h.264 encoding Download PDF

Info

Publication number
KR20100016689A
KR20100016689A KR1020080076264A KR20080076264A KR20100016689A KR 20100016689 A KR20100016689 A KR 20100016689A KR 1020080076264 A KR1020080076264 A KR 1020080076264A KR 20080076264 A KR20080076264 A KR 20080076264A KR 20100016689 A KR20100016689 A KR 20100016689A
Authority
KR
South Korea
Prior art keywords
current
macroblock
motion vector
reference frame
macro block
Prior art date
Application number
KR1020080076264A
Other languages
Korean (ko)
Other versions
KR100986992B1 (en
Inventor
손광훈
고현석
Original Assignee
연세대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 연세대학교 산학협력단 filed Critical 연세대학교 산학협력단
Priority to KR1020080076264A priority Critical patent/KR100986992B1/en
Publication of KR20100016689A publication Critical patent/KR20100016689A/en
Application granted granted Critical
Publication of KR100986992B1 publication Critical patent/KR100986992B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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
    • H04N19/109Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
    • 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

Landscapes

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

Abstract

PURPOSE: A fast inter mode decision method in h.264 encoding is provided to determine an inter mode with less calculating load without propagating an error in selection of a wrong mode. CONSTITUTION: Among a motion vector between a current macro block and the first reference frame and a motion vector between the current macro block and the second frame, whether at least one is a zero motion vector is determined(502). The current macro block is compared with the first correspondence macro block and the second correspondence macro block and non-varying or not is determined(504). The current macro block is encoded by a direct mode(506).

Description

H.264 인코딩 시 고속 인터 모드 결정 방법{Fast Inter Mode Decision Method in H.264 Encoding} H.264 Fast Inter Mode Decision Method in H.264 Encoding

본 발명은 H.264 인코딩에 관한 것으로서, 더욱 상세하게는 H.264 인코딩 시 고속으로 인터 모드를 결정하는 방법에 관한 것이다. The present invention relates to H.264 encoding, and more particularly, to a method of determining an inter mode at high speed in H.264 encoding.

MPEG-1, MPEG-2, MPEG-4, H.263, 및 H.264 동영상 표준 부호화 방식과 같은 비디오 코딩 표준들이 개발되어 디지털 미디어의 선두 역할을 수행하고 있다. 이러한 압축 기술이 VCD, DVD, 및 디지털TV 분야에 엄청난 변화를 가져오고 있으며, 그 중에서 H.264 압축 기술은 이동 수신이 가능한 DMB에 사용되는 영상 압축 방식으로서 높은 압축 성능을 갖고 있어 DMB 외에도 다양한 응용 분야에 사용되고 있다.  Video coding standards such as MPEG-1, MPEG-2, MPEG-4, H.263, and H.264 video standard coding methods have been developed and play a leading role in digital media. This compression technology is making a tremendous change in the field of VCD, DVD, and digital TV. Among them, H.264 compression technology is a video compression method used for mobile reception DMB and has high compression performance. It is used in the field.

H.264는 ITU-T VCEG(Video Coding Experts Group)와 ISO/IEC MPEG(Moving Picture Experts Group)의 최신 영상 표준 프로젝트이고, 이전의 압축 기술에 비해 개선된 압축 성능을 가지면서 대화형이나 비대화형 응용으로 지정된 네트워크에서 친화적인 비디오 영상을 제공한다.H.264 is the latest video standard project of the ITU-T Video Coding Experts Group (VCEG) and ISO / IEC Moving Picture Experts Group (MPEG), and is interactive or non-interactive with improved compression performance over previous compression technologies. The application provides friendly video footage on the specified network.

H.264에서는 16*16 화소를 가지는 블록을 하나의 매크로 블록으로 하고, 이를 다양한 크기의 블록으로 나누어 처리하며, 보다 정확한 움직임 예측 및 보상을 수행하기 위해 화소 영역에서의 인트라 예측(intra prediction), 다양한 블록 크기, 다중 참조 기법, 율-왜곡(Rate-Distortion) 최적화 기법에 의해 매크로 블록 모드를 결정하여, 기존의 동영상 압축 표준에 비해 동일한 화질에서 50% 이상 비트 수를 절약할 수 있는 이점이 있다In H.264, a block having 16 * 16 pixels is formed into one macro block, divided into blocks of various sizes, and intra prediction in the pixel region for more accurate motion prediction and compensation, Macroblock mode is determined by various block sizes, multiple reference techniques, and rate-distortion optimization techniques, which can save 50% or more bits at the same image quality compared to existing video compression standards.

도 1은 일반적인 H.264 부호화기의 구성을 도시한 도면이다. 1 is a diagram illustrating a configuration of a general H.264 encoder.

도 1을 참조하면, 일반적인 H.264 부호화기는 부호화 제어부(110), 변환 및 양자화부(120), 엔트로피 부호화부 (130), 역변환 및 역양자화부(140), 디블록킹 필터(150), 참조 영상 저장부(160), 움직임 추정부(170), 움직임 보상부(180) 및 인트라 예측부(190)를 포함한다.Referring to FIG. 1, a general H.264 encoder includes a coding controller 110, a transform and quantizer 120, an entropy encoder 130, an inverse transform and inverse quantizer 140, and a deblocking filter 150. The image storage unit 160, a motion estimator 170, a motion compensator 180, and an intra predictor 190 are included.

입력 시퀀스가 인트라 프레임인 경우, 입력 시퀀스는 부호화 제어부(110)를 거쳐 인트라 예측부(190)에서 예측 과정이 수행된다. 이후, 예측된 영상 신호는 변환 및 양자화부(120)에서 정수 변환 및 양자화가 이루어져 엔트로피 부호화부(130)를 통해 출력되는 한편, 역변환 및 역양자화부(140)와 디블록킹 필터(150)를 통과하여 참조영상 저장부(160)에 저장되어 다음 프레임의 예측 과정에서 사용되게 된다. When the input sequence is an intra frame, the prediction sequence is performed by the intra predictor 190 through the encoding controller 110. Subsequently, the predicted video signal is transformed and quantized by the transform and quantizer 120, and is output through the entropy encoder 130, while passing through the inverse transform and inverse quantizer 140 and the deblocking filter 150. It is stored in the reference image storage unit 160 to be used in the prediction process of the next frame.

한편, 입력 시퀀스가 인터 프레임(inter frame)인 경우 움직임 추정부(170)에서 입력 시퀀스에 대한 움직임 벡터를 검출하고 최적의 매크로 블록이 결정되며, 이후 움직임 보상부(180)에서 참조 영상 저장부(160)에 기 저장된 참조 영상을 이용하여 예측 프레임이 생성된다. 예측 과정을 거친 인터 프레임은 변환 및 양자화부(120)에서 정수 변환 및 양자화가 이루어져 엔트로피 부호화부(130)를 통해 출력 되는 한편, 역변환 및 역양자화부(140)와 디블록킹 필터(150)를 통과하여 참조 영상 저장부(160)에 저장되어 다음 프레임의 예측 과정에서 사용되게 된다.Meanwhile, when the input sequence is an inter frame, the motion estimator 170 detects a motion vector for the input sequence and determines an optimal macro block. Then, the motion compensator 180 stores the reference image storage unit ( A prediction frame is generated using the reference image previously stored in 160. The predicted inter frame is integer transformed and quantized by the transform and quantizer 120, and is output through the entropy encoder 130, while passing through the inverse transform and inverse quantizer 140 and the deblocking filter 150. It is stored in the reference image storage unit 160 to be used in the prediction process of the next frame.

도 2는 H.264 인코딩을 위한 인터 모드의 매크로 블록 타입을 설명하기 위한 도면이다. 2 is a diagram for describing a macroblock type of an inter mode for H.264 encoding.

도 2에 도시된 바와 같이, 인터 모드의 매크로 블록 타입은 16*16, 8*16, 16*8, 8*8 모드로 나누어지고, 8*8 모드는 다시 P8*8, P4*8 및 P8*4, P8*8 및 P4*4 모드로 나누어진다. 인터 모드에서는 각 블록 타입별로 움직임 추정 과정이 모두 수행된다. As shown in Fig. 2, the macro block type of the inter mode is divided into 16 * 16, 8 * 16, 16 * 8 and 8 * 8 modes, and the 8 * 8 mode is again P8 * 8, P4 * 8 and P8. It is divided into * 4, P8 * 8 and P4 * 4 modes. In the inter mode, all motion estimation processes are performed for each block type.

도 3 및 도 4는 H.264 인코딩을 위한 인트라 모드 매크로 블록의 서브 모드를 도시한 도면으로서, 도 3은 4*4 블록 타입의 서브 모드를 도시한 것이고, 도 4는 16*16 블록 타입의 서브 모드를 도시한 것이다. 3 and 4 illustrate a sub mode of an intra mode macro block for H.264 encoding, and FIG. 3 illustrates a sub mode of a 4 * 4 block type, and FIG. 4 illustrates a 16 * 16 block type. The sub mode is shown.

인트라 예측은 인트라 4*4 블록 타입의 경우 수직(vertical), 수평(horizontal), 대각선 좌 하향(diagonal down left), 대각선 우 하향(diagonal down right), 수직 우향(vertical right), 수평 하향(horizontal down), 수직 좌향(vertical left) 및 수평 상향(horizontal up) 방향으로 픽셀 값들을 참조하여 예측하는 모드와, DC 예측 모드를 포함하여 총 9가지에 대하여 인트라 예측이 수행되며, 아울러, 16*16 블록 타입의 경우 수직, 수평, DC 및 평면 모드의 4가지 경우에 대하여 예측이 수행된다. Intra prediction is vertical, horizontal, diagonal down left, diagonal down right, vertical right, and horizontal down for intra 4 * 4 block types. Intra prediction is performed on a total of nine modes including a prediction mode with reference to pixel values in down, vertical left, and horizontal up directions, and a DC prediction mode. In the case of the block type, prediction is performed for four cases of vertical, horizontal, DC, and planar modes.

인터 또는 인트라 예측이 수행되면, 매크로 블록에 대해 최적의 모드를 선택하기 위해 율-왜곡(Rate-Distortion, RD) 값을 산출하고 RD 코스트를 연산하여 최 적의 모드를 선택한다. When inter or intra prediction is performed, a rate-distortion (RD) value is calculated and an RD cost is calculated to select an optimal mode to select an optimal mode for the macroblock.

고속으로 인터모드를 결정하기 위해 몇 가지 알고리즘이 제안되었다. 인터모드의 고속 결정을 위한 접근 방식은 크게 두가지로 분류될 수 있는 데, 첫 번째 방식은 인터 모드 예측 시 미리 설정된 구속 조건을 이용하여 후보 모드를 줄이는 것이며, 두 번째 방식은 매크로 블록의 스킵 모드를 일찍 예측하는 것이다. 이와 같은 방식은 H.264 코딩 시 스킵 모드가 다른 후보 모드들에 비해 지배적이라는 사실에 기초한 것이다. Several algorithms have been proposed to determine the intermode at high speed. The approach for fast decision of inter mode can be classified into two types. The first method is to reduce candidate mode by using preset constraints in inter mode prediction, and the second method is to skip skip mode of macro block. It is predicting early. This approach is based on the fact that in H.264 coding, the skip mode is dominant over other candidate modes.

그러나 이와 같은 두 개의 접근 방식은 모두 문제점이 있었다. 첫 번째 접근 방식의 경우, 효율이 서치 방식에 의해 결정된다. 일반적으로 첫 번째 접근 방식은 전체 서치(Full Search) 방식을 이용하는데, 전체 서치 방식을 이용할 경우 모든 모드에 대해 움직임 추정(Motion Estimation) 을 수행하여야 하는데, 이때 중복적인 연산이 수행되어야 하는 바 연산의 복잡도 측면에서 비효율적이다. However, both approaches have had problems. For the first approach, the efficiency is determined by the search method. In general, the first approach uses a full search method, and when using the full search method, motion estimation must be performed for all modes. Inefficient in terms of complexity.

또한, 두 번째 방식은 적절하지 못한 모드가 선택되었을 때 이러한 에러가 계속적으로 전파된다는 문제점이 있었다.In addition, the second method has a problem that such an error is continuously propagated when an inappropriate mode is selected.

본 발명에서는 상기한 바와 같은 종래 기술의 문제점을 해결하기 위해, 고속으로 H.264 인코딩 시 인터 모드를 결정할 수 있는 방법을 제안하고자 한다. In the present invention, to solve the problems of the prior art as described above, it is proposed a method that can determine the inter mode when encoding H.264 at high speed.

본 발명의 다른 목적은 잘못된 모드 선택 시 에러가 전파되지 않으면서 적은 연산량으로 인터 모드를 결정할 수 있는 방법을 제안하고자 한다. Another object of the present invention is to propose a method for determining an inter mode with a small amount of calculation without propagating an error when selecting a wrong mode.

본 발명의 다른 목적들은 하기의 실시예를 통해 당업자에 의해 도출될 수 있을 것이다. Other objects of the present invention may be derived by those skilled in the art through the following examples.

상기한 바와 같은 목적을 달성하기 위하여, 본 발명의 일 측면에 따르면, H.264 인코딩 시 인터 모드 결정 방법에 있어서, 현재 프레임이 B-픽처인지 여부를 판단하는 단계(a); 상기 현재 프레임이 B-픽처일 경우, 현재 프레임의 현재 매크로 블록과 제1 참조 프레임과의 모션 벡터 및 상기 현재 매크로 블록과 제2 참조 프레임과의 모션 벡터 중 적어도 하나가 제로(Zero) 모션 벡터인지 여부를 판단하는 단계(b); 상기 현재 매크로 블록과 제1 참조 프레임과의 모션 벡터 및 상기 현재 매크로 블록과 제2 참조 프레임과의 모션 벡터 중 적어도 하나가 제로(Zero) 모션 벡터일 경우, 상기 현재 매크로 블록과 상기 현재 매크로 블록과 대응되는 상기 제1 참조 프레임의 제1 대응 매크로 블록이 비가변적인지 여부 및 상기 현재 매크로 블록과 상기 현재 매크로 블록과 대응되는 상기 제2 참조 프레임의 제2 대응 매크로 블록이 비가변적인지 여부를 판단하는 단계(c); 및 상기 현재 매크로 블록이 상기 제1 대응 매크로 블록 및 상기 제2 대응 매크로 블록과 비교하여 비가변적일 경우 상기 현재 매크로 블록을 다이렉트 모드에 의해 인코딩하는 단계(d)를 포함하는 것H.264 인코딩 시 고속 인터 모드 결정 방법이 제공된다.In order to achieve the above object, according to an aspect of the present invention, there is provided a method for determining an inter mode in H.264 encoding, comprising: determining whether a current frame is a B-picture; If the current frame is a B-picture, at least one of a motion vector of the current macroblock and the first reference frame of the current frame and a motion vector of the current macroblock and the second reference frame is a zero motion vector. Determining whether or not (b); When at least one of the motion vector of the current macroblock and the first reference frame and the motion vector of the current macroblock and the second reference frame is a zero motion vector, the current macroblock and the current macroblock It is determined whether a first corresponding macroblock of the corresponding first reference frame is invariable and whether the current macroblock and the second corresponding macroblock of the second reference frame corresponding to the current macroblock are invariant. Step (c); And (d) encoding the current macroblock by direct mode when the current macroblock is invariant compared to the first and second corresponding macroblocks. A fast inter mode decision method is provided.

상기 단계(b)의 모션 벡터는 다이렉트 모션 벡터이다. The motion vector of step (b) is a direct motion vector.

상기 단계(c)의 제1 대응 매크로 블록 및 제2 대응 매크로 블록은 제1 참조 프레임 및 제2 참조 프레임에서 상기 현재 매크로 블록과 동일 위치에 있는 매크로 블록이다. The first corresponding macro block and the second corresponding macro block of step (c) are macro blocks at the same position as the current macro block in the first reference frame and the second reference frame.

상기 단계 (c)에서 상기 현재 매크로 블록이 상기 제1 대응 매크로 블록 및 상기 제2 대응 매크로 블록과 비가변적인지 여부는 SAD(Sum of Absolute Difference) 방식을 이용하여 비가변적인지 여부를 판단한다. In step (c), it is determined whether the current macroblock is invariant with the first corresponding macroblock and the second corresponding macroblock by using a sum of absolute difference (SAD) scheme.

본 발명의 다른 측면에 따르면, 현재 프레임이 B-픽처인지 여부를 판단하는 단계(a); 상기 현재 프레임의 현재 매크로 블록의 다이렉트 모션 벡터 중 적어도 하나가 제로 모션 벡터인지 여부를 판단하는 단계(b); 상기 단계(b)의 조건을 만족할 경우 현재 매크로 블록과 참조 프레임의 대응 매크로 블록 사이의 비가변성을 판단하는 단계(c); 및 상기 현재 매크로 블록과 상기 대응 매크로 블록이 비가변적일 경우 다이렉트 모드에 의해 인코딩하는 단계(d)를 포함하는 H.264 인코딩 시 고속 인트라 모드 결정 방법이 제공된다. According to another aspect of the invention, determining whether the current frame is a B-picture (a); (B) determining whether at least one of the direct motion vectors of the current macro block of the current frame is a zero motion vector; (C) determining non-variability between the current macroblock and the corresponding macroblock of the reference frame when the condition of step (b) is satisfied; And encoding (d) by the direct mode when the current macro block and the corresponding macro block are non-variable.

본 발명은 잘못된 모드 선택 시 에러가 전파되지 않으면서 적은 연산량으로 인터 모드를 결정할 수 있는 장점이 있다. The present invention has the advantage that the inter mode can be determined with a small amount of calculation without error propagation when selecting the wrong mode.

이하에서, 첨부된 도면을 참조하여 본 발명에 의한 H.264 인코딩 시 고속 인터 모드 결정 방법의 바람직한 실시예를 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the fast inter mode determination method in H.264 encoding according to the present invention.

도 5는 본 발명의 따른 H.264 인코딩 시 고속 인터 모드 결정 방법의 전체적인 흐름을 도시한 순서도이다. 5 is a flowchart illustrating the overall flow of a method for determining a fast inter mode in H.264 encoding according to the present invention.

도 5를 참조하면, 우선 코딩하고자 하는 현재 프레임이 B 픽처인지 여부를 판단한다(단계 500). 본 발명은 H.264 코딩의 I-픽처, B-픽처 및 P-픽처 중 B-픽처에 대해 적용된다. 본 발명에서 제안하는 방식을 B-픽처에 제한하여 적용하는 것은 잘못된 모드 선택으로 인한 에러를 전파하지 않기 위함이다. B-픽처는 다른 프레임의 참조 프레임으로 사용되지 않기 때문에 에러가 전파되지 않는다. Referring to FIG. 5, it is first determined whether a current frame to be coded is a B picture (step 500). The present invention is applied to B-pictures among I-pictures, B-pictures, and P-pictures in H.264 coding. The reason why the method proposed in the present invention is limited to the B-picture is to not propagate an error due to wrong mode selection. The error is not propagated because the B-picture is not used as a reference frame of another frame.

코딩하고자 하는 현재 프레임이 B-픽처가 아닐 경우 일반적인 인터 모드 예측 과정을 수행하며(단계 508), 코딩하고자 하는 현재 프레임이 B-픽처일 경우 단계 502 이후의 고속 인터 모드 결정 방식이 수행된다. If the current frame to be coded is not a B-picture, a general inter mode prediction process is performed (step 508). If the current frame to be coded is a B-picture, a fast inter mode determination method after step 502 is performed.

코딩하고자 하는 현재 프레임이 B-픽처일 경우, 현재 코딩하고자 하는 매크로 블록과 제1 참조 프레임(List0) 및 제2 참조 프레임(List1)과의 모션 벡터 중 적어도 하나가 제로(Zero) 모션 벡터인지 여부를 판단한다(단계 502). If the current frame to be coded is a B-picture, at least one of a motion vector of the macro block to be currently coded and the first reference frame List0 and the second reference frame List1 is a zero motion vector. Determine (step 502).

B-픽처는 제1 참조 프레임(List0) 및 제2 참조 프레임(List1)의 두 개의 참조 프레임을 이용하여 코딩이 수행되며, 단계 502에서는 두 개의 참조 프레임과의 모션 벡터를 각각 획득한다. The B-picture is coded using two reference frames of the first reference frame List0 and the second reference frame List1, and in step 502, motion vectors with two reference frames are obtained.

두 개의 참조 프레임과의 모션 벡터 중 적어도 하나가 제로(Zero) 모션 벡터 일 경우 단계 504로 진행되며, 그렇지 않을 경우 일반적인 인터 모드 예측 방식이 수행된다(단계 508). If at least one of the motion vectors with the two reference frames is a zero motion vector, the process proceeds to step 504, otherwise a general inter mode prediction scheme is performed (step 508).

본 발명의 바람직한 실시예에 따르면, 단계 502에서 고려되는 제1 참조 프레임 및 제2 참조 프레임과의 모션 벡터는 다이렉트(Direct) 모션 벡터이다. 현재 매크로 블록과 제1 참조 프레임 및 제2 참조 프레임과의 다이렉트 모션 벡터는 이전에 코딩된 매크로 블록들의 모션 벡터를 이용하여 획득할 수 있는 바 단계 502의 판단을 위해 별도의 연산을 요하지는 않는다. According to a preferred embodiment of the present invention, the motion vector with the first reference frame and the second reference frame considered in step 502 is a direct motion vector. The direct motion vector of the current macro block and the first reference frame and the second reference frame does not require a separate operation for determining in step 502, which can be obtained using the motion vectors of previously coded macro blocks.

현재 매크로 블록과 제1 및 제2 참조 프레임과의 다이렉트 모션 벡터 중 적어도 하나가 제로 모션 벡터일 경우, 현재 매크로 블록과 제1 참조 프레임 및 제2 참조 프레임의 대응 매크로 블록이 비가변적(Stationary)인지 여부를 판단한다(단계 504). If at least one of the direct motion vectors of the current macro block and the first and second reference frames is a zero motion vector, whether the corresponding macro blocks of the current macro block and the first reference frame and the second reference frame are stationary. It is determined whether or not (step 504).

여기서 대응 매크로 블록은 현재 프레임의 현재 매크로 블록과 동일한 위치에 존재하는 참조 프레임의 매크로 블록을 의미한다. Here, the corresponding macro block means a macro block of the reference frame existing at the same position as the current macro block of the current frame.

도 6은 현재 매크로 블록과 대응 매크로 블록과의 관계를 도시한 도면이다. 6 is a diagram illustrating a relationship between a current macro block and a corresponding macro block.

도 6을 참조하면, 제1 대응 매크로 블록은 제1 참조 프레임(List0)에서 현재 매크로 블록과 동일한 위치의 매크로 블록이고, 제2 대응 매크로 블록은 제2 참조 프레임(List1)에서 현재 매크로 블록과 동일한 위치의 매크로 블록이다. Referring to FIG. 6, the first corresponding macro block is a macro block at the same position as the current macro block in the first reference frame List0, and the second corresponding macro block is the same as the current macro block in the second reference frame List1. Macro block of position.

제1 참조 프레임과 제2 참조 프레임의 대응 매크로 블록이 탐색되면, 현재 매크로 블록과 제1 대응 매크로 블록이 비가변적인지 여부 및 현재 매크로 블록과 제2 대응 매크로 블록이 비가변적인지 여부를 판단한다. When the corresponding macroblock of the first reference frame and the second reference frame is found, it is determined whether the current macroblock and the first corresponding macroblock are invariable and whether the current macroblock and the second corresponding macroblock are invariant.

현재 매크로 블록과 대응 매크로 블록이 비가변적인지 여부는 현재 매크로 블록과 대응 매크로 블록의 화소값이 실질적으로 동일한지 여부를 판단하는 것이다. Whether the current macroblock and the corresponding macroblock are invariant is to determine whether the pixel values of the current macroblock and the corresponding macroblock are substantially the same.

본 발명의 일 실시예에 따르면, 현재 매크로 블록과 탐색된 대응 매크로 블록이 비가변적인지 여부를 판단하기 위해 SAD(Sum of Absolute Difference) 방식이 이용될 수 있다. 즉, 현재 매크로 블록과 대응 매크로 블록의 화소 값의 차이를 더한 값이 미리 설정된 임계치 이하일 경우 현재 매크로 블록과 대응 매크로 블록이 비가변적이라고 판단하고, 그렇지 않을 경우 현재 매크로 블록과 대응 매크로 블록이 가변적이라고 판단한다. According to an embodiment of the present invention, a Sum of Absolute Difference (SAD) scheme may be used to determine whether the current macroblock and the searched corresponding macroblock are invariant. That is, if the difference between the pixel values of the current macroblock and the corresponding macroblock is less than or equal to a preset threshold, it is determined that the current macroblock and the corresponding macroblock are non-variable, otherwise the current macroblock and the corresponding macroblock are variable. To judge.

물론, 비가변적인지 여부의 판단이 SAD 방식에 한정되는 것은 아니며, 다양한 연산 방식이 사용될 수 있다는 점은 당업자에게 있어 자명할 것이다.Of course, the determination of whether or not invariant is not limited to the SAD method, it will be apparent to those skilled in the art that various calculation methods may be used.

제1 대응 매크로 블록 및 제2 대응 매크로 블록이 현재 매크로 블록과 비교하여 비가변적이지 않을 경우 일반적인 인터 모드 예측 과정이 수행된다(단계 508). If the first corresponding macro block and the second corresponding macro block are not invariant compared to the current macro block, a general inter mode prediction process is performed (step 508).

도 5에는 단계 502의 판단 과정 이후 단계 504의 판단 과정이 진행되는 것으로 도시되어 있으나, 판단 과정의 순서는 바뀌어도 무방하며, 단계 502의 조건 및 단계 504의 조건을 모두 만족할 경우 단계 506이 진행된다. In FIG. 5, the determination process of step 504 is performed after the determination process of step 502. However, the order of the determination process may be changed. If the conditions of step 502 and the conditions of step 504 are satisfied, step 506 is performed.

단계 502 및 단계 504의 조건을 모두 만족하면, 인터 모드에 존재하는 다양한 모드들을 생략하고 다이렉트 모드에 의해 인터 모드 코딩을 수행한다(단계 506). If both the conditions of step 502 and step 504 are satisfied, various modes existing in the inter mode are omitted and inter mode coding is performed by the direct mode (step 506).

다이렉트 모드는 디코더에서 공간적 기법과 시간적 기법 중 한가지 기법을 통해 모션 벡터를 유도할 수 있는 모드로써 참조 프레임 인덱스 및 모션 벡터와 같은 모션 정보를 필요로 하지 않기 때문에 비트율이 현저히 감소되는 장점이 있다. The direct mode is a mode in which a motion vector can be derived through one of a spatial technique and a temporal technique in a decoder, and the bit rate is significantly reduced because it does not require motion information such as a reference frame index and a motion vector.

공간적 다이렉트 모드는 코딩하려는 현재 매크로 블록의 주변 매크로 블록들로부터 제1 및 제2 참조 프레임 인덱스 및 모션 벡터를 공간적으로 예측하여 구하는 방식이고, 시간적 다이렉트 모드는 참조 프레임에 존재하는 대응 매크로 블록의 모션 벡터 정보를 이용하여 현재 코딩하려는 메크로 블록의 두 개의 다이렉트 모션 벡터를 구하는 방식이다.The spatial direct mode is a method of spatially predicting and obtaining a first and second reference frame index and a motion vector from neighboring macroblocks of a current macroblock to be coded, and the temporal direct mode is a motion vector of a corresponding macroblock present in a reference frame. By using the information, two direct motion vectors of the macro block to be currently coded are obtained.

즉, 본 발명은 상술한 두 가지 조건을 만족할 경우 다양한 인터 모드에 대해 일일이 코딩하여 율-왜곡 비용을 연산하지 않고 다이렉트 모드에 의한 코딩을 수행하는바 인터 모드 코딩에 소요되는 연산량을 크게 줄일 수 있는 장점이 있다. That is, the present invention performs coding by the direct mode without calculating the rate-distortion cost by coding the various inter modes one by one when the above two conditions are satisfied, which can greatly reduce the amount of computation required for inter mode coding. There is an advantage.

도 7은 일반적인 인터 모드 코딩과 본 발명이 적용될 경우의 PSNR 차이(PSNR), 비트 레이트 차이(Bits(%)) 및 소요 시간 차이(Time(%))를 나타낸 표이다. 7 is a table showing the PSNR difference (PSNR), the bit rate difference (Bits (%)) and the time difference (Time (%)) when general inter mode coding and the present invention are applied.

도 7은 영상의 사이즈가 176*144인 QCIF 규격의 영상에 대한 결과를 나타낸 것이며 세 개의 영상(영상 A, 영상 B)에 대해 실험을 한 결과이다. Figure 7 shows the results for the image of the QCIF standard of the image size of 176 * 144, the results of the experiment on three images (image A, image B).

20, 24, 28, 32, 34의 다양한 QP(Quantization Parameter) 조건에 대해 실험을 하였으며 영상이 IBP 구조인 경우와 IBBP 구조인 경우에 대해 각각 실험을 하였다. Experiments were conducted for various QP (Quantization Parameter) conditions of 20, 24, 28, 32, and 34. The experiments were performed for the case of the image having the IBP structure and the case of the IBBP structure.

도 7을 참조하면, 영상 A의 경우 IBP 구조일 때 59% 이상 코딩에 소요되는 시간이 절감되고 IBBP 구조일 때 71% 이상 소요 시간이 절감되는 것을 알 수 있다. 또한, 영상 B의 경우 IBP 구조일 때 51% 이상 소요 시간이 절감되고 IBBP 구조일 때 59% 이상 소요 시간이 절감되는 것을 확인할 수 있다. Referring to FIG. 7, it can be seen that the time required for coding over 59% when the IBP structure is reduced in the case of the image A and the time required for over 71% when the IBBP structure is reduced. In addition, in case of the image B, the time required for the IBP structure is reduced by 51% or more, and the time required for the IBBP structure is reduced by 59% or more.

이와 같은 코딩 시간의 절감에 비해 PSNR 및 비트 레이트의 변화는 크지 않은 것을 확인할 수 있다. 아울러, 본 발명이 B-픽처에 대해 적용되는 것인 바 IBBP 구조인 경우 더 많은 소요 시간을 절감할 수 있는 것을 확인할 수 있다. It can be seen that the change in PSNR and bit rate is not large compared to the reduction in coding time. In addition, it can be seen that the present invention is applied to the B-picture, and thus, the time required for the IBBP structure can be further reduced.

상기에서는 본 발명의 바람직한 일 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.  Although the above has been described with reference to a preferred embodiment of the present invention, those skilled in the art will be variously modified and modified within the scope of the present invention without departing from the spirit and scope of the present invention described in the claims below. It will be appreciated that it can be changed.

도 1은 일반적인 H.264 부호화기의 구성을 도시한 도면.1 is a diagram illustrating a configuration of a general H.264 encoder.

도 2는 H.264 인코딩을 위한 인터 모드의 매크로 블록 타입을 설명하기 위한 도면.2 is a diagram for explaining a macroblock type of an inter mode for H.264 encoding.

도 3 및 도 4는 H.264 인코딩을 위한 인트라 모드 매크로 블록의 서브 모드를 도시한 도면.3 and 4 illustrate a sub mode of an intra mode macro block for H.264 encoding.

도 5는 본 발명의 따른 H.264 인코딩 시 고속 인터 모드 결정 방법의 전체적인 흐름을 도시한 순서도.5 is a flowchart illustrating the overall flow of a method for determining a fast inter mode in H.264 encoding according to the present invention.

도 6은 현재 매크로 블록과 대응 매크로 블록과의 관계를 도시한 도면.6 is a diagram showing a relationship between a current macro block and a corresponding macro block.

도 7은 일반적인 인터 모드 코딩과 본 발명이 적용될 경우의 PSNR 차이(PSNR), 비트 레이트 차이(Bits(%)) 및 소요 시간 차이(Time(%))를 나타낸 표.7 is a table showing the PSNR difference (PSNR), the bit rate difference (Bits (%)) and the time difference (Time (%)) when general inter mode coding and the present invention are applied.

Claims (8)

H.264 인코딩 시 인터 모드 결정 방법에 있어서,In the method of determining the inter mode in H.264 encoding, 현재 프레임이 B-픽처인지 여부를 판단하는 단계(a);Determining whether the current frame is a B-picture (a); 상기 현재 프레임이 B-픽처일 경우, 현재 프레임의 현재 매크로 블록과 제1 참조 프레임과의 모션 벡터 및 상기 현재 매크로 블록과 제2 참조 프레임과의 모션 벡터 중 적어도 하나가 제로(Zero) 모션 벡터인지 여부를 판단하는 단계(b);If the current frame is a B-picture, at least one of a motion vector of the current macroblock and the first reference frame of the current frame and a motion vector of the current macroblock and the second reference frame is a zero motion vector. Determining whether or not (b); 상기 현재 매크로 블록과 제1 참조 프레임과의 모션 벡터 및 상기 현재 매크로 블록과 제2 참조 프레임과의 모션 벡터 중 적어도 하나가 제로(Zero) 모션 벡터일 경우, 상기 현재 매크로 블록과 상기 현재 매크로 블록과 대응되는 상기 제1 참조 프레임의 제1 대응 매크로 블록이 비가변적인지 여부 및 상기 현재 매크로 블록과 상기 현재 매크로 블록과 대응되는 상기 제2 참조 프레임의 제2 대응 매크로 블록이 비가변적인지 여부를 판단하는 단계(c); 및When at least one of the motion vector of the current macroblock and the first reference frame and the motion vector of the current macroblock and the second reference frame is a zero motion vector, the current macroblock and the current macroblock It is determined whether a first corresponding macroblock of the corresponding first reference frame is invariable and whether the current macroblock and the second corresponding macroblock of the second reference frame corresponding to the current macroblock are invariant. Step (c); And 상기 현재 매크로 블록이 상기 제1 대응 매크로 블록 및 상기 제2 대응 매크로 블록과 비교하여 비가변적일 경우 상기 현재 매크로 블록을 다이렉트 모드에 의해 인코딩하는 단계(d)를 포함하는 것을 특징으로 하는 H.264 인코딩 시 고속 인터 모드 결정 방법.And (d) encoding the current macroblock by direct mode when the current macroblock is invariant compared to the first and second corresponding macroblocks. How to determine fast inter mode in encoding. 제1항에 있어서,The method of claim 1, 상기 단계(b)의 모션 벡터는 다이렉트 모션 벡터인 것을 특징으로 하는 H.264 인코딩 시 고속 인트라 모드 결정 방법.The method of claim 1, wherein the motion vector of step (b) is a direct motion vector. 제1항에 있어서,The method of claim 1, 상기 단계(c)의 제1 대응 매크로 블록 및 제2 대응 매크로 블록은 제1 참조 프레임 및 제2 참조 프레임에서 상기 현재 매크로 블록과 동일 위치에 있는 매크로 블록인 것을 특징으로 하는 H.264 인코딩 시 고속 인트라 모드 결정 방법.The first corresponding macro block and the second corresponding macro block of the step (c) are macro blocks at the same position as the current macro block in the first reference frame and the second reference frame. How to determine intra mode. 제1항에 있어서,The method of claim 1, 상기 단계 (c)에서 상기 현재 매크로 블록이 상기 제1 대응 매크로 블록 및 상기 제2 대응 매크로 블록과 비가변적인지 여부는 SAD(Sum of Absolute Difference) 방식을 이용하여 비가변적인지 여부를 판단하는 것임을 특징으로 하는 H.264 인코딩 시 고속 인트라 모드 결정 방법.In the step (c), it is determined whether the current macroblock is invariant with the first corresponding macroblock and the second corresponding macroblock by using a Sum of Absolute Difference (SAD) method. Fast Intra Mode Determination Method in H.264 Encoding. 현재 프레임이 B-픽처인지 여부를 판단하는 단계(a);Determining whether the current frame is a B-picture (a); 상기 현재 프레임의 현재 매크로 블록의 다이렉트 모션 벡터 중 적어도 하나가 제로 모션 벡터인지 여부를 판단하는 단계(b);(B) determining whether at least one of the direct motion vectors of the current macro block of the current frame is a zero motion vector; 상기 단계(b)의 조건을 만족할 경우 현재 매크로 블록과 참조 프레임의 대응 매크로 블록 사이의 비가변성을 판단하는 단계(c); 및(C) determining non-variability between the current macroblock and the corresponding macroblock of the reference frame when the condition of step (b) is satisfied; And 상기 현재 매크로 블록과 상기 대응 매크로 블록이 비가변적일 경우 다이렉트 모드에 의해 인코딩하는 단계(d)를 포함하는 것을 특징으로 하는 H.264 인코딩 시 고속 인트라 모드 결정 방법.And encoding (d) by the direct mode when the current macroblock and the corresponding macroblock are non-variable. 제5항에 있어서,The method of claim 5, 상기 단계(b)의 현재 매크로 블록의 다이렉트 모션 벡터는 제1 참조 프레임과의 모션 벡터 및 제2 참조 프레임과의 다이렉트 모션 벡터를 포함하는 것을 특징으로 하는 H.264 인코딩 시 고속 인트라 모드 결정 방법.The direct motion vector of the current macro block of step (b) includes a motion vector with a first reference frame and a direct motion vector with a second reference frame. 제6항에 있어서,The method of claim 6, 상기 단계(c)는 상기 현재 매크로 블록과 상기 제1 참조 프레임의 제1 대응 매크로 블록과의 비가변성 및 상기 현재 매크로 블록과 상기 제2 참조 프레임의 제2 대응 매크로 블록과의 비가변성을 판단하는 것을 특징으로 하는 H.264 인코딩 시 고속 인트라 모드 결정 방법. In step (c), the non-variability of the current macroblock and the first corresponding macroblock of the first reference frame and the non-variability of the current macroblock and the second corresponding macroblock of the second reference frame are determined. Fast intra mode determination method for H.264 encoding, characterized in that. 제7항에 있어서,The method of claim 7, wherein 상기 단계(c)의 비가변적인지 여부는 SAD(Sum of Absolute Difference) 방식을 이용하여 판단하는 것을 특징으로 하는 H.264 인코딩 시 고속 인트라 모드 결정 방법. Whether or not the step (c) is invariant is determined using the Sum of Absolute Difference (SAD) method.
KR1020080076264A 2008-08-05 2008-08-05 Fast Inter Mode Decision Method in H.264 Encoding KR100986992B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080076264A KR100986992B1 (en) 2008-08-05 2008-08-05 Fast Inter Mode Decision Method in H.264 Encoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080076264A KR100986992B1 (en) 2008-08-05 2008-08-05 Fast Inter Mode Decision Method in H.264 Encoding

Publications (2)

Publication Number Publication Date
KR20100016689A true KR20100016689A (en) 2010-02-16
KR100986992B1 KR100986992B1 (en) 2010-10-11

Family

ID=42088528

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080076264A KR100986992B1 (en) 2008-08-05 2008-08-05 Fast Inter Mode Decision Method in H.264 Encoding

Country Status (1)

Country Link
KR (1) KR100986992B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051896A (en) * 2012-12-14 2013-04-17 华中科技大学 Mode skipping-based video frequency coding method and mode skipping-based video frequency coding system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4230289B2 (en) 2002-07-26 2009-02-25 パナソニック株式会社 Video encoding method and video decoding method
KR100901643B1 (en) * 2008-01-25 2009-06-09 엘지전자 주식회사 Method of determining motion vector
KR100901642B1 (en) * 2008-01-25 2009-06-09 엘지전자 주식회사 Method of determining motion vector

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051896A (en) * 2012-12-14 2013-04-17 华中科技大学 Mode skipping-based video frequency coding method and mode skipping-based video frequency coding system
CN103051896B (en) * 2012-12-14 2015-05-20 华中科技大学 Mode skipping-based video frequency coding method and mode skipping-based video frequency coding system

Also Published As

Publication number Publication date
KR100986992B1 (en) 2010-10-11

Similar Documents

Publication Publication Date Title
US9172973B2 (en) Method and system for motion estimation in a video encoder
US20060222074A1 (en) Method and system for motion estimation in a video encoder
JP2007329693A (en) Image encoding device and method
US20060239347A1 (en) Method and system for scene change detection in a video encoder
KR19990012726A (en) How to code video motion vector
JP2003309851A (en) Video data converter and video data converting method
KR20120140592A (en) Method and apparatus for reducing computational complexity of motion compensation and increasing coding efficiency
WO2021061746A1 (en) History-based motion vector prediction
US20070133689A1 (en) Low-cost motion estimation apparatus and method thereof
CN102572424A (en) Image processing apparatus, method and program
JP2010028220A (en) Motion vector detecting device, motion vector detecting method, image encoding device, and program
JP3866624B2 (en) Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus
US9270985B2 (en) Method and apparatus for selecting a coding mode
US20160127731A1 (en) Macroblock skip mode judgement method for encoder
CN113170176B (en) Video encoder, video decoder and corresponding methods
KR100986992B1 (en) Fast Inter Mode Decision Method in H.264 Encoding
Tu et al. Fast variable-size block motion estimation for efficient H. 264/AVC encoding
US10015490B1 (en) High efficiency video coding for video with interlaced and progressive content using lookahead
Yang et al. An unsymmetrical-cross multi-resolution motion search algorithm for MPEG4-AVC/H. 264 coding
Hsu et al. Fast reference frame selection method for motion estimation in JVT/H. 264
WO2015015404A2 (en) A method and system for determining intra mode decision in h.264 video coding
KR101021538B1 (en) Fast Intra Mode Decision Method in H.264 Encoding
KR101368732B1 (en) Apparatus for estimating motion for h.264/avc encoder with high performance and method thereof
KR100939280B1 (en) Video coding method using multiple reference frame and computer readable medium recording the method
Yoon et al. Hierarchical integer pixel and adaptive fractional pixel motion estimation

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

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20160105

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20171011

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20181005

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20191205

Year of fee payment: 10