Method and apparatus for encoding/decoding image using variable sized macroblocks
A method performed by an apparatus of decoding a video in the unit of blocks, includes: decoding information on a block size from a bitstream; determining a maximum block size to be used for decoding an encoded image, based on the information on the block size; and reconstructing an image by decoding the encoded image using the determined maximum block size, wherein the information on the block size includes a first information on a minimum block size and a second information on a difference between the minimum block size and the maximum block size.
1. A method performed by an apparatus of decoding a video in the unit of blocks, the method comprising:
decoding information on a block size from a bitstream;
determining a maximum block size to be used for decoding an encoded image, based on the information on the block size; and
reconstructing an image by decoding the encoded image using the determined maximum block size,
wherein the information on the block size includes a first information on a minimum block size and a second information on a difference between the minimum block size and the maximum block size,
wherein the second information has a value of log 2 (MB size/X), where MB size is the maximum block size and X is the minimum block size.
2. The method of claim 1 , wherein the first information and the second information are decoded by an exponential Golomb code.
3. The method of claim 1 , wherein the maximum block size is determined among block sizes ranging from a size of 16*16 pixels to a size of 64*64 pixels.
4. The method of claim 1 , wherein the reconstruction of the image comprises:
dividing a current block to be decoded into one or more blocks, the current block having the determined maximum block size; and
reconstructing the current block by inter-predicting or intra-predicting each of the blocks divided from the current block.
5. The method of claim 1 , wherein the information on the block size is decoded from the bitstream in the unit of sequences.
6. An apparatus of decoding a video in the unit of blocks, the apparatus comprising:
a size determiner configured to
extract information on a block size from a bitstream, and
determine a maximum block size to be used for decoding an encoded image, based on the information on the block size; and
a video decoder configured to reconstruct an image by decoding the encoded image using the determined maximum block size,
wherein the information on the block size includes a first information on a minimum block size and a second information on a difference between the minimum block size and the maximum block size,
wherein the second information has a value of log 2 (MB size/X), where MB size is the maximum block size and X is the minimum block size.
7. The apparatus of claim 6 , wherein the first information and the second information are decoded by using an exponential Golomb code.
8. The apparatus of claim 6 , wherein the maximum block size is determined among block sizes ranging from a size of 16*16 pixels to a size of 64*64 pixels.
9. The apparatus of claim 6 , wherein the video decoder is configured to
divide a current block to be decoded into one or more blocks, the current block having the maximum block size, and
reconstruct the current block by inter-predicting or intra-predicting each of the blocks divided from current block.
10. The apparatus of claim 6 , wherein the information on the block size is extracted from the bitstream in the unit of sequences.