KR100269427B1 - Method for generating address in a frame memory - Google Patents

Method for generating address in a frame memory Download PDF

Info

Publication number
KR100269427B1
KR100269427B1 KR1019970022374A KR19970022374A KR100269427B1 KR 100269427 B1 KR100269427 B1 KR 100269427B1 KR 1019970022374 A KR1019970022374 A KR 1019970022374A KR 19970022374 A KR19970022374 A KR 19970022374A KR 100269427 B1 KR100269427 B1 KR 100269427B1
Authority
KR
South Korea
Prior art keywords
macroblock
box
address
horizontal
ras
Prior art date
Application number
KR1019970022374A
Other languages
Korean (ko)
Other versions
KR19980086115A (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 KR1019970022374A priority Critical patent/KR100269427B1/en
Publication of KR19980086115A publication Critical patent/KR19980086115A/en
Application granted granted Critical
Publication of KR100269427B1 publication Critical patent/KR100269427B1/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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/43Hardware specially adapted for motion estimation or compensation
    • H04N19/433Hardware specially adapted for motion estimation or compensation characterised by techniques for memory access
    • 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

Abstract

PURPOSE: A method for generating addresses in a frame memory is provided to generate an RA(Row Address), a CA(Column Address) and a PA(Pel Address) in order to read a predicted macro block as the frame memory. CONSTITUTION: A frame offset address, namely, RA(Row Address)'11:10', is decided on the basis of a scheduling order of a frame memory(S101). A start address of a current MB(Macro Block) for compensating a motion, namely, a slice position, an MB position and a motion vector are inputted(S102). Scales of inputted variables are agreed with each other(S103). Position of a predicted MB is decided(S104). A linear address is generated, an RA'9:0' and a CA(Column Address)'7:5' are decided from the linear address(S105). A CA'4:0' and a PA(Pel Address)'2:0' are decided(S106). Whether the inputted MB is the last MB is decided(S107). If so, a process is completed.

Description

프레임 메모리에 있어서 어드레스 발생방법Address generation method in frame memory

본 발명은 움직임 보상장치용 프레임 메모리에 관한 것으로서, 특히 예측된 매크로블록을 프레임 메모리로 읽어오기 위해 행 어드레스(row address;RA), 열 어드레스(column address;CA) 및 화소 어드레스(pel address;PA)를 발생시키기 위한 어드레스 발생방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a frame memory for a motion compensation device, in particular a row address (RA), a column address (CA) and a pixel address (PA address) PA for reading a predicted macroblock into the frame memory. The present invention relates to an address generating method for generating < RTI ID = 0.0 >

MPEG(Moving Picture Experts Group)-2 표준안에 사용되는 움직임 보상기술은 매크로블록 단위로 시간적으로 인접한 두 화면간의 움직임을 추정하여 보상함으로써 시간적 중복성(temporal redundancy)을 줄이기 위한 것이다. 즉, 움직임 추정 및 보상과정에서는 인접한 영상과 현재 영상을 비교하여 물체의 움직임에 관한 정보인 움직임 벡터를 검출해 내고, 이 움직임 벡터를 이용하여 현재 영상을 예측해 낸다.The motion compensation technique used in the Moving Picture Experts Group (MPEG) -2 standard is to reduce temporal redundancy by estimating and compensating for motion between two adjacent temporal pictures in macroblock units. That is, in the motion estimation and compensation process, a neighboring image is compared with the current image to detect a motion vector, which is information about an object's motion, and the current image is predicted using the motion vector.

이러한 움직임 보상기술을 이용하는 MPEG-2 영상 복호화기(video encoder)에 있어서, P 픽쳐는 현재 영상에 대해서 이전 영상의 I 픽쳐 또는 P 픽쳐를 기준으로 하여 순방향 움직임 보상을 수행하고, B 픽쳐는 현재 영상에 대해서 이전 영상의 I 픽쳐 혹은 P 픽쳐, 및 다음 영상의 I 픽쳐 혹은 P 픽쳐를 기준으로 하여 순방향 움직임 보상, 역방향 움직임 보상 및 보간형 움직임 보상을 수행하여 얻은 움직임 보상 블록 중 최선의 것을 선택한다.In an MPEG-2 video encoder using such a motion compensation technique, the P picture performs forward motion compensation on the basis of the I picture or P picture of the previous picture with respect to the current picture, and the B picture performs the current picture. The best one is selected from among motion compensation blocks obtained by performing forward motion compensation, reverse motion compensation, and interpolated motion compensation based on the I picture or P picture of the previous picture and the I picture or P picture of the next picture.

프레임 메모리는 이와 같이 움직임 보상을 위한 참조영상인 이전 영상의 I 픽쳐 혹은 P 픽쳐, 및 다음 영상의 I 픽쳐 혹은 P 픽쳐를 저장하기 위하여 사용된다. 또한, 프레임 메모리는 MPEG-2 영상 복호화기에 있어서 복호화 순서와 디스플레이 순서가 서로 다른 관계로, 복호화가 완료된 픽쳐를 일시적으로 저장한 다음 디스플레이 순서에 맞게 독출하기 위하여 사용된다.The frame memory is used to store the I picture or P picture of the previous picture and the I picture or P picture of the next picture as the reference picture for motion compensation. In addition, the frame memory is used to temporarily store the decoded picture and read out the display order in a MPEG-2 video decoder because the decoding order and the display order are different from each other.

그러나, 상기한 바와 같은 프레임 메모리는 I 픽쳐와 P 픽쳐 혹은 P 픽쳐와 P 픽쳐간의 거리(M)에 따라 적어도 3 프레임 분의 영상 데이타를 저장할 수 있는 용량을 가져야 하므로 그 가격이 비싸고, 따라서 전체 영상 복호화기의 가격을 상승시키는 요인이 될 뿐 아니라, 복호화 완료 이후 디스플레이까지의 지연시간이 증가하는 문제점이 있었다.However, the frame memory as described above must have a capacity to store at least three frames of image data according to the I picture and the P picture or the distance M between the P picture and the P picture, and thus the price thereof is expensive, and therefore, the entire picture. In addition to raising the price of the decoder, there is a problem that the delay time from the completion of decoding to the display increases.

따라서 본 발명의 목적은 상술한 문제점을 해결하기 위하여, 움직임 보상시 참조 영상 데이터를 저장하는 영역, 디스플레이를 위해 복호화가 완료된 영상 데이터를 저장하는 영역 및 영상 복호화기로 입력되는 부호화된 비트스트림을 저장하는 영역이 하나의 메모리 모듈 상에 구현된 프레임 메모리에 있어서, 움직임 벡터에 의해 예측된 매크로블록이 위치하는 RAS(Row Address Strobe) 박스 위치, 해당 RAS 박스에서의 매크로블록 위치, 해당 매크로블록에서의 블록 위치, 해당 블록에서의 박스 위치, 및 해당 박스에서의 화소 위치에 대한 어드레스를 발생시키기 위한 어드레스 발생방법을 제공하는데 있다.Accordingly, an object of the present invention is to solve the above-mentioned problems, in order to solve the above-mentioned problems, an area for storing reference image data when compensating for motion, an area for storing decoded image data for display, and a coded bitstream input to an image decoder. In a frame memory in which an area is implemented on one memory module, a location of a low address strobe (RAS) box where a macroblock predicted by a motion vector is located, a macroblock location in a corresponding RAS box, and a block in the corresponding macroblock An address generating method for generating an address for a position, a box position in a corresponding block, and a pixel position in a corresponding box is provided.

상기 목적을 달성하기 위하여 본 발명에 따른 어드레스 발생방법은 1 프레임은 복수개의 RAS 박스로 이루어지며, 상기 RAS 박스는 8 매크로블록 * 1 매크로블록 포맷을 가지며, 상기 매크로블록은 휘도 블록에 대하여 2 블록 * 2 블록 포맷을 가지며, 상기 블록은 1 박스 * 8 박스 포맷을 가지며, 상기 박스는 8 화소 * 1 화소 포맷을 가지는 경우, 제1 내지 제4프레임 저장영역으로 이루어지는 프레임 메모리와, 움직임 보상하고자 하는 픽쳐의 현재 매크로블록의 시작 어드레스, 수평 및 수직 움직임 벡터와 각종 파라미터들을 입력으로 하여 예측된 매크로블록을 읽어내기 위한 어드레스 및 각종 제어신호들을 상기 프레임 메모리로 공급하는 메모리 제어부를 구비하는 움직임 보상장치에 있어서,In order to achieve the above object, the address generation method according to the present invention includes one frame consisting of a plurality of RAS boxes, the RAS box has an 8 macroblock * 1 macroblock format, and the macroblock has 2 blocks for a luminance block. 2 block formats, the block has a 1 box * 8 box format, and the box has a format of 8 pixels * 1 pixels, the frame memory consisting of the first to fourth frame storage area, and the motion compensation A motion control device comprising a memory controller for supplying a start address of a current macroblock of a picture, a horizontal and vertical motion vector and various parameters as inputs, an address for reading a predicted macroblock, and various control signals to the frame memory; In

상기 수평 및 수직 움직임 벡터를 매크로블록 스케일로 조정하는 단계;Adjusting the horizontal and vertical motion vectors to a macroblock scale;

상기 프레임 메모리의 스케쥴링 순서에 의거하여, 움직임 보상시 참조하고자 하는 픽쳐가 위치하는 저장영역을 나타내는 제1행 어드레스를 생성하는 단계;Generating a first row address indicating a storage area in which a picture to be referred to for motion compensation is located based on a scheduling order of the frame memory;

상기 현재 매크로블록의 시작 어드레스와 매크로블록 스케일로 조정된 상기 수평 및 수직 움직임 벡터를 이용하여, 상기 예측된 매크로블록의 수평 및 수직위치를 결정하는 단계;Determining horizontal and vertical positions of the predicted macroblock using the horizontal and vertical motion vectors adjusted to the start address of the current macroblock and the macroblock scale;

상기 예측된 매크로블록의 수평위치와 수직위치를 이용하여, 해당 저장영역에서의 RAS 박스 위치를 나타내는 제2행 어드레스와, 해당 RAS 박스에서의 매크로블록 위치를 나타내는 제1열 어드레스를 생성하는 단계; 및Generating a second row address indicating a RAS box position in a corresponding storage area and a first column address indicating a macroblock position in a corresponding RAS box by using the predicted horizontal and vertical positions of the macroblock; And

상기 수평 및 수직 움직임벡터에 있어서 반화소 플래그를 제외한 하위쪽 4비트씩을 이용하여, 해당 매크로블록에서의 블록 위치를 나타내는 제2열 어드레스, 해당 블록에서의 박스 위치를 나타내는 제3열 어드레스와, 해당 박스에서의 화소 위치를 나타내는 화소 어드레스를 생성하는 단계를 포함하여 구성되는 것을 특징으로 한다.A second column address indicating a block position in the macroblock, a third column address indicating a box position in the corresponding block, using the lower four bits of the horizontal and vertical motion vectors except for the half pixel flag; And generating a pixel address indicating a pixel position in the box.

상기 목적을 달성하기 위하여 본 발명에 따른 어드레스 발생방법은 1 프레임은 복수개의 RAS 박스로 이루어지며, 상기 RAS 박스는 4 매크로블록 * 2 매크로블록 포맷을 가지며, 상기 매크로블록은 휘도 블록에 대하여 2 블록 * 2 블록 포맷을 가지며, 상기 블록은 2 박스 * 4 박스 포맷을 가지며, 상기 박스는 4 화소 * 2 화소 포맷을 가지는 경우, 제1 내지 제4프레임 저장영역으로 이루어지는 프레임 메모리와, 움직임 보상하고자 하는 픽쳐의 현재 매크로블록의 시작 어드레스, 수평 및 수직 움직임 벡터와 각종 파라미터들을 입력으로 하여 예측된 매크로블록을 읽어내기 위한 어드레스 및 각종 제어신호들을 상기 프레임 메모리로 공급하는 메모리 제어부를 구비하는 움직임 보상장치에 있어서,In order to achieve the above object, the address generation method according to the present invention comprises one frame consisting of a plurality of RAS boxes, the RAS box has a format of 4 macroblocks * 2 macroblocks, and the macroblocks have 2 blocks for luminance blocks. * 2 block format, the block has a 2 box * 4 box format, the box has a 4 pixel * 2 pixel format, the frame memory consisting of the first to fourth frame storage area, and the motion compensation A motion control device comprising a memory controller for supplying a start address of a current macroblock of a picture, a horizontal and vertical motion vector and various parameters as inputs, an address for reading a predicted macroblock, and various control signals to the frame memory; In

상기 수평 및 수직 움직임 벡터를 매크로블록 스케일로 조정하는 단계;Adjusting the horizontal and vertical motion vectors to a macroblock scale;

상기 프레임 메모리의 스케쥴링 순서에 의거하여, 움직임 보상시 참조하고자 하는 픽쳐가 위치하는 저장영역을 나타내는 제1행 어드레스를 생성하는 단계;Generating a first row address indicating a storage area in which a picture to be referred to for motion compensation is located based on a scheduling order of the frame memory;

상기 현재 매크로블록의 시작 어드레스와 매크로블록 스케일로 조정된 상기 수평 및 수직 움직임 벡터를 이용하여, 상기 예측된 매크로블록의 수평 및 수직위치를 결정하는 단계;Determining horizontal and vertical positions of the predicted macroblock using the horizontal and vertical motion vectors adjusted to the start address of the current macroblock and the macroblock scale;

상기 예측된 매크로블록의 수평위치와 수직위치를 각각 4와 2로 나눈 몫을 이용하여, 해당 저장영역에서의 RAS 박스 위치를 나타내는 제2행 어드레스를 생성하는 단계;Generating a second row address representing a RAS box position in a corresponding storage area by using a quotient obtained by dividing the predicted macroblock's horizontal position and vertical position by 4 and 2, respectively;

상기 예측된 매크로블록의 수평위치와 수직위치를 각각 4와 2로 나눈 나머지를 이용하여, 해당 RAS 박스에서의 매크로블록 위치를 나타내는 제1열 어드레스를 생성하는 단계; 및Generating a first column address indicating a macroblock position in a corresponding RAS box using the remainder obtained by dividing the predicted macroblock's horizontal and vertical positions by 4 and 2, respectively; And

상기 수평 및 수직 움직임벡터에 있어서 반화소 플래그를 제외한 하위쪽 4비트씩을 이용하여, 해당 매크로블록에서의 블록 위치를 나타내는 제2열 어드레스, 해당 블록에서의 박스 위치를 나타내는 제3열 어드레스와, 해당 박스에서의 화소 위치를 나타내는 화소 어드레스를 생성하는 단계를 포함하여 구성되는 것을 특징으로 한다.A second column address indicating a block position in the macroblock, a third column address indicating a box position in the corresponding block, using the lower four bits of the horizontal and vertical motion vectors except for the half pixel flag; And generating a pixel address indicating a pixel position in the box.

도 1은 본 발명에서 채택한 프레임 메모리의 구조를 나타낸 도면,1 is a diagram showing the structure of a frame memory adopted in the present invention;

도 2는 도 1에 도시된 프레임 메모리의 스케쥴링 순서를 나타낸 도면,2 is a diagram illustrating a scheduling order of the frame memory shown in FIG. 1;

도 3은 도 1에 도시된 프레임 메모리에 있어서 1 프레임에 대한 RAS 박스 설정방법의 제 1 예를 나타낸 도면,3 is a diagram illustrating a first example of a method for setting a RAS box for one frame in the frame memory shown in FIG. 1;

도 4는 도 3에 도시된 RAS 박스에 있어서 매크로블록 구조의 예를 나타낸 도면,4 is a view showing an example of a macroblock structure in the RAS box shown in FIG.

도 5는 본 발명에 의한 어드레스 발생방법의 제1실시예를 설명하는 흐름도,5 is a flowchart for explaining a first embodiment of an address generating method according to the present invention;

도 6a 및 도 6b는 각각 수평방향 움직임 벡터와 수직방향 움직임 벡터의 구성을 나타낸 도면,6A and 6B are views illustrating the configuration of a horizontal motion vector and a vertical motion vector, respectively;

도 7은 선형 어드레스의 구성을 나타내는 도면,7 is a diagram illustrating a configuration of a linear address;

도 8는 도 1에 도시된 프레임 메모리에 있어서 1 프레임에 대한 RAS 박스 설정방법의 제 2 예를 나타낸 도면,FIG. 8 is a diagram illustrating a second example of a method for setting a RAS box for one frame in the frame memory shown in FIG. 1;

도 9은 도 8에 도시된 RAS 박스에 있어서 매크로블록 구조의 예를 나타낸 도면,9 is a diagram illustrating an example of a macroblock structure in the RAS box shown in FIG. 8;

도 10은 본 발명에 의한 어드레스 발생방법의 제2실시예를 설명하는 흐름도,10 is a flowchart for explaining a second embodiment of the address generation method according to the present invention;

도 11은 도 5 및 도 10에 도시된 어드레스 발생방법이 실행되는 장치를 나타낸 블록도이다.FIG. 11 is a block diagram illustrating an apparatus in which the address generation method illustrated in FIGS. 5 and 10 is executed.

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

100 : 프레임 메모리 200 : 메모리 제어부100: frame memory 200: memory control unit

100-1~100-4 : 제1 내지 제4프레임 저장영역100-1 to 100-4: First to fourth frame storage areas

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 일실시예에 대해 상세히 설명하기로 한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the present invention.

도 1은 본 발명에서 채택한 프레임 메모리의 구조를 나타낸 것으로서, 프레임 메모리(100)는 복원된 영상 데이터 쓰기 동작, 움직임 보상을 위한 데이터 읽기 동작, 디스플레이를 위한 데이터 읽기 동작이 메모리 제어부(미도시)에 의해 제어되며, 버스트 길이(burst length)가 8인 SDRAM(Synchronous-DRAM)을 예로 들기로 한다. 프레임 메모리(100)는 뱅크 1과 뱅크 2의 두 개의 메모리 뱅크를 가지며, 뱅크 1에는 제1 및 제2프레임 저장영역(100-1,100-2)이 있고, 뱅크 2에는 제3 및 제4프레임 저장영역(100-3,100-4)이 있다. 여기서, 제1 내지 제4프레임 저장영역(100-1,100-2,100-3,100-4)은 각각 1 프레임 분량의 화소 데이터를 저장할 수 있는 용량을 가지며, 제1 내지 제4프레임 저장영역(100-1,100-2,100-3,100-4)은 각각 1,024 개의 행 어드레스(row address)를 가지고, 256워드(여기서, 1워드는 8비트)의 열 어드레스(column address)를 가진다. 그리고, 하나의 어드레스에는 8개의 Y 화소, 2개의 Cr 화소 및 2 개의 Cb 화소, 총 12 화소 데이터가 저장된다. 여기서, 1,024 개의 행 어드레스는 RAS 박스의 번호를 의미한다. 그리고, 256워드의 열 어드레스는 하나의 RAS 박스당 8개의 매크로블록*한개의 매크로블록당 32개의 화소(=256 화소)에 의해 나온 것이다.1 illustrates a structure of a frame memory adopted in the present invention, in which the frame memory 100 includes a restored image data write operation, a data read operation for motion compensation, and a data read operation for display to a memory controller (not shown). Synchronous-DRAM (SDRAM) controlled by a burst length of 8 will be taken as an example. The frame memory 100 has two memory banks, bank 1 and bank 2, bank 1 has first and second frame storage areas 100-1 and 100-2, and bank 2 stores third and fourth frames. There are regions 100-3 and 100-4. Here, the first to fourth frame storage areas 100-1, 100-2, 100-3, and 100-4 have a capacity for storing pixel data of one frame, respectively, and the first to fourth frame storage areas 100-1, 100-. 2,100-3 and 100-4 each have 1,024 row addresses, and have a column address of 256 words (where 1 word is 8 bits). One address stores eight Y pixels, two Cr pixels, two Cb pixels, and a total of 12 pixel data. Here, 1,024 row addresses mean the number of RAS boxes. The column address of 256 words is derived by 8 macroblocks per one RAS box * 32 pixels per macroblock (= 256 pixels).

한편, 프레임 메모리(100)의 실제 물리적인 행 어드레스(physical row address)는 제1 내지 제4프레임 저장영역(100-1~100-4)에 대하여 각각 000H~ 3FFH, 400H~ 7FFH, 800H~ BFFH, C00H~ FFFH로 할당된다. 그러나, 제1 내지 제4프레임 저장영역(100-1~100-4)은 각각 독립적으로 존재하며, 제1프레임 저장영역(100-1)의 소정 행 어드레스에 위치한 매크로블록에 대응하는 제2 및 제3프레임 저장영역(100-2,100-3)의 매크로블록은 동일한 행 어드레스를 가진다. 이와 같이, 제1 내지 제3프레임 저장영역(100-1~100-3) 내에서의 행 어드레스를 가상적인 행 어드레스(virtual row address)라 한다. 그리고, 움직임 보상시 도 2에 도시된 바와 같은 프레임 메모리(100)의 스케쥴링 순서에 의거하여, 참조 영상이 위치한 해당 저장영역에서의 가상적인 행 어드레스를 물리적인 행 어드레스로 변환시키는데 사용되는 어드레스를 프레임 옵셋 어드레스(frame offset address)라 하며, RA[11:10]라 둔다. 즉, RA[11:10]이 '00'이면 제1프레임 저장영역(100-1), '01'이면 제2프레임 저장영역(100-2), '10'이면 제3프레임 저장영역(100-3), '11'이면 제4프레임 저장영역(100-4)을 각각 나타낸다.The actual physical row address of the frame memory 100 is 000 H to 3FF H , 400 H to 7FF H for the first to fourth frame storage areas 100-1 to 100-4, respectively. , 800 H to BFF H and C00 H to FFF H. However, the first to fourth frame storage regions 100-1 to 100-4 exist independently, and the second and fourth frames corresponding to the macroblocks located at predetermined row addresses of the first frame storage region 100-1 are respectively provided. The macroblocks of the third frame storage areas 100-2 and 100-3 have the same row address. As such, the row address in the first to third frame storage areas 100-1 to 100-3 is referred to as a virtual row address. Then, based on the scheduling order of the frame memory 100 as shown in FIG. 2 during motion compensation, an address used to convert a virtual row address in a corresponding storage area in which a reference image is located into a physical row address is framed. It is called the frame offset address and is called RA [11:10]. That is, if RA [11:10] is '00', the first frame storage area 100-1, if '01', the second frame storage area 100-2, and if the '10', the third frame storage area 100 -3) and '11' indicate the fourth frame storage areas 100-4, respectively.

여기서, 제1 및 제2프레임 저장영역(100-1,100-2)은 복원된 I 픽쳐 혹은 움직임 보상된 P 픽쳐 영상 데이터를 움직임 보상을 위한 기준 영상으로 사용하는 것과 동시에 디스플레이하기 위하여 저장하는데 사용되고, 제3프레임 저장영역(100-3)은 움직임 보상된 B 픽쳐 영상 데이터를 디스플레이하기 위하여 저장하는데 사용되고, 제4프레임 저장영역(100-4)은 영상 복호화기로 입력되는 부호화된 비트스트림을 소정의 비트 단위로 저장하는데 사용된다.Here, the first and second frame storage areas 100-1 and 100-2 are used to store reconstructed I-picture or motion-compensated P-picture image data for use as a reference image for motion compensation and simultaneously for display. The three-frame storage area 100-3 is used to store the motion compensated B-picture image data, and the fourth frame storage area 100-4 stores the encoded bitstream input to the image decoder in units of predetermined bits. Used to save.

도 2는 도 1에 도시된 프레임 메모리(100)의 스케쥴링 순서를 나타낸 것으로서, 복호화 순서가 I,P,B,B,P,B,B,P,B,B,P,B,B,I,P,B,B,... 이고, 디스플레이 순서가 I,B,B,P,B,B,P,B,B,P,B,B,P,I,B,B,... 이고, 디스플레이 잠복기(display latency)가 2 픽쳐인 경우를 예로 든 것이다. 여기서, 밑줄이 그어져 있는 부분이 현재 복호화되고 있는 픽쳐를 나타내고, 화살표는 움직임 보상을 위해 참조되는 픽쳐를 나타내고, 'D'가 부가되어 있는 저장영역은 디스플레이를 위해 영상 데이터가 독출되고 있음을 나타낸다.FIG. 2 shows a scheduling order of the frame memory 100 shown in FIG. 1, and the decoding order is I, P, B, B, P, B, B, P, B, B, P, B, B, I. , P, B, B, ... and the display order is I, B, B, P, B, B, P, B, B, P, B, B, P, I, B, B, ... For example, the display latency is 2 pictures. Here, the underlined portion indicates the picture currently being decoded, the arrow indicates the picture to be referred for motion compensation, and the storage area to which 'D' is added indicates that image data is being read out for display.

도 3은 도 1에 도시된 프레임 메모리(100)에 있어서 1 프레임에 대한 RAS 박스 설정방법의 제 1 예를 나타낸 것으로서, 예를 들어 1 프레임이 1,920 화소*1,088 화소로 이루어지는 경우, 15 개 RAS 박스*68 개 RAS 박스, 총 1,020 개의 RAS(Row Address Strobe) 박스로 분할된다. 즉, RAS 박스의 번호가 프레임 메모리(100)의 행 어드레스(row address:RA)가 된다. 여기서, 하나의 RAS 박스는 8 개 매크로블록*1개 매크로블록, 총 8 개의 매크로블록(MB0~MB7)으로 이루어진다. 그리고, 각 매크로블록은 휘도(Y) 블록을 예로 들 경우, 4개의 블록(b0~b3)로 나누어진다.FIG. 3 illustrates a first example of a method for setting a RAS box for one frame in the frame memory 100 shown in FIG. 1. For example, when one frame includes 1,920 pixels * 1,088 pixels, 15 RAS boxes are illustrated. * 68 RAS boxes, divided into 1,020 RAS (Row Address Strobe) boxes. That is, the number of the RAS box is the row address (RA) of the frame memory 100. Here, one RAS box is composed of eight macroblocks * 1 macroblocks and a total of eight macroblocks MB0 to MB7. Each macroblock is divided into four blocks b0 to b3 when the luminance Y block is taken as an example.

도 4는 도 3에 도시된 RAS 박스에 있어서 매크로블록 구조의 예를 나타낸 것으로서, 4개의 휘도(Y) 블록, 1개의 색차(Cr) 블록 및 1개의 색차(Cb) 블록으로 구성되고, 4개의 휘도(Y) 블록은 각각 8개의 박스(b0-0~b0-7, b1-0~b1-7, b2-0~b2-7, b3-0~b3-7)로 구성되고, 2개의 색차(Cr,Cb) 블록은 각각 8개의 서브 박스(sb0-0~sb0-7, sb1-0~sb1-7, sb2-0~sb2-7, sb3-0~sb3-7)로 구성된다. 그리고, Y 블록을 구성하는 각 박스에는 8*1 포맷의 8개의 화소 데이터, Cr 블록을 구성하는 각 박스에는 2*1 포맷의 2개의 화소 데이터, Cb 블록을 구성하는 각 박스에는 2*1 포맷의 2개의 화소 데이터가 존재한다.FIG. 4 shows an example of a macroblock structure in the RAS box shown in FIG. 3, and includes four luminance (Y) blocks, one color difference (Cr) block, and one color difference (Cb) block. The luminance (Y) block consists of eight boxes (b0-0 to b0-7, b1-0 to b1-7, b2-0 to b2-7, and b3-0 to b3-7), respectively, and two color differences. The (Cr, Cb) block is composed of eight sub boxes (sb0-0 to sb0-7, sb1-0 to sb1-7, sb2-0 to sb2-7, sb3-0 to sb3-7), respectively. Then, 8 pixel data in 8 * 1 format for each box constituting the Y block, 2 pixel data in 2 * 1 format for each box constituting the Cr block, and 2 * 1 format for each box constituting the Cb block. There are two pixel data of.

도 5는 본 발명에 의한 어드레스 발생방법의 제1실시예를 설명하는 흐름도로서, 이는 도 3 및 도 4에 도시된 프레임 구조에 적용되는 것이다.5 is a flowchart illustrating a first embodiment of the address generation method according to the present invention, which is applied to the frame structure shown in FIGS. 3 and 4.

도 5를 참조하면, 제101단계(S101)에서는 도 2에 도시된 바와 같은 프레임 메모리(100)의 스케쥴링 순서에 의거하여 프레임 옵셋 어드레스(frame offset address) 즉, RA[11:10]을 결정한다. 예를 들어, 도 2의 (b) 단계에서와 같이 제2프레임 저장영역(100-2)에 저장된 B 픽쳐에 대하여 제1프레임 저장영역(100-1)에 저장된 I 픽쳐를 참조하여 움직임 보상을 수행하는 경우에는 RA[11:10]이 '00'이 된다.Referring to FIG. 5, in operation 101, a frame offset address, that is, RA [11:10] is determined based on a scheduling order of the frame memory 100 as illustrated in FIG. 2. . For example, as in step (b) of FIG. 2, motion compensation may be performed by referring to an I picture stored in the first frame storage area 100-1 with respect to a B picture stored in the second frame storage area 100-2. In case of execution, RA [11:10] becomes '00'.

제102단계(S102)에서는 움직임 보상하고자 하는 현재 매크로블록(MB)의 시작 어드레스, 즉 슬라이스 위치(slice_position) 및 매크로블록 위치(mb_position)와, 움직임 벡터(mv_v, mv_h)를 입력한다.In step 102 (S102), the start address of the current macroblock MB to be motion compensated, that is, the slice position and the macroblock position mb_position, and the motion vectors mv_v and mv_h are input.

제103단계(S103)에서는 S102 에서 입력된 변수들의 스케일을 일치시킨다. 입력 변수 중, 슬라이스 위치(slice_position)와 매크로블록 위치(mb_position)는 각각 7 비트로 이루어지며 매크로블록 스케일을 가지는 반면, 움직임 벡터는 반화소 스케일을 가진다. 수평방향의 움직임 벡터(mv_h[12:0])와 수직방향의 움직임 벡터(mv_v[8:0])는 각각 도 6a 및 도 6b에 도시된 바와 같은 구성을 가진다. 따라서, 움직임 벡터를 매크로블록 스케일로 맞추기 위하여 16으로 나누어, 즉 mv_h[11:5]와 mv_v[7:5]를 취하여 각각 'mv_h_mb'와 'mv_v_mb'로 둔다.In step 103, the scales of the variables input in step S102 are matched. Among the input variables, the slice position (slice_position) and the macroblock position (mb_position) each consist of 7 bits and have a macroblock scale, while the motion vector has a half pixel scale. The horizontal motion vector mv_h [12: 0] and the vertical motion vector mv_v [8: 0] have configurations as shown in FIGS. 6A and 6B, respectively. Therefore, in order to fit the motion vector on the macroblock scale, it is divided by 16, that is, mv_h [11: 5] and mv_v [7: 5] are taken and set as 'mv_h_mb' and 'mv_v_mb', respectively.

제104단계(S104)에서는 수평, 수직 좌표계의 선형변환을 다음 수학식 1과 같이 수행하여, 예측된 매크로블록의 위치(predict_MB_v, predict_MB_h)를 결정한다.In step 104, a linear transformation of the horizontal and vertical coordinate systems is performed as in Equation 1 below to determine the predicted macroblock position (predict_MB_v, predict_MB_h).

[수학식1][Equation 1]

slice_position ± mv_v_mb = predict_MB_vslice_position ± mv_v_mb = predict_MB_v

mb_position ± mv_h_mb = predict_MB_hmb_position ± mv_h_mb = predict_MB_h

여기서, 'predict_MB_h'는 예측된 매크로블록의 수평위치, 'predict_MB_v'는 예측된 매크로블록의 수직위치를 각각 나타낸다.Here, 'predict_MB_h' indicates a horizontal position of the predicted macroblock, and 'predict_MB_v' indicates a vertical position of the predicted macroblock.

제105단계(S105)에서는 다음 수학식 2에 의해 1 프레임 내에서 매크로블록의 위치를 가리키는 선형 어드레스(linear address;LA)를 생성하고, 선형 어드레스로 부터 RA[9:0]와 CA[7:5]를 결정한다.In step 105, a linear address (LA) indicating a macroblock position within one frame is generated by the following equation (2), and RA [9: 0] and CA [7: 5].

[수학식2][Equation 2]

LA = predict_MB_v * 120 + predict_MB_hLA = predict_MB_v * 120 + predict_MB_h

여기서, 1 프레임(1920 화소 * 1088 화소)에 있어서 수평방향으로 120 개의 매크로블록이 존재하므로 'predict_MB_v'에 120 을 곱해 준다. 'predict_MB_v'가 7 비트이고, '120'이 7 비트이고, 'predict_MB_h'가 7 비트이므로 수학식 2의 연산 결과는 14 비트가 되며, 도 7과 같은 구성을 가진다. 즉, 도 7에 있어서, LA[12:3]은 S101 에서 결정한 RA[11:10]가 가리키는 저장영역에서의 RAS 박스의 위치를 나타내는 RA[9:0]가 되고, LA[2:0]는 해당 RAS 박스에서의 매크로블록의 위치를 나타내는 CA[7:5]가 된다.Here, since there are 120 macroblocks in the horizontal direction in one frame (1920 pixels * 1088 pixels), 'predict_MB_v' is multiplied by 120. Since 'predict_MB_v' is 7 bits, '120' is 7 bits, and 'predict_MB_h' is 7 bits, the calculation result of Equation 2 is 14 bits and has the configuration as shown in FIG. That is, in FIG. 7, LA [12: 3] becomes RA [9: 0] indicating the position of the RAS box in the storage area indicated by RA [11:10] determined in S101, and LA [2: 0] Becomes CA [7: 5] indicating the position of the macroblock in the RAS box.

제106단계(S106)에서는 다음 수학식 3에 의해 CA[4:0]와 PA[2:0]을 결정한다.In step 106 (S106), CA [4: 0] and PA [2: 0] are determined by the following equation (3).

[수학식3][Equation 3]

MA = mv_h[4:1] * mv_v[4:1] ⇒ MA[7:0]MA = mv_h [4: 1] * mv_v [4: 1] ⇒ MA [7: 0]

즉, 도 6a 및 도 6b에 도시된 수평 및 수직방향의 움직임 벡터(mv_h, mv_v)에서 각각 하위쪽 4비트씩을 취하여 매크로블록내의 블록 위치, 블록내의 박스 위치, 및 박스내의 화소 위치를 결정한다. MA[7:0]에서, MA[7:6]이 매크로블록내의 블록 위치를 나타내는 CA[4:3]이 되고, MA[5:3]이 블록내의 박스 위치를 나타내는 CA[2:0]이 되고, MA[2:0]이 박스내의 화소 위치를 나타내는 PA[2:0]이 된다. 여기서, PA[2:0]는 예측된 매크로블록의 기준 포인트(reference point:R.P)를 결정하는데 사용된다.That is, the lower four bits are taken from the horizontal and vertical motion vectors mv_h and mv_v shown in Figs. 6A and 6B, respectively, to determine the block position in the macroblock, the box position in the block, and the pixel position in the box. In MA [7: 0], MA [7: 6] becomes CA [4: 3], which indicates the block position in the macroblock, and MA [5: 3] represents CA [2: 0], which indicates the box position in the block. MA [2: 0] becomes PA [2: 0] indicating the pixel position in the box. Here, PA [2: 0] is used to determine the reference point (R.P) of the predicted macroblock.

제107단계(S107)에서는 S102 에서 입력된 현재 매크로블록이 움직임 보상하고자 하는 픽쳐에 있어서 마지막 매크로블록인지를 판단하여, 마지막 매크로블록인 경우 본 흐름도를 종료하고, 그렇지 않은 경우 S102 로 복귀한다.In a step S107, it is determined whether the current macroblock inputted in S102 is the last macroblock in the picture to be motion compensated, and if the last macroblock is the end of the flowchart, the flow returns to S102.

상기 제 1 실시예에 의한 어드레스 발생방법에 있어서, S101, S105 와 S106 은 순차적으로 수행하거나, 병렬로 수행함으로서 어드레스 발생시간을 줄일 수 있다.In the address generation method according to the first embodiment, S101, S105 and S106 are performed sequentially or in parallel to reduce the address generation time.

도 8은 도 1에 도시된 프레임 메모리(100)에 있어서 1 프레임에 대한 RAS 박스 설정방법의 제 2 예를 나타낸 것으로서, 예를 들어 1 프레임이 1,920 화소*1,088 화소로 이루어지는 경우, 30 개 RAS 박스*34 개 RAS 박스, 총 1,020 개의 RAS(Row Address Strobe) 박스로 분할된다. 즉, RAS 박스의 번호가 프레임 메모리(100)의 행 어드레스(row address:RA)가 된다. 여기서, 하나의 RAS 박스는 4 개 매크로블록*2개 매크로블록, 총 8 개의 매크로블록(MB0~MB7)으로 이루어진다. 그리고, 각 매크로블록은 휘도(Y) 블록을 예로 들 경우, 4개의 블록(b0~b3)로 나누어진다.FIG. 8 illustrates a second example of a method for setting a RAS box for one frame in the frame memory 100 shown in FIG. 1. For example, when one frame includes 1,920 pixels * 1,088 pixels, 30 RAS boxes are illustrated. * 34 RAS boxes, divided into 1,020 RAS (Row Address Strobe) boxes. That is, the number of the RAS box is the row address (RA) of the frame memory 100. Here, one RAS box is composed of four macroblocks * 2 macroblocks and a total of eight macroblocks MB0 to MB7. Each macroblock is divided into four blocks b0 to b3 when the luminance Y block is taken as an example.

도 9는 도 8에 도시된 RAS 박스에 있어서 매크로블록 구조의 예를 나타낸 것으로서, 4개의 휘도(Y) 블록, 1개의 색차(Cr) 블록 및 1개의 색차(Cb) 블록으로 구성되고, 4개의 휘도(Y) 블록은 각각 8개의 박스(b0-0~b0-7, b1-0~b1-7, b2-0~b2-7, b3-0~b3-7)로 구성되고, 2개의 색차(Cr,Cb) 블록은 각각 8개의 서브 박스(sb0-0~sb0-7, sb1-0~sb1-7, sb2-0~sb2-7, sb3-0~sb3-7)로 구성된다. 그리고, Y 블록을 구성하는 각 박스에는 4*2 포맷의 8개의 화소 데이터, Cr 블록을 구성하는 각 박스에는 2*1 포맷의 2개의 화소 데이터, Cb 블록을 구성하는 각 박스에는 2*1 포맷의 2개의 화소 데이터가 존재한다.FIG. 9 shows an example of a macroblock structure in the RAS box shown in FIG. 8, and is composed of four luminance (Y) blocks, one color difference (Cr) block, and one color difference (Cb) block. The luminance (Y) block consists of eight boxes (b0-0 to b0-7, b1-0 to b1-7, b2-0 to b2-7, and b3-0 to b3-7), respectively, and two color differences. The (Cr, Cb) block is composed of eight sub boxes (sb0-0 to sb0-7, sb1-0 to sb1-7, sb2-0 to sb2-7, sb3-0 to sb3-7), respectively. Then, 8 pixel data in 4 * 2 format is included in each box constituting the Y block, 2 pixel data in 2 * 1 format is used in each box constituting the Cr block, and 2 * 1 format in each box constituting the Cb block. There are two pixel data of.

도 10은 본 발명에 의한 어드레스 발생방법의 제2실시예를 설명하는 흐름도로서, 이는 도 8 및 도 9에 도시된 프레임 구조에 적용되는 것이다.10 is a flowchart illustrating a second embodiment of the address generation method according to the present invention, which is applied to the frame structure shown in FIGS. 8 and 9.

도 10을 참조하면, 제201단계(S201)에서는 도 2에 도시된 바와 같은 프레임 메모리(100)의 스케쥴링 순서에 의거하여 프레임 옵셋 어드레스(frame offset address) 즉, RA[11:10]을 결정한다. 예를 들어, 도 2의 (b) 단계에서와 같이 제2프레임 저장영역(100-2)에 저장된 B 픽쳐에 대하여 제1프레임 저장영역(100-1)에 저장된 I 픽쳐를 참조하여 움직임 보상을 수행하는 경우에는 RA[11:10]이 '00'이 된다.Referring to FIG. 10, in operation 201, a frame offset address, that is, RA [11:10] is determined based on a scheduling order of the frame memory 100 as shown in FIG. 2. . For example, as in step (b) of FIG. 2, motion compensation may be performed by referring to an I picture stored in the first frame storage area 100-1 with respect to a B picture stored in the second frame storage area 100-2. In case of execution, RA [11:10] becomes '00'.

제202단계(S202)에서는 움직임 보상하고자 하는 현재 매크로블록(MB)의 시작 어드레스, 즉 슬라이스 위치(slice_position) 및 매크로블록 위치(mb_position)와, 움직임 벡터(mv_v, mv_h)를 입력한다.In operation 202 (S202), a start address of a current macroblock MB to be motion compensated, that is, a slice position and a macroblock position mb_position, and a motion vector mv_v and mv_h are input.

제203단계(S203)에서는 S202 에서 입력된 변수들의 스케일을 일치시킨다. 입력 변수 중, 슬라이스 위치(slice_position)와 매크로블록 위치(mb_position)는 각각 7 비트로 이루어지며 매크로블록 스케일을 가지는 반면, 움직임 벡터는 반화소 스케일을 가진다. 수평방향의 움직임 벡터(mv_h[12:0])와 수직방향의 움직임 벡터(mv_v[8:0])는 각각 도 6a 및 도 6b에 도시된 바와 같은 구성을 가진다. 따라서, 움직임 벡터를 매크로블록 스케일로 맞추기 위하여 16으로 나누어, 즉 mv_h[11:5]와 mv_v[7:5]를 취하여 각각 'mv_h_mb'와 'mv_v_mb'로 둔다.In step S203, the scales of the variables input in step S202 are matched. Among the input variables, the slice position (slice_position) and the macroblock position (mb_position) each consist of 7 bits and have a macroblock scale, while the motion vector has a half pixel scale. The horizontal motion vector mv_h [12: 0] and the vertical motion vector mv_v [8: 0] have configurations as shown in FIGS. 6A and 6B, respectively. Therefore, in order to fit the motion vector on the macroblock scale, it is divided by 16, that is, mv_h [11: 5] and mv_v [7: 5] are taken and set as 'mv_h_mb' and 'mv_v_mb', respectively.

제204단계(S204)에서는 수평, 수직 좌표계의 선형변환을 상기 수학식 1과 같이 수행하여, 예측된 매크로블록의 위치(predict_MB_v, predict_MB_h)를 결정한다.In operation 204 (S204), the linear transformation of the horizontal and vertical coordinate systems is performed as in Equation 1 to determine the predicted macroblock positions (predict_MB_v, predict_MB_h).

제205단계(S205)에서는 예측된 매크로블록이 위치하는 RAS 박스의 위치(RAS box_position)인 RA[9:0]을 다음 수학식 4에 의해 결정한다.In step S205, RA [9: 0], which is the position (RAS box_position) of the RAS box in which the predicted macroblock is located, is determined by the following equation (4).

[수학식4][Equation 4]

RAS box_position = ras_v * 30 + ras_hRAS box_position = ras_v * 30 + ras_h

RAS 박스의 구조가 도 8에서와 같이 4개의 매크로블록*2개의 매크로블록이므로, 'ras_h'와 'ras_v'는 'predict_MB_h'을 4로 나눈 몫과, 'prediction_MB_v'을 2로 나눈 몫을 각각 나타낸다. 여기서, 'ras_v'가 6 비트, '30' 이 6 비트, 'ras_h'가 5 비트이므로, 수학식 4에서의 연산 결과는 12 비트가 된다. 행 어드레스(RA)의 유효한 비트수는 10 비트이므로, 상위쪽 2 비트는 버리고 나머지 10 비트를 취하여 RA[9:0]로 둔다.Since the structure of the RAS box is four macroblocks * 2 macroblocks as shown in FIG. . Here, since 'ras_v' is 6 bits, '30' is 6 bits, and 'ras_h' is 5 bits, the calculation result in Equation 4 is 12 bits. Since the effective number of bits of the row address RA is 10 bits, the upper two bits are discarded and the remaining 10 bits are taken and left as RA [9: 0].

제206단계(S206)에서는 해당 RAS 박스에서의 매크로블록 위치(MB_position)인 CA[7:5]를 다음 수학식 5에 의해 결정한다.In step S206, CA [7: 5], which is the macroblock position MB_position in the corresponding RAS box, is determined by the following equation (5).

[수학식5][Equation 5]

MB_position = ras_v_rem * 4 + ras_h_remMB_position = ras_v_rem * 4 + ras_h_rem

RAS 박스의 구조가 도 8에서와 같이 4개의 매크로블록*2개의 매크로블록이므로, 'ras_h_rem'와 'ras_v_rem'는 'predict_MB_h'을 4로 나눈 나머지와, 'prediction_MB_v'을 2로 나눈 나머지를 각각 나타낸다. 여기서, 'ras_v_rem'이 1 비트, '4'가 2 비트, 'ras_h_rem'이 2 비트이므로 수학식 5에서의 연산 결과는 3 비트가 된다.Since the structure of the RAS box is 4 macroblocks * 2 macroblocks as shown in FIG. 8, 'ras_h_rem' and 'ras_v_rem' represent the remainder of 'predict_MB_h' divided by 4 and 'prediction_MB_v' divided by 2. . Here, since 'ras_v_rem' is 1 bit, '4' is 2 bits, and 'ras_h_rem' is 2 bits, the calculation result in Equation 5 is 3 bits.

제207단계(S207)에서는 해당 매크로블록에서의 블록 위치(blk_position)인 CA[4:3]를 다음 수학식 6에 의해 결정한다.In step 207 (S207), CA [4: 3], which is a block position blk_position in the macroblock, is determined by the following equation.

[수학식6][Equation 6]

CA[4:3] = (mv_v(4), mv_h(4))CA [4: 3] = (mv_v (4), mv_h (4))

여기서, 움직임 벡터(mv_v, mv_h)를 매크로블록 스케일로 변환하고 남은 비트 즉, mv_v[4:1]과 mv_h[4:1] 중 상위 mv_v(4)와 mv_h(4)를 취하여 (mv_v(4), mv_h(4))이 (0,0)이면 b0, (0,1)이면 b1, (1,0)이면 b2, (1,1)이면 b3으로 각각 결정한다.Here, the motion vectors mv_v and mv_h are converted to the macroblock scale, and the upper bits mv_v (4) and mv_h (4) among the remaining bits, mv_v [4: 1] and mv_h [4: 1], are taken and (mv_v (4) ), mv_h (4)) is (0,0), b0, (1, 0), b1, (1,0), b2, and b3.

제208단계(S208)에서는 해당 블록에서의 박스 위치(box_position)인 CA[2:0]를 다음 수학식 7에 의해 결정한다.In step S208, CA [2: 0], which is a box position (box_position) in the block, is determined by the following equation.

[수학식7][Equation 7]

box_position = mv_v[3:2] * 2 + mv_h(3)box_position = mv_v [3: 2] * 2 + mv_h (3)

각 블록에서의 박스 구조가 도 9에서와 같이 2*4 포맷이므로, mv_h[4:1] 중 남은 1 비트 즉, mv_h(3)을 취하고, mv_v[4:1] 중 남은 2 비트 즉, mv_v[3:2]를 취하여 2를 곱해 준 후 선형적으로 가산한다. 여기서, 'mv_v[3:2]'이 2 비트, '2'가 2 비트, mv_h(3)이 1 비트가 되므로 수학식 7에서의 연산결과는 4 비트가 된다. 그러나, 유효 비트수가 3 비트이므로, 최상위 1 비트는 버리고 나머지 3 비트를 취하여 CA[2:0]로 결정한다.Since the box structure in each block is in 2 * 4 format as shown in Fig. 9, the remaining 1 bit of mv_h [4: 1], that is, mv_h (3), is taken, and the remaining 2 bits of mv_v [4: 1], that is, mv_v Take [3: 2], multiply it by two, and add it linearly. Here, 'mv_v [3: 2]' is 2 bits, '2' is 2 bits, and mv_h (3) is 1 bit, so the calculation result in Equation 7 is 4 bits. However, since the number of valid bits is three bits, the most significant one bit is discarded and the remaining three bits are taken to determine CA [2: 0].

제209단계(S209)에서는 해당 박스에서의 화소 위치(pel_address)인 PA[2:0]를 다음 수학식 8에 의해 결정한다.In operation 209 (S209), PA [2: 0], which is a pixel position (pel_address) in the corresponding box, is determined by the following Equation (8).

[수학식8][Equation 8]

pel_address = mv_v(1) * 4 + mv_h[2:1]pel_address = mv_v (1) * 4 + mv_h [2: 1]

각 박스에서의 화소 구조가 도 9에서와 같이 4*2 포맷이므로, mv_h[4:1] 중 남은 2 비트 즉, mv_h[2:1]을 취하고, mv_v[4:1] 중 남은 1 비트 즉, mv_v(1)을 취하여 4를 곱해 준 후 선형적으로 가산한다. 여기서, 'mv_v(1)'이 1 비트, '4'가 3 비트, mv_h(3)이 2 비트가 되므로 수학식 8에서의 연산결과는 3 비트가 된다.Since the pixel structure in each box is in 4 * 2 format as shown in Fig. 9, the remaining two bits of mv_h [4: 1], that is, mv_h [2: 1], are taken, and the remaining 1 bit of mv_v [4: 1], i.e. Take mv_v (1), multiply it by 4, and add it linearly. Here, 'mv_v (1)' is 1 bit, '4' is 3 bits, and mv_h (3) is 2 bits, so the calculation result in Equation 8 is 3 bits.

제210단계(S210)에서는 S202 에서 입력된 현재 매크로블록이 움직임 보상하고자 하는 픽쳐에 있어서 마지막 매크로블록인지를 판단하여, 마지막 매크로블록인 경우 본 흐름도를 종료하고, 그렇지 않은 경우 S202 로 복귀한다.In operation S210, it is determined whether the current macroblock inputted in S202 is the last macroblock in the picture to be motion compensated, and if the last macroblock is completed, the flowchart ends, and otherwise, returns to S202.

상기 제 2 실시예에 의한 어드레스 발생방법에 있어서, S201, S205 내지 S209 은 순차적으로 수행하거나, 병렬로 수행함으로서 어드레스 발생시간을 줄일 수 있다.In the address generation method according to the second embodiment, S201, S205 to S209 can be performed sequentially or in parallel to reduce the address generation time.

상기 제 1 실시예 및 제 2 실시예에 의해 얻어지는 RA[11:0]과 CA[7:0]은 프레임 메모리(100)의 해당 저장영역으로 부터 예측된 매크로블록을 박스 단위로 독출하기 위하여 필요한 어드레스이고, PA[2:0]은 예측된 매크로블록의 기준 포인트를 결정하기 위하여 필요한 어드레스이다.RA [11: 0] and CA [7: 0] obtained by the first and second embodiments are required to read the macroblocks predicted from the corresponding storage areas of the frame memory 100 in box units. Address, and PA [2: 0] is the address needed to determine the reference point of the predicted macroblock.

도 11은 도 5 및 도 10에 도시된 어드레스 발생방법이 수행되는 장치를 나타낸 것으로서, 통상 메모리 제어부(200)에서 수행된다. 즉, 메모리 제어부(200)는 움직임 보상하고자 하는 픽쳐에 있어서 현재 매크로블록의 시작 어드레스, 움직임 벡터 및 각종 파라미터들을 입력하여, 참조하고자 하는 픽쳐의 해당 매크로블록을 박스 단위로 페치하기 위한 어드레스를 어드레스 버스를 통해 프레임 메모리(100)로 인가한다. 이와 아울러, 프레임 메모리(100)의 쓰기 및 읽기 동작을 제어하기 위한 각종 제어신호들을 프레임 메모리(100)로 인가한다.FIG. 11 is a diagram illustrating an apparatus in which the address generation method illustrated in FIGS. 5 and 10 is performed, and is typically performed by the memory controller 200. That is, the memory controller 200 inputs a start address, a motion vector, and various parameters of a current macroblock in a picture to be motion compensated, and addresses an address for fetching a corresponding macroblock of a picture to be referred to in a box unit. Through the frame memory 100 through. In addition, various control signals for controlling write and read operations of the frame memory 100 are applied to the frame memory 100.

한편, 상기한 상세한 설명은 여기에 제시된 특정의 실시예를 설명하고자 한 것이며, 본 발명을 한정하려는 의도는 아니다. 당업자라면, 상기한 상세한 설명 및 도면을 참조하여 본 발명의 기술적 사상내에서 RAS 박스의 구조 및 매크로블록 블록의 구조에 따라 여러 가지 변형 및 수정을 가할 수 있을 것이다.On the other hand, the above detailed description is intended to describe particular embodiments presented herein and is not intended to limit the present invention. Those skilled in the art may make various changes and modifications according to the structure of the RAS box and the structure of the macroblock block within the technical spirit of the present invention with reference to the above detailed description and drawings.

상술한 바와 같이 본 발명에 따르면, 움직임 보상시 참조 영상 데이터를 저장하는 영역, 디스플레이를 위해 복호화가 완료된 영상 데이터를 저장하는 영역 및 영상 복호화기로 입력되는 부호화된 비트스트림을 저장하는 영역이 하나의 메모리 모듈 상에 구현된 프레임 메모리에 있어서, 현재 매크로블록의 시작 어드레스와 움직임 벡터에 의해 예측된 매크로블록을 박스 단위로 읽기 위한 어드레스를 발생시킬 수 있다. 또한, 상기 예측된 매크로블록이 위치하는 RAS 박스 위치, 해당 RAS 박스에서의 매크로블록 위치, 해당 매크로블록에서의 블록 위치, 해당 블록에서의 박스 위치, 및 해당 박스에서의 화소 위치에 대한 어드레스를 병렬로 생성시킴으로써, 전체 어드레스 발생에 소요되는 시간을 단축시킬 수 있다.As described above, according to the present invention, one memory includes an area for storing reference image data in motion compensation, an area for storing decoded image data for display, and an area for storing an encoded bitstream input to the image decoder. In the frame memory implemented on the module, an address for reading the macroblock predicted by the start address and the motion vector of the current macroblock in units of boxes may be generated. In addition, the address of the RAS box position where the predicted macroblock is located, the macroblock position in the RAS box, the block position in the macroblock, the box position in the block, and the pixel position in the box are paralleled. By generating this, the time required for generating the entire address can be shortened.

Claims (4)

1 프레임은 복수개의 RAS 박스로 이루어지며, 상기 RAS 박스는 8 매크로블록 * 1 매크로블록 포맷을 가지며, 상기 매크로블록은 휘도 블록에 대하여 2 블록 * 2 블록 포맷을 가지며, 상기 블록은 1 박스 * 8 박스 포맷을 가지며, 상기 박스는 8 화소 * 1 화소 포맷을 가지는 경우, 제1 내지 제4프레임 저장영역으로 이루어지는 프레임 메모리와, 움직임 보상하고자 하는 픽쳐의 현재 매크로블록의 시작 어드레스, 수평 및 수직 움직임 벡터와 각종 파라미터들을 입력으로 하여 예측된 매크로블록을 읽어내기 위한 어드레스 및 각종 제어신호들을 상기 프레임 메모리로 공급하는 메모리 제어부를 구비하는 움직임 보상장치에 있어서,One frame consists of a plurality of RAS boxes, the RAS box has 8 macroblock * 1 macroblock formats, the macroblock has a 2 block * 2 block format for the luminance block, and the block has 1 box * 8 When the box has an 8-pixel * 1-pixel format, the box has a frame memory including first to fourth frame storage areas, a start address of a current macroblock of a picture to be motion compensated, horizontal and vertical motion vectors. And a memory controller for supplying an address and various control signals for reading a predicted macroblock by inputting various parameters to the frame memory. 상기 수평 및 수직 움직임 벡터를 매크로블록 스케일로 조정하는 단계;Adjusting the horizontal and vertical motion vectors to a macroblock scale; 상기 프레임 메모리의 스케쥴링 순서에 의거하여, 움직임 보상시 참조하고자 하는 픽쳐가 위치하는 저장영역을 나타내는 제1행 어드레스를 생성하는 단계;Generating a first row address indicating a storage area in which a picture to be referred to for motion compensation is located based on a scheduling order of the frame memory; 상기 현재 매크로블록의 시작 어드레스와 매크로블록 스케일로 조정된 상기 수평 및 수직 움직임 벡터를 이용하여, 상기 예측된 매크로블록의 수평 및 수직위치를 결정하는 단계;Determining horizontal and vertical positions of the predicted macroblock using the horizontal and vertical motion vectors adjusted to the start address of the current macroblock and the macroblock scale; 상기 예측된 매크로블록의 수평위치와 수직위치를 이용하여, 해당 저장영역에서의 RAS 박스 위치를 나타내는 제2행 어드레스와, 해당 RAS 박스에서의 매크로블록 위치를 나타내는 제1열 어드레스를 생성하는 단계; 및Generating a second row address indicating a RAS box position in a corresponding storage area and a first column address indicating a macroblock position in a corresponding RAS box by using the predicted horizontal and vertical positions of the macroblock; And 상기 수평 및 수직 움직임벡터에 있어서 반화소 플래그를 제외한 하위쪽 4비트씩을 이용하여, 해당 매크로블록에서의 블록 위치를 나타내는 제2열 어드레스, 해당 블록에서의 박스 위치를 나타내는 제3열 어드레스와, 해당 박스에서의 화소 위치를 나타내는 화소 어드레스를 생성하는 단계를 포함하여 구성되는 것을 특징으로 하는 프레임 메모리에 있어서 어드레스 발생방법.A second column address indicating a block position in the macroblock, a third column address indicating a box position in the corresponding block, using the lower four bits of the horizontal and vertical motion vectors except for the half pixel flag; And generating a pixel address indicating a pixel position in the box. 제 1 항에 있어서, 상기 각 어드레스 발생단계는 병렬로 처리되어짐으로 특징으로 하는 프레임 메모리에 있어서 어드레스 발생방법.2. The method of claim 1, wherein each address generating step is processed in parallel. 1 프레임은 복수개의 RAS 박스로 이루지어며, 상기 RAS 박스는 4 매크로블록 * 2 매크로블록 포맷을 가지며, 상기 매크로블록은 휘도 블록에 대하여 2 블록 * 2 블록 포맷을 가지며, 상기 블록은 2 박스 * 4 박스 포맷을 가지며, 상기 박스는 4 화소 * 2 화소 포맷을 가지는 경우, 제1 내지 제4프레임 저장영역으로 이루어지는 프레임 메모리와, 움직임 보상하고자 하는 픽쳐의 현재 매크로블록의 시작 어드레스, 수평 및 수직 움직임 벡터와 각종 파라미터들을 입력으로 하여 예측된 매크로블록을 읽어내기 위한 어드레스 및 각종 제어신호들을 상기 프레임 메모리로 공급하는 메모리 제어부를 구비하는 움직임 보상장치에 있어서,One frame consists of a plurality of RAS boxes, the RAS box has a format of 4 macroblocks * 2 macroblocks, the macroblocks have a format of 2 blocks * 2 blocks for the luminance block, and the blocks are 2 boxes * When the box has a 4 box format and the box has a 4 pixel * 2 pixel format, the frame memory including the first to fourth frame storage areas, and the start address, horizontal and vertical motion of the current macroblock of the picture to be motion compensated. A motion compensation device comprising a memory controller for supplying an address and various control signals for reading a predicted macroblock by inputting a vector and various parameters to the frame memory, 상기 수평 및 수직 움직임 벡터를 매크로블록 스케일로 조정하는 단계;Adjusting the horizontal and vertical motion vectors to a macroblock scale; 상기 프레임 메모리의 스케쥴링 순서에 의거하여, 움직임 보상시 참조하고자 하는 픽쳐가 위치하는 저장영역을 나타내는 제1행 어드레스를 생성하는 단계;Generating a first row address indicating a storage area in which a picture to be referred to for motion compensation is located based on a scheduling order of the frame memory; 상기 현재 매크로블록의 시작 어드레스와 매크로블록 스케일로 조정된 상기 수평 및 수직 움직임 벡터를 이용하여, 상기 예측된 매크로블록의 수평 및 수직위치를 결정하는 단계;Determining horizontal and vertical positions of the predicted macroblock using the horizontal and vertical motion vectors adjusted to the start address of the current macroblock and the macroblock scale; 상기 예측된 매크로블록의 수평위치와 수직위치를 각각 4와 2로 나눈 몫을 이용하여, 해당 저장영역에서의 RAS 박스 위치를 나타내는 제2행 어드레스를 생성하는 단계;Generating a second row address representing a RAS box position in a corresponding storage area by using a quotient obtained by dividing the predicted macroblock's horizontal position and vertical position by 4 and 2, respectively; 상기 예측된 매크로블록의 수평위치와 수직위치를 각각 4와 2로 나눈 나머지를 이용하여, 해당 RAS 박스에서의 매크로블록 위치를 나타내는 제1열 어드레스를 생성하는 단계; 및Generating a first column address indicating a macroblock position in a corresponding RAS box using the remainder obtained by dividing the predicted macroblock's horizontal and vertical positions by 4 and 2, respectively; And 상기 수평 및 수직 움직임벡터에 있어서 반화소 플래그를 제외한 하위쪽 4비트씩을 이용하여, 해당 매크로블록에서의 블록 위치를 나타내는 제2열 어드레스, 해당 블록에서의 박스 위치를 나타내는 제3열 어드레스와, 해당 박스에서의 화소 위치를 나타내는 화소 어드레스를 생성하는 단계를 포함하여 구성되는 것을 특징으로 하는 프레임 메모리에 있어서 어드레스 발생방법.A second column address indicating a block position in the macroblock, a third column address indicating a box position in the block, using the lower 4 bits of the horizontal and vertical motion vectors except for the half pixel flag; And generating a pixel address indicating a pixel position in the box. 제 3 항에 있어서, 상기 각 어드레스 발생단계는 병렬로 처리되어짐으로 특징으로 하는 프레임 메모리에 있어서 어드레스 발생방법.4. The method of claim 3, wherein each address generating step is processed in parallel.
KR1019970022374A 1997-05-31 1997-05-31 Method for generating address in a frame memory KR100269427B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970022374A KR100269427B1 (en) 1997-05-31 1997-05-31 Method for generating address in a frame memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970022374A KR100269427B1 (en) 1997-05-31 1997-05-31 Method for generating address in a frame memory

Publications (2)

Publication Number Publication Date
KR19980086115A KR19980086115A (en) 1998-12-05
KR100269427B1 true KR100269427B1 (en) 2000-10-16

Family

ID=19508133

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970022374A KR100269427B1 (en) 1997-05-31 1997-05-31 Method for generating address in a frame memory

Country Status (1)

Country Link
KR (1) KR100269427B1 (en)

Also Published As

Publication number Publication date
KR19980086115A (en) 1998-12-05

Similar Documents

Publication Publication Date Title
KR100269427B1 (en) Method for generating address in a frame memory
KR100226703B1 (en) Method for calculating address distances in a frame memory
KR100226704B1 (en) Method for calculating address distances in a frame memory
KR100255795B1 (en) Method for compensating a reference point during an address generation of a predicted macroblock with consisting of a half pel in a frame memory
KR100243477B1 (en) Apparatus of generating display address in a frame memory
KR100235485B1 (en) Method for compensating a reference point during an address generation 0f a predicted macroblock in a frame memory and circuit using the same
KR100255221B1 (en) Method for compensating a pel address and counter for compensating a box in case of compensating a half-pel in a frame memory
KR100243478B1 (en) Method for compensating a moving vector during an address generation of a predicted macroblock with consisting of a half pel in a frame memory
KR19990026427A (en) Motion vector distance calculation method in frame memory
KR100235486B1 (en) Method for compensating a slice position during an address generation 0f a predicted macroblock in a frame memory and circuit using the same
KR100243472B1 (en) Method for reading a field-pictured macroblock in a frame memory
KR100243473B1 (en) Apparatus for compensating a motion vector during an address generation of a predicted macroblock in a frame memory
KR19990005601A (en) The address distance calculation method in the frame memory
KR19990005576A (en) The address distance calculation method in the frame memory
KR100248653B1 (en) Method for transitioning a state of blocks during address generation in a frame memory
KR19990032813A (en) Address distance calculation method in frame memory
KR100237486B1 (en) Apparatus for rearranging data output from a frame memory
KR19990005602A (en) Dual Prime Field Prediction Method in Frame Memory
JPH10304373A (en) Moving image decoding method and moving image decoder
KR100226702B1 (en) Method for transitioning block status during address generation in a frame memory
KR100243474B1 (en) Jump address generator in frame memory
KR19990026428A (en) Address generator in frame memory
KR100243475B1 (en) Jump address generator in frame memory
KR100243479B1 (en) Rearrange apparatus of output data of frame memory
KR100243470B1 (en) Address generator in frame memory

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

Year of fee payment: 13

LAPS Lapse due to unpaid annual fee