Description METHOD AND APPARATUS FOR ESTIMATING MOTION
VECTOR USING PLURALITY OF MOTION VECTOR PREDICTORS, ENCODER, DECODER, AND DECODING
METHOD
Technical Field
[1] Methods and apparatuses consistent with the present invention generally relate to video coding and decoding, and more particularly, to estimating a motion vector using a plurality of motion vector predictors. Background Art
[2] Inter- frame and intra-frame predictions are widely used video encoding techniques.
Intra-frame prediction uses a high correlation between gray levels of adjacent pixels in a single frame. Inter-frame prediction uses similarities between consecutive frames in a video sequence. As long as a sharp change does not occur in a moving picture, many parts of the moving picture change little between consecutive frames. In particular, motion- vector estimation is one of a variety of video encoding techniques used in inter-frame prediction. Motion-vector estimation is designed to process an image by differentially encoding motion vectors obtained by motion estimation. Generally, a motion vector of a block has a close correlation with a motion vector of a neighboring partition. For this reason, the amount of bits to be encoded can be reduced by predicting a motion vector of a current block from the motion vector of a neighboring partition and encoding only a differential vector between these two motion vectors.
[3] FIGS. IA and IB illustrate neighboring partitions used for related art motion estimation.
[4] Referring to FIG. IA, a current macroblock E and its neighboring partitions A, B, and C are the same in shape, and predictive encoding of a motion vector uses the median value of horizontal components and vertical components of motion vectors of a block A located to the left of the current macroblock E, a block B located above the current block E, and a block C located above and to the right of the current block E.
[5] In FIG. IB, the current macroblock E and its neighboring partitions A, B, and C are different in shape, and the motion vector of the current macroblock E is estimated as follows.
[6] (1) If a neighboring partition located to the left of the current macroblock E is divided into several blocks, a block A located uppermost among those blocks is used for motion estimation. If a neighboring partition located above the current macroblock E is divided into several blocks, a block B located leftmost among those blocks is used
for motion estimation. The median value of horizontal components and vertical components of motion vectors of the block A, the block B, and a block C located above and to the right of the current macroblock E is used for predictive encoding of the motion vector of the current macroblock E.
[7] (2) However, if the current macroblock E to be encoded is not a regular square in shape, i.e., the current macroblock E is composed of 16x8 or 8x16 pixels, the motion vector of the current macroblock E is estimated based on the size of a motion compensation block without using the median value, as follows.
[8] (i) If the current macroblock E is composed of 16x8 pixels, the block B located above the current block E and the block A located to the left of the current macroblock E are used for motion estimation.
[9] (ii) If the current macroblock E is composed of 8x16 pixels, the block A located to the left of the current macroblock E and the block C located above and to the right of the current block E are used for motion estimation.
[10] (3) In a skip macroblock mode, estimation is performed as described in (1).
[11] As described above, at least one neighboring block may be used for estimation of a motion vector of the current block. However, according to the prior art, only typical neighboring blocks are available and, out of those neighboring blocks, a block that is similar to the current block, i.e., the block having the same motion as the current block, is useful, but the other blocks are not. Therefore, there is a need to use a plurality of other neighboring blocks for accurate estimation as well as those typical neighboring blocks. In this case, processing of information about neighboring blocks used for motion estimation is also required. Disclosure of Invention Technical Solution
[12] The present invention provides a method and apparatus for estimating a motion vector, in which useful neighboring partitions are estimated so as to estimate a motion vector of a current block and information about estimated neighboring partitions is processed. Advantageous Effects
[13] As described above, according to the exemplary embodiments of the present invention, by estimating useful partitions for estimation of the motion vector of the current block and processing information about the estimated partitions, the amount of information transmitted to the decoder can be reduced.
[14] The present invention can also be embodied as computer-readable code on a computer-readable recording medium. The computer-readable recording medium is any data storage device that can store data which can be thereafter read by a computer
system. Examples of computer-readable recording media include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. The computer-readable recording medium can also be distributed over a network of coupled computer systems so that the computer-readable code is stored and executed in a decentralized fashion.
[15] While the present invention has been particularly shown and described with reference to an exemplary embodiment thereof, it will be understood by those of ordinary skill in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the present invention as defined by the following claims. Description of Drawings
[16] The above and other aspects of the present invention will become more apparent by describing in detail an exemplary embodiment thereof with reference to the attached drawings in which:
[17] FIGS. IA and IB illustrate neighboring partitions used for conventional motion estimation;
[18] FIG. 2 illustrates neighboring partitions used for motion estimation according to an exemplary embodiment of the present invention;
[19] FIG. 3 A is a flowchart of a method of estimating a motion vector of a current block according to an exemplary embodiment of the present invention;
[20] FIG. 3B is a flowchart of a method of estimating a motion vector of a current block according to another exemplary embodiment of the present invention;
[21] FIG. 4A is a view for explaining calculation of spatial similarities between the current block and its neighboring partitions according to an exemplary embodiment of the present invention;
[22] FIGS. 4B and 4C are views for explaining calculation of spatial similarities between neighboring pixels that are adjacent to the current block and neighboring pixels that are adjacent to each reference block that corresponds to the current block according to an exemplary embodiment of the present invention;
[23] FIG. 5A is a block diagram of an apparatus for estimating a motion vector according to an exemplary embodiment of the present invention;
[24] FIG. 5B is a block diagram of an apparatus for estimating a motion vector according to another exemplary embodiment of the present invention;
[25] FIG. 6 is a block diagram of an encoder including the apparatus for estimating a motion vector according to an exemplary embodiment of the present invention;
[26] FIG. 7 is a block diagram of a decoder according to an exemplary embodiment of the present invention; and
[27] FIG. 8 is a flowchart of a decoding method according to an exemplary embodiment of the present invention.
Best Mode
[28] According to one aspect of the present invention, there is provided a method of estimating a motion vector of a current block. The method includes calculating spatial similarities between the current block and a plurality of neighboring partitions around the current block, selecting at least one of the neighboring partitions based on the calculated spatial similarities, and estimating a motion vector of the selected partition as the motion vector of the current block.
[29] During the calculation of the spatial similarities, an average value of pixels of the current block and an average value of pixels of each of the neighboring partitions may be used and the average value of the pixels of the current block may be calculated using pixels that touch the current block from among the pixels of the neighboring partitions.
[30] During the calculation of the spatial similarities, the spatial similarities may be allocated to the neighboring partitions according to a spatial order previously agreed between an encoder and a decoder.
[31] The method may further include transmitting motion information between the motion vector of the current block and the estimated motion vector of the current block and partition information for reconstruction of the motion vector of the current block.
[32] In the estimating, when a plurality of neighboring partitions are selected, a motion vector of one of the selected neighboring partitions may be estimated as the motion vector of the current block.
[33] In the estimating, when a plurality of neighboring partitions are selected, the median value of motion vectors of the selected neighboring partitions may be estimated as the motion vector of the current block.
[34] In the estimating, when a plurality of neighboring partitions are selected, a sum of weighted motion vectors of the selected neighboring partitions may be estimated as the motion vector of the current block.
[35] In the estimating, a motion vector of a partition in a reference frame, which is located in the spatially same position as the current block, may be estimated as the motion vector of the current block.
[36] According to another aspect of the present invention, there is provided a method of estimating a motion vector of a current block. The method includes searching at least one reference frame using motion vectors of a plurality of neighboring partitions around the current block in order to search for blocks corresponding to the current block, calculating similarities between neighboring pixels that are adjacent to each of the found blocks and neighboring pixels that are adjacent to the current block, and estimating one of the motion vectors of the partitions as the motion vector of the current block based on the calculation result.
[37] According to another aspect of the present invention, there is provided a computer- readable recording medium having recorded thereon a program for executing the method.
[38] According to another aspect of the present invention, there is provided an apparatus for estimating a motion vector of a current block using motion vectors of a plurality of neighboring partitions around the current block. The apparatus includes a spatial similarity calculation unit calculating spatial similarities between the current block and the plurality of neighboring partitions around the current block, a partition selection unit selecting at least one of the neighboring partitions based on the calculated spatial similarities, and a motion vector estimation unit estimating a motion vector of the selected partition as the motion vector of the current block.
[39] According to another aspect of the present invention, there is provided a video encoder. The video encoder includes a motion estimation unit generating a current block and a motion vector of each of a plurality of neighboring partitions around the current block, a motion vector estimation unit calculating spatial similarities between the current block and the plurality of neighboring partitions around the current block, selecting at least one of the neighboring partitions based on the calculated spatial similarities, and estimating a motion vector of the selected partition as the motion vector of the current block, and an entropy-coding unit performing entropy-coding on motion information between the motion vector of the current block and the estimated motion vector of the current block and partition information for reconstruction of the motion vector of the current block.
[40] According to another aspect of the present invention, there is provided a video decoder. The video decoder includes an entropy-decoding unit performing entropy- decoding on a residual block, motion information, and partition information from an encoded bitstream, a motion vector estimation unit calculating spatial similarities between a current block and a plurality of neighboring partitions around the current block, selecting at least one of the neighboring partitions based on the calculated spatial similarities, estimating a motion vector of the selected partition as the motion vector of the current block, adding the decoded motion information to the estimated motion vector of the current block in order to reconstruct the motion vector of the current block, and a macroblock reconstruction unit reconstructing the current block from the decoded residual block using the reconstructed motion vector.
[41] According to another aspect of the present invention, there is provided a decoding method. The decoding method includes performing entropy-decoding on a residual block, motion information, and partition information from an encoded bitstream, calculating spatial similarities between a current block and a plurality of neighboring partitions around the current block, selecting at least one of the neighboring partitions
based on the calculated spatial similarities, estimating a motion vector of the selected partition as the motion vector of the current block, adding the decoded motion information to the estimated motion vector of the current block in order to reconstruct the motion vector of the current block, and reconstructing the current block from the decoded residual block using the reconstructed motion vector.
[42] According to another aspect of the present invention, there is provided a computer- readable recording medium having recorded thereon a program for executing the decoding method. Mode for Invention
[43] Hereinafter, an exemplary embodiment of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that like reference numerals refer to like elements illustrated in one or more of the drawings. It would be obvious to those of ordinary skill in the art that many specifics like elements of a circuit are provided only to facilitate understanding of the present invention and the present invention can be implemented without those specifics. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted for conciseness and clarity.
[44] FIG. 2 illustrates neighboring partitions used for motion estimation according to an exemplary embodiment of the present invention. Referring to FIG. 2, a motion vector of a current block E can be estimated using not only neighboring partitions A, B, and C according to the related art but also by using other neighboring partitions Al, A2, Bl, and B2. The current block E may be a 16x16 macroblock and the size of a neighboring partition may be smaller than the current block E and may be one of 16x8, 8x16, 8x4, 4x8, and 4x4.
[45] FIG. 3A is a flowchart of a method of estimating a motion vector of a current block according to an exemplary embodiment of the present invention, and FIG. 4A is a view for explaining calculation of spatial similarities between the current block and its neighboring partitions according to an exemplary embodiment of the present invention.
[46] Referring to FIG. 3A, an average value of pixels of the current block E and an average value of pixels of each of the neighboring partitions A, B, Al, A2, Bl, B2, and C are calculated in operation S300, in order to select neighboring partitions having spatial similarity with the current block E.
[47] In operation S301, the similar neighboring partitions are selected as predictors of the current block using the calculated averages. The predictors are blocks that are to be compared with the current block for obtaining a motion vector difference (MVD).
[48] More specifically, when the average value of pixels of the current block is a first average and the average value of pixels of a neighboring partition is a second average, the neighboring partition is selected as a predictor of the current block if the absolute
value of a difference between the first average and the second average is less than a predetermined threshold.
[49] In particular, the average value of pixels of the current block and the average value of pixels of each of a plurality of neighboring partitions around the current block may be used for calculation of a spatial similarity and the average value of pixels of the current block may be calculated using pixels that touch the current block from among the pixels of the neighboring partitions. During calculation of a spatial similarity, the spatial similarity is allocated to each of the neighboring partitions according to a spatial order agreed previously between an encoder and a decoder.
[50] In operation S302, a motion vector of the selected neighboring partition is estimated as the motion vector of the current block. At least two neighboring partitions may have been selected in operation S301, as will be described with reference to FIG. 4.
[51] FIG. 4A is a view for explaining calculation of spatial similarities between the current block and its neighboring partitions according to an exemplary embodiment of the present invention. In FIG. 4A, it is assumed that the current block E is a 16x16 macroblock, a neighboring partition A is composed of 8x4 pixels, a neighboring partition Al is composed of 8x4 pixels, a neighboring partition A2 is composed of 8x8 pixels, a neighboring partition B is composed of 4x8 pixels, a neighboring partition Bl is composed of 4x8 pixels, a neighboring partition B2 is composed of 8x8 pixels, and a neighboring partition C is composed of 16x8 pixels. In addition, it is assumed that an absolute value of a difference between an average value of pixels of the current block E and an average value of pixels of each of the neighboring partitions A2, Bl, and B2 is less than a predetermined threshold.
[52] According to an exemplary embodiment of the present invention, a motion vector of the current block E can be estimated as follows in (i), (ii), (iii) or (iv).
[53] (i) One of the neighboring partitions A2, Bl, and B2 is selected and a motion vector of the selected neighboring partition is estimated as the motion vector of the current block E,
[54] (ii) A combination of the neighboring partitions A2, Bl, and B2, e.g., a combination formula 3C2, is selected and the median value of x components and y components of motion vectors of the selected neighboring partitions is estimated as the motion vector of the current block E.
[55] (iii) If motion vectors of the neighboring partitions A2, Bl, and B2 are MVP A2,
MVPBl, and MVPB2, a sum of weighted motion vectors, e.g., α*MVPA2+β*MVPBl+γ*MVPB2, is estimated as the motion vector of the current block E. Information about neighboring partitions, i.e., partition information, complies with a rule previously reserved for a decoder. For example, the partition information may indicate that a motion vector of a neighboring partition located to the left of the
current block from among neighboring partitions having spatial similarities with the current block is estimated as the motion vector of the current block or the median value of motion vectors of the neighboring partitions is estimated as the motion vector of the current block. When weights are used, weight coefficients (α, β, γ) have to be transmitted to a decoder as a partition type.
[56] (iv) A motion vector of a partition in a reference frame, which is located in a position that spatially corresponds to that of the current block, may be estimated as the motion vector of the current block. A partition in a temporally close reference frame, which is located in a position that spatially corresponds to that of the current block, i.e., the partition in the reference frame, which is located in the spatially same position as the current block, is highly likely to have a motion that is similar to that of the current block. Thus, the motion vector of the partition, which is located in the spatially same position as the current block, may be estimated as the motion vector of the current block.
[57] Information about neighboring partitions, i.e., partition information, complies with a rule previously reserved for a decoder. For example, the partition information may indicate that a motion vector of a neighboring partition located to the left of the current block from among neighboring partitions having spatial similarities with the current block is estimated as the motion vector of the current block or the median value of motion vectors of the neighboring partitions is estimated as the motion vector of the current block. When weights are used, weight coefficients (α, β, γ) have to be transmitted to a decoder as a partition type.
[58] FIG. 3B is a flowchart of a method of estimating a motion vector of a current block according to another exemplary embodiment of the present invention, and FIGS. 4B and 4C are views for explaining calculation of spatial similarities between pixels that are adjacent to the current block and pixels that are adjacent to each block that corresponds to the current block according to an exemplary embodiment of the present invention. Referring to FIGS. 3B, in operation 310, at least one reference frame is searched using motion vectors of the plurality of neighboring partitions A, B, C, Al, A2, Bl, B2, and C that are adjacent to a current block 410 in order to search for blocks 420 through 422 that correspond to the current block 410. It is assumed that the current block 410 is the same as the current block E illustrated in FIG. 3 A.
[59] The motion vectors of the neighboring partitions A, B, C, Al, A2, Bl, B2, and C are estimated as the motion vector of the current block 410. For example, the motion vector of the partition A illustrated in FIG. 3A may be an estimated motion vector MVPl, the motion vector of the partition B illustrated in FIG. 3 A may be an estimated motion vector MVP2, and the motion vector of the partition C illustrated in FIG. 3A may be an estimated motion vector MVP3.
[60] In operation 311, similarities between neighboring pixels 423 through 425 that are adjacent to the found blocks 420 through 422 corresponding to the current block 410 and neighboring pixels 411 that are adjacent to the current block 410 are calculated.
[61] Preferably, but not necessarily, the similarities may be calculated by calculating sums of absolute differences (SADs) between the pixels 423 through 425 and the pixels 411.
[62] For SAD calculation in operation 311, it is not necessary to use all the neighboring pixels 423 through 425 that are adjacent to the blocks 420 through 422 corresponding to the current block 410 and the neighboring pixels 411 that are adjacent to the current block 410. As illustrated in FIG. 4C, the similarities may be calculated by calculating SADs between only some of the neighboring pixels 423 through 425 and the neighboring pixels 411. In FIG. 4C, among the neighboring pixels 423 through 425 and the neighboring pixels 411, only neighboring pixels that are located to the left of and above, to the right of and above, and to the left of and below a corresponding block are used to calculate the similarities.
[63] In operation 312, one of the motion vectors of the neighboring partitions A, B, C, Al,
A2, Bl, B2, and C is estimated as the motion vector of the current block based on the similarities calculated in operation 311.
[64] If SADs have been calculated for the similarities in operation 311, a motion vector used to search for a block that is adjacent to pixels having the smallest SAD is estimated as the motion vector of the current block. For example, if an SAD between the neighboring pixels 411 of the current block 410 and the neighboring pixels 423 of the block 420 found using the motion vector MVPl is smallest among the calculated SADs and thus a similarity between the neighboring pixels 411 and the neighboring pixels 423 is highest, the motion vector used to search for the block 410, i.e., the motion vector MVPl, is estimated as the motion vector of the current block.
[65] However, it is not necessary to estimate a motion vector used to search for a block that is adjacent to pixels having the smallest SAD as the motion vector of the current block. In spite of corresponding to the smallest SAD, the motion vector may not be an appropriately estimated motion vector when considering the overall rate-distortion (R-D) cost of the current block. Therefore, N motion vector candidates, i.e., a plurality of motion vector candidates corresponding to smaller SADs, are selected and a motion vector guaranteeing low R-D cost among the selected motion vector candidates is estimated as the motion vector of the current block.
[66] In this case, information indicating which motion vector has among the plurality of motion vector candidates been estimated as the motion vector of the current block has to be transmitted to a decoder.
[67] It is assumed that motion vectors MVPl and MVP2 among motion vectors MVPl,
MPV2, and MVP3 illustrated in FIG. 4B correspond to small SADs and an SAD cor-
responding to the motion vector MVPl is smaller than an SAD corresponding to the motion vector MVP2. The two motion vectors MVPl and MVP2 are estimated as the motion vector of the current block and encoding is performed using the estimated motion vector. As a result of encoding, if it is determined that an R-D cost corresponding to a case where the motion vector MVP2 is estimated as the motion vector of the current block is lower than that corresponding to the other case, the motion vector MVP2 is estimated as the motion vector of the current block.
[68] As discussed above with reference to FIGS. 3B, 4B, and 4C, it is not necessary to use the pixels 411 and the pixels 423 through 425 that are immediately adjacent to the borders of the block 410 and the blocks 420 through 422 for similarity calculation. Pixels spaced by a predetermined distance from the borders of the block 410 and the blocks 420 through 422 may also be used as long as they have correlations with the block 410 and the blocks 420 through 422.
[69] However, those of ordinary skill in the art may understand that the methods described above are only examples and various combinations are available.
[70] FIG. 5A is a block diagram of an apparatus 500 for estimating a motion vector according to an exemplary embodiment of the present invention. Referring to FIG. 5A, the apparatus 500 includes a spatial similarity calculation unit 501, a partition selection unit 502, and a motion vector estimation unit 503.
[71] The spatial similarity calculation unit 501 calculates an average value of pixels of the current block E and an average value of pixels of each of the neighboring partitions A, B, Al, A2, Bl, B2, and C around the current block E. The calculated averages are transmitted to the partition selection unit 502.
[72] If the average value of the pixels of the current block E is a first average and the average value of the pixels of each of the neighboring partitions A, B, Al, A2, Bl, B2, and C is a second average, the partition selection unit 502 selects a neighboring partition (or neighboring partitions) as a predictor of the current block E when an absolute value of a difference between the first average and the second average corresponding to the neighboring partition is less than a predetermined threshold. Information about the selected neighboring partition(s) is transmitted to the motion vector estimation unit 503.
[73] The motion vector estimation unit 503 estimates the motion vector of the current block E using a motion vector (or motion vectors) of the selected neighboring partition(s) as described above with reference to FIGS. 3A and 4A. At least two neighboring partitions may be selected and motion estimation in this case may be performed as described above with reference to FIGS. 3A and 4A.
[74] FIG. 5B is a block diagram of the apparatus 500 for estimating a motion vector according to another exemplary embodiment of the present invention. Referring to
FIG. 5B, the apparatus 500 includes a search unit 511, a similarity calculation unit 512, and a motion vector estimation unit 513.
[75] The search unit 511 searches at least one reference frame using the motion vectors of the plurality of neighboring partitions A, B, C, Al, A2, Bl, B2, and C that are adjacent to the current block 410 in order to search for the blocks 420 through 422 corresponding to the current block 410. As set forth with reference to FIG. 3B, the current block 410 is assumed to be the same as the current block E illustrated in FIG. 3A.
[76] The similarity calculation unit 512 calculates similarities between the neighboring pixels 423 through 425 that are adjacent to the found blocks 420 through 422, respectively, and the neighboring pixels 411 that are adjacent to the current block 410.
[77] For similarity calculation, the similarity calculation unit 512 calculates SADs between the neighboring pixels 423 through 425 and the neighboring pixels 411.
[78] The motion vector estimation unit 513 estimates the motion vector of the current block 410 based on the calculation result obtained by the similarity calculation unit 512. Detailed methods for motion vector estimation have already been described with reference to FIGS. 3B, 4B, and 4C.
[79] FIG. 6 is a block diagram of an encoder 600 including the apparatus 500 according to an exemplary embodiment of the present invention.
[80] Referring to FIG. 6, an addition unit 601 calculates a difference between image data of a current frame input from the outside and motion-compensated video data received from a motion compensation unit 609 and transmits the difference to a frequency conversion unit 602. If a current macroblock is subject to inter-mode coding, the addition unit 601 outputs the difference between the image data input from the outside and the motion-compensated image data to the frequency conversion unit 602.
[81] The frequency conversion unit 602 performs discrete cosine transformation (DCT) on image data received from the addition unit 601 in order to convert spatial-domain values into frequency-domain values and outputs the conversion frequency-domain values to a quantization unit 603.
[82] The quantization unit 603 quantizes the frequency-domain values received from the frequency conversion unit 602 and outputs the quantized frequency-domain values to an entropy-coding unit 604.
[83] The entropy-coding unit 604 performs entropy-coding on the quantized frequency- domain values received from the quantization unit 603, on motion information, and on partition information received from the apparatus 500 in order to generate an encoded bitstream.
[84] An inverse quantization unit 605, an inverse frequency conversion unit 606, a frame storing unit 607, a motion estimation unit 608, the motion compensation unit 609, and the apparatus 500 constitute a set of modules/devices for motion compensation.
[85] The inverse quantization unit 605 performs inverse quantization on the quantized frequency-domain values received from the quantization unit 603 and outputs the inversely quantized frequency-domain values to the inverse frequency conversion unit 606.
[86] The inverse frequency conversion unit 606 converts the inversely quantized frequency-domain values received from the inverse quantization unit 605 into spatial- domain values and outputs the spatial-domain values to an addition unit 606a.
[87] The addition unit 606a adds image data output from the inverse frequency conversion unit 606 to image data received from the motion compensation unit 609 in order to generate reference image data for motion compensation. The generated reference image data is stored in the frame storing unit 607.
[88] The frame storing unit 607 stores image data of a reference frame received from the addition unit 606a.
[89] The motion estimation unit 608 performs motion estimation between image data of a current frame input from the outside and image data stored in the frame storing unit 607 in order to calculate motion vectors. The motion vectors calculated by the motion estimation unit 608 are transmitted to the motion compensation unit 609 and the apparatus 500.
[90] The motion compensation unit 609 performs motion compensation on image data stored in the frame storing unit 607 using the motion vectors calculated by the motion estimation unit 608 in order to generate motion-compensated image data. The motion- compensated image data is transmitted to the addition unit 601 and the addition unit 606a.
[91] The apparatus 500 includes the spatial similarity calculation unit 501, the partition selection unit 502, and the motion vector estimation unit 503 as described with reference to FIG. 5 A. The spatial similarity calculation unit 501 calculates an average value of pixels of the current block E and an average value of pixels of each of the neighboring partitions A, B, Al, A2, Bl, B2, and C around the current block E.
[92] If the average value of pixels of the current block E is a first average and the average value of pixels of each of the neighboring partitions A, B, Al, A2, Bl, B2, and C is a second average, the partition selection unit 502 selects a neighboring partition (or neighboring partitions) as a predictor of the current block E when an absolute value of a difference between the first average and the second average corresponding to the neighboring partition is less than a predetermined threshold. Information about the selected neighboring partition(s) is transmitted to the motion vector estimation unit 503.
[93] The motion vector estimation unit 503 estimates the motion vector of the current block E using a motion vector (or motion vectors) of the selected neighboring
partition(s). The partition information and motion information are output to the entropy-coding unit 604. The motion information indicates a difference between the estimated motion vector of the current block and the motion vector of the selected neighboring partition.
[94] These methods have already been described in detail with reference to FIGS. 3 A and
4A.
[95] According to another exemplary embodiment of the present invention, the apparatus
500 includes the search unit 511, the similarity calculation unit 512, and the motion vector estimation unit 513 as illustrated in FIG. 5B. The search unit 511 searches at least one reference frame(s) using the motion vectors of the plurality of neighboring partitions A, B, C, Al, A2, Bl, B2, and C that are adjacent to the current block 410 in order to search for the blocks 420 through 422 corresponding to the current block.
[96] The similarity calculation unit 512 calculates similarities between the neighboring pixels 423 through 425 that are adjacent to the found blocks 420 through 422, respectively, and the neighboring pixels 411 that are adjacent to the current block 410. For similarity calculation, the similarity calculation unit 512 calculates SADs between the neighboring pixels 423 through 425 and the neighboring pixels 411.
[97] The motion vector estimation unit 513 estimates the motion vector of the current block 410 based on the calculation result obtained by the similarity calculation unit 512. Partition information and motion information are output to the entropy-coding unit 604. The motion information indicates a difference between the estimated motion vector of the current block and the motion vector of the neighboring partition used to estimate the motion vector of the current block.
[98] Detailed methods for motion vector estimation have already been described with reference to FIGS. 3B, 4B, and 4C.
[99] FIG. 7 is a block diagram of a decoder 700 according to an exemplary embodiment of the present invention, in which the decoder 700 includes an entropy-decoding unit 701, an inverse quantization unit 702, an inverse frequency conversion unit 703, a frame storing unit 704, a motion compensation unit 705, an addition unit 706, and a motion vector estimation unit 707.
[100] Referring to FIG. 7, the entropy-decoding unit 701 performs entropy-decoding on an encoded bitstream and transmits the entropy-decoded bitstream to the inverse quantization unit 703 and the motion vector estimation unit 707. In particular, in the case of inter- mode coding, the entropy-decoding unit 701 extracts motion information and partition information associated with the current macroblock and entropy-decoded image data and outputs the extracted image data to the inverse quantization unit 702 and the extracted motion information and partition information to the motion vector estimation unit 707.
[101] The inverse quantization unit 702 performs inverse quantization on the entropy- decoded image data output from the entropy-decoding unit 702 and outputs the inversely quantized image data to the inverse frequency conversion unit 703.
[102] The inverse frequency conversion unit 703 converts the inversely quantized image data output from the inverse quantization unit 702 into spatial-domain values and outputs the spatial-domain values to the addition unit 706.
[103] The addition unit 706 adds the motion-compensated image data received from the motion compensation unit 705 to the inversely quantized image data received from the inverse frequency conversion unit 703 in order to generate reconstructed image data. The output of the addition unit 706 is decoded image data of the current frame.
[104] The frame storing unit 704 stores image data of a frame, which is output from the addition unit 706.
[105] The motion vector estimation unit 707 estimates a motion vector of the current block using the motion information extracted by the entropy-decoding unit 701 and a reference block of the frame storing unit 704. The estimated motion vectors are output to the motion compensation unit 705.
[106] More specifically, the motion vector estimation unit 707 estimates the motion vector of the current block in the same way as the apparatus 500 included in the encoder 600 illustrated in FIG. 6 estimates the motion vector. Thus, the motion vector estimation unit 707 may be configured in the same manner as the apparatus 500 illustrated in FIG. 6.
[107] The motion compensation unit 705 applies motion vectors and partition information received from the motion vector estimation unit 707 to image data of a reference frame stored in the frame storing unit 704 in order to perform motion compensation. The motion-compensated image data is output to the addition unit 706.
[108] FIG. 8 is a flowchart of a decoding method according to an exemplary embodiment of the present invention.
[109] Referring to FIG. 8, entropy-decoding is performed on motion information, partition information, and a residual block from an encoded bitstream in operation S 801.
[110] In operation S 802, a motion vector of the current block is reconstructed using the decoded motion information and partition information. More specifically, spatial similarities between the current block and a plurality of neighboring partitions around the current block are calculated based on the decoded partition information. At least one of the neighboring partitions is selected based on the calculated spatial similarities and a motion vector of the selected neighboring partition is estimated as the motion vector of the current block. Next, the motion information is added to the estimated motion vector in order to reconstruct the motion vector of the current block.
[I l l] According to another exemplary embodiment of the present invention, at least one
reference frame(s) is searched using motion vectors of a plurality of neighboring partitions around the current block, which are determined based on decoded partition information, in order to search for blocks corresponding to the current block. Similarities between neighboring pixels that are adjacent to the found blocks, respectively, and neighboring pixels that are adjacent to the current block are calculated. One of the motion vectors of the neighboring partitions is estimated as the motion vector of the current block based on the calculation result, and decoded motion information is added to the estimated motion vector in order to reconstruct the motion vector of the current block.
[112] In operation S 803, the motion vector reconstructed in operation S 802 is applied to the decoded reference block in order to generate a motion-compensated block. In addition, the residual block is entropy-decoded in operation S 801 and then undergoes inverse quantization and inverse frequency conversion in order to generate a spatial- domain residual block. The motion-compensated block and the spatial-domain residual block are added together in order to generate the current block.
[113] Since it is apparent that neighboring partitions can also be used for the decoding method and the decoder in order to estimate the motion vector of the current block in the same manner as in the encoder, a detailed description thereof will be omitted.